http://stackoverflow.com/a/26778057
type: AcceptedAnswer
type: Answer
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26777815
has body: You can use require.js for this purpose. Here is a good article on how to do it.
accepted answer of: http://stackoverflow.com/q/26777815
upvote count: 3

http://stackoverflow.com/comment/42005301
comment on: http://stackoverflow.com/q/26706261
score: 0
type: Comment
type: QuestionComment
has text: Please show an example of that image.

http://stackoverflow.com/comment/42076117
score: 0
comment on: http://stackoverflow.com/q/26745228
type: Comment
type: QuestionComment
has text: @ADASein If he does that, he has to remove the explicit call to `$.parseJSON`.

http://stackoverflow.com/a/26711378
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26711266
type: Answer
score: 7
upvote count: 7
has comment: http://stackoverflow.com/comment/42013966
has body: You should use an object instead: function myfunction(i, callback) { var callBackString = {}; callBackString.value1 = value1; callBackString.value2 = value2; callBackString.value3 = value3; callback(null, callBackString); } Then the receiving end: myfunction(i, function(err, result) { var value1 = result.value1; var value2 = result.value2; var value3 = result.value3; console.log(JSON.parse(JSON.strigify(result))); });
accepted answer of: http://stackoverflow.com/q/26711266

http://stackoverflow.com/a/26740413
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/26740305
has body: There's an easy way to disable autocomplete, autocorrect, and autocapitalise on mobile devices. It comes in the form of 3 attributes that can be used on input fields: &lt;input type="text" autocorrect="off" /&gt; &lt;input type="text" autocomplete="off" /&gt; &lt;input type="text" autocapitalize="off" /&gt; You can also disable spell-checking: &lt;input type="text" spellcheck="false" /&gt; As far as I'm aware there is no native way to disable autocomplete built into reCAPTCHA. As you say, I can't find anything in the docs or anywhere else. As you say though, it would be fairly trivial to run a script to set this automagically: With jQuery: $("input[type=text]").attr("autocomplete", "off"); Without jQuery (vanilla JS): document.querySelectorAll("input[type=text]").setAttribute("autocomplete", "off");
score: 2
downvote count: 0

http://stackoverflow.com/comment/45398587
comment on: http://stackoverflow.com/q/26801638
score: 0
type: Comment
type: QuestionComment
has text: Yes, you can use seralize ajax form submit, and call the message when there is sucess in response to the ajax call or failure message....

http://stackoverflow.com/comment/41969004
has text: Unless there is a JavaScript error being thrown during JSON.parse, it is perfectly ok to have property names with any just about any character. You could do `data.Product[0]["@ProductCode"]` to access that value.
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26685249

http://stackoverflow.com/a/26705039
has body: Just set one of width or height and other will be set automatically according to image sides ratio.
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26705009

http://stackoverflow.com/comment/42027207
type: QuestionComment
comment on: http://stackoverflow.com/q/26716091
has text: Imagine two sub-arrays, where each value within the same index are being compared. The smaller of the two values overwrites the value in the first position in the original index. Then the array counter increments, and the same operation keeps repeating until the array is exhausted. And once the whole operation is done, yes, it will replace the same number of elements in the destination array.
score: 0
type: Comment

http://stackoverflow.com/comment/42060629
type: Comment
comment on: http://stackoverflow.com/a/26737200
has text: Thankyou this worked. i tried adding < br > but it didnt work although it worked with \n .
score: 0
type: AnswerComment

eval
tags question: http://stackoverflow.com/q/26740171
tags question: http://stackoverflow.com/q/26802196
type: Tag
tags question: http://stackoverflow.com/q/26786969
tag name: eval
tags question: http://stackoverflow.com/q/26829346
tags question: http://stackoverflow.com/q/26789911

http://stackoverflow.com/q/26687008
tagged with: javascript
has title: What's the difference between async and job in Polymer
accepted answer: http://stackoverflow.com/a/26693755
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26693755
score: 2
type: AnsweredQuestion
has body: js newbie here! I have read the description of job but still quite confuse about the difference with using this.async(function(){...}, 500), is clearing this.toastTimeout1 first(I haven't written any code to 'delay some tasks' before and not familiar with this tech)? And when I am reading core-tooltip.html, I found a piece of code: labelChanged: function(oldVal, newVal) { this.job('positionJob', this.setPosition); }, Why not call this.serPosition directly?
downvote count: 0
type: Question
upvote count: 2
tagged with: polymer

http://stackoverflow.com/a/26808345
type: Answer
answers question: http://stackoverflow.com/q/26808285
accepted answer of: http://stackoverflow.com/q/26808285
has body: You are very, very close. Simply use vertical-align like so: #Section1 &gt; div { display: table-cell; /*width: 1%;*/ border-right: 1px dotted red; text-align: center; vertical-align: top; /* vertical-align to the rescue!!! */ } Just need a tiny fix, vertical-align will be your friend!! :) http://jsfiddle.net/tdorbbv6/106/
score: 5
upvote count: 5
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26821083
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/42211742
accepted answer: http://stackoverflow.com/a/26821548
has comment: http://stackoverflow.com/comment/42211933
type: AnsweredQuestion
upvote count: 3
has comment: http://stackoverflow.com/comment/42211837
type: Question
tagged with: keen-io
score: 3
has title: Refreshing a Keen.io graph / query
has answer: http://stackoverflow.com/a/26821548
tagged with: javascript
has body: The following docs make it seem like my code should work, however I'm getting an undefined error, I'm sure it's something simple but I can't quite get my head around it. https://github.com/keen/keen-js/blob/master/docs/visualization.md#automatic-updates var clicks_keen = new Keen.Query("count", { eventCollection: "clicks", groupBy: "campaign.id", interval: window.interval, timeframe: window.timeframe }); clicks_keen.refresh();
answer count: 1

http://stackoverflow.com/comment/42183786
type: Comment
comment on: http://stackoverflow.com/q/26804403
score: 0
has text: Good question. Could you add your html etc to a fiddle so we can take a look?
type: QuestionComment

http://stackoverflow.com/q/26723818
tagged with: php
tagged with: pdo
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42038151
has answer: http://stackoverflow.com/a/26724817
tagged with: mysql
has comment: http://stackoverflow.com/comment/42038435
has comment: http://stackoverflow.com/comment/42037838
has comment: http://stackoverflow.com/comment/42038584
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42038497
type: Question
has comment: http://stackoverflow.com/comment/42038185
has comment: http://stackoverflow.com/comment/42038465
has comment: http://stackoverflow.com/comment/42038570
has comment: http://stackoverflow.com/comment/42037937
has comment: http://stackoverflow.com/comment/42038533
has comment: http://stackoverflow.com/comment/42038479
has body: Here I have an dataRange loop, but for this case its not important, more important than dateRange is $i: So I have: $dateString = '09.03.2014'; $startDate = new DateTime($dateString); $period = new DateInterval('P1M'); $endDate = clone $startDate; $endDate-&gt;add($period); $interval = new DateInterval('P1D'); $daterange = new DatePeriod($startDate, $interval ,$endDate); $i=1; foreach($daterange as $date){ $temp = array(); // the following line will be used to slice the Pie chart $temp['ID'] = $i; $temp['datum'] = $date-&gt;format("d/m") . PHP_EOL; $rs1 = $db-&gt;prepare('SELECT naziv FROM aktivnosti WHERE user_id=:idd'); $rs1-&gt;bindParam(':idd', $i); $rs1-&gt;execute(); $naz = $rs1-&gt;fetchColumn(); if ($naz != false) { $temp['vrsta'] = $naz; } else { $temp['vrsta'] = ''; } $output['data'][] = $temp; $i++; } $jsonTable = json_encode($output); As you can see I have for loop and with $temp['vrsta'] I want to get data from table aktivnosti . I also have JS UI layer on frontend which make a html from data: $('#example').dataTable( { "ajax": "table1.php", "columns": [ { "data": "ID" }, { "data": "datum" }, { "data": "naziv" }, { "data": "vrsta" }, ], "lengthMenu": [ 31 ], "columnDefs": [ { "targets": 3, "data": "download_link", "render": function ( data, type, full, meta ) { if (data != '') { return '&lt;button class="btn btn-success"&gt;'+data+'&lt;/button&gt;'; }else { return data; } } } , etc... Now my code fetch only first row data so problem is becouse I have many rows on table aktivnosti with the same user_id so when I have many the same user_id on aktivnosti I also need to create ''+data+''; for every row from table aktivnosti but I have NO idea how to do that? Some ideas? How I can do that?
has comment: http://stackoverflow.com/comment/42038408
tagged with: javascript
has title: Get rows data from base with php
has comment: http://stackoverflow.com/comment/42038364
accepted answer: http://stackoverflow.com/a/26724817
has comment: http://stackoverflow.com/comment/42038314
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42038045
has comment: http://stackoverflow.com/comment/42038396
has answer: http://stackoverflow.com/a/26724078
has comment: http://stackoverflow.com/comment/42037277
favorite count: 0
has comment: http://stackoverflow.com/comment/42037660
possible better answer: http://stackoverflow.com/a/26724078
has comment: http://stackoverflow.com/comment/42038239

http://stackoverflow.com/q/26717203
answer count: 0
tagged with: http
type: Question
has comment: http://stackoverflow.com/comment/42024586
tagged with: javascript
has body: I got a website (Angular.js based) with an online form where users may enter any URL. I would like to instantly check out of the browser, whether the entered domain is valid (=reachable, can be connected to). I therefore only need the header information (status code), NOT the actual website content. I tried this piece of code, but it keeps returning code 200, no matter what the address is: $scope.checkURL = function(index){ if($scope.items[index].address != ""){ $http({ method: 'GET', url: $scope.items[index].address }) .success(function(data, status, headers, config){ if(status){ alert('yes!!'+status.toString()); //&lt;--- always getting this!!!! } }) .error(function(data, status, headers, config){ if(status){ alert('error!!'+status.toString()); } }); } }; I am aware that I am running into CORS-issues here. I just wanted to ask if: There is any way to reliably (!) perform this kind of URL-checking out of the browser (again, I just need header/status information, not any actual website content) - preferably using AngularJs. Unless anyone tells me otherwise, I'd alternatively set up a REST-service on my node.js webserver that I query every time, although I wanted to keep that load away from my server. Any suggestions?
score: 0
has comment: http://stackoverflow.com/comment/42977860
tagged with: angularjs
type: UnansweredQuestion
has title: Angular.js: URL validation always returns 200

http://stackoverflow.com/q/26679256
linked to: http://stackoverflow.com/q/13104681
has title: Adding hyeperlinks to zoomable d3 circle pack
accepted answer: http://stackoverflow.com/a/26681053
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41958923
type: Question
tagged with: javascript
has body: I've been trying to add clickable hyperlinks to a zoomable d3 circle pack based on this code: http://bl.ocks.org/nilanjenator/4950148, but I just can't get it to work. Ideally I'd link a link under the text label for the circle, but at this point a clickable label would be just as rad. I'm sure its a misunderstanding of d3 on my part. I've researched several stack topics that should work: (Hyperlinks in d3.js objects) and here are my failed attempts. I've also updated the json data file to include urls, ie. { "name": "data", "children": [ {"name": "Data", "size": 20544, "url":"http://katetempest.co.uk/audio"}, {"name": "Ellington Willoughby", "size": 19788, "url": "http://wwww.ellingotnwilloughby.com"}, {"name": "HELP", "size": 10349,"url":"http://en.wikipedia.org/wiki/Help!_%28album%29" }, { etc. First crash and burn..adding a xlink to either the circle or the text, or node as mentioned in the other stack questions. This is where my d3 understanding breaks down. vis.selectAll(".node")//also tried "cirlce" and "text" .append("svg:a").attr("xlink:href", function(d){ return d.url }) .append("svg:text") .text(function(d) { return d.name; }) .attr("dy", 3.5) .attr("dx", 5.5) .attr("text-anchor", "bottom"); I've added &lt;html xmlns:xlink="http://www.w3.org/1999/xlink"&gt; to my html at the beginning of the project. But nothing happends. Next burn - Adding on "onclick" event to the text such as: vis.selectAll("text") .data(nodes) .enter().append("svg:text") .attr("class", function(d) { return d.children ? "parent" : "child"; }) .attr("x", function(d) { return d.x; }) .attr("y", function(d) { return d.y; }) .attr("dy", ".35em") .attr("text-anchor", "middle") .style("opacity", function(d) { return d.r &gt; 20 ? 1 : 0; }) .text(function(d) { return d.name; }) .on("click",function(d){window.location = d.url}); ///&lt;----Party here? Nope! I'v also made sure to set my css as: circle.child { pointer-events: all; } Since I've read this gets in the way of tool-tips and general c…
score: 0
has answer: http://stackoverflow.com/a/26681053
has comment: http://stackoverflow.com/comment/41959457
answer count: 1
tagged with: d3.js
tagged with: circle-pack

http://stackoverflow.com/comment/41948511
comment on: http://stackoverflow.com/a/26673588
score: 0
type: AnswerComment
has text: @MattBrowne I wouldn't expect the OP to copy and paste my example into production code, but I've added it anyway. Thanks :)
type: Comment

http://stackoverflow.com/comment/42186231
score: 1
has text: Please a some comments about the code you are providing.
type: AnswerComment
comment on: http://stackoverflow.com/a/26805944
type: Comment

http://stackoverflow.com/comment/42131146
type: Comment
type: QuestionComment
has text: How do you call the function?
score: 2
comment on: http://stackoverflow.com/q/26776351

http://stackoverflow.com/comment/42024842
score: 0
type: AnswerComment
has text: i've just opend new question http://stackoverflow.com/questions/26717396/find-match-pattern-in-string-object ,please see if you can help,Thanks!
type: Comment
comment on: http://stackoverflow.com/a/26715408

http://stackoverflow.com/q/26794318
tagged with: initialization
has body: 2 Questions: 1) How Do You Know How To Initialize A Script? Is the code always in a certain spot in the js file, do you have to create the initializing code from scratch, etc? 2) Why don't you have to "activate"/initialize the jQuery script? The other scripts I'm using required activating, so why is it that jQuery.js doesn't require an internal script to get it going? Just trying to wrap my head around the concept, thanks in advance!
linked to: http://stackoverflow.com/q/8629859
has title: How Do You Know How To Initialize A Script?
type: AnsweredQuestion
score: 0
type: Question
has answer: http://stackoverflow.com/a/26794399
has comment: http://stackoverflow.com/comment/42163965
has answer: http://stackoverflow.com/a/26794603
has comment: http://stackoverflow.com/comment/42198543
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26794399
possible better answer: http://stackoverflow.com/a/26794603
answer count: 2
tagged with: jquery

http://stackoverflow.com/a/26747729
type: Answer
answers question: http://stackoverflow.com/q/26747661
has body: Use jQuery's $.isNumeric(). Docs @ jquery.com and cool discussion @ SO
score: 0

http://stackoverflow.com/q/26689311
answer count: 1
tagged with: javascript
tagged with: aggregation-framework
accepted answer: http://stackoverflow.com/a/26694601
has title: Display items grouped by a field
tagged with: mongodb-query
type: AnsweredQuestion
type: Question
tagged with: mapreduce
has body: I have this example items collection: { "_id": "1", "field1": "value1", "field2": "value2", "category": "phones", "user": "1", "tags": [ "tag1", "tag3" ] }, { "_id": "2", "field1": "value1", "field2": "value2", "category": "phones", "user": "1", "tags": [ "tag2", "tag3" ] }, { "_id": "3", "field1": "value1", "field2": "value2", "category": "bikes", "user": "1", "tags": [ "tag3", "tag4" ] }, { "_id": "4", "field1": "value1", "field2": "value2", "category": "cars", "user": "2", "tags": [ "tag1", "tag2" ] } I would to search items created by specific user (ie user: 1) and display them by category field. Result: { "phones": [ { "_id": "1", "field1": "value1", "field2": "value2", "tags": [ "tag1", "tag3" ] }, { "_id": "2", "field1": "value1", "field2": "value2", "tags": [ "tag2", "tag3" ] } ], "bikes" : [ { "_id": "3", "field1": "value1", "field2": "value2", "tags": [ "tag3", "tag4" ] } ] } Is it possible to obtain this scheme with aggregation-group functions? Thanks you
has answer: http://stackoverflow.com/a/26694601
score: 0
tagged with: mongodb

http://stackoverflow.com/comment/42211523
comment on: http://stackoverflow.com/a/26812344
type: AnswerComment
score: 0
type: Comment
has text: Thanks Keith I ended up using qTip2 for mousetracking

http://stackoverflow.com/comment/42192055
comment on: http://stackoverflow.com/a/26806010
type: AnswerComment
has text: Looks like you're right. Fortunately I'm not in a hurry so I'll leave it as is and wait for the update. Thanks !
score: 0
type: Comment

http://stackoverflow.com/q/26784834
has answer: http://stackoverflow.com/a/27720746
has title: Open URL in Photoshop CC?
accepted answer: http://stackoverflow.com/a/26887892
has body: I'd like to open an url (google.de) in Photoshop when I press a button. I've tried it with : var url = "http://www.google.de"; system.callSystem("explorer " + url); and: this.that.window.open("http://www.google.de", "Zweitfenster", "width=300,height=400,left=100,top=200"); But without luck. Also I couldn't record it when I tried to open the adobe link in photoshop. (it's not recorded).
type: AnsweredQuestion
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26887892
has comment: http://stackoverflow.com/comment/42328544
score: 0
answer count: 2
tagged with: url
possible better answer: http://stackoverflow.com/a/27720746
tagged with: photoshop

http://stackoverflow.com/q/26737804
tagged with: ajax
tagged with: php
has comment: http://stackoverflow.com/comment/42062754
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26737906
score: 0
has title: Reloading vs Refreshing page with jquery on shared host
type: Question
has comment: http://stackoverflow.com/comment/42061806
tagged with: javascript
tagged with: caching
accepted answer: http://stackoverflow.com/a/26737906
has comment: http://stackoverflow.com/comment/42062287
has comment: http://stackoverflow.com/comment/42062156
answer count: 1
has comment: http://stackoverflow.com/comment/42062419
tagged with: jquery
has body: I am working with codeigniter and jquery. I am using ajax to send some info to a codeigniter function to perform a db operation , in order to update the page. $.ajax({ type: "POST", url: BASE_URL+"Update/update", data:{ i : searchIDs, m : message }, dataType: 'json', success: function(data) { console.log(data); }, error: function(data) { console.log(data); }, complete: function() { alert("REFRESHING.."); window.location.href = "pan_controller/reply"; } }); After the operation is complete I want to reload the page. This works normally in locally on my WAMP. However when I deploy to a shared host I usually have to reload the page manually, (using the reload button in the browser -- screenshot above). I see no errors in firebug. I've tried a variety of fixes but have recently started to wonder if this is a caching issue on my shared hosting server. If so is there a better way to reload using jquery rather than just redirect so as to avoid a cache on the shared host?

http://stackoverflow.com/comment/42138387
type: Comment
score: 0
type: AnswerComment
has text: thanks for the inspiration XD i got a better way to prevent the event hook called multiple times when i call `BootBox` function more than once
comment on: http://stackoverflow.com/a/26780145

http://stackoverflow.com/a/26760408
accepted answer of: http://stackoverflow.com/q/26760033
score: 1
answers question: http://stackoverflow.com/q/26760033
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: Looks like you were close you just need to take a little more time checking your formatting... There are a lot of unanswered questions here but this is what you were shooting for, I think. BlaBla
type: Answer

http://stackoverflow.com/q/26731021
tagged with: android
tagged with: http://stackoverflow.com/tag/html
tagged with: curl
answer count: 0
tagged with: dom
type: Question
has comment: http://stackoverflow.com/comment/42049771
tagged with: javascript
has comment: http://stackoverflow.com/comment/42049749
has body: I am new to HTML5/JS for Android. I was wondering if there is a way of pulling data from external sources (Just like simple html dom OR curl for PHP). Am trying to build an app which need to pull the news from other sources (like BBC etc). I'll appreciate any idea, link,any available open source project. Big Thanks.
score: 0
type: UnansweredQuestion
has title: Get data from external websites using HTML5/JS for Android

http://stackoverflow.com/q/26809942
has title: Regex for token replacement in JavaScript
accepted answer: http://stackoverflow.com/a/26810138
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26810077
type: Question
possible better answer: http://stackoverflow.com/a/26810077
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26810138
has body: I have a very specific requirement in JavaScript, and I'm wondering if anyone can help. I'm looking for a validation Regex that I can use to validate tokens in a string. Each token is in the following format: (__([A-Z1-9_])+__) IOW, two underscores, following by any number of upper-case characters, digits or underscores, and ending with another two underscores. Examples might be: __A_TOKEN__ __ANOTHER_1T_O_K_E_N__ A token cannot contain two underscores, so the following would be invalid: __A__TOKEN__ Finally, there could be multiple tokens in the string, with or without other leading or trailing characters, like this: http://__DOMAIN__/__PATH__/logs/__LOGFILE__.log Theoretically, there could even be two tokens right next to one another, e.g.: __TOKEN_A____TOKEN_B__ I've been playing with regex's for a while, but this has me stumped as to how to validate. It's easy enough to simply check for a single token with optional leading/trailing text, with this: ^(.*)?(__([A-Z1-9_])+__)+(.*)?$ but how can I check for multiple tokens, like this (which will validate using the above regex): xxx__UPPERCASE__yyy__lowercase__ which shouldn't be allowed, since __lowercase__ isn't a valid token. Is this something which is best validated programatically rather than with a regex?
tagged with: regex

http://stackoverflow.com/q/26691776
possible better answer: http://stackoverflow.com/a/26691885
upvote count: 3
answer count: 2
has comment: http://stackoverflow.com/comment/41979547
favorite count: 0
tagged with: twitter-bootstrap
tagged with: checkbox
has answer: http://stackoverflow.com/a/26691885
type: AnsweredQuestion
score: 3
downvote count: 0
type: Question
has body: I'm creating a website involving bootstrap and want to display a list of checkboxes (names of computers) in a modal dialog for the user to choose from. I have an AJAX call and response that is returning the information I want but I don't know how to properly display it. Basically, each item that is in the returned list I receive, I want to append a checkbox to the list being displayed in the modal. I've done something similar to this before and feel like I'm close but don't quite understand how something like this can be done. If anyone could teach me how to do this I would greatly appreciate it! My javascript/html code is below from my JSP page. Let me know if this is not clear or more information is needed on my part. Thank you very much!!! × Workstations Cancel Done Here is the javascript code I'm using to the response back from my AJAX call. function getWorkstations(e) { var branchName = $('#txtBranch').val(); if(e.checked) { $.ajax({ url : 'ajaxwks.html', type: 'POST', data: branchName, cache:false, beforeSend: function(xhr) { xhr.setRequestHeader("Content-Type", "text/plain"); }, success : function(response) { alert(response); $.each(response, function(key, value){ $('#wkslist').append($("<input type='checkbox' name=" + key + "").text(value) + " "); }); }, error:function(jqXhr, textStatus, errorThrown){ alert(textStatus); } }); //ajax call for workstations. $('#myModal').modal('show'); } } This is a snippet of what is returned when I popup the message box when doing an alert in javascript. ["10.117.181.101:NOVELL:001:7637:C",hb:NOVELL:001:7637:C","WD08900960051","WD08900960052","WD08900960056"]
has answer: http://stackoverflow.com/a/26692011
accepted answer: http://stackoverflow.com/a/26692011
has title: Dynamically Create Checkboxes from AJAX Response
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/q/26684946
possible better answer: http://stackoverflow.com/a/26685104
has answer: http://stackoverflow.com/a/26685033
has title: How to find the string that matches in array?
tagged with: regex
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26685954
has answer: http://stackoverflow.com/a/26685058
type: Question
has comment: http://stackoverflow.com/comment/41968018
has comment: http://stackoverflow.com/comment/41968063
has answer: http://stackoverflow.com/a/26685104
tagged with: javascript
has body: I would like to get the full string element from an array that matches multiple substrings in no particular order. If more than one match, an exception should be thrown. var thisArray = [ '/something_else/', '/and_something_else/', '/and_something_else_here/']; var thisMatch = [ 'some', 'and', 'here']; var matchingElement = new RegExp(thisArray , thisMatch); // Not sure about this What I want is for matchineElement to contain the string "and_something_else_here" after the regular expression has executed.
score: 0
accepted answer: http://stackoverflow.com/a/26685033
has comment: http://stackoverflow.com/comment/41968168
has comment: http://stackoverflow.com/comment/41968036
has comment: http://stackoverflow.com/comment/41968034

http://stackoverflow.com/comment/42141379
score: 0
has text: Yes I can, but the text keyboard is very uncomfortable compared to the digit one.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26781481

scraper
tags question: http://stackoverflow.com/q/26739725
tag name: scraper
type: Tag

http://stackoverflow.com/a/26831271
type: Answer
has body: Hope you have tried - Returning binary file from controller in ASP.NET Web API. It says return HttpResponseMessage and set Content of response = file content and set header content type. Also, i would suggest to look into this - Download file from an ASP.NET Web API method using AngularJS. It says, you also need to set Content.Headers.ContentDisposition and Content.Headers.ContentDisposition.FileName .
answers question: http://stackoverflow.com/q/26820127
score: 0

http://stackoverflow.com/comment/42101338
score: 5
comment on: http://stackoverflow.com/q/26760033
type: Comment
type: QuestionComment
has text: _javascript_, not _java script_. It has nothing to do with java.

http://stackoverflow.com/a/26687592
answers question: http://stackoverflow.com/q/26687429
downvote count: 2
has comment: http://stackoverflow.com/comment/78475921
has body: Seems like you are looking for sessionStorage. A simple example from reference. // Save data to the current session's store sessionStorage.setItem("username", "John"); // Access some stored data alert( "username = " + sessionStorage.getItem("username"));
has comment: http://stackoverflow.com/comment/41973128
upvote count: 0
score: -2
type: Answer

http://stackoverflow.com/comment/42143959
type: Comment
has text: Is it possible that your browser somehow prevents the infinite loop?
type: QuestionComment
comment on: http://stackoverflow.com/q/26779996
score: 0

http://stackoverflow.com/comment/42039496
comment on: http://stackoverflow.com/a/26724793
score: 0
type: AnswerComment
type: Comment
has text: Ok SquareFeet, thanks! @travnik: interesting, with the use of Date, the emitter works almost as well as in the editor: http://i.imgur.com/pwBvtHO.png

http://stackoverflow.com/a/36885115
has body: try { //Block of code to try } catch(err) { // Block of code to handle errors }
type: Answer
answers question: http://stackoverflow.com/q/26795668
score: 3
upvote count: 3
downvote count: 0

http://stackoverflow.com/comment/42134513
type: QuestionComment
comment on: http://stackoverflow.com/q/26778180
has text: sorry, I've typed after ...should have been before...
score: 0
type: Comment

http://stackoverflow.com/comment/41978078
type: AnswerComment
has text: yes the usid, ssid are httponly cookies, how can I clear those cookies
type: Comment
comment on: http://stackoverflow.com/a/26690545
score: 0

http://stackoverflow.com/comment/41981074
has text: What are you trying to do?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26692628
score: 0

http://stackoverflow.com/q/26723641
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/42037397
score: -1
has title: The function doesn't increment the given variable
has comment: http://stackoverflow.com/comment/42037155
has comment: http://stackoverflow.com/comment/42037437
tagged with: functional-programming
has comment: http://stackoverflow.com/comment/42037051
answer count: 1
tagged with: javascript
has body: When the user clicks the button, it will verify if any radio button was checked(checkChoices()) and if so, it will compare the value of the checked radio button with the correctAnswer. The problem is with the keepScore() function because the score remains 0 for any answer. var score = 0; var checkChoices = function(){ for (var i = 0; i &lt; choices.length; i++) { if (choices[i].checked) { var value = choices[i].value; choices[i].checked = false; } } return value; }; //the keepScore function doesn't increment var keepScore = function(){ if(checkChoices() == allQuestions[y].correctAnswer) { score++; } }; var behavior = function(){ if(y&lt;allQuestions.length-1 &amp;&amp; checkChoices()) { keepScore(); y++; } }; nextBtn.onclick = function(){ behavior(); };
favorite count: 0
downvote count: 1
upvote count: 0
has answer: http://stackoverflow.com/a/26723815

http://stackoverflow.com/comment/42082012
type: QuestionComment
has text: No he wont as the server relays alices comment to bob, which is then inserted after bobs comment as it has a newer timestamp than bobs. Or you simply send the timestamp of creation from clientside with the comment to the server, check if its realistic(to prevent people from commenting weeks later and altering the timestamp to be first) and either use the client timestamp or generate a new one server side. So you're essentially using the client side timestamps if they're valid.
comment on: http://stackoverflow.com/q/26748500
type: Comment
score: 0

http://stackoverflow.com/a/26675459
has comment: http://stackoverflow.com/comment/41961158
has comment: http://stackoverflow.com/comment/41966846
has comment: http://stackoverflow.com/comment/41965624
has comment: http://stackoverflow.com/comment/41953815
has comment: http://stackoverflow.com/comment/41966285
has comment: http://stackoverflow.com/comment/41961443
has comment: http://stackoverflow.com/comment/41966246
has comment: http://stackoverflow.com/comment/41961525
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41966403
downvote count: 0
has body: Look at this part of the interface to jsfiddle: That "onLoad" selector means that the code you type into the JavaScript quadrant of the interface will be wrapped in a function for you, and that that function will serve as the "load" event handler for the window. Because your code is in a function, variables you declare at what appears to be the global level really aren't global; they're local variables in the function. To make your code truly global, change that selection to one of the "no wrap" settings.
type: Answer
accepted answer of: http://stackoverflow.com/q/26675008
has comment: http://stackoverflow.com/comment/41961344
has comment: http://stackoverflow.com/comment/41965683
answers question: http://stackoverflow.com/q/26675008
score: 1
upvote count: 1

http://stackoverflow.com/comment/42186568
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26806523
has text: That's just the base code. I tried probably 20 versions of it. Height, width, auto, percentages, pixels -- it's never responsive. If I set width to 100%, it will stretch all the way across the page, even with a max-width directive.
score: 0

http://stackoverflow.com/a/65224765
has body: This worked for me: $('[data-toggle="tooltip"]').tooltip({ trigger: "manual" }); $('[data-toggle="tooltip"]').on('mouseleave', function () { $(this).tooltip('hide'); }); $('[data-toggle="tooltip"]').on('mouseenter', function () { $(this).tooltip('show'); }); $('[data-toggle="tooltip"]').on('click', function () { $(this).tooltip('hide'); });
upvote count: 1
answers question: http://stackoverflow.com/q/26721137
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/42167533
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26796634
has text: Please refer the following post http://stackoverflow.com/questions/3025396/jquery-form-change

http://stackoverflow.com/comment/42045545
type: Comment
has text: Update: I think I got it. I moved a bunch of the "global VAR's" *into* the [for] loop. That seems to have done the trick.
type: AnswerComment
comment on: http://stackoverflow.com/a/26728566
score: 0

http://stackoverflow.com/a/26791075
score: 0
has body: I'm assuming you need to change all the images around, and not only up, down, left, right. Also I'm assuming you will call vClick correctly (i mean only when needed). Finally, this work may not work perfectly since it is the first idea. My idea is to iterate only once, from [i-1,j-1] to [i+1,j+1], and using a single function which will change the given item only if it exists. function vClick(iRow, iCol) { for (i = iRow-1; i&lt;=iRow+1; i++) for (j = iCol-1; j&lt;=iCol+1; j++) changeImage(i,j); } function changeImage(i,j) { var strID = "img" + i + "," + j; var theImage = document.getElementById(strID); if (theImage != null) if (theImage.src == 'bcircle.png') {theImage.src = 'rcircle.png'; astrColor[i][j] = 'r'; else {theImage.src = 'bcircle.png'; astrColor[i][j] = 'b';} }
type: Answer
answers question: http://stackoverflow.com/q/26790719
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26790719

javascript
tags question: http://stackoverflow.com/q/26714897
tags question: http://stackoverflow.com/q/26767604
tags question: http://stackoverflow.com/q/26721561
tags question: http://stackoverflow.com/q/26732120
tags question: http://stackoverflow.com/q/26721329
tags question: http://stackoverflow.com/q/26816552
tags question: http://stackoverflow.com/q/26686781
tags question: http://stackoverflow.com/q/26802224
tags question: http://stackoverflow.com/q/26724942
tags question: http://stackoverflow.com/q/26788504
tags question: http://stackoverflow.com/q/26793780
tags question: http://stackoverflow.com/q/26688298
tags question: http://stackoverflow.com/q/26699515
tags question: http://stackoverflow.com/q/26821876
tags question: http://stackoverflow.com/q/26691203
tags question: http://stackoverflow.com/q/26722492
tags question: http://stackoverflow.com/q/26761689
tags question: http://stackoverflow.com/q/26737370
tags question: http://stackoverflow.com/q/26779996
tags question: http://stackoverflow.com/q/26828016
tags question: http://stackoverflow.com/q/26688168
tags question: http://stackoverflow.com/q/26740424
tags question: http://stackoverflow.com/q/26747429
tags question: http://stackoverflow.com/q/26810368
tags question: http://stackoverflow.com/q/26754934
tags question: http://stackoverflow.com/q/26746911
tags question: http://stackoverflow.com/q/26762782
tags question: http://stackoverflow.com/q/26794699
tags question: http://stackoverflow.com/q/26673776
tags question: http://stackoverflow.com/q/26696581
tags question: http://stackoverflow.com/q/26784052
tags question: http://stackoverflow.com/q/26815602
tags question: http://stackoverflow.com/q/26718211
tags question: http://stackoverflow.com/q/26689155
tags question: http://stackoverflow.com/q/26716409
tags question: http://stackoverflow.com/q/26757651
tags question: http://stackoverflow.com/q/26765541
tags question: http://stackoverflow.com/q/26827276
tags question: http://stackoverflow.com/q/26792703
tags question: http://stackoverflow.com/q/26692778
tags question: http://stackoverflow.com/q/26720014
tags question: http://stackoverflow.com/q/26720070
tags question: http://stackoverflow.com/q/26710333
tags question: http://stackoverflow.com/q/26816447
tags question: http://stackoverflow.com/q/26761291
tags question: http://stackoverflow.com/q/26768123
tags question: http://stackoverflow.com/q/26693227
tags question: http://stackoverflow.com/q/26807063
tags question: http://stackoverflow.com/q/26792708
tags question: http://stackoverflow.com/q/26789356
tags question: http://stackoverflow.com/q/26809509
tags question: http://stackoverflow.com/q/26690310
tags question: http://stackoverflow.com/q/26828539
tags question: http://stackoverflow.com/q/26692575
tags question: http://stackoverflow.com/q/26673963
tags question: http://stackoverflow.com/q/26825857
tags question: http://stackoverflow.com/q/26709579
tags question: http://stackoverflow.com/q/26703518
tags question: http://stackoverflow.com/q/26774737
tags question: http://stackoverflow.com/q/26809681
tags question: http://stackoverflow.com/q/26719755
tags question: http://stackoverflow.com/q/26695651
tags question: http://stackoverflow.com/q/26722230
tags question: http://stackoverflow.com/q/26808750
tags question: http://stackoverflow.com/q/26716197
tags question: http://stackoverflow.com/q/26739036
tags question: http://stackoverflow.com/q/26722909
tags question: http://stackoverflow.com/q/26767480
tags question: http://stackoverflow.com/q/26707697
tags question: http://stackoverflow.com/q/26806733
tags question: http://stackoverflow.com/q/26695019
tags question: http://stackoverflow.com/q/26787606
tags question: http://stackoverflow.com/q/26794438
tags question: http://stackoverflow.com/q/26768162
tags question: http://stackoverflow.com/q/26716605
tags question: http://stackoverflow.com/q/26692814
tags question: http://stackoverflow.com/q/26725320
tags question: http://stackoverflow.com/q/26738661
tags question: http://stackoverflow.com/q/26769195
tags question: http://stackoverflow.com/q/26744603

http://stackoverflow.com/comment/42121652
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26770598
has text: I'd recommend stepping through this in the debugger and figuring out exactly where it stops executing. I'm fairly sure there's an error happening which stops the script.
type: Comment

http://stackoverflow.com/a/26784062
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26783492
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26783492
type: AcceptedAnswer
downvote count: 0
has body: In your code sample, you declared tab variable right after ng-app. ng-controller makes child scope so inside of ng-controller element tab is actually $parent.tab, ng-repeat makes another child (aka isolated) scope so if you change tab in your code to $parent.$parent.tab you can actually access it. Better practice is to just move element that shows active tab inside ng-controller and attach it to controller itself. As you can see in my code sample. (function() { // Angular var app = angular.module('app', []); app.controller('testimonialController', function() { this.role = [{ 'temeperiod': 'Sep 2009 - Sep 2010', 'position': 'Developer', 'company': 'Company', 'location': 'London, United Kingdom', 'description': 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor cididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,proident, sunt in culpa qui' }, { 'temeperiod': 'Sep 2009 - Sep 2010', 'position': 'Front End Developer', 'company': 'Company', 'location': 'London, United Kingdom', 'description': 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor cididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,proident, sunt in culpa qui' }, { 'temeperiod': 'Sep 2009 - Sep 2010', 'position': 'Web Developer', 'company': 'Company', 'location': 'London, United Kingdom', 'description': 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor cididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,proident, sunt in culpa qui' }, { 'temeperiod': 'Sep 2009 - Sep 2010', 'position': 'Web Developer', 'company': 'Company', 'location': 'London, United Kingdom', 'description': 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor cididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,proident, sunt in culpa qui' }]; }); })(); .position { position: relative; } .circle { width: 25px; height: 25px; display: block; color: #fff; cursor: pointer…

http://stackoverflow.com/comment/42048788
comment on: http://stackoverflow.com/q/26730377
has text: @AndreasFurster Sir m already Using XXMAP :)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26774238
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26774288
type: Question
answer count: 1
tagged with: javascript
has body: I'm trying to display a single digit integer (0 and 1) coming as an HTTP response. I'm not sure how to get that integer and store it? What function should I use? http_request.onreadystatechange = function() { if (http_request.readyState == 4) { if (http_request.status == 200) { // ...what goes here?... } setTimeout("loadJSON()", 1000); } } http_request.open("GET", data_file, true); http_request.send(); }
score: 0
has answer: http://stackoverflow.com/a/26774288
has title: JSON HTTP response - get a single integer

http://stackoverflow.com/comment/42192360
type: Comment
score: 1
type: QuestionComment
has text: Provide us with the code you've written so far. The languge you're using to describe the problem doesn't make sense, you cannot "return" things from arrays, and arrays don't "have variables". You cannot have "an array with 5 variables".
comment on: http://stackoverflow.com/q/26809858

http://stackoverflow.com/comment/42161688
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26793141
type: AnswerComment
has text: I changed it, but truth be told you don't know what scope was supposed to be. It could be a variable that holds a String for all I know.

http://stackoverflow.com/a/26742985
score: 2
has comment: http://stackoverflow.com/comment/42075402
downvote count: 0
answers question: http://stackoverflow.com/q/26742822
upvote count: 2
has body: In processRow() you're not doing anything with row in your else branch when row is not false. So you might need to change: function(err, ret) { docs = []; connection.resume(); if (row === false) process.exit(); } to something like: function(err, ret) { if (row) docs = [row]; else docs = []; connection.resume(); if (row === false) process.exit(); }
type: Answer

http://stackoverflow.com/q/26673901
tagged with: javascript
has comment: http://stackoverflow.com/comment/41947941
score: 0
has comment: http://stackoverflow.com/comment/41947514
has title: Drill down in google chart dashboard
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28472398
has comment: http://stackoverflow.com/comment/41948118
has body: Can anyone suggest me wth the code to achieve drill down feature in google chat dashboard. Say If i click on year its should drill down to next level say month and then to weeks and then days. its called drill down feature. This is code is for chart...I want to know how to use in dashboard-with say category filter. Regards, Prajna
has comment: http://stackoverflow.com/comment/41947776
type: Question
tagged with: pygooglechart
tagged with: google-visualization
answer count: 1

http://stackoverflow.com/comment/42218366
type: AnswerComment
comment on: http://stackoverflow.com/a/26819023
score: 0
type: Comment
has text: It seem that I must use scope instead of boxScope when compiling, and when compiling boxElem will have it own scope. Thanks.

http://stackoverflow.com/comment/42133890
has text: Okay. good. Can you please try this? Firefox/Chrome: element.getAttribute("textContent") IE: element.getAttribute("innerText")
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26774881
score: 0

http://stackoverflow.com/a/26725871
has body: you first should define an array of objects the proper way: var myarray=[{propA:'valueA'},{propB:'valueB'}] then refer to each object by index or any iteration method &lt;ul&gt; &lt;li&gt;{{Object.keys(myarray[0])}}:{{myarray[0]['propA']}}&lt;/li&gt; &lt;/ul&gt;
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26725751

http://stackoverflow.com/q/26789616
has answer: http://stackoverflow.com/a/28584542
type: AnsweredQuestion
tagged with: karma-runner
downvote count: 0
has body: I want to run some tests with Karma using multiple browsers. However, the tests are integration tests that interact with the database (get and update data). Since the same tests are run in multiple browsers, they all interact with the same test data. Therefore, if the tests are run concurrently in multiple browsers, one test may impact other tests running in other browsers. How can I limit the number of concurrent browsers, while still testing with multiple browsers? (for example, setting a limit to 1 would result in running tests for each browser in sequence instead of in parallel)
type: Question
has title: Limiting parallel browser instance in Karma
possible better answer: http://stackoverflow.com/a/26799723
tagged with: testing
has answer: http://stackoverflow.com/a/26799723
has answer: http://stackoverflow.com/a/33915679
accepted answer: http://stackoverflow.com/a/33915679
upvote count: 16
tagged with: javascript
answer count: 3
has comment: http://stackoverflow.com/comment/45474724
favorite count: 0
score: 16

http://stackoverflow.com/q/26786602
favorite count: 0
has title: Replace URL except in anchor tag Jascript Regex
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42149950
tagged with: regex
has body: I am using JavaScript/jQuery Regex for replacing URLs. It works perfect but i want not to replace URL that are in anchor tag. My current code: function urlify(text) { var urlRegex = /^(!href=")\w(((\b(https?|ftp|file):\/\/)|(www\.))[^\s]+)/g; //var urlRegex = /(https?:\/\/[^\s]+)/g; return text.replace(urlRegex, function (url, b, c) { var url2 = (c == 'www.') ? 'http://' + url : url; return '' + url + ''; }) } str='http://www.google.com and Yahoo'; urlify(str); Thanks in advance.
has comment: http://stackoverflow.com/comment/42149812
downvote count: 1
has comment: http://stackoverflow.com/comment/42149910
type: Question
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26786959
has comment: http://stackoverflow.com/comment/42150040
upvote count: 0
has comment: http://stackoverflow.com/comment/42150737
answer count: 1
tagged with: jquery

http://stackoverflow.com/q/26705556
answer count: 1
has answer: http://stackoverflow.com/a/26705660
tagged with: angularjs
type: AnsweredQuestion
has title: How to get the multiple http request results in my example?
accepted answer: http://stackoverflow.com/a/26705660
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42004183
score: 0
has body: I am trying to make a http request and place the returned result into my array. I have something like Ctrl for (var i=0; i &lt; numOfProduct.length; i++) { productFactory.makeRequest(numOfProduct[i].id) .then(function(data) { console.log(i) //always output 10 which is my numOfProduct.length numOfProduct[i].push({detail: data}); //i got Cannot read property 'push' of undefined error }) $scope.numOfProduct = numOfProduct; } productFactory service.makeRequest = function(id) { return $http.get('/api/product/get' + id); } return service; My goal is to push a http request result into each of numOfProduct element as an object. However, I can't seem to do that with the http request codes I have. Can anyone help me about it? Thanks so much!

http://stackoverflow.com/comment/42166967
score: 0
comment on: http://stackoverflow.com/q/26750671
type: Comment
type: QuestionComment
has text: Is this solved? I think the problem is in your javascript code where you call CalculateTotalOriginCost(chkChild), chkChild is not the single checkbox, but an array of controls. Did you debug the JavaScript code and find out what is it passing?

http://stackoverflow.com/a/26719565
accepted answer of: http://stackoverflow.com/q/26719464
score: 0
type: AcceptedAnswer
has body: That's because there is a bug in the script. Every time you scroll it executes the fade function. Because the animation is prefixed with a stop() the animation never really gets any time to run if you scroll slowly. You can either remove the .stop() or find a way to only apply the fade-in to elements that are not already fading in. There seems to be another bug. Sometimes items are not detected as being in the viewport and they will not fade in. I'm not sure why that happens. It might have something to do with scrolling really fast.
type: Answer
answers question: http://stackoverflow.com/q/26719464
has comment: http://stackoverflow.com/comment/42043301

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

http://stackoverflow.com/comment/42152070
score: 0
comment on: http://stackoverflow.com/q/26786969
type: Comment
type: QuestionComment
has text: @chris-l: `require`ing a file isn't much different from `eval` except maybe for the scope, but the `Function` constructor should be able to do that as well.

http://stackoverflow.com/comment/42184103
type: QuestionComment
has text: Something like function refreshCalendarAndStuff() { refreshCalendar(); doStuff(); } ?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26805378

http://stackoverflow.com/q/26795749
type: Question
has answer: http://stackoverflow.com/a/26910460
has comment: http://stackoverflow.com/comment/42165712
linked to: http://stackoverflow.com/q/10565055
linked to: http://stackoverflow.com/q/19867599
has title: How to get li tag value by javascript or jquery
score: 0
has comment: http://stackoverflow.com/comment/42165737
possible better answer: http://stackoverflow.com/a/26795787
has comment: http://stackoverflow.com/comment/42165961
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26796101
has comment: http://stackoverflow.com/comment/42165753
tagged with: css
has answer: http://stackoverflow.com/a/26795771
accepted answer: http://stackoverflow.com/a/26796101
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26795787
has comment: http://stackoverflow.com/comment/42165963
tagged with: php
has body: I need to get li value onclick function in php ...and want to store that in php session.. i used my code for this but this is not working.... i need to know that how to get li value on click function in java script.. i NEED to get li tag value of on click function and want to store in php session by js or jquery Vendor Registration $('.atleta').click(function(e) { var <?php $_SESSION['VENDR']?> = $(this)); });

http://stackoverflow.com/comment/42045029
has text: For the isolate scope these videos explain it really well video - https://egghead.io/lessons/angularjs-understanding-isolate-scope - https://egghead.io/lessons/angularjs-isolate-scope-two-way-binding
comment on: http://stackoverflow.com/a/26728115
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42534934
comment on: http://stackoverflow.com/a/26870069
type: AnswerComment
has text: Thanks! I was able to match up the sound and the display of text by synthesizing each word on its own. I used jQuery's setTimeout, and set the time to the words-per-mintue.
score: 0
type: Comment

http://stackoverflow.com/q/26801031
tagged with: underscore.js
score: 23
has answer: http://stackoverflow.com/a/26801173
upvote count: 23
type: Question
tagged with: javascript
downvote count: 0
has title: Skip and return objects from list of object using Lodash/Underscore
has answer: http://stackoverflow.com/a/44720430
has answer: http://stackoverflow.com/a/30454122
has body: I need to perform an operation similar to the following written in C#: int[] items = { 1, 2, 3, 4, 5, 6, 7 }; var a = items.Skip(2).Take(3); Which return 3, 4 and 5 Similarly I need to skip records from a list of object $scope.myObject = [ { Editable: true, Name: "Daniel Test", Site: "SE100"}, { Editable: true, Name: "Test new", Site: "SE100"}, { Editable: false, Name: "Test", Site: "SE100"} ] I need to skip first record and get back the remaining records, meaning 1-nth record How can I do this using lodash/underscore?
favorite count: 0
answer count: 5
possible better answer: http://stackoverflow.com/a/34758167
has answer: http://stackoverflow.com/a/45846606
tagged with: lodash
accepted answer: http://stackoverflow.com/a/26801173
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/34758167

http://stackoverflow.com/q/26781965
type: Question
has body: I have a function with an ajax code to get data from a table filter by username. function showdata(){ var username = $("#username").val(); // input:text element id = 'username' $.ajax({ type:"POST", url:"purchase_process.php", data: "act=show&username=" + username, success: function(data){ $("#show_data").html(data); // div element with id = 'show_data' $("#show_data").fadeIn(2000); } });} showdata(); $(".del_button").click(function(e) { e.preventDefault(); var id = $(this).attr('id'); var no = id.split('-'); var number= no[1]; var username = $("#user_"+number).val(); var code = $("#code_"+number).val(); $.ajax({ type:"POST", url:"purchase_process.php", data: "act=delete&username=" + username + "&code=" + code , success: function(data){ $("#info").html(data); // div element id = info showdata(); } }); }); And here is the ajax response from purchase_process.php that show all data in a table that each rows of the data have element show in a image (delete.png) to delete row : No. Part Number Part Name Location Qty Cost Subtotal Action $no $r[part_code] $r[part_name] $r[location] $r[qty] ".number_format($r['cost'],2,",",".")." ".number_format($subtotal,2,",",".")." Function showdata() is running well but jquery function event:click for "a" element with class = "del_button" have no response whenever I click in image (delete.png) However if I make the same "a" element in that page, that jquery function running well. I assumed that jquery function don't get the "a" element value because that was called from ajax response. Is there anyone can help me to solve this trouble? Thanks before...
linked to: http://stackoverflow.com/q/203198
downvote count: 0
answer count: 1
has title: How to set jquery function for all of element in ajax response
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42141163
upvote count: 1
duplicate of: http://stackoverflow.com/q/203198
tagged with: php
has answer: http://stackoverflow.com/a/26782013
accepted answer: http://stackoverflow.com/a/26782013
type: AnsweredQuestion
score: 1
linked to: http://stackoverflow.com/q/12824549

http://stackoverflow.com/q/26676592
has comment: http://stackoverflow.com/comment/42014042
answer count: 2
score: 2
tagged with: slider
has comment: http://stackoverflow.com/comment/42016701
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
accepted answer: http://stackoverflow.com/a/26720388
favorite count: 0
tagged with: angularjs
upvote count: 2
tagged with: css
type: AnsweredQuestion
has body: I'm making a content slider for my project but I have very little expirience in AngularJS. I've found this plunker which suits my needs greatly. You can see my live page here. It is in russian language, but I hope it wont be a problem. Slider is in the middle of the page - a section with 8 cards. So the problem is: Slider is controlled by the arrows below it. Still if you click on the red button inside the card it will update the model and classes ng-enter and ng-leave will be applied to the parent container which will result in slider animation. Well, the problem becomes obvious if you just click these red buttons. Is there any way to make these red buttons not apply ng-enter and ng-leave classes to the container div? UPDATE: Here is a plunker, that illustrates my problem. The animation must happen when you click on Prev and Next buttons. But it happens when you click on "Choose" or "Choosen" links, which updates the model. This is a markup {{gift.title}} {{gift.points}} points Choose Chosen Prev Next
has answer: http://stackoverflow.com/a/26680327
type: Question
has answer: http://stackoverflow.com/a/26720388
has title: How to make an element stop triggering ngAnimate?
possible better answer: http://stackoverflow.com/a/26680327
tagged with: javascript

http://stackoverflow.com/comment/42030205
comment on: http://stackoverflow.com/q/26720077
type: Comment
type: QuestionComment
has text: Also your `alert` probably should be `alert('Yes');` not `alert('Yes'};` with a brace.
score: 0

http://stackoverflow.com/q/26723720
accepted answer: http://stackoverflow.com/a/26724340
has comment: http://stackoverflow.com/comment/42038032
has title: Change YouTube iframe src with jQuery
has answer: http://stackoverflow.com/a/26723825
upvote count: 3
answer count: 3
downvote count: 1
has comment: http://stackoverflow.com/comment/42037104
has comment: http://stackoverflow.com/comment/42037434
tagged with: javascript
has answer: http://stackoverflow.com/a/53644766
has answer: http://stackoverflow.com/a/26724340
has comment: http://stackoverflow.com/comment/42037635
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/42037552
possible better answer: http://stackoverflow.com/a/53644766
has comment: http://stackoverflow.com/comment/42037461
tagged with: jquery
favorite count: 0
has body: I am trying to change a YouTube video iframe source with jQuery, but looks like running into cross origin issue. My jquery code: var videourl = $(".videourl").html(); $(".actualyoutube iframe").attr('src',videourl); iframe gets new src value, but no video is displayed. Any ideas? extended explanation: There is a popup div with embeded youtube video X There is a certain td which contains a new src url. There is no other place or way to get this url except from this td. //youtube.com/whatevervideo And there is a script that should add src on open popup and remove on closing. var videourl = $(".videourl").html(); $(".youtubecap").click(function() { $(".actualyoutube iframe").attr('src', videourl); $(".youtubepopup").fadeIn('slow'); }); $(".closeyoutube").click(function() { $(".youtubepopup").fadeOut('slow'); $(".actualyoutube iframe").removeAttr('src'); }); $(".youtubepopup").click(function() { $(".youtubepopup").fadeOut('slow'); }); p.s. now that i laid it out, user3385530 is probably right
type: Question
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26753668
possible better answer: http://stackoverflow.com/a/26753797
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26753797
has answer: http://stackoverflow.com/a/26753738
has answer: http://stackoverflow.com/a/26754158
has comment: http://stackoverflow.com/comment/42090489
accepted answer: http://stackoverflow.com/a/26753677
upvote count: 1
favorite count: 0
downvote count: 0
has answer: http://stackoverflow.com/a/26753677
has comment: http://stackoverflow.com/comment/42090452
has comment: http://stackoverflow.com/comment/42090550
has answer: http://stackoverflow.com/a/26753772
tagged with: php
has title: Get values from multiple div with jquery
has comment: http://stackoverflow.com/comment/42090515
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26753753
score: 1
has answer: http://stackoverflow.com/a/26753731
type: Question
has body: I have some jquery question : I generate with php loop a list of div. I would like when I click on 1 div, print alert with the value of the div. First my html (result of php loop) code : My jquery code : $(".unlink_table").click(function(){ var test = $(".unlink_table").val(); alert(test); }); For that moment it doesn't work (alert empty) Thank you !
answer count: 8
has answer: http://stackoverflow.com/a/26754499

http://stackoverflow.com/comment/42432744
type: Comment
has text: Thanks for the answer. I assumed it would be for something like linting after someone mentioned warnings in a comment (which was then deleted).
comment on: http://stackoverflow.com/a/26941932
score: 0
type: AnswerComment

http://stackoverflow.com/a/26818580
has comment: http://stackoverflow.com/comment/42207416
has body: I think something like this is what you are looking for. /* Hide icon by default */ .box i { display: none; } /* Show icon on containing element hover */ .box:hover i { display: block; } For a fade-in transition, this would work. .box i { opacity: 0; -webkit-transition: opacity .3s ease-in; -moz-transition: opacity .3s ease-in; -o-transition: opacity .3s ease-in; -ms-transition: opacity .3s ease-in; transition: opacity .3s ease-in; } .box:hover i { opacity: 1; }
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26818191
has comment: http://stackoverflow.com/comment/42207385
answers question: http://stackoverflow.com/q/26818191
type: Answer
has comment: http://stackoverflow.com/comment/42207454
score: 1
upvote count: 1

http://stackoverflow.com/q/26763002
answer count: 1
has answer: http://stackoverflow.com/a/26763353
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42107618
tagged with: http://stackoverflow.com/tag/html
tagged with: events
has comment: http://stackoverflow.com/comment/42108068
has comment: http://stackoverflow.com/comment/42108459
type: Question
type: AnsweredQuestion
has body: I am trying and failing to implement a loaded function for a dynamically loaded image. I have the html element in the html markup first. I then have a timer that starts to fire on the jquery document ready function. Each time the timer fires (ticks), i set the source on the html image element, and i want to know when it loads. If it loaded correctly, i want to stop the timer. if it didnt load correct, do nothing. My main attempt focused on checking the natural width and height of the image node after i had set the source. but since the code probably ran faster than the load of the image, checking the natural widht and height right after the source setting resulted in values of 0 and 0. Should i just add a time delay between setting the image source and checking the natural width/height? Is that the correct solution? Here is what i have. Notice that the loaded event never fires, but every 2 seconds i get the messages HERE and HERE2 &lt;head&gt; ... &lt;script&gt; var timer; $(document).ready(function () { timer = setInterval(function () { tick() }, 2000); }); function tick() { alert('here'); $('#loginTestImage').on('load', function() { //never gets here alert('loaded image'); window.clearInterval(timer); }); alert('here2'); $("#loginTestImage").attr("src", 'https://asdasd.sds.com/asdp/images/asdasd.png'); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;img id='loginTestImage'&gt; &lt;/body&gt;
accepted answer: http://stackoverflow.com/a/26763353
has comment: http://stackoverflow.com/comment/42107532
tagged with: image
score: 0
has title: How to pickup image load of a dynamically loaded image?

http://stackoverflow.com/q/26805253
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42183519
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26805391
accepted answer: http://stackoverflow.com/a/26805391
downvote count: 0
has body: I've got webpage with this structure: Some information Other information After writing some text in the textareas, I use jquery to get the entire html. The result is that the textareas are empty, as if I hadn't written anything inside. I'm guessing it's because they do not accept html, but I need to get the html including textarea's content. The only solution I've found so far is to convert textareas to divs and then assign them the textarea content. Is there any other way to avoid this conversion?
has title: Make html() include content typed into textarea
type: AnsweredQuestion
score: 1
tagged with: dom
type: Question
upvote count: 1
tagged with: textarea

http://stackoverflow.com/comment/42019617
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26714194
has text: You can shorten your JS: `var toggle_state = new Date().getSeconds() % 2;` `var toggle_state = Math.random() > 0.5;`
score: 0

http://stackoverflow.com/a/26841528
score: 0
type: Answer
has body: You can use fnRowCallback for this: var oTable = $('#qpidvulh_to-do_list').dataTable( { "columns": [ { "data": "item" } ], "fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) { $(nRow).children().each(function (index, td) { $(this).addClass('editable'); }); }
answers question: http://stackoverflow.com/q/26810368

http://stackoverflow.com/a/26763304
answers question: http://stackoverflow.com/q/26763057
score: 0
type: Answer
has body: Could be a number of problems here. You'll probably need to do something like casting the value to lowercase (singleStatus.toLowerCase()), trimming all whitespace off ( using a regex replace or something similar ) along with ensuring anything else (like html, or whatever else) that could possibly cause the strings not to equate. You'll need to do all this preparation and sanitization before evaluating it and checking for the value you're after. if there is any differences whatsoever between strings, it will fail. >>>Edit&lt;&lt;&lt; To be clear here, the use of toLowerCase() and trim and anything else like that - the whole point is to get the strings as generic as possible. you'd then have to just evaluate it as str === 'pending'. this will ensure that the string case is the same, and also require less work to ensure that there are capital letters wherever it is you may be looking for them. >>> Edit 2&lt;&lt;&lt; Updated my answer by removing references to == and ===

http://stackoverflow.com/q/26829971
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42233713
has comment: http://stackoverflow.com/comment/42229019
type: UnansweredQuestion
tagged with: iframe
downvote count: 2
has comment: http://stackoverflow.com/comment/42227346
has answer: http://stackoverflow.com/a/26834036
has title: Javascript Iframe weekday
type: Question
upvote count: 0
score: -2
has body: the question on the assignment asks to insert a command to write the HTML code to the webpage where weekday is the text string returned by the weekDay() function. The iframe should display the daily schedules that are stored in the sunday.htm through saturday.htm file. The weekDay() function is located in an external .js file that I have already linked to my webpage. Another thing is there is no weekday.htm file instead there are files sunday.htm through saturday.htm that have the daily schedules to de displayed in the iframe. I know that I should some link the weekday.htm file to the weekDay() function. This is what I have done so far: Today at the Union Please advice as to how to get this thing working. I am not an expert( I am still learning.) I tried my best (spent several hours breaking my head on this). So any help is much appreciated. Thank you for your time
answer count: 1

node.js
tags question: http://stackoverflow.com/q/26785038
tags question: http://stackoverflow.com/q/26831643
tags question: http://stackoverflow.com/q/26781577
tags question: http://stackoverflow.com/q/26770345
tags question: http://stackoverflow.com/q/26756237
tags question: http://stackoverflow.com/q/26824850
tags question: http://stackoverflow.com/q/26712618
tags question: http://stackoverflow.com/q/26744691
tags question: http://stackoverflow.com/q/26683734
tags question: http://stackoverflow.com/q/26812861
tags question: http://stackoverflow.com/q/26678379
tags question: http://stackoverflow.com/q/26749828
tags question: http://stackoverflow.com/q/26776093
tags question: http://stackoverflow.com/q/26691543
tags question: http://stackoverflow.com/q/26822056
tags question: http://stackoverflow.com/q/26818095
tags question: http://stackoverflow.com/q/26780760
tags question: http://stackoverflow.com/q/26785798
tags question: http://stackoverflow.com/q/26681933
tags question: http://stackoverflow.com/q/26716476
tags question: http://stackoverflow.com/q/26756882
tags question: http://stackoverflow.com/q/26777060
tags question: http://stackoverflow.com/q/26732120
tags question: http://stackoverflow.com/q/26722492
tags question: http://stackoverflow.com/q/26795766
tags question: http://stackoverflow.com/q/26690271
tags question: http://stackoverflow.com/q/26777433
tags question: http://stackoverflow.com/q/26813431
tags question: http://stackoverflow.com/q/26787606
tags question: http://stackoverflow.com/q/26726495
tags question: http://stackoverflow.com/q/26681307
tags question: http://stackoverflow.com/q/26813053
tags question: http://stackoverflow.com/q/26791179
tags question: http://stackoverflow.com/q/26764548
tags question: http://stackoverflow.com/q/26682287
tags question: http://stackoverflow.com/q/26691761
tags question: http://stackoverflow.com/q/26822391
tags question: http://stackoverflow.com/q/26675277
tags question: http://stackoverflow.com/q/26789911
tags question: http://stackoverflow.com/q/26724192
tags question: http://stackoverflow.com/q/26706519
tags question: http://stackoverflow.com/q/26737796
tags question: http://stackoverflow.com/q/26784663
tags question: http://stackoverflow.com/q/26702869
tags question: http://stackoverflow.com/q/26813315
tags question: http://stackoverflow.com/q/26810963
tags question: http://stackoverflow.com/q/26698218
tags question: http://stackoverflow.com/q/26767655
tags question: http://stackoverflow.com/q/26684873
tags question: http://stackoverflow.com/q/26784094
tags question: http://stackoverflow.com/q/26779990
tags question: http://stackoverflow.com/q/26685472
tags question: http://stackoverflow.com/q/26731849
tags question: http://stackoverflow.com/q/26787520
tags question: http://stackoverflow.com/q/26719186
tags question: http://stackoverflow.com/q/26694961
tags question: http://stackoverflow.com/q/26796717
tags question: http://stackoverflow.com/q/26791640
tags question: http://stackoverflow.com/q/26681451
tags question: http://stackoverflow.com/q/26680397
tags question: http://stackoverflow.com/q/26824392
tags question: http://stackoverflow.com/q/26676645
tags question: http://stackoverflow.com/q/26747508
tags question: http://stackoverflow.com/q/26815541
tags question: http://stackoverflow.com/q/26746538
tags question: http://stackoverflow.com/q/26800552
tags question: http://stackoverflow.com/q/26814680
tags question: http://stackoverflow.com/q/26706209
tags question: http://stackoverflow.com/q/26713354
tags question: http://stackoverflow.com/q/26674281
tags question: http://stackoverflow.com/q/26809082
tags question: http://stackoverflow.com/q/26811028
tags question: http://stackoverflow.com/q/26812356
tags question: http://stackoverflow.com/q/26771063
tags question: http://stackoverflow.com/q/26827221
tags question: http://stackoverflow.com/q/26802206
tags question: http://stackoverflow.com/q/26773509
tags question: http://stackoverflow.com/q/26706472
tags question: http://stackoverflow.com/q/26831614
tags question: http://stackoverflow.com/q/26679685

http://stackoverflow.com/a/26730842
score: 0
has body: HTML Code Sign Up! I agree with the Terms and Conditions JavaScript function function my_func(){ var chk_box = document.getElementById("chkbox_accept"); var submt_btn = document.getElementById("sbmt_btn"); if (chk_box.checked == true) { submt_btn.disabled = false; } else { submt_btn.disabled = true; } }
type: Answer
answers question: http://stackoverflow.com/q/26730750

http://stackoverflow.com/q/26805642
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26806111
accepted answer: http://stackoverflow.com/a/26805997
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26806111
has title: Angular.js call directive function in controller
answer count: 3
has answer: http://stackoverflow.com/a/26806031
downvote count: 0
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26805997
has body: I want to call a function defined in a directive, just the opposite of this stackoverflow question I tried this but does not work. app.directive('myDirective', function() { return { link: function(scope, element, attrs) { scope.someDirectiveFn = function(arg) { return "in directive"; }; }, } }); function MyCtrl($scope) { alert($scope.someDirectiveFn()); } Is that possible? how could I get it? is it a bad practice? EDIT I got this way: .controller('MyCtrl', function($scope) { alert($scope.func()); }) .directive('myDirective', function() { return { controller: function($scope, $element){ $scope.func = function() { return "text"; }; } } });
score: 2
upvote count: 2
linked to: http://stackoverflow.com/q/16839259
type: Question
tagged with: angularjs-directive

http://stackoverflow.com/comment/42033201
has text: I updated the example with more detail. The example files are modules in a node app.
score: 0
comment on: http://stackoverflow.com/q/26704677
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26682545
has body: Working with Marionette/Backbone and having trouble passing the App object in order to trigger a custom event. Specifically, requirejs is throwing the following: "Error: Module name "app" has not been loaded yet for context: _". Edit: The offending code is "var App = require('app');" within appController.js. From what I've read, that message refers to a circular reference or the script not being loaded yet. How should I structure my code to avoid this? Note 1: At the moment, I'm not using r.js. I do have a grunt build process, but haven't had a chance to set up r.js. Only mentioning it in case that would alleviate my issue. Note 2: I'm not using Marionette's stock module because I wanted to learn requirejs. Thanks in advance. //config.js require.config({ paths: { jquery: '../jquery', bootstrap: '../bootstrap', underscore: '../lodash', backbone: '../backbone', 'backbone.babysitter': '../backbone.babysitter', 'backbone.wreqr': '../backbone.wreqr', marionette: '../backbone.marionette', text: '../text' }, enforceDefine: true, shim: { 'bootstrap': { deps: ['jquery'], exports: '$' }, } }); define( ['app', 'jquery', 'underscore', 'backbone', 'marionette', 'bootstrap'], function(App, $, _, Backbone, Marionette) { App.start(); } ); //app.js define(function(require) { var Marionette = require('marionette'), // and AppRouter, AppController var app = new Marionette.Application(); app.addInitializer(function() { var router = new AppRouter({ controller: AppController }); }); app.on('start', function() { Backbone.history.start(); }); app.vent.on('custom:event', function(a) { console.log('caught custom:event, received: ' + a); }); return app; }); // appRouter.js define(function(require) { var Marionette = require('marionette'); return Marionette.AppRouter.extend({ appRouter: { '': 'main' } }); }); //appController.js define(function(require) { return { main: function() { var App = require('app'); App.vent.trigger('custom:event', ['test']); } } }); Update: Of course after posting thi…
favorite count: 0
tagged with: backbone.js
tagged with: requirejs
has comment: http://stackoverflow.com/comment/41966093
has comment: http://stackoverflow.com/comment/41994666
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26695082
has comment: http://stackoverflow.com/comment/41965966
has comment: http://stackoverflow.com/comment/41973130
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41983946
has title: Passing app object in requirejs + marionette application
accepted answer: http://stackoverflow.com/a/26695082
score: 0
tagged with: marionette
answer count: 1

http://stackoverflow.com/q/26714408
has body: The source code is : When i try to browse the page http://mobile-demo.turner.com/election/tos.html in iphone the internal links doesn't work. But if i try to browse the page with src URL(http://www.cnn.com/partners/mobile/v2/privacy.policy/) it works. Is this some issue with iFrame on iphone? Same code does work on Android browser or desktop browser.
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
tagged with: iframe
has comment: http://stackoverflow.com/comment/42045959
has comment: http://stackoverflow.com/comment/42036999
type: Question
tagged with: javascript
has title: Internal Links within IFrame doesn't working in iphone safari browser
score: 0
has comment: http://stackoverflow.com/comment/42052519

http://stackoverflow.com/q/26785966
has title: Transform bounding box in Paper.js
has answer: http://stackoverflow.com/a/26788306
type: AnsweredQuestion
score: 3
upvote count: 3
has body: I am trying to implement a transform bounding box in Paper.js, but it is not working properly yet. <a href="http://sketch.paperjs.org/#S/pVhLc9s2EP4rsA4RaTGM7MSdiRT1kPjSmTrNOO30UPVAiZCEmgI0JCTbTfTfu1g8CJKg7NQ66AHsfrtY7H671LcBz7Z0MBl8vaNyuRkkg6XI1e9DVpJDVuxpRWbk25zP5S6Tm2pCrhL1Y8v4F8G4rBeyB7tw4URus5ztYeXt2MrYlffjOT9OYZErQxsmf9tJJrgzVtH1liKaLPcUtStZijvqLaxYUXg/pShomfEliFz54BUt6FKB38JHxtcFBSN8XxTTvv2vy6ygs6dFPotymxXsX5qfFr4VMlMLVmpZ0kzSLyqeUYx+rvYcVUhjS4dCYZYYtmtayAyc1/eSunCS127JxnxqNXd4KV1NfVkNTb2EmitRkkipM1AaT+HjgxXENICV0cj453vombCekBG5AZUUriYXWzjUuX+aaY2gPW0gGCcNwqoQoozaYN4BYx8NxABLx/NjIRbRgdH7tILbAiUEdiiJ8SgxYD5OwdYbyWmlHGvZfk3G6ZVyYZy+Ax/h3dPb7FWatZ19+9PYyOzwRJDBn0QBwYa0VyoT9ZaQKpP7ElMGqimpfZh47hx9IF0bFmq4KLLl3RAFlNgxkGIYkiWUGC0T4jLJRaBOPRNITu+JSkudsNrqshAVzWFT1WBv3mjEbsbkJicRWclEZnMuC8rXcjMhUZ3i5zrYo/YlnJO2TGJRsPYABIJO3riDnROmBY6xH8Esz004wEZeZ9PRnbbaCuHOX1K4IY7BsQHWtY+0leBGEuINLWCoYisOWOsQhVVWVLTJBYwz+bWDECloDCSBF1tFXSNnSDSxllCvrkhaUmUcT6MksIRpRSW4gqctLWfNxuTVK71WAekxvk4fZrOLzuIjLHpgC7HneTV1XiK4celb7dkSOB94Oy3EOhqizNC6pF4axfrUwFQvXN39AnFiWfGxX/aoPyiE+LQHXJCnnGiaaxpoYGm1CRlCQunvFnQBWHpFlRCHW0jpww4yOroYJxdjK6bfw+3LVGNap8XCqgUum/GKljK6TLxiW6Q63dOHhCxSKXbxSwFeX169GMMBQMqc9eRMAHsnKoY107h9Az49XQgm0duJf1rLZL1VMj/rbOiNgmbqP1mOVX/RH64Ope/psF9aTXEgNh+4PUhkszkfnLCCSz6J90XY9IGa8RxPCX4j9hW9Fvc8ogcIedyY4YxSPXSZBsnkLa32Be6X4h+wlMLa77SSGiVFxk684VBTL1uR6Mxpx5rDNR8jf2oJDbEVOVsxWlZptWEr6fqPknAQqXzcQfAgyMbjoZOby1rKbPrMiW1k2vYAewZvGYn7OKeW8NoRxKQ2zCTdmr0f9f5Ee3AErlOnN3dii+X5H+TOrqEGi9oXuNSNKeM5fSA/z8ilcqtv/8OMvIu7iAHHOs7Zqg66FE7525oYxgGlY3ep7i8/6p7ij3C4wr7h4wc45hVKWu0XssyWMnDjTT6MUz1fvWk29fAZ9d23Dhs+aF3vnQu0tYKapC9/kfGGNjHPZt2DeKmNw7lY2iuq8eyiLZkWD9k+ZMVMbo3UoO2FM3bq3eHPTIVYXoFoz3R9ff/ey6NnMz3EwUlD5Ymb2kIreU6NhL5r+KZvqYHxvHExnHNN4kML3vwauE/1dDN0lG1lzcEs5UPCsgP9NXuEIQBm8E8bVuRRk/viziOM6Tg3yh2/44RAvQ7nZmyvQ6ABEyXlV70a6I2uEIJxPD1wd9GCZ7ous3XjTMrVHgJwF9e4Y3xwfDE39Jj0pyI3AtXzHNpOtAs+m52coJrDU4/4zieroFKHUGEbpu9RH5jvX6t5S0NTgXDZrhCOfbDnPNuJuuH8z7vTjwcj8n78nGB69p439J5WaMdQJy5Sr6Nt28/xZGRkD5p…
type: Question
accepted answer: http://stackoverflow.com/a/26788306
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
tagged with: paperjs

http://stackoverflow.com/a/26687217
answers question: http://stackoverflow.com/q/26687163
accepted answer of: http://stackoverflow.com/q/26687163
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41971987
has body: You can't make padding negative, however you can make it shrink until padding-top is zero while you scroll by subtracting scroll offset from initial padding value: var $header = jQuery('.header'), paddingTop = parseInt($header.css('paddingTop')); jQuery(window).scroll(function (event) { $header.css({ paddingTop: paddingTop -$(window).scrollTop() }); jQuery('#trace').html($(window).scrollTop()); }); Demo: http://jsfiddle.net/o6jts5tr/5/
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/42219746
score: 0
type: AnswerComment
type: Comment
has text: You are welcome and I already provided an updated example in the comment, probably you didn't notice it :-)
comment on: http://stackoverflow.com/a/26825621

http://stackoverflow.com/comment/42073099
score: 0
has text: I cannot believe such a small oversight caused everything to fail. Strangely enough I didn't have () before and it still didn't work, must have been something else then. Thank you for pointing out my error!
type: Comment
comment on: http://stackoverflow.com/a/26743535
type: AnswerComment

http://stackoverflow.com/a/26752927
score: 0
type: Answer
has body: Try this, using javascript document.getElementById("<your tag id>").style.visibility = "hidden"; And again to show the element, you can use, document.getElementById("<your tag id>").style.visibility = "visible"; A small demontration i submitted in Snippet. Check if it helps you. This is a p element. Hide content of div Show content of div Using Jquery, you can use show() and hide() method. JQuery show and hide method
answers question: http://stackoverflow.com/q/26752781

http://stackoverflow.com/q/26741644
tagged with: safari
has answer: http://stackoverflow.com/a/32275867
type: UnansweredQuestion
tagged with: ios
tagged with: javascript
linked to: http://stackoverflow.com/q/4692245
has comment: http://stackoverflow.com/comment/44725727
type: Question
tagged with: parse-platform
has comment: http://stackoverflow.com/comment/44648149
score: 0
has body: I'm currently facing a problem with parse(parse-1.3.1) and the safari mobile browser with iOS 8. If i try to to login an user with following code: function login() { var login=$("#loginTB").val(); var password=$("#passwordTB").val(); Parse.User.logIn(login.toLowerCase(), password, { success: function(user) { // Do stuff after successful login. console.log("successfully logged in"); //var sessionToken = Parse.User.current()._sessionToken; //createCookie("sessionToken",sessionToken,7); window.location.href = menuLocation; }, error: function(user, error) { // The login failed. Check error to see why. alert("Error: " + error.code + " " + error.message); } }); } i get this error: [Error] QuotaExceededError: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota. setItem (parse-1.3.1.min.js, line 1) _getInstallationId (parse-1.3.1.min.js, line 1) _request (parse-1.3.1.min.js, line 1) logIn (parse-1.3.1.min.js, line 3) logIn (parse-1.3.1.min.js, line 3) login (login.html, line 162) onclick (login.html, line 1) [Error] QuotaExceededError: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota. setItem (parse-1.3.1.min.js, line 3) _saveCurrentUser (parse-1.3.1.min.js, line 3) _handleSaveResult (parse-1.3.1.min.js, line 3) (anonyme Funktion) (parse-1.3.1.min.js, line 3) e (parse-1.3.1.min.js, line 2) (anonyme Funktion) (parse-1.3.1.min.js, line 2) forEach ([native code], line 0) forEach (parse-1.3.1.min.js, line 1) resolve (parse-1.3.1.min.js, line 2) e (parse-1.3.1.min.js, line 2) (anonyme Funktion) (parse-1.3.1.min.js, line 2) forEach ([native code], line 0) forEach (parse-1.3.1.min.js, line 1) resolve (parse-1.3.1.min.js, line 2) (anonyme Funktion) (parse-1.3.1.min.js, line 2) e (parse-1.3.1.min.js, line 2) (anonyme Funktion) (parse-1.3.1.min.js, line 2) g (parse-1.3.1.min.js, line 2) then (parse-1.3.1.min.js, line 2) e (parse-1.3.1.min.js, line 2) (anonyme Funktion) (parse-1.3.1.min.js, line 2) forEach …
has title: parse.com javascript login on safari mobile failed.(QuotaExceededError)
answer count: 1

http://stackoverflow.com/a/26729070
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/136985833
has body: I recommend to go with Uniform JS. This will be quite simple to integrate with websites. You will get full flexibility to change the select box. URL: http://uniformjs.com/ Only thing you need to do is, you need to change the background image as you wish. http://uniformjs.com/images/sprite-aristo.png
answers question: http://stackoverflow.com/q/26729034

http://stackoverflow.com/q/26741809
has title: Esri Dojo component is unable to find div when placed inside polymer element
tagged with: web-component
answer count: 1
type: UnansweredQuestion
has body: While working on a Polymer website I wanted to encapsulate most of the functionality needed for ESRI's dojo-based map component so that I could reuse the code as a polymer component. I attempted to create the element using the code below, but the map constructor throws an error because it can't find a with the id of 'map'. When the element is used the div is called and I can see it, but the following javascript error occurs: Uncaught TypeError: Cannot read property 'id' of null I don't know if anyone has experience trying to get these two technologies to play nice, but any help would be appreciated.
tagged with: dojo
type: Question
tagged with: polymer
tagged with: javascript
tagged with: esri
has answer: http://stackoverflow.com/a/27434264
score: 0

http://stackoverflow.com/q/26684091
answer count: 3
has comment: http://stackoverflow.com/comment/41966641
has comment: http://stackoverflow.com/comment/41966809
favorite count: 0
has body: I will start by saying that i am really trying to learn node but having some difficulties. I am building a super simple Weather App that calls an API and then i want to return the data. But i am not sure why it wont return this data to the console? var request = require('request'); request('https://api.forecast.io/forecast/{API KEY}/42.47994,-83.13040', function (error, response, body) { if (!error &amp;&amp; response.statusCode == 200) { //var info = JSON.parse(body); var jsonObject = JSON.parse(body); var summary = jsonObject.currently.summary; var temp = jsonObject.currently.temperature; var realFeel = jsonObject.currently.apparentTemperature; var summary2 = jsonObject.hourly.summary; var max = jsonObject.daily.data[0].temperatureMax; var min = jsonObject.daily.data[0].temperatureMin; } }) console.log('Todays forecast ' + summary2 + ' With a current Tempature of ' + temp + '. But feels like ' +realFeel + ' With a high of '+max+' and a low of '+min);
has answer: http://stackoverflow.com/a/26684124
accepted answer: http://stackoverflow.com/a/26684124
possible better answer: http://stackoverflow.com/a/26684159
tagged with: node.js
type: AnsweredQuestion
has title: using variable outside of a function
downvote count: 2
has answer: http://stackoverflow.com/a/26684169
has comment: http://stackoverflow.com/comment/41966639
has answer: http://stackoverflow.com/a/26684159
type: Question
has comment: http://stackoverflow.com/comment/41966744
tagged with: javascript
has comment: http://stackoverflow.com/comment/41966738
upvote count: 2
score: 0

http://stackoverflow.com/comment/42189348
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26808056
has text: Well, February can have 29 days in leap years so above solutions is not perfect, but good base to go with and get this to work as should.
type: AnswerComment

http://stackoverflow.com/comment/42188610
type: AnswerComment
score: 0
type: Comment
has text: In the future I'd recommend testing your code in the IDE before posting it, until you are *very, very* familiar with C#.
comment on: http://stackoverflow.com/a/26807467

http://stackoverflow.com/q/26787001
type: Question
has comment: http://stackoverflow.com/comment/50253985
tagged with: rich-text-editor
tagged with: javascript
score: 0
has body: I am new to dotnetnuke and i am facing problem when i want to insert an image to my page. I have used HTML editor for that. I have given the edit right to some users. But now problem is when they edit the page and then go to the edit content menu it will open the Rich Text editor. But when they try to insert image through image manager they are not able to see any path or any folders over there. And same thing can do Admin. Here is my code: &lt;dotnetnuke&gt; &lt;htmlEditor defaultProvider="DotNetNuke.RadEditorProvider"&gt; &lt;providers&gt; &lt;clear /&gt; &lt;add name="DotNetNuke.RadEditorProvider" type="DotNetNuke.Providers.RadEditorProvider.EditorProvider, DotNetNuke.RadEditorProvider" providerPath="~/DesktopModules/Admin/RadEditorProvider" /&gt; &lt;/providers&gt; &lt;/htmlEditor&gt; &lt;navigationControl defaultProvider="DNNMenuNavigationProvider"&gt; &lt;providers&gt; &lt;clear /&gt; &lt;add name="DNNDropDownNavigationProvider" type="DotNetNuke.NavigationControl.DNNDropDownNavigationProvider, DotNetNuke.DNNDropDownNavigationProvider" providerPath="~\Providers\NavigationProviders\DNNDropDownNavigationProvider\" /&gt; &lt;add name="ASP2MenuNavigationProvider" type="DotNetNuke.NavigationControl.ASP2MenuNavigationProvider, DotNetNuke.ASP2MenuNavigationProvider" providerPath="~\Providers\NavigationProviders\ASP2MenuNavigationProvider\" /&gt; &lt;add name="DNNMenuNavigationProvider" type="DotNetNuke.NavigationControl.DNNMenuNavigationProvider, DotNetNuke.DNNMenuNavigationProvider" providerPath="~\Providers\NavigationProviders\DNNMenuNavigationProvider\" /&gt; &lt;add name="DNNTreeNavigationProvider" type="DotNetNuke.NavigationControl.DNNTreeNavigationProvider, DotNetNuke.DNNTreeNavigationProvider" providerPath="~\Providers\NavigationProviders\DNNTreeNavigationProvider\" /&gt; &lt;add name="SolpartMenuNavigationProvider" type="DotNetNuke.NavigationControl.SolpartMenuNavigationProvider, DotNetNuke.SolpartMenuNavigationProvider" providerPath="~\Providers\NavigationPro…
answer count: 3
has comment: http://stackoverflow.com/comment/49476713
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: dotnetnuke
tagged with: css
has answer: http://stackoverflow.com/a/26811095
has answer: http://stackoverflow.com/a/33892757
has answer: http://stackoverflow.com/a/26846977
has title: DNN: HTML editor not showing the folders to select an image
upvote count: 1
downvote count: 1

ecmascript-6
tags question: http://stackoverflow.com/q/26719794
tag name: ecmascript-6
tags question: http://stackoverflow.com/q/26695346
tags question: http://stackoverflow.com/q/26823514
tags question: http://stackoverflow.com/q/26736174
type: Tag
tags question: http://stackoverflow.com/q/26791640

http://stackoverflow.com/q/26673833
has answer: http://stackoverflow.com/a/26673895
has answer: http://stackoverflow.com/a/26673968
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
has body: I have multiple items in my website having same class name here is my code for single item price section only &lt;tr&gt; &lt;td&gt; &lt;table cellspacing="0" cellpadding="0" width="100%"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt; &lt;div class="prod-price"&gt; &lt;span class="price-old" style="display: none;"&gt;9.90&lt;/span&gt; &lt;span class="price-new"&gt;9.90&lt;/span&gt; &lt;/div&gt; &lt;div style="font-size: 0.8em; padding-top: 4em; display: none;" class="save- sale"&gt;0.00&lt;/div&gt; &lt;div class="pc"&gt;&lt;/div&gt; &lt;/td&gt; &lt;td&gt; &lt;div class="prod-price"&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="medtext"&gt;&amp;nbsp;&lt;b&gt;(Out of Stock)&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; What i need to do i want to change the color of only for that div(having class name price-new) which has (out of status) message.i tried the below code but it changes the color for all divs having class name price-new i want this script to be apply only for those items which is having out of stock message using either jquery or java script. this is what i have tried JS for the code:- &lt;script&gt; $(function () { $(".medtext").each(function () { if ($.trim($(this).text()) == 'Out of Stock') { $(".price-new").css("color", "black"); } }); }); &lt;/script&gt;
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26674319
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/26674435
has title: How to change the color of a div using jquery?
upvote count: 1

http://stackoverflow.com/q/26728896
type: Question
downvote count: 0
has answer: http://stackoverflow.com/a/26728927
linked to: http://stackoverflow.com/q/3326650
tagged with: javascript
tagged with: jquery
has title: jquery countdown characters not working in IE
answer count: 1
has body: This is my code to countdown characters. It work fine in Firefox, Chrome but it not work in IE . Can you help me solve it and explain the reason. CountDown Character 10 Thanks. Ex: I'm using countdown japanese characters and alpha character.
has comment: http://stackoverflow.com/comment/42046334
favorite count: 0
has comment: http://stackoverflow.com/comment/42047313
upvote count: 2
has comment: http://stackoverflow.com/comment/42046642
duplicate of: http://stackoverflow.com/q/3326650
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42046378
has comment: http://stackoverflow.com/comment/42046586
accepted answer: http://stackoverflow.com/a/26728927
linked to: http://stackoverflow.com/q/5515869

http://stackoverflow.com/comment/41992821
comment on: http://stackoverflow.com/q/26695332
score: 0
type: Comment
type: QuestionComment
has text: "*That isn't hard right"*, *"that would be simple enough to add, right.?"* - If you yourself knows it is easy, please make some effort to do it by yourself. And when you're stuck with something specific, then ask. You're asking many things which means you're not making any effort.

http://stackoverflow.com/q/26750225
tagged with: windows
has comment: http://stackoverflow.com/comment/42145693
favorite count: 0
has comment: http://stackoverflow.com/comment/42123605
answer count: 0
has comment: http://stackoverflow.com/comment/42116789
type: UnansweredQuestion
upvote count: 1
tagged with: windows-store-apps
score: 1
tagged with: windows-phone-8
type: Question
tagged with: winjs
has body: I am trying to write console log to a file. I tried this way and a log file is created but no contents are appended to it.Calling it at the start of the app. Am i doing something wrong. function startFileLog() { // choose where the file will be stored: var fileDestination = Windows.Storage.ApplicationData.current.localFolder; var logger = new WinJS.Promise(function (complete) { var logfilename = new Date().toISOString().replace(/[:-]/g, ""); logfilename = "log-" + logfilename + ".log"; fileDestination.createFileAsync(logfilename, Windows.Storage.CreationCollisionOption.generateUniqueName) .done(function (file) { complete(file); }); }); var actionFn = function (message, tag, type) { logger.then(function (file) { var m = WinJS.Utilities.formatLog(message, tag, type); Windows.Storage.FileIO.appendTextAsync(file, m).done(); }); }; WinJS.Utilities.startLog({ action: actionFn }); }
downvote count: 0
tagged with: javascript
has title: Error logging to file not working in javascript windows store app

http://stackoverflow.com/comment/42223784
has text: The content was changed by script. I'm looking for pure css3 animation.
type: Comment
comment on: http://stackoverflow.com/a/26787399
score: 0
type: AnswerComment

http://stackoverflow.com/q/26784947
has body: I am using Javascript in an xhtml file of jsf for datepicker. It works fine in Firefox, but not on IE 11. &lt;h:panelGrid id="expirationPanel"&gt; &lt;h:selectOneRadio id=" "layout=" " style="height:75px;" value="#{ManagedBean.xxxx}"&gt; &lt;f:selectItem itemValue="no" itemLabel=""/&gt; &lt;f:selectItem itemValue="yes" itemLabel=""/&gt; &lt;a4j:support event="onclick" action="#{ManagedBean.yyyy}" immediate="true" oncomplete="reRenderexPanel()"/&gt; &lt;/h:selectOneRadio&gt; &lt;h:panelGrid id="expdPanel" columns="1" style="height:70px;"&gt; &lt;div style="margin-top:8px;"&gt; &lt;h:panelGrid id="zzzz" columns="1" style="height:22px;"&gt; &lt;h:outputText value="#{bundle.cet_never}" style="color:black;font-size:12px;" /&gt; &lt;/h:panelGrid&gt; &lt;/div&gt; &lt;h:panelGrid id="ex" columns="2" style="height:40px;"&gt; &lt;r:calendar value="#{ManagedBean.ed}" id="ed" datePattern="yyyy-MM-dd" showApplyButton="false" locale="en_US" enableManualInput="true" converter="dateConverter" disabled="#{ManagedBean.ieDisabled()}"&gt; &lt;f:validator validatorId="checkvaliddate" /&gt; &lt;f:attribute name="butClick" value="createUserForm:expirationDate:butClick" /&gt; &lt;/r:calendar&gt; &lt;h:message for="exDate" /&gt; &lt;/h:panelGrid&gt; &lt;/h:panelGrid&gt; &lt;/h:panelGrid&gt; There are two radio buttons when I am changing the radio button then it does not work after refresh it works in IE11.
type: Question
has answer: http://stackoverflow.com/a/26798144
downvote count: 0
has comment: http://stackoverflow.com/comment/42148116
tagged with: javascript
answer count: 1
has title: Date Picker Issue with IE 11 (using JavaScript, JSF ) after refresh it works but before refresh it doen't
score: 1
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: jsf

http://stackoverflow.com/q/26772915
has body: When trying to add a user to a group with Apigee and Usergrid, using the example code from the apigee website, I keep receiving the error "no user specified" How do I specify the user? The code is correct, and it seems like the apigee.js code has an issue referencing the username. I tried passing the username may different ways, and I Googled until my fingers were numb.
tagged with: javascript
tagged with: entity
score: 0
has answer: http://stackoverflow.com/a/26772941
answer count: 1
accepted answer: http://stackoverflow.com/a/26772941
has title: no user specified a usergrid error
tagged with: usergrid
type: AnsweredQuestion
tagged with: apigee
type: Question

http://stackoverflow.com/q/26760830
answer count: 3
linked to: http://stackoverflow.com/q/3127429
downvote count: 0
favorite count: 0
score: 9
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/41052652
has title: React does not rerender after setState used in promise
has answer: http://stackoverflow.com/a/27286203
has body: Every time the props are changed, the component will call onTermChange and get the details for this component with a promise that returns an array of objects. The problem is that when setState is called, nothing happens and the component is not re-rendered with fresh details. module.exports = React.createClass({ displayName: 'TaxonomySelect', getInitialState: function () { return { children: undefined }; }, componentDidMount: function () { this.onTermChange(this.props.term); }, componentWillReceiveProps: function (nextProps) { this.props.term = this.props.term || null; if (this.props.term) { this.onTermChange(nextProps.term.id); } else { this.onTermChange(nextProps.term); } }, onTermChange: function (term) { this.setState({children: undefined}); TaxonomyStore.getTerm(this.props.term) .bind(this) .then(function (term) { TaxonomyStore.merge(9999,{ description: 'No specific topic', id: 9999 }); if (term.path &amp;&amp; term.path.length === 3) { term.children.unshift(TaxonomyStore.get(9999)); } console.log(term.id, term.children); this.setState({children: term.children}); this.forceUpdate(); this.render(); }); }, onSelect: function (id) { if (this.props.onChange) { this.props.onChange(TaxonomyStore.get(id)); } }, render: function () { if (!Array.isArray(this.state.children) || this.state.children.length &lt; 1) { return null; }; var options = this.state.children.map(function (term) { return { value: term.id.toString(), label: term.description }; }); var value = this.props.value &amp;&amp; this.props.value.toString(); return ( &lt;div&gt; &lt;Select name={this.props.name} value={value} options={options} onChange={this.onSelect} /&gt; &lt;/div&gt; ); } });
type: Question
upvote count: 9
tagged with: javascript
has answer: http://stackoverflow.com/a/26942684
tagged with: reactjs

http://stackoverflow.com/q/26810026
tagged with: css
has answer: http://stackoverflow.com/a/26810338
type: UnansweredQuestion
has title: Integrating css into Jquery
has body: My problem is simple but I'm new to jquery and css so I don't really know what I'm doing. I have a css file style.css and this is what's in it. keyword { font-size: 12px; color: #0000FF; } stringWord { font-size: 12px; color: #ff6a00; } I'm trying to change text inside of a text area so here is where that is declared. &lt;div class="DivWithScroll" id="my_text" contenteditable="true" onkeypress="return myKeyPress(event)" onkeydown="return onKeyDown(event)"&gt; In my jquery code I want it to go to the css file of keyword and change the color of the text. This is what I have so far but it's not working properly for (var i = 0; i &lt; reservedKeyWords.length; i++) { if ( lastWordTyped == reservedKeyWords[i] ) { console.log(lastWordTyped + "::" + reservedKeyWords[i]); $('DivToScroll').css("keyword"); return; } } ` Like I said I'm new to all of this so any help is greatly appreciated.
has comment: http://stackoverflow.com/comment/42192649
has comment: http://stackoverflow.com/comment/42192903
has comment: http://stackoverflow.com/comment/42192642
has answer: http://stackoverflow.com/a/26810065
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42192631
score: 0

http://stackoverflow.com/q/26768991
has answer: http://stackoverflow.com/a/64936616
has answer: http://stackoverflow.com/a/26825866
tagged with: twitter-bootstrap
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/51444633
has answer: http://stackoverflow.com/a/26917388
type: AnsweredQuestion
downvote count: 2
score: 16
type: Question
answer count: 8
has answer: http://stackoverflow.com/a/26858759
has body: I have a single page app using Backbone, and whenever I over over something and then click the "back" button, the popover forever stays. I want to destroy all instances of popover when a new instance is loaded.
tagged with: javascript
has answer: http://stackoverflow.com/a/51444633
upvote count: 18
has title: How do I destroy all instances of Bootstrap Popover?
has answer: http://stackoverflow.com/a/79496157
accepted answer: http://stackoverflow.com/a/26917388
has answer: http://stackoverflow.com/a/26922497
favorite count: 0
tagged with: backbone.js
has answer: http://stackoverflow.com/a/26922487

http://stackoverflow.com/comment/42083031
type: Comment
has text: @jfriend00 you're probably right but he could have given more informations.
comment on: http://stackoverflow.com/a/26749250
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41948567
has text: i am using in asp.net, and I used tooltip. but to show u in jsfiddle I changed it into the html textbox.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26674023

http://stackoverflow.com/q/26752328
has comment: http://stackoverflow.com/comment/42090639
has comment: http://stackoverflow.com/comment/42091117
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26756448
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Creating elements with javascript/php, need to get their unique ID and send it back to PHP
has answer: http://stackoverflow.com/a/26756448
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I have a script that sends a POST to a php file, and gets a new integer (primary key). Then the script creates 3 new divs, with that ID included in them as an attribute. Now, I need to be able to grab the ID and give it back to PHP when the user updates it. (It's currently a div, but later it will be an editable form.) I was going to do this by creating a button in the same script that I use to create the divs, bearing the same integer and calling a function. The problem with this concept, is that I have no idea how to create a Unique variable to pass along to the function, so it knows which number to look at. Obviously, if I have only one variable that gets overwritten with each new entry - after all of the rows load, only the last row will have a variable that matches its id. Another option is to find the value of all attributes that bear the name data-integer-question and pass its number/integer to a function, when the user does something like keyup enter. However, I have no idea how to do that. obj.returnIntJson holds the integer that I've been talking about, which changes for each row. rowNumberObj.qarowcontainer is just a reference for the parent div, which doesn't get edited by the user - you can ignore it. The script gives a result like this: &lt;div id="questioncolumn" class="questionColumnCSS" data-integer-question="701"&gt;&lt;/div&gt; Suggestions on how to proceed? Here's the code for one of the divs, Thanks. qaRowQuestion = document.createElement('div'); qaRowQuestion.setAttribute('id', "questioncolumn"); qaRowQuestion.setAttribute('data-integer-question', obj.returnIntJson); qaRowQuestion.setAttribute('class',"questionColumnCSS"); qaRowQuestionParent = document.getElementById(rowNumberObj.qarowcontainer); qaRowQuestionParent.appendChild(qaRowQuestion);
has comment: http://stackoverflow.com/comment/42090984

http://stackoverflow.com/a/26808540
has comment: http://stackoverflow.com/comment/42190943
upvote count: 3
answers question: http://stackoverflow.com/q/26808454
has comment: http://stackoverflow.com/comment/42191014
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42189828
type: Answer
has comment: http://stackoverflow.com/comment/42189995
score: 3
downvote count: 0
has body: Change from return( request.$promise.then( handleSuccess, handleError ) ); to return request.update().$promise.then(handleSuccess, handleError); That said, using $resource like this is quite inefficient while not taking any advantage of it. It's better to replace with $http.
accepted answer of: http://stackoverflow.com/q/26808454

http://stackoverflow.com/a/26786452
accepted answer of: http://stackoverflow.com/q/26786317
type: AcceptedAnswer
downvote count: 0
has body: You can target only the links that have a data-box attribute: $('a[data-box]').click(function (e) { e.preventDefault(); $('#hiddendivs div').not($('#'+$(this).data("box"))).fadeOut(1000); $('#' + $(this).data("box")).fadeToggle(1000); }) http://api.jquery.com/has-attribute-selector/
answers question: http://stackoverflow.com/q/26786317
type: Answer
score: 3
upvote count: 3

http://stackoverflow.com/q/26777671
score: 3
upvote count: 3
linked to: http://stackoverflow.com/q/2136522
has body: I would like to measure the computing time of methods. A nice way is (How do you performance test JavaScript code?) with console.time('Function #1'); and console.timeEnd('Function #1'); My idea is to add these console outputs on lifecycle-methods. In this case using SAPUI5 like createContent:funtion(){}; methods. This should be possible with AOP using before() and after() to runt the time counting. Which AOP framework would you suggest and how to implement it with the need of modifying the identification string "Function #1" automatically?
tagged with: methods
type: Question
has answer: http://stackoverflow.com/a/26809863
tagged with: javascript
tagged with: aop
has comment: http://stackoverflow.com/comment/130179650
answer count: 2
tagged with: method-modifier
linked to: http://stackoverflow.com/q/11371993
downvote count: 0
has answer: http://stackoverflow.com/a/27650749
favorite count: 0
linked to: http://stackoverflow.com/q/111368
tagged with: function-composition
type: UnansweredQuestion
has title: Javascript console output before and after method call with AOP

http://stackoverflow.com/a/26711320
upvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26711266
downvote count: 1
has body: Try this Hope it works myfunction(i,function(err,value1,value2,value3){ console.log(JSON.parse(JSON.strigify(result))); ****//i need value here..**** }); function myfunction(i,callback) { /* my some stuff */ var callBackString= new Array(); callBackString['value1']=value1; callBackString['value2']= value2; callBackString['value3']= value3; callback(null,value1,value2,value3); };
score: -1

http://stackoverflow.com/a/26799315
type: Answer
answers question: http://stackoverflow.com/q/26798473
score: 0

http://stackoverflow.com/comment/42340623
type: AnswerComment
has text: BTW, I knew none of this 2 days ago when I picked up this question. Everything now I know comes from studying the code and googling a couple of searches.
type: Comment
comment on: http://stackoverflow.com/a/26834763
score: 1

http://stackoverflow.com/q/26790866
has answer: http://stackoverflow.com/a/26790938
score: 1
has title: jQuery don't parse HTML
has comment: http://stackoverflow.com/comment/42157581
type: Question
has answer: http://stackoverflow.com/a/26790922
tagged with: javascript
tagged with: jquery
upvote count: 1
answer count: 4
linked to: http://stackoverflow.com/q/24816
favorite count: 0
has answer: http://stackoverflow.com/a/26790913
has answer: http://stackoverflow.com/a/26790919
type: UnansweredQuestion
has body: I have a string which is essentially html elements, and I'm using jQuery to try to append this string to a div: var content = ' Test '; $('div').append(content); Is there a way in JavaScript or jQuery to make it so it doesn't parse the string so in my div I get: Test instead of Test
downvote count: 0

http://stackoverflow.com/a/26817948
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26732864
score: 1
answers question: http://stackoverflow.com/q/26732864
has comment: http://stackoverflow.com/comment/42398679
downvote count: 0
has body: You need to call $.magnificPopup.close() method before opening second popup, if you need it with different options.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42209352
type: Answer

if-statement
tags question: http://stackoverflow.com/q/26700012
tags question: http://stackoverflow.com/q/26788683
tag name: if-statement
type: Tag
tags question: http://stackoverflow.com/q/26801508
tags question: http://stackoverflow.com/q/26743763
tags question: http://stackoverflow.com/q/26721528
tags question: http://stackoverflow.com/q/26683939
tags question: http://stackoverflow.com/q/26709839
tags question: http://stackoverflow.com/q/26750955
tags question: http://stackoverflow.com/q/26794779
tags question: http://stackoverflow.com/q/26705040
tags question: http://stackoverflow.com/q/26685349
tags question: http://stackoverflow.com/q/26749151
tags question: http://stackoverflow.com/q/26675931
tags question: http://stackoverflow.com/q/26742336
tags question: http://stackoverflow.com/q/26827354
tags question: http://stackoverflow.com/q/26730750
tags question: http://stackoverflow.com/q/26762467
tags question: http://stackoverflow.com/q/26719544

http://stackoverflow.com/a/26705409
score: 0
has body: Be careful with = and == function changeColor(elem) { if (elem.style.backgroundColor == "#5AD9C1" || elem.style.backgroundColor == "transparent") { elem.style.backgroundColor = "#66FF66"; } else if (element.style.backgroundColor == "#66FF66") { elem.style.backgroundColor = "#5AD9C1"; }
type: Answer
answers question: http://stackoverflow.com/q/26705379

http://stackoverflow.com/comment/42153879
has text: Even for a "demo", I'm with @BenjaminGruenbaum on this one. That amount of repetition just hurts my eyes. You'd learn a lot more if you tried to do it properly.
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26788673

http://stackoverflow.com/q/26706962
upvote count: 1
has answer: http://stackoverflow.com/a/26707217
accepted answer: http://stackoverflow.com/a/26707217
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: gulp-watch
tagged with: css
has body: This is my Gulpfile: var gulp = require('gulp'), watch = require('gulp-watch'), livereload = require('gulp-livereload'); gulp.task('watch', function() { livereload.listen(); gulp.watch('./css/**/*.css', ['css']).on('change', livereload.changed); gulp.watch('./js/**/*.js', ['js']).on('change', livereload.changed); gulp.watch('./**/*.php').on('change', livereload.changed); }); gulp.task('default', [ 'watch']); It will reload the CSS once and then crash with this error: [15:30:13] style.css was reloaded. [15:30:13] Task 'css' is not in your gulpfile [15:30:13] Please check the documentation for proper gulpfile formatting Not sure what to make of this, anyone had similar issues?
tagged with: gulp
downvote count: 0
type: AnsweredQuestion
has title: Gulp.js won't reload plain CSS
score: 1
type: Question

http://stackoverflow.com/comment/42120759
comment on: http://stackoverflow.com/q/26770180
type: Comment
score: 0
has text: So you want the images to become bigger when you mouse over them. Is that all, or am I missing something?
type: QuestionComment

http://stackoverflow.com/a/26805413
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26804393
has body: function shuffle(o){ for(i = 0; i &lt; o.length; i++) { var Index = o.indexOf(i); index=index+2; if(index&gt;3) { index=index-2; var item=o.splice(index,1) o.push(item); } else {var item=o.splice(index,1) o.push(item) } } };
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26804393
type: Answer

http://stackoverflow.com/q/26825521
has body: I know that I can route to router.get('/object/:id', ...), router.post('/object/new', ...), router.delete('/object/:id', ...), and router.put('/object/:id', ...) and that when I browse to a specific object, the browser will issue a http get request. And I understand that I can post info through a form. But how can I implement the DELETE and PUT methods so that I can edit and delete objects? How do I specify the method used in the route? Do I have to change the route so that it is unique (ie, router.get('/object/delete/:id', ...) and router.get('/object/edit/:id', ...)) and just use get methods?
tagged with: express
score: 0
tagged with: http-put
answer count: 1
tagged with: http-delete
has answer: http://stackoverflow.com/a/26827058
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26827058
has comment: http://stackoverflow.com/comment/42219755
has comment: http://stackoverflow.com/comment/42219638
tagged with: http
has title: Node/Express - How to implement DELETE and PUT requests
type: Question
tagged with: javascript

http://stackoverflow.com/comment/42117001
comment on: http://stackoverflow.com/q/26767922
score: 2
has text: Using `$rootScope` as in Clint's answer works fine. But for anything remotely complex I would create a service to hold shared state (and use resolve in the router if the value is retrieved via ajax).
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42149108
comment on: http://stackoverflow.com/a/26786200
has text: Alright, the current instance of the function. Answer updated.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42196059
comment on: http://stackoverflow.com/q/26810769
type: QuestionComment
type: Comment
has text: I don't understand what you mean by address bar ? The link bar ? or the navigation bar ?
score: 0

http://stackoverflow.com/a/26724514
type: Answer
downvote count: 0
score: 1
has body: You will have to parse the json... Use: var response_array=jQuery.parseJSON(data); for (response in response_array) { id = response.id; // whatever }
has comment: http://stackoverflow.com/comment/42038586
answers question: http://stackoverflow.com/q/26724430
upvote count: 1
has comment: http://stackoverflow.com/comment/42038531
has comment: http://stackoverflow.com/comment/42038508
has comment: http://stackoverflow.com/comment/42038424

http://stackoverflow.com/comment/42310398
type: QuestionComment
type: Comment
has text: Here you can see the example with a cubic-bezier. http://jsfiddle.net/Rases/wprt40nr/1/ AS you see it never looks conected
comment on: http://stackoverflow.com/q/26748322
score: 0

http://stackoverflow.com/a/26784723
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26784653
downvote count: 0
score: 1
has body: REST is a way to structure APIs that are exposed over HTTP. The Chrome API is just a set of Javascript functions.

http://stackoverflow.com/comment/42142624
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26763628
has text: Alain, your example works fine for me in WebStorm 9.0.1. Parameter info shows same parameters as when it is invoked from definition file. Could you please recheck it? JSDoc looks reasonable for me.
score: 0

http://stackoverflow.com/comment/42159073
has text: Also the lecture specified that we can not use any predefined JavaScript array element-deleting or manipulating methods such as "delete()", "concat()", "join()", "pop()", "push()" "splice()" thats why I'm stuck :(
comment on: http://stackoverflow.com/q/26791539
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42030098
comment on: http://stackoverflow.com/q/26719918
has text: Sorry, wrong link for "interpolation." Should be https://en.wikipedia.org/wiki/String_interpolation.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26689789
has body: var username = document.getElementById('username'); var goBtn = document.getElementById('check'); var output = document.getElementById('output'); var usernames = ['bob', 'sally', 'alice', 'roy', 'kate', 'phil']; function showResult() { output.innerHTML = usernames.join(', '); } function checkUsername() { if (usernames.indexOf(username.value) < 0) { usernames.push(username.value); username.value = ''; } else { alert('That username is already taken. Try again.'); } showResult(); } goBtn.onclick = checkUsername; showResult(); Name: Go
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26689681

http://stackoverflow.com/a/26697265
has body: As suggested earlier it's document.getElementById("id_of_element"); Here's the working Fiddle You can have a detail documentation of document.getElementById from here Another thing is you shouldn't have more than one element having same id. As id is for individual element only. For that you should use class. Take a look about id from here and class from here
type: Answer
accepted answer of: http://stackoverflow.com/q/26697209
answers question: http://stackoverflow.com/q/26697209
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/42039826
type: QuestionComment
comment on: http://stackoverflow.com/q/26725205
has text: one con is that there are many many digest cycles so minimizing function calls is more performant. If you put one of those functions inside an `ng-repeat` and add a `console.log` in it you will see many more logs than you might have first expected
score: 0
type: Comment

http://stackoverflow.com/comment/42041850
comment on: http://stackoverflow.com/q/26726150
type: Comment
type: QuestionComment
has text: save yourself the trouble and put it all in one page...that's the way angular works best. Otherwise you will need to store data in localStorage or cookies or pass it through url's
score: 0

http://stackoverflow.com/comment/42025743
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26703046
has text: it doesn't provide the graceful degradation you asked for, but it gets you halfway there.
score: 0

http://stackoverflow.com/a/26768757
has body: I've noticed: Change that to:
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26768601
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42179742
score: 0
comment on: http://stackoverflow.com/a/26802896
type: Comment
has text: Thanks, would you know how to use the filename within a ?
type: AnswerComment

http://stackoverflow.com/comment/42056334
has text: As you can see from my html I have an h1 tag.After an img tag and then a p tag.I want when I click an h1 tag to show or toggle the p tag that is after this h1 not every p tag
type: Comment
comment on: http://stackoverflow.com/q/26734724
score: 0
type: QuestionComment

http://stackoverflow.com/a/26812613
has comment: http://stackoverflow.com/comment/42203498
has body: I think the problem is in static module, your nodejs code should be like that: var express = require('express'); var app = express(); app.use(express.static(__dirname + '/public')); app.listen(8090); The issue in: Q1: I think the issue may be from empty content model, so please try to use &lt;script&gt;&lt;/script&gt; instead of &lt;script /&gt; Q2: I think this is an issue in require.js version, read this for more info.
downvote count: 0
score: 7
has comment: http://stackoverflow.com/comment/42203628
answers question: http://stackoverflow.com/q/26811857
has comment: http://stackoverflow.com/comment/42203132
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42206041
accepted answer of: http://stackoverflow.com/q/26811857
upvote count: 7
type: Answer
has comment: http://stackoverflow.com/comment/42203751
has comment: http://stackoverflow.com/comment/42206507
has comment: http://stackoverflow.com/comment/42202434

http://stackoverflow.com/comment/42217077
score: 0
type: Comment
type: QuestionComment
has text: And, what is in place of the image in the DOM before it gets clicked on? It seems like we need to see what is being clicked on and where the desired href is stored.
comment on: http://stackoverflow.com/q/26824007

http://stackoverflow.com/comment/42163656
has text: There are no standards-based browser API's to do this, and with good reason.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26794465
score: 0

http://stackoverflow.com/comment/42011166
comment on: http://stackoverflow.com/q/26709410
score: 0
type: Comment
type: QuestionComment
has text: You can use UTF-8 Encoding

http://stackoverflow.com/a/26696040
score: 2
accepted answer of: http://stackoverflow.com/q/26695911
answers question: http://stackoverflow.com/q/26695911
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41987193
upvote count: 2
type: Answer
has body: Make an array of all the timers, so you can clear them when the pause button is clicked. Use a global variable to keep track of how far you are through the list of files to load. Then you can resume from where you left off. var curfile = 0; var load_file_timers; function load_files() { load_file_timers = obj.map(function(v, i) { if (i &lt; curfile) { return null; } else { return setTimeout(function() { var file = v.newfile; var timeline_date = moment(v.last_modified_date).format("dddd, MMMM Do YYYY, h:mm:ss a"); bHover = 0; //re-highlight links $(".timeline_msg").html(timeline_date); get_file(file); curfile++; }, 5000 * (i - curfile + 1)); } }); } load_files(); $("#pause").click(function() { $.each(load_file_timers, function(i, timer) { if (timer) { clearTimeout(timer); } }); }); $("#resume").click(load_files);

http://stackoverflow.com/comment/42011097
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26709524
score: 0
has text: Yes, I'm already quoted those definitions in my questions, but if you need, I will edit with the full version!

http://stackoverflow.com/comment/42196170
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26811913
has text: this doesnt really toggle the text only changes it once
type: AnswerComment

http://stackoverflow.com/a/68548403
downvote count: 0
type: Answer
has body: The --trace-sigint option was initially introduced in nodejs/node#290207. It was reviewed &amp; subsequently merged into Node's main release channel in May 2020 as part of the v12.17.0 release. When this option is passed to the node runtime, any SIGINT (CTRL-C in most environments) will not only end execution of the script, but also print a stack trace.
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26801630

http://stackoverflow.com/q/26692612
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/41980936
tagged with: javascript
has comment: http://stackoverflow.com/comment/41981972
favorite count: 0
has title: javascript post to php for mysql insert record
tagged with: php
tagged with: cordova
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/26702501
has comment: http://stackoverflow.com/comment/41980869
type: Question
has body: I have read many tutorials on this but just can't seem to get this to work - I have the following PHP file on the server: &lt;?php $host_name = ""; $database = ""; $user_name = ""; $password = ""; $connect = mysqli_connect($host_name, $user_name, $password, $database); $user = $_POST['user']; $sports = $_POST['sports']; $location = $_POST['location']; if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $sql = "UPDATE `userActivityLocation` WHERE user='$user' SET sports='$sports', location='$location'"; $result=mysql_query($sql); ?&gt; I have tried several methods to no avail, not sure what Im doing wrong! Any advice would be greatly appreciated, thank you! EDIT: I have tried the following as suggested by morgunder but I still cant see any record being created in the database. Here is the click listener for the submit button: $('#register').click(function () { console.log("Ready! Getting the user details."); username = document.getElementById('login').value; password = document.getElementById('password').value; email = document.getElementById('email').value; window.localStorage.setItem("user", username); console.log("Username: ", username); console.log("Password: ", password); console.log("E-Mail: ", email); var params, connection; params = { login: username, password: password, email: email }; //console.log("Params: ", params); console.log("Creating new user"); QB.users.create(params, function (err, result) { console.log("Result: ", result.toString()); // callback function alert(username.toString()); var usernamePost = username.toString(); $.post("http://www.baseurl.co.uk/API/users.php", { user: usernamePost }, function (data) { console.log(data); console.log("HERE"); }); window.location = "sportsSelector.html" }); });
has answer: http://stackoverflow.com/a/26693427
score: -2
has comment: http://stackoverflow.com/comment/41980881

http://stackoverflow.com/a/26674066
upvote count: 2
answers question: http://stackoverflow.com/q/26673857
type: Answer
has body: The index should be began on 0 so the text 'Rich Yellow' be index position is 6. $("#select_472 option[value='3370']").index(); $("#select_472 option:contains('Rich Yellow ')").index(); Fiddle
downvote count: 0
score: 2
has comment: http://stackoverflow.com/comment/78201076
has comment: http://stackoverflow.com/comment/41947638

http://stackoverflow.com/comment/42222835
type: Comment
has text: So what is the result of `http://127.0.0.1:8000/api/v1/event/?format=json` when you open in in separate tab?
comment on: http://stackoverflow.com/q/26827472
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42173058
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26797392
has text: I'll try to figure these functions out, thanks kipty
type: Comment

http://stackoverflow.com/comment/42052215
comment on: http://stackoverflow.com/q/26711116
type: QuestionComment
type: Comment
score: 1
has text: Any reason your `ConnexionState` class has a missing variable name (just says `Private`) on line 7? Is it a typo perhaps?

http://stackoverflow.com/comment/42905166
type: Comment
type: QuestionComment
score: 0
has text: Only promise methods can wait for promised results. Any statement following `ProgressDBFactory.getAllProgressData()`, whether it is in the same function or in that function's caller, is guaranteed to execute before the promised data had been delivered. In short, asynchronously derived data cannot be handled synchronously.
comment on: http://stackoverflow.com/q/26827652

http://stackoverflow.com/comment/41962204
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26681518
has text: @Ian Turns out that's the definition of "unusual".
score: 0

backbone.js
tags question: http://stackoverflow.com/q/26709010
tags question: http://stackoverflow.com/q/26763550
tags question: http://stackoverflow.com/q/26749572
tags question: http://stackoverflow.com/q/26756801
tags question: http://stackoverflow.com/q/26763065
tags question: http://stackoverflow.com/q/26820656
tags question: http://stackoverflow.com/q/26739354
tags question: http://stackoverflow.com/q/26743778
tags question: http://stackoverflow.com/q/26713332
tags question: http://stackoverflow.com/q/26675801
tags question: http://stackoverflow.com/q/26746126
tags question: http://stackoverflow.com/q/26781747
tags question: http://stackoverflow.com/q/26772069
tags question: http://stackoverflow.com/q/26768991
tags question: http://stackoverflow.com/q/26759129
tags question: http://stackoverflow.com/q/26804344
tags question: http://stackoverflow.com/q/26790511
tags question: http://stackoverflow.com/q/26687583
tags question: http://stackoverflow.com/q/26735062
tags question: http://stackoverflow.com/q/26700307
tags question: http://stackoverflow.com/q/26755017
tags question: http://stackoverflow.com/q/26704166
tags question: http://stackoverflow.com/q/26770237
tags question: http://stackoverflow.com/q/26730496
tags question: http://stackoverflow.com/q/26810512
tags question: http://stackoverflow.com/q/26682545
tags question: http://stackoverflow.com/q/26697484
tags question: http://stackoverflow.com/q/26779117
tags question: http://stackoverflow.com/q/26828228
tags question: http://stackoverflow.com/q/26708532
tags question: http://stackoverflow.com/q/26746517
tags question: http://stackoverflow.com/q/26730296
tags question: http://stackoverflow.com/q/26804017
tags question: http://stackoverflow.com/q/26715850
tags question: http://stackoverflow.com/q/26784639
tags question: http://stackoverflow.com/q/26726457
tags question: http://stackoverflow.com/q/26733150
tags question: http://stackoverflow.com/q/26745674
tags question: http://stackoverflow.com/q/26704301
tags question: http://stackoverflow.com/q/26794446
tags question: http://stackoverflow.com/q/26775569
type: Tag
tags question: http://stackoverflow.com/q/26701036
tags question: http://stackoverflow.com/q/26745219
tags question: http://stackoverflow.com/q/26677598
tags question: http://stackoverflow.com/q/26750325
tags question: http://stackoverflow.com/q/26724174
tags question: http://stackoverflow.com/q/26800321
tags question: http://stackoverflow.com/q/26673424
tags question: http://stackoverflow.com/q/26677582
tags question: http://stackoverflow.com/q/26774669
tags question: http://stackoverflow.com/q/26740864
tags question: http://stackoverflow.com/q/26820330
tags question: http://stackoverflow.com/q/26761795
tags question: http://stackoverflow.com/q/26807100
tag name: backbone.js

http://stackoverflow.com/comment/42176425
type: Comment
comment on: http://stackoverflow.com/a/26801396
score: 0
has text: @MohitArora while chaining is indeed possible, it doesn't really "good" code, since code line is very long and difficult to read-understand on **quick** view.
type: AnswerComment

http://stackoverflow.com/q/26760458
score: 0
has comment: http://stackoverflow.com/comment/42129305
has comment: http://stackoverflow.com/comment/42158625
has comment: http://stackoverflow.com/comment/42129414
answer count: 1
favorite count: 0
tagged with: mailmerge
has answer: http://stackoverflow.com/a/26768905
has comment: http://stackoverflow.com/comment/42118678
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42121763
upvote count: 1
has title: Using ASP classic to produce a label template for printing
downvote count: 1
type: Question
has body: I have a problem that I'm not sure how to approach. Here is some background: We are using a web application that can be extended with ASP classic and JavaScript The web app contains details of clients Users of the web app need to be able to print an address label for a specified client The user needs to specify which label on the sheet will be used Now I can get all the information that I need about the client and which label is to be used next but I have no idea how I should go about printing the label. I have an inkling that I should be doing some sort of mail merge and displaying the result to the user for printing but I don't know how I'd go about getting the screen laid out correctly for the labels. Should I be creating some kind of PDF and displaying that? If so how would I go about doing so? This is all very new to me so any help would be much appreciated, Thanks!
accepted answer: http://stackoverflow.com/a/26768905
tagged with: javascript
tagged with: asp-classic

http://stackoverflow.com/comment/42117944
type: Comment
comment on: http://stackoverflow.com/a/26768595
score: 1
type: AnswerComment
has text: Okay I think I get it now. If I could upvote both of the answers in this thread I would.

http://stackoverflow.com/comment/42125147
type: Comment
comment on: http://stackoverflow.com/a/26772714
score: 0
type: AnswerComment
has text: ok, so - just hashes or associated arrays. I get you, hold a sec. Try that last one.

http://stackoverflow.com/a/26909776
type: Answer
accepted answer of: http://stackoverflow.com/q/26816177
answers question: http://stackoverflow.com/q/26816177
score: 0
type: AcceptedAnswer
has body: I found the solution finally, 'this' in this particular situation refers to 'id1' and instead of this in function we should put 'id1' var obj=new object[2]; obj[0]="id1"; obj[1]=5000; webBrowser.Document.InvokeScript("Social",obj);

http://stackoverflow.com/comment/42076176
has text: Take a look at the response in the Network tab of DevTools/Firebug, make sure it's valid JSON.
comment on: http://stackoverflow.com/q/26745228
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/26792190
tags question: http://stackoverflow.com/q/26832056
tags question: http://stackoverflow.com/q/26741060
tags question: http://stackoverflow.com/q/26728559
tags question: http://stackoverflow.com/q/26704071
tags question: http://stackoverflow.com/q/26828824
tags question: http://stackoverflow.com/q/26825642
tags question: http://stackoverflow.com/q/26696296
tags question: http://stackoverflow.com/q/26703955
tags question: http://stackoverflow.com/q/26784177
tags question: http://stackoverflow.com/q/26827709
tags question: http://stackoverflow.com/q/26821061
tags question: http://stackoverflow.com/q/26713812
tags question: http://stackoverflow.com/q/26775999
tags question: http://stackoverflow.com/q/26829324
tags question: http://stackoverflow.com/q/26817359
tags question: http://stackoverflow.com/q/26828754
tags question: http://stackoverflow.com/q/26700891
tags question: http://stackoverflow.com/q/26683508
tags question: http://stackoverflow.com/q/26713079
tags question: http://stackoverflow.com/q/26732436
tags question: http://stackoverflow.com/q/26698490
tags question: http://stackoverflow.com/q/26772818
tags question: http://stackoverflow.com/q/26831036
tags question: http://stackoverflow.com/q/26830361
tags question: http://stackoverflow.com/q/26831864
tags question: http://stackoverflow.com/q/26728878
tags question: http://stackoverflow.com/q/26769112
tags question: http://stackoverflow.com/q/26689160
tags question: http://stackoverflow.com/q/26698165
tags question: http://stackoverflow.com/q/26813197
tags question: http://stackoverflow.com/q/26721188
tags question: http://stackoverflow.com/q/26729333
tags question: http://stackoverflow.com/q/26737675
tags question: http://stackoverflow.com/q/26824007
tags question: http://stackoverflow.com/q/26679718
tags question: http://stackoverflow.com/q/26806371
tags question: http://stackoverflow.com/q/26697683
tags question: http://stackoverflow.com/q/26800552
tags question: http://stackoverflow.com/q/26731893
tags question: http://stackoverflow.com/q/26716147
tags question: http://stackoverflow.com/q/26736228
tags question: http://stackoverflow.com/q/26733653
tags question: http://stackoverflow.com/q/26741455
tags question: http://stackoverflow.com/q/26810586
tags question: http://stackoverflow.com/q/26684625
tags question: http://stackoverflow.com/q/26825227
tags question: http://stackoverflow.com/q/26784125
tags question: http://stackoverflow.com/q/26796503
tags question: http://stackoverflow.com/q/26684898
tags question: http://stackoverflow.com/q/26676089
tags question: http://stackoverflow.com/q/26760088
tags question: http://stackoverflow.com/q/26765178
tags question: http://stackoverflow.com/q/26695541
tags question: http://stackoverflow.com/q/26685349
tags question: http://stackoverflow.com/q/26798325
tags question: http://stackoverflow.com/q/26710530
tags question: http://stackoverflow.com/q/26710893
tags question: http://stackoverflow.com/q/26755035
tags question: http://stackoverflow.com/q/26806006
tags question: http://stackoverflow.com/q/26712764
tags question: http://stackoverflow.com/q/26741988
tags question: http://stackoverflow.com/q/26768601
tags question: http://stackoverflow.com/q/26786407
tags question: http://stackoverflow.com/q/26722073
tags question: http://stackoverflow.com/q/26679548
tags question: http://stackoverflow.com/q/26750275
tags question: http://stackoverflow.com/q/26831272
tags question: http://stackoverflow.com/q/26807952
tags question: http://stackoverflow.com/q/26828571
tags question: http://stackoverflow.com/q/26673178
tags question: http://stackoverflow.com/q/26761186
tags question: http://stackoverflow.com/q/26752722
tags question: http://stackoverflow.com/q/26695332
tags question: http://stackoverflow.com/q/26771540
tags question: http://stackoverflow.com/q/26765631
tags question: http://stackoverflow.com/q/26704108
tags question: http://stackoverflow.com/q/26699271
tags question: http://stackoverflow.com/q/26735000
tags question: http://stackoverflow.com/q/26694747

http://stackoverflow.com/a/26750095
downvote count: 0
has comment: http://stackoverflow.com/comment/42135136
has comment: http://stackoverflow.com/comment/42084702
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42084631
has comment: http://stackoverflow.com/comment/42084299
answers question: http://stackoverflow.com/q/26750023
accepted answer of: http://stackoverflow.com/q/26750023
has comment: http://stackoverflow.com/comment/42084395
has body: If you inspect the DOM structure after page load then label is not getting used as it is but there are some &lt;span&gt; get added as a children to display label text. That span has class="ui-btn-text" which you need to update. See below code - $(document).on("pageshow","#OptionsGeneral", function() { $("#OptToolbarLbl").text("Label"); $('label[for="OptIconsLabels"] span.ui-btn-text').text("Opt Icon"); $("#OptIconsLabels").attr("checked", false).checkboxradio("refresh"); }); DEMO
has comment: http://stackoverflow.com/comment/42084449
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42084671

http://stackoverflow.com/comment/42034585
type: Comment
type: QuestionComment
has text: @JonBlack Well I will be hiding the navigation menu on mobile, but I still want this functionality on desktop. Right now, the page is completely unusable, even with the navigation hidden.
comment on: http://stackoverflow.com/q/26722315
score: 0

http://stackoverflow.com/comment/42224363
comment on: http://stackoverflow.com/a/26761428
type: Comment
has text: and what function ensure that the dice had been drawn. am i need any collider? to check
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42157697
type: Comment
type: QuestionComment
has text: @PatrickEvans yup I have :)
comment on: http://stackoverflow.com/q/26790889
score: 0

http://stackoverflow.com/comment/42044858
type: QuestionComment
has text: If you debug it, is $state set? Are you injecting it? You should be able to call $state.go("your.path", { param1: "value", param2: "value2"});... Are you able to route to it manually? I did notice its set as `url: "/:pagenumber"` and not `url: "/{pagenumber}". According to their page it should be the same but it works for us when we use the `{}`. I would put a debug point right above the $state.go call and see what your variables are set to
comment on: http://stackoverflow.com/q/26725746
score: 0
type: Comment

http://stackoverflow.com/q/26825096
has title: Make a Javascript equivalent of a DOM element?
answer count: 4
type: AnsweredQuestion
has body: I have a DOM element in a web page. I want to make JavaScript file that I can use to create such a DOM element in another web page. This is just a one time conversion (that I probably will do several times, though ;-) ). So I just need something I can use in the JavaScript console. I will handle styles separately (except for inline styles). Has someone perhaps already done something like that? UPDATE I want to use it to create a copy later in a totally different web page. I want to use document.createElement etc.
has answer: http://stackoverflow.com/a/26825118
has answer: http://stackoverflow.com/a/26827852
has answer: http://stackoverflow.com/a/26832263
tagged with: dom
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26825127
upvote count: 0
possible better answer: http://stackoverflow.com/a/26825118
tagged with: javascript
score: -1
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26827852
favorite count: 0

http://stackoverflow.com/comment/42219234
comment on: http://stackoverflow.com/a/26825212
type: AnswerComment
has text: This gives a syntax error and renders the whole .js file non-functional.
score: 0
type: Comment

http://stackoverflow.com/comment/42236715
has text: @mot Would there be an issue if the file is too big? let's say the file is around 1GB. Thank you! :D
score: 0
comment on: http://stackoverflow.com/q/26829842
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26729973
tagged with: closures
tagged with: javascript
has body: I have a sample todo app in angularjs. My list of todos is an array. but everytime only the last value of array item is getting added to li's. I have replicated the issue on a jsbin. http://jsbin.com/simafuzidi/3/edit I want the list of todo item to have all the fields that are typed in text boxes and not just the last one. I know this is a closure problem but I am not sure how to solve this in the current circumstances. thanks $scope.addTodo = function() { $scope.todos.push({text:$scope.todoText1,text:$scope.todoText2,text:$scope.todoText3,text:$scope.todoText4,done:false}); $scope.todoText1 = ''; $scope.todoText2 = ''; $scope.todoText3 = ''; $scope.todoText4 = ''; }; &lt;form ng-submit="addTodo()"&gt; &lt;input type="text" ng-model="todoText1" size="30" placeholder="add new todo here1"&gt;&lt;br /&gt; &lt;input type="text" ng-model="todoText2" size="30" placeholder="add new todo here2"&gt;&lt;br /&gt; &lt;input type="text" ng-model="todoText3" size="30" placeholder="add new todo here3"&gt;&lt;br /&gt; &lt;input type="text" ng-model="todoText4" size="30" placeholder="add new todo here4"&gt;&lt;br /&gt; &lt;input class="btn-primary" type="submit" value="add"&gt; &lt;/form&gt;
has comment: http://stackoverflow.com/comment/42047837
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/21832701
tagged with: angularjs
has answer: http://stackoverflow.com/a/26730187
type: UnansweredQuestion
score: 1
upvote count: 1
has title: How to solve the closure issue in angularjs
has answer: http://stackoverflow.com/a/26730063
type: Question

http://stackoverflow.com/a/26772940
score: 0
has comment: http://stackoverflow.com/comment/42125431
has comment: http://stackoverflow.com/comment/42125650
has comment: http://stackoverflow.com/comment/42125635
has comment: http://stackoverflow.com/comment/42125393
has comment: http://stackoverflow.com/comment/42125437
type: Answer
answers question: http://stackoverflow.com/q/26772818
has comment: http://stackoverflow.com/comment/42125531
has comment: http://stackoverflow.com/comment/42125712
has body: From what I was able to understand Check this link: http://jsfiddle.net/a09bshb7/42/ If this is what you want to implement. $("#btnGetdata").on('click',function () { $('#ansTable tr td').each(function(){ alert($(this).find('img').attr('id')); }); });

http://stackoverflow.com/comment/56357393
score: 0
has text: Correct me if I'm wrong, but this solution builds a new map on every `Livemap render`, doesn't it? Shouldn't we avoid this situation?
comment on: http://stackoverflow.com/a/26762020
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26781032
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26769381
has comment: http://stackoverflow.com/comment/42141182
score: 1
answers question: http://stackoverflow.com/q/26769381
upvote count: 1
has body: Some times JS requires time to execute, so you have to wait for execution, best is to retrying for some time until page is not updated (using any condition) here is example of code HtmlForm form = page.getForms().get(0); HtmlTextArea textArea = form.getTextAreaByName("scandata"); HtmlSubmitInput button = form.getInputByValue("Submit"); HtmlPage res = button.click(); int input_length = page.getByXPath("//input").size(); int tries = 5; while (tries &gt; 0 &amp;&amp; input_length &lt; 12) { //you can change number of tries and condition according to your need tries--; synchronized (page) { page.wait(2000); //wait } input_length = page.getByXPath("//input").size(); //input length is example of condtion }
type: AcceptedAnswer

http://stackoverflow.com/a/26775888
has comment: http://stackoverflow.com/comment/42240117
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42246893
has comment: http://stackoverflow.com/comment/42248282
answers question: http://stackoverflow.com/q/26775654
has comment: http://stackoverflow.com/comment/42247897
has comment: http://stackoverflow.com/comment/42131597
has comment: http://stackoverflow.com/comment/42134113
has comment: http://stackoverflow.com/comment/42250269
type: Answer
has comment: http://stackoverflow.com/comment/42246931
score: 1
has comment: http://stackoverflow.com/comment/42131313
has comment: http://stackoverflow.com/comment/42131854
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26775654
has body: If you don't care much about layout of this pop-Up, just use window.confirm() You can build this into your HTML form like this: Car name: Car color: EDIT To compare the entered values to the ones you have stored in your SQL database, you have to use PHP. You could realize it for example like this: Car name: Car color:
has comment: http://stackoverflow.com/comment/42132143
downvote count: 0
has comment: http://stackoverflow.com/comment/42243338

http://stackoverflow.com/comment/41977729
type: QuestionComment
has text: serieusement ? tu parles français @Fred-ii- or you used google translate like me haha :)
score: 0
comment on: http://stackoverflow.com/q/26690052
type: Comment

http://stackoverflow.com/a/26830717
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26830633
has body: you want 2.php is only available if is an ajax request, and if you put it in the browser change the location to error.php? http://www.paulund.co.uk/use-php-to-detect-an-ajax-request here is an example to know if the request is an ajax (could be break) if is not an ajax request you could use header('Location: error_page.php');
answers question: http://stackoverflow.com/q/26830633

http://stackoverflow.com/comment/41981201
type: QuestionComment
comment on: http://stackoverflow.com/q/26692776
has text: I got right answer to my question but I cannot use this way in my real application
score: 0
type: Comment

http://stackoverflow.com/a/26733949
answers question: http://stackoverflow.com/q/26733664
score: 0
has comment: http://stackoverflow.com/comment/42054834
has body: You should pass the name of the state to $state.go(), not the state object. So $state.go($scope.from.name) should solve this for you.
has comment: http://stackoverflow.com/comment/42055117
type: Answer

http://stackoverflow.com/comment/42010273
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26705165
has text: Thank You, that's perfect, I've just commented out inner elses.

http://stackoverflow.com/a/26760197
score: 0
type: AcceptedAnswer
type: Answer
has body: What you're looking for is a directive - a chunk of html that has a sort of private controller via the link function. Create the directive in a separate template, place your controller functionality (if it indeed is appropriate for a controller) in the directive's link function and use ng-show to reveal on click. If we had more code to play with I could give a better example of all of this. https://docs.angularjs.org/guide/directive
answers question: http://stackoverflow.com/q/26760088
accepted answer of: http://stackoverflow.com/q/26760088

http://stackoverflow.com/q/26726695
tagged with: jquery
score: 0
answer count: 1
has title: Hiding only Empty tables that have the same css class
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42042843
accepted answer: http://stackoverflow.com/a/26726807
has body: So I've searched this forum and clicked almost every link even relevant to my problem so if I missed a blatant post about this I apologize. Here's my situation. I have some dynamically generated tables that all have the same css class (they have to for a check box I have that hides them). The thing is I want to hide tables that don't have any data in them but show the ones that do. I have pieced together some code but what I have ends up hiding all tables with the same CSS class if one of the tables are empty. I say empty but they all have at least one td and I'm counting if it only has one td to hide the table. Here is the code I have at the moment.... &lt;script type="text/javascript"&gt; $(document).ready(function () { $('.devTable').each(function (i) { //select all tds in this column var tds = $(this).parents('.devTable') .find('tr td:nth-child(' + (i + 1) + ')'); if (tds.length &lt;= 1) { $(this).parent().hide(); } }) }); &lt;/script&gt; I know it's something simple I'm missing.
type: Question
has answer: http://stackoverflow.com/a/26726807
tagged with: javascript

http://stackoverflow.com/q/26732929
has comment: http://stackoverflow.com/comment/42053459
type: Question
has answer: http://stackoverflow.com/a/26733546
has comment: http://stackoverflow.com/comment/42052928
has comment: http://stackoverflow.com/comment/42053226
linked to: http://stackoverflow.com/q/11716916
has answer: http://stackoverflow.com/a/26733605
has comment: http://stackoverflow.com/comment/42054180
has comment: http://stackoverflow.com/comment/42053426
has comment: http://stackoverflow.com/comment/42053416
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42053227
score: 0
has comment: http://stackoverflow.com/comment/42053012
has comment: http://stackoverflow.com/comment/42053560
has comment: http://stackoverflow.com/comment/42052850
has title: Tooltip title on image using mouseover?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42053434
has comment: http://stackoverflow.com/comment/42053394
has comment: http://stackoverflow.com/comment/42052852
has comment: http://stackoverflow.com/comment/42052822
has comment: http://stackoverflow.com/comment/42052886
has comment: http://stackoverflow.com/comment/42053116
has answer: http://stackoverflow.com/a/26733869
has body: I want to display an element title on the image(tooltip size). I found out the current element title $('.downloadPdf').mouseover(function(){ var currentelement = $(this).attr('title'); }); downloadPdf is common class on elements. Actually I have a menu bar in bottom in which I have some icons. These icons are functional. Here I want whenever a user hovers over these icons, their title must come over the image. This image is nothing, just a tooltip shape. But how to append it on image? And its position must be on the element only. so how do I get the position also. So confused and spend at least 3 hours on this small task. Any help would be appreciated. I am so bad when it comes to use css effectively.
has comment: http://stackoverflow.com/comment/42053491
has answer: http://stackoverflow.com/a/64436905
possible better answer: http://stackoverflow.com/a/26733605
has comment: http://stackoverflow.com/comment/42053556
has comment: http://stackoverflow.com/comment/42052885
tagged with: css
has comment: http://stackoverflow.com/comment/42053147
answer count: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26733546
has comment: http://stackoverflow.com/comment/42052848
has comment: http://stackoverflow.com/comment/42053040
has comment: http://stackoverflow.com/comment/42052877
has comment: http://stackoverflow.com/comment/42052945

http://stackoverflow.com/q/26740959
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26741221
tagged with: javascript
has answer: http://stackoverflow.com/a/26741531
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/39654069
possible better answer: http://stackoverflow.com/a/26741249
has title: simple jquery slideshow with navigation?
has answer: http://stackoverflow.com/a/26741249
tagged with: css
has answer: http://stackoverflow.com/a/26741221
answer count: 4
score: 1
has body: So I'm in the process of creating a pretty simple jQuery/CSS slideshow for a course of mine. It's about ten pages long, and right now it works fine if you want to just go from beginning to end in that order, but if you need to refresh the page for any reason, it sends you back to the first page. Since it's on the longer end, I'd like to be able to "click" to a certain page... is this possible without getting too complicated? Here's my jQuery function checkNav() { if ($('.active-slide').hasClass('first')) { $('.prev').hide(); $('.next').show(); } else if ($('.active-slide').hasClass('last')) { $('.next').hide(); $('.prev').show(); } else { $('.next').show(); $('.prev').show(); } } var main = function() { checkNav(); $('.next').click(function() { var currentSlide = $('.active-slide'); var nextSlide = currentSlide.next('.slide'); var currentDot = $('.active-dot'); var nextDot = currentDot.next(); //if nextslide is last slide, go back to the first if (nextSlide.length === 0) { nextSlide = $('.slide').first(); nextDot = $('.dot').first(); } currentSlide.fadeOut(500).removeClass('active-slide'); nextSlide.fadeIn(1100).addClass('active-slide'); currentDot.removeClass('active-dot'); nextDot.addClass('active-dot'); checkNav(); }); //prev slide function $('.prev').click(function() { var currentSlide = $('.active-slide'); var prevSlide = currentSlide.prev('.slide'); var currentDot = $('.active-dot'); var prevDot = currentDot.prev(); //if prevslide is last slide, go back to the first if (prevSlide.length === 0) { prevSlide = $('.slide').last(); prevDot = $('.dot').last(); } currentSlide.fadeOut(600).removeClass('active-slide'); prevSlide.fadeIn(600).addClass('active-slide'); currentDot.removeClass('active-dot'); prevDot.addClass('active-dot'); checkNav(); }); }; $(document).ready(main); And here's a rough markup of what the HTML looks like &lt;div class="slide active-slide first"&gt; &lt;div class="content"&gt; &lt;p&gt;First Slide&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div cl…
upvote count: 1
type: Question

http://stackoverflow.com/comment/41979080
comment on: http://stackoverflow.com/q/26689470
score: 0
type: Comment
has text: Have you investigated WebGL as a platform to optimize your particles?
type: QuestionComment

http://stackoverflow.com/q/26823609
answer count: 2
has body: I been looking all over the internet for a code that does this, no luck so far... This is the code for my facebook like button: I want this button to disappear after is clicked (Im thiyin to make some sort of like gate) Cheers
linked to: http://stackoverflow.com/q/3718964
type: UnansweredQuestion
tagged with: facebook
has answer: http://stackoverflow.com/a/26824354
score: 0
tagged with: hide
type: Question
has comment: http://stackoverflow.com/comment/42216359
has answer: http://stackoverflow.com/a/26826968
tagged with: javascript
tagged with: facebook-like
has title: How to hide Facebook Like Button after click?

http://stackoverflow.com/comment/42445302
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26704135
has text: I'm just trying to display a popup window with no functionality within Google spreadsheets. But even copying the actual example from the documentation results in nothing happening. The script is running; I can make a "toast" popup through the function (if I add it before the "return myApp" line, of course).
type: AnswerComment

http://stackoverflow.com/q/26744521
has comment: http://stackoverflow.com/comment/42074622
downvote count: 1
has body: I have a clock made that displays the current time in Hours:Minutes:Seconds. Currently the time is displayed as so 20:30:25, but my problem is that when the time is a single digit for example 1.05 (3 seconds) am, it will appear like this on the clock 1:5:3. I want it to appear like this 01:05:03. How can this be done? var today = new Date(); var hours = today.getHours(); var minutes = today.getMinutes(); var seconds = today.getSeconds(); today = hours+':'+minutes+':'+seconds; document.write(today);
has answer: http://stackoverflow.com/a/26744579
has answer: http://stackoverflow.com/a/26744590
score: 0
upvote count: 1
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/14529381
tagged with: clock
tagged with: javascript
duplicate of: http://stackoverflow.com/q/14529381
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/42074545
has title: How to make my clock show 6 digits with javascript?
type: UnansweredQuestion
tagged with: css

http://stackoverflow.com/a/26791040
answers question: http://stackoverflow.com/q/26790656
type: Answer
score: 0
has body: So you're getting lucky with "123" because everything in javascript is an object, so whats really happening is that it treats each letter of the string as a value in linked_list and it's splitting it and outputting it with span. city:state, city:state looks like you are getting a JSON object. If it is json instead of parentheses it should be wrapped in curly brackets {city:state, city:state}. If it's not then it should be! As is, your kinda on the right track but it should look like this: function test(link_list) { for(var i in link_list){ if(link_list.hasOwnProperty(i)){ console.log("SPAN:", i, ':', link_list[i]); } } } test({city:'state', city:'state'}); http://jsfiddle.net/716dv1gg/ You can read more about JSON and for...in loops here on the MDM website (which is a great resource use it often).

http://stackoverflow.com/q/26829384
upvote count: 15
tagged with: charts
has comment: http://stackoverflow.com/comment/59117902
tagged with: javascript
has comment: http://stackoverflow.com/comment/51034760
has body: If I have a C3JS grouped bar chart defined like the following, how can I get the segments to stay in the order I've defined them instead of in ascending order by value? By default C3 will order them as 5, 10, 40, but I want it to remain as 10, 40, 5. c3.generate({ bindto: '.active-loads', data: { columns: [ ['Picking up future', 10], ['Enroute', 40], ['Delivered', 5] ], type: 'bar', groups: [ ['Picking up future', 'Enroute', 'Delivered'] ], onclick: function(d) { console.debug(d); } }, axis: { rotated: true, x: { show: false } } }); EDIT Turns out it's as easy as specifying order: null in the data property.
answer count: 1
downvote count: 0
favorite count: 0
tagged with: c3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/51028930
has answer: http://stackoverflow.com/a/27314325
score: 15
has title: C3JS bar chart with specific order
type: Question

http://stackoverflow.com/comment/42050162
has text: what is the date format you are posting?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26731324
type: Comment

http://stackoverflow.com/comment/42016634
comment on: http://stackoverflow.com/q/26712890
score: 0
type: QuestionComment
type: Comment
has text: `Uncaught SyntaxError: Unexpected token ]`

http://stackoverflow.com/comment/42112581
score: 1
comment on: http://stackoverflow.com/a/26762810
type: AnswerComment
type: Comment
has text: Sure. It's just a callback function and you can omit it from the service. `then()` call in the controller is enough. You'd use `success` (or `then`) in the service if you wanted to, say, modify data or something before returning it. See the service here, that's all you need in it: http://plnkr.co/edit/oKva09i1X0wepxgPCYP6?p=preview

http://stackoverflow.com/q/26763349
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
upvote count: 1
tagged with: python
has answer: http://stackoverflow.com/a/26763683
accepted answer: http://stackoverflow.com/a/26763683
has body: I would like to declare in a script, a directory. $images_dir = '{{url_for('.../pictures')}}'; My flask application directory looks like: Root -wep.py -templates -gallery.html -static -pictures The picture are located inside the pictures folder, and the html page that contains the script is gallery.html which located in the templates folder. The purpose of that script is to list all the images that are located in the pictures folder and present them as a gallery view when the gallery.html page is loaded. The script works fine if I run it in a normal apache webserver though. When I run the web.py, the debuger gives me the error: BuildError: ('../pictures', {}, None) So I think the problem is to declare the directory in flask. UPDATE: Im using this guy's script : http://davidwalsh.name/generate-photo-gallery As you can see in the source code: /** settings **/ $images_dir = 'preload-images/'; $thumbs_dir = 'preload-images-thumbs/'; Im trying to adjust those line to work with flask.
type: AnsweredQuestion
has title: Load a directory in a js with flask
score: 1
has comment: http://stackoverflow.com/comment/42108899
type: Question
has comment: http://stackoverflow.com/comment/42108795
has comment: http://stackoverflow.com/comment/42110364
has comment: http://stackoverflow.com/comment/42110607
has comment: http://stackoverflow.com/comment/42109965
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42110230
tagged with: flask
has comment: http://stackoverflow.com/comment/42109205
has comment: http://stackoverflow.com/comment/42108749
has comment: http://stackoverflow.com/comment/42110707

http://stackoverflow.com/a/28240313
answers question: http://stackoverflow.com/q/26761155
type: Answer
has body: Sencha Touch adds setter- and getter-functions for properties dynamically - that's why you don't find a Ext.dataview.List.getGrouped() or Ext.dataview.List.setGrouped() function in the api source code. To set the grouped property of a list dynamically via Ext.dataview.List.getGrouped(), you have to: configure the list's store with a Ext.util.Grouper instance with a sortProperty and groupFn set the list's grouped property config to true as default - if I don't do this, e.g. leave grouped: false or don't add the config at all, I get an error at runtime (something with Cannot read property '0' of undefined) at runtime, get a reference to the list and call setGrouped(true | false); For me, this solution works and I can group/ungroup lists in Sencha Touch 2.4.1 at runtime following these steps. Hope it helps - Cherrio!
score: 0

http://stackoverflow.com/q/26713017
has body: I want to make sure that isSearchVisible scope variable will always start on false on every page change. How should I implement it? app.controller('MainController', function($rootScope) { $rootScope.isSearchVisible = false; }); app.controller('ProfileController', function($scope) { $scope.isSearchVisible = true; }); app.controller('AboutUsController', function($scope) { }); In every page, the root scope variable isSearchVisible is false because of MainController. When you enter the profile page (ProfileController), the local scope variable is turned to true, which is good. But when you leave this page, the root scope variable changed as well to true. There is no separation between $rootScope variables and $scope variables. How should I reset isSearchVisible to false on every page change, unless the controller directly changed it?
score: 0
has comment: http://stackoverflow.com/comment/42017958
tagged with: angularjs-scope
type: Question
has title: Reset a scope variable - Angular.js
has answer: http://stackoverflow.com/a/26713841
tagged with: javascript
tagged with: angularjs-rootscope
answer count: 2
has comment: http://stackoverflow.com/comment/42017962
has answer: http://stackoverflow.com/a/26713863
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42017072

jquery-ui
tags question: http://stackoverflow.com/q/26726779
tags question: http://stackoverflow.com/q/26696778
tags question: http://stackoverflow.com/q/26807991
tags question: http://stackoverflow.com/q/26736240
tags question: http://stackoverflow.com/q/26789356
tags question: http://stackoverflow.com/q/26768162
tags question: http://stackoverflow.com/q/26691555
tags question: http://stackoverflow.com/q/26685063
tags question: http://stackoverflow.com/q/26700048
tags question: http://stackoverflow.com/q/26680835
tags question: http://stackoverflow.com/q/26763709
tags question: http://stackoverflow.com/q/26784268
tags question: http://stackoverflow.com/q/26733303
tags question: http://stackoverflow.com/q/26783824
tags question: http://stackoverflow.com/q/26731893
tags question: http://stackoverflow.com/q/26728618
tags question: http://stackoverflow.com/q/26761826
tags question: http://stackoverflow.com/q/26709508
tags question: http://stackoverflow.com/q/26730531
tags question: http://stackoverflow.com/q/26789939
tags question: http://stackoverflow.com/q/26831324
tags question: http://stackoverflow.com/q/26753119
tags question: http://stackoverflow.com/q/26685762
tags question: http://stackoverflow.com/q/26696431
tags question: http://stackoverflow.com/q/26746823
tags question: http://stackoverflow.com/q/26801844
tags question: http://stackoverflow.com/q/26673687
tags question: http://stackoverflow.com/q/26691018
tags question: http://stackoverflow.com/q/26786977
tags question: http://stackoverflow.com/q/26731200
tags question: http://stackoverflow.com/q/26712314
tags question: http://stackoverflow.com/q/26710363
tags question: http://stackoverflow.com/q/26766024
type: Tag
tag name: jquery-ui
tags question: http://stackoverflow.com/q/26759529
tags question: http://stackoverflow.com/q/26692958
tags question: http://stackoverflow.com/q/26768451
tags question: http://stackoverflow.com/q/26806827
tags question: http://stackoverflow.com/q/26753953
tags question: http://stackoverflow.com/q/26725862
tags question: http://stackoverflow.com/q/26763764

http://stackoverflow.com/q/26733542
favorite count: 0
possible better answer: http://stackoverflow.com/a/26737690
accepted answer: http://stackoverflow.com/a/26733659
type: AnsweredQuestion
has body: I am using IndexedDB with latest chrome/chromium versions, and I still have the following problem. I try to delete the DB before creating it, as you can see in the code below. First time I execute this code, 'onupgradeneeded' is correctly logged. At this time, the DB exists. Then if your run the same code, the database is correctly removed but the onupgradeneeded callback is not called again. I don't find any information about that in the specs neither anywhere else. So if someone has an idea about how to solve this problem, I'm interested. UPDATE: &lt;script type="text/javascript"&gt; var module={ dbName: 'myDB', dbVersion: 1, dbStores:[{name:'places', keyPath:'id'}], /* START :: DEFINE MAINONLINE INTERFACE FUNCTIONS */ test: function(){ var that= this; this.deleteDB() .then(function(e){ return that.createEmptyDB(e);} ) .catch(function(error){ that.logError(error); }); }, logError: function(e){ console.log('An error occured'); if (e.target &amp;&amp; e.target.errorCode){ console.log('errorCode = ' + e.target.errorCode); }else{ console.log(e); } }, deleteDB: function(){ return new Promise(function(resolve, reject){ var deleteDbRequest= indexedDB.deleteDatabase(this.dbName); deleteDbRequest.onsuccess= function(e){ console.log('deleted successfully'); resolve(e); } deleteDbRequest.onerror= function(e){ console.log('error while deleting'); reject(e); } deleteDbRequest.onblocked= function(e){ console.log('blocked, unable to delete'); reject(e); } }); }, createEmptyDB: function(event){ var that= this; return new Promise(function(resolve, reject){ var openDbRequest= indexedDB.open(that.dbName, that.dbVersion); openDbRequest.onerror= function(e){ console.log('error'); reject(e); } openDbRequest.onblocked=function(e){ console.log('The open request is blocked'); } openDbRequest.onsuccess= function(e){ console.log('onsuccess'); resolve(e); } openDbRequest.onupgradeneeded= function(e){ console.log('onupgradeneeded'); } }); } } module.test(); &lt;/script&gt; Thanks in advance
upvote count: 1
has answer: http://stackoverflow.com/a/26733659
type: Question
score: 1
tagged with: indexeddb
has answer: http://stackoverflow.com/a/26737690
answer count: 2
downvote count: 0
has title: Why opening after deleting doesn't call the onupgradeneeded callback
tagged with: javascript

http://stackoverflow.com/comment/42055766
score: 0
type: Comment
has text: I'm getting the following Console Error: null is not an object (evaluating 'element.addEventListener') (anonymous function) The line of my .js file it refers to is: `if (element.addEventListener) element.addEventListener(type, callback);`
comment on: http://stackoverflow.com/a/26679438
type: AnswerComment

http://stackoverflow.com/a/26738615
has body: 1) If your menu's items contain in the same scope with the $http call, you can write the following code: function FirstController($scope, $http){ $scope.showFirstItem = false; $scope.clickAction = function(){ $http.get('/someUrl'). success(function(data, status, headers, config) { $scope.showFirstItem = true; //if success - show it }). error(function(data, status, headers, config) { $scope.showFirstItem = false; }); } } Show the first item First item Second Item 2) If the $http call fired in the other controller, you can create shared service for it. You can pass some values/actions from one controller to another. For example: angular.module("yourAppName", []).factory("mySharedService", function($rootScope){ var mySharedService = {}; mySharedService.showFirstItem = false; var httpCall = function() { $http.get('/someUrl'). success(function(data, status, headers, config) { mySharedService.showFirstItem = true; }). error(function(data, status, headers, config) { mySharedService.showFirstItem = false; }); }; mySharedService.httpCall= function(){ httpCall(); $rootScope.$broadcast('httpCallFired'); } return mySharedService; }); And after to inject it into any controller. function FirstController($scope, mySharedService){ $scope.showFirstItem = false; $scope.$on('httpCallFired', function () { $scope.showFirstItem = mySharedService.showFirstItem; }); } function SecondController($scope, mySharedService) { $scope.clickAction = function() { mySharedService.httpCall(); }; } First item Second Item Show the first item
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26737675
type: AcceptedAnswer
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26737675

http://stackoverflow.com/q/26831606
tagged with: ajax
score: 0
tagged with: api
answer count: 1
has body: I have written a small Jquery plugin that makes it easy for me to implement Facebook like "likes" on any item in my application. My only issue now is that I struggle to implement the success / error callback of my plugin. $('.user-like').like({ success: function(data, textStatus, jqXHR) { $(this).text('Liked'); } }); My issue with the above code is this line: $(this).text('Liked'); I'm aware of what why the issue happens, I just can't find a good way to make it work like I want it. Let me explain how the script works and what my Goal is: As you can see I'm passing the call along to the likeApi() function that executes an AJAX call. Further you see that I merge my Options with the defaults and that you can override the success and error callback of the AJAX object. The issue is now that this in the above code is the scope of the AJAX call and not my original method. I want to allow the user to define his own success / error callback that depends on the result of the API call and allows me to do something based on the state if it was a success or failure so that I can change the like text for example. How can I do this? (function ($) { $.likeApi = function (action, options) { if (action != 'like' &amp;&amp; action != 'unlike') { return false; } var options = jQuery.extend({}, jQuery.likeApi.defaults, options); $.ajax({ type: "POST", url: options.baseUrl + action + '.json', data: { data: { Like: { foreign_key: options.id, model: options.model } } }, success: options.success, error: options.error, dataType: 'json' }); }; $.fn.like = function (options) { var scopedOptions = options; this.on('click', function(event) { event.preventDefault(); $.likeApi('like', $.extend({}, scopedOptions,{ 'id': $(event.target).data('like-fk'), 'model': $(event.target).data('like-model') })); }); return this; }; $.fn.unlike = function (options) { var scopedOptions = options; this.on('click', function(event) { event.preventDefault(); var result = $.likeApi('unlike', $.extend({}, scopedOption…
accepted answer: http://stackoverflow.com/a/26831695
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26831695
type: Question
tagged with: javascript
tagged with: jquery
has title: Jquery implementing a success and error callback for my plugin that works with AJAX

http://stackoverflow.com/q/26691366
has title: tag does not loads .js file
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41978968
has comment: http://stackoverflow.com/comment/41980196
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41979172
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41979013
has body: I am implementing a web application and trying to load .js file and none of them are loading. I see that GET of this particular file is failing. This is my folder structure. MyApp app routes routes.js bower_components node_modules public index.html routes routes.js controllers templates app.js package.json I am unable to load public/routes/routes.js from public/index.html below is index.html Login Test What am i missing here
score: 0
has comment: http://stackoverflow.com/comment/41979078
has comment: http://stackoverflow.com/comment/41980421

http://stackoverflow.com/comment/42834123
type: Comment
comment on: http://stackoverflow.com/q/26730382
type: QuestionComment
score: 0
has text: The vagrantfile was revised. (I think it was made with an older version).

http://stackoverflow.com/q/26797751
type: Question
tagged with: angularjs-ng-repeat
tagged with: alertifyjs
tagged with: angularjs
upvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/26797853
has title: Angularjs not updating using alertify or dialog plugin
accepted answer: http://stackoverflow.com/a/26797853
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
has body: i'm using angular.js and alertify.js to list user in here: Plunkr the problem is : after I click the delete menu, a confirmation window appears, then after OK button clicked, the deleted row still there until you click Delete button again. It seems, Angular doesn't know when to update itself. Anyone know How to 'reload' this user table properly in Angular? here's my html file: {{ user.name }} {{ user.age }} Delete here's my function app.js : var app = angular.module('demo', []); app.controller('DemoCtrl', function($scope, $http) { $scope.users = [ {name: "Jack", age: 10}, {name: "Bart",age: 20}, {name: "Griffin",age: 40}] $scope.removeUser = function(index) { alertify.confirm("You Sure ?").set('onok', function() { $scope.users.splice(index, 1) }) } });
favorite count: 0

http://stackoverflow.com/comment/42017883
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26713484
type: Comment
has text: Hi, the `https://www.sandbox.paypal.com/cgi-bin/webscr` redirects to the PayPal Sandbox site which is required. The reason I want to call another test-servlet is for it to set a boolean `isPaypalButtonClicked`. Is that possible?

recursion
type: Tag
tag name: recursion
tags question: http://stackoverflow.com/q/26707136
tags question: http://stackoverflow.com/q/26776921
tags question: http://stackoverflow.com/q/26696581
tags question: http://stackoverflow.com/q/26816312
tags question: http://stackoverflow.com/q/26703700
tags question: http://stackoverflow.com/q/26746021
tags question: http://stackoverflow.com/q/26806625
tags question: http://stackoverflow.com/q/26829447
tags question: http://stackoverflow.com/q/26817160

http://stackoverflow.com/q/26770862
upvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
favorite count: 0
tagged with: ajax
type: Question
score: -1
has answer: http://stackoverflow.com/a/26770985
answer count: 2
tagged with: php
downvote count: 1
has body: Assume I have 2 textbox, that's serial_no10 and serial_no12. That 2 textbox appear not simultaneously depends on case 1 PHP file for checking the SN. 1 DIV status to display the data. jQuery Ajax var serial_no10 = $("#serial_no10").val(); var serial_no12 = $("#serial_no12").val(); $.ajax( { type: "POST", url: "chk_dvd_part_no.php", data: 'serial_no10='+ serial_no10 +'&amp;serial_no12='+ serial_no12, success: function(msg) { $("#status").ajaxComplete(function(event, request, settings) { } } } HTML &lt;div id="status"&gt;&lt;/div&gt; PHP File if(!empty($_POST['serial_no12'])) { echo "Serial No 12"; } else if(!empty($_POST['serial_no10'])) { echo "Serial No 10"; } Now I'm facing the problem when get POST from textbox serial_no_12, the value is undefined. But if get POST from textbox serial_no_10, I got the value. Is that something wrong with that PHP code? Or I do something that should not be.
has comment: http://stackoverflow.com/comment/42121994
has answer: http://stackoverflow.com/a/26770912
has title: PHP Get POST Value from Ajax to PHP with 2 condition

http://stackoverflow.com/comment/42154378
type: AnswerComment
comment on: http://stackoverflow.com/a/26789041
score: 0
type: Comment
has text: example.js is another file and in the html part I have included it using script src.

jquery
tags question: http://stackoverflow.com/q/26830633
tags question: http://stackoverflow.com/q/26831731
tags question: http://stackoverflow.com/q/26683442
tags question: http://stackoverflow.com/q/26790977
tags question: http://stackoverflow.com/q/26783921
tags question: http://stackoverflow.com/q/26795668
tags question: http://stackoverflow.com/q/26710351
tags question: http://stackoverflow.com/q/26721568
tags question: http://stackoverflow.com/q/26773658
tags question: http://stackoverflow.com/q/26706790
tags question: http://stackoverflow.com/q/26704892
tags question: http://stackoverflow.com/q/26719544
tags question: http://stackoverflow.com/q/26802934
tags question: http://stackoverflow.com/q/26732409
tags question: http://stackoverflow.com/q/26802823
tags question: http://stackoverflow.com/q/26736845
tags question: http://stackoverflow.com/q/26697484
tags question: http://stackoverflow.com/q/26736936
tags question: http://stackoverflow.com/q/26797965
tags question: http://stackoverflow.com/q/26741575
tags question: http://stackoverflow.com/q/26753287
tags question: http://stackoverflow.com/q/26729733
tags question: http://stackoverflow.com/q/26686660
tags question: http://stackoverflow.com/q/26745253
tags question: http://stackoverflow.com/q/26716099
tags question: http://stackoverflow.com/q/26709673
tags question: http://stackoverflow.com/q/26779257
tags question: http://stackoverflow.com/q/26801780
tags question: http://stackoverflow.com/q/26781129
tags question: http://stackoverflow.com/q/26781535
tags question: http://stackoverflow.com/q/26712683
tags question: http://stackoverflow.com/q/26699039
tags question: http://stackoverflow.com/q/26720241
tags question: http://stackoverflow.com/q/26673854
tags question: http://stackoverflow.com/q/26779544
tags question: http://stackoverflow.com/q/26685743
tags question: http://stackoverflow.com/q/26699504
tags question: http://stackoverflow.com/q/26796008
tags question: http://stackoverflow.com/q/26700012
tags question: http://stackoverflow.com/q/26710392
tags question: http://stackoverflow.com/q/26751972
tags question: http://stackoverflow.com/q/26733199
tags question: http://stackoverflow.com/q/26809341
tags question: http://stackoverflow.com/q/26685559
tags question: http://stackoverflow.com/q/26774152
tags question: http://stackoverflow.com/q/26744322
tags question: http://stackoverflow.com/q/26772661
tags question: http://stackoverflow.com/q/26805726
tags question: http://stackoverflow.com/q/26715486
tags question: http://stackoverflow.com/q/26790930
tags question: http://stackoverflow.com/q/26787031
tags question: http://stackoverflow.com/q/26676726
tags question: http://stackoverflow.com/q/26770372
tags question: http://stackoverflow.com/q/26770310
tags question: http://stackoverflow.com/q/26769208
tags question: http://stackoverflow.com/q/26730768
tags question: http://stackoverflow.com/q/26738172
tags question: http://stackoverflow.com/q/26748186
tags question: http://stackoverflow.com/q/26767973
tags question: http://stackoverflow.com/q/26791340
tags question: http://stackoverflow.com/q/26770758
tags question: http://stackoverflow.com/q/26726087
tags question: http://stackoverflow.com/q/26790976
tags question: http://stackoverflow.com/q/26819028
tags question: http://stackoverflow.com/q/26744778
tags question: http://stackoverflow.com/q/26805253
tags question: http://stackoverflow.com/q/26727770
tags question: http://stackoverflow.com/q/26777938
tags question: http://stackoverflow.com/q/26722232
tags question: http://stackoverflow.com/q/26772564
tags question: http://stackoverflow.com/q/26776936
tags question: http://stackoverflow.com/q/26817059
tags question: http://stackoverflow.com/q/26744212
tags question: http://stackoverflow.com/q/26735256
tags question: http://stackoverflow.com/q/26828228
tags question: http://stackoverflow.com/q/26811231
tags question: http://stackoverflow.com/q/26756362
tags question: http://stackoverflow.com/q/26759310
tags question: http://stackoverflow.com/q/26722774
tags question: http://stackoverflow.com/q/26691487

http://stackoverflow.com/comment/42028830
score: 0
type: Comment
has text: Thanks for the nice suggestion, I am sure, this will help some people coming from google but this code is inside library X in my case, I have no power there.
comment on: http://stackoverflow.com/a/26718766
type: AnswerComment

http://stackoverflow.com/q/26682399
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26682432
tagged with: jquery
has answer: http://stackoverflow.com/a/26682432
has title: Update the clickable div
accepted answer: http://stackoverflow.com/a/26682427
has body: I want to get a click event on a replaced element. var checks_int = "1"; $(function () { var plus = $('.fa-plus'); plus.click(function () { if (checks_int &lt;= 5) { $(this).parent().parent().append("&lt;li&gt;&lt;i class='fa fa-plus'&gt;&lt;/i&gt;&lt;/li&gt;"); $(this).parent().html("").html("&lt;i class='fa fa-check' check='"+ (checks_int + 1) +"'&gt;&lt;/i&gt;&lt;p&gt;&lt;input name='check1' type='text' placeholder='Check'&gt;&lt;/p&gt;"); checks_int++; if (checks_int &gt; 5) { $(this).css("display", "none"); } } plus = $('.fa-plus'); }); }); All of this is working fine, but only the first try, when I click the "new" .fa .fa-check nothing happend.
type: AnsweredQuestion
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26682427

http://stackoverflow.com/q/26681299
has comment: http://stackoverflow.com/comment/41963990
has comment: http://stackoverflow.com/comment/42014828
downvote count: 1
has comment: http://stackoverflow.com/comment/41961939
type: Question
has comment: http://stackoverflow.com/comment/41961515
has answer: http://stackoverflow.com/a/26681400
has comment: http://stackoverflow.com/comment/41961387
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41961393
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26681330
linked to: http://stackoverflow.com/q/14220321
linked to: http://stackoverflow.com/q/23740051
favorite count: 0
accepted answer: http://stackoverflow.com/a/26681400
possible better answer: http://stackoverflow.com/a/26681330
has title: Loop doesn't work as expected when $.get is called
linked to: http://stackoverflow.com/q/750486
type: AnsweredQuestion
has body: I'm having difficult to understand the $.get call inside a loop . On the example below I call a $.get inside a function (The file that i'm reading on $.get doesn't matter for this problem), and it seems to be read just after all the first loop is finished. I expect console to show: --- 1 --- 2 --- 3 --- But is showing 1 2 3 4 5 6 7 8 9 10 ---(11) Can you tell me why? http://jsfiddle.net/qh6zn514/1/ Click me $("#clickme").click(function() { for ($i=0;$i<=10;$i++) { readNumber(); console.log($i); } }) function readNumber () { $.get ("file", function(txt) { console.log ("---"); }); }
upvote count: 1

http://stackoverflow.com/comment/42587989
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26798580
has text: @salivan Do you want to like this when we swipe up or down then only one section should scroll right ?

http://stackoverflow.com/q/26800330
type: Question
has title: how to display dropdown selected options in separate lines
answer count: 2
tagged with: javascript
tagged with: drop-down-menu
tagged with: jquery
score: 0
has body: Is there a way to display dropdown selected options in separate lines? (I have a basket in my form where shows selected movies by users.. but the problem is that if user selects more than one option, they are not shown in separate lines) For example, with the code below, if I select "Toy story" and "Forest gump", then selectedOpts will be ="Toy storyForest gump" while I need "Toy story", "Forest gump" in separate lines. $('#btnRight').on('click', function (e) { var selectedOpts = $("#movieName option:selected").text(); if (selectedOpts.length == 0) { alert("NOTHING TO MOVE"); e.preventDefault(); }else { var obj = { "movie_name":selectedOpts, "movie_info": "" }; alert(selectedOpts); parent.window.opener.addToBasket(obj); } $("#tags").val(""); }); and this is how I see selected movies in the basket:
tagged with: html-select
has answer: http://stackoverflow.com/a/26801033
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27027797
linked to: http://stackoverflow.com/q/4746824
has comment: http://stackoverflow.com/comment/42578860

java
tags question: http://stackoverflow.com/q/26723776
tags question: http://stackoverflow.com/q/26742241
tags question: http://stackoverflow.com/q/26722090
tags question: http://stackoverflow.com/q/26772793
tags question: http://stackoverflow.com/q/26684520
tags question: http://stackoverflow.com/q/26819978
tags question: http://stackoverflow.com/q/26767683
tags question: http://stackoverflow.com/q/26727527
tags question: http://stackoverflow.com/q/26750738
tags question: http://stackoverflow.com/q/26795915
tags question: http://stackoverflow.com/q/26826077
tags question: http://stackoverflow.com/q/26684665
tags question: http://stackoverflow.com/q/26807434
tags question: http://stackoverflow.com/q/26800231
tags question: http://stackoverflow.com/q/26705372
tags question: http://stackoverflow.com/q/26754510
tags question: http://stackoverflow.com/q/26698454
tags question: http://stackoverflow.com/q/26758136
tags question: http://stackoverflow.com/q/26794699
tags question: http://stackoverflow.com/q/26715821
tags question: http://stackoverflow.com/q/26816203
tags question: http://stackoverflow.com/q/26721936
tags question: http://stackoverflow.com/q/26742442
tags question: http://stackoverflow.com/q/26817059
tags question: http://stackoverflow.com/q/26791070
tags question: http://stackoverflow.com/q/26771104
tags question: http://stackoverflow.com/q/26741866
tags question: http://stackoverflow.com/q/26798858
tags question: http://stackoverflow.com/q/26796396
tag name: java
tags question: http://stackoverflow.com/q/26698266
tags question: http://stackoverflow.com/q/26800164
tags question: http://stackoverflow.com/q/26732923
tags question: http://stackoverflow.com/q/26772715
tags question: http://stackoverflow.com/q/26707222
tags question: http://stackoverflow.com/q/26774109
tags question: http://stackoverflow.com/q/26730663
tags question: http://stackoverflow.com/q/26737270
tags question: http://stackoverflow.com/q/26715570
tags question: http://stackoverflow.com/q/26729554
tags question: http://stackoverflow.com/q/26795429
tags question: http://stackoverflow.com/q/26799064
tags question: http://stackoverflow.com/q/26766525
tags question: http://stackoverflow.com/q/26732973
tags question: http://stackoverflow.com/q/26785759
tags question: http://stackoverflow.com/q/26674544
tags question: http://stackoverflow.com/q/26826668
tags question: http://stackoverflow.com/q/26768947
tags question: http://stackoverflow.com/q/26743643
tags question: http://stackoverflow.com/q/26713270
tags question: http://stackoverflow.com/q/26700890
tags question: http://stackoverflow.com/q/26731417
type: Tag
tags question: http://stackoverflow.com/q/26769381
tags question: http://stackoverflow.com/q/26810180
tags question: http://stackoverflow.com/q/26735645
tags question: http://stackoverflow.com/q/26739630
tags question: http://stackoverflow.com/q/26745263
tags question: http://stackoverflow.com/q/26745708
tags question: http://stackoverflow.com/q/26734458
tags question: http://stackoverflow.com/q/26714912

http://stackoverflow.com/comment/42188446
type: Comment
has text: Well just look at the code one more time. You're essentially saying, "When the form is submitted, if it's valid, submit the form". Also if you have no further questions please consider marking it as solved :)
comment on: http://stackoverflow.com/a/26807727
type: AnswerComment
score: 0

http://stackoverflow.com/a/26749981
type: Answer
has comment: http://stackoverflow.com/comment/42156047
has comment: http://stackoverflow.com/comment/42156089
has comment: http://stackoverflow.com/comment/42153886
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
has body: Another version (assuming your definition of arr exists): arr = arr.filter(function(innerArr){ return !this[innerArr[1]] &amp;&amp; (this[innerArr[1]]=true) },{})
answers question: http://stackoverflow.com/q/26748964
has comment: http://stackoverflow.com/comment/42153981
accepted answer of: http://stackoverflow.com/q/26748964
has comment: http://stackoverflow.com/comment/42098949

http://stackoverflow.com/a/26706787
has comment: http://stackoverflow.com/comment/42006489
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42006398
has comment: http://stackoverflow.com/comment/42006367
has comment: http://stackoverflow.com/comment/42006583
has body: Function A should return a promise which when resolved you would call function B. You do not know how long function will take to resolve, therefore setTimeout() is not a good approach. You also do need a closure: var parents = data.hasil.parent.split("&gt;&gt;"); var jmlparent = parents.length; for (var i = jmlparent-2; i &gt;= 1; i--){ (function( i ) { add_parent().done(function() { $("#parent_"+(jmlparent-i)).val(parents[(i-1)]); }); })( i ); }
upvote count: 2
answers question: http://stackoverflow.com/q/26706714
type: Answer

http://stackoverflow.com/q/26777443
answer count: 1
tagged with: drop-down-menu
has comment: http://stackoverflow.com/comment/42135268
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/42134171
has body: I was trying to update my version of bootstrap from 3.1.0 to the currently latests 3.3.0. But I noticed after upgrading that my dropdown menu's aren't working anymore. For some reason the javascript doesn't pickup the elements with the .dropdown-toggle css class. But when I dive into the chrome javascript console and execute the following command: $('.dropdown-toggle').dropdown() I notice the dropdown menu's do work. I compared the html of the menu's before and after this command and it remained the same. I also looked in the release notes from bootstrap and could find any breaking changes regarding dropdown menus. This is a example piece of my code: Customers Overview Customer form Does anybody got a tip?
type: Question
has title: Bootstrap Dropdown doesn't work after upgrade
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26778133
downvote count: 0

http://stackoverflow.com/a/26685333
answers question: http://stackoverflow.com/q/26685255
score: 3
has comment: http://stackoverflow.com/comment/41993187
upvote count: 3
has comment: http://stackoverflow.com/comment/41992384
has comment: http://stackoverflow.com/comment/41972641
type: Answer
downvote count: 0
has body: I think you need another callback defined in the scope of Topic. Topic.find({} , function (err, resultList, callback) { The "callback" variable you're using inside Topic.find() references back to the one set on TopicStatistics.createTopicStatistics(). So when you enter Topic.find({} , function (err, resultList, mycallback); the "mycallback" disappears since JavaScript doesn't check parameter count.

http://stackoverflow.com/comment/42003972
has text: Yes, thanks! It was something like that I was looking for. But if I want to have a button that will start the setInterval, where do I place the setInterval? =)
type: AnswerComment
comment on: http://stackoverflow.com/a/26705445
score: 0
type: Comment

jsp
tags question: http://stackoverflow.com/q/26721936
tags question: http://stackoverflow.com/q/26832169
tags question: http://stackoverflow.com/q/26763046
tags question: http://stackoverflow.com/q/26794598
tags question: http://stackoverflow.com/q/26817059
tags question: http://stackoverflow.com/q/26798858
tags question: http://stackoverflow.com/q/26789873
tags question: http://stackoverflow.com/q/26730663
tags question: http://stackoverflow.com/q/26786774
tags question: http://stackoverflow.com/q/26729554
tags question: http://stackoverflow.com/q/26795429
tags question: http://stackoverflow.com/q/26796538
tags question: http://stackoverflow.com/q/26715653
tags question: http://stackoverflow.com/q/26713270
tags question: http://stackoverflow.com/q/26740301
type: Tag
tags question: http://stackoverflow.com/q/26751042
tags question: http://stackoverflow.com/q/26792065
tags question: http://stackoverflow.com/q/26688106
tags question: http://stackoverflow.com/q/26797649
tag name: jsp
tags question: http://stackoverflow.com/q/26782210
tags question: http://stackoverflow.com/q/26727527
tags question: http://stackoverflow.com/q/26687864
tags question: http://stackoverflow.com/q/26710530
tags question: http://stackoverflow.com/q/26698454
tags question: http://stackoverflow.com/q/26800164
tags question: http://stackoverflow.com/q/26816203

http://stackoverflow.com/a/26693476
has body: When using toggleClass(), it's possible to simplify it to $(document).on('click', '.tog:not(.selected)', function () { $('.tog').toggleClass('selected'); }); which toggles the class selected for both divs with the class tog. Fiddle As you mentioned you tried using on() without getting the wanted result and maybe having used it wrong, an explanation - events like click() can only be applied to elements actually being in the DOM when the page is loaded. To apply event handlers to elements that are added later or are e.g. the result of adding a class, event delegation can be used - a static parent element, e.g. $(document) - delegates the event to the dynamically added / adjusted element. For reference: https://api.jquery.com/on/#on-events-selector-data-handler, section "Direct and delegated events": "Event handlers are bound only to the currently selected elements; they must exist on the page at the time your code makes the call to .on()."
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/26693163
answers question: http://stackoverflow.com/q/26693163
type: AcceptedAnswer

http://stackoverflow.com/a/26746933
upvote count: 2
has comment: http://stackoverflow.com/comment/42090086
answers question: http://stackoverflow.com/q/26738827
has body: I think it is an overkill to test all the rows in the grid. I guess it would be sufficient to test that you get values for the first few rows and then, if you absolutely need to test all the elements, use an evaluate(). http://angular.github.io/protractor/#/api?view=ElementFinder.prototype.evaluate Unfortunately there is no code snippet in the api page, but it would look something like this: // Grab an element where you want to evaluate an angular expression element(by.css('grid-selector')).evaluate('rows').then(function(rows){ // This will give you the value of the rows scope variable bound to the element. expect(rows[169].name).toEqual('some name'); }); Let me know if it works.
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/26738827

http://stackoverflow.com/comment/42107406
has text: I would imagine with setViewBox http://raphaeljs.com/reference.html#Paper.setViewBox
score: 1
comment on: http://stackoverflow.com/q/26760797
type: Comment
type: QuestionComment

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

http://stackoverflow.com/a/26683798
type: Answer
downvote count: 1
upvote count: 0
has body: If the script in page-2 is executed to early the button might not exist yet. Try wrapping it in a document.ready $(document).ready(function(){ var function_in_page={init:function(){ alert('first-1'); $("#button-1").click(function(){ alert('second-1'); });}); });
score: -1
answers question: http://stackoverflow.com/q/26683137

http://stackoverflow.com/comment/42009974
has text: Declare content variable globally i.e. outside of the function
score: 0
comment on: http://stackoverflow.com/q/26708760
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26812356
type: AnsweredQuestion
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/42196982
tagged with: javascript
upvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/26812372
has body: I'm visiting a link to my Node app called http://localhost:5000/payment?issue=123456 In my node app i have a callback that is fired when this happens app.get('/payment', function(req, res){ res.render('payment', { user: req.user }); }); how do i get the issue number (123456) and assign it to a variable in the node app?
has title: retrieving var from URL
favorite count: 0
accepted answer: http://stackoverflow.com/a/26812372
score: -2
tagged with: node.js

http://stackoverflow.com/q/26811718
type: Question
has comment: http://stackoverflow.com/comment/42196271
tagged with: javascript
downvote count: 2
upvote count: 1
answer count: 1
favorite count: 0
tagged with: dry
has comment: http://stackoverflow.com/comment/42195815
type: UnansweredQuestion
has body: I have a fair amount of functions like the ones below, all with some slight changes and querying different ids. Is there some way to concatenate this or will I just have to write them all out? Thanks. function event() { var path = document.querySelector('#container #path'); var length = path.getTotalLength(); console.log(path.getTotalLength()); path.style.transition = path.style.WebkitTransition = 'none'; path.style.strokeDasharray = length + ' ' + length; path.style.strokeDashoffset = length; path.getBoundingClientRect(); path.style.transition = path.style.WebkitTransition = 'stroke-dashoffset 0.4s linear'; path.style.strokeDashoffset = '0'; document.getElementById("container").style.visibility = "visible"; }; function event2() { var path2 = document.querySelector('#container2 #path_2'); var length = path2.getTotalLength(); console.log(path2.getTotalLength()); path2.style.transition = path2.style.WebkitTransition = 'none'; path2.style.strokeDasharray = length + ' ' + length; path2.style.strokeDashoffset = length; path2.getBoundingClientRect(); path2.style.transition = path2.style.WebkitTransition = 'stroke-dashoffset 0.45s linear'; path2.style.strokeDashoffset = '0'; document.getElementById("container2").style.visibility = "visible"; }; function event3() { var path3 = document.querySelector('#container3 #path_3'); var length = path3.getTotalLength(); console.log(path3.getTotalLength()); path3.style.transition = path3.style.WebkitTransition = 'none'; path3.style.strokeDasharray = length + ' ' + length; path3.style.strokeDashoffset = length; path3.getBoundingClientRect(); path3.style.transition = path3.style.WebkitTransition = 'stroke-dashoffset 0.4s linear'; path3.style.strokeDashoffset = '0'; document.getElementById("container3").style.visibility = "visible"; }; window.setTimeout(function() { event(); }, 1); window.setTimeout(function() { event2(); }, 550); window.setTimeout(function() { event3(); }, 1100);
has comment: http://stackoverflow.com/comment/42195853
has answer: http://stackoverflow.com/a/26811888
has comment: http://stackoverflow.com/comment/42195928
has comment: http://stackoverflow.com/comment/42195901
has title: "DRY" javascript functions?
score: -1
has comment: http://stackoverflow.com/comment/42196003

http://stackoverflow.com/a/28340820
downvote count: 0
score: 3
upvote count: 3
has body: In the php file you can do all the mysql verifications needed. The submit can be something like this Submit Notice the return in the function call. The verification is returning false when validation fails. function submitForm() { if(validation) { // fails alert("your message"); return false; } }
answers question: http://stackoverflow.com/q/26771793
type: Answer

http://stackoverflow.com/q/26710635
answer count: 1
downvote count: 0
has body: Been having some issues with an ember.js+emberdata program I'm building. A basic version of it is included below. The issue is, every five seconds I poll for changes to a value (price) and i turn the value red or green based on whether the price has gone up or down. Please note that in the actual issue i am showing a css animation, not just a css color change. Every time I reload the model this resets this value. How would I make it so that, for instance, the red/green color persists for seven seconds rather than just five? So if there is a price change, I would show green for seven seconds and ignore any changes that are made during the time of that color change. Feel free to ask for more details I may have left out. Also any constructive notes on the implementation are appreciated. Sample program and setup details follow: Web app Side test_ember_code.js (function() { var App; App = Ember.Application.create({ LOG_TRANSITIONS: true, LOG_BINDINGS: true, LOG_VIEW_LOOKUPS: true, LOG_STACKTRACE_ON_DEPRECATION: true, LOG_VERSION: true, debugMode: true }); App.Router.map(function() { return this.resource("product"); }); App.IndexRoute = Ember.Route.extend({ redirect: function() { this.transitionTo("product"); } }); App.Product = DS.Model.extend({ price: DS.attr('number', { "default": 1 }), oldPrice: DS.attr('number', { "default": null }), storeOldPrice: function() { return this.set('oldPrice', this.get('price')); }, priceChanged: (function() { if (this.get('oldPrice') != null) { return this.get('price') !== this.get('oldPrice'); } else { return false; } }).property('price', 'oldPrice'), priceMovedUp: (function() { if (this.get('oldPrice') != null) { return this.get('price') > this.get('oldPrice'); } else { return false; } }).property('price', 'oldPrice'), priceFormatted: (function() { if (this.get('price')) { return this.get('price').toFixed(2); } }).property('price', 'oldPrice'), oldPriceFormatted: (function() { if (this.get('oldPrice')) { return this.get('oldPrice').toF…
favorite count: 0
type: UnansweredQuestion
tagged with: ember.js
tagged with: node.js
upvote count: 3
type: Question
score: 3
tagged with: ember-data
tagged with: javascript
has title: Persisting on screen indicators past a poll using ember data
has answer: http://stackoverflow.com/a/26767747

http://stackoverflow.com/a/26771577
has body: You don't seem to have any elements in your markup matching the selector #ass-1415241823647 .item_message" so it's unable to locate it.
score: 0
answers question: http://stackoverflow.com/q/26771550
type: Answer

http://stackoverflow.com/comment/42055780
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26734314
score: 0
has text: Thank you @Anzel. Silly mistake of mine. I have made the change. However the resulting json is not valid. I have updated the original question to show what the json looks like.

http://stackoverflow.com/a/26777158
type: Answer
answers question: http://stackoverflow.com/q/26776921
score: 2
downvote count: 0
has body: You need to stop the resubmission within the submit: change this: else { $("form#searchform").submit(); return true; } to: else { return true; } or just remove it altogether as the default (if you do not return anything) is also to continue the submit. You are already correctly returning false when the validation fails, so no need to use e.preventDefault(). return false does the same as both e.preventDefault() and e.stopPropagation(). i.e. this is correct: if (fieldError.length != 0) { return false; } although you can test for non-zero length with just this: if (fieldError.length) { return false; }
upvote count: 2

http://stackoverflow.com/q/26815649
type: Question
has comment: http://stackoverflow.com/comment/42202240
tagged with: javascript
tagged with: jquery
score: -1
has title: Changing element width from px to %
has answer: http://stackoverflow.com/a/26815664
answer count: 1
favorite count: 0
has body: As referred to in the title, I want change element width from px to % in jQuery. How should I do?
has comment: http://stackoverflow.com/comment/42202228
downvote count: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26815664
upvote count: 1

http://stackoverflow.com/comment/42154190
comment on: http://stackoverflow.com/a/26780667
type: AnswerComment
score: 0
type: Comment
has text: I guess you can just add ` `. here is example http://jsfiddle.net/wLkgyw7g/5/

http://stackoverflow.com/comment/42075368
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26743780
type: AnswerComment
has text: ok, so it works in a similar way as text box... thank you... :)

http://stackoverflow.com/comment/88148324
has text: Firefox on android still doesn't support it though.
type: Comment
comment on: http://stackoverflow.com/a/40377037
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42097659
type: Comment
comment on: http://stackoverflow.com/a/26733435
has text: Frozen UDTs are for small objects, if you can get it working with the json notation I included in my answer, you should use it (later you can use driver level udt). If you need large objects, you can use multiple columns or you should use a different column family for it.
type: AnswerComment
score: 0

http://stackoverflow.com/q/26767234
has comment: http://stackoverflow.com/comment/42209802
has title: Adding markers on a route in google maps api at a certain driving distance
favorite count: 0
has comment: http://stackoverflow.com/comment/42310107
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42209294
upvote count: 1
has comment: http://stackoverflow.com/comment/108935418
score: 1
type: Question
tagged with: google-maps
has body: I am trying to display a map to a desktop app that will have controls outside of the map that will populate certain parts of the html, and js. What i cannot figure out is once I have a route set up, get markers on the route which would be at a distance of say 500 mile from the start. Basically if you want to drive 500 miles where will you get. I do not want a radius from the start, but 500 miles on the route that was chosen. I have basically tried piecing together different solutions I have found online, but cannot get it to work. I know that 1000 is not going to = 500 miles, I am just trying to get anything to work. here is what I have: var side_bar_html = &quot;&quot;; var gmarkers = []; var map = null; var startLocation = null; var endLocation = null; var length; function initialize() { var center = new google.maps.LatLng(24.7756, 121.0062); map = new google.maps.Map(document.getElementById('map_canvas'), { center: center, zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP }); google.maps.event.addListener(map, 'click', function() { infowindow.close(); }); var directionsService = new google.maps.DirectionsService(); var request = { origin: &quot;%start%&quot;, destination: &quot;%end%&quot;, travelMode: google.maps.DirectionsTravelMode.DRIVING }; var polyline = new google.maps.Polyline({ path: [], strokeColor: 'green', strokeWeight: 3 }); directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { var bounds = new google.maps.LatLngBounds(); var route = response.routes[0]; var summaryPanel = document.getElementById(&quot;directions_panel&quot;); var detailsPanel = document.getElementById(&quot;direction_details&quot;); startLocation = new Object(); endLocation = new Object(); summaryPanel.innerHTML = &quot;&quot;; detailsPanel.innerHTML = '&lt;ul&gt;'; // For each route, display summary information. for (var i = 0; i &lt; route.legs.length; i++) { var routeSegment = i + 1; summaryPanel.innerHTML += &quot;&lt;b&gt…
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42116911
tagged with: google-maps-api-3

http://stackoverflow.com/q/26816977
tagged with: javascript
linked to: http://stackoverflow.com/q/9820176
score: 0
tagged with: canvas
has comment: http://stackoverflow.com/comment/42204662
has comment: http://stackoverflow.com/comment/42204455
has comment: http://stackoverflow.com/comment/42204579
has title: Performance impact of canvas size on browser rendering
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I need to draw a rather large diagram ('diagram' might be misleading, as it'll have loads of small text and colour boxes, but for lack of a better term, I'll leave it at that), with the x-axis many times longer than the width of the screen, and was wondering how to approach this to get the best performance. a) I draw a large canvas inside an smaller div, so that scrollbars appear. That way, only part of the canvas would be visible. If browsers are smart enough only to render the part of the canvas that is being displayed, that would be the easiest option. b) I draw a smaller canvas with custom scrollbars and rerender the contents of the canvas when the user scrolls. If my code is smart, I am sure I can save some rendering cycles. So I guess my question is: Are browsers smart enough to figure out that they have to render only the truly visible part of a canvas? Or am I better of to rerender the part of the canvas that is supposed to be visible?
has comment: http://stackoverflow.com/comment/42209028
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/42204503

http://stackoverflow.com/comment/42212486
type: AnswerComment
score: 0
type: Comment
has text: Thank you very much. It seems to work without the > as well like this $('.homeRed img')
comment on: http://stackoverflow.com/a/26821460

http://stackoverflow.com/a/43426335
score: 2
downvote count: 0
upvote count: 2
type: Answer
has body: I have the same issue. And I notice it's not compiling because my folder contains some character(*). And using the old watcher plugin seems to resolve the issue. Add this line to your webpack config file. plugins: [ new webpack.OldWatchingPlugin() ]
answers question: http://stackoverflow.com/q/26708205

http://stackoverflow.com/comment/42206949
score: 0
has text: $(selector).hide(speed,callback); see here this is an example first hide function will be executed on selector and after hide function is compeltes(spee is parameter of hide) call function is called. Try using this. As i am online from mobile i am not able to parse your code. Please try my example and try to implement
type: AnswerComment
comment on: http://stackoverflow.com/a/26818083
type: Comment

http://stackoverflow.com/comment/42224239
type: Comment
comment on: http://stackoverflow.com/a/26826045
type: AnswerComment
has text: i have edited my code but still not working...the datepicker can't be display
score: 0

http://stackoverflow.com/q/26674984
has answer: http://stackoverflow.com/a/26675183
linked to: http://stackoverflow.com/q/7223717
has comment: http://stackoverflow.com/comment/41949387
upvote count: 1
has comment: http://stackoverflow.com/comment/41949287
possible better answer: http://stackoverflow.com/a/26675141
has title: Sorting an array that contains both positive and negative zero
has answer: http://stackoverflow.com/a/26675141
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41949404
score: 1
accepted answer: http://stackoverflow.com/a/26675183
has comment: http://stackoverflow.com/comment/41950310
has comment: http://stackoverflow.com/comment/41949243
type: Question
has comment: http://stackoverflow.com/comment/41949440
has comment: http://stackoverflow.com/comment/41949469
has answer: http://stackoverflow.com/a/26675127
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: sorting
favorite count: 0
has body: I have an array of objects example var objects = [ { first_nom: 'dave', value: '5'}, { first_nom: 'roger', value: '-0'}, { first_nom: 'pete', value: '+0' }, { first_nom: 'pete', value: '-5' }, ]; Sorting this by value would ideally reverse the two zeros. I have tried the normal javascript/jquery and underscore sorts but they ignore the leading - or + and probably rightly so. This is what I currently have (this sorts fine but ignores the + and -): var chartData = _.sortBy(objects, 'value').reverse(); Is there anything else someone can recommend please? Many thanks Nev
answer count: 3

http://stackoverflow.com/a/26820306
has comment: http://stackoverflow.com/comment/42213030
type: Answer
has comment: http://stackoverflow.com/comment/42210446
has body: First create a dictionary of cars to store references of records per car. var carsDict = {}; angular.forEach(recordlist, function(record) { carsDict[record.car] = carsDict[record.car] || []; carsDict[record.car].push(record); }); Then you can make all calculations for each car.
score: 3
accepted answer of: http://stackoverflow.com/q/26820178
answers question: http://stackoverflow.com/q/26820178
upvote count: 3
has comment: http://stackoverflow.com/comment/42210224
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26828061
has title: How to validate list of input tag using bootstrap validator
tagged with: spring
type: Question
upvote count: 1
tagged with: validation
tagged with: javascript
tagged with: jquery
favorite count: 0
score: 0
answer count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/32775933
tagged with: twitter-bootstrap
type: UnansweredQuestion
has body: How to validate list of input tag using bootstrap validator I am using spring, jquery and bootstrap Here is my html : &lt;form id="myForm" class="form-horizontal" method="post" action="/hello"&gt; &lt;input class="form-control" type="text" name="myobject[0].descripton /&gt; &lt;input class="form-control" type="text" name="myobject[1].descripton /&gt; &lt;input class="form-control" type="text" name="myobject[2].descripton /&gt; &lt;input class="form-control" type="text" name="myobject[3].descripton /&gt; &lt;/form&gt; Here is my validator : $('#myForm').bootstrapValidator({ feedbackIcons : { valid : glyphicon glyphicon-ok, invalid : glyphicon glyhicon-remove validating : glyphicon glyphicon-refresh }, fields : { myobject[].description : { // &lt;---name of tag. validators : { notEmpty : { message : 'this is required' } } } } });

http://stackoverflow.com/q/26798474
has comment: http://stackoverflow.com/comment/42171161
linked to: http://stackoverflow.com/q/14220321
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42171225
type: Question
has title: Javascript error retrieve data from JSON object
tagged with: javascript
has body: In my project i create an object when an input text blur like this: inputT1.onblur = function(){ var pDomain = this.value; if (pDomain.substring(0,4) === "http") { var getLocation = function(href) { var l = document.createElement("a"); l.href = href; return l; }; var l = getLocation(pDomain); pDomain = l.hostname; } responseT = $.get( "neuroscan/php/trial500.php", { P1: 'dominio', P2: pDomain } ); console.log("Status: "+responseT.responseText); } Console respond Status: undefined and if i write: console.log("Status: "+JSON.parse(responseT.responseText)); return an error. The object responseT was create (as you can see from the picture) and responseText have a value, but I can't isolate it into a variable Any idea? Thanks in advance
has comment: http://stackoverflow.com/comment/42171020
score: 0
accepted answer: http://stackoverflow.com/a/26798582
answer count: 1
has comment: http://stackoverflow.com/comment/42171257
has answer: http://stackoverflow.com/a/26798582

http://stackoverflow.com/a/26821706
has body: -To positon text message beside input text field. You have to use the Jquery .css() method. -The .position() method allows us to retrieve the current position of an element relative to the offset parent. Contrast this with .offset(), which retrieves the current position relative to the document. You have to use the right method which helps you. Jquery .text(string) method helps to display text on the matched selector but not for positioning it. $(element).css({ "left" :position.left ,"top" :position.top });
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26821298
answers question: http://stackoverflow.com/q/26821298

http://stackoverflow.com/comment/41985227
score: 0
type: Comment
type: QuestionComment
has text: Not annoyed. Trying to learn and understand what tools JavaScript and Node give me to use. You mention DI off the cuff, which meant nothing to me until I Googled it and it started to make me understand a few things. Its is these working models in JavaScript that I am asking to understand.
comment on: http://stackoverflow.com/q/26694961

http://stackoverflow.com/comment/41969850
has text: I'd upvote if you didn't have an assignment and 2 order-dependent checks inside a `while()`. That's "time bomb" coding.
type: Comment
comment on: http://stackoverflow.com/a/26685971
score: 1
type: AnswerComment

three.js
tags question: http://stackoverflow.com/q/26723575
tags question: http://stackoverflow.com/q/26808970
tag name: three.js
tags question: http://stackoverflow.com/q/26763273
tags question: http://stackoverflow.com/q/26768123
tags question: http://stackoverflow.com/q/26740803
tags question: http://stackoverflow.com/q/26756624
tags question: http://stackoverflow.com/q/26791583
tags question: http://stackoverflow.com/q/26727379
tags question: http://stackoverflow.com/q/26682072
tags question: http://stackoverflow.com/q/26800922
tags question: http://stackoverflow.com/q/26741499
tags question: http://stackoverflow.com/q/26813209
tags question: http://stackoverflow.com/q/26721507
tags question: http://stackoverflow.com/q/26759963
tags question: http://stackoverflow.com/q/26816147
type: Tag
tags question: http://stackoverflow.com/q/26734816
tags question: http://stackoverflow.com/q/26788573
tags question: http://stackoverflow.com/q/26829975
tags question: http://stackoverflow.com/q/26693300
tags question: http://stackoverflow.com/q/26723170
tags question: http://stackoverflow.com/q/26800353
tags question: http://stackoverflow.com/q/26724715
tags question: http://stackoverflow.com/q/26747759
tags question: http://stackoverflow.com/q/26821965
tags question: http://stackoverflow.com/q/26747846
tags question: http://stackoverflow.com/q/26771715
tags question: http://stackoverflow.com/q/26756485
tags question: http://stackoverflow.com/q/26803340

http://stackoverflow.com/comment/42185390
type: Comment
type: QuestionComment
has text: In Chrome, inspect the bold element. Then open the "Computed" tab and search for font-weight. See where it is inherited from by clicking the triaggle on its left side. Inspector will tell you whether the style comes from CSS or it is, for example, inherited from a `strong` or `h1` parent tag.
score: 0
comment on: http://stackoverflow.com/q/26804403

http://stackoverflow.com/comment/42111607
has text: @Scimonster he did not ask for someone to write the code for him- although I'm guessing he would like that.
score: 0
comment on: http://stackoverflow.com/q/26765277
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26712431
type: Question
has comment: http://stackoverflow.com/comment/42016235
has answer: http://stackoverflow.com/a/26712665
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42016422
tagged with: css
linked to: http://stackoverflow.com/q/10927481
has answer: http://stackoverflow.com/a/26712996
has comment: http://stackoverflow.com/comment/42016009
answer count: 3
has comment: http://stackoverflow.com/comment/42016002
downvote count: 1
has comment: http://stackoverflow.com/comment/42016257
has comment: http://stackoverflow.com/comment/42016187
has comment: http://stackoverflow.com/comment/42016074
has comment: http://stackoverflow.com/comment/42016119
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42015961
upvote count: 4
score: 3
has title: How to read ACTUAL CSS rule for border radius
has comment: http://stackoverflow.com/comment/42016329
tagged with: jquery
has answer: http://stackoverflow.com/a/26712539
favorite count: 0
has body: I am wrapping an auto-generated div around an image, and I need to apply some styling from the image to the div. How can I read/get the CSS rule for border-radius that is affecting the image? For example, if the CSS is setting the border-radius to 30px, it should return "30px", and if it's 50%, it should return "50%" - I want the actual rule, not just a pixel value

http://stackoverflow.com/comment/42093146
type: Comment
has text: Yes. Use square bracket notation.
type: AnswerComment
comment on: http://stackoverflow.com/a/26755360
score: 0

http://stackoverflow.com/comment/42195994
comment on: http://stackoverflow.com/q/26811825
has text: What do you want to pop up? What content?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41961158
has text: Yes, at least the "var a;" statement was declaring a local variable (a variable with function scope) instead of a global variable.
type: AnswerComment
comment on: http://stackoverflow.com/a/26675459
type: Comment
score: 0

http://stackoverflow.com/comment/42003203
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26702676
score: 0
has text: We can model this problem with DFA(Deterministic finite automate)

graphics
tag name: graphics
tags question: http://stackoverflow.com/q/26800118
type: Tag
tags question: http://stackoverflow.com/q/26756618
tags question: http://stackoverflow.com/q/26742902

http://stackoverflow.com/q/26798735
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26799530
score: 0
has title: Load youtube page via YQL with authentication
tagged with: yql
answer count: 1
has body: Since you can't iframe youtube, I'd like to display this page: https://www.youtube.com/comments (this page shows all the comments) The YT API only allows me to request video-specific comments. I'm already logged in on youtube, so how can I request that page WITH my authentication cookie/details via the YQL framework? https://developer.yahoo.com/yql/ select * from html where url="https://www.youtube.com/comments" It returns: { "query": { "count": 0, "created": "2014-11-07T10:05:17Z", "lang": "nl-NL", "results": null } }
accepted answer: http://stackoverflow.com/a/26799530
tagged with: youtube
type: AnsweredQuestion
tagged with: authentication

http://stackoverflow.com/comment/42022165
score: 4
has text: Assuming you should ever do this - which you should not, you should use an object with named properties as your argument(s) - you can use 'null' for the spaceholders.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26715941

http://stackoverflow.com/q/26772564
tagged with: jquery
has body: I have jquery datepicker which gives the events list when selected date through ajax call from database.. when i click on the date the result is getting displayed too late after 15 seconds...can any 1 suggest me what to do to get the result on clicked fastly:- var x = ''; $('#calendar').datepicker({ altField: '#datepicker_send', inline: true, firstDay: 1, showOtherMonths: true, altFormat: "yy/mm/dd", dateFormat: "yy/mm/dd", dayNamesMin: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], onSelect: function (dateText) { $('#event-date').text(dateText) x = dateText; //alert(x); $.ajax({ type: "GET", url: 'check_events.php', data: 'y=' + x, success: function (data) { $('#event-date1').html(data); //Alert Data on success not result. // alert(data); } }); } }); Check_events.php:-`` &lt;? php if (isset($_GET['y'])) { $y = $_REQUEST['y']; $sql_check = mysql_query("SELECT * FROM events WHERE date='$y'"); $res = mysql_num_rows($sql_check); if ($res == 0) { echo '&lt;div class="evnt_name"&gt;&lt;a href="#"&gt;No Events For Today &lt;a/&gt; &lt;/div&gt;'; } else { while ($rec = mysql_fetch_assoc($sql_check)) { ?&gt; &lt; div &gt; Some Result &lt; /div&gt; &lt;?php } } } exit; ?&gt;
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42125840
has answer: http://stackoverflow.com/a/26773498
has comment: http://stackoverflow.com/comment/42125701
has comment: http://stackoverflow.com/comment/42125848
downvote count: 1
type: Question
has title: Ajax Call too late... Giving result after 15 seconds
has comment: http://stackoverflow.com/comment/42125030
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/42124863
has comment: http://stackoverflow.com/comment/42125628
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42125893

http://stackoverflow.com/q/26745635
tagged with: javascript
answer count: 2
tagged with: multi-device-hybrid-apps
has body: I've installed the visual studio extension Multi-device hybrid, all is fine except when I run a new project with any of the the Cordova plugins enabled e.g. battery-status. I'm getting the error message below. But if I remove or disabled all the plugins it is working ok. Is anyone had an idea about the error dumps below or had experienced the same problem before? Thanks. Error Message Failed to fetch package information for org.apache.cordova.battery-status C:\Mobile\CordovaApp\CordovaApp\EXEC 1 1 CordovaApp Visual Studio Output ------ Adding plugin: org.apache.cordova.battery-status 1&gt; Calling plugman.fetch on plugin "org.apache.cordova.battery-status" 1&gt; 1&gt; C:\Users\myuser\AppData\Roaming\npm\node_modules\vs-mda\node_modules\q\q.js:126 1&gt; throw e; 1&gt; ^ 1&gt;EXEC : error : Failed to fetch package information for org.apache.cordova.battery-status 1&gt; at C:\Users\myuser\AppData\Roaming\npm\node_modules\vs-mda\node_modules\cordova\node_modules\cordova-lib\src\plugman\registry\registry.js:32:20 1&gt; at Request.cb [as _callback] (C:\Users\myuser\AppData\Roaming\npm\node_modules\vs-mda\node_modules\cordova\node_modules\cordova-lib\src\plugman\registry\registry.js:251:9) 1&gt; at self.callback (C:\Users\myuser\AppData\Roaming\npm\node_modules\vs-mda\node_modules\cordova\node_modules\cordova-lib\node_modules\request\index.js:148:22) 1&gt; at Request.emit (events.js:117:20) 1&gt; at ClientRequest.self.clientErrorHandler (C:\Users\myuser\AppData\Roaming\npm\node_modules\vs-mda\node_modules\cordova\node_modules\cordova-lib\node_modules\request\index.js:257:10) 1&gt; at ClientRequest.emit (events.js:95:17) 1&gt; at Socket.socketErrorListener (http.js:1551:9) 1&gt; at Socket.emit (events.js:95:17) 1&gt; at net.js:440:14 1&gt; at process._tickCallback (node.js:419:13) 1&gt;C:\Users\myuser\AppData\Roaming\npm\node_modules\vs-mda-targets\Microsoft.MDA.targets(99,5): error MSB3073: The command ""C:\Users\myuser\AppData\Roaming\npm\node_modules\vs-mda\vs-cli" build…
downvote count: 0
favorite count: 0
tagged with: cordova
type: UnansweredQuestion
tagged with: android
linked to: http://stackoverflow.com/q/26315626
tagged with: node.js
has title: Visual Studio Multi-device hybrid failed to fetch package information error
has answer: http://stackoverflow.com/a/26749745
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26780539

http://stackoverflow.com/comment/42113491
has text: Don't think so... I'm trying to prevent the ng-click from firing at the first place...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26764879

http://stackoverflow.com/comment/42156570
has text: Also, is there a way to keep the keyup functionality to keep validating in real-time, but not have the form process until you actually hit submit? Currently, the form submits as soon as correct information is placed into the input boxes. As well, when you first focus on any of the fields, the errors come up, which should only happen if the form is first submitted with out any info in the respective input boxes.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26788611
score: 0

http://stackoverflow.com/comment/42213942
score: 0
type: Comment
has text: Yeah I just removed `appendHtml` and added this `itemViewContainer: '.the-players',` thanks man it worked good and seemed to have rendered much faster. Bonus YES lol
comment on: http://stackoverflow.com/a/26811307
type: AnswerComment

http://stackoverflow.com/a/26787365
answers question: http://stackoverflow.com/q/26786045
has comment: http://stackoverflow.com/comment/42218762
score: 0
has body: As answered by Joseph.. it is the way to do it in Jquery. But that suggested solution replaces one pattern at a time, which means you will have to click the button again to replace the other string with same pattern(if you have one). Its like: (Using Joseph's code to demonstrate) Replace example Hello, my last name is {{ name }}. Also my father's last name is {{ name }}. Replace All you got to do is search them globally which can be done by passing global flag that is /g. So the Jquery becomes: var newText = currentText.replace(/{{ name }}/g, name) Everything is same as Joseph's just a little modified.
type: Answer
has comment: http://stackoverflow.com/comment/42213600

http://stackoverflow.com/comment/42180686
has text: tank you!, yes you got the question.I meant how to filter it
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26803696

http://stackoverflow.com/q/26829346
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26829425
accepted answer: http://stackoverflow.com/a/26829366
has body: say I have a variable holding the name of another variable var foo='varname' I want to get the value of varname If varname was global I could do window[foo], but varname isn't global. If this was a personal project I would do eval(foo) without looking back, but in a professional environment eval is always frowned upon, so I am trying to gather first all the available options and see if it can be avoided. The only alternative I can think of is Function('return '+ foo)() but this feels very much like eval. I think the answer is no, but is there any way to refer to a variable that is not a property of an object that is not global using square notation or similar "safe" methods? Thank you -- more context -- Variables are set in a main function. conditions to be evaluated are from a json file. In the main, after getting the json, conditions are evaluated. if conditions are met something happens. conditions are in a json format, like {cond1:{varname:'somevalue'}}. I would like to test for varname==='somevalue'
tagged with: eval
has comment: http://stackoverflow.com/comment/42225961
has answer: http://stackoverflow.com/a/26829366
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/26829425
has comment: http://stackoverflow.com/comment/42226011
tagged with: javascript
has title: access variable by literal variable name (except with eval and likes)
answer count: 2

http://stackoverflow.com/a/26693069
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26693020
downvote count: 0
score: 1
has body: No, you'll have to do it in two steps, like this: var master = { one: 'this is text', two: { child: '#mydiv' } }; master.two.child_two = master.two.child; alert(JSON.stringify(master, null, 4)); Or alternatively, you could define a variable ahead of time for the identical value, like so: var myDivSelector = '#mydiv'; var master = { one: 'this is text', two: { child: myDivSelector, child_two: myDivSelector } };

http://stackoverflow.com/q/26694692
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41984812
has answer: http://stackoverflow.com/a/31521285
has comment: http://stackoverflow.com/comment/41984690
answer count: 3
favorite count: 0
has answer: http://stackoverflow.com/a/27269227
has comment: http://stackoverflow.com/comment/41984801
type: UnansweredQuestion
tagged with: ruby-on-rails
has title: Joyride Javascript tutorial not working on page load
has body: EDIT. After trying a lot of different solutions I figured out that when I added *= require joyride To my application.css.scss file it caused the javascript to break (not sure if this is true or not:( I tested it in the console on chrome again and when I ran $("#tutorial").joyride({}); once nothing showed up but if I ran it twice then it would work. So my application.js file now looks like: $(document).ready( function(){ $("#tutorial").joyride({}); $("#tutorial").joyride({}); }); It only renders the tutorial box once then when you click next step it breaks again.. ORIGINAL POST. I'm using ZURBS joyride plugin in my rails app to create an on boarding tutorial. http://zurb.com/playground/jquery-joyride-feature-tour-plugin I've gotten the javascript to work in console using chrome inspector but it's not working on page load. Any ideas on how to fix this? Application.js file //= require jquery //= require jquery.turbolinks //= require jquery_ujs //= require bootstrap //= require turbolinks //= require d3 //= require jquery.joyride //= require modernizr.mq.js //= require jquery.cookie.js //= require_tree . $(document).ready(function(){ $("#tutorial").joyride({}); }); This is what I'm using in my index.html.erb file Tip content... Tip content 2 This shows the code in the index that corresponds with the data-id Welcome to WeWrite. Write stories together. <% @lines.each do |line| %> <%= line.depth %> <%= link_to "#{line.text}...", line_path(line), :class => "story-link" %> <% end %> ADDED THIS TO MY application.js file to see if the script was loading and it is $(document).ready( function(){ fireWhenReady(); }); function fireWhenReady() { if(typeof $("#tutorial").joyride == "function") { $("#tutorial").joyride({}); console.log("joyride"); } else { setTimeout(fireWhenReady, 100); } }
score: 1
upvote count: 1
type: Question
downvote count: 0
has answer: http://stackoverflow.com/a/26694823

http://stackoverflow.com/q/26784639
favorite count: 0
tagged with: backbone.js
has answer: http://stackoverflow.com/a/26784922
accepted answer: http://stackoverflow.com/a/26787353
linked to: http://stackoverflow.com/q/26774669
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26784922
score: 1
upvote count: 1
has title: Backbone Collection get Object - Part 2
type: Question
has body: I asked this question earlier and need some more help. The question: Backbone Collection get Object. My problem is that the answer only gives me back the first object in the array. How would i get back all of them. Pretty much, how would I take: { "id" : "section-one", "href" : "section-one-baseball", "divisions" : [ { "name": "Orioles", "division" : "AL East" } ] } Which I then got help being able to get the name from the divisions like this: BaseballTeams.models[0].get("divisions.name") Now what I need to do is be able to take multiple names from something like this: { "id" : "section-one", "href" : "section-one-baseball", "divisions" : [ { "name": "Orioles", "division" : "AL East" }, { "name": "Yankees", "division": "AL East" ] } So instead of getting just the first one, I need to be able to get all of them from the divisions. I am getting the results using underscore _.each to retrieve them. Thank you in advance for your help
tagged with: javascript
has answer: http://stackoverflow.com/a/26787353
answer count: 2
downvote count: 0

http://stackoverflow.com/comment/53262135
score: 0
type: AnswerComment
has text: tried this, but the sound still jumps to start on any seek (in 2.0) or pos (in 1.x) calls, does this actually work?
comment on: http://stackoverflow.com/a/26802641
type: Comment

http://stackoverflow.com/q/26804730
has comment: http://stackoverflow.com/comment/42183113
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/42183441
has comment: http://stackoverflow.com/comment/42183132
answer count: 1
has comment: http://stackoverflow.com/comment/42182886
has comment: http://stackoverflow.com/comment/42182971
has title: How to run "success" function in MVC4 Jquery Ajax request?
tagged with: asp.net-mvc-4
type: AnsweredQuestion
has body: I am making a simple MVC4 application with C# and jQuery. In this application, when the user presses a button with the id of SaveCheckboxChanges I send two arrays of data to the server. Then the server processes the data and saves it on the DB. While this is happening, I want the pressed button to change. Currently, when the user clicks the button, the buttons text changes to 'Saving changes' which is good, but then it never changes back. This happens because the success function that I send in the Ajax request is never being called, only the error function is called even though no errors happen and I get the OK answer. Controller that receives the request: [HttpPost] public ActionResult UpdateCheckBoxes(int[] requiresSetupArray, int[] disabledArray) { //Do operations with the requiresSetupArray and disabledArray Arrays DB.SaveChanges(); return Content("OK"); } At first i assumed this was happening because the UpdateCheckBoxes method was void and was not returning anything. But now that I changed it to what is above, only the error function is called. Javascript code being executed: $("#SaveCheckboxChanges").click(function (event) { var button = $("#SaveCheckboxChanges"); if (!button.hasClass("disabled")) { button.attr('value', 'Saving changes'); var requiresSetupArray = [1, 2]; var disabledArray = [3, 4]; $.ajax({ url: '/Material/UpdateCheckBoxes', type: 'POST', contentType: 'application/json; charset=utf-8', dataType: 'json', traditional: true, data: JSON.stringify({ requiresSetupArray: requiresSetupArray, disabledArray: disabledArray }), success: function (data) { alert("success " + data); button.attr('value', 'Save Checkbox Changes'); button.addClass('disabled'); }, error: function () { alert("error"); } }); How do I fix this? Am I forced to return something in the controller's method for the success function to run? If so what should I run?
type: Question
linked to: http://stackoverflow.com/q/2722750
tagged with: c#
has answer: http://stackoverflow.com/a/26805133
accepted answer: http://stackoverflow.com/a/26805133
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26831504
score: 5
type: AcceptedAnswer
upvote count: 5
type: Answer
has body: Yes, really there is no child() method in jQuery. You may use find() or children() for that. $(this).children("i.fa").removeClass("fa-square-o");
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26831489
answers question: http://stackoverflow.com/q/26831489

http://stackoverflow.com/q/26779257
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26779490
has answer: http://stackoverflow.com/a/26779427
has title: Change certain video source on click
score: 1
linked to: http://stackoverflow.com/q/18703519
possible better answer: http://stackoverflow.com/a/26779427
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/26779430
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26779490
tagged with: http://stackoverflow.com/tag/html
has body: I'am wondering how I could go about changing only one of the following two sources to webm and the other to .mp4 in my video tag: HTML: Your browser doesn't support the video element. JQuery: var bvideo = document.getElementById('background'); $("#car").on('click', function(){ bvideo.pause(); showPlaceHolder(); showVID(); $("#video").attr("src","fragmenten/real_schade2.mp4"); $('#video').attr("autoplay", "autoplay"); }); This only inserts a source into the tag directly, how can I change the two sources I've given with the video tag to change to .mp4 and .webm and not change both sources to one source / insert a video src into the tag
tagged with: video
type: AnsweredQuestion

http://stackoverflow.com/a/26777184
upvote count: 10
type: Answer
has comment: http://stackoverflow.com/comment/42132811
accepted answer of: http://stackoverflow.com/q/26734512
answers question: http://stackoverflow.com/q/26734512
has comment: http://stackoverflow.com/comment/42132882
has comment: http://stackoverflow.com/comment/48170156
has body: try with moveend event. (see https://openlayers.org/en/latest/apidoc/module-ol_MapEvent-MapEvent.html#event:moveend).
score: 9
type: AcceptedAnswer
downvote count: 1

http://stackoverflow.com/a/26778009
has comment: http://stackoverflow.com/comment/42134106
has body: The inner function is the return value of multiplier. It doesn't get called until console.log(twice(5)); where it is explicitly passed the value 5.
upvote count: 1
has comment: http://stackoverflow.com/comment/42134168
has comment: http://stackoverflow.com/comment/42134121
type: Answer
answers question: http://stackoverflow.com/q/26777982
downvote count: 0
score: 1

http://stackoverflow.com/a/26691384
upvote count: 1
has body: Let's work through it with an example: // assume `this` = ["a", "b", "c"] // assume i = 0 and j = 2 var tmp = this[i]; // tmp: "a" // this: ["a", "b", "c"] this[i] = this[j]; // tmp: "a" // this: ["c", "b", "c"] this[j] = tmp; // tmp: "a" // this: ["c", "b", "a"] Notice that step two is [c,b,c] and the [a] is totally gone. This is why we save it to tmp, so that we can put it back in step three.
accepted answer of: http://stackoverflow.com/q/26691296
answers question: http://stackoverflow.com/q/26691296
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/42138560
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26779848
has text: Actually `box` will ever be true :) its just hidden and not removed so its not nessesary to use it in your if statements :)

http://stackoverflow.com/comment/42056865
type: Comment
has text: Hi this is great thanks, it is returning what we want, however it is not populating the select box. Having put a few consoles around to see what is happening, it appears that arr is not in the scope of .editable functionality which is strange. I'm not quite sure what it is doing but adding a console in the source function doesn't return anything until I click the element, then returns undefined. Adding a console above or below the .editable functionality returns what we expect The PID in popSelectBox function is indexedDB functionality that we have, it acts like a where statement in sql
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26726064

http://stackoverflow.com/a/26820245
has body: Title This example uses the addEventListener() method to attach a click event to the document. Testbutton inside a polymer element you can bind directly to a function by using on-tap="{{function}}" attribute. edited: all code didn't get into block keeping eventlisteners in the js method Title This example uses the addEventListener() method to attach a click event to the document. Testbutton edited again: OP wanted to keep html separate from JS edited 1 more time: i think using a anonymous function is the easiest way to go here if not using the declarative method. code edited
has comment: http://stackoverflow.com/comment/42211591
answers question: http://stackoverflow.com/q/26820016
upvote count: 5
has comment: http://stackoverflow.com/comment/42213642
score: 5
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42213791
has comment: http://stackoverflow.com/comment/42211558
has comment: http://stackoverflow.com/comment/42210556
has comment: http://stackoverflow.com/comment/42213483
type: Answer
accepted answer of: http://stackoverflow.com/q/26820016

http://stackoverflow.com/comment/42126981
type: QuestionComment
has text: the correct search term is `caret`
comment on: http://stackoverflow.com/q/26773658
score: 0
type: Comment

http://stackoverflow.com/q/26828918
favorite count: 0
has title: gmap api v3 infowindow html string content not showing
score: -1
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I've a problem with pushing array html content into an infowindow: I whant to try to append a html string for each marker that i customize via javascript into the Map, the code work with a native infowindow, but when i try to append html the infowindow is empty. Here the code: function initialize(markerPlaces) { (function(window, google, maplib){ var mapOptions = maplib.MAP_OPTIONS, domElement = document.getElementById('map'), //map declaration map = new google.maps.Map(domElement, mapOptions); console.log(markerPlaces); var contentStringOpen = '&lt;div class="modul1 modalWindow"&gt;'; var contentStringMiddle = '&lt;span class="modul1_txt"&gt;'; var contentStringClose = '&lt;/span&gt;&lt;/div&gt;'; var infowindow = new google.maps.InfoWindow(); var contArray = new Array(); for(i=0;i&lt;markerPlaces[0].posts.length;i++){ var thumb = markerPlaces[0].posts[i].thumb; var title = markerPlaces[0].posts[i].title; contArray.push('' + '&lt;div id="' + markerPlaces[0].posts[i].postId + '" class="modul1 modalWindow"&gt;' + markerPlaces[0].posts[i].thumb + '&lt;span class="modul1_txt"&gt;' + markerPlaces[0].posts[i].title + '&lt;/span&gt;&lt;/div&gt;'); markers = new google.maps.Marker({ position: { lat: Number(markerPlaces[0].posts[i].lat), lng: Number(markerPlaces[0].posts[i].long) }, map: map, icon: 'http://tovisit.today/wp-content/themes/turisti/img/poi.png', title: markerPlaces[0].posts[i].title }) console.log(contArray[i]); google.maps.event.addListener(markers, 'click', (function(markers, i) { return function() { //switch this for htmlContent //infowindow.setContent(contArray[i]); //this work infowindow.setContent(contentStringMiddle + markerPlaces[0].posts[i].title + contentStringClose + markerPlaces[0].posts[i].thumb); infowindow.open(map, markers); $() } })(markers, i)); } }(window, google, window.maplib || (window.maplib = {}))); } The content string is correct: but when i ispect the dom the div.modalWindow, and his content, missing anyone has the same trouble?
downvote count: 2
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26841241
tagged with: javascript
tagged with: google-maps
answer count: 1

http://stackoverflow.com/a/26768130
has body: Looking at the source there seems to be a method indexes which returna a list of the keys.
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26767942

http://stackoverflow.com/comment/41968885
type: QuestionComment
comment on: http://stackoverflow.com/q/26685241
score: 0
has text: I am ready to pay for a service. I want instant access if you know of any. THanks.
type: Comment

http://stackoverflow.com/comment/42020028
has text: @amy div height auto not working
comment on: http://stackoverflow.com/q/26714796
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26772107
tagged with: asp.net
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/26772145
has answer: http://stackoverflow.com/a/26772387
has comment: http://stackoverflow.com/comment/42124155
linked to: http://stackoverflow.com/q/196859
has comment: http://stackoverflow.com/comment/42124521
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42124326
has title: Vaidation in POpup Window is not working properly
possible better answer: http://stackoverflow.com/a/26773616
has answer: http://stackoverflow.com/a/26773616
type: Question
accepted answer: http://stackoverflow.com/a/26772145
has body: I am having an issue in validating popup screen in my project.I am using validation group to validate the controls in popup .Our project standard is showing Red Foreground for controls which are not filled.Its worked in Normal screens but it is not working in popups ( ForeColor color Red )? Is any way to solve this? CLICKING ON 'btnExportLE ' button in same window the popup div will show. <asp:Button ID="btnExportLE" runat="server" class="btnNew" Text="Export LE" OnClientClick="returnShowExpPopup();" /> CSS .popups { position: absolute;width: 550px; height: 430px;border-width: 0px;top: 240px;margin-left: 273px; background: #FFF;border-radius: 5px;box-shadow: 6px 6px 7px #4d4d4d;z-index: 10000100; border: 1px solid #CCCCCC; } JS Function function ShowExpPopup() { document.getElementById('<%= dvExpPopUp.ClientID %>').style.display = "block"; document.getElementById("divBG").style.display = "block"; return false; } <asp:Label ID="Label1" runat="server" Text="Export LE" Font-Bold="true"></asp:Label> <asp:LinkButton ID="lnkClose1" CssClass="lnkcancel" runat="server" ForeColor="Red" OnClientClick="Clear();closeInfo();" Text=" X "></asp:LinkButton> <asp:Label ID="lblMandantCode" runat="server" Text="Mandant Code"></asp:Label> <asp:TextBox ID="txtMandantCode" runat="server" class="txtBox" Width="200px" TextMode="SingleLine" MaxLength="3"></asp:TextBox> <asp:RequiredFieldValidator ID="RVMandantCode" runat="server" ErrorMessage="*" ControlToValidate="txtMandantCode" ForeColor="Red" ValidationGroup="V2"></asp:RequiredFieldValidator> <asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server"> </asp:ToolkitScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <asp:Button ID="btnExport" runat="server" ValidationGroup="V2" Style="margin-bottom: 0px" Text="Export" class="btnNew" OnClick="btnExport_Click" /> <asp:Button ID="btnExpClose" runat="server" Text="Close" class="btnNew" OnClientClick="Clear();closeInfo();" OnClick="btnExpClose_C…
tagged with: javascript
answer count: 3
downvote count: 0

http://stackoverflow.com/q/26750955
has comment: http://stackoverflow.com/comment/42088326
upvote count: 1
accepted answer: http://stackoverflow.com/a/26753938
favorite count: 0
has answer: http://stackoverflow.com/a/26753938
type: AnsweredQuestion
tagged with: if-statement
score: 1
has body: I am trying to show a marker on Google Maps. In Google Maps API I fetch the data from ajax and set and content of infowindow. infoWindowContent = [ [' '+ this.tc_city_name + ' '+ if this.tc_city_description !=='null'){ +' ' + this.tc_city_description + ' '} + ' ' + this.tc_city_web_site + ' '+ ' '] ]; This code when I use the if condition then it give syntax error, can you please tell me, how I use the if condition in this code.
type: Question
has comment: http://stackoverflow.com/comment/42090861
tagged with: google-maps
tagged with: google-maps-markers
answer count: 1
downvote count: 0
has title: Google api : Infowindow Content Issue
tagged with: javascript
has comment: http://stackoverflow.com/comment/42090329
tagged with: google-maps-api-3

http://stackoverflow.com/comment/42177266
type: Comment
has text: Don't know why... % is from shift = 16, and 53
comment on: http://stackoverflow.com/a/26800297
score: 0
type: AnswerComment

http://stackoverflow.com/q/26819152
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
type: Question
has answer: http://stackoverflow.com/a/26819306
has title: interactive menu can't slide back in Jquery
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/26819306
possible better answer: http://stackoverflow.com/a/26819720
has answer: http://stackoverflow.com/a/26819720
has body: I was trying to make an interactive menu. It should work like this: If I click on menu-icon the navigation will slide down to visible area (It works) Then If I click menu-icon again the navigation will return back to invisible area again. But the second step doesn't work. $(document).ready(function(){ $(".menu-icon").click(function(){ $("#navigation").animate({top: "40%"}),5000; $(this).addClass("menu-icon-active").removeClass("menu-icon"); }); $(".menu-icon-active").click(function(){ $("#navigation").animate({top: "-40%"}),5000; $(this).addClass("menu-icon").removeClass("menu-icon-active"); }); }); Have got somebody an idea how to make it?

http://stackoverflow.com/q/26806792
has comment: http://stackoverflow.com/comment/42186723
downvote count: 2
tagged with: mysql
has comment: http://stackoverflow.com/comment/42195121
has comment: http://stackoverflow.com/comment/42186809
type: Question
has body: I have created an HTML table with PHP with contents from a SQL query. Inside this table, there is a column with drop-down menus. I want to change the value in the column next (where $outputPoints is the default value) to it when the drop down has been changed. The HTML echoed in PHP with some sample data: $result[1] $result[2] $result[3] $outputPoints The above is called iteratively. I'm not sure should I be adding id's here and what those Id's might be? The quotation marks are escaped as it sits inside an echo statement. I can remove these if it makes things clearer. The javascript: function showValue(obj) { var newValue = obj.value; console.log(newValue); obj.parentNode.parentNode.nextElementSibling.innerHTML = newValue; } I thought I understood the logic of traversing the DOM but I cannot see an update. Console.log is printing correctly. What am I doing wrong/not understanding? Much thanks for your help!
has title: Javascript traversing DOM PHP created table
has comment: http://stackoverflow.com/comment/42226705
tagged with: javascript
upvote count: 0
has answer: http://stackoverflow.com/a/26806925
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42186587
has comment: http://stackoverflow.com/comment/42186827
tagged with: http://stackoverflow.com/tag/html
tagged with: php
score: -2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26806925

http://stackoverflow.com/a/26816743
score: 0
answers question: http://stackoverflow.com/q/26816707
type: Answer
has body: use .on() event with dropdown lists like // For dynamic Elements $('.dropdown').on('click', 'li', function(){ // Get the selected Email var email = $.trim($(this).text()); // Send ajax request like you send before // with email address and display result wherever required $.ajax({ ......... }); });
has comment: http://stackoverflow.com/comment/42204639

http://stackoverflow.com/a/26775918
downvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26775823
has body: You should add click event on parent control like this: $("#parentControl").on("click", "a.delete", function() { var userEmail = $(this).attr("title"); loadUserDelete(userEmail); });
score: 1
upvote count: 2

http://stackoverflow.com/q/26830475
tagged with: jquery-events
answer count: 2
has comment: http://stackoverflow.com/comment/42228045
tagged with: jquery
has comment: http://stackoverflow.com/comment/42230736
favorite count: 0
linked to: http://stackoverflow.com/q/18147242
has answer: http://stackoverflow.com/a/26830670
accepted answer: http://stackoverflow.com/a/26830670
has answer: http://stackoverflow.com/a/26830540
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42228090
downvote count: 0
has comment: http://stackoverflow.com/comment/42230277
has title: understanding event handlers
type: Question
has body: As an exercise, I'm trying to add an event listener to an ebay.com element. Expected result: show an alert and stop the web page from going to the next URL. What happens: the alert is shown but the next URL is shown anyway. I found something interesting on the product pages where I'm testing out preventDefault, stopPropagtion and stopImmediatePropagation. No matter which combinations I use, nothing seem to work. The basic code is: $('#binBtn_btn').click(function(evt){ alert('hi'); evt.stopPropagation(); //or any other option. }); The thing is that I get the alert, but it still goes to the next page, as if I never stopped the propagation. I read a lot of articles about event handling, but I couldn't find the answer. Your help is much appreciated.
has comment: http://stackoverflow.com/comment/42227933
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26830540
upvote count: 2

http://stackoverflow.com/q/26699946
type: Question
has answer: http://stackoverflow.com/a/26702306
tagged with: javascript
score: -1
has body: I need your help I have to call 2 ajax in the same function...I have this code: $('#client_id').change(function(){ $.ajax({ url: './service/jsonNote.php', type: 'POST', data: 'query=' + $('#client_id').val(), dataType: 'JSON', async: true }) .done(function(data) { var jsProducts = data; $.ajax({ url: './service/jsonNoteNomi.php', type: 'POST', data: 'query=' + $('#client_id').val(), dataType: 'JSON', async: true }) .done(function(data) { alert(data); }) .fail(function() { alert( "error" ); }) .always(function() { alert( "complete" ); }); }); }); And it alert "Error". What is wrong? Can you help me, please?
has comment: http://stackoverflow.com/comment/41993834
upvote count: 0
has comment: http://stackoverflow.com/comment/41994053
answer count: 1
has comment: http://stackoverflow.com/comment/41993691
tagged with: jquery
has title: Two ajax jquery call in the same function
accepted answer: http://stackoverflow.com/a/26702306
favorite count: 0
tagged with: ajax
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41997092
downvote count: 1

http://stackoverflow.com/comment/42049751
comment on: http://stackoverflow.com/q/26731007
score: 0
type: Comment
type: QuestionComment
has text: oh yes .. Sorry for the silly question .. Yes I did and it works .. Let me just put in my framework and confirm. In the meantime, could you post your answer so that I can upvote as well as accept? Thanks @RobG

http://stackoverflow.com/q/26827979
type: Question
has answer: http://stackoverflow.com/a/26828029
upvote count: 2
tagged with: getelementsbytagname
answer count: 1
has title: * selector works in getElementsByTagName(), but not for getElementsByClassName() in javascript?
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42223600
score: 2
downvote count: 0
tagged with: getelementsbyclassname
has body: I can use '*' selector in getElementsByTags(), but not in getElementsByClassName() or getElementByID(). Could someone explain why? And, is there anyway to use substring selector in javascript methods ie (getElementsByClassName("*profile") to select elements whose class name includes 'profile'? The below is my code:

http://stackoverflow.com/a/27432035
has body: I had ever faced the same problem, and final I found the solution. You can change getCurrentPosition to watchPosition, it seems getCurrentPosition cannot recognize when location changes, watch help us do that. Try my solution, hope it helps you :) P/S you should settime out: 10000 for watchpostion or getcurrentpostion
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26694260

http://stackoverflow.com/a/26688856
answers question: http://stackoverflow.com/q/26686881
type: Answer
accepted answer of: http://stackoverflow.com/q/26686881
type: AcceptedAnswer
has body: There are a number of different ways you can do this, but if you just want an array: var valorTipoMenuArray = []; valorTipoMenuArray.push(document.getElementById('tipoMenu').value); valorTipoMenuArray.push(document.getElementById([NEXT ELEMENT YOU WANT TO PUT IN ARRAY]).value); ... MORE ELEMENTS ... Menu.insert({tipoMenu: valorTipoMenuArray});
score: 0

http://stackoverflow.com/q/26681376
has body: I have a directive defined as follows: Template {{labelText}} Directive //TypeScript module MyApp.Directives { /** Scope for Messaging directive. */ export interface IMaDatePickerScope extends ng.IScope { dt: Date; today(): void; clear(): void; disabled(date, mode): boolean; open($event): void; opened: boolean; dateOptions; formats: string[]; format: string; } export class MaDatePicker implements ng.IDirective { restrict = "E"; templateUrl = TEMPLATES + 'ma-date-picker.html'; replace = true; transclude = true; scope = { labelText: '@', datePickerId: '=' } link = (scope: IMaDatePickerScope) => { scope.today = () => { scope.dt = new Date(); } scope.today(); scope.clear = () => { scope.dt = null; } scope.disabled = (date: Date, mode) => { return (mode == 'day' && (date.getDay() === 0 || date.getDay() === 6)); //disable Saturday and Sunday } scope.open = ($event) => { $event.preventDefault(); $event.stopPropagation(); scope.opened = true; } scope.dateOptions = { formatYear: 'yy', startingDay: 1 } scope.formats = ['yyyy-MM-dd', 'dd-MMMM-yy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate']; scope.format = scope.formats[0]; } controller = ($scope: IMaDatePickerScope) => { } } } It is taken from the DatePicker section here and is supposed to function like the popup version shown on that page. Whenever I click the calendar button to initiate the directive, however, the calendar appears in a broken way. Additionally, the calendar keeps expanding to the left when I click on the "next month" arrow in the popup calendar. Is there something wrong in my code? I didn't add any styling with this, as there doesn't seem to be any according to the site, but I wanted to check if there was anything obviously wrong with the code before taking apart my existing styling.
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26741107
tagged with: angular-bootstrap
has title: AngularJS UI Bootstrap DatePicker Not Functioning Correctly
has comment: http://stackoverflow.com/comment/42000033
has comment: http://stackoverflow.com/comment/41961910
answer count: 1
tagged with: angular-ui
accepted answer: http://stackoverflow.com/a/26741107
has comment: http://stackoverflow.com/comment/41963279
tagged with: angularjs
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/41962947
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41961593

http://stackoverflow.com/q/26740221
favorite count: 0
has answer: http://stackoverflow.com/a/26740285
accepted answer: http://stackoverflow.com/a/26740403
type: AnsweredQuestion
has body: I need something obvious pointing out to me in regard to JS functions. The following code works, but I want to call upon it anywhere: var pattern = /(\d{2})\-(\d{2})\-(\d{4})/; var date = entry.date.split(' '); var date = date[0]; var date = new Date(date.replace(pattern,'$3-$2-$1')); var year = date.getYear(); var month = date.getMonth(); var day = date.getDay(); What would be the best practice to place this in a global function so I can just do adjustDate(string). Double points (Sadly, not in my power) to explain how I would then also have access to all the objects such as year, month, day. Thanks in advance!
has title: Javascript OO Function
upvote count: 1
type: Question
score: 1
has answer: http://stackoverflow.com/a/26740403
has answer: http://stackoverflow.com/a/26740291
answer count: 3
tagged with: function
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42066432
possible better answer: http://stackoverflow.com/a/26740291

http://stackoverflow.com/q/26708725
has comment: http://stackoverflow.com/comment/42009543
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/42009862
has comment: http://stackoverflow.com/comment/42010451
has comment: http://stackoverflow.com/comment/42009595
downvote count: 2
tagged with: mysql
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42009542
tagged with: javascript
score: -1
has body: I am using ajax to post a comment to a mysql table. When I post the comment, the javascript is loading but it doesnt submit the data to the mysql database. $(document).ready(function(){ $('#commentform').on('submit',function(e) { $.ajax({ url:'ajax.php', data:$(this).serialize(), type:'POST', success:function(data){ console.log(data); $("#success").show().fadeOut(5000); }, error:function(data){ $("#error").show().fadeOut(5000); } }); e.preventDefault(); }); }); ajax.php $id = $_POST['id']; $comment = $_POST['comment']; $username = $_POST['username']; $array = $pdo-&gt;prepare("INSERT INTO `comments` (id, comment, user) VALUES (:id,:comment,:username);"); $array-&gt;execute(array(':id' =&gt; $id, ':comment' =&gt; $comment, ':username' =&gt; $username)); html &lt;form method="post" name="commentform" id="commentform"&gt; &lt;textarea name="comment" name="comment"&gt;&lt;/textarea&gt;&lt;br&gt; &lt;input type="hidden" value="&lt;?php echo "$id"; ?&gt;" name="id" id="id" /&gt; &lt;input type="hidden" value="&lt;?php echo "$username"; ?&gt;" name="username" id="username" /&gt; &lt;input type="submit" name="submit" id="submit" value="REPLY" /&gt; &lt;/form&gt;
has answer: http://stackoverflow.com/a/26709583
answer count: 1
has title: ajax comment form not posting data to mysql
has comment: http://stackoverflow.com/comment/42011037
favorite count: 0
tagged with: ajax

http://stackoverflow.com/comment/42228407
type: AnswerComment
comment on: http://stackoverflow.com/a/26830189
type: Comment
has text: Thanks for your answer But I cant still figured it out - I am pretty new to rails and even more to ajax fuctions... I added remote: true to my upvote buton, but the votes_count is not updating, that's what I need to update through my ajax method
score: 0

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

http://stackoverflow.com/a/26739035
upvote count: 0
has comment: http://stackoverflow.com/comment/42064706
answers question: http://stackoverflow.com/q/26738756
has body: I wrote a function for you that you can use get the job done, but it uses a loop: var yourObjArray = [{id:1, value:5},{id:2, value:6},{id:3, value:7},{id:4, value:8}]; function objArrayIndex(objArray){ for(var i = 0; i &lt; objArray.length; i++){ if(objArray[i]['id'] == 3){ return i; } } return -1; } console.log(objArrayIndex(yourObjArray));
has comment: http://stackoverflow.com/comment/42065752
type: Answer
has comment: http://stackoverflow.com/comment/42063970
downvote count: 1
has comment: http://stackoverflow.com/comment/42064837
has comment: http://stackoverflow.com/comment/42063994
score: -1
has comment: http://stackoverflow.com/comment/42063879

http://stackoverflow.com/comment/42183210
score: 0
type: Comment
type: QuestionComment
has text: I've literally searched every file in the directory for that tag in np++ and no dice, so apparently it does.. Idk, I'm not an IE guy.
comment on: http://stackoverflow.com/q/26768342

http://stackoverflow.com/comment/42970980
type: QuestionComment
has text: Unfortunately not. I've tried many options and none of them worked as I wanted it to work. I ended up creating my own sharing buttons.
score: 0
comment on: http://stackoverflow.com/q/26733038
type: Comment

http://stackoverflow.com/a/26790394
answers question: http://stackoverflow.com/q/26790204
has body: ng-class expects an object, so Try this instead: Home Sales Then your JS would look like this: $scope.changeTab = function(tabName){ $scope.activeTab = tabName; console.log('tabName', tabName); } This would flip the state of your tabs
has comment: http://stackoverflow.com/comment/42158530
score: 0
type: Answer

http://stackoverflow.com/comment/42079751
type: QuestionComment
has text: this is basic jquery
score: 1
comment on: http://stackoverflow.com/q/26747388
type: Comment

http://stackoverflow.com/comment/41986454
comment on: http://stackoverflow.com/a/26695638
type: Comment
has text: Yes the url is empty atm, a valid username would be ex. "Notch" or "ZanderPlays" A url with username would be: http://minecraft-skin-viewer.com/skin.php?user=Notch
score: 0
type: AnswerComment

http://stackoverflow.com/q/26781576
favorite count: 0
has answer: http://stackoverflow.com/a/41265248
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/26782098
accepted answer: http://stackoverflow.com/a/26782139
type: AnsweredQuestion
score: 2
possible better answer: http://stackoverflow.com/a/26782098
type: Question
has answer: http://stackoverflow.com/a/26782139
has body: im using the code found here to create a progress circle: http://codepen.io/JMChristensen/pen/Ablch But i dont want it to be that big so i changed the circle radius for the inner and outer circle to be 40 instead of 90. Problem is after i do that the circle displaying the percentage stops working, no matter what percentage i type in the circle doesnt change and always appears to be at 100%. here's the html: SVG Circle Progress Based off of CSS3 circle progress bars Type a percent! i think it has something to do with the stroke-dashoffset calculated in the js but i cant really figure out the math behind it.
tagged with: javascript
tagged with: progress-bar
has title: SVG progress circle with percentage
upvote count: 3
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
tagged with: css

http://stackoverflow.com/comment/42036500
has text: Probably the responsiveness of the NYT example comes from using a single canvas (or small number of them) instead of a bunch of HTML or SVG nodes —— not from using d3 instead of jQuery. That example does happen to use d3 though. You can see all the code by viewing source; it's right there in un-minified js. For example, line `897` of the page source is part of a big loop where it draws the current image into the canvas.
score: 2
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26723324

events
tags question: http://stackoverflow.com/q/26763002
tags question: http://stackoverflow.com/q/26691042
tags question: http://stackoverflow.com/q/26678104
tags question: http://stackoverflow.com/q/26708838
tags question: http://stackoverflow.com/q/26776326
tags question: http://stackoverflow.com/q/26715551
tags question: http://stackoverflow.com/q/26806794
tags question: http://stackoverflow.com/q/26733981
tags question: http://stackoverflow.com/q/26817472
tags question: http://stackoverflow.com/q/26804017
tag name: events
tags question: http://stackoverflow.com/q/26829555
tags question: http://stackoverflow.com/q/26716099
tags question: http://stackoverflow.com/q/26770320
type: Tag
tags question: http://stackoverflow.com/q/26777721
tags question: http://stackoverflow.com/q/26760940

http://stackoverflow.com/comment/42210143
type: AnswerComment
score: 0
has text: The `fadeIn() fadeOut()` , as you can see when you hover on 'show ads' the fade blinks, I don't know if you uderstand what I mean
type: Comment
comment on: http://stackoverflow.com/a/26819346

http://stackoverflow.com/comment/42182559
has text: @here People, you closed a question without actually letting the question's author confirm your assumptions that he is actually looking for a "shuffle". If you look at his algorithm, he's pretty clearly **rotating** the array, and his languages states he's trying to **shift** the array, so instead of editing his question so it's a duplicate and then closing it, **wait for him to clarify**.
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26804393
type: Comment

http://stackoverflow.com/q/26718805
upvote count: 2
has comment: http://stackoverflow.com/comment/42038328
has comment: http://stackoverflow.com/comment/42027870
type: AnsweredQuestion
tagged with: fine-uploader
score: 1
has comment: http://stackoverflow.com/comment/42037455
has answer: http://stackoverflow.com/a/50415594
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/29305902
tagged with: c#
possible better answer: http://stackoverflow.com/a/50415594
tagged with: javascript
tagged with: webforms
linked to: http://stackoverflow.com/q/6020178
answer count: 2
has body: I am currently using fineuploader with ASP.NET webforms and am encountering a problem with strict mode in FireFox. ASP.NET webforms has a javascript file (microsoftajaxwebforms.js) that contains the following code (This is used to postback to the server and call the passed event, ex. Save below.): _doPostBack: function(a, k) { var f = window.event; if (!f) { var d = arguments.callee ? arguments.callee.caller : null; if (d) { var j = 30; while (d.arguments.callee.caller &amp;&amp; --j) d = d.arguments.callee.caller; f = j &amp;&amp; d.arguments.length ? d.arguments[0] : null } } ... That function is used liberally in the codebase I am working with. I cannot change this code for fear of unintended side-effects in the rest of the product. The problem is with the arguments.callee.caller. That is what is throwing the error access to strict mode caller function is censored. I believe the solution is to remove the use strict from the fineuploader.js, but I am worried about how that might effect fineuploader in other browsers. I am not familiar with strict mode in javascript, so maybe someone can shed some light on the possible side-effects of removing strict mode from the fineuploader.js. For reference, here is the fineuploader function that eventually calls the above code and causes the error. var fineUploader = $('#jquery-wrapped-fine-uploader').fineUploader({ ... multiple: false, text: { uploadButton: 'Click or drag a file to upload.' }, autoUpload: false, debug: false, template: 'fineuploader-template', ... } }).bind('complete', function (event, id, name, response) { if (response['success']) { cp_hide(); fineUploader.fineUploader('reset'); __doPostBack("Save", ""); } })... I can modify anything short of the code referenced from microsoftajaxwebforms.js if needed. I appreciate any help.
has comment: http://stackoverflow.com/comment/42027878
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/42034910
has comment: http://stackoverflow.com/comment/42038235
has title: Using Fineuploader with ASP.NET webforms. access to strict mode caller function is censored
has answer: http://stackoverflow.com/a/29305902

http://stackoverflow.com/q/26705040
has answer: http://stackoverflow.com/a/26705207
tagged with: css
type: Question
has title: multiple isNaN in a if else javascript
tagged with: if-statement
has answer: http://stackoverflow.com/a/26705061
tagged with: javascript
has body: So I created a javascript that is gonna draw up a number of divs and style them according to what the value of the input is. The problem is, when I try to draw up a warning that you have to put in a number and not anything else. At the moment I cant seem to get it to create the figures at all, it will only display the warning that the value is not a number.. My code: function genFigures(){ var numberFig = numberFigInput.value; var widthValue = figWidthInput.value; var heightValue = figHeightInput.value; var colorValue = figRgbInput.value; var leftValue = figPosLeftInput.value; var topValue = figPosTopInput.value; if (numberFig &gt;= 1001){ alert("You need to input a value between 1 and 1000!"); }if (isNaN(numberFigInput) &amp;&amp; isNaN(figWidthInput) &amp;&amp; isNaN(figWidthInput) &amp;&amp; isNaN(figPosLeftInput) &amp;&amp; isNaN(figPosTopInput)){ alert("You have to insert a number!"); }else{ for(var amount = 0; amount &lt; numberFig; amount++){ myFigures.innerHTML += "&lt;div&gt;&lt;/div&gt;" var figStyle = document.getElementsByTagName("div"); for(var i = 0; i &lt; figStyle.length; i++){ figStyle[i].style.width = widthValue +"px"; figStyle[i].style.height = heightValue +"px"; figStyle[i].style.background = "rgb(" + colorValue + ")"; figStyle[i].style.left = leftValue +"px"; figStyle[i].style.top = topValue +"px"; } } } }
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42003137
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/comment/46900545
type: Comment
score: 0
has text: You can sort the array and then get the upper and lower bounds. Take a look at this answer: **[Sort Javascript Object Array By Date](http://stackoverflow.com/a/26759127/2247494)**
type: QuestionComment
comment on: http://stackoverflow.com/q/26735854

http://stackoverflow.com/q/26702413
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26718978
score: 0
has body: I am working with Parse for Javascript, and below is my dilema: During the signup process, along with the username, and password, the first and last name of the user would have to recorded into parse. As of now, only the username and password is stored. Below is the javascript signup function code: SignUp: function(e) { var self = this; var username = this.$("#signup-username").val(); var password = this.$("#signup-password").val(); var first_name = this.$("#fname").val(); var last_name = this.$("#lname").val(); Parse.User.signUp(username, password, { ACL: new Parse.ACL() }, { success: function(user) { user.set("first_name", first_name); user.set("last_name", last_name); new ManageTodosView(); self.undelegateEvents(); delete self; }, Below is the html form code (ask user to enter their information): Sign Up Sign Up Any help would be greatly appreciated.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/26718978
tagged with: parse-platform
has title: Information not being recorded in Parse

http://stackoverflow.com/a/26753141
type: Answer
score: 2
upvote count: 2
has body: You can force the min and max values on the y axis like this: yAxis: { min:0, max:100 } http://jsfiddle.net/d9q6atpk/
answers question: http://stackoverflow.com/q/26750597
downvote count: 0

http://stackoverflow.com/comment/41980530
has text: When you have variables with numbers like that, you want an array instead.
comment on: http://stackoverflow.com/q/26692443
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42114550
type: Comment
comment on: http://stackoverflow.com/a/26762704
has text: Yes Empty string or string with only spaces
type: AnswerComment
score: 0

http://stackoverflow.com/q/26749320
type: AnsweredQuestion
has body: So, I've searched around for a bit and found out that some of the CSS won't load in editor mode but will load in previewer mode, however, not all CSS is functioning properly and the Javascript is completely failing. Here's some html and javascript I tried with the HTML Box: Buffalo Camels Cattle Chickens Ducks Goats Horses Pigs Sheep Turkeys What needs to be added? Here's the website https://support.google.com/sites/answer/2500646?hl=en
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26808225
score: 0
answer count: 1
has title: Google Sites HTML Box isn't recognizing CSS or Javascript
accepted answer: http://stackoverflow.com/a/26808225
tagged with: http://stackoverflow.com/tag/html
tagged with: google-sites
tagged with: css

http://stackoverflow.com/q/26773866
type: UnansweredQuestion
tagged with: css
has title: Jquery doesn't change div's width on smaller screen after auto adjusting on regular screen
has comment: http://stackoverflow.com/comment/42126891
type: Question
tagged with: javascript
score: 0
has body: Got the script that auto adjusts width of children divs depending on the number of children. And on smaller screen i need them to be 100% wide. I've tried inserting the script right into the script that adjusts width on regular screen. Doesn't work. Also tried inserting it in the very bottom of the page. Didn't work too. Here is the code $(".basecollections").each(function(){ var child_width = 100 / $(this).children().length; child_width = Math.floor(child_width); $(this).children().css("width", child_width + "%"); if ( screen.width &lt; 1000 ) { $(this).children().css('width','100%'); } }) http://jsfiddle.net/3x466nb1/
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26773919

http://stackoverflow.com/q/26760797
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42127295
tagged with: raphael
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/26777000
tagged with: javascript
score: 0
has title: Raphaël.js and converting of SVG is not correct scale
has body: I have a .svg file that I want to convert to Raphaël.js format. As you can see, the picture is good, everything in it is shown correctly. I have tried converting it to the raphael format with this homepage: http://www.readysetraphael.com/ but it doesn't understand the viewports somehow. Huge parts of the map is removed. I guess it has something to do with the fields: viewBox="425 -225 800 800" enable-background="new 425 -225 800 800" in the svg-file. I wan't to keep info about the lakes and the municipality shown in the map. I've seen other sites have some kind of conversion, but readysetreaphael has the nicest output. It, however, doesn't look good. Here's a fiddle: http://jsfiddle.net/aL6ch7dL/
has comment: http://stackoverflow.com/comment/42105045
has comment: http://stackoverflow.com/comment/42107406
possible better answer: http://stackoverflow.com/a/26812806
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/26812806
has comment: http://stackoverflow.com/comment/42103786
has answer: http://stackoverflow.com/a/26777000
has comment: http://stackoverflow.com/comment/42122037

http://stackoverflow.com/comment/41993187
comment on: http://stackoverflow.com/a/26685333
score: 0
has text: Some other things you might look at are the timings between when you create and save your mongoose models. To give a better answer, I would need to see more of your code to understand these timings. You might try referencing 'Topic' as this.model('Topic'). See the Mongoose docs (http://mongoosejs.com/docs/guide.html). There's an example under the heading 'Instance methods'.
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41985287
type: Comment
type: QuestionComment
score: 0
has text: @Benjamin Gruenbaum Thanks for your advice by the way I am new in AngularJS.
comment on: http://stackoverflow.com/q/26694987

http://stackoverflow.com/comment/42216584
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26823724
has text: *sigh* You beat me to rejecting that useless suggested edit, which just changed a few characters in the title and changed the part of speech of a word for no reason, without actually fixing anything...

css
tags question: http://stackoverflow.com/q/26806523
tags question: http://stackoverflow.com/q/26728611
tags question: http://stackoverflow.com/q/26690621
tags question: http://stackoverflow.com/q/26790155
tags question: http://stackoverflow.com/q/26676750
tags question: http://stackoverflow.com/q/26793590
tags question: http://stackoverflow.com/q/26817742
tags question: http://stackoverflow.com/q/26706962
tags question: http://stackoverflow.com/q/26810639
tags question: http://stackoverflow.com/q/26744941
tags question: http://stackoverflow.com/q/26681881
tags question: http://stackoverflow.com/q/26762218
tags question: http://stackoverflow.com/q/26784496
tags question: http://stackoverflow.com/q/26748322
tags question: http://stackoverflow.com/q/26751614
tags question: http://stackoverflow.com/q/26722179
tags question: http://stackoverflow.com/q/26733208
tags question: http://stackoverflow.com/q/26778023
tags question: http://stackoverflow.com/q/26727175
tags question: http://stackoverflow.com/q/26691261
tags question: http://stackoverflow.com/q/26683767
tags question: http://stackoverflow.com/q/26803441
tags question: http://stackoverflow.com/q/26727529
tags question: http://stackoverflow.com/q/26753506
tags question: http://stackoverflow.com/q/26754332
tags question: http://stackoverflow.com/q/26756158
tags question: http://stackoverflow.com/q/26682228
tags question: http://stackoverflow.com/q/26693134
tags question: http://stackoverflow.com/q/26751782
tags question: http://stackoverflow.com/q/26764557
tags question: http://stackoverflow.com/q/26737471
tags question: http://stackoverflow.com/q/26753855
tags question: http://stackoverflow.com/q/26714774
tags question: http://stackoverflow.com/q/26743573
tags question: http://stackoverflow.com/q/26802823
tags question: http://stackoverflow.com/q/26764591
tags question: http://stackoverflow.com/q/26741510
tags question: http://stackoverflow.com/q/26697218
tags question: http://stackoverflow.com/q/26810860
tags question: http://stackoverflow.com/q/26674987
tags question: http://stackoverflow.com/q/26781817
tags question: http://stackoverflow.com/q/26826390
tags question: http://stackoverflow.com/q/26690022
tags question: http://stackoverflow.com/q/26757807
tags question: http://stackoverflow.com/q/26705040
tags question: http://stackoverflow.com/q/26726585
tags question: http://stackoverflow.com/q/26685093
tags question: http://stackoverflow.com/q/26781779
tags question: http://stackoverflow.com/q/26768299
tags question: http://stackoverflow.com/q/26747910
tags question: http://stackoverflow.com/q/26803333
tags question: http://stackoverflow.com/q/26828349
tags question: http://stackoverflow.com/q/26690939
tags question: http://stackoverflow.com/q/26717254
tags question: http://stackoverflow.com/q/26771764
tags question: http://stackoverflow.com/q/26686276
tags question: http://stackoverflow.com/q/26750590
tags question: http://stackoverflow.com/q/26727677
tags question: http://stackoverflow.com/q/26807286
tags question: http://stackoverflow.com/q/26728681
tags question: http://stackoverflow.com/q/26687031
tags question: http://stackoverflow.com/q/26704071
tags question: http://stackoverflow.com/q/26828824
tags question: http://stackoverflow.com/q/26696296
tags question: http://stackoverflow.com/q/26713812
tags question: http://stackoverflow.com/q/26700891
tags question: http://stackoverflow.com/q/26711069
tags question: http://stackoverflow.com/q/26684390
tags question: http://stackoverflow.com/q/26746798
tags question: http://stackoverflow.com/q/26772818
tags question: http://stackoverflow.com/q/26831036
tags question: http://stackoverflow.com/q/26831864
tags question: http://stackoverflow.com/q/26813197
tags question: http://stackoverflow.com/q/26729285
tags question: http://stackoverflow.com/q/26718125
tags question: http://stackoverflow.com/q/26716147
tags question: http://stackoverflow.com/q/26736228
tags question: http://stackoverflow.com/q/26755907
tags question: http://stackoverflow.com/q/26825227
tags question: http://stackoverflow.com/q/26684898

http://stackoverflow.com/q/26752114
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/37992561
type: Question
answer count: 2
has body: I'm trying to make my chrome extension visit an URL when it is uninstalled. Apparently chrome.runtime.setUninstallUrl is the best (and only?) option, but it doesn't seem to work for me. It's not firing at all. This is the code I use: chrome.runtime.setUninstallURL('www.google.com'); It's located in the extension's background JavaScript file together with a couple of other event listeners. I tried loading my unpacked extension into Chrome and then removing it, but the uninstall URL does not budge. Any help would be appreciated.
downvote count: 0
tagged with: javascript
has title: chrome.runtime.setUninstallUrl doesn't seem to be working
accepted answer: http://stackoverflow.com/a/26755051
tagged with: google-chrome-extension
has answer: http://stackoverflow.com/a/26755051
favorite count: 0
has answer: http://stackoverflow.com/a/37992561
tagged with: uninstallation
upvote count: 1
tagged with: google-chrome

http://stackoverflow.com/comment/41988760
comment on: http://stackoverflow.com/q/26697108
has text: From Where POST vars are coming??
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26917388
accepted answer of: http://stackoverflow.com/q/26768991
score: 29
answers question: http://stackoverflow.com/q/26768991
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/76745315
has body: Finding the popovers that are created through the data API is not difficult and has been covered in other answers like those of David Mulder and Amir Popovich. You just do: $("[data-toggle='popover']").popover('hide'); Or you can use destroy if you need to or prefer to. The challenge is to handle those popovers that are created dynamically. Marking the Elements with Popovers I would implement something like this. I'd override the default popover method and I'd try to perform this override as early as possible so that everything that needs a popover uses my override. What it does is just mark elements that use a popover with a class. Bootstrap does not mark them itself: // Override popover so as to mark everything that uses a popover. var old_popover = $.fn.popover; function my_popover() { this.addClass('marked-as-having-a-popover'); return old_popover.apply(this, arguments); } $.fn.popover = my_popover; Then to clear everything before the unloading, I'd put in the code that detects the unloading the following: $(".marked-as-having-a-popover").popover('hide'); Or it could use destroy rather than hide if testing shows that it works better for your use-case. Now, the method above will work if the override happens early enough and you do not have a page where multiple jQueries are loaded. (Yep, this is possible.) I use something similar to deal with tooltips in one of my applications so I know the principle is sound. It so happens that in my app, all tooltips are created by my code so there is no risk of missing something. Finding All Elements with Popovers, Even Unmarked If you are in a situation where a popover can be created without being marked (I call this an "escapee"), then you need to query the whole DOM and find which elements have popovers. There is no shortcut here. You cannot rely on attributes like data-content because popovers can be created wholly dynamically (i.e. without any of the data- attributes). Also, all kinds of elements can get popovers, so you …
type: Answer
upvote count: 29
has comment: http://stackoverflow.com/comment/48432003

http://stackoverflow.com/q/26715241
has body: I have a content script in which there is a script called myscript.js, now I have made it in such a way that if a page on google.com loads then setA of modifications are done otherwise setB of modifications are done. Now I want a variable which is accessible from all the webpages that open on that browser. like we have static variables in java, the same variable is accessible to all the objects of the class, using that analogy here the static variable is the global variable and objects are webpages that load
has title: How to make a variable in content script which is accessible on all the pages
score: 0
has answer: http://stackoverflow.com/a/26717232
has comment: http://stackoverflow.com/comment/42021161
tagged with: google-chrome-extension
answer count: 1
accepted answer: http://stackoverflow.com/a/26717232
type: AnsweredQuestion
tagged with: google-chrome
type: Question
tagged with: javascript

http://stackoverflow.com/comment/42056097
comment on: http://stackoverflow.com/a/26734658
has text: I've seen examples on the request page using the streaming variant. While this generally works I need the variant that is using the callback because I have some further logic running that decides whether or not the image will be saved. But thx for your answer!
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26726812
tagged with: javascript
has answer: http://stackoverflow.com/a/26726858
upvote count: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
downvote count: 2
accepted answer: http://stackoverflow.com/a/26726858
type: AnsweredQuestion
has title: Will this generate a dynamic HTML table using Javascript?
type: Question
score: -2
has body: I need to generate a table with Javacript dynamically by passing the size of the table. This table is an n by n table. funtion createTable(n) { var body = getElementByTag('body'); var table = document.createElment('table'); table.setAttribute("border","1px solid #ccc"); for (i=0;i&lt;n;i++){ var row = table.insertRow(i); for (j=0;j&lt;n;j++){ var cell= row.insertCell(j); } } } I cannot get it to work

highcharts
tags question: http://stackoverflow.com/q/26808865
tags question: http://stackoverflow.com/q/26765477
tags question: http://stackoverflow.com/q/26799738
tags question: http://stackoverflow.com/q/26739725
tags question: http://stackoverflow.com/q/26676113
tags question: http://stackoverflow.com/q/26750597
tags question: http://stackoverflow.com/q/26827929
tags question: http://stackoverflow.com/q/26682424
tags question: http://stackoverflow.com/q/26754212
tags question: http://stackoverflow.com/q/26774184
tags question: http://stackoverflow.com/q/26798407
tags question: http://stackoverflow.com/q/26822941
tags question: http://stackoverflow.com/q/26787182
tags question: http://stackoverflow.com/q/26800605
tags question: http://stackoverflow.com/q/26679450
tags question: http://stackoverflow.com/q/26677245
tags question: http://stackoverflow.com/q/26721869
tags question: http://stackoverflow.com/q/26761291
tags question: http://stackoverflow.com/q/26808750
tags question: http://stackoverflow.com/q/26801793
tags question: http://stackoverflow.com/q/26808765
tags question: http://stackoverflow.com/q/26815127
tags question: http://stackoverflow.com/q/26787386
tags question: http://stackoverflow.com/q/26805652
tags question: http://stackoverflow.com/q/26735520
tags question: http://stackoverflow.com/q/26792835
tags question: http://stackoverflow.com/q/26779758
tags question: http://stackoverflow.com/q/26682815
type: Tag
tag name: highcharts

http://stackoverflow.com/a/26787301
score: 1
upvote count: 1
downvote count: 0
has body: Finally I get it, thanks a lot Ragnar for ur great help. My script now looks like &lt;script type='text/javascript'&gt; $(document).ready(function(){ $.getJSON('ArbolCategorias.php', function(data) { //mejorar para que sea dinamico $.each(data.children, function(key, val) { $('#jsonresult').append('&lt;li id="' + key + '"&gt;' + val.category_id + ', ' + val.parent_id + ', ' + val.name + ', ' + val.is_active + ', ' + val.position + ', ' + val.level + '&lt;/li&gt;'); }); $.each(data.children, function(key, val) { $.each(val.children, function(key, value) { $('#jsonresult').append('&lt;li id="' + key + '"&gt;' + value.category_id + ', ' + value.parent_id + ', ' + value.name + ', ' + value.is_active + ', ' + value.position + ', ' + value.level + '&lt;/li&gt;'); }); }); $.each(data.children, function(key, val) { $.each(val.children, function(key, value) { $.each(value.children, function(key, value) { $('#jsonresult').append('&lt;li id="' + key + '"&gt;' + value.category_id + ', ' + value.parent_id + ', ' + value.name + ', ' + value.is_active + ', ' + value.position + ', ' + value.level + ', ' + value.children + ', ' + '&lt;/li&gt;'); }); }); }); }); }); It's not dinamic so when I introduce a new child it will not get printed but i'll still working on it :D
type: Answer
answers question: http://stackoverflow.com/q/26785480

http://stackoverflow.com/a/26829378
downvote count: 0
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26829325
has body: You may have to use the browser's local stroage, if that is an option.

http://stackoverflow.com/a/28241310
answers question: http://stackoverflow.com/q/26692389
type: Answer
has body: In the ES6 grammar, the body of a class may only consist of method definitions, so arrow function expressions are not permitted here. This is a simplified snippet of the relevant portions of the grammar: ClassBody : ClassElementList ClassElementList : ClassElement ClassElementList ClassElement ClassElement : MethodDefinition static MethodDefinition ; MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody } GeneratorMethod get PropertyName ( ) { FunctionBody } set PropertyName ( PropertySetParameterList ) { FunctionBody } So in your example: class Person { constructor(aName) { this.name = aName; this.say2 = () =&gt; console.log(this.name); } say() { console.log(this.name) } say3() { () =&gt; console.log(this.name) } } say is a normal method definition, which suffers from the same issues with this binding as normal functions. However, you can get around that using bind when you pass it, as in element.addEventListener('click', this.say.bind(this));. say2 will work, but you lose the convenience of specifying methods outside of the constructor. say3 won't work - while it is syntactically valid, it will be parsed as a method, whose body consists of a single arrow function. To clarify, say3() { () =&gt; console.log(this.name) } and say3() { return () =&gt; console.log(this.name) } differ in that the former will do nothing and return undefined, whereas the latter will return an arrow function expression which, when called, will print to the console.
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/42196839
type: QuestionComment
comment on: http://stackoverflow.com/q/26812222
score: 0
has text: Technically when you are clicking a child li you are clicking the parent li as well, and so both events are being triggered.
type: Comment

http://stackoverflow.com/q/26746307
type: Question
type: AnsweredQuestion
tagged with: row
has body: I need to have a radio input selected when a user clicks anywhere in the row and highlight the row when the mouse goes trough it. I have been toying with some options but cannot get anything to work apart of those with jquery/javascript, but I'm sure there's some way to make it work with plain html/css. I know that can be done toying with label+inputs plus "tables" or "display:table-row;" or widths but I 'm just not able to make it work. I'll appreciate any help.
possible better answer: http://stackoverflow.com/a/26746496
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26746496
favorite count: 0
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: input
has title: Select a radio input when the row is clicked
accepted answer: http://stackoverflow.com/a/26769362
tagged with: css
has answer: http://stackoverflow.com/a/26769362
upvote count: 1
downvote count: 1

http://stackoverflow.com/q/26828514
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26828639
has title: Getting an id from a ul li using jquery
has comment: http://stackoverflow.com/comment/42224622
has answer: http://stackoverflow.com/a/26828639
has comment: http://stackoverflow.com/comment/42224416
has answer: http://stackoverflow.com/a/26828684
accepted answer: http://stackoverflow.com/a/26828684
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42224443
has body: I'm populating an unordered list using a keyup jquery function that works fine. However once the information is returned I would like to get the id by clicking on the li: This is my function: if( $_REQUEST["assist"] ) { $search_sql = "SELECT * FROM `inventory` WHERE upper(name) LIKE upper('%".$_REQUEST['assist']."%') and active = '1' OR upper(part_num) LIKE upper('%".$_REQUEST['assist']."%') and active = '1' ORDER BY `part_num` ASC "; $result = mysql_query($search_sql); if (mysql_num_rows($result) > 0) { // output data of each row while ($row = mysql_fetch_array($result)) { echo ' '.$row['part_num'].' | '.$row['name'].' '; } } else { echo ' There are no parts matching "'.$_REQUEST['assist'].'" '; } } It is putting the result into this html: My javascript is $('#assist-search-value li').click(function() { var option = $(this).find('.assist_id').val(); alert(option); }); However when i click on the results I'm getting just the first id in the list instead of the one that I would like.
type: Question

http://stackoverflow.com/a/26707158
type: Answer
has body: It looks like because you are getting a .js file, jQuery automatically defaults the dataType to script, which will cause jQuery to evaluate the script being loaded. Specifying dataType: 'text' should prevent that unwanted behavior.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26703350
answers question: http://stackoverflow.com/q/26703350
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/67772991
has text: it's nothing to do with jQuery, it's more about using selector instead of switch/statement branching.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26708418
type: AnswerComment

http://stackoverflow.com/comment/42111350
type: Comment
type: QuestionComment
has text: @Pointy I figured as much on that front, I'm just looking for some intuition has to why chrome consistently behaves differently than IE and Firefox, specifically at the n/2(th) element in the collection.
score: 0
comment on: http://stackoverflow.com/q/26765140

http://stackoverflow.com/comment/42208283
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26818835
has text: oh, that's a bad news :( there is no work around for this?

http://stackoverflow.com/a/26789717
answers question: http://stackoverflow.com/q/26788898
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42155797
score: 2
has comment: http://stackoverflow.com/comment/42155933
upvote count: 2
has body: bounds.extend takes a google.maps.LatLng as its argument, not a google.maps.LatLngBounds object, which is what place.geometry.viewport (probably) is. To "add" a google.maps.LatLngBounds to an existing bounds, use bounds.union bounds.union(place.geometry.viewport);
accepted answer of: http://stackoverflow.com/q/26788898

http://stackoverflow.com/q/26759279
has comment: http://stackoverflow.com/comment/42118547
has comment: http://stackoverflow.com/comment/42119284
has comment: http://stackoverflow.com/comment/42118612
has comment: http://stackoverflow.com/comment/42119306
upvote count: 4
downvote count: 0
answer count: 1
tagged with: javascript
has body: I'm developing a Google Chrome Extension which changes its icon depending of your IP localization. I face issues with refresh after an extension's icon change. The icon is actually changing thanks to this command from my background.js file. chrome.browserAction.setIcon ( { path: 'france.png' } ); Unfortunately, the setIcon command seems to be asynchronous. Icon change actually appears a few seconds after the change in the code. Is there a way to force chrome to refresh icons ? Many chrome extensions seem to be able to control this but I couldn't find out how they manage this. Here are more details : In order to understand more clearly, I removed all my javascript code from different files, except the setIcon line. Here is Manifest line which declares my javascriptfiles. "background": { "scripts": [ "jquery.min.js", "popup.js", "background.js"] }, popup.js: Now empty background.js: Only these two following lines : console.log ("I'm background script"); chrome.browserAction.setIcon({path: 'france.png'}); After extension reload with the extensions manager, I click on its icon. Chrome make the static html popup to appear and load background.jsfile. As a proof of it, the text immediately appears on the console window. But I have to clic a few more times on the icon extension to see it changed by chrome. I should do something wrong somewhere, but actually, as I removed everything, I have no clue where this delay could come from.
favorite count: 0
linked to: http://stackoverflow.com/q/66618136
tagged with: google-chrome-extension
has answer: http://stackoverflow.com/a/31613271
has comment: http://stackoverflow.com/comment/42118582
has title: Refreshing an icon change for chrome extension
has comment: http://stackoverflow.com/comment/42102522
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42119122
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/42118428
type: Question
score: 4

http://stackoverflow.com/a/26692013
has comment: http://stackoverflow.com/comment/41983727
has body: I'm not sure if it's an issue with Angular 1.3, but there is a possibility that: null isn't valid specification of data used to get resource null for sure isn't good for a resource that has parameters used in the path This is what works for me: Without parameters return $resource('api/groups', {}, {}); Call: Groups.get(); With parameters (your case) return $resource('messages/:lang/:packageName.json', {packageName: '@packageName', lang: '@lang'}, {}); Call: Messages.get({ packageName: 'base', lang: $scope.lang }); I know it looks redundant, but it works great. Edit: In my opinion the error is thrown while parsing your path and encountering letter u after : char and not finding suitable parameter in the second parameter of $resource function, but that's just a guess
score: 0
answers question: http://stackoverflow.com/q/26691339
type: Answer
has comment: http://stackoverflow.com/comment/41983267

http://stackoverflow.com/a/26721863
answers question: http://stackoverflow.com/q/26720907
score: 3
upvote count: 3
downvote count: 0
type: Answer
has body: A better alternative when using popular third-party assets is to look on Rubygems for a gemified version of the asset. In this case fancybox2-rails. gem 'fancybox2-rails', '~&gt; 0.2.8' Adding the gem to your application.js with sprockets: //= require jquery //= require fancybox Or in a script tag: &lt;%= javascript_include_tag "fancybox" %&gt; And the css: /* *= require_self *= require fancybox *= require_tree . */ The advantage of using Gemified packages is that its easier to maintain and you avoid polluting your codebase with 3rd party code. The drawback is that the gem may be several versions older than the actual software it encapsulates. If you need to add vendor files you should probably be adding them to lib/assets and not app/assets, since it makes a clear separation between the code which actually drives your unique app and dependencies. Another thing to remember is that assets are most often compiled at deploy time in your production environment (this is especially true on Heroku) and not per request (which would be very slow). So you cannot use conditions in your sprockets directives.

http://stackoverflow.com/a/26798129
downvote count: 0
has body: You can use parent(), but it is safer to use closest (in case of DOM changes): Inside the select event this should be the datepicker element. var parentTD = $(this).closest('td'); A number of plugins have a habit of changing the DOM around the element they are attached to but closest will search up the ancestors until it finds a match. JSFiddle: http://jsfiddle.net/NdN9H/52/
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26798014
accepted answer of: http://stackoverflow.com/q/26798014
type: AcceptedAnswer

http://stackoverflow.com/a/26796556
downvote count: 0
has comment: http://stackoverflow.com/comment/42171352
type: Answer
has comment: http://stackoverflow.com/comment/42170747
has body: It would probably better to do something more dynamic like this: function SomeFunction (element1,element2) { var e1 = $("#"+element1), e2 = $("#"+element2); // Do something with variables e1 and e2 } and you would call like this: //html: &lt;div id="one"&gt;&lt;div&gt; &lt;div id="two"&gt;&lt;div&gt; //javasctript: SomeFunction('one','two');
upvote count: 3
has comment: http://stackoverflow.com/comment/42170685
score: 3
has comment: http://stackoverflow.com/comment/42170613
accepted answer of: http://stackoverflow.com/q/26796528
answers question: http://stackoverflow.com/q/26796528
type: AcceptedAnswer

http://stackoverflow.com/comment/42197753
score: 0
type: AnswerComment
type: Comment
has text: How does the title appear? Are you talking about the browser tooltip? If you want some other tip to appear and track the mouse then you are going to have to do something far more advanced.
comment on: http://stackoverflow.com/a/26812344

http://stackoverflow.com/comment/42049204
type: AnswerComment
has text: The error message is within the body of the response. I dont know where your Titanium API puts this information - should be in the docs somewhere. Maybe as a second parameter to the error callback? But let me tell you that it is a bad pattern to send actual error messages from the server to the client - especially no stack traces or anything like that as it could reveal your servers architecture and thus make it a security threat. Define Error Messages on your client dependin the HTTP Status of the server.
comment on: http://stackoverflow.com/a/26730191
type: Comment
score: 1

http://stackoverflow.com/q/26815134
tagged with: asp.net-mvc-5
accepted answer: http://stackoverflow.com/a/26818345
downvote count: 0
tagged with: jquery
favorite count: 0
has body: Any javascript I embed in a view is not firing. A dummy sample code click me When the page is rendered the result is : click me when you click on the link, it does nothing.
has comment: http://stackoverflow.com/comment/42201367
has comment: http://stackoverflow.com/comment/42201792
has answer: http://stackoverflow.com/a/26815753
score: 1
has answer: http://stackoverflow.com/a/26818345
possible better answer: http://stackoverflow.com/a/26815753
upvote count: 1
has title: MVC 5 javascript not firing
type: AnsweredQuestion
tagged with: asp.net-mvc
tagged with: javascript
has comment: http://stackoverflow.com/comment/42201746
type: Question
answer count: 2

http://stackoverflow.com/q/26685255
type: Question
has body: TopicStatistics.methods.createTopicStatistics = function(callback) { // do stuff Topic.find({} , function (err, resultList) { if(err) { // do stuff if(typeof callback === "function") callback(err); // callback undefined } else { // do stuff if(typeof callback === "function") callback(null); // callback undefined } }); }; Above is the code which I am trying to execute. The problem is this: Since mongoose topic is asynchronous my function finalizes before the mongoose.find does its work which is normal and also because of this the callback variable is cleaned and it becomes undefined. What I am looking for is a way to propagate the callback function to the mongoose.find function. Something like this: Topic.find({} , function (err, resultList, mycallback); that will enable me to use it inside my mongoose blob and to be able to call it when operations inside mongoose blob has ended.
tagged with: mongodb
has comment: http://stackoverflow.com/comment/42023106
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: callback
favorite count: 0
has title: propagating callback function to mongoose functions
tagged with: node.js
type: UnansweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26685333
has comment: http://stackoverflow.com/comment/41970407
upvote count: 1

http://stackoverflow.com/comment/42130045
type: AnswerComment
has text: there is a little bit JavaScript confliction, by the way thanks', I will handle it from here....
type: Comment
comment on: http://stackoverflow.com/a/26767229
score: 0

http://stackoverflow.com/a/26806031
type: Answer
has comment: http://stackoverflow.com/comment/42185973
answers question: http://stackoverflow.com/q/26805642
score: 0
has body: I'm guessing you want to have a function that is shared between a directive and a controller lets say? if thats the case how about creating a service and injecting the service into both directive and ctrl. This way you would only have to create it once. app.service('sharedFucntionService', function() { return { someFn : function (arg) { alert(arg + " in directive") } } }); Injecting the service into a directive app.directive('myDirective',function( sharedFucntionService){ return { link: function (scope, element, attrs) { // do something with sharedFucntionService } } }); Inject the service into the controller as well function MyCtrl($scope, sharedFucntionService){ ...... }

http://stackoverflow.com/a/26813402
has comment: http://stackoverflow.com/comment/42198734
upvote count: 1
answers question: http://stackoverflow.com/q/26813383
downvote count: 0
has body: Try using: $('.btn').prop('disabled', true); and $('.btn').prop('disabled', false); instead.
type: Answer
score: 1

http://stackoverflow.com/q/26674503
has comment: http://stackoverflow.com/comment/41948546
type: Question
has comment: http://stackoverflow.com/comment/41948410
has title: make javascript loading functions to execute one after the other
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26674615
has comment: http://stackoverflow.com/comment/41948440
possible better answer: http://stackoverflow.com/a/26674945
tagged with: javascript
has comment: http://stackoverflow.com/comment/41948957
has answer: http://stackoverflow.com/a/26674945
has comment: http://stackoverflow.com/comment/41948679
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26674615
has body: I have a function where in I execute 2 functions. When I view it in the browser, I get 2 loading symbols which i use for showing the loading of data. I wanted to know if there is a way to execute each function, one after the other, since I can avoid the 2 loading symbols. I don't want to call the second function inside the first function as a solution. The code is as shown below: function ABCD() { function x(); function y(); } I want function x() to complete its execution and then start with function y()
tagged with: jquery

http://stackoverflow.com/a/26685971
has comment: http://stackoverflow.com/comment/41969850
has comment: http://stackoverflow.com/comment/41969887
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41969899
type: Answer
accepted answer of: http://stackoverflow.com/q/26685932
score: 2
answers question: http://stackoverflow.com/q/26685932
upvote count: 2
has comment: http://stackoverflow.com/comment/41969877
has body: This seems to be the expected behavior of your code. See the following two lines. var links = h4[i].nextElementSibling; while (links &amp;&amp; links.nodeName != "H4") { You set links to the element following the current h4 element (in this case, the first one, as it never continues), and repeatedly checks if that element is truthy and is not an h4 element. Nowhere in the body of this while statement is links re-assigned, so it simple does the same check over and over again, thus causing your hanging script. I'm not sure what you are trying to do with this script, but perhaps you intended to do something link this to iterate over the sibling elements? var links = h4[i]; while ( (links = links.nextElementSibling) &amp;&amp; (links.nodeName != "H4") ) {
has comment: http://stackoverflow.com/comment/41969879

http://stackoverflow.com/a/26699032
has body: You Can use jQuery just add to your form id (like form_id in my example). $('#form_id').submit(function(){ validatePNum(sPNum) //do more things });
type: Answer
answers question: http://stackoverflow.com/q/26698829
score: 0

datetime
tags question: http://stackoverflow.com/q/26725630
tags question: http://stackoverflow.com/q/26806443
tags question: http://stackoverflow.com/q/26814343
tags question: http://stackoverflow.com/q/26803596
tags question: http://stackoverflow.com/q/26675029
tags question: http://stackoverflow.com/q/26695604
tags question: http://stackoverflow.com/q/26675107
tags question: http://stackoverflow.com/q/26738522
tags question: http://stackoverflow.com/q/26701018
tag name: datetime
tags question: http://stackoverflow.com/q/26801192
tags question: http://stackoverflow.com/q/26766037
type: Tag
tags question: http://stackoverflow.com/q/26728270
tags question: http://stackoverflow.com/q/26708541
tags question: http://stackoverflow.com/q/26676380

http://stackoverflow.com/q/26803624
has answer: http://stackoverflow.com/a/26858822
linked to: http://stackoverflow.com/q/8233670
accepted answer: http://stackoverflow.com/a/26858822
upvote count: 1
tagged with: crystal-reports
type: AnsweredQuestion
tagged with: internet-explorer
type: Question
has body: i had an asp.net application which dynamically generates pdf files on click of a button based on some data in an aspx page. This worked absolutely fine with IE8, but now in IE10, users always get the cached version, and does not get the latest pdf, and everytime the user has to clear temperory internet files, to get the latest versions. This is driving me nuts! please help! Please note: F5, ctrl+F5, changing IE cache property to load new page everytime isn't an option, since I cannot ask every user to do that! I write it to the crystal report template and export it as a pdf to a local folder on the server, and then open it in the browser using javascript (window.open()) relevant code below: string fileName = "PCT_" + this.ContractNoTextBox.Text.Trim() + "_" + this.ContractTypeList.SelectedValue[0] + "_" + this.VersionTextBox.Text.Trim(); string physicalFilePath = System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath + "ExportData\\" + fileName + ".pdf"; //Delete the file if it exists if (File.Exists(physicalFilePath)) { File.Delete(physicalFilePath); } reportdocument.ExportToDisk(ExportFormatType.PortableDocFormat, physicalFilePath); string filePathToExport = Request.Url.AbsoluteUri.Remove(Request.Url.AbsoluteUri.LastIndexOf("/")) + @"/ExportData/" + fileName + ".pdf"; string openFileScript = "window.open('" + filePathToExport + "', '_blank');"; PS: this works actually when I'm debugging on localhost, doesn't work only when I deploy it on the server. Plzzz help!!
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42181252
tagged with: javascript
tagged with: asp.net
favorite count: 0
has title: IE10 always shows cached PDF documents
tagged with: http://stackoverflow.com/tag/pdf
score: 1

http://stackoverflow.com/comment/42196444
score: 0
type: QuestionComment
has text: Have you tried watching the network tab in chrome dev tools or Firebug in FF when loading your page?
comment on: http://stackoverflow.com/q/26811857
type: Comment

http://stackoverflow.com/q/26779005
tagged with: http://stackoverflow.com/tag/html
answer count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/42135834
upvote count: 2
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/78957253
has title: Make invisble if there no content
score: 1
has answer: http://stackoverflow.com/a/26779043
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26779955
has comment: http://stackoverflow.com/comment/42135784
has body: I am currently redisigning a page - making it so JS handles the upload of the content from a txt file and CSS formats the layout of divs and HTML contains the divs. What i am trying to do is hide the DIVs that DO NOT have any content in it - currently if tehre is no content it will still display the div as a long thin line. I've tried several suggestion, however having trouble of making it work properly. Have tried 'empty cell' option in CSS, but that ruins the layout for some reason. Here is my HTML BROADCAST Here is my CSS #CurrentDate { position: absolute; top:15px; left: 210px; width:700px; text-align: center; z-index: 8; color:white; font-family:Arial; font-size:35px; text-transform: capitalize; } .main { background-color: #FFFFFF; background-image: url(backbox.gif); color: #000000; text-align: center; position: relative; overflow: auto; margin-top: 0px; margin-left: auto; margin-right: auto; top: 10px; } .main #content_divs { position: relative; text-align: left; z-index: 1; width: 960px; margin: 0 auto; border-style : solid; border-width: 3px; border-color: white; overflow: hidden; } h1 { font-family: Arial; font-size: 20px; font-weight: bold; position: relative; text-transform: capitalize; font-weight: bold; z-index: 5; } h2 { font-family: Arial; font-size: 13px; font-weight: bold; position: relative; z-index: 5; } p { font-family: Arial; font-size: 13px; position: relative; z-index: 5; margin-left: 20px; margin-right: 20px; } #buttons_div { position: relative; } #Image35 { position:relative; border: 0px #000000 solid; width: 960px; height: 96px; z-index: 2; } #Image2 { border: 0px #000000 solid; position: relative; left:30px; width: 90px; height: 34px; z-index: 3; } #Image3 { border: 0px #000000 solid; position: relative; left:30px; width: 86px; height: 34px; z-index: 4; } #Image4 { border: 0px #000000 solid; position: relative; left:-30px; width: 236px; height: 34px; z-index: 5; } #Image5 { border: 0px #000000 solid; position: relative; left:-30px; width: …
tagged with: javascript
has answer: http://stackoverflow.com/a/26780163
has comment: http://stackoverflow.com/comment/42135906

http://stackoverflow.com/a/26815812
has body: This does appear to be a potential bug with the current version of Chrome. I have raised an issue with Google in the hope of having this resolved. Thanks for the assistance.
type: Answer
accepted answer of: http://stackoverflow.com/q/26771373
answers question: http://stackoverflow.com/q/26771373
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/26771676
has comment: http://stackoverflow.com/comment/42123423
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/42124606
has comment: http://stackoverflow.com/comment/42124883
has answer: http://stackoverflow.com/a/26772665
has title: CSS transition not working on Firefox
has body: I have a div #im1 with initial position left:-300px; When a button .abtme_link is clicked the javaScript changes it's position to 443px; It's working on every other browser than Firefox; I've seen some other posts on this matter but can't seem to make it work; One of the thread concluded that css transition doesn't work on Firefox, If that's the case; is there a workaround? #im1{ width:400px; position:absolute; left:-300px; transition:all .9s ease .5s; -webkit-transition:all .9s ease .5s; -moz-transition:all .9s ease .5s; -o-transition:all .9s ease .5s; -ms-transition:all .9s ease .5s; } $('.abtme_link').click(function() { $('#im1').css('left','443px'); });
has comment: http://stackoverflow.com/comment/42124596
score: 0
has comment: http://stackoverflow.com/comment/42124416
tagged with: firefox
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42124004
has comment: http://stackoverflow.com/comment/42123704
has comment: http://stackoverflow.com/comment/42123608
has comment: http://stackoverflow.com/comment/42123639
has comment: http://stackoverflow.com/comment/42123515
has comment: http://stackoverflow.com/comment/42123594
has comment: http://stackoverflow.com/comment/42123507
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42124917
tagged with: css
has comment: http://stackoverflow.com/comment/42123490

http://stackoverflow.com/q/26805338
type: UnansweredQuestion
has body: I am in the process of deploying a set of Google Charts into SharePoint 2013. I am running into this issue where it isn't loading my data. I have tested it out in just a standard application page and it works perfectly. I will show my code below: &lt;script type="text/javascript"&gt; //approver chart var chartDataApprover; // globarlvariable to hold chart data google.load("visualization", "1", { packages: ["corechart"] }); $(document).ready(function () { $.ajax({ url: "Chart_Application_Page.aspx/GetChartDataApprover", data: "", dataType: "json", type: "POST", contentType: "application/json; chartset=utf-8", success: function (data) { chartDataApprover = data.d; }, error: function () { alert("Error loading data! Please try again."); } }).done(function () { //after data is loaded google.setOnLoadCallback(drawChartApprover); drawChartApprover(); }); }); &lt;/script&gt; //approver function function drawChartApprover() { var data = google.visualization.arrayToDataTable(chartDataApprover); //groups chart data by name var resultApprover = google.visualization.data.group(data, [0], [{ 'column': 1, 'aggregation': google.visualization.data.sum, 'type': 'number' }]); var options = { title: "Approver Spending", pointSize: 5 }; var pieChartApprover = new google.visualization.PieChart(document.getElementById('chart_div_approver')); pieChartApprover.draw(resultApprover, options); } I believe my error is coming on the line where I am setting the content type. I am deploying this into SharePoint 2013 via an Application Page... with code behind in C#. Can anyone help me out with this issue?
has title: Issue Deploying Google Charts
has comment: http://stackoverflow.com/comment/42183794
type: Question
tagged with: c#
tagged with: google-visualization
has comment: http://stackoverflow.com/comment/42183876
tagged with: javascript
tagged with: sharepoint
score: 0
answer count: 0

http://stackoverflow.com/q/26703551
score: -2
has answer: http://stackoverflow.com/a/26703661
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42000512
answer count: 3
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/26703632
has comment: http://stackoverflow.com/comment/42000460
has title: JavaScript doesn't work in my browser but works in CodePen
has answer: http://stackoverflow.com/a/26703663
has body: It's very strange and, as I do not have much experience yet, I don't understand the problem of my JavaScript not working. I made a ToTop button. In CodePen it works fine. As I scroll down it fades in &amp; out. CodePen: http://bit.ly/1ttnjRi But in Chrome it does nothing. Also, I sent all files to a friend and he had the same problem. Can someone help me? Thanks! UPDATE: Debug console gives this: Uncaught ReferenceError: $ is not defined P.S. What is the purpose of down voting? Possibly I am not the only one newbie encountering this problem. I guess stackoverflow is for helping each other in the uneasy coding stuff, not bragging about knowing something more and because of that being arrogant. Have a nice day! :)
has comment: http://stackoverflow.com/comment/42000483
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42000391
downvote count: 3
has comment: http://stackoverflow.com/comment/42000440
upvote count: 1
accepted answer: http://stackoverflow.com/a/26703632
has comment: http://stackoverflow.com/comment/42000436
has comment: http://stackoverflow.com/comment/42000450
type: Question
possible better answer: http://stackoverflow.com/a/26703661

http://stackoverflow.com/comment/42076206
comment on: http://stackoverflow.com/q/26741930
score: 0
type: Comment
type: QuestionComment
has text: @Bergi Thanks for the info. I'll have to think on that.

http://stackoverflow.com/a/26745172
score: 2
downvote count: 0
has body: try this $('.parent .child').remove();
upvote count: 2
answers question: http://stackoverflow.com/q/26745117
type: Answer

http://stackoverflow.com/comment/42109418
has text: http://jsfiddle.net/dizel3d/t0qagtc1/ It looks like your example?
score: 0
comment on: http://stackoverflow.com/q/26763706
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42159450
has text: I have installed heapdump, taken and loaded a snapshot to dev tools. They are about 20 MB. When my node process in OS is about 150 MB and Usage package keeps logging similar values. Why?
score: 0
comment on: http://stackoverflow.com/q/26785014
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26739611
has comment: http://stackoverflow.com/comment/42065296
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26739230
has body: You can use ".toFixed(2)" it wil always round of to 2 decimals. However it will return a string instead of a float/decimal number. JSFiddle See the link for your example code to work

http://stackoverflow.com/a/29681382
score: 0
answers question: http://stackoverflow.com/q/26681776
type: Answer
has body: I tried and mixed a lot of found in web and created this one. So far it's working for me... just give it a try $(document).on('keypress', 'input, select, checkbox, radio, button', function (e) { return focusNextOnEnter(e, this); }) and the function somewhere in your JS file. function focusNextOnEnter(e, selector) { var longSelector = 'input:visible:enabled:not([readonly="readonly"]), textarea:visible:enabled:not([readonly="readonly"]), select:visible:enabled, button:visible:enabled'; var keyCode = e.keyCode || e.which; if ($(selector).is(':not(textarea)') // it's not a textarea - enter in text area &amp;&amp; keyCode === 13 // it's enter key &amp;&amp; !($(selector).attr('id') === 'submitButton')) // it's not submitButton, save-on-enter here { e.preventDefault(); $(longSelector)[$(longSelector).index($(selector)) + 1].focus(); return true; } } instead of the last check $(selector).attr('id') === 'submitButton' you can always check $(selector).is('[type="submit"]') this will hopefully return what you are looking for i.e. submit on enter on submit button

http://stackoverflow.com/comment/42074541
comment on: http://stackoverflow.com/a/26744458
score: 0
type: AnswerComment
type: Comment
has text: please re-write his adding function! haha! upvote none-the-less

http://stackoverflow.com/q/26696215
favorite count: 0
tagged with: modular-design
has title: Structure application by using jQuery
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26703756
has comment: http://stackoverflow.com/comment/41990269
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/41994454
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/41995384
has body: I am going to build an application as it is not too much rich otherwise I can use angularjs for that purpose. I wanted to organize my JS code into proper modular programming approach. E.g var SignUpModule = { elem: $('#id'), // unable to access jquery object here init: function (jQuery) { alert(jQuery('.row').html()); } }; var application = { modules: [], addModule: function (module) { this.modules.push(module); }, run: function (jQuery) { _.each(this.modules, function (module) { //Iterate each module and run init function module.init(jQuery); }); } } jQuery(document).ready(function () { application.addModule(SignUpModule);//add module to execute in application application.run(jQuery);//Bootstrap application }); Please now look at it I have updated my question with actual code
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26703756
answer count: 1

http://stackoverflow.com/q/26809662
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/26810204
type: UnansweredQuestion
tagged with: loading
has title: Post slider loads vertically instead of horizontally
type: Question
tagged with: javascript
has body: All post sliders on this site load vertically for a few seconds before it loads. All the styles load - it' s the javascript that's affecting it. Can it simply be because it loads over 50 fairly sized images?

http://stackoverflow.com/q/26805471
type: Question
answer count: 2
score: 5
upvote count: 5
linked to: http://stackoverflow.com/q/7744611
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42184688
accepted answer: http://stackoverflow.com/a/26805618
has comment: http://stackoverflow.com/comment/42184694
has title: angular, pass a scope into a function (passing scope as variable?)
possible better answer: http://stackoverflow.com/a/34922998
has answer: http://stackoverflow.com/a/34922998
favorite count: 0
has body: I'm trying to pass a scope into a function and I can't seem to get it to work correctly. Here's what I have - ng-click="clickFunction(scope1)" //the function $scope.clickFunction = function(passedScope){ passedScope = false; console.log($scope.scope1); So - it's prett straight forward I just want to pass in the scope and set it to false in this click. When I log the scope after changing it hwever it still says it's true. I also tried - $scope.passedScope What I am trying to do is set $scope.scope1 = false. It is set in the top of the controller as true and controls a button nearby by that button having ng-disabled="!scope1", I cant just do a scope1 =!scope! on the click because it goes through a modal to confirm the user wants to complete then runs a modalInstance.result.then(function () { there I then need to set the passed scope to false. I would just call the scope directly, but I'm trying to make a function which I can use across multiple delete functions, thus trying to pass he scope that needs changing to false. I was thinking I could just pass the scope through the function. Thanks! update According to what @Josep showed me today I was able to make a work around by passing the scope as a string like so ng-click="clickFunction('scope1')" and then doing $scope[passedScope] = false;
has comment: http://stackoverflow.com/comment/42184214
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42183993
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42184307
has answer: http://stackoverflow.com/a/26805618

http://stackoverflow.com/comment/42077452
comment on: http://stackoverflow.com/q/26746044
has text: I grasp the concept, please provide some html or Jsfiddle, thanks
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26728938
tagged with: preload
tagged with: css
type: AnsweredQuestion
downvote count: 0
type: Question
score: 1
has title: How to load website template first and the content comes later
has answer: http://stackoverflow.com/a/26729417
accepted answer: http://stackoverflow.com/a/26729417
answer count: 2
has comment: http://stackoverflow.com/comment/42046101
upvote count: 1
tagged with: javascript
tagged with: web
possible better answer: http://stackoverflow.com/a/26729106
favorite count: 0
has answer: http://stackoverflow.com/a/26729106
has body: here's the sample website:https://www.mapbox.com/plans/ or http://facebook.com/ I'm curious about that how they make the pre-visual of the website with template only and load the content later. All I can imagine is hide all content first and show it after everything loaded. Is that right track? any ideas would be helpful, thanks. It's the first sight when you open the http://www.mapbox.com and after you can see the content. That's the transition what i want to know. If using ajax, what about the menu or text at first? Thanks :)
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/42194464
score: 0
has text: +1 I would like to see a detailed answer on this one
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26810901

http://stackoverflow.com/q/26829228
score: 0
tagged with: javascript
tagged with: jquery
has body: I use the VideoJS framework, i want know when the user pause the video. The video go to pause when i click on "Play button" and on video: var vjs = document.getElementById("really-cool-video_html5_api"); // on video var vjs = document.getElementById("really-cool-video").getElementsByClassName("vjs-play-control")[0]; // click button play I with Listener, see if the user click on this "div" : vjs.addEventListener("click", checkPause, false); but it control only when i click on document.getElementById("really-cool-video").getElementsByClassName("vjs-play-control")[0] i want, both 2 div in my listener... I can't change the HTML and tell the div with the same name... How i can do a Listener of two elements?
has answer: http://stackoverflow.com/a/26876790
tagged with: video.js
has comment: http://stackoverflow.com/comment/42225833
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26829635
answer count: 4
type: AnsweredQuestion
tagged with: listener
has comment: http://stackoverflow.com/comment/42225788
has title: GetElementby More Item
has comment: http://stackoverflow.com/comment/42225760
accepted answer: http://stackoverflow.com/a/26876790
type: Question
has answer: http://stackoverflow.com/a/26829314
has comment: http://stackoverflow.com/comment/42225815
has answer: http://stackoverflow.com/a/26829591
has comment: http://stackoverflow.com/comment/42225942
possible better answer: http://stackoverflow.com/a/26829314
has comment: http://stackoverflow.com/comment/42225785
has comment: http://stackoverflow.com/comment/42225797

http://stackoverflow.com/q/26741456
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26742505
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42073724
upvote count: 2
has title: How to correctly create HTML5 audio and video with JavaScript
score: 2
accepted answer: http://stackoverflow.com/a/26742505
tagged with: video
tagged with: audio
type: AnsweredQuestion
type: Question
linked to: http://stackoverflow.com/q/15286407
has body: I checked out the w3c specification and it seems that in JavaScript we can create HTML5 audio in 2 ways, whereas for HTML5 video there's just one way: Audio: var audio = document.createElement('audio'); or var audio = new Audio(); Video: var video = document.createElement('video'); But is it true that for HTML5 video there is no equivalent constructor like new Video()? //edit: seems like in March 2013 there was no equivalent..

http://stackoverflow.com/a/26714872
answers question: http://stackoverflow.com/q/26714796
score: 0
has body: Please try adding this CSS: #jason { overflow: hidden; } #jason ul { display: block; padding: 0px; } Moreover, remove this from your stylesheet: html,body{ min-height: 100%; }
type: Answer

http://stackoverflow.com/a/26726548
score: 1
answers question: http://stackoverflow.com/q/26726180
has body: You can use the jQuery .scroll() function to achieve what you're trying to do. Here's a little code that I've created which would work perfectly for you: $(window).scroll(function() { if ($(this).scrollTop() &gt; 500) { $("#footerhead").css("height","5%"); } else if ($(this).scrollTop() &lt; 500) { $("#footerhead").css("height","20%"); } }); What happens is that if the user scrolls down 500px on your website, the height of the #footerhead div reduces to 5% thus hiding a larger part of the face and making the content area more visible. Next when the user scrolls back up, the height of the #footerhead div increases back to 20%. You can also set the value of scroll from 500px to any other value of your choice.
downvote count: 0
type: AcceptedAnswer
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26726180

http://stackoverflow.com/comment/42119535
type: QuestionComment
has text: @RajaNaresh did you actually check the network panel to see if any element gets imported more than once?
comment on: http://stackoverflow.com/q/26766181
type: Comment
score: 0

http://stackoverflow.com/q/26812315
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/42197349
has title: javascript disable input image submit button triggered before click event in chrome
has answer: http://stackoverflow.com/a/26812493
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42197258
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/42197120
tagged with: javascript
tagged with: forms
has body: I'm working on disabling the submit button after the first click to avoid form submission errors. Due to the way I have validation set up if the form is submitted twice the 'hash' will be checked twice throwing an error. the following code works in all browsers except Chrome function submitHandler() { var submit = document.getElementById('subImage'); if (submit) { submit.addEventListener('click', submitClick, false); } } function submitClick() { this.disabled=true; return true; } If I comment out this.disabled=true; the form submits fine so it appears that the image button is disabled before an event is triggered. any help on this will be greatly appreciated. the submit is an input image. &lt;input type="Image" id="subImage" src="Images/Submit.gif" alt="Submit"&gt;
has comment: http://stackoverflow.com/comment/42197075

http://stackoverflow.com/comment/60807508
has text: Title of op: "get the deleted element from backspace event", your answer deletes multiple elements based on same class. When I was googling around for how to get last element, and only last element deleted this came up as a potential answer. If OP found this answer useful then title should be changed...
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26762052

http://stackoverflow.com/comment/42055947
comment on: http://stackoverflow.com/q/26734682
type: Comment
type: QuestionComment
has text: number.toFixed(numberOfDecimals)
score: 1

http://stackoverflow.com/comment/42169139
comment on: http://stackoverflow.com/q/26797274
score: 0
type: Comment
type: QuestionComment
has text: Ah.. do you mean this: http://jsfiddle.net/abhitalks/79v0xfjd/1/ ?

http://stackoverflow.com/q/26740864
has answer: http://stackoverflow.com/a/26740998
accepted answer: http://stackoverflow.com/a/26740998
type: AnsweredQuestion
tagged with: backbone-events
score: 1
possible better answer: http://stackoverflow.com/a/26741120
upvote count: 1
type: Question
tagged with: javascript
has body: How do you know if a model is the last one in the batch? // inside view collection = new ObjectCollection(); this.listenTo(collection, 'add', added); added: function(mod){ //if(mod.position.last) } collection.add([{'name': 'Human'}, {'name': 'Cat'}]);
answer count: 2
has answer: http://stackoverflow.com/a/26741120
downvote count: 0
has title: Last element in Backbone collection add / reset?
favorite count: 0
tagged with: backbone.js

http://stackoverflow.com/comment/42096780
score: 0
type: Comment
type: QuestionComment
has text: try with the html provided in the help page... that should work.
comment on: http://stackoverflow.com/q/26728694

http://stackoverflow.com/q/26780344
has title: Ember js transition and refresh when entered into the routed page
has comment: http://stackoverflow.com/comment/48677905
has body: I am using ember model in my ember app and in the view I perform some logic in the didInsertElement hook of the ember view - // changing a field in the db via ajax and then this.get('controller').transitionToRoute('courses'); Now when I go to the courses route the field is not updated because ember model has not got the latest data from the api. How do I make ember data to refresh the page after the transition. Suggestions - 1) Should I refresh after the ajax call 2) Should I refresh when I enter the courses route ? Please help me out.
type: Question
tagged with: javascript
score: 0
tagged with: ember.js
tagged with: ember-model
has comment: http://stackoverflow.com/comment/48663241
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/26762872
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26761625
answers question: http://stackoverflow.com/q/26761625
type: Answer
downvote count: 1
upvote count: 5
has body: As you can see on MDN's initEvent page, using events like that is deprecated. "Use event constructors instead": https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events In your case: var evObj = new Event('click'); a.dispatchEvent(evObj); But click events are much simpler! Native DOM has a click() method for all elements, so you can do this: a.click(); That's it. If you want to trigger custom events or events like mouseover, you can still use the (new) event dispatch system: new Event('mouseover') etc
score: 4

http://stackoverflow.com/comment/42055746
score: 0
comment on: http://stackoverflow.com/q/26734479
type: Comment
type: QuestionComment
has text: You can use a url parameter to pass the active tab and then intercept it in javascript and set your tabs accordingly. Is this along the lines of what you are trying to achieve?

http://stackoverflow.com/q/26715307
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26715440
favorite count: 0
accepted answer: http://stackoverflow.com/a/26715350
tagged with: twitter-bootstrap
score: 1
has body: I want to run some JavaScript code before modal window is shown, but when i click on button nothing happens and browser console doesn't give me any error. jsfiddle EDGE
upvote count: 1
tagged with: twitter-bootstrap-2
has title: Click listener for button doesn't work in Bootstrap
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26715350
answer count: 2
possible better answer: http://stackoverflow.com/a/26715440
downvote count: 0

http://stackoverflow.com/comment/42068680
score: 0
type: Comment
has text: This would not work, because the OP interested in addressing DOM elements that already exist and have data but whose data was updated.
comment on: http://stackoverflow.com/a/26741438
type: AnswerComment

http://stackoverflow.com/comment/42206244
type: Comment
type: QuestionComment
has text: Salaman A - I did that and there is nothing showing font weight etc :(
score: 0
comment on: http://stackoverflow.com/q/26804403

http://stackoverflow.com/comment/42059400
type: QuestionComment
type: Comment
has text: edited adding link to live example and more information on the browser I see the issue on
score: 0
comment on: http://stackoverflow.com/q/26734816

http://stackoverflow.com/q/26740402
score: 1
has comment: http://stackoverflow.com/comment/42291841
accepted answer: http://stackoverflow.com/a/26740572
has comment: http://stackoverflow.com/comment/42291859
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42067674
tagged with: css
has comment: http://stackoverflow.com/comment/42066745
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26740572
upvote count: 1
has comment: http://stackoverflow.com/comment/42066736
has body: I'm struggling to solve simple script: I would like to change an &lt;li&gt; item css class when radio button clicked. I've created an onclick event and passing 2 parameters to the function 'setColor'. Then in the function I concatenate the .style with the value of radio button clicked. So far I've got the following: function setColor(a, b){ document.getElementByTd("id").setAttribute('.STYLE' + a); } My items generated dynamically from the db package, same as styles. I would like to apply the 'correct' style when users click on the radio button. But unfortunately, I've got the error : "Object doesn't support property or method 'getElementByTd'". Confused and already spent hours and hours to identify the problem ... must be something very simple, but cannot figure out. Any help would be appreciated! Thanks
has title: change style class onclick, based on radio group click
type: Question

http://stackoverflow.com/comment/41998473
has text: Thank you so much Venkata, I followed the url you posted, and deleted the comment in my php file and it worked! You rock dude!!!
type: AnswerComment
comment on: http://stackoverflow.com/a/26702071
score: 0
type: Comment

http://stackoverflow.com/comment/41957606
type: AnswerComment
score: 0
has text: @Haltinpot try this `$scope.data.period = currentHours > 12 ? $scope.range.period[1] : $scope.range.period[0];`
type: Comment
comment on: http://stackoverflow.com/a/26679034

rally
tags question: http://stackoverflow.com/q/26785694
type: Tag
tag name: rally

http://stackoverflow.com/q/26756222
has comment: http://stackoverflow.com/comment/42094596
has body: I have my navbar in a file called navbar.php which I include in each of the indiviual pages. I want to know how to add the active class to the button of the page that is selected using php. I have seen many tutorials of using jquery but since this happens on the page load there must be a solution without having to use jquery/javascript etc. So for example I have a line: About us I want there to be a line of code in aboutus.php which can change this earlier php code to About us Thanks
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26756339
tagged with: jquery
has answer: http://stackoverflow.com/a/26756369
possible better answer: http://stackoverflow.com/a/26756339
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
type: AnsweredQuestion
has title: How to set li to active in php
accepted answer: http://stackoverflow.com/a/26756369
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26756350

http://stackoverflow.com/q/26715674
favorite count: 0
has comment: http://stackoverflow.com/comment/42021673
has title: Is there a good inline solution to add up without going above a defined value?
downvote count: 2
accepted answer: http://stackoverflow.com/a/26715753
upvote count: 1
has comment: http://stackoverflow.com/comment/42021656
type: AnsweredQuestion
tagged with: algorithm
has body: For some reasons i need to reduce the size of my application, and i'm pretty sure there is a way to free room. So, is there a smarter way to do this without making usage of an if ? currentMoney = 46; maximumMoney = 100; moneyIncome = 72; currentMoney = currentMoney + moneyIncome; if (currentMoney &gt; maximumMoney) currentMoney = maximumMoney;
score: -1
has comment: http://stackoverflow.com/comment/42021670
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26715753

http://stackoverflow.com/comment/42173383
comment on: http://stackoverflow.com/a/26797389
has text: "These have to be named 'opdracht1' through to 'opdracht10'." But here, they are not so named, but rather held in a dictionary with that as the key.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26811211
favorite count: 0
has comment: http://stackoverflow.com/comment/42234570
has comment: http://stackoverflow.com/comment/42386362
has comment: http://stackoverflow.com/comment/42282065
tagged with: single-page-application
accepted answer: http://stackoverflow.com/a/26919271
has answer: http://stackoverflow.com/a/26835558
has answer: http://stackoverflow.com/a/26835871
has body: We are developing a Single Page Application with AngularJS and ASP.NET MVC Json Rest API. When an unauthenticated client tries to navigate to a private route (Ex: /Foo/Home/Template) to get a template, it gets a 401 response from the Web API and our AngularJS app automatically redirects it to the login page. We are handling the 401 with $http interceptor with something like this: if (response.status === 401) { $location.path(routeToLogin); return $q.reject(response); } Entering the correct credentials allows the client to get the template. Everything is working perfectly except for one detail; the Javascript console reports this error: Error: [$compile:tpload] http://errors.angularjs.org/1.3.0/$compile/tpload?p0=%Foo%2FHome%2FTemplate%2F AngularJs documentation states this: Description This error occurs when $compile attempts to fetch a template from some URL, and the request fails. In our AngularJs app the request fails but it is by design because the resource is there but it cannot be accessed (401). Should I move on and accept this kind of error on console or is it possible to mute or shield it in some way? EDIT: I have debugged the angular source a little bit and I found what part of the code is raising the exception. Since we are using TemplateUrl to declare our templates, we are indirectly using the function compileTemplateUrl that makes this call: $templateRequest($sce.getTrustedResourceUrl(templateUrl)) this leaves the second parameter (ignoreRequestError) of templateRequest undefined. ignoreRequestError(optional)boolean Whether or not to ignore the exception when the request fails or the template is empty When our http interceptor, handling the 401 status code, rejects the promise, the $http.get inside the $TemplateRequestProvider fails and calls this function: function handleError() { self.totalPendingRequests--; if (!ignoreRequestError) { throw $compileMinErr('tpload', 'Failed to load template: {0}', tpl); } return $q.reject(); } I believe we can't do any…
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42385004
possible better answer: http://stackoverflow.com/a/26835558
has comment: http://stackoverflow.com/comment/42243189
has comment: http://stackoverflow.com/comment/42284118
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26919271
has title: How to avoid $compile:tpload errors on 401 status code response
type: Question
tagged with: angularjs-routing
upvote count: 15
has comment: http://stackoverflow.com/comment/42396526
answer count: 3
linked to: http://stackoverflow.com/q/34028703
has comment: http://stackoverflow.com/comment/42236134
has comment: http://stackoverflow.com/comment/42284567
downvote count: 0
has comment: http://stackoverflow.com/comment/42235748
tagged with: javascript
has comment: http://stackoverflow.com/comment/42251195
has comment: http://stackoverflow.com/comment/42281855
has comment: http://stackoverflow.com/comment/42396621
score: 15

http://stackoverflow.com/q/26751637
score: 0
has title: How to use javascript variable when using opener.parent?
has answer: http://stackoverflow.com/a/26751815
tagged with: javascript
type: AnsweredQuestion
has body: How do I use the variable in this case? It works in alert, and normal conditions. But how do I use it in this case? I think the "dot" destroys the function..? &lt;script langauge="javascript"&gt; function post_value2(formName){ opener.document.formName.viamedlem.value = document.frm.c_name.value; //alert(formName); //alerts cookies self.close(); } &lt;/script&gt; I have tested with +formName+, {formname} and the only thoughts I have right now is to convert it to an object, but it sounds a bit overkill for a simple thing as this..? &lt;input ... onclick="post_value2('cookies');"&gt;
has comment: http://stackoverflow.com/comment/42086842
type: Question
accepted answer: http://stackoverflow.com/a/26751815
answer count: 1

http://stackoverflow.com/a/26736600
has body: Figure it up with: -css3 -html5 -javascript timer var arrColor = ["#45c1bf", "#f0593e", "#aeacd4", "#bdd630", "#4479bd", "#f5b11e"]; var footer = document.getElementById("footer"); var header = document.getElementById("header"); //helper function - get dark or lighter color function LightenDarkenColor(col, amt) { var usePound = false; if (col[0] == "#") { col = col.slice(1); usePound = true; } var num = parseInt(col, 16); var r = (num >> 16) + amt; if (r > 255) r = 255; else if (r < 0) r = 0; var b = ((num >> 8) & 0x00FF) + amt; if (b > 255) b = 255; else if (b < 0) b = 0; var g = (num & 0x0000FF) + amt; if (g > 255) g = 255; else if (g < 0) g = 0; return (usePound ? "#" : "") + (g | (b << 8) | (r << 16)).toString(16); } //random new color function GetNewColor() { var index = Math.floor((Math.random() * 5) + 1); return arrColor[index]; } // set new color function SetNewColor(color) { document.body.style.background = color; var NewColor = LightenDarkenColor(color, -20); footer.style.backgroundColor = NewColor; header.style.backgroundColor = NewColor; //footer.style.opacity = 1.2; } // on document load function start (function() { var colorSelected = GetNewColor(); SetNewColor(colorSelected); })(); //change color timer window.setInterval(function() { var colorSelected = GetNewColor(); SetNewColor(colorSelected); }, 2000); * { margin: 0; padding: 0; } body { background: #bdd630; transition: background-color 0.5s ease; color: #fff; } #header { background: #000; height: 40px; text-align: center; } #content { /* Now, to activate scrollbars and compensate #footer height: */ padding-bottom: 40px; } #footer { background: #000; position: fixed; bottom: 0px; width: 100%; /* cause of fixed pos */ height: 40px; text-align: center; } header content here footer Enjoy
has comment: http://stackoverflow.com/comment/42059738
has comment: http://stackoverflow.com/comment/42059534
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42059805
has comment: http://stackoverflow.com/comment/42060345
answers question: http://stackoverflow.com/q/26736578
downvote count: 1
has comment: http://stackoverflow.com/comment/42059673
has comment: http://stackoverflow.com/comment/42061460
score: 0
has comment: http://stackoverflow.com/comment/42062421

http://stackoverflow.com/comment/42209947
comment on: http://stackoverflow.com/q/26820016
has text: you get errors telling you that you use invalid syntax... ffs, read the error message.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26713616
has body: Do you mean this? $(document.body).on('change', 'select#category-navbar', function(e) { $('.selected-value').text($(this).val()); e.preventDefault(); });
answers question: http://stackoverflow.com/q/26713551
has comment: http://stackoverflow.com/comment/42021212
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42021642
has comment: http://stackoverflow.com/comment/42018014
score: 1
upvote count: 1

http://stackoverflow.com/comment/42168156
comment on: http://stackoverflow.com/a/26796895
score: 0
type: AnswerComment
has text: OK looks promising. Thanks. I'll delve further into that.
type: Comment

http://stackoverflow.com/comment/105216515
comment on: http://stackoverflow.com/a/26716272
type: Comment
score: 0
has text: I've having the same issue as @mohamnag, the bridge works for the first page load but not subsequent ones.
type: AnswerComment

http://stackoverflow.com/a/26770640
has comment: http://stackoverflow.com/comment/42121839
answers question: http://stackoverflow.com/q/26770566
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42121630
has body: Your JSON string is invalid. You are ending your string quotes early { ID: "0908", UserHtml: "&lt;table &gt;&lt;tbody&gt;&lt;trclass="..... &lt;- You're closing your quotes here } Try using single quotes instead { ID: "0908", UserHtml: '&lt;table &gt;&lt;tbody&gt;&lt;trclass="..etc..." | ^ double quotes for html within JSON string ^ single quotes around JSON object } Also make sure that you don't include any new lines. I recommend checking JSON lint sites like http://jsonlint.com/ to validate your JSON

http://stackoverflow.com/comment/42087596
type: QuestionComment
has text: $("#optimize").click( function (){ var blur=$(".blur").html(); if(blur==="0px"){ $(".blur").hide(); } else{ $(".blur").show(); } });
comment on: http://stackoverflow.com/q/26751902
score: 0
type: Comment

http://stackoverflow.com/comment/42143630
type: QuestionComment
has text: Did u included required Javascripts?
comment on: http://stackoverflow.com/q/26783306
score: 0
type: Comment

http://stackoverflow.com/comment/92963160
has text: @JoãoPimentelFerreira Q is a library. You can replace `Q.delay(N)` with `new Promise(r => setTimeout(r, N))` and live happily ever after :)
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26694802

http://stackoverflow.com/a/26736396
score: 0
type: Answer
has body: Allow only single space between words: /^[a-z]+( [a-z]+)*$/i.test(str);
answers question: http://stackoverflow.com/q/26736270

http://stackoverflow.com/comment/42151492
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26787071
has text: Your solution works perfectly. I've implemented it and developed it a bit further. I just get some errors in the console because all variables are undefined till the user filters the list by date or by any other property (see Edit). Any quick workaround to get rid of the errors? If it's a mess I'd leave it like this as it delivers what I need.
score: 0

http://stackoverflow.com/q/26683375
has body: I want to load a JSON into a timemap, and my code seems to be missing something to configure the JSON correctly. JSON format below {"results": [{"Lat": "34.0453113", "text": "Historic Core DTLA", "Lon": "-118.2501836", "bicyclistCount": "26", "date": "2014-10-15"}, {"Lat": "34.0444899", "text": "Spring @ 7", "Lon": "-118.2523059", "bicyclistCount": "16", "date": "2014-10-26"}]} This link contains the html file based mainly on a timemap example. It opens up the timeline and map, but the data does not load. Also the map won't zoom in and out, though I want to solve the JSON load issue first. Do you have a suggestion on what I can change? Adding the JavaScript code below. Thanks, Patty The JavaScript code: var tm; var errFn = function(jqXHR, textStatus, errorThrown){ alert(textStatus); } $(function() { tm = TimeMap.init({ mapId: "map", // Id of map div element (required) timelineId: "timeline", // Id of timeline div element (required) options: { eventIconPath: "../images/" }, datasets: [ { title: "JSON String Dataset", type: "json", options: { // json file url: "output.json", &lt;!--this file sits in the same folder as the HTML--&gt; error: errFn, } } ], bandIntervals: [ Timeline.DateTime.DAY, Timeline.DateTime.WEEK ] }); &lt;!--start loading data--&gt; function transformData(data) { var text, Lat, Lon, bicyclistCount, date; &lt;!--is this how the data is called?--&gt; var newData = { "title" : text, "start" : date, "options" : { "description" : bicyclistCount } }; newData["point"] = { "lat" : Lat, "lon" : Lon, }; } }); &lt;!--end loading data--&gt;
favorite count: 0
possible better answer: http://stackoverflow.com/a/26684280
answer count: 3
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/36484064
accepted answer: http://stackoverflow.com/a/26684310
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26684280
score: 1
tagged with: http://stackoverflow.com/tag/json
has title: Loading JSON into timemap
has answer: http://stackoverflow.com/a/26684310
has comment: http://stackoverflow.com/comment/41965680
has comment: http://stackoverflow.com/comment/41965582
tagged with: google-maps
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/26682320
has body: Map can be used call a function on each object in an array. http://api.jquery.com/jquery.map/
score: 1
has comment: http://stackoverflow.com/comment/41963323
answers question: http://stackoverflow.com/q/26682274
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26682274
type: Answer
upvote count: 2
downvote count: 1

http://stackoverflow.com/q/26773747
tagged with: angularjs
has title: Dynamic change of angular expression not working
type: AnsweredQuestion
upvote count: 1
accepted answer: http://stackoverflow.com/a/26773822
type: Question
tagged with: javascript
has body: I have an angular expression for ng-show attribute. and in my controller $scope.shipment={type:2} and in a click event I am changing the value like this $scope.shipment.type = 1; And when this click happens I expect the div to show, which is not happening for some unknown reason. after the click event my rendered HTML is like this I Can't understand why the div is till not showing?
has comment: http://stackoverflow.com/comment/42126711
answer count: 1
downvote count: 0
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26773822

http://stackoverflow.com/comment/42127664
has text: You should probably be using arrays, not a bunch of variables.
comment on: http://stackoverflow.com/q/26774328
score: 1
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26767827
accepted answer: http://stackoverflow.com/a/26767955
answer count: 1
tagged with: javascript
has body: I was following an example source code I found for populating a html table from javascript. However there is a disconnect in my knowledge. The javascript is inside a populateTable function to find an element and create the other elements for the table and populate it from an array. I don't want this to be done from a button click but when the screen loads. So lets say... Products List of products below: <--- how do I tell this table to be populated from my populateTable function Any feedback is appreciated! EDIT: - I'm clearly learning javascript :) Trying to do core javascript.
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Populate html table onload from javascript
has answer: http://stackoverflow.com/a/26767955
linked to: http://stackoverflow.com/q/588040
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42116569
type: Question
has comment: http://stackoverflow.com/comment/42116584

http://stackoverflow.com/a/26754473
has comment: http://stackoverflow.com/comment/42098915
has body: You can use: $id = $_REQUEST['mydata']; // for post or get Attention how you send ajax request ( type: 'post') if you what to use $_POST or $_GET.
answers question: http://stackoverflow.com/q/26754173
score: 0
type: Answer

http://stackoverflow.com/comment/41992987
has text: If you did not declare `$option` somewhere this means that [register globals](http://php.net/manual/en/security.globals.php) is turned on. Register globals "auto-magically" makes global variables for any GET parameter in the request. It is depreciated and A VERY BAD IDEA.
comment on: http://stackoverflow.com/a/26699203
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26730602
answer count: 3
upvote count: 0
accepted answer: http://stackoverflow.com/a/26730660
has title: Create Javascript object with one array property
favorite count: 0
possible better answer: http://stackoverflow.com/a/26730669
has answer: http://stackoverflow.com/a/26730669
tagged with: javascript-objects
has answer: http://stackoverflow.com/a/26730686
has body: How to create a javascript object runtime like following task{ timestamp:string; tasklist: array of object }
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42048808
downvote count: 2
type: Question
score: -2
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/26730660

http://stackoverflow.com/comment/42103104
comment on: http://stackoverflow.com/a/26760598
type: AnswerComment
has text: I'm getting "/BASHVAR/{n; s/.*/var f ...": bad flag in substitute command: '}'
score: 0
type: Comment

select-menu
tags question: http://stackoverflow.com/q/26736240
type: Tag
tag name: select-menu

http://stackoverflow.com/comment/42215591
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26823165
has text: You right i updated the question with the php code.The php script in <?php and ?> should add to array the images from a directory and then i want to loop over the array and use it to display the images with the flexslider jquery.

http://stackoverflow.com/a/26755918
score: 0
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42095443
answers question: http://stackoverflow.com/q/26755895
type: Answer
has body: You should use e.preventDefault() as soon as you submit the form.
has comment: http://stackoverflow.com/comment/42094092

http://stackoverflow.com/comment/42070614
type: Comment
score: 0
has text: @user1629055 - Leave `price` as `double` (especially, if you use it for calculations).
type: AnswerComment
comment on: http://stackoverflow.com/a/26742353

http://stackoverflow.com/q/26788573
downvote count: 0
tagged with: javascript
has body: Why do I get an function is undefined error for vector.unproject while it's stated in the documentation? http://threejs.org/docs/#Reference/Math/Vector3 (one of the last items) If I console log it, it also comes back as undefined while the rest of Threejs is working A-Okey. Is it depricated? What is the replacement? I want to Raycast and click detect on a loaded .obj file and this is stated as a way of doing this. My code [I use RequireJS and Backbone hence the way the function is structured]: click: function(event){ var vector = new THREE.Vector3(); vector.set( ( event.clientX / window.innerWidth ) * 2 - 1, - ( event.clientY / window.innerHeight ) * 2 + 1, 0.5 ); console.log(vector.unproject); //returns undefined vector.unproject( this.camera ); //stops here and returns function is undefined var dir = vector.sub( this.camera.position ).normalize(); var distance = - this.camera.position.z / dir.z; var pos = this.camera.position.clone().add( dir.multiplyScalar( distance ) ); },
favorite count: 0
has answer: http://stackoverflow.com/a/41326171
type: UnansweredQuestion
score: 1
tagged with: raycasting
has title: Threejs vector.unproject( this.camera ) is undefined
tagged with: three.js
upvote count: 1
has comment: http://stackoverflow.com/comment/42154626
type: Question
has comment: http://stackoverflow.com/comment/42153546
answer count: 1

http://stackoverflow.com/comment/42186134
type: QuestionComment
comment on: http://stackoverflow.com/q/26806523
has text: o_O thats nice block of text...
score: 0
type: Comment

http://stackoverflow.com/comment/42059342
has text: Define *'early'*? See the [`classList` shim on MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element.classList#wrapper) For IE>7
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26736587
score: 2

http://stackoverflow.com/comment/140110691
has text: Reminder: if you are working under different namespaces (like svg), please remember to create the `a` element with `xhtml` namespace: `let a = document.createElementNS("http://www.w3.org/1999/xhtml", "html:a")` to make this actually a link that have a `click()` function.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26690558

http://stackoverflow.com/a/26695204
has comment: http://stackoverflow.com/comment/41986360
type: Answer
score: 7
has comment: http://stackoverflow.com/comment/41994141
upvote count: 7
has body: use bind and move the argument list around var getSettings = function(instance, id, mode) { return findByInstance(instance) .then(useModelFromData.bind(null, id, mode)) .catch(useDefaultModel.bind(null, id, mode)); }; var useModelFromData = function(id, mode, data) { var settings = data.model.settings; applyFeatures(settings, id, mode); return data.model; }; var useDefaultModel = function(id, mode) { var model = myModel.getDefaultModel(); applyFeatures(model.settings, id, mode); return model; }; With bind you can set arguments to be prepended to the arguments list when the function is executed. So in this case id and mode will get prepended to the arguments that get passed to useModelFromData and useDefaultModel
answers question: http://stackoverflow.com/q/26695116
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26695116
downvote count: 0
has comment: http://stackoverflow.com/comment/41985507
has comment: http://stackoverflow.com/comment/48114613

http://stackoverflow.com/a/26761473
downvote count: 0
has body: Your code is close, but your .each() loop is fetching the HTML of only the first element in the list: jQuery(".nspText.tleft.fleft").each(function() { var $element = jQuery(this); $element.html($element.html().replace("{AC}", "")); }); You code fetched the HTML from jQuery(descr) instead of jQuery(this). A slightly more streamlined way to do this: jQuery(".nspText.tleft.fleft").html(function(index, oldHtml) { return oldHtml.replace("{AC}", ""); }); The .html() method lets you pass in a function, and it'll pass that function the index of each element in the selected list, plus the old HTML of that element. The return value is used as the replacement HTML.
accepted answer of: http://stackoverflow.com/q/26761396
upvote count: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26761396
type: Answer
score: 3

http://stackoverflow.com/comment/42208338
type: QuestionComment
type: Comment
has text: @Juhana - was just looking for that one, it seems to fit perfectly here!
comment on: http://stackoverflow.com/q/26819287
score: 0

http://stackoverflow.com/comment/42002284
has text: @user3280865 Yep, you got it. You can break the string up as many times as you want, adding dynamic content as you go.
comment on: http://stackoverflow.com/a/26704252
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26781835
type: Question
score: 5
has answer: http://stackoverflow.com/a/26781987
upvote count: 5
tagged with: javascript
duplicate of: http://stackoverflow.com/q/15449325
answer count: 2
downvote count: 0
has title: Preserving line breaks in AngularJS
favorite count: 0
has comment: http://stackoverflow.com/comment/42141350
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26781942
has body: I am working on an app that uses AngularJS. My controller looks like this: function TestCtrl($scope) { $scope.lines = 'var x=1;\nvar y=2;'; } My view looks like this: &lt;div ng-controller="TestCtrl"&gt; &lt;p&gt; Output:&lt;br /&gt; &lt;code&gt;{{lines}}&lt;/code&gt; &lt;/p&gt; &lt;/div&gt; When the view is rendered, the value in $scope.lines is rendered on a single line like this: var x=1; var y=2; However, I want to display it as: var x=1; var y=2; What am I doing wrong? I tried switching \n with &lt;br /&gt;, however, that did not work either.
has comment: http://stackoverflow.com/comment/42141009
linked to: http://stackoverflow.com/q/15449325
linked to: http://stackoverflow.com/q/18340872

http://stackoverflow.com/comment/41954777
comment on: http://stackoverflow.com/q/26677861
score: 0
has text: An also, `eq` function first index is 0, so if you want the second TD I guess that you should do `eq(1)`
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42029978
type: Comment
type: QuestionComment
has text: @vikas-bansal Provide HTML will very helpfull to understand your need.
comment on: http://stackoverflow.com/q/26719527
score: 0

http://stackoverflow.com/a/26735917
has comment: http://stackoverflow.com/comment/42058216
type: Answer
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26735684
has body: I don't see any variable called event in your code, and it looks valid. However, some things you can try: Use .delegate Try a newer version of jQuery and switch to .on .delegate: $.delegate(selector, eventType, handler); I.e. $.delegate("div", "keyup", function(e) {...});

http://stackoverflow.com/q/26819909
upvote count: 9
has body: I'm doing a pendulum animation over a parachute cat (for the lol), but its more smooth when its moving to left. All ease options has the same problem as far as i can tell. I can make this in pure javascript but css used to be more smooth and less CPU consuming. Test: http://jsfiddle.net/sombra2eternity/qmb2qhz4/2/ transform-origin:50px 5px; transition:transform 1s ease-in-out 0s; animation-duration: 2.2s; animation-name: paragato; animation-iteration-count: infinite; animation-direction: alternate; Note: Not working at all in Firefox (33), bug opened: https://bugzilla.mozilla.org/show_bug.cgi?id=1095916
tagged with: animation
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26820201
type: AnsweredQuestion
has title: CSS animation keyframe with smooth movement
type: Question
score: 9
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26820201

http://stackoverflow.com/comment/42166655
has text: get the data in smaller chunks like 20 records per pagination click and place the data in the table.
comment on: http://stackoverflow.com/q/26796230
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42219495
score: 0
has text: @Devon It's just a name... you can use anything... I use `$` in front to indicate that it is a reference to a jQuery object, on which you can call jquery methods, that's all...
type: AnswerComment
comment on: http://stackoverflow.com/a/26820242
type: Comment

http://stackoverflow.com/comment/41997850
has text: It was getting long, so I moved it to an answer.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26702058

http://stackoverflow.com/comment/42424667
type: AnswerComment
has text: are you trying to build a standalone webapp or a window in a doc/spreadsheet ?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26704135

http://stackoverflow.com/comment/42123553
type: Comment
has text: So, if I wanted to make an `iframe` directive that allowed me to pass a generic function TO the iframe once it is loaded (in it's onLoad event), what would be the recommended approach?
comment on: http://stackoverflow.com/a/26770232
score: 0
type: AnswerComment

angularjs-scope
tags question: http://stackoverflow.com/q/26702058
tags question: http://stackoverflow.com/q/26762948
tags question: http://stackoverflow.com/q/26733343
tags question: http://stackoverflow.com/q/26713017
tags question: http://stackoverflow.com/q/26709956
tags question: http://stackoverflow.com/q/26827652
tags question: http://stackoverflow.com/q/26713481
tags question: http://stackoverflow.com/q/26771204
tags question: http://stackoverflow.com/q/26798840
tags question: http://stackoverflow.com/q/26686012
tags question: http://stackoverflow.com/q/26706425
tags question: http://stackoverflow.com/q/26811378
tags question: http://stackoverflow.com/q/26800936
tags question: http://stackoverflow.com/q/26829088
tags question: http://stackoverflow.com/q/26748106
tags question: http://stackoverflow.com/q/26726745
tags question: http://stackoverflow.com/q/26718211
tag name: angularjs-scope
tags question: http://stackoverflow.com/q/26679367
tags question: http://stackoverflow.com/q/26814851
tags question: http://stackoverflow.com/q/26829325
tags question: http://stackoverflow.com/q/26775780
tags question: http://stackoverflow.com/q/26704199
tags question: http://stackoverflow.com/q/26813011
tags question: http://stackoverflow.com/q/26689125
tags question: http://stackoverflow.com/q/26730719
tags question: http://stackoverflow.com/q/26756992
tags question: http://stackoverflow.com/q/26756560
tags question: http://stackoverflow.com/q/26741319
tags question: http://stackoverflow.com/q/26796538
type: Tag

http://stackoverflow.com/a/37628536
score: 0
answers question: http://stackoverflow.com/q/26828268
type: Answer
has body: Sign in with Google+

http://stackoverflow.com/q/26786631
score: 0
has body: I am currently deploying a contact form to a website via twitter bootstrap where the form posts to a php script that sends an email to an administrator. The problem is that the form does not submit if the file js/plugins/validator/jquery.form-validator.min.js is used for validation I can get the form to function and submit an email successfully when I remove the validation file below: js/plugins/validator/jquery.form-validator.min.js from the script section at the bottom of the page, but this removes all the validation on the form &lt;form method="post" action="sendmail.php" class="input-group input-group-lg" id="subscribeForm" &gt; &lt;input type="text class="form-control" placeholder="Name" id="name" name="name" /&gt; &lt;input type="text" name="company" class="form-control" placeholder="company" /&gt;&lt;br /&gt; &lt;input type="text" name="phone" class="form-control" placeholder="phone" /&gt;&lt;br /&gt; &lt;input type="email" class="form-control" placeholder="email" id="sEmail" name="email"&gt; &lt;span class="input-group-btn"&gt; &lt;input type="submit" button class="btn bg-primary"&gt;Invite Me!&lt;/button&gt; &lt;/span&gt;&lt;/form&gt;&lt;!-- /input-group --&gt; And the content of the sendmail.php &lt;?php $name = $_REQUEST['name']; $company = $_REQUEST['company']; $email = $_REQUEST['email'] ; $phone = $_REQUEST['phone']; $emess = "Name: ".$name."\n"; $emess.= "Company: ".$company."\n"; $emess.= "Email : ".$email."\n"; $emess.= "Phone number: ".$phone."\n"; mail( "send-to-email", "Information Request", $emess, "From: $email" ); header( "Location: http://www.google.com" );?&gt;
tagged with: php
has comment: http://stackoverflow.com/comment/42150094
has comment: http://stackoverflow.com/comment/42150030
has answer: http://stackoverflow.com/a/26786844
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42151164
has comment: http://stackoverflow.com/comment/42150984
has title: unable to post to a php script
has answer: http://stackoverflow.com/a/26786810
has comment: http://stackoverflow.com/comment/42149892
tagged with: twitter-bootstrap
type: UnansweredQuestion

http://stackoverflow.com/comment/41969895
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26686009
has text: The bottom call triggers the drawIt loop to start. The call inside the drawIt loop causes the loop to continue.

php
tags question: http://stackoverflow.com/q/26796468
tags question: http://stackoverflow.com/q/26782610
tags question: http://stackoverflow.com/q/26743088
tags question: http://stackoverflow.com/q/26674874
tags question: http://stackoverflow.com/q/26690886
tags question: http://stackoverflow.com/q/26687194
tags question: http://stackoverflow.com/q/26684337
tags question: http://stackoverflow.com/q/26750502
tags question: http://stackoverflow.com/q/26777100
tags question: http://stackoverflow.com/q/26717666
tags question: http://stackoverflow.com/q/26723818
tags question: http://stackoverflow.com/q/26717287
tags question: http://stackoverflow.com/q/26785404
tags question: http://stackoverflow.com/q/26757260
tags question: http://stackoverflow.com/q/26699629
tags question: http://stackoverflow.com/q/26801638
tags question: http://stackoverflow.com/q/26678983
tags question: http://stackoverflow.com/q/26785849
tags question: http://stackoverflow.com/q/26742905
tags question: http://stackoverflow.com/q/26689187
tags question: http://stackoverflow.com/q/26723139
tags question: http://stackoverflow.com/q/26697108
tags question: http://stackoverflow.com/q/26682163
tags question: http://stackoverflow.com/q/26766226
tags question: http://stackoverflow.com/q/26709778
tags question: http://stackoverflow.com/q/26678927
tags question: http://stackoverflow.com/q/26797119
tags question: http://stackoverflow.com/q/26754569
tags question: http://stackoverflow.com/q/26695848
tags question: http://stackoverflow.com/q/26771793
tags question: http://stackoverflow.com/q/26724216
tags question: http://stackoverflow.com/q/26722294
tags question: http://stackoverflow.com/q/26816707
tags question: http://stackoverflow.com/q/26737804
tags question: http://stackoverflow.com/q/26690645
tags question: http://stackoverflow.com/q/26708725
tags question: http://stackoverflow.com/q/26718035
tags question: http://stackoverflow.com/q/26823165
tags question: http://stackoverflow.com/q/26691881
tags question: http://stackoverflow.com/q/26720134
tags question: http://stackoverflow.com/q/26692244
tags question: http://stackoverflow.com/q/26743210
tags question: http://stackoverflow.com/q/26782213
tags question: http://stackoverflow.com/q/26770862
tags question: http://stackoverflow.com/q/26800261
tags question: http://stackoverflow.com/q/26689239
tags question: http://stackoverflow.com/q/26731324
tags question: http://stackoverflow.com/q/26800664
tags question: http://stackoverflow.com/q/26705986
tags question: http://stackoverflow.com/q/26809675
tags question: http://stackoverflow.com/q/26810103
tags question: http://stackoverflow.com/q/26778180
tags question: http://stackoverflow.com/q/26723313
tags question: http://stackoverflow.com/q/26692612
tags question: http://stackoverflow.com/q/26715475
tags question: http://stackoverflow.com/q/26720082
tags question: http://stackoverflow.com/q/26828514
tags question: http://stackoverflow.com/q/26722090
tags question: http://stackoverflow.com/q/26720201
tags question: http://stackoverflow.com/q/26782230
tags question: http://stackoverflow.com/q/26682546
tags question: http://stackoverflow.com/q/26823890
tags question: http://stackoverflow.com/q/26693533
tags question: http://stackoverflow.com/q/26682391
tags question: http://stackoverflow.com/q/26692311
tags question: http://stackoverflow.com/q/26699990
tags question: http://stackoverflow.com/q/26683820
tags question: http://stackoverflow.com/q/26702539
tags question: http://stackoverflow.com/q/26752112
tags question: http://stackoverflow.com/q/26769178
tags question: http://stackoverflow.com/q/26817581
tags question: http://stackoverflow.com/q/26685681
tags question: http://stackoverflow.com/q/26768583
tags question: http://stackoverflow.com/q/26794919
tags question: http://stackoverflow.com/q/26820319
tags question: http://stackoverflow.com/q/26778665
tags question: http://stackoverflow.com/q/26703183
tags question: http://stackoverflow.com/q/26792687
tags question: http://stackoverflow.com/q/26709567
tags question: http://stackoverflow.com/q/26796748

bourbon
type: Tag
tag name: bourbon
tags question: http://stackoverflow.com/q/26761996

http://stackoverflow.com/comment/42014738
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26711754
has text: @Ravi — That (a) doesn't use CORS and (b) requires that the server respond with JSONP (which it probably doesn't).

ajax
tags question: http://stackoverflow.com/q/26715734
tags question: http://stackoverflow.com/q/26746831
tags question: http://stackoverflow.com/q/26695080
tags question: http://stackoverflow.com/q/26795429
tags question: http://stackoverflow.com/q/26770119
tags question: http://stackoverflow.com/q/26778512
tags question: http://stackoverflow.com/q/26799064
tags question: http://stackoverflow.com/q/26720134
tags question: http://stackoverflow.com/q/26694987
tags question: http://stackoverflow.com/q/26764706
tags question: http://stackoverflow.com/q/26745228
tags question: http://stackoverflow.com/q/26740671
tags question: http://stackoverflow.com/q/26796942
tags question: http://stackoverflow.com/q/26731324
tags question: http://stackoverflow.com/q/26688633
tags question: http://stackoverflow.com/q/26825858
tags question: http://stackoverflow.com/q/26788902
tags question: http://stackoverflow.com/q/26691943
tags question: http://stackoverflow.com/q/26812720
tags question: http://stackoverflow.com/q/26756461
tags question: http://stackoverflow.com/q/26827143
tags question: http://stackoverflow.com/q/26781561
tags question: http://stackoverflow.com/q/26682829
tags question: http://stackoverflow.com/q/26701824
tags question: http://stackoverflow.com/q/26720201
tags question: http://stackoverflow.com/q/26770833
tags question: http://stackoverflow.com/q/26682546
tags question: http://stackoverflow.com/q/26765871
tags question: http://stackoverflow.com/q/26760067
tags question: http://stackoverflow.com/q/26759490
tags question: http://stackoverflow.com/q/26682904
tags question: http://stackoverflow.com/q/26705251
tags question: http://stackoverflow.com/q/26781965
tags question: http://stackoverflow.com/q/26805594
tags question: http://stackoverflow.com/q/26773694
tags question: http://stackoverflow.com/q/26782178
tags question: http://stackoverflow.com/q/26698790
tags question: http://stackoverflow.com/q/26822038
tags question: http://stackoverflow.com/q/26682581
tags question: http://stackoverflow.com/q/26713110
tags question: http://stackoverflow.com/q/26754396
tags question: http://stackoverflow.com/q/26680670
tags question: http://stackoverflow.com/q/26709551
tags question: http://stackoverflow.com/q/26747811
tags question: http://stackoverflow.com/q/26719128
tags question: http://stackoverflow.com/q/26691776
tags question: http://stackoverflow.com/q/26703146
tags question: http://stackoverflow.com/q/26802307
type: Tag
tags question: http://stackoverflow.com/q/26751181
tags question: http://stackoverflow.com/q/26674874
tags question: http://stackoverflow.com/q/26709305
tags question: http://stackoverflow.com/q/26710204
tags question: http://stackoverflow.com/q/26709694
tags question: http://stackoverflow.com/q/26804730
tags question: http://stackoverflow.com/q/26768518
tags question: http://stackoverflow.com/q/26785404
tags question: http://stackoverflow.com/q/26824033
tags question: http://stackoverflow.com/q/26694151
tags question: http://stackoverflow.com/q/26827762
tags question: http://stackoverflow.com/q/26819052
tags question: http://stackoverflow.com/q/26773044
tags question: http://stackoverflow.com/q/26699629
tags question: http://stackoverflow.com/q/26742893
tags question: http://stackoverflow.com/q/26822535
tags question: http://stackoverflow.com/q/26706320
tags question: http://stackoverflow.com/q/26749048
tags question: http://stackoverflow.com/q/26785849
tags question: http://stackoverflow.com/q/26795885
tags question: http://stackoverflow.com/q/26697108
tags question: http://stackoverflow.com/q/26692525
tags question: http://stackoverflow.com/q/26727917
tags question: http://stackoverflow.com/q/26723104
tags question: http://stackoverflow.com/q/26678927
tags question: http://stackoverflow.com/q/26762913
tags question: http://stackoverflow.com/q/26716539
tags question: http://stackoverflow.com/q/26728703
tags question: http://stackoverflow.com/q/26816707
tags question: http://stackoverflow.com/q/26725930
tags question: http://stackoverflow.com/q/26739682

http://stackoverflow.com/comment/42104510
type: QuestionComment
comment on: http://stackoverflow.com/q/26759753
has text: It usually means that you accessed a property on a variable that does not hold an object.
score: 0
type: Comment

http://stackoverflow.com/comment/41999934
comment on: http://stackoverflow.com/q/26703053
score: 0
type: Comment
type: QuestionComment
has text: No, it has changed everytime.

http://stackoverflow.com/a/26810233
has comment: http://stackoverflow.com/comment/42193006
has comment: http://stackoverflow.com/comment/42197057
answers question: http://stackoverflow.com/q/26810198
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42193196
has body: Change your variable name, as it's conflicting with the Window.top global object. See the MDN doc page
has comment: http://stackoverflow.com/comment/42193415
has comment: http://stackoverflow.com/comment/42193183
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26810198
has comment: http://stackoverflow.com/comment/42193344

http://stackoverflow.com/comment/42189930
type: Comment
has text: thanks for the explanation and for the code +1 for that, I'm just wondering why you should do a shape select, then enter with append and finally do any attribute modification and why it doesn't work to chain all at once
type: AnswerComment
comment on: http://stackoverflow.com/a/26788753
score: 0

http://stackoverflow.com/a/26778221
answers question: http://stackoverflow.com/q/26777120
has comment: http://stackoverflow.com/comment/42135052
has comment: http://stackoverflow.com/comment/42134937
downvote count: 1
has body: Use the Quo.js , it will fit your needs. Probably you will use the hold method. Or if you don't want to use, this answer might be the best for you. Trigger Click-and-Hold Event
has comment: http://stackoverflow.com/comment/42134751
score: -1
upvote count: 0
type: Answer

http://stackoverflow.com/comment/42175401
comment on: http://stackoverflow.com/q/26800936
type: QuestionComment
type: Comment
has text: Because a checkbox is expecting a boolean?
score: 1

http://stackoverflow.com/comment/42215047
score: 0
comment on: http://stackoverflow.com/a/26809345
type: Comment
has text: @tealou What do you mean? You send data the usual way, in the request body. mod_rewrite is a apache rewrite engine to rewrite URLs on the fly. It's has nothing to do with how data is sent and processed
type: AnswerComment

http://stackoverflow.com/q/26746044
has answer: http://stackoverflow.com/a/26746194
tagged with: javascript
has answer: http://stackoverflow.com/a/26746251
has body: This may be a beginner question.. I'm trying to create a shopping list app that allows me to check and un-check items as well as remove items. I have an with the id = "list". I also have a button inside that with the class= "remove" (so when I click on it, it will remove the entire list)...So far I have it working so when I click the words turn gray. How would I target this so when I unclick the checkbox it goes back to normal? note: I'm using an input type check-box, instead of a button. $('#list').click(function() { $( this ).css( "color", "gray" ); $( ".remove").css("background-color", "gray" ); }); }); This is the HTML : My Awesome Shopping List My Awesome Shopping List Add Items Price Amount Item One x Total I have a Link to the online project here.
favorite count: 0
has title: Manipulating CSS with JQuery
has answer: http://stackoverflow.com/a/26746117
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26746132
has comment: http://stackoverflow.com/comment/42077440
tagged with: css
has comment: http://stackoverflow.com/comment/42077435
downvote count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/42077452
type: Question
has answer: http://stackoverflow.com/a/26746136
score: -2

http://stackoverflow.com/a/26729887
type: Answer
score: 25
has comment: http://stackoverflow.com/comment/42048293
has comment: http://stackoverflow.com/comment/134081899
downvote count: 0
has comment: http://stackoverflow.com/comment/134083009
upvote count: 25
answers question: http://stackoverflow.com/q/26729776
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26729776
has comment: http://stackoverflow.com/comment/42048407
has body: In pure JavaScript use window.innerHeight to get the viewport height, and elScrollable.scrollTop to get the scrollTop of your element. Use classList.toggle("className", statement) to toggle a class: const elScrollable = document.querySelector("html") const elNav = document.querySelector("#nav"); const handleNav = () => { const viewportHeight = window.innerHeight; const scrollTop = elScrollable.scrollTop; elNav.textContent = `Scrolled: ${scrollTop / viewportHeight}` elNav.classList.toggle("is-active", scrollTop >= viewportHeight); }; addEventListener("scroll", handleNav) addEventListener("resize", handleNav) handleNav(); * { box-sizing: border-box; margin: 0; } #nav { position: sticky; top: 0; background: silver; } #nav.is-active { background: gold; } NAV scroll down until #nav becomes golden... Using jQuery use $(window).height() to get the viewport height, and $scrollable.scrollTop() to get how much you scrolled the HTML (or any other) element. Use .toggleClass("className", statement) to toggle a class: const $window = $(window); const $scrollable = $("html"); const $nav = $("#nav"); const handleNav = () => { const viewportHeight = $window.height(); const scrollTop = $scrollable.scrollTop(); $nav .text(`Scrolled: ${scrollTop / viewportHeight}`) .toggleClass("is-active", scrollTop >= viewportHeight); }; $window.on("scroll", handleNav) $window.on("resize", handleNav) handleNav(); * { box-sizing: border-box; margin: 0; } #nav { position: sticky; top: 0; background: silver; } #nav.is-active { background: gold; } NAV scroll down until #nav becomes golden...

http://stackoverflow.com/a/26680275
type: Answer
has body: Try a window.prompt("question", "default") Here's a demo: http://www.w3schools.com/js/tryit.asp?filename=tryjs_prompt
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41959384
answers question: http://stackoverflow.com/q/26680229
downvote count: 0
has comment: http://stackoverflow.com/comment/41961378

http://stackoverflow.com/q/26707432
answer count: 1
has title: what languages would be required to import a csv file and display the data in a bootstrap website?
favorite count: 0
has body: I have a csv file containing data I want to report on, and I'm trying to work out what the workflow would be in terms of what programming languages I would need to implement the following scenario: scenario first then (language) in brackets. As an example; data extracted in step 2 might be count of number of records in a particular category: clothing! I am not too sure of the languages but I think the workflow would need to be: press button on bootstrap website, brings up file manager: pick file 2 import (javascript) - javascript calls python script in step 2 upon pressing ok and importing a file, the file would be opened/manipulated using (python) - results passed back from python to the website dashboard using javascript? use either (html 5) and or (javascript) and or a visualisation language like d3 to pass the manipulated data to one of the bootstrap admin dashboards below, and display the number of sales of clothing in my report: bootstrap admin dashboards
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/26707529
tagged with: http://stackoverflow.com/tag/html
tagged with: python
type: AnsweredQuestion
score: 0
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26707529
tagged with: javascript

http://stackoverflow.com/a/26736133
type: Answer
downvote count: 0
score: 1
has body: .css requests either a pair of two strings (rulename and value) or an object with name/value pairs if you try to set a rule. If you only hand one string, it tries to return the value of the rule with matching name (which in your case does not exist). Try this: var styles = {'font-weight': "bold"}; $('div').css(styles); working fiddle: http://jsfiddle.net/ocgb77m8/
upvote count: 1
answers question: http://stackoverflow.com/q/26736063

http://stackoverflow.com/q/26800010
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/26976280
type: Question
has title: Is there any in GWT to get notification about which fragment is going to be downloaded
answer count: 1
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26976280
favorite count: 0
has body: Our GWT application has various fragments and each of them are very big in size(1+ MB). What we would like to do is to show a progress bar when GWT is downloading the fragment. We are using GWTP based code splitting. I could not find anything related to fragment loading event in GWT source code. Does anyone have any idea about how Javascript on page can be notified about which fragment is going to be downloaded next?
upvote count: 3
tagged with: gwt

http://stackoverflow.com/comment/42123388
score: 0
type: Comment
has text: Thankx bro .. i'll try it out ..d get back to u .. :)
comment on: http://stackoverflow.com/a/26771517
type: AnswerComment

http://stackoverflow.com/a/26761099
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26759981
has comment: http://stackoverflow.com/comment/42105282
answers question: http://stackoverflow.com/q/26759981
type: Answer
has comment: http://stackoverflow.com/comment/42105238
has comment: http://stackoverflow.com/comment/42104565
has comment: http://stackoverflow.com/comment/42171661
has comment: http://stackoverflow.com/comment/42173414
has comment: http://stackoverflow.com/comment/42172416
has comment: http://stackoverflow.com/comment/42104706
downvote count: 1
has body: You can use the onwaiting event handler on the video element to show an image when the video starts buffering and the onplaying event handler when the video resumes (compare video element events) video.onwaiting = function(){ showPlaceholder(placeholder, this); }; video.onplaying = function(){ hidePlaceholder(placeholder, this); }; I created a little fiddle where you can get an idea of how to do it (Note that i simulated the buffering after 1 second by code).
has comment: http://stackoverflow.com/comment/42127913
has comment: http://stackoverflow.com/comment/53669534
upvote count: 15
has comment: http://stackoverflow.com/comment/42132599
score: 14
has comment: http://stackoverflow.com/comment/42171544

http://stackoverflow.com/a/26812364
type: Answer
answers question: http://stackoverflow.com/q/26811576
score: 0
has body: Possible approach(description inside the code): jQuery( function($) { $('.ullist.controls').each(function(){ var //the current ul that = $(this), //array with the li's items = $.makeArray(that.find('li')), //used to store text of current heading heading = null; //native js-sorting based on the text items.sort(function(a,b){ return (($(a).find('span').text()&gt;$(b).find('span').text()) ? 1 :-1 ) }); //iterate over sorted li's $.each(items,function(){ //the first char in text var c=$(this).find('span').text().substr(0,1).toUpperCase(); //when it's not equal to heading create a caption //note:use a styled li here because h2 is not a valid child for ul if(c!==heading){ that.append($('&lt;li/&gt;').text(c).css({fontWeight: 'bold', listStyleType:'none', fontSize: '1.2em'})); heading=c; } //append current li to the ul, this will sort the items in ul that.append(this); }); }); } ); Demo: http://jsfiddle.net/doktormolle/LL748hvd/

http://stackoverflow.com/q/26718142
tagged with: updating
has comment: http://stackoverflow.com/comment/42026524
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 1
tagged with: global
has comment: http://stackoverflow.com/comment/42026792
has comment: http://stackoverflow.com/comment/42026483
favorite count: 0
type: UnansweredQuestion
upvote count: 4
has title: JavaScript updating a global variable
score: 3
has body: I am currently not the most experienced in Javascript and I'm trying to learn bit by bit. Anyway... how do I update the balance variable more efficiently? Currently I believe I am doing this wrong. Also my button does not work on click event. Anything would be a massive help! Thank you. // Set global variables var name; var balance; var weed; // Ask the user his name for his character name = window.prompt("What is your name?", "Cap'n Grow"); var finalName = document.getElementById('name'); finalName.textContent = name; // Set the balance to default balance = 100; var FinalBalance = document.getElementById('balance'); FinalBalance.textContent = balance; // Set the balance of weed to default weed = 10; var FinalWeed = document.getElementById('gear'); FinalWeed.textContent = weed; // Sell function function sellGear() { var check = window.prompt("Are you sure you want to sell 5 bags?", "Yes"); if (check === 'Yes' && weed >= 5) { console.log("Transaction was successful!"); // Update the balance var updBalance = document.getElementById('balance'); updBalance.textContent = balance + 150; } else { console.log("Failed!") } } Sell?
type: Question
has answer: http://stackoverflow.com/a/26718638
has comment: http://stackoverflow.com/comment/42026542
has comment: http://stackoverflow.com/comment/42026460
tagged with: javascript
tagged with: variables

http://stackoverflow.com/a/27386394
answers question: http://stackoverflow.com/q/26821965
downvote count: 0
has body: What you are seeing is probably a bug in iOS8 where the garbage collector never frees up memory. I posted about it here: PhoneGap using way more memory in iOS8 than iOS7 If you can please file a bug with Apple so we can get this fixed in the next OS release.
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/42043396
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26712618
has text: ` if(result){ res.send{error: "REQUEST ALREADY EXISTS"}; }`in here i get unexpected token?
score: 0

http://stackoverflow.com/q/26701824
has answer: http://stackoverflow.com/a/26702162
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/41997228
tagged with: php
has comment: http://stackoverflow.com/comment/41997093
type: UnansweredQuestion
has body: The following form I've been trying to pass through an Ajax function rather than through the action/PHP. Username Author Name Password Site Title Site Description Server Database DB Username DB Password Below is my ajax code for doing so. $(document).on('submit', '#userregister form', function(e) { $.ajax({ url: $(this).attr('action'), type: $(this).attr('method'), data: $(this).serialize(), success: function(html) { alert('ok'); } }); e.preventDefault(); }); But instead of preventing the default, the form seems to completely ignore everything and pass it through the action, and I'm not too sure why. The actual install.php functions work right, but I'm just stumped as to why its not passing through the Ajax.
has title: preventDefault function not working with Ajax/Form Handling
tagged with: preventdefault
has comment: http://stackoverflow.com/comment/41997385

http://stackoverflow.com/comment/42017580
score: 0
has text: so why not @PavelHoral ?. I think the OP wants to make a servlet call on click.
comment on: http://stackoverflow.com/q/26713270
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26737793
accepted answer: http://stackoverflow.com/a/26737881
has title: what means "return+" in javascript
answer count: 2
possible better answer: http://stackoverflow.com/a/26737868
has answer: http://stackoverflow.com/a/26737868
favorite count: 0
has body: Found some code which implements the Date.now function for older browsers, code is Date.now=Date.now||function(){return+(new Date)}; what does the + operator do ? cant find anything on the net
linked to: http://stackoverflow.com/q/14470973
upvote count: 2
duplicate of: http://stackoverflow.com/q/14470973
type: AnsweredQuestion
score: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26737881
tagged with: function
tagged with: javascript

http://stackoverflow.com/comment/41962273
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26681464
has text: Trying adding `console.log("Scraping " + urls.length + " pages.")` prior to the scraping, and potentially surround the URL in quotes when you log it. You may have empty (or whitespace-only) input in the list.

redactor.js
tag name: redactor.js
tags question: http://stackoverflow.com/q/26709579
type: Tag

http://stackoverflow.com/a/66916171
upvote count: 1
downvote count: 1
has body: you can use dayjs return dayjs(date as string).format('DD/MM/YYYY HH:mm') you will have : 03/03/2021 16:36 for more information, you can refer to https://day.js.org/docs/en/display/format
score: 0
answers question: http://stackoverflow.com/q/26783080
type: Answer

http://stackoverflow.com/a/26832435
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26830592
answers question: http://stackoverflow.com/q/26830592
has body: Based on the answers in this question: jQuery Plupload restrict number of uploads. You can add the following property to plupload: max_files: 1, and then change the FilesAdded function, as such: FilesAdded: function(up, files) { plupload.each(files, function(file) { // if there are more files than the allowed if (up.files.length &gt; up.settings.max_files) { // display alert message alert('Cannot send more than ' + up.settings.max_files + ' file(s).'); // here you can also hide the "Select Files" button with the following code //$(up.settings.browse_button).hide(); // cancel adding files. break each. return false; } document.getElementById('filelist').innerHTML += '&lt;div id="' + file.id + '"&gt;' + file.name + ' (' + plupload.formatSize(file.size) + ') &lt;b&gt;&lt;/b&gt;&lt;/div&gt;'; }); }, Take a look at your updated jsfiddle
upvote count: 2

http://stackoverflow.com/comment/42338610
has text: The code you provided works. Check here: http://jsfiddle.net/fqxw0dqg/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26813184
score: 0

http://stackoverflow.com/q/26682929
favorite count: 0
has body: So I have two tables that pop open on one page. Here's the script that I've been previously using to select all of the checkboxes in the first table (which was the only one at the time): &lt;script&gt; $('#selectAll').click(function() { if(this.checked) { $(':checkbox').each(function() { this.checked = true; }); } else { $(':checkbox').each(function() { this.checked = false; }); } }); &lt;/script&gt; How can I change this to be more specific? Do I need to add a specific class or ID attribute to the checkbox for this to work?
has comment: http://stackoverflow.com/comment/41964606
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
has title: Javascript - how to check "certain" checkboxes and not all using my current code?
has answer: http://stackoverflow.com/a/26683060
accepted answer: http://stackoverflow.com/a/26683060
has comment: http://stackoverflow.com/comment/41964694
tagged with: javascript
has comment: http://stackoverflow.com/comment/41964537
upvote count: 1
has comment: http://stackoverflow.com/comment/41964656
answer count: 1
has comment: http://stackoverflow.com/comment/41964464

http://stackoverflow.com/a/26693574
has body: "I then removed the content of q" You need to leave the query exactly the same, only updating the pageToken on each subsequent request. You can play around with this on the Developer Site in the Files.List Try it now sample
answers question: http://stackoverflow.com/q/26692670
type: Answer
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/42113996
comment on: http://stackoverflow.com/a/26766570
type: Comment
has text: Thanks Anubhava Again :)
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42151908
score: 0
type: QuestionComment
has text: @DaveNewton already done that and keeps throwing that error
type: Comment
comment on: http://stackoverflow.com/q/26787634

http://stackoverflow.com/comment/41980060
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26691479
type: Comment
has text: I tried your code, but it still seems to not working. Here is my jsfiddle link: http://jsfiddle.net/n16k6cab/19/.

http://stackoverflow.com/q/26761211
has answer: http://stackoverflow.com/a/26763260
score: 2
has body: I'm trying to embed a plot with its data using autoload_static into a simple html page that I want to read locally on my computer. From what I make in the documenation I only need to place the .js file on the specified folder and insert the tag in the html. But firefox is giving me the next error: "failed to load library http://cdn.bokeh.org/bokeh-114a47707b567971f835c5877d2be44ea4e57fef.min.js" pl.js:21 import numpy as np from bokeh.plotting import * from bokeh.objects import PanTool N = 80 x = np.linspace(0, 4*np.pi, N) y = np.sin(x) pantool = PanTool(dimensions=["width", "height"]) plot = line(x,y, color="#0000FF", tools=['wheel_zoom','box_zoom', pantool], name="line_example") from bokeh.resources import CDN from bokeh.embed import autoload_static js, tag = autoload_static(plot, CDN,"/Users/john/Desktop/Tests/js/pl.js") file = open("/Users/john/Desktop/Tests/js", "w") file.write(js) file.close() print(tag) And the html page: Hello World
has title: Bokeh can't load bokeh from CDN
tagged with: bokeh
type: Question
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: python

http://stackoverflow.com/a/70586873
type: Answer
answers question: http://stackoverflow.com/q/26699619
upvote count: 12
downvote count: 0
score: 12
has body: With >5 you have to use "data-bs-target" instead of "data-target" for the button. This: Instead of:

http://stackoverflow.com/q/26762467
downvote count: 1
type: Question
upvote count: 4
possible better answer: http://stackoverflow.com/a/26762528
tagged with: if-statement
has answer: http://stackoverflow.com/a/26762492
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26806784
favorite count: 0
has answer: http://stackoverflow.com/a/26762726
accepted answer: http://stackoverflow.com/a/26762492
answer count: 4
type: AnsweredQuestion
score: 3
has body: I have some jquery that checks for the value of a form select and then does something. It works as expected, as follows: $("#field_1_select_value").bind('change', function (e) { if($("#field_1_select_value").val() == 1){ // Do stuff } else { // Do something else } }); I would like to check if the select has other values because the behavior would be the same if you choose a number of different options in the select, and they are not necessarily in series so I can't say greater than or less than X. I want to specify if you choose, for example, 1, 4, 10, or 20... something happens. I tried just using commas based on another answer I found elsewhere like follows: if($("#field_1_select_value").val() == 1, 4, 10, 20){ But that didn't seem to work. The , acts as a multiselector as I understand it and in documentation it makes sense but I didn't find much on how it can work in an if statement scenario like this. I've seen a lot of similar questions but nothing really pointing out usage on an if statement with val. Thanks for your input and suggestions.
has answer: http://stackoverflow.com/a/26762528
has title: How do I format "if val 1 or 4 or 6 or 10"

http://stackoverflow.com/comment/42072822
comment on: http://stackoverflow.com/q/26743548
type: Comment
score: 1
has text: ` ` ORLY?
type: QuestionComment

http://stackoverflow.com/comment/42043454
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26727343
has text: those are parameters, where are the actual arguments or the values you passed to a function?

http://stackoverflow.com/a/26765654
answers question: http://stackoverflow.com/q/26696454
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: I think the HTTP header should be HTTP_X_PJAX (underscore concatenated instead of dash) not HTTP-X-PJAX. As the django docs states: Any HTTP headers in the request are converted to META keys by converting all characters to uppercase, replacing any hyphens with underscores and adding an HTTP_ prefix to the name. So, for example, a header called X-Bender would be mapped to the META key HTTP_X_BENDER For the double events(request) firing, make sure you are not binding the a[data-pjax] selector twice with pjax. The binding should be done only once.
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26696454
score: 2

http://stackoverflow.com/comment/42108798
comment on: http://stackoverflow.com/q/26762697
score: 0
has text: post the `sql()` function.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26696236
has comment: http://stackoverflow.com/comment/41988485
upvote count: 2
has comment: http://stackoverflow.com/comment/41988992
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41988684
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26696211
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26696211
has body: Use the regex like ^\(\d+(\s+(AND|OR|NOT)\s+\d+)+\)$ see example : http://regex101.com/r/qS3tD8/1 Explanation ^ anchors the regex at the begining of the string \( matches ( \d+ one or more digits \s matches space (AND|OR|NOT) matches AND OR NOT \) matches ) $ anchors regex a end of the string EDIT ^\(\(?\d+(\s+(AND|OR|NOT)\s+\(?\d+\)?)+\)$ matches any number of operators and nested paranthesis as well example : http://regex101.com/r/qS3tD8/6
has comment: http://stackoverflow.com/comment/41988567

http://stackoverflow.com/comment/42040909
type: QuestionComment
type: Comment
has text: do everyone a favor and get better organized when setting criteria and defining problem statements in your questions
comment on: http://stackoverflow.com/q/26725552
score: 0

http://stackoverflow.com/comment/42020634
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26714194
type: Comment
has text: @Lix It still wont work for some reason Ill add my updated code about in my original question

http://stackoverflow.com/comment/41949971
score: 0
has text: the second text area is hidden from user.whatever the user writes will be copied to second textarea and will be transliterate.The requirement is like this if the user replace some data then also it should not effect the data which he already entered.that is why i need to maintain a copy without using database.
type: Comment
comment on: http://stackoverflow.com/a/26675122
type: AnswerComment

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

http://stackoverflow.com/tag/zip
tags question: http://stackoverflow.com/q/26678439
type: Tag
tags question: http://stackoverflow.com/q/26754032
tag name: zip
tags question: http://stackoverflow.com/q/26799545

http://stackoverflow.com/comment/41985512
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26695188
score: 2
has text: you are executing your event handler instead of passing it as a reference `setTheClockByButton()` should be `setTheClockByButton` in the `addEventListener` call

http://stackoverflow.com/a/26713525
has body: {{}} is meant to interpolate into html text. You are "already there". Try this: {{ myObject[anotherVar] }} I didn't test it. It's valid javascript, but I have no idea if it is valid "angular-script"
type: Answer
accepted answer of: http://stackoverflow.com/q/26713481
score: 5
upvote count: 5
downvote count: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26713481

http://stackoverflow.com/comment/42161337
has text: Hahahaha! I have no choice man! Client wants it for crappy IE6. Bummer!!!
comment on: http://stackoverflow.com/q/26792731
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42200890
has text: Thanks - that seems to do what I need. Is there a way to show all rows when no chevron is selected (I see that clicking "show all opportunities" does this, but I'd like it to work when the chevron is deselected too.
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26814590

http://stackoverflow.com/comment/42073023
type: Comment
has text: Thank you for your help! @plbsam beat you by 2 minutes though, sorry.
comment on: http://stackoverflow.com/a/26743561
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41985797
comment on: http://stackoverflow.com/a/26685495
type: Comment
type: AnswerComment
has text: What fields are in your users table? Those should be available as properties on your user.
score: 0

http://stackoverflow.com/a/26769866
has comment: http://stackoverflow.com/comment/42120492
answers question: http://stackoverflow.com/q/26769610
type: Answer
has comment: http://stackoverflow.com/comment/42120405
has comment: http://stackoverflow.com/comment/42146905
score: 0
has body: This should be effective enough. You should only have 1 array with all the images and just update the current index. var currentId = 0; function setImage(id, src) { document.getElementById(id).src = src; } var images = [ "http://placehold.it/200x160/ff0000/00ffff.png&amp;text=1", "http://placehold.it/200x160/00ff00/ff00ff.png&amp;text=2", "http://placehold.it/200x160/0000ff/ffff00.png&amp;text=3" ]; window.change = function(direction) { currentId += direction; if (currentId &gt; images.length - 1) { currentId = 0; } else if (currentId &lt; 0) { currentId = images.length-1; } setImage('tech', images[currentId]); } .nav { border: thin solid #000; text-align: center; font-size: 64px; font-weight: bold; } &lt;table align="center"&gt; &lt;tr&gt; &lt;td class="nav" width="100px;" id="arr1" name="arr1" onclick="change(-1)"&gt;&amp;lt;&lt;/td&gt; &lt;td align="center"&gt; &lt;img src="http://placehold.it/200x160/ff0000/00ffff.png&amp;text=1" alt="Technology" id="tech" name="tech" /&gt; &lt;/td&gt; &lt;td class="nav" width="100px;" id="arr2" name="arr2" onclick="change(1)"&gt;&amp;gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;

http://stackoverflow.com/comment/42167681
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26796624
type: AnswerComment
has text: Please, add 2-3 lines of explanation, not just pure code, because your answer pops up in Low Quality queue and without text explanation, it might be closed some day. Thanks.

http://stackoverflow.com/q/26718457
score: -2
tagged with: javascript
linked to: http://stackoverflow.com/q/24093736
has body: User @guru's idea: each user can shift vote (up or down) rather than total clicks++/--. how to create up/down voting function in angularjs The problem I faced is this one-off vote feature once voted, other users can only change vote (but not add or deduct vote score, i.e -1&lt;= vote score &lt;=1) My structure is: each topic --> one user writes it but many users can vote more importantly, up and down votes are separate scores and not netted off each user can vote only once but can be changed anytime (i.e up->down, or down->up) How do I implement so that its a one-off vote system + each user can add votes separately and total votes summed? guru's version html &lt;body ng-controller="MainCtrl"&gt; &lt;i title="Up Votes" ng-click="changeVote(vote, 'up')" class="fa fa-arrow-circle-up fa-2x" ng-class="{true:'up', false:''}[vote=='up']"&gt;&lt;/i&gt; &lt;br&gt; &lt;i title="Down Votes" ng-click="changeVote(vote, 'down')" class="fa fa-arrow-circle-down fa-2x" ng-class="{true:'down', false:''}[vote=='down']"&gt;&lt;/i&gt; &lt;br&gt;Vote: {{vote}} Js app.controller('MainCtrl', function($scope) { $scope.changeVote = function(vote, flag) { $scope.vote = vote == flag ? 'None' : flag; alert($scope.vote); }; }); vote increment feature (old version that Im trying to change) This version adds or remove 1 vote but a user can click multiple times. Other than using Firebase security features, I was trying to make it such that each user can only vote once. (But yet they can change their vote anytime) var app = angular.module('voteApp', []); app.controller('MainCtrl', function ($scope) { $scope.upVote = function () { $scope.vote++; } $scope.downVote = function () { $scope.vote--; } $scope.vote = 0; });
has title: How to implement one-off up/down voting that can be summed/ counted?
has comment: http://stackoverflow.com/comment/42041003
answer count: 1
has comment: http://stackoverflow.com/comment/42033532
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42921921
tagged with: http://stackoverflow.com/tag/html
tagged with: firebase
tagged with: voting-system
downvote count: 3
has answer: http://stackoverflow.com/a/26726019
upvote count: 1
type: Question

http://stackoverflow.com/comment/42048904
type: Comment
type: QuestionComment
has text: thank you. . sorry for newbie favor. can u use that onbeforeunload. using my dialog box. . put the code here please.
score: 0
comment on: http://stackoverflow.com/q/26729642

http://stackoverflow.com/comment/42102848
score: 0
has text: This is correct, I can confirm this.. however I would like the poster to be displayed while buffering is there any way to do that?
comment on: http://stackoverflow.com/q/26759981
type: Comment
type: QuestionComment

http://stackoverflow.com/a/35771763
score: 0
has body: It is simply because your Django app doesn't know anything about the rewriting or the routing your web server is doing, it's outside it's scope. You might have done the aliasing because you want to host something else as well on some other route. If this is the situation then what you can do is, you can internally route requests to /pti_map to /pti_map/pti_map and use the alias /pti_map to your script. What this will do it while routing the request to the script, the wsgi container will eat up the first "pti_map" and will forward the next one. Hope I understood you correctly.
answers question: http://stackoverflow.com/q/26686251
type: Answer

http://stackoverflow.com/a/26700097
has body: you can use below function to get the format var getDate = function(d) { var format = "DD/MM/YYYY h:mm:ss a"; if(moment(d).startOf('day').valueOf() === moment(d).valueOf()) { format = "DD/MM/YYYY" } return moment(d).format(format); } console.log(getDate("2014-11-02 02:04:05")); console.log(getDate("2014-11-02 00:00:00")); it compare the ticks from start of day to the input time, if both are same, it means the time is zero.
upvote count: 3
has comment: http://stackoverflow.com/comment/41994639
has comment: http://stackoverflow.com/comment/41994873
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26700043
accepted answer of: http://stackoverflow.com/q/26700043
type: Answer
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/41994674
has comment: http://stackoverflow.com/comment/41995101

http://stackoverflow.com/a/40377037
has comment: http://stackoverflow.com/comment/88148324
has body: At this moment, window.print() functionality works perfectly on my Android 5.0.1 device with both, Chrome and the default browser.
score: 0
has comment: http://stackoverflow.com/comment/72179634
type: Answer
answers question: http://stackoverflow.com/q/26684190

http://stackoverflow.com/comment/41979553
type: Comment
comment on: http://stackoverflow.com/a/26691479
type: AnswerComment
score: 0
has text: Yeah, then this code should work. Let me know if it doesn't though. jsfiddle.net is a popular way of sharing web code. You can quickly show people what the problem is, and they can make quick changes and show you that they work. Like this one I made from your code (although it can't find the jquery cycle file or the image files obviously): http://jsfiddle.net/n16k6cab/

http://stackoverflow.com/comment/52615948
comment on: http://stackoverflow.com/a/26856288
score: 0
type: AnswerComment
type: Comment
has text: @PhiLho transducers are also about composability

http://stackoverflow.com/q/26674281
type: AnsweredQuestion
score: 3
linked to: http://stackoverflow.com/q/27021844
upvote count: 3
type: Question
has title: Command String parsing tools for NodeJS
tagged with: sails.js
accepted answer: http://stackoverflow.com/a/26675920
tagged with: javascript
has body: I am using SailsJS for an application. From front-end i.e. NodeWebkituser will be entering a command which will be sent to server via sockets. This command is parsed in back-end and a specific service/controller is called. Socket code is as follows : socket.on('command', {'command':'user -a -n abhishek -p 123456'}) I am using JISON for command-line parsing which gets all options in command with their values. Are there any command parsers better than JISON which I can use here. Thanks in Advance
downvote count: 0
answer count: 1
tagged with: command
favorite count: 0
has answer: http://stackoverflow.com/a/26675920
has comment: http://stackoverflow.com/comment/41948098
tagged with: node.js

http://stackoverflow.com/q/26828571
has comment: http://stackoverflow.com/comment/42224875
has comment: http://stackoverflow.com/comment/49465458
tagged with: angularjs
upvote count: 2
type: UnansweredQuestion
has title: ng-repeat not rendering elements from indexeddb
answer count: 0
has comment: http://stackoverflow.com/comment/42224730
has body: I am trying to populate the elements on html page from indexed db for that i used the controller as shown below myapp.controller('mainController', function($scope) { $scope.message = "Hello world"; $scope.name = "sathya" $scope.projects = []; var prolist = []; var sdb = new SDB(); sdb.On("project", "read", null, function(Store, data) { Store.openCursor().onsuccess = function(event) { var cursor = event.target.result; if (cursor) { prolist.push(cursor.value); cursor.continue(); } } }); console.log(prolist); $scope.projects = prolist; }); And the HTML code is as shown: &lt;ul class="list-group" id="project-list"&gt; &lt;li class="list-group-item" ng-repeat="project in projects"&gt; &lt;a href=""&gt;{{project.projectname}}&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; In chrome console i am getting values of prolist variable: Array[4] 0: ObjectisActivated: falseprojectdescription: "changed"projectid: 1 projectname: "hellothisissathya"__proto__: Object1: ObjectisActivated: trueprojectdescription: "second project"projectid: 2 projectname: "hello"__proto__: Object 2: ObjectisActivated: trueprojectdescription: "second project"projectid: 3 projectname: "hello"__proto__: Object 3: ObjectisActivated: trueprojectdescription: "second project"projectid: 4 projectname: "hello"__proto__: Objectlength: 4__proto__: Array[0] but in html its not rendering the project names from each object. I need to populate the scope.projects list with this array.
type: Question
tagged with: javascript
score: 2
has comment: http://stackoverflow.com/comment/42227763
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/42023105
has text: Not relevant to the topic of the variable, your test to see if an element is in the DOM will work, but it's a really weird way to do things. The `getElementById()` function will return `null` when the element isn't found.
comment on: http://stackoverflow.com/q/26716409
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26803224
has comment: http://stackoverflow.com/comment/42179761
has comment: http://stackoverflow.com/comment/42179855
has comment: http://stackoverflow.com/comment/42179809
has comment: http://stackoverflow.com/comment/42179744
has comment: http://stackoverflow.com/comment/42179918
possible better answer: http://stackoverflow.com/a/26803489
has comment: http://stackoverflow.com/comment/42179794
favorite count: 0
accepted answer: http://stackoverflow.com/a/26809196
has answer: http://stackoverflow.com/a/26803489
has comment: http://stackoverflow.com/comment/42179847
answer count: 5
has title: How can I hide direct access to my javascript files?
tagged with: php
has comment: http://stackoverflow.com/comment/42179985
has comment: http://stackoverflow.com/comment/42179897
has answer: http://stackoverflow.com/a/26810182
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42179988
has comment: http://stackoverflow.com/comment/42179763
has comment: http://stackoverflow.com/comment/42190874
upvote count: 3
has comment: http://stackoverflow.com/comment/42179856
score: -4
linked to: http://stackoverflow.com/q/4356289
has answer: http://stackoverflow.com/a/26803699
downvote count: 7
has comment: http://stackoverflow.com/comment/42179927
has body: I'm running a LAMP web server. I'd like to include my script files on my page with: &lt;script src="http://domain.com/script.js"&gt;&lt;/script&gt; I would like visiting http://domain.com/script.js to display either an error, or a blank page. I've seen other similar questions, of which the answer was "just obfuscate it", or "security by obfuscation is bad". This isn't for the sake of security. I'm wanting to stop bots from pulling my code automatically. I'm ok with human users getting the code. I would simply like this as an alternative to obfuscation. I've already attempted this with the use of base64_encoded $_GET and $_SESSION parameters. I'm wondering if there's a more elegant solution out there. CLARIFICATION: I am aware that Javascript is still available to the user. I am perfectly fine with the code being accessible via Firebug, Chrome's developer tools, etc. I simply want the code accessible via my tags, and inaccessible directly. This is not for security, and not to "hide" my code. Clarification 2: The reason I need this is because our company recently found a competitor running scripts to scrape data off of our site. I would like to be able to prevent the data from being scraped via their script, and force them to do it manually.
type: Question
linked to: http://stackoverflow.com/q/6335644
has answer: http://stackoverflow.com/a/26803544
linked to: http://stackoverflow.com/q/1176915
has answer: http://stackoverflow.com/a/26809196
has comment: http://stackoverflow.com/comment/42179904
has comment: http://stackoverflow.com/comment/42179841
tagged with: javascript
has comment: http://stackoverflow.com/comment/42179808

http://stackoverflow.com/comment/42083438
comment on: http://stackoverflow.com/q/26749635
has text: You want to bind `click` event to that element right?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42299369
type: AnswerComment
type: Comment
has text: So after all my research, the method above is the only one that works 100% of the time in IE8,IE9,Chrome and FF. Opening a window and trying to pass values into a function in the new window, works only sometimes in IE8/IE9 because of some unknown race conditions (or other things i cant figure out). The window always opens, but sometimes the onload function of new window does not get called. Reading values from opener seems to be the only way to have it working on the above listed browsers.
score: 1
comment on: http://stackoverflow.com/a/26724548

http://stackoverflow.com/q/26734769
favorite count: 0
tagged with: kendo-ui
has title: Explicitly fire custom command of kendo grid
type: UnansweredQuestion
type: Question
tagged with: kendo-grid
score: 1
has answer: http://stackoverflow.com/a/26738512
upvote count: 1
answer count: 1
downvote count: 0
tagged with: javascript
has body: I have a kendo grid with a custom command. Now issue is I want to fire that custom command for specific row but not able to do it. Here is my code: Grid: @(Html.Kendo().Grid<RxConnectEntities.UserDTO> ().Name("UserList") .Columns(columns => { columns.Bound(p => p.UserID).Visible(false); columns.Command(command => { command.Custom("Select").Click("OnSelectRow"); }).Width("80px"); columns.Bound(p => p.LastName).Title("Last Name"); columns.Bound(p => p.FirstName).Title("First Name"); }) .Filterable(filterable => filterable .Extra(false) .Operators(operators => operators .ForString(str => str.Clear() .StartsWith("Starts with") .IsEqualTo("Is equal to") .IsNotEqualTo("Is not equal to") .Contains("Contains") )) ).ToolBar(x => x.Template(" Export To Excel")) .HtmlAttributes(new { @Style = "height:580px" }) .Sortable() .Groupable() .Scrollable() .Events(events => events.DataBound("onDataBound").ColumnShow("onColumnShow")) .Pageable(p => p.PageSizes(new int[] { 10, 20, 30, 40, 50 }).Enabled(true).Refresh(true)) .DataSource(dataSource => dataSource .Ajax().ServerOperation(true).PageSize(20) .Model(m => m.Id(p => p.PrescriberID)) .Read(read => read.Action("GetUserList", "User").Data("PassData")) )) Javascript: function OnSelectRow(e) { var grid = $("#UserList").data("kendoGrid"); var dataItem = this.dataItem($(e.currentTarget).closest("tr")); alert("User Detail: " + dataItem.UserID + " " + dataItem.FirstName + " " + dataItem.LastName"); } Now I have a textbox and a button, in textbox user enter UserID and I have to fire onSelectRow event of kendo grid for that UserID. I know this trick var row = $("#" + gridName).data("kendoGrid").table.find('tr[data-id="' + id + '"]') but it's not working for me. It is not giving me anything in row var. Note: I am using asp.net mvc5 with c#.
tagged with: jquery

http://stackoverflow.com/comment/42205572
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26817595
has text: That seems to be a problem with your logic … you have two queries, one getting the `toUser` from the friend requests, and the other getting the `fromUser` … and then you put _both_ those queries into your main query. Only logical that you are getting duplicate results that way.

http://stackoverflow.com/q/26699810
has answer: http://stackoverflow.com/a/26699828
has answer: http://stackoverflow.com/a/26699825
has comment: http://stackoverflow.com/comment/41993825
downvote count: 0
tagged with: javascript
has title: Return text between brackets and not include brackets
has answer: http://stackoverflow.com/a/26707440
answer count: 4
favorite count: 0
tagged with: regex
has answer: http://stackoverflow.com/a/75241263
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26699828
has body: I am using the following regEx to match text in brackets: 'textA(textB)'.match(/\((.+?)\)/g) But it returns text including the brackets e.g. (textB) How do I return the text without the brackets e.g. textB
possible better answer: http://stackoverflow.com/a/26699825
type: Question
upvote count: 2

http://stackoverflow.com/q/26735569
accepted answer: http://stackoverflow.com/a/26735617
answer count: 2
downvote count: 0
score: 1
tagged with: dom-events
favorite count: 0
has body: Please can you provide me some short help with my Javascript code. I have one input field which hides DIV element just if it is totally empty (without text): if (search_value !== "") { document.getElementById("frei").className = "frei1"; } It does exactly what I want, the main problem is once the input field is activated by typing inside and when I start to erase the text until the input is empty, than my hidden DIV appear, even if the input contain no text (because I erased it). This function is good only on first page load, than when I type anything in input and erase it, my JavaScript code is not functional. Please could you give me an advice how looks like Javasript code, which hide that DIV everytime input field contain no text? Even when the text was erased manually? Thank you very much and apologize for that type of question. Iam not strong in basic Javascript.
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26735626
has answer: http://stackoverflow.com/a/26735626
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42057489
tagged with: hide
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26735617
has comment: http://stackoverflow.com/comment/42057465
has title: Hiding other elements by one input field
tagged with: javascript

http://stackoverflow.com/comment/41948016
has text: You should also include the stack trace of the error. Here's a working example with your code: http://plnkr.co/edit/xZ0Jv6NZpwSoqk6a0lF3?p=preview
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26674033
score: 0

http://stackoverflow.com/comment/42200919
has text: this code is works well but problem is targeted text box is too below in a web page and when page is loaded then cursor is focused on that text box but i still use the mouse to scroll down. i want it automatic so is this possible my code is: " window.load = a(); function a() { document.getElementById("j_captcha").focus(); } "
comment on: http://stackoverflow.com/a/26814483
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42257641
type: Comment
has text: You mean you are modifying the slimScroll plugin?
comment on: http://stackoverflow.com/a/26844276
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42152201
has text: OP tried to calculate the avrg out of the function. But variable `number` is undefined.
type: Comment
comment on: http://stackoverflow.com/a/26787851
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42214919
score: 0
type: AnswerComment
has text: I don't understand it either. What kind of issue in the controller are you thinking? I know the data is correct because I'm able to print the same value right next next to the table on the same page.
comment on: http://stackoverflow.com/a/26822842
type: Comment

http://stackoverflow.com/q/26720314
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26720350
has body: Migrating my MVC3 (aspx) project to MVC5 (razor), I use: &lt;% if ((bool)this.ViewData["ReadOnly"] != true) { %&gt; document.getElementById("NextAction").value = nextAction; document.getElementById("VisitForm").submit(); &lt;% } else { %&gt; window.location = nextAction; &lt;% } %&gt; I modified it to: @if ((bool)this.ViewData["ReadOnly"] != true) { document.getElementById("NextAction").value = nextAction; document.getElementById("VisitForm").submit(); } else { window.location = nextAction; } Can not resolve either document or window?
tagged with: razor
upvote count: 1
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/26720350
type: Question
tagged with: asp.net-mvc
possible better answer: http://stackoverflow.com/a/26720398
tagged with: javascript
has title: Razor view MVC 5 JavaScript - resolve document.getElementById
has answer: http://stackoverflow.com/a/26720398
answer count: 2

http://stackoverflow.com/q/26823728
has comment: http://stackoverflow.com/comment/42216530
score: 1
has comment: http://stackoverflow.com/comment/42216520
has body: (Thank you guys ... I have fix it) Please I need your help if you can I want when the toggle are show ... addClass "activeee" and remove it from other div's and when the toggle are hide removeClass My problem is : when I click on the toggle to hide it (toggle hide) it's have been hide but the Class don't remove this is my jquery code jQuery(document).ready(function($){ $("#mashmenu-mod-1").click(function(){ $(".mod-content").fadeOut(); var mod1 = $(this).find(".mod-content").toggle(); mod1; var Checkmod1 = $(this).find(".mod-content").data("toggled", "true"); if(Checkmod1) { $("#mashmenu-mod-1").addClass("activeee"); } else { $("#mashmenu-mod-1").removeClass("activeee"); } }); $("#mashmenu-mod-2").click(function(){ $(".mod-content").fadeOut(); $(this).find(".mod-content").toggle(); }); $("#mashmenu-mod-3").click(function(){ $(".mod-content").fadeOut(); $(this).find(".mod-content").toggle(); }); });
type: Question
has comment: http://stackoverflow.com/comment/42216617
has comment: http://stackoverflow.com/comment/42216569
answer count: 2
upvote count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42216506
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26823839
favorite count: 0
has answer: http://stackoverflow.com/a/26823848
downvote count: 0
type: UnansweredQuestion
has title: Check if toggle true addClass else if not removeClass
has comment: http://stackoverflow.com/comment/42216580
has comment: http://stackoverflow.com/comment/42216697

http://stackoverflow.com/a/26746072
accepted answer of: http://stackoverflow.com/q/26679664
downvote count: 0
type: AcceptedAnswer
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26679664
has body: You can use the abstraction I wrote for myself if you like: function audioFileLoader(fileDirectory) { var soundObj = {}; soundObj.fileDirectory = fileDirectory; var getSound = new XMLHttpRequest(); getSound.open("GET", soundObj.fileDirectory, true); getSound.responseType = "arraybuffer"; getSound.onload = function() { audioContext.decodeAudioData(getSound.response, function(buffer) { soundObj.soundToPlay = buffer; }); } getSound.send(); soundObj.play = function() { var playSound = audioContext.createBufferSource(); playSound.buffer = soundObj.soundToPlay; playSound.connect(audioContext.destination) playSound.start(audioContext.currentTime) } return soundObj; }; var snare = audioFileLoader("snare.mp3"); snare.play()
score: 1

http://stackoverflow.com/q/26703849
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26703909
accepted answer: http://stackoverflow.com/a/26703909
type: Question
tagged with: javascript
tagged with: jquery
has title: How to display file name before the upload?
score: 0
answer count: 1
tagged with: jquery-file-upload
tagged with: ruby-on-rails
has body: I am using blueimp/jQuery-File-Upload and I am trying to display names of the files before the upload. I was following this tutorial and for now everything is working as expected. The only thing is I am trying to display a file name before the file is uploaded. How can I accomplish that? I would like to show progress bar before file starts uploading. I have changed the upload script a little bit from that tutorial into this so upload starts with user's click on button: jQuery -&gt; $('#new_avatar').fileupload dataType: "script" add: (e, data) -&gt; file = data.files[0] data.context = $("#button1").click( -&gt; data.context = $(tmpl("template-upload", file)) $('#new_avatar').append(data.context) data.submit() ) progress: (e, data) -&gt; if data.context progress = parseInt(data.loaded / data.total * 100, 10) data.context.find('.bar').css('width', progress + '%') And I have this as a script when file upload starts: &lt;script id="template-upload" type="text/x-tmpl"&gt; &lt;div class="upload"&gt; {%=o.name%} &lt;div class="progress"&gt; &lt;div class="bar" style="width: 0%"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/script&gt; I guess I need to to something inside add part of the fileupload script but I am not sure what. Thank you for your hints and suggestions :)

http://stackoverflow.com/comment/42160153
type: Comment
has text: Cannot find its explanation in documentation. I'm sure it will not work.
comment on: http://stackoverflow.com/a/26792327
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42166098
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26795932
has text: Another option instead of `alert()` is `console.log()`. Just saying because I used to do the same thing with the *alert* function...

http://stackoverflow.com/comment/65704962
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26800234
type: Comment
has text: Use history.pushState() can clear the "forward" history.

http://stackoverflow.com/q/26694260
upvote count: 2
type: UnansweredQuestion
tagged with: geolocation
has answer: http://stackoverflow.com/a/44956098
tagged with: w3c-geolocation
tagged with: gps
score: 2
has title: Geolocation problems when switch GPS on and off
has answer: http://stackoverflow.com/a/27432035
has body: Thanks in advance first.I build a website with an option to lead you to a specific place when you click button "Navigate". Everything works fine on desktop and everything works fine on mobile when GPS of the phone is enabled. I use the google maps reference and it works just fine: http://maps.google.com/maps?saddr=myLat,myLng&daddr=targetLat,targetLng I do this on $('.button').click(). Not on $(window).load or $(document).ready. When you click the button, it calls the geolocation functions: function getGeolocation(){ if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(geoSuccess, geoError); } else { $('.error-message').html(' Your browser does not support this function '); } } function geoSuccess(position) { myLat = position.coords.latitude; myLng = position.coords.longitude; window.location.href = 'http://maps.google.com/maps?saddr=' + myLat + ',' + myLng + '&daddr=targetLat,targetLng'; } function geoError(){ switch(error.code) { alert('example alert - enable GPS'); case error.PERMISSION_DENIED: $('.error-message').html(' User denied the request for Geolocation. '); break; case error.POSITION_UNAVAILABLE: $('.error-message').html(' Location information is unavailable. '); break; case error.TIMEOUT: $('.error-message').html(' The request to get user location timed out. '); break; case error.UNKNOWN_ERROR: $('.error-message').html(' An unknown error occurred. '); break; } } But the problem comes when the GPS is disabled. First of all, sometimes, it doesn't enter in geoError(). I tried so many times, but the only thing I "found" is that it caches sometimes. Is that possible ? But the main problem is that, when the GPS is disabled, the "example alert" pops up, then I turn my GPS on and click the button again, it doesn't work again. I have to refresh the page to apply the GPS turn on. I want to avoid that. Does anyone know why is that happening and is there a way to do what I want? The other problem is when I load my page with GPS turned on. Then I tur…
type: Question
has answer: http://stackoverflow.com/a/47919218
downvote count: 0
tagged with: javascript
favorite count: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html

http-referer
tags question: http://stackoverflow.com/q/26716858
type: Tag
tag name: http-referer

http://stackoverflow.com/comment/42086329
comment on: http://stackoverflow.com/q/26732192
has text: if you are not concerned about the performance you can generate the path to the cordova.js file when you create the article page.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26790013
tagged with: d3.js
has title: D3.get populating Global Object
linked to: http://stackoverflow.com/q/17675895
type: Question
duplicate of: http://stackoverflow.com/q/17675895
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42157293
has body: I have a below code where I just read a .xml file and try to populate a javascript object. I get the data from the xml and I see it when I print the individual value. But after the whole functino is over somehow I don't see the values in it. The object st_perm_dict is empty again. Why on the last line is it empty again even when it's populated and shows correct values in the .each loop. start_dx = function () { var st_perm_dict = {}; url = 'url_to_some_data' $.get( url, function(xml) { xmlDoc = $.parseXML ( xml ) ; $xml = $(xmlDoc) $(xml).find('item').each ( function() { var st = $(this).attr('st_data') ; //console.log ( st ) ; print correctly st_perm_dict[ st ] = st; }); }); console.log ( st_perm_dict ) ; // why is this empty . ?? }
has comment: http://stackoverflow.com/comment/42166958
type: UnansweredQuestion
answer count: 0

http://stackoverflow.com/q/26709567
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26709593
score: 0
answer count: 2
tagged with: parsing
accepted answer: http://stackoverflow.com/a/26716306
has body: friends This is my code var j = '[{"id":"151","name":"As aventuras de PI","picture":null}]' JSON.parse(j) and it keeps saying "unexpected token" This happens in the main page of my website. But in many other pages it works fine and I use the same functions (in PHP and in Javascript) to generate this string Whats wrong with my JSON?
tagged with: php
has answer: http://stackoverflow.com/a/26709593
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26716306
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: Unexpected token when parsing JSON

http://stackoverflow.com/a/26714027
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42018798
answers question: http://stackoverflow.com/q/26713332
has comment: http://stackoverflow.com/comment/42019289
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26713332
has body: it is all about precedence in the failing line this.myView = new this.getApp().Views.SubView({ // Doesn't work ?! the new operator works on this.getApp function as the constructor, and as the constructor tries to access member '__pages' which is here is null , then accessing sub member 'app' will fail while in the working line this.myView = new(this.getApp().Views).SubView({ the parenthesis gives the this.getApp().Views precedence over the new operator, so it is evaluated first, then return SubView which is then treated as the constructor by new operator possible neat workaround for this is to get the value of this.getApp().Views in a variable like var AppViews = this.getApp().Views; then use the variable directly this.myView = new AppViews.SubView({ jsFiddle updated
has comment: http://stackoverflow.com/comment/42019771

http://stackoverflow.com/a/46996512
downvote count: 0
answers question: http://stackoverflow.com/q/26764192
upvote count: 2
type: Answer
score: 2
has body: Handling binary data in php is a little bit tricky. To response an ArrayBuffer you must cast it to a binary string and result it with an echo statement. To generate a binary string from an 8 bit array, it is necessary to use the pack statement. If the server does not support PHP version 5.6+, each array item can be converted and concat with the dot operator: server.php &lt;?php header('content-type: application/octet-stream'); $arrayBuffer = array(0, 1, 2, 253, 254, 255); $binary = ""; for($index = 0; $index &lt; count($arrayBuffer); $index++) { $binary = $binary.pack("C*", $arrayBuffer[$index]); } echo $binary; ?&gt; The MIME type of raw data is application/octet-stream. At client side of the JavaScript code looks like: client.js let xmlRequest = new XMLHttpRequest(); xmlRequest.open('POST', 'server.php'); xmlRequest.responseType = 'arraybuffer'; xmlRequest.onload = event =&gt; { let arrayBuffer = new Uint8Array(event.target.response); console.log('arrayBuffer: ', arrayBuffer); // [0, 1, 2, 253, 254, 255]; }; xmlRequest.send();

http://stackoverflow.com/comment/41965547
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26683460
has text: The second page will have all of the posted items in the aptly named `$_POST` array.

http://stackoverflow.com/comment/41984179
type: Comment
type: QuestionComment
has text: no if I had I would have done so mate...
comment on: http://stackoverflow.com/q/26694343
score: 0

http://stackoverflow.com/a/26684302
has comment: http://stackoverflow.com/comment/42069153
has comment: http://stackoverflow.com/comment/42069880
score: 0
has comment: http://stackoverflow.com/comment/41969748
answers question: http://stackoverflow.com/q/26684153
has comment: http://stackoverflow.com/comment/42031738
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42076878
has comment: http://stackoverflow.com/comment/42069956
accepted answer of: http://stackoverflow.com/q/26684153
type: Answer
has body: $rootScope and $scope are not the same object. If you have an object named anObject in root scope and it has an attribute named anAttribute; then you can access that attribute using $scope like this: $scope.anObject.anAttribute That's because Angular looks up parent scopes if it cannot find an object in $scope. UPDATE: Your mainNav directive should have an inherited child scope by adding scope: true. When "scope" is false, which is the default setting for directives, the parent controller and directive's controller share the same scope object. Setting scope true will create a new child scope for the directive.
has comment: http://stackoverflow.com/comment/42036150
has comment: http://stackoverflow.com/comment/42023930
has comment: http://stackoverflow.com/comment/42026994
has comment: http://stackoverflow.com/comment/41983149
upvote count: 1
has comment: http://stackoverflow.com/comment/42068675
downvote count: 1
has comment: http://stackoverflow.com/comment/42076838
has comment: http://stackoverflow.com/comment/42002632

http://stackoverflow.com/a/26783764
score: 1
has comment: http://stackoverflow.com/comment/42146541
upvote count: 1
has comment: http://stackoverflow.com/comment/42148566
has comment: http://stackoverflow.com/comment/42148606
has comment: http://stackoverflow.com/comment/42145068
has comment: http://stackoverflow.com/comment/42148028
has comment: http://stackoverflow.com/comment/42145594
has comment: http://stackoverflow.com/comment/42144560
has comment: http://stackoverflow.com/comment/42152475
has comment: http://stackoverflow.com/comment/42148152
has comment: http://stackoverflow.com/comment/42146590
downvote count: 0
answers question: http://stackoverflow.com/q/26783147
type: Answer
has comment: http://stackoverflow.com/comment/42146673
has body: You should look into jQuery's mouseover() function. This will take effect only when the user is hovering over a certain area. It will run as soon as the user hover's the mouse over a certain area, regardless of cursor-speed etc. $(document).on('mouseover', '#azulA, #verdeA', function(){ console.log('I am hovering'); $('#hover-status').css('background-color', 'green'); }).on('mouseout', function(){ console.log('I am no longer hovering'); $('#hover-status').css('background-color', 'red'); }); It also didn't really help that your poly areas are very tiny, but I still managed to get it working. I am sure you know where the area's are (bottom right) since it is your object. See this fiddle as an example The box will turn green when you are hovering over a certain area, and red when not hovered. EDIT: Because I believe you are looking for a fix to your blinking issue... take a look at this code, which will help take care of that. You can adjust it as necessary: $('#azulA').hover(function(){ $('#azulH').animate({opacity: 1}, 1000); $('#bosque').css('opacity', '0'); $('#hover-status').css('background-color', 'green'); }, function(){ $('#azulH').animate({opacity: 0}, 1000); $('#bosque').css('opacity', '1'); $('#hover-status').css('background-color', 'red'); }); $('#verdeA').hover( function(){ $('#verdeH').animate({opacity: 1}, 1000); $('#bosque').css('opacity', '0'); $('#hover-status').css('background-color', 'green'); }, function(){ $('#verdeH').animate({opacity: 0}, 1000); $('#bosque').css('opacity', '1'); $('#hover-status').css('background-color', 'red'); }); Example Fiddle
has comment: http://stackoverflow.com/comment/42147869
has comment: http://stackoverflow.com/comment/42144498
has comment: http://stackoverflow.com/comment/42145338
has comment: http://stackoverflow.com/comment/42148838
has comment: http://stackoverflow.com/comment/42144677
has comment: http://stackoverflow.com/comment/42145262

http://stackoverflow.com/comment/42160818
has text: How can I go around this if there is a 0 in the string? What is the core issue of this?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26792710

http://stackoverflow.com/q/26717183
has body: I create a dropdown menu using twitter bootstrap, now I want that it will slide like this Link or Link. my html is Dropdown Action Another action Something else here Separated link Dropdown Action Another action Something else here Separated link in the mention link's look at the sidebar, when someone click on the main/head/parent menu then the child will slide down but does not effect any other element... But in my case it will slide on the second dropdown and effect it's child element..... For full code and result click on FIDDLE
type: AnsweredQuestion
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26767229
score: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26769298
has title: SlideToggle dropdown menue in twitterbootstrap
has answer: http://stackoverflow.com/a/26769298
tagged with: twitter-bootstrap-3
tagged with: twitter-bootstrap
accepted answer: http://stackoverflow.com/a/26767229

http://stackoverflow.com/comment/41957832
type: Comment
type: QuestionComment
score: 1
has text: @JonathanM - I understand what you are saying and the CSS works fine when I first load the table. After the table is sorted, the original color follows the row and it is not restripped. Why not?
comment on: http://stackoverflow.com/q/26678837

http://stackoverflow.com/comment/42061078
type: Comment
has text: @user3228992 that's not doable. If your users browse to the page but the hub is down, then the only way to force the client to connect is either by refreshing the page or using a button to call the `connect();` Some things are outside our control. Maybe you can have a loop/timer implemented in javascript that attempts to reconnect if the server goes offline, but this will seriously mess with the normal SignalR workflow. A hack that could work, but a hack nonetheless
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26734449

http://stackoverflow.com/a/75836407
type: Answer
answers question: http://stackoverflow.com/q/26793130
has comment: http://stackoverflow.com/comment/138734075
has body: Use location.replace("#" + value) instead. Like history.replaceState(...) it will not add new back/forward browser history entries, but will also not add entries to Chrome's "Browser History" page (i.e. session history). See also https://stackoverflow.com/a/6945614/165673
score: 0

http://stackoverflow.com/comment/42220570
type: AnswerComment
has text: @James111, I would appreciate if you tell me why the answer was not accepted.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26800472

http://stackoverflow.com/q/26688206
has answer: http://stackoverflow.com/a/26688258
accepted answer: http://stackoverflow.com/a/26688258
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26688252
upvote count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26688306
tagged with: jquery
favorite count: 0
has title: Wrap existing link from HTML around other images?
has answer: http://stackoverflow.com/a/26688412
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has body: How to clone an existing link with class="link" and wrap it around each img in the div "wrap"? Suppose we don't know the link so we can't just use this method: $('#wrap img').wrap(''); HTML: Result:
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26688252
score: 1
type: Question

http://stackoverflow.com/comment/42131871
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26776776
type: Comment
has text: No, the input elements do not need closing tag.

http://stackoverflow.com/q/26681307
answer count: 1
tagged with: javascript
tagged with: express
accepted answer: http://stackoverflow.com/a/26681685
score: 0
has comment: http://stackoverflow.com/comment/42028557
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26681685
tagged with: date
type: Question
has title: ExpressJS Converting Timestamp to mm/dd/yyyy in Route
has body: I am trying to convert my timestamp into mm/dd/yyyy format to be display on my index page and I have the function to do so, but I'm not sure how I should be calling it within my route to be used for display. My current setup comes back with an error, TypeError: Cannot call method 'getMonth' of undefined' route: var express = require('express'); var router = express.Router(); var blogDB = require('../config/blogDB.js'); var Blogpost = require('./models/blogModel.js'); var paginate = require('express-paginate'); //index router.use(paginate.middleware(10, 50)); function dateDisplayed(date){ var dateCreated = (date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear()); } router.route('/') // START GET method .get(function(req, res, next) { Blogpost.paginate({}, req.query.page, req.query.limit, function(err, pageCount, blogpost, itemCount) { if (err) return next(err) if (err) res.send(err); blogpost.title = req.body.title; // get the blog title blogpost.author = req.body.author; // get the author name blogpost.tagline = req.body.tagline; // get tagline blogpost.content = req.body.content; // get the blog content blogpost.category = req.body.category; // get the category blogpost.tags = req.body.tags; // get the tags blogpost.date = dateDisplayed(req.body.date); res.format({ html: function() { res.render('pages/index', { blogpost: blogpost, pageCount: pageCount, itemCount: itemCount }) }, json: function() { res.json({ object: 'blogpost', has_more: paginate.hasNextPages(req)(pageCount), data: blogpost }) } }); // END res.format(html, json) }); // END Blogpost.paginate }); // END GET method router.route('/admin/posts/create') // START POST method .post(function(req, res) { console.log("New instance"); var blogpost = new Blogpost(); // create a new instance of a Blogpost model blogpost.title = req.body.title; // set the blog title blogpost.blogUrl = blogpost.title.toLowerCase().replace(/\s+/g,"-"); blogpost.author = req.body.author; // set the author name blogpos…

http://stackoverflow.com/comment/41991798
type: QuestionComment
comment on: http://stackoverflow.com/q/26698810
has text: Just remember that the string has to be in one line, if you split it into lines as in example above it wont' work. Also `strJSON` is not a String, it's an Array.
score: 0
type: Comment

http://stackoverflow.com/q/26727527
type: Question
has answer: http://stackoverflow.com/a/26728470
answer count: 2
downvote count: 0
tagged with: jsp
tagged with: javascript
has title: Showing error message on JSP using BindingResult
has body: I am new to Spring. I am trying to show error messages on jsp for the wrong user and password by using BindingResult. But the error messages are not showing. Please suggest me what I is wrong in the below code. JSP <form:form action="login.test" id="loginForm" commandName="loginForm" method="POST"> User Name: <form:input id="userNameID" path="userName" class="textInput" /> <form:errors path="userName" class="error"/> Password: <form:password id="passwordID" path="password" class="textInput" /> <form:errors path="password" class="error"/> Login </form:form> Controller @RequestMapping(value = "login.test", method = RequestMethod.POST) public String processForm( LoginForm loginForm, BindingResult result, ModelMap model, HttpSession session) throws SQLException { String resultedPage; model.addAttribute("l_nodes", reportService.getAllLiveNodes()); model.addAttribute("s_nodes", reportService.getAllStaticReportNodes()); User user = userService.getUserByName( loginForm.getUserName() ); if( user != null ){ session.setAttribute("userID", user.getUserID()); if( loginForm.getPassword().equals( user.getPassword() ) ){ resultedPage = "home/userHome"; }else{ result.rejectValue( "password", "login.passwordNotValid"); resultedPage = "redirect:login.test"; } }else{ result.rejectValue( "userName", "login.userNotValid"); resultedPage = "redirect:login.test"; } return resultedPage; } Thanks
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: spring-mvc
has answer: http://stackoverflow.com/a/44229132
score: 1
tagged with: java
linked to: http://stackoverflow.com/q/12025888

http://stackoverflow.com/q/26730209
type: UnansweredQuestion
tagged with: jquery
linked to: http://stackoverflow.com/q/6063522
type: Question
has body: I am using native.history.js to put a customised URL in the back button. The script works fine. Now the issue is I want to make a page redirect when the refresh button is clicked; so i modified the script like this: &lt;script&gt; var back = 0; $(window).bind('beforeunload', function () { if (confirm('Want to continue?')) { if (back == 1) { alert('back'); //window.location.href = "&lt;?=$$last_offer?&gt;"; } else { alert('refresh'); //window.location.href = "&lt;?=$actual_link;?&gt;"; } } else { // Do nothing! } }); window.onpageshow = function (e) { if (e.persisted) { location.reload(); } }; window.onpopstate = function (event) { if (document.location.toString().indexOf("redir=1") &gt; 0) { back = 1; window.location.href = "&lt;?=$$last_offer?&gt;"; } }; &lt;/script&gt; Issue is, the beforeunload function seems not working. What is the problem I can't fin?. If I am clicking the back button, the page is taking to the desired page, so it works fine. All I want is that, somehow the page refresh must work as I anticipated.
has title: onbeforeunload function having serious issue
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42048983
has answer: http://stackoverflow.com/a/26730291
tagged with: javascript

http://stackoverflow.com/a/26801176
has body: You can use multiple text boxes and still make it look like one, command prompt. Using CSS you remove left, right borders and join them close enough. On keypress event of each textbox, check if the user typed space and change the focus to next textbox. This solution works provided you have some fixed format of input to be taken.
answers question: http://stackoverflow.com/q/26798133
type: Answer
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/26690852
accepted answer: http://stackoverflow.com/a/26692484
upvote count: 2
tagged with: d3.js
answer count: 1
tagged with: charts
tagged with: donut-chart
has body: I have a Donut Chart with 3 categories (arcs): Facebook (50%), Twitter(30%) and Instagram(20%). Plot the chart is fairly easy, but I want to know how to insert an icon in each arc with the respective symbol of the social network (using D3 or even C3). Thanks!
tagged with: javascript
has answer: http://stackoverflow.com/a/26692484
type: AnsweredQuestion
score: 2
downvote count: 0
favorite count: 0
type: Question
tagged with: c3.js
has title: Is it possible to insert an icon in the arc of a donut chart with D3?

http://stackoverflow.com/q/26788397
linked to: http://stackoverflow.com/q/26092101
has comment: http://stackoverflow.com/comment/42153287
linked to: http://stackoverflow.com/q/24977784
score: 87
downvote count: 0
has comment: http://stackoverflow.com/comment/42304596
has answer: http://stackoverflow.com/a/26788730
has answer: http://stackoverflow.com/a/26807388
favorite count: 0
has body: I'm maintaining some legacy code and I've noticed that the following pattern for defining objects is used: var MyObject = {}; (function (root) { root.myFunction = function (foo) { //do something }; })(MyObject); Is there any purpose to this? Is it equivalent to just doing the following? var MyObject = { myFunction : function (foo) { //do something }; }; I'm not about to embark in a holy quest to refactor the whole codebase to my likings, but I'd really like to understand the reason behind that roundabout way of defining objects. Thanks!
has answer: http://stackoverflow.com/a/26803931
tagged with: javascript-objects
has answer: http://stackoverflow.com/a/26788447
has comment: http://stackoverflow.com/comment/42160126
has comment: http://stackoverflow.com/comment/42153489
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26788591
possible better answer: http://stackoverflow.com/a/26788440
has title: Does this way of defining JS objects have any purpose?
has answer: http://stackoverflow.com/a/26788440
linked to: http://stackoverflow.com/q/881515
type: Question
has comment: http://stackoverflow.com/comment/42154676
has comment: http://stackoverflow.com/comment/42176663
linked to: http://stackoverflow.com/q/2504568
accepted answer: http://stackoverflow.com/a/26788447
upvote count: 87
tagged with: javascript
answer count: 6

http://stackoverflow.com/comment/42086880
comment on: http://stackoverflow.com/q/26751432
has text: And there will be "text" based interchanging between server and client. And i will change some photos on the client web page.
score: 0
type: Comment
type: QuestionComment

arrays
tags question: http://stackoverflow.com/q/26816123
tags question: http://stackoverflow.com/q/26797954
tags question: http://stackoverflow.com/q/26710692
tags question: http://stackoverflow.com/q/26722197
tags question: http://stackoverflow.com/q/26815829
tags question: http://stackoverflow.com/q/26828625
tags question: http://stackoverflow.com/q/26748519
tags question: http://stackoverflow.com/q/26716091
tags question: http://stackoverflow.com/q/26792555
tags question: http://stackoverflow.com/q/26814628
type: Tag
tags question: http://stackoverflow.com/q/26735854
tags question: http://stackoverflow.com/q/26791539
tags question: http://stackoverflow.com/q/26804393
tags question: http://stackoverflow.com/q/26683251
tags question: http://stackoverflow.com/q/26798124
tags question: http://stackoverflow.com/q/26790719
tags question: http://stackoverflow.com/q/26830256
tags question: http://stackoverflow.com/q/26819150
tags question: http://stackoverflow.com/q/26719238
tags question: http://stackoverflow.com/q/26679004
tags question: http://stackoverflow.com/q/26743361
tags question: http://stackoverflow.com/q/26782482
tags question: http://stackoverflow.com/q/26697383
tags question: http://stackoverflow.com/q/26704872
tags question: http://stackoverflow.com/q/26717161
tags question: http://stackoverflow.com/q/26702938
tags question: http://stackoverflow.com/q/26738756
tags question: http://stackoverflow.com/q/26792873
tags question: http://stackoverflow.com/q/26809067
tags question: http://stackoverflow.com/q/26822194
tags question: http://stackoverflow.com/q/26794048
tags question: http://stackoverflow.com/q/26701751
tags question: http://stackoverflow.com/q/26689661
tags question: http://stackoverflow.com/q/26796276
tags question: http://stackoverflow.com/q/26819769
tags question: http://stackoverflow.com/q/26831586
tags question: http://stackoverflow.com/q/26756380
tags question: http://stackoverflow.com/q/26764349
tags question: http://stackoverflow.com/q/26832084
tags question: http://stackoverflow.com/q/26727994
tags question: http://stackoverflow.com/q/26744001
tags question: http://stackoverflow.com/q/26678282
tags question: http://stackoverflow.com/q/26700041
tags question: http://stackoverflow.com/q/26757810
tags question: http://stackoverflow.com/q/26713422
tags question: http://stackoverflow.com/q/26703394
tags question: http://stackoverflow.com/q/26735607
tags question: http://stackoverflow.com/q/26714724
tags question: http://stackoverflow.com/q/26803410
tags question: http://stackoverflow.com/q/26781498
tags question: http://stackoverflow.com/q/26826889
tags question: http://stackoverflow.com/q/26748964
tags question: http://stackoverflow.com/q/26744376
tags question: http://stackoverflow.com/q/26758191
tags question: http://stackoverflow.com/q/26791200
tags question: http://stackoverflow.com/q/26788097
tags question: http://stackoverflow.com/q/26675505
tags question: http://stackoverflow.com/q/26797649
tags question: http://stackoverflow.com/q/26797334
tags question: http://stackoverflow.com/q/26807528
tags question: http://stackoverflow.com/q/26817713
tags question: http://stackoverflow.com/q/26793139
tags question: http://stackoverflow.com/q/26714919
tags question: http://stackoverflow.com/q/26799563
tags question: http://stackoverflow.com/q/26784611
tags question: http://stackoverflow.com/q/26824081
tags question: http://stackoverflow.com/q/26704365
tags question: http://stackoverflow.com/q/26686206
tag name: arrays
tags question: http://stackoverflow.com/q/26707048
tags question: http://stackoverflow.com/q/26756232
tags question: http://stackoverflow.com/q/26812435
tags question: http://stackoverflow.com/q/26686484
tags question: http://stackoverflow.com/q/26745170
tags question: http://stackoverflow.com/q/26691842
tags question: http://stackoverflow.com/q/26701984
tags question: http://stackoverflow.com/q/26743220
tags question: http://stackoverflow.com/q/26678274
tags question: http://stackoverflow.com/q/26778342

http://stackoverflow.com/comment/42196707
type: QuestionComment
comment on: http://stackoverflow.com/q/26812222
has text: And don't post collaboration fiddles.
type: Comment
score: 1

http://stackoverflow.com/comment/95386387
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26822870
type: Comment
has text: What’s the benefit of not using Ajax? I heard using destroy is not preferred. Though this is obviously the correct answer.

http://stackoverflow.com/comment/41962264
type: QuestionComment
has text: Edited my question to show the whole task!
comment on: http://stackoverflow.com/q/26681717
score: 0
type: Comment

http://stackoverflow.com/a/26781593
accepted answer of: http://stackoverflow.com/q/26780981
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26780981
type: Answer
has comment: http://stackoverflow.com/comment/42140820
score: 8
has comment: http://stackoverflow.com/comment/42141396
downvote count: 1
upvote count: 9
has body: There is a way to do this, illustrated in this example (http://jsfiddle.net/zqwhmo7j/): function one(){ two() } function two(){ console.log(two.caller.arguments) } one('dude') It is non-standard however and may not work in all browsers: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/caller You would have to change your function like so: module = function(){ this.build = function build(args){ // make args the arguments from caller ( define ) fn above console.log(build.caller.arguments) }; };

http://stackoverflow.com/q/26794438
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26795095
accepted answer: http://stackoverflow.com/a/26795095
possible better answer: http://stackoverflow.com/a/26794870
score: 1
type: Question
tagged with: javascript
tagged with: jquery
has title: AngularJS select a single table cell in ng-repeat
answer count: 2
has answer: http://stackoverflow.com/a/26794870
upvote count: 1
downvote count: 0
has body: I want to be able to click a table cell in ng-repeat to select it (or toggle "on/off" with CSS) but I'm getting stumped and could use some help. HTML &lt;tr ng-repeat="row in game.rows"&gt; &lt;td ng-repeat="word in row.words"&gt;{{word}}&lt;/td&gt; &lt;/tr&gt; The td's are seeded by an API with words for a game. Controller 'use strict'; angular.module('MyApp') .controller('CardCtrl', function($scope, $http) { $scope.game = {}; $http.get('/api/games/new').success(function(game) { $scope.game = game; }); }); What I'd like to do is be able to click the td similar to how toggleClass in jQuery works, being able to toggle a CSS class on the individual td. Any thoughts?

http://stackoverflow.com/a/26812448
type: Answer
has comment: http://stackoverflow.com/comment/42197259
has comment: http://stackoverflow.com/comment/42197167
has comment: http://stackoverflow.com/comment/42197207
has comment: http://stackoverflow.com/comment/42197211
has body: Your curly brackets are a little off scope. It should be more like: var message = ''; for (var i = 0; i &lt; customerList.length; i++) { if (customerList[i].status === statusType) message += customerList[i].status + '. ' ; } alert(message);
has comment: http://stackoverflow.com/comment/42197432
answers question: http://stackoverflow.com/q/26812435
has comment: http://stackoverflow.com/comment/42197135
score: 0

ruby-on-rails
tags question: http://stackoverflow.com/q/26707039
tags question: http://stackoverflow.com/q/26724430
tags question: http://stackoverflow.com/q/26674033
tags question: http://stackoverflow.com/q/26719710
type: Tag
tags question: http://stackoverflow.com/q/26832288
tags question: http://stackoverflow.com/q/26762943
tags question: http://stackoverflow.com/q/26694151
tags question: http://stackoverflow.com/q/26791249
tags question: http://stackoverflow.com/q/26749048
tags question: http://stackoverflow.com/q/26828487
tags question: http://stackoverflow.com/q/26771758
tags question: http://stackoverflow.com/q/26752564
tags question: http://stackoverflow.com/q/26725930
tags question: http://stackoverflow.com/q/26734578
tags question: http://stackoverflow.com/q/26683536
tags question: http://stackoverflow.com/q/26713011
tags question: http://stackoverflow.com/q/26807450
tags question: http://stackoverflow.com/q/26694692
tags question: http://stackoverflow.com/q/26681611
tags question: http://stackoverflow.com/q/26812626
tags question: http://stackoverflow.com/q/26803441
tags question: http://stackoverflow.com/q/26788986
tags question: http://stackoverflow.com/q/26743374
tags question: http://stackoverflow.com/q/26807863
tags question: http://stackoverflow.com/q/26708873
tags question: http://stackoverflow.com/q/26714244
tags question: http://stackoverflow.com/q/26822795
tags question: http://stackoverflow.com/q/26716508
tags question: http://stackoverflow.com/q/26830080
tag name: ruby-on-rails
tags question: http://stackoverflow.com/q/26768908
tags question: http://stackoverflow.com/q/26767517
tags question: http://stackoverflow.com/q/26815602
tags question: http://stackoverflow.com/q/26703849
tags question: http://stackoverflow.com/q/26690491
tags question: http://stackoverflow.com/q/26740955
tags question: http://stackoverflow.com/q/26733677
tags question: http://stackoverflow.com/q/26803734
tags question: http://stackoverflow.com/q/26710122
tags question: http://stackoverflow.com/q/26693580
tags question: http://stackoverflow.com/q/26768545
tags question: http://stackoverflow.com/q/26715486
tags question: http://stackoverflow.com/q/26701263
tags question: http://stackoverflow.com/q/26738580
tags question: http://stackoverflow.com/q/26727084
tags question: http://stackoverflow.com/q/26711697
tags question: http://stackoverflow.com/q/26703246
tags question: http://stackoverflow.com/q/26761996
tags question: http://stackoverflow.com/q/26787587
tags question: http://stackoverflow.com/q/26749059

http://stackoverflow.com/comment/42192814
comment on: http://stackoverflow.com/a/26809620
type: AnswerComment
score: 0
type: Comment
has text: Ok returning false from a function in "onsubmit= " solved my problem, thank you very much!

http://stackoverflow.com/q/26691866
tagged with: javascript
has body: Im trying to make a widget like application, with awesomium and wpf, the webpage have buttons to minimize, close and drag the host window, minimize and close didnt give me problems, the drag button is the dificult one for me. right now the app has an invisible wpf button placed on top of the html one, the window can drag and the wpf button is not visible yet clickeable, but i was wondering if there is a better way to drag the host window of the awesomium webcontrol from the webpage.
downvote count: 0
score: 1
has title: how to make awesomium drag host window?
favorite count: 0
type: UnansweredQuestion
tagged with: awesomium
tagged with: wpf
answer count: 0
upvote count: 1
type: Question
tagged with: c#

http://stackoverflow.com/comment/41970977
type: Comment
has text: I don't think you can do such thing! You are loading a webdriver and you expect not to be a webdriver? BTW, maybe you can perform this bby removing `webdriver` attribute from `html` tag; see [this](http://stackoverflow.com/questions/22711441/remove-readonly-attributes-in-selenium-webdriver?answertab=active#tab-top). But I'm 99% sure that there is no way to prevent this attribute in start-up.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26684824

http://stackoverflow.com/a/26771167
type: Answer
answers question: http://stackoverflow.com/q/26755169
has comment: http://stackoverflow.com/comment/42372051
has comment: http://stackoverflow.com/comment/42153102
has comment: http://stackoverflow.com/comment/42147958
has body: I updated your fiddle to demonstrate the solution here. You need to sort through all the images, and pair up the skinny ones, then you can calculate their new heights. var images = document.getElementsByTagName('img'); var tooSmall = []; // Collection of smallPairs var smallPair = []; // a pair of images to shrink // Calculates width after first shrink var newWidth = function (image, newHeight) { return image.naturalWidth * (newHeight/image.naturalHeight); }; // If a single image is too narrow, grab the next regardless of its width for(var i=0;i&lt;images.length;i++) { if (smallPair.length !== 1 &amp;&amp; (images[i].naturalWidth &gt; 500 || smallPair.length &gt; 1)) { // Shrink any image too wide if(images[i].naturalWidth &gt; 500) { images[i].setAttribute('width','500px'); } if(smallPair.length &gt; 1) { tooSmall.push(smallPair); } smallPair = []; } else { smallPair.push(images[i]); } } // Loop through image pairs and shrink them for(var i=0;i&lt;tooSmall.length;i++) { var newHeight = tooSmall[i][0].naturalHeight; if(tooSmall[i][1].naturalHeight &lt; newHeight) { newHeight = tooSmall[i][1].naturalHeight; } var totalWidth = newWidth(tooSmall[i][0], newHeight) + newWidth(tooSmall[i][1], newHeight); var sizeRatio = 496 / totalWidth; // Use 496 width to account for padding newHeight = Math.round(newHeight * sizeRatio); tooSmall[i][0].setAttribute('height', newHeight + 'px'); tooSmall[i][1].setAttribute('height', newHeight + 'px'); } If you're looking to make a static page there may be easier solutions, but this should work either way. If you're dynamically loading content there are server-side options as well.
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42153563
has comment: http://stackoverflow.com/comment/42285164
accepted answer of: http://stackoverflow.com/q/26755169

http://stackoverflow.com/comment/101771319
comment on: http://stackoverflow.com/a/26775638
score: 0
type: AnswerComment
type: Comment
has text: To what reference `this.` in each events ? I'm trying to write this with arrow functions

http://stackoverflow.com/q/26789137
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26789232
score: 1
tagged with: wordpress
possible better answer: http://stackoverflow.com/a/26789250
upvote count: 1
has comment: http://stackoverflow.com/comment/42158362
has answer: http://stackoverflow.com/a/26789250
type: Question
has comment: http://stackoverflow.com/comment/42154534
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/26789232
downvote count: 0
has comment: http://stackoverflow.com/comment/42191925
tagged with: jquery
has answer: http://stackoverflow.com/a/26789214
has title: Scrolling has suddenly stopped working in wordpress site
favorite count: 0
tagged with: css
has comment: http://stackoverflow.com/comment/42154661
has body: I have tried turning all plugins off, deleting all custom CSS, deleting new entries, etc. Suddenly, scrolling stopped working on all single posts in my Website... My client is pissed, and I can;t figure out where the problem is. The URL to see this not working is http://urm.case42.com/market-report-august-29-2014/

http://stackoverflow.com/comment/42182624
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26804292
has text: Given my error and based on your comments, I would revise the question a bit - given that the function 'it' (in the second updated jsperf) does even less then 'check' in the first - why wouldn't I see similar behavior in chrome? (again apologies for the mistake earlier - I agree apples and oranges there yes)
score: 0

http://stackoverflow.com/q/26761689
answer count: 0
linked to: http://stackoverflow.com/q/16344223
has comment: http://stackoverflow.com/comment/42107915
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42110325
has comment: http://stackoverflow.com/comment/42127674
upvote count: 1
tagged with: url-routing
has comment: http://stackoverflow.com/comment/42104804
score: 1
has comment: http://stackoverflow.com/comment/42105518
type: Question
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/14890784
favorite count: 0
linked to: http://stackoverflow.com/q/14765719
has body: We have a app with, among other stuff, lists of things. In this web app, we have a custom jQuery plugin, that we apply to the lists, which shows a context menu for the clicked table row. In some cases, it makes sense to let the user interact with related objects through these context menus, for example clicking on a row in a list of projects, and selecting edit project manager, should take me to the edit user page for the user that's assigned as the project manager to that project. Within an AngularJS app, this is quite simple: clicking the context menu just takes me to the route corresponding to the action I want to take, and routing handles the rest. However, this is a (very...) large web application, and only small parts of it are written with AngularJS; we also need to support custom callback functions from the context menu. Sometimes we want to open a popup window with a different url, sometimes we want to make a custom AJAX call, sometimes we want to do something else... The configuration of the context menu - what elements are displayed etc - is done on the server, and passed to the client as JSON. Thus, I can't specify a callback function on the configuration object directly, but I'm limited to strings and other JSON-representable things. I had hoped to be able to do this simply by configuring a route and saying "when I go to this route, call this here function and abort navigation", and then specify a url template on the config object. However, this doesn't seem trivial, and all attempts I can find seem to be deeply interlinked with navigating to a specific controller and/or view somewhere; I haven't found anything that helps me understand how to perform a general JavaScript action based on a route. Is there a way to use Angular routing to call general callback functions, without any navigation? UPDATE Given the comments, I'm a little worried that it might have been better to state this problem differently, so here is another try: Given a JSON object that I…
has title: Executing a callback function based on routes in angular (no navigation)
linked to: http://stackoverflow.com/q/16384134
tagged with: angularjs

http://stackoverflow.com/comment/42136407
type: AnswerComment
has text: I do not want to sanitize. I wish to keep the string as it is but just apply 1 level decode on it. Thus if my string is it should stay as is. if it is &lt; , it should be < etc. thx for lib anyways
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26767567

http://stackoverflow.com/comment/42039452
score: 0
type: Comment
has text: @IsmaelMiguel I agree, but that at least is easily searchable, since it's a actual feature (unlike pseudo-`if`s abusing `&&`), I guess.
comment on: http://stackoverflow.com/a/26705868
type: AnswerComment

http://stackoverflow.com/comment/42130497
comment on: http://stackoverflow.com/q/26775868
type: Comment
type: QuestionComment
has text: innerHtml for tbody on IE is read only
score: 0

http://stackoverflow.com/q/26720531
has comment: http://stackoverflow.com/comment/42031557
possible better answer: http://stackoverflow.com/a/26720748
type: Question
score: 0
has answer: http://stackoverflow.com/a/26720620
favorite count: 0
has comment: http://stackoverflow.com/comment/42031480
has answer: http://stackoverflow.com/a/26721101
has answer: http://stackoverflow.com/a/26720709
has comment: http://stackoverflow.com/comment/42031189
has comment: http://stackoverflow.com/comment/42032032
answer count: 4
has comment: http://stackoverflow.com/comment/42031087
tagged with: settimeout
has title: setTimeout for a function of a private object
tagged with: private-methods
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42031030
has answer: http://stackoverflow.com/a/26720748
accepted answer: http://stackoverflow.com/a/26720709
tagged with: javascript
has body: I'm trying to set timeout to a function of an object, which is a private function of another object. Actually the structure is something like this: function MainObject() { var id; ... var InnerObject = function() { this.getSomething = function() { ... } } this.testFunc = function() { id = setTimeout(InnerObject.getSomething(), 1000); } } ...and it won't work as it says 'undefined' when trying to set timeout, and I can't execute this function directly as it's a private function. What am I doing wrong? Tried to find something particular but didn't success. I see the error might be somewhere in scope problems, but still don't get it

http://stackoverflow.com/a/26816114
has comment: http://stackoverflow.com/comment/42250900
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26802817
score: 1
answers question: http://stackoverflow.com/q/26802817
has body: You have introduced a flag3 but I think you don't need it. I assume that rotation starts with ang = 0 and flag2 shall tell the rotation direction: increment when false and decrement when true. But you always set ang = 0 when it is true. Your code should look like: var rotateInterval, ang = 0, flag2 = false; function Rotate(arg) { rotateInterval = setInterval(function () { arg.save(); arg.clearRect(0, 0, arg.canvas.width, arg.canvas.height); arg.translate(arg.canvas.width / 2, arg.canvas.height / 2); if (flag2 == false) ang += 5; // increment ang if flag2 == false ( = go forward) else ang -= 5; // otherwise decrement ang ( = go backwards) arg.rotate(ang * Math.PI / 180); // set the new ang to the rotation if (ang == 180) flag2 = true; // change direction if 180 deg is reached if (flag2 == true &amp;&amp; ang == 0) { // if we go backwards and have reached 0 reset clearInterval(rotateInterval) flag2 = false; } arg.drawImage(bowl, -90, -90, 180, 180); arg.restore(); //restore the state of canvas }, 100); } Now the angle starts with 0, goes stepwise up to 180, then stepwise back to 0, then stops.
has comment: http://stackoverflow.com/comment/42274887
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42253582

http://stackoverflow.com/comment/42190951
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26809128
has text: Every time you do `$(folderDiv)`, you are *re-creating* the DOM element and making a *new* jQuery object.

http://stackoverflow.com/comment/42009174
has text: The reason why this doesn't work is because when you get backgroundColor the native api gives you back a string in the rgb format "rgb(102, 100, 208)" as an example and not in HEX like you are expecting. I would still highly suggest using classes and giving these states a more meaningful value, as per my answer below.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26705598
type: Comment

http://stackoverflow.com/q/26771961
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has body: So I think I might have an idea of what my problem is -- in an effort to make my site responsive, I've used height:auto and set height using min-height:some-percentage. I understand this might not be best practice but it works and is a lot less time consuming than media queries. So the following code for animated scroll used to work when I didn't set height using the method stated above: $('.animate_scroll').click(function(e){ e.preventDefault(); //I tried without this line var loc_id = $($(this).attr('href')), loc_pos = loc_id.offset().top; console.log($(this).attr('href')); //outputs the right div id console.log(loc_pos); //outputs offset greater than 0 $('html, body').animate({scrollTop : loc_pos}, 300) }) Anyone know what I'm doing wrong? The reason I said I think I have an idea of what my problem is is because the console.log statements above log valid values. Update: In the code above, I've added a couple more console.log statements to get offset values. The values are different but even if I set loc_id to document.getElementById(this.getAttribute('id')).offsetTop then use that as my scrollTop value, it doesn't scroll. console.log($(this).attr('href')); //correct id console.log(loc_pos); //outputs 794.546875 console.log(document.getElementById(this.getAttribute('id')).offsetTop); //944
tagged with: http://stackoverflow.com/tag/html
has title: Animate scroll jquery not working
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26772110
tagged with: scroll

http://stackoverflow.com/a/26819600
score: 5
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26819139
upvote count: 5
has comment: http://stackoverflow.com/comment/42210506
downvote count: 0
has body: Template needs to be defined by . There is no helper on the element. You could use a global helper for this, though: Template.registerHelper("tasks", function() { return [....] }); An alternative is to use : {{>body}} Todo List {{#each tasks}} {{> task}} {{/each}}
answers question: http://stackoverflow.com/q/26819139
has comment: http://stackoverflow.com/comment/42209516

http://stackoverflow.com/a/26842011
type: AcceptedAnswer
has body: Ok, thanks for help, this is what I need // 1. Hide On Bottom $(".navigation").animate({bottom: -64},200); // 2. Switch to top setTimeout(function() { $(".navigation").attr('style' , 'bottom:' + navHeight + 'px'); },300); // 3. Show on top setTimeout(function() { $(".navigation").animate({bottom: navHeight - 64},200); },400);
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26828824
answers question: http://stackoverflow.com/q/26828824

http://stackoverflow.com/comment/42608721
has text: This did solve the Seg Fault issue. I definitely just need to use pools though, this burned through all the memory on my VM so I'll need to delegate that to a limited amount of threads. Thanks again for looking into this!
score: 0
comment on: http://stackoverflow.com/a/27038763
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42163288
score: 0
type: Comment
has text: `echo` isn't Javascript.
type: QuestionComment
comment on: http://stackoverflow.com/q/26794254

http://stackoverflow.com/q/26788667
has comment: http://stackoverflow.com/comment/42209803
upvote count: 1
has title: How to delay synthesise in Mespeak.js display words while wav plays
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42235768
tagged with: javascript
has comment: http://stackoverflow.com/comment/42153611
linked to: http://stackoverflow.com/q/3583724
tagged with: wav
favorite count: 0
has answer: http://stackoverflow.com/a/26870069
type: UnansweredQuestion
tagged with: text-to-speech
score: 1
tagged with: speech-synthesis
has body: I'm working on editing Mespeak.js to help out a friend with visual tracking problems. I've been looking through Mespeak.js ( http://www.masswerk.at/mespeak/) and trying to figure out how to grab each word as it is spoken, and then display it on the screen while the wav file is playing. I'm thinking this has to do with returning the data as an array, and then displaying the array as the wav plays. I'm not even sure this is possible (or what the raw data looks like). Here's what I have div id="display"> Here. var timeoutID var texttosend = prompt('Text to Split'); var res = texttosend.split(" ") var arrayLength = res.length; function refresh(word) { meSpeak.speak(res[i], {speed: 100}); console.log(res[i]); $( "#display span" ).text(word); }; console.log('here'); for (var i = 0; i <= arrayLength; i++) { timoutID = window.setTimeout(refresh(res[i]), 50000+(i*50000)); }; There are two problems here - I think they are both related to the delay. No matter what I set the timeoutID to the text is snythesized all at once and the only word displayed is the last one. I've tried using variations of setTimeout and I've tried jQuery's delay. Any ideas on how to help? The console.log outputs each word separately, so I know the separation of text into an array works and the loop works - I think it's now just timing. Sorry if this doesn't make a ton of sense - I guess some clarity would help me start to dismantle this problem.
type: Question

http://stackoverflow.com/q/26819004
score: 0
has answer: http://stackoverflow.com/a/26829818
answer count: 1
tagged with: shortcode
has body: i'm trying to add a shortcode to set a grid in wordpress content. My theme is based on foundation5 So I made a new file called "Shortcodes.php" and load it in the functions.php . I inserted the following code to the shortcodes file <?php function spalten_zeilen_function($atts, $content = null) { extract(shortcode_atts(array( 'width' => '', 'position' => '', 'vertical' => '', ), $atts)); if ( $position == 'first' ) { $return_string = ' '; } $return_string = ' '; $return_string = do_shortcode($content); $return_string .= ' '; if ( $position == 'end' ) { $return_string = ' '; } wp_reset_query(); return $return_string; } function register_shortcodes(){ add_shortcode('grid_shortcode', 'spalten_zeilen_function'); } add_action( 'init', 'register_shortcodes'); add_filter('widget_text', 'do_shortcode'); // Shortcodes auch in Widgets ausführen add_filter( 'comment_text', 'do_shortcode' ); // Shortcodes auch in den Kommentaren ausführen add_filter( 'the_excerpt', 'do_shortcode'); // Shortcodes auch in den Excerpts ausführen ?> So what I want to do is to open a new row if the shortcode handles the first content. Afterwards I want to set the width of the column and, if the shortcode handles the last content an end tag. After that the content itself follows, followed by a closing div for the row if it's the last content. The rendered shortcode looks like [grid_shortcode position="first" width="6" vertical="valign-top"]Fügen Sie hier den den gewünschten Inhalt Ihrer neuen Spalte ein.[grid_shortcode] So I would expect something like Fügen Sie hier den den gewünschten Inhalt Ihrer neuen Spalte ein. Or like [grid_shortcode position="end" width="6" vertical="valign-top"]Fügen Sie hier den den gewünschten Inhalt Ihrer neuen Spalte ein.[grid_shortcode] So I would expect somethin like Fügen Sie hier den den gewünschten Inhalt Ihrer neuen Spalte ein. But it just kills my template. Any idea or suggestions? Thank you guys!
has comment: http://stackoverflow.com/comment/42208297
accepted answer: http://stackoverflow.com/a/26829818
tagged with: php
tagged with: zurb-foundation-5
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42207923
tagged with: wordpress
has title: Dynamic Rows Shortcode for wordpress
type: Question
tagged with: javascript

http://stackoverflow.com/comment/51028930
score: 1
type: Comment
has text: This actually worked. I almost started to write a crazy custom function for ordering -.-
type: QuestionComment
comment on: http://stackoverflow.com/q/26829384

http://stackoverflow.com/comment/42063565
has text: please be aware that this is being phased out. https://github.com/emberjs/rfcs/blob/ember-2.0-rfc/active/0000-the-road-to-ember-2-0.md
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26737825

http://stackoverflow.com/a/60376876
answers question: http://stackoverflow.com/q/26768162
downvote count: 0
score: 1
has body: I sloved the same error by using the FULL datepicker js file available in Git Datetimepicker/build/
type: Answer
upvote count: 1

http://stackoverflow.com/q/26832347
has answer: http://stackoverflow.com/a/26832425
upvote count: 1
has answer: http://stackoverflow.com/a/26832480
downvote count: 1
has comment: http://stackoverflow.com/comment/42231239
favorite count: 0
type: UnansweredQuestion
has body: I am calling the following 3rd party JavaScript function: var Socket = function(url) { sockets.push(this); var me = this; me.readyState = 0; window.setTimeout(function() { me.readyState = 1; me.onopen(); }, 500); }; via this: connection = new Socket(socketURL); Now I want to try and understand once and for all what it means to reference this inside a function. Is it the same as in Java. e.g. I am referring to myself or in the case of JavaScript I am referring to the namespace that the function resides in?
has comment: http://stackoverflow.com/comment/42231384
has title: What does 'this' mean inside javascript function?
type: Question
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42231214
linked to: http://stackoverflow.com/q/3127429

http://stackoverflow.com/comment/42069946
has text: Not sure if that's the problem, but if `tinyMceWysiwygSetup.prototype.getSettings` is not defined previously, `getSettings.call` will throw (because `getSettings` will be undefined).
type: Comment
comment on: http://stackoverflow.com/q/26741940
score: 0
type: QuestionComment

http://stackoverflow.com/a/26734210
type: Answer
answers question: http://stackoverflow.com/q/26734136
upvote count: 2
has body: Your AngularJS version doesn't supports StoreController as store syntax. Change it to StoreController and simply remove the stores. Also you must inject the scope object into the controller and set its properties instead. Here is the updated and working code. var app = angular.module('gemStore', []); var gem = { name: 'Diamond', price: 120, description: 'Hard' }; app.controller('StoreController', ['$scope', function($scope) { $scope.product = gem; } ]); Insert title here {{"Hello, Angular!"}} {{product.name}} {{product.price}} {{product.description}}
score: 2
downvote count: 0

http://stackoverflow.com/a/26978251
accepted answer of: http://stackoverflow.com/q/26809494
downvote count: 0
has body: Found the answer somewhere online; add {standalone: 'app_name'} to your config. gulp.task('js', function () { browserify('./js/app.js', {standalone: 'MyApp'}) .transform(reactify) .bundle() .pipe(source('bundle.js')) .pipe(gulp.dest('./js/')); }); Then you can do new MyApp() from within script tags on your page. Update 09/09/15 New Approach I have since changed my approach to using babelify instead of reactify and no longer having to call my javascript from inside script tags. var b = watchify(browserify('js/index.js', { cache: {}, packageCache: {}, debug: true, fullPaths: true, transform: ['babelify'] })); function bundler () { b.bundle() .on('error', gutil.log.bind(gutil, 'Browserify error.')) .pipe(source('build.js')) .pipe(gulp.dest('/js')); } gulp.task('backend:scripts', bundler); b.on('update', bundler); b.on('log', gutil.log); Also, should note that regarding the original question and bootstrapping data I now use express-state. res.expose({ users: users, posts: posts }); And then in your handlebars file: &lt;script type="text/javascript"&gt;{{{state}}}&lt;/script&gt; &lt;script src="/js/build.js" type="text/javascript"&gt;&lt;/script&gt; And all your data is available on the window variable for bootstrapping within your code.
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26809494
score: 1
upvote count: 1

http://stackoverflow.com/a/39279795
upvote count: 2
answers question: http://stackoverflow.com/q/26785268
downvote count: 0
type: Answer
has body: Webpack dev server proxy api has been changed since v1.15 https://github.com/webpack/webpack-dev-server/issues/562 glob * should be ** to proxy all request devServer: { proxy: { '**': 'http://local.ui.steelhouse.com/' }, }
score: 2

http://stackoverflow.com/q/26702646
has comment: http://stackoverflow.com/comment/41998830
has title: Accessing to a multidimensional PHP array in JavaScript
has comment: http://stackoverflow.com/comment/41999024
has body: I want to show a jQuery dialog with details of one row in the table (that only shows part of information). This is an example of what I want to do. The problem: When the image of 'View more details' of a row is clicked, the JS function receives the id of the row clicked. I can't assign to JS variable 'data' as I did in the HTML part of the code. How can I solve this? Is a good way to do it? <?php for($i = 0; $i < count($cars); $i++) { ?> <?=$cars[$i]['model']?> <?=$cars[$i]['colour']?> <img class="details" id="<?=$i?>" style="cursor: pointer;" src="http://localhost/ci/public/images/details.png" width="40" height="40" alt="Details"/> <?php } ?>
has comment: http://stackoverflow.com/comment/41998737
favorite count: 0
tagged with: jquery-ui-dialog
downvote count: 2
has comment: http://stackoverflow.com/comment/41998869
has answer: http://stackoverflow.com/a/26702838
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41998910
possible better answer: http://stackoverflow.com/a/26702974
type: Question
has comment: http://stackoverflow.com/comment/41999037
answer count: 2
has answer: http://stackoverflow.com/a/26702974
accepted answer: http://stackoverflow.com/a/26702838
upvote count: 0
score: -2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26730366
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26730079
type: Answer
has body: What you should do is to use the modelController $setViewValue(value) to trigger your parser pipeline. To get hold of the modelcontroller, you would have to wrap the dummy html in a form: $compile('&lt;form name="form1"&gt;&lt;input percent ng-model="someModel.Property" name='data'&gt;&lt;/input&gt;&lt;/form&gt;')($rootScope); $rootScope.form1.data.$setViewValue('1a2b3') $rootScope.$digest(); console.log($rootScope.someModel); expect($rootScope.someModel.Property).toEqual('123'); Can you give it a try.
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26730079

http://stackoverflow.com/a/26702676
answers question: http://stackoverflow.com/q/26702338
has comment: http://stackoverflow.com/comment/42000124
has comment: http://stackoverflow.com/comment/42002595
type: Answer
has comment: http://stackoverflow.com/comment/42002870
has comment: http://stackoverflow.com/comment/42003203
has comment: http://stackoverflow.com/comment/42001911
downvote count: 1
has comment: http://stackoverflow.com/comment/42003379
has comment: http://stackoverflow.com/comment/42001715
has body: Here is a simple algorithm that you can use : 1- you can create simple function to check if the email address is valid or not 2- match the email address from the end against the string ".edu" real world example : function validateEmail(email) { var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; if( !emailReg.test( email ) ) { return false; } else { return true; } } the previous function is from : email-validation-using-jquery function checkEdu(email){ return (email.substr(-4) == '.edu'); } the advantage here is that you have a validateEmail function that you can use in other projects and the checkEdu function which is specific to this case note : substr(begin,length) : starts at the index begin and take length character substr(-length) : starts from the end and take length character
score: -1
upvote count: 0

http://stackoverflow.com/comment/42114579
comment on: http://stackoverflow.com/a/26756720
has text: It works as well with lengthMenu: [[6, 10, 15], [6, 10, 15]] as I want 6 as first length to fit into my dashboard... the issue is why it does not work together with "order": 2, "desc" ?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26680845
has body: I am trying to follow this example to show progress bar without using ajax to download file. I use knockout,html and webapi. I am having below code which calls href on click event of button this.getMeData= function () { uRlPath("/api/GetSomeData?id=" + 12) + "&name=" + getName.toString() + "&downloadtoken=" + new Date().getTime()); $('#myLink').click(); location.href = $('#myLink').attr('href'); }; This is my html Download Data Open I now want to call some function on click event of my href This is my webapi method which returns me cookie and binary file public HttpResponseMessage GetSomeData(int id, string name, string downloadtoken) { var returnData= new HttpResponseMessage(HttpStatusCode.OK); returnData.Content = new ByteArrayContent(mybyteArray); var cookie = new CookieHeaderValue("downloadtoken", downloadtoken); returnData.Headers.AddCookies(new CookieHeaderValue[] { cookie }); returnData.Content.Headers.ContentDisposition = new System.Net.Http.Headers.ContentDispositionHeaderValue("attachment"); returnData.Content.Headers.ContentType = new MediaTypeHeaderValue("application/pdf"); returnData.Content.Headers.ContentDisposition.FileName = "myfile.pdf"; return returnData; } To be very precise i want to have same behaviour as provided in example. In example they use form to submit but i dont have any form as i just use html,knockout. I have included all libraries mentioned in example. Do let me know if you need more inputs.
answer count: 2
downvote count: 0
tagged with: asp.net-web-api
score: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26705300
favorite count: 0
has answer: http://stackoverflow.com/a/26713394
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26705300
type: AnsweredQuestion
has title: download file without using ajax
upvote count: 1
accepted answer: http://stackoverflow.com/a/26713394
tagged with: knockout.js
type: Question
tagged with: javascript

http://stackoverflow.com/a/26823559
score: -2
answers question: http://stackoverflow.com/q/26823502
upvote count: 0
downvote count: 2
type: Answer
has body: Well your question is poorly worded. Second if something is being concatenated, than that must mean it's a string (so that answers your question). You need to convert to integer and clean up your code. To debug your code use console.log, open element inspector and go to 'console'.

http://stackoverflow.com/a/26721724
downvote count: 0
answers question: http://stackoverflow.com/q/26721561
has comment: http://stackoverflow.com/comment/42033293
upvote count: 2
has comment: http://stackoverflow.com/comment/42033240
type: AcceptedAnswer
has body: You could trap the hashchange event and scroll the window down by the height of the fixed element. window.addEventListener('hashchange', function() { window.scrollBy(0, -40); }); Instead of 40, you could use document.querySelector('.topbar').getClientBoundingRect().height
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/26721561

http://stackoverflow.com/q/26754129
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
tagged with: ajax
type: Question
accepted answer: http://stackoverflow.com/a/26754232
has title: jQuery ajax referer url
possible better answer: http://stackoverflow.com/a/26754297
score: 0
has answer: http://stackoverflow.com/a/26754297
tagged with: php
linked to: http://stackoverflow.com/q/1031162
has answer: http://stackoverflow.com/a/26754232
answer count: 2
has body: How can I get the url of the referer in an ajax request? A file named main.php has jQuery that sends an ajax call to a file named request.php. Is it possible to somehow figure out the referer when I'm on request.php? To be precise, I want to print the string "main.php" (dynamically) while running request.php.

http://stackoverflow.com/a/26719426
has body: This has to do with JavaScript syntax. If you write: console.log(foo); You will get: Uncaught ReferenceError: foo is not defined If instead you write: console.log('foo'); It will print foo. It's important to realize that razor runs on the server so what your browser sees (and feeds into JavaScript) is: edit and not edit
answers question: http://stackoverflow.com/q/26719360
accepted answer of: http://stackoverflow.com/q/26719360
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/42049318

http://stackoverflow.com/q/26800262
favorite count: 0
has body: I'm trying to add line color condition by axis value attr("stroke","red") if date > 'Jan 2008' I have tried to modify var line with this code below, but it didn't work. Any recommendation would be appreciated. &gt; var line = d3.svg.line() &gt; .x(function(d) { return x(d.date); }) &gt; .y(function(d) { return y(d.price); }) &gt; .attr( "stroke", function(d) { if (d.date &gt; 'Jan 2008' { return "red"}; }) from d3 code below or fullcode and dataset from this link : http://bl.ocks.org/mbostock/1157787 &lt;!DOCTYPE html&gt; &lt;meta charset="utf-8"&gt; &lt;style&gt; body { font: 10px sans-serif; margin: 0; } .line { fill: none; stroke: #666; stroke-width: 1.5px; } .area { fill: #e7e7e7; } &lt;/style&gt; &lt;body&gt; &lt;script src="http://d3js.org/d3.v3.min.js"&gt;&lt;/script&gt; &lt;script&gt; var margin = {top: 8, right: 10, bottom: 2, left: 10}, width = 960 - margin.left - margin.right, height = 69 - margin.top - margin.bottom; var parseDate = d3.time.format("%b %Y").parse; var x = d3.time.scale() .range([0, width]); var y = d3.scale.linear() .range([height, 0]); var area = d3.svg.area() .x(function(d) { return x(d.date); }) .y0(height) .y1(function(d) { return y(d.price); }); var line = d3.svg.line() .x(function(d) { return x(d.date); }) .y(function(d) { return y(d.price); }); d3.csv("stocks.csv", type, function(error, data) { // Nest data by symbol. var symbols = d3.nest() .key(function(d) { return d.symbol; }) .entries(data); // Compute the maximum price per symbol, needed for the y-domain. symbols.forEach(function(s) { s.maxPrice = d3.max(s.values, function(d) { return d.price; }); }); // Compute the minimum and maximum date across symbols. // We assume values are sorted by date. x.domain([ d3.min(symbols, function(s) { return s.values[0].date; }), d3.max(symbols, function(s) { return s.values[s.values.length - 1].date; }) ]); // Add an SVG element for each symbol, with the desired dimensions and margin. var svg = d3.select("body").selectAll("svg") .data(symbol…
has title: How to modify color stroke in multiple charts with d3js nest() data
answer count: 0
downvote count: 0
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42180728
has comment: http://stackoverflow.com/comment/42180944
has comment: http://stackoverflow.com/comment/42174462
score: 1
has comment: http://stackoverflow.com/comment/44381704
type: Question
upvote count: 1
tagged with: javascript

http://stackoverflow.com/q/26830771
tagged with: android
tagged with: velocity.js
has answer: http://stackoverflow.com/a/26845259
upvote count: 3
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/66734564
score: 3
has body: I'm trying to do that kind of loop animation with velocity.js: translate object on X axis from 0 to 473, then from 0 to 473 and so on. I've succeeded to do that like this (code below) but on Android Chrome and iOS Chrome browsers the loop starts over with some delay (lag). Can someone help? function start() { $(".el").velocity( { translateX: [ -473, 0 ] }, { duration: 8000, delay: 0, easing: "linear", complete: reset }); } function reset() { $(".el").css("transform", "translate(0px, 0px)"); start(); } start();
answer count: 2
downvote count: 0
tagged with: ios
has title: Loop animation with velocity.js
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/26805169
type: Answer
has comment: http://stackoverflow.com/comment/42231246
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42228479
answers question: http://stackoverflow.com/q/26805109
upvote count: 1
has body: You can use .call( this, args... ) to pass this: onMouseOver.call( this ); Doing it this way allows you to transfer the scope without having to pass it as an argument. If you want to pass any extra parameters to onMouseOver, they just follow this, one-by-one. Another related function is .apply( this, argsArray ) where instead of passing the parameters one-by-one, you can just pass an array containing the parameters.

http://stackoverflow.com/a/26816572
has comment: http://stackoverflow.com/comment/42211472
answers question: http://stackoverflow.com/q/26816345
has comment: http://stackoverflow.com/comment/42204004
upvote count: 1
downvote count: 1
score: 0
has comment: http://stackoverflow.com/comment/42205461
has body: Nope. They are different. Here, you assume p2 will only start after p1 is done. And p3 only after p2 is done. p1.then(function () { p2.then(function () { p3.then(f); }); }); So basically, you introduced sequence and dependency. Do 1, then 2, then 3. This is ideal if p3 depends on the result of p2 and p2 depends on the result of p1. However, this introduces a lot of complexity and dependency to your code, so you better use it carefully. Or even avoid it as much as you can. The following, however, doesn't require sequence: Q.all([p1, p2, p3]).then(f) f depends on all 3 being finished (p1, p2 and p3), but there's no cross-dependency between the three. p2 might finish first, then p1, or p3 (they are async afterall). No order is required. The only requirement is that all three are finished in whichever order for f to get triggered. In general, this is much better when possible. p2 and p3 don't have to wait until p1 is done to start making requests or processing anything. Hope I answered your question :)
type: Answer

http://stackoverflow.com/q/26786323
has answer: http://stackoverflow.com/a/26788758
has title: Mobile navigation menu from apple website
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: How to build the animations from the new apple website for mobile devices. To describe the effect, basically the user can tap onto the left upper corner menu, then the two parallel lines will transform into an "x", which shows the previously hidden nav that can be swiped right to reveal more content. http://www.apple.com/de/ - viewed on my chrome device tools. $('.header-top input').on('click', function () { if ($(this).val() == '=') { $(this).val('x'); $('.header-bot').hide(); } else { $(this).val('='); $('.header-bot').show(); } }) body { margin:auto; background: #f2f2f2; } .header { position:relative; background-color: #fff; font-size:2em; height: 50px; } .header-top { height: 50px; } .header-top input { float:left; font-size:inherit; padding:0; border-style:none; background-color:transparent; height: 50px; outline: none; margin-left: 15px; cursor: pointer; } .header-bot { position:absolute; white-space:nowrap; width:100%; overflow:auto; height: 50px; background-color: #fff; border-top: 1px solid #f2f2f2; } .header-bot li { margin-left:1em; float: left; text-decoration:none; color: #999; list-style: none; cursor: pointer; font-family: sans-serif; font-size: 14px; line-height: 50px; } .header-bot li:hover { color: #000; } google yahoo msn codingforums jsfiddle google yahoo msn codingforums jsfiddle google yahoo msn codingforums jsfiddle
tagged with: css
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26747921
score: 1
accepted answer of: http://stackoverflow.com/q/26747762
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26747762
upvote count: 1
has comment: http://stackoverflow.com/comment/42504024
type: Answer
has body: This answer may be what you are looking for https://stackoverflow.com/a/10341608/1146562 Create a server-side script (PHP, Rails, ASP.net, etc) to generate your search results. The script can fetch data from wherever you like, for example a database or a hardcoded list. Your script must accept a GET parameter named q which will contain the term to search for. E.g. http://www.example.com/myscript?q=query Link to plugin and documentation http://loopj.com/jquery-tokeninput/ *****************UPDATE******************** here is another answer that might point you in the right direction https://stackoverflow.com/a/17810896/1146562 $("ul").keydown(function (e) { var searchbox = $(this); switch (e.which) { case 40: $('li:not(:last-child).selected').removeClass('selected').next().addClass('selected'); break; case 38: $('li:not(:first-child).selected').removeClass('selected').prev().addClass('selected'); break; } }); Hope that helps!
downvote count: 0

http://stackoverflow.com/a/26739232
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/26727379
answers question: http://stackoverflow.com/q/26727379
type: AcceptedAnswer
downvote count: 0
has body: Your spotlight target has been translated, but the spotlight does not follow. Spotlight.target is a property of the light, but it is not part of the scene graph in three.js r.69. So, unfortunately, target.matrix and target.matrixWorld are not being updated. The work-around is to add spotlight.target to the scene. Another workaround is to set an object that is already in your scene as the target: spotLight.target = myObject; three.js r.69
upvote count: 2

http://stackoverflow.com/a/26707283
has comment: http://stackoverflow.com/comment/42007178
has comment: http://stackoverflow.com/comment/42007441
downvote count: 1
score: -1
has comment: http://stackoverflow.com/comment/42072713
has comment: http://stackoverflow.com/comment/42007248
type: Answer
answers question: http://stackoverflow.com/q/26707136
upvote count: 0
has body: Did you resort to setInterval/setTimeout only because you can't make a working recursive function? If that's the case, how about this recursive function below without using setInterval/setTimeout: function rec10(x) { if (x &lt;= 10) { if (x &lt;= 0) x = 1; //append? $('#text').val(x); rec10(x + 1); } } rec10(1); But the problem with the code above is it will happen so fast you won't notice the printing of numbers 1 up to 9. If you want to see the those numbers then I suggest you just append the value to your placeholder $('#text'). But if you really wanna see the numbers being printed and then being replaced by the next number, then you can refer to the answers posted by other users which uses setInterval/setTimeout.

http://stackoverflow.com/a/26827842
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26827822
downvote count: 0
type: Answer
has body: I do not have an in-depth understanding of the issue, but I am guessing it has to do with mapping of logical pixels to physical pixels. I'd like to share my findings/solution, in case anyone else stumbles across a related issue. I am using proportion to deduct the innerHeight at a specific viewport width. To build the proportion, I am using an arbitrary third viewport that is greater than the other two. The innerHeight of the viewport in the proportion is derived through trial. When viewport width is 1280 (320 * 4), then innerHeight is 2114. 1280; 2114 320; x = Math.round(528.5) = 529 1280; 2114 640; x = 1057 This allows us to get the innerHeight of the fullscreen page for an arbitrary viewport width.

http://stackoverflow.com/comment/42139559
has text: You mention IE10 and IE11 but no other browsers. Are you saying IE10 is the only one with the problem, or...?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26781007

http://stackoverflow.com/a/30745274
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26790299
downvote count: 0
score: 1
has body: Most likely you're trying to JSON.parse a server provided error message or other non-JSON response, and this is probably HTML, given the first character it choked on. I'd open the console, get the page to produce the error, find the request in the Network tab of the dev tools, and check the response tab of the upload request(s) to see what is actually being returned. Hopefully seeing the response will lead you to the solution (like fixing an error message) or a more specific question that can be asked.

http://stackoverflow.com/q/26712821
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26713175
has title: Bootstrap 3.2 Dropdown Menu Toggle not working on iPhone
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/42041894
has body: I have the below menu which I use Bootstrap 3.2. The menu + toggle button works great on any browsers on Android but iOS. I can click on the button then the menu will show up & hide right away after showing. I used a lot of work-around & fix, disable touchstart in bootstrap.js or changing z-index of navbar. . . but it won't help me anyway with this problem. The menu seems to show up after click the toggle button but I can't see anything. I have to touch the toggle button again as closing the menu & touch again to open the menu again. You guy can have a check if you have iPhone at www.vietwash.vn Thank you for your concern about my problem. Toggle navigation <jdoc:include type="modules" name="top-logo" style="xhtml" /> <a href="<?php JUri::base();?>">Trang chủ Giới thiệu <a href="<?php echo JUri::base() . "index.php?option=com_content&view=article&id=1"?>">Về chúng tôi <a href="<?php echo JUri::base() . "index.php?option=com_content&view=article&id=2"?>">Công nghệ Vietwash <a href="<?php echo JUri::base() . "index.php?option=com_content&view=article&id=6"?>">Trải nghiệm phòng chờ <a href="<?php echo JUri::base() . "index.php?option=com_content&view=featured&Itemid=106"?>">Dịch vụ <a href="<?php echo JUri::base() . "index.php?option=com_content&view=category&layout=blog&id=9&Itemid=105"?>">Tin tức <a href="<?php echo JUri::base() . "index.php?option=com_content&view=featured&Itemid=107"?>">Liên hệ
has comment: http://stackoverflow.com/comment/42037243
accepted answer: http://stackoverflow.com/a/26713175
tagged with: css

http://stackoverflow.com/q/26763507
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42108350
has answer: http://stackoverflow.com/a/26770338
tagged with: datatables
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
type: Question
has title: Sorting table by every other row Datatables
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to sort my data with an extra row added for description type data that does NOT need to be sorted. I cannot hide/show this row since it's vital to the rest of the data making any sense. Is there a way to do this with datatables? Rank Col Power Col Money Col Image - Name goes here Rank Power Level Money Image - Name goes here Rank Power Level Money Image - Name goes here Rank Power Level Money Image - Name goes here Rank Power Level Money
upvote count: 1
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/26719148
upvote count: 1
answers question: http://stackoverflow.com/q/26718315
has body: You want to be careful that all these values always exist or at least wrap each push in a try/catch. But the direct problem with your code is that there are no array comprehensions in JS, so your code should be: //&lt;![CDATA[ var transactionProducts = []; for(X=0;X&lt;OrderDetails.length;X++) { transactionProducts.push({ 'sku': OrderDetails[X][2], 'name': OrderDetails[X][3], 'category': 'none', 'price': OrderDetails[X][5], 'quantity': OrderDetails[X][6] }); } dataLayer.push({'transactionProducts': transactionProducts}); //]]&gt;
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42033601
has comment: http://stackoverflow.com/comment/42030014
type: Answer
has comment: http://stackoverflow.com/comment/42033822
accepted answer of: http://stackoverflow.com/q/26718315
score: 1
has comment: http://stackoverflow.com/comment/42029364

http://stackoverflow.com/a/26691885
answers question: http://stackoverflow.com/q/26691776
downvote count: 0
type: Answer
score: 2
has body: This can be best achieved by using ngRepeat from AngularJS: https://docs.angularjs.org/api/ng/directive/ngRepeat If you include it in your project, I hope it will lower 20-30% of the code logic that you you are searching for or having issues like this. For further details here is the link: https://angularjs.org/ At last you have other choices too, but I just wanted to share the smartest framework in JS with you. Happy coding! :)
upvote count: 2

http://stackoverflow.com/q/26686612
answer count: 2
has answer: http://stackoverflow.com/a/26686797
has comment: http://stackoverflow.com/comment/41971113
type: UnansweredQuestion
tagged with: php
has title: Time Validation Range form MySQL
tagged with: mysql
has answer: http://stackoverflow.com/a/26686708
type: Question
has body: This is my JavaScript: &lt;SCRIPT TYPE="text/JavaScript"&gt; function validateHhMm(inputField) { var time= $("#time").val(); var isValid = /^(time)?$/.test(inputField.value); if (isValid) { inputField.style.backgroundColor = '#bfa'; } else { inputField.style.backgroundColor = '#fba'; } return isValid; } &lt;/SCRIPT&gt; PHP Script: &lt;?php include 'connect.php'; $time = " SELECT * from schedule where id_ship=24"; $show_time = mysql_query($time); $row = mysql_fetch_array($show_time); ?&gt; &lt;input type="text" onchange="validateHhMm(this);" name="time" id="time" value=" &lt;?php echo $row['time_coming']; ?&gt;"&gt; this schedule table id_ship | time_coming | ---------------------------- 24 | 11:10:02 | I want to input form time again. And valid value must same or above 11:10:02. Invalid value under 11:10:02. So, what should I do in my JavaScript?
tagged with: javascript
score: 0

http://stackoverflow.com/a/65287777
answers question: http://stackoverflow.com/q/26732123
upvote count: 8
downvote count: 1
score: 7
has comment: http://stackoverflow.com/comment/117500358
has comment: http://stackoverflow.com/comment/117822942
type: Answer
has body: var arr = [ { key_1: "A", key_2: "1" }, { key_1: "B", key_2: "2" }, { key_1: "C", key_2: "3" } ]; var CSVOf_arr = arr.map((item) => { return item.key_1 }).join(',') console.log('Comma seprated values of arr', CSVOf_arr) OUTPUT: A,B,C

http://stackoverflow.com/q/26744322
tagged with: animation
has comment: http://stackoverflow.com/comment/42074193
accepted answer: http://stackoverflow.com/a/26744927
type: AnsweredQuestion
score: 0
has title: jQuery animation content slider loop
type: Question
has answer: http://stackoverflow.com/a/26744702
tagged with: javascript
tagged with: jquery
answer count: 3
has body: I am having some trouble with a content slider I am building. There are 4 boxes of content placed inside of tags positioned absolutely inside of a relatively positioned wrapper. From left to right the boxes have an ID #module1, #module2, #module3, and #module4 respectively. When I click a button I want the content to scroll right. #module4 should animate off the right side of the page, hide, then animate back into view on the left side of the page. #module3 should go into place where #module4 was and have opacity set to 50% same as #module4. #module2 should move into the place where #module3 was. #module1 should have opacity set to 100% and move to where #module2 was. The issue I am having is when #module4 scrolls to the right off of the page, it then is visible when it moves over to the left side of the page. I cannot seem to figure out how to properly hide this from view until it scrolls into view on the left side. Here is my animation code: #module1,#module2,#module3,#module4{position:absolute;top:0;width:31.9444%;height:200px;background:#999;} .wrapper{width:100%;height:220px;position:relative;} button{position:relative;z-index:1000;} Module1 Module2 Module3 Module4 Set Left Move Right
has answer: http://stackoverflow.com/a/26748854
has answer: http://stackoverflow.com/a/26744927
possible better answer: http://stackoverflow.com/a/26748854

http://stackoverflow.com/q/26684873
type: Question
tagged with: mean-stack
tagged with: javascript
has title: MEAN stack: angular is not defined
accepted answer: http://stackoverflow.com/a/26684947
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
tagged with: node.js
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26684947
upvote count: 1
has body: I have been searching for answer to my problem for two full days now without results. I know there are a lot of threads about "angular is not defined", but their answers have been of no avail. The starting point is that I have deployed MEAN stack for a SPA on DigitalOcean. There is also grunt in use. The app has been running successfully right until grunt tries to run the server.js file which has angular.module(... call. The folder structure is following: node_modules bunch of modules like there should be public lib angular, angular-resource, jquery etc folders routes index.js src views index.html, index.jade, layout.jade bower.json gruntfile.js karma.conf.js package.json server.js bower.json { "name": "meanjs", "version": "0.3.2", "description": "Fullstack JavaScript with MongoDB, Express, AngularJS, and Node.js.", "dependencies": { "bootstrap": "~3", "angular": "~1.3.0", "angular-resource": "1.3.0", "angular-animate": "~1.3.0", "angular-mocks": "~1.3.0", "angular-bootstrap": "~0.11.0", "angular-ui-utils": "~0.1.1", "angular-ui-router": "~0.2.10" } } server.js 'use strict'; var cheerio = require('cheerio'), http = require('http'), iconv = require('iconv-lite'), request = require('request'), mongoose = require('mongoose'), iconv = require('iconv-lite'); angular.module('myapp', []); var express = require('express'); var app = express(); app.use(express.static(__dirname + '/public')); app.set('view engine', 'jade'); app.get('/', function (req, res) { res.sendfile('./views/index.html'); }); app.listen(80); index.html Myapptitle Hallelujah, server is running! I have been moving all parts related to the .js files around the index.html file and so on. The main point of the app is just to have the server.js running and having several different .js file based angular modules that handle JSON files for server.js. I just don't have any clues left what to try, please give me some advice. I will gladly supply you with more code files if necessary.

http://stackoverflow.com/q/26804672
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/26804727
answer count: 2
has title: Updating $scope vars in function
upvote count: 0
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26804727
type: AnsweredQuestion
has body: $scope.myVar = cheese; function please(){ $scope.myVar = "New Value"; } google.maps.event.addListener(marker, 'click', please); I am confused by this, I have var "cheese" which is in the html, I expect that when I clicked a google marker this would change the html to "New Value" as ng-click does. What happens is if I put an alert in the function it will alert "New Value" but this doesnt change the var outside of the function. Tried different ways myVar = "New Value" var myVar = "New Value" I suspect it has something to do with global and local variables but just learning angular so I have been confused a bit. Thanks
downvote count: 1
possible better answer: http://stackoverflow.com/a/26804774
type: Question
has answer: http://stackoverflow.com/a/26804774

http://stackoverflow.com/a/26701792
accepted answer of: http://stackoverflow.com/q/26683826
answers question: http://stackoverflow.com/q/26683826
type: Answer
score: 1
upvote count: 1
has body: I was able to replicate the issue in 4.1 in the fiddle. A work around I was able to come up with is to refresh the timepicker after resetting. myTimeField.getPicker().refresh() And here is a working fiddle with the fix
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42074622
type: QuestionComment
comment on: http://stackoverflow.com/q/26744521
has text: @j08691 Thank you, where do I apply this?
score: 0
type: Comment

http://stackoverflow.com/comment/42074325
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26742905
has text: Yes it is, i haven't asked it to be called anywhere though ... I'll have a look around, cheers so far

http://stackoverflow.com/a/26740920
has comment: http://stackoverflow.com/comment/42107237
upvote count: 1
has body: I am not entirely sure why you rule out using a pre-defined Polymer element with (admittedly, complicated) &lt;template&gt; logic in it, but if you're sure that you need things to be dynamic and generate the element's content on the fly while still making use of Polymer's data binding, then injectBoundHTML() might be what you're looking for. It's unfortunately not documented at the moment, but there are examples of how to use it in the open issue tracking the documentation. You can fetch the "bound" HTML from any source, and while I'm not an expert on CSP, I don't believe that it will trigger any additional CSP consideration.
has comment: http://stackoverflow.com/comment/42106535
has comment: http://stackoverflow.com/comment/42091141
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42154165
accepted answer of: http://stackoverflow.com/q/26715055
has comment: http://stackoverflow.com/comment/42091181
answers question: http://stackoverflow.com/q/26715055
type: Answer

http://stackoverflow.com/a/46075794
has body: If you use lodash fp, don't forget the last argument accumulator.
answers question: http://stackoverflow.com/q/26749704
score: 0
type: Answer

http://stackoverflow.com/q/26807289
has body: I have a unique situation and I can't find any help on it. I have a RadGrid that uses a User Web Control(.ascx) to insert and edit the grid items. I need to used javascript to get the value of two RadTextBox on the User Web Control and sum them together and then update a third RadTextBox with the result value. Here is my problem: 1) I have to create the javascript on the parent aspx page in order for the User Web Control to see it. If I create it on the .ascx page, it doesn't see it. 2) Since I have to create it on the parent aspx page where the grid reside, I can't figure a way to access the RadTextBox value on the User Web Control. Any help would be greatly appreciated. Is there a way to run the javascript within the User Web Control? Anthony
has title: JavaScript on RadGrid User Web Control
answer count: 1
tagged with: asp.net-webcontrol
tagged with: radgrid
tagged with: web-controls
has answer: http://stackoverflow.com/a/27027329
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27027329
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/comment/42071710
type: QuestionComment
comment on: http://stackoverflow.com/q/26742914
score: 0
has text: I ran that .php. then i tried to run another php from the same server. it didnt open for a very long time
type: Comment

http://stackoverflow.com/comment/42315886
has text: Error in console is::ReferenceError: $ is not defined addCon.js:4 ReferenceError: jQuery is not defined jquery.blockUI.js:616
comment on: http://stackoverflow.com/q/26759527
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42016235
type: QuestionComment
comment on: http://stackoverflow.com/q/26712431
score: 0
has text: then there is no `border-radius` style. it should be `border-top-left-radius` in the question.
type: Comment

http://stackoverflow.com/comment/65307081
has text: essential part should be here
comment on: http://stackoverflow.com/a/38976722
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26784438
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: html5-history
upvote count: 1
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has title: History HTML5 and page source
has comment: http://stackoverflow.com/comment/42145888
has answer: http://stackoverflow.com/a/26790091
score: 1
has body: I'm using html5 history API and I have the following problem: Go to my app: app.mysite.io Browsing using history API (app.mysite.io/hello etc..). I don't charge all HTML page but only the partial content I need. Close the page (CTRL + W in Chrome) and reopen (CTRL + SHIFT + T in Chrome) At this moment, I see only the last AjaxCall and its response (the partial content because I think that it looks like an ajax request). I created a Router that listen when the url change but I can't detect when a page is closed and then re-open. edit: I'm using Symfony2 and I load two different template, ajax-layout.html.twig or full-layout.html.twig edit2 That's my code: var Devmanager = { environment: 'prod', prefix: '', name: '', routes: [ "dashboard/", "project/add/", "project/view\/(.*)\/", "project/", "team/add/", "team/view\/(.*)\/", "settings/upgrade/", "settings/", "help/support/", "help/video/", "help/suggest/" ], config: function(options){ this.environment = options &amp;&amp; options.environment; this.name = options &amp;&amp; options.name; this.prefix = (this.environment === 'prod') ? '/' : '/app_dev.php/'; Router.config({ mode: 'history', root: this.prefix}); }, register: function(){ var that = this; for(var i=0; i &lt; that.routes.length; i++){ (function(){ const _route = that.routes[i]; Router.add(_route, function() { arg0 = (arguments[0]) ? arguments[0] : ''; Devmanager.call({ path: Router.root + _route.replace('(.*)', arg0), method: "GET", data: {}, success: function(response, status, request){ $("section#content").html(response); } }); }); })(); } Router.listen(); }, run: function(){ this.register(); this.bind(); }, bind: function(){ $(document).on('click', '.nav-primary a, .navbar-nav a.upgrade, .main-menu a:not(.external), .nav-project a', function (e) { Devmanager.goto(e) }); }, call: function(options){ NProgress.start(); $.ajax({ url: options.path, data: options.data, method: options.method, success: options.success, error: options.error &amp;&amp; function(){ …

dom-events
tags question: http://stackoverflow.com/q/26818038
tags question: http://stackoverflow.com/q/26678603
tags question: http://stackoverflow.com/q/26758882
tags question: http://stackoverflow.com/q/26795498
tags question: http://stackoverflow.com/q/26717875
tags question: http://stackoverflow.com/q/26770320
tags question: http://stackoverflow.com/q/26810437
tags question: http://stackoverflow.com/q/26737199
tags question: http://stackoverflow.com/q/26743857
tags question: http://stackoverflow.com/q/26810440
tags question: http://stackoverflow.com/q/26777202
tags question: http://stackoverflow.com/q/26685817
type: Tag
tags question: http://stackoverflow.com/q/26684334
tags question: http://stackoverflow.com/q/26683274
tags question: http://stackoverflow.com/q/26735569
tags question: http://stackoverflow.com/q/26683108
tags question: http://stackoverflow.com/q/26719340
tag name: dom-events
tags question: http://stackoverflow.com/q/26719527
tags question: http://stackoverflow.com/q/26791354

http://stackoverflow.com/comment/42226775
type: QuestionComment
has text: It is, because the error was on this line `var dialogContent = this.dialog.html();`
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26829686

http://stackoverflow.com/comment/42082919
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26748895
has text: can you help with this? The actual map location lat and long is 44.89630 (lat) and -91.92925 (long)

http://stackoverflow.com/comment/42113528
comment on: http://stackoverflow.com/a/26762173
type: Comment
has text: If you are using c# params use route values (like you initially did) to create links.
type: AnswerComment
score: 0

http://stackoverflow.com/q/26796184
tagged with: css
has title: Apply Scrolling effect using CSS and jquery
tagged with: scroll
type: Question
has body: I'm looking for a special scrolling effect used for example on this page: http://www.lemonde.fr/ameriques/visuel/2014/10/10/voix-d-outretombe-les-derniers-mots-de-condamnes-a-mort-executes-au-texas_4501418_3222.html When you scroll, the page doesn't follow your scroll, but follow an animation. I don't know how to do it. I tried to use jquery and the scroll event, it's working on chrome but not on safari, and is definitely less smooth than on the example. I guess i have to take into account the scroll "speed" but don't know how to do something that smooth. Any idea how to do it ? (i'd rather have an explanation than a plugin, but every answer is most welcome). Thanks
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26798682
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41987858
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26696581
has text: This is a Node.js solution from Nodeschool.

http://stackoverflow.com/a/26981308
has body: Instead of attaching a click event handler to the submit button, try attaching a submit event handler to the form itself. This will allow you to handle the submit event and stop the form from submitting any unvalidated data via stopPropagation() and preventDefault() $('#form').on('submit', function(ev) { // prevent from auto-submitting ev.preventDefault(); ev.stopPropagation(); // validate; if something is wrong handle it; if ($('#name').val() === "") { alert("You don't have a name? :("); return; } // if all is good, then submit. $.ajax({ type: "post", url: "php/mail.php", data: dataString, success: function() { $('.form').hide() $('#changingText').text("Thank you. We will be in touch with you shortly " + name) } }); }); return false; is supposed to do exactly what ev.preventDefault(); and ev.stopPropagation(); do, but it doesn't hurt to be explicit. :)
score: 0
accepted answer of: http://stackoverflow.com/q/26755266
type: Answer
answers question: http://stackoverflow.com/q/26755266
type: AcceptedAnswer

http://stackoverflow.com/q/26796878
has body: I'm using bootstrap on WordPress using the _ib theme, and I would like to add in my own responsive menu for when window is less than 768px. By default bootstrap will convert the menu to a dropdown-toggle, which when clicked shows your original menu. What I would like to do is implement my own menu when it is used on a small device or at a low resolution. How would I remove this dropdown-toggle? I have looked around the bootstrap JS files, but I'm no JS whizz, so I can't quite figure out how to simply scrap the dropdown-toggle. Any help appreciated! EDIT: Go to... <?php wp_nav_menu( array( 'theme_location' => 'primary', 'container_class' => 'collapse navbar-collapse navbar-responsive-collapse', 'menu_class' => 'nav navbar-nav', 'fallback_cb' => '', 'menu_id' => 'main-menu', 'walker' => new wp_bootstrap_navwalker() ) ); ?> I tried the simple method of just removing this .navbar-toggle as I don't need it, but that actually removes the entire menu even on a full page window...
type: UnansweredQuestion
tagged with: wordpress
has answer: http://stackoverflow.com/a/26797309
type: Question
has title: Disable bootstrap's dropdown-toggle
tagged with: responsive-design
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42168137
tagged with: javascript
has comment: http://stackoverflow.com/comment/42167817
tagged with: css
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/42262724
type: Comment
comment on: http://stackoverflow.com/a/26847274
has text: Tried same as yours it didn't work for mine. let be debug a bit if not i will paste a fiddle
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41953735
comment on: http://stackoverflow.com/q/26677345
score: 0
type: Comment
type: QuestionComment
has text: I would like to have in categoArray : Car", "Fast", "Car"

http://stackoverflow.com/a/26687685
has body: $('[id^="button_add_to_cart_"]').click(function(){ process_add_to_chart(this); }); function process_add_to_chart(obj){ if(obj != null){ var id = $(obj).attr('id'); } } Pass clicked element object reference to your function. Demo: http://jsfiddle.net/9y8bLg22/
type: AcceptedAnswer
upvote count: 2
type: Answer
downvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26687645
accepted answer of: http://stackoverflow.com/q/26687645

http://stackoverflow.com/q/26806971
has body: Having trouble getting the modified rotational angle of fabic.js object retaliative to is original angle/position. I'm using .getAngle(), If the object is rotated more than 360 degrees or rotated back and forth I'm having trouble converting this back to an angle in degrees relative to it original position/rotation. var canvas = new fabric.Canvas('canvas'); //global canvas setting canvas.selection = false; canvas.setDimensions({ width: 500, height: 310 }); //Canvas Objets // create a rectangle with angle=45 var rect = new fabric.Rect({ left: 100, top: 100, fill: 'red', width: 40, height: 40, lockUniScaling: true, centeredRotation: true }); canvas.add(rect); //Object modification event canvas.on('object:modified', function(e) { var activeObject = e.target; document.getElementById('result').value = activeObject.getAngle(); }); I've setup a fiddle showing the default output http://jsfiddle.net/1db5g7us/ I'm assuming in need to do some calculation on the result, but can't figure out what.
has title: Having trouble getting the modified rotational angle of fabic.js object retaliative to is original angle
type: AnsweredQuestion
tagged with: math
accepted answer: http://stackoverflow.com/a/26885902
type: Question
tagged with: rotation
tagged with: javascript
tagged with: jquery
tagged with: fabricjs
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26885902

http://stackoverflow.com/q/26762693
type: UnansweredQuestion
tagged with: pseudo-class
tagged with: css
has body: I got some script that hides the mouse after few seconds of no movement and the desired result is that whenever the mouse is being hidden it should remove all of the hover state elements on the page. To do so, I've got two functions: var body = $('body'); function hideMouse() { body.addClass("hideMouse"); body.on('mousemove', function(){ if(window.hiding) return true; window.hiding = true; body.removeClass("hideMouse"); $('div.mouseHider').remove(); clearTimeout(window.hideMouse); window.hideMouse = setTimeout(function(){ body.addClass("hideMouse"); $('&lt;div class="mouseHider"&gt;&lt;/div&gt;').css({ position: 'fixed', top: 0, left: 0, height: '100%', width: '100%', zIndex: 99999 }).appendTo(body); redraw(document.body); setTimeout(function(){ window.hiding = false; }, 100); }, 4000); }); } function redraw(e) { e.style.display = 'none'; e.offsetHeight; e.style.display = 'block'; } I also have few css rules: body.hideMouse *, body.hideMouse{ cursor: none; } body.hideMouse *{ pointer-events: none; } As expected, it works just fine in Chrome, Firefox and Opera. However, in IE11, what happens is that the mouse is indeed becoming invisible as expected but hover elements still shown as hovered. A fiddle to demonstrate: http://jsfiddle.net/wjbkgsbg/ In IE11, the mouse is being hidden but the div's opacity remains 0.6 instead of falling back to 1. Any suggestions?
has comment: http://stackoverflow.com/comment/42107562
type: Question
tagged with: internet-explorer
linked to: http://stackoverflow.com/q/3680429
has comment: http://stackoverflow.com/comment/42107758
tagged with: javascript
has answer: http://stackoverflow.com/a/26763305
score: 0
linked to: http://stackoverflow.com/q/5855135
answer count: 1
tagged with: jquery
has title: remove hover state of element when mouse isn't displayed

http://stackoverflow.com/comment/41976483
has text: thx for your answer , but it's not just that an input , there are checkbox and two inputs and more ... in a parent div "#user-login-wrapper" , should i mention all of them in e.target or there is a better way ?
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26689830
score: 0

http://stackoverflow.com/comment/42198073
type: Comment
comment on: http://stackoverflow.com/a/26809328
score: 0
type: AnswerComment
has text: Fixed the mobile issue by switching the output field to a text value.

location
tags question: http://stackoverflow.com/q/26803110
tags question: http://stackoverflow.com/q/26685966
tag name: location
type: Tag

http://stackoverflow.com/q/26801721
accepted answer: http://stackoverflow.com/a/26802039
has body: I have the following JS object: { "gameName":"Shooter", "details":[ { "submitted":1415215991387, "author":"XYZ", "subPlayer":{ "members":{ "squad1":[ { "username":"John", "deaths":0 } ] }, "gameSlug":"0-shooter" } } ], "userId":"foL9NpoZFq9AYmXyj", "author":"Peter", "submitted":1415215991608, "lastModified":1415215991608, "participants":[ "CXRR4sGf5AdvSjdgc", "foL9NpoZFq9AYmXyj" ], "slug":"1-shooterConv", "_id":"p2QQ4TBwidjeZX6YS" } And I want to get the deaths for the correct user. My current code is something like this: $.map(this.details.subPlayer.members.squad1, function(obj) { if(obj.username == Meteor.user().username) { return obj.deaths; } }); However, the problem is that I don't know exactly the squad name (e.g. squad1). How can I get deaths for the corresponding username in any squad? Any help would be greatly appreciated.
has comment: http://stackoverflow.com/comment/42176968
type: AnsweredQuestion
tagged with: underscore.js
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has title: Get value of field in nested object with jQuery or Underscore.js
has answer: http://stackoverflow.com/a/26802039

http://stackoverflow.com/q/26734712
has answer: http://stackoverflow.com/a/26738875
has comment: http://stackoverflow.com/comment/42056081
has title: Replace a javascript function
type: UnansweredQuestion
has body: Which javascript, put after the following code, could prevent googletag.cmd.push function to work as intended? I tried to add at the bottom something like: googletag.cmd.push(function() {}); But nothing happens. Here is the code, I just want to break this up, inserting something after it.. &lt;script type='text/javascript'&gt; var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; (function() { var gads = document.createElement('script'); gads.async = true; gads.type = 'text/javascript'; var useSSL = 'https:' == document.location.protocol; gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js'; var node = document.getElementsByTagName('script')[0]; node.parentNode.insertBefore(gads, node); })(); googletag.cmd.push(function() { googletag.defineSlot('/1045124/_GL_BottomMiddle' , [728, 90], 'div-gpt-ad-1409922595811-0').addService(googletag.pubads()); googletag.defineSlot('/1045124/_GL_RightSkyscraper' , [[160, 600], [300, 600]], 'div-gpt-ad-1409922595811-1').addService(googletag.pubads()); googletag.defineSlot('/1045124/_GL_TopLeft' , [135, 90], 'div-gpt-ad-1409922595811-2').addService(googletag.pubads()); googletag.defineSlot('/1045124/_GL_TopMiddle' , [728, 90], 'div-gpt-ad-1409922595811-3').addService(googletag.pubads()); googletag.defineSlot('/1045124/_GL_TopRight' , [135, 90], 'div-gpt-ad-1409922595811-4').addService(googletag.pubads()); googletag.defineSlot('/1045124/_GL_Forum', [728, 90], 'div-gpt-ad-1412177584435-0').addService(googletag.pubads()); googletag.enableServices(); }); &lt;/script&gt; EDIT Ok I am trying to better explain the situation: I have the above code in a page. I do not want these javascript functions to perform their actual tasks, I want to redefine them, to make them unuseful. Of course I can't just edit that piece of code, otherwise I would not be asking here. How may I proceed? Example: After that code I insert some javascript that injects some other code on the top of that and disables or r…
upvote count: 0
type: Question
has answer: http://stackoverflow.com/a/26735301
score: -2
tagged with: javascript
downvote count: 2
answer count: 2
tagged with: function
favorite count: 0

http://stackoverflow.com/q/26737103
has comment: http://stackoverflow.com/comment/42060336
upvote count: 0
linked to: http://stackoverflow.com/q/4435605
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26739217
has comment: http://stackoverflow.com/comment/42064335
has answer: http://stackoverflow.com/a/26748024
linked to: http://stackoverflow.com/q/16465389
has comment: http://stackoverflow.com/comment/42329501
has comment: http://stackoverflow.com/comment/42062514
linked to: http://stackoverflow.com/q/822124
favorite count: 0
has comment: http://stackoverflow.com/comment/42060432
type: UnansweredQuestion
score: -3
has comment: http://stackoverflow.com/comment/42080637
has comment: http://stackoverflow.com/comment/42060294
has comment: http://stackoverflow.com/comment/42060714
downvote count: 3
tagged with: date
has body: I want to compare a date (like Tue, 04 Nov 2014 04:02:59 -0800) with the current date and display as below: a few seconds ago 10 minutes ago 2 days ago 1 month ago etc. What is the most efficient way to do this in JavaScript/jQuery?
has title: Converting a date into a description in JavaScript
has comment: http://stackoverflow.com/comment/42080645
type: Question
answer count: 2

http://stackoverflow.com/comment/42186129
type: Comment
has text: Check this out: http://stackoverflow.com/questions/11124322/get-date-time-for-a-specific-time-zone-using-javascript
comment on: http://stackoverflow.com/q/26806443
score: 1
type: QuestionComment

http://stackoverflow.com/comment/41992483
type: AnswerComment
type: Comment
has text: you are not logged in on facebook, hootsuite can´t just log you in. they surely store access tokens for api calls, and it may look like you are logged in, but you are surely not.
score: 0
comment on: http://stackoverflow.com/a/26699196

http://stackoverflow.com/comment/42078333
has text: I couldn't understand what you are trying to link to where?
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26746482

http://stackoverflow.com/comment/42073761
type: AnswerComment
comment on: http://stackoverflow.com/a/26744087
score: 0
type: Comment
has text: and the 2nd undefined issue?

http://stackoverflow.com/a/26768961
answers question: http://stackoverflow.com/q/26768935
downvote count: 0
score: 1
upvote count: 1
has body: PHP renders the HTML/CSS/JS source code which then gets sent to and executed on the client side. The echo line runs on the server. The output JavaScript code is run on the client.
type: Answer

http://stackoverflow.com/comment/43398063
type: Comment
has text: That doesn't achieve what I want.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27474250

http://stackoverflow.com/a/26822174
accepted answer of: http://stackoverflow.com/q/26822093
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/42214232
type: AcceptedAnswer
downvote count: 0
has body: Your code seems to be unnecessarily complicated. If I have understood the question correctly, you could use an object: var count = {}, clr; for (var i = 0; i &lt; colors.length; i++) { clr = colors[i].color; if ( count.hasOwnProperty(clr) ) count[clr] += 1; else count[clr] = 1; } Where colors is an array of objects.
answers question: http://stackoverflow.com/q/26822093
upvote count: 2

http://stackoverflow.com/q/26724839
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/42039145
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26725797
has body: I'm pulling data from a web-service that I don't control. The results include a backslash before apostrophe's in names (such as O'Donnell). According to JSLint.com the structure of the JSON is valid - except when the response includes the backslashed apostrophes. I have alerted the provider of the web service. While I am waiting for a response from ReallyBigCo, I wanted to learn more about what's possible on the request end. Is there a way to strip characters from a JSON object when making an $http.get() request? I've been searching for solutions to capture the response as a string in order to strip the characters. However, I'm getting an error as soon as the $http.get() function finishes. This AngularJS code works fine (when the JSON response is valid): var app = angular.module('app',[]); app.factory('appresults', function($http) { return { getAsync: function(callback) { var myURL = https://address-to-really-big-co-webservice.com; $http.get(myURL).success(callback); } }; }); app.controller('appcontroller', function($scope, appresults) { appresults.getAsync(function(results) { $scope.appdata = results.findUsers; }); }); I can display a list of emails in my page using this code when the JSON is valid: &lt;p ng-repeat="item in appdata"&gt;{{item.email}}&lt;/p&gt; Here is an example of working JSON results: {"findUsers":[ {"email":"aaa.somebody@domain.com"}, {"email":"bbb.somebody@domain.com"}, {"email":"ccc.somebody@domain.com"} ]} While these JSON results cause an error: {"findUsers":[ {"email":"aaa.somebody@domain.com"}, {"email":"bbb.somebody@domain.com"}, {"email":"ccc.somebody@domain.com"}, {"email":"ddd.o\'somebody@domain.com"} ]} The results with apostrophe creates the following error in the console in IE9: SyntaxError: Invalid characterundefined I've been searching for solutions to reformat the response, but any JSON results with an apostrophe immediately causes this error. So it doesn't seem possible to use a simple solution such as results.replace(/'/g,""); …
has comment: http://stackoverflow.com/comment/42039173
score: 0
answer count: 1
has title: How to strip invalid characters from a JSON $http.get() request?
tagged with: angularjs
has answer: http://stackoverflow.com/a/26725797

http://stackoverflow.com/comment/42079757
type: Comment
type: QuestionComment
has text: If you're using an iFrame, you don't need AJAX to start the request. Just set the src attribute of the iFrame.
comment on: http://stackoverflow.com/q/26747074
score: 1

http://stackoverflow.com/comment/42132688
type: Comment
type: QuestionComment
has text: @AknKplnoglu nope, because OL3 is totally different from OL2…
score: 0
comment on: http://stackoverflow.com/q/26730622

http://stackoverflow.com/q/26766181
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42113470
has comment: http://stackoverflow.com/comment/42113358
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42116436
has comment: http://stackoverflow.com/comment/42156275
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/42116404
has comment: http://stackoverflow.com/comment/43153372
has comment: http://stackoverflow.com/comment/42119535
has body: Can someone please explain why the following error occurs and what it means? Uncaught HierarchyRequestError: Failed to execute 'appendChild' on 'Node': Nodes of type 'HTML' may not be inserted inside nodes of type '#document'. I am not sure I am able to reproduce it but it occurs from time to time, usually when I import more than one custom element. It's extremely hard giving exact context since I am working on integrating polymer's paper/core elements for our in-house widgets. Broadly speaking what are the cases that I would see this error? Any kind of help is appreciated. Thank you. Regards, Raja
type: Question
tagged with: polymer
has title: HierarchyRequestError: Failed to execute 'appendChild' on 'Node'
has answer: http://stackoverflow.com/a/28203072
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42140925

http://stackoverflow.com/comment/42113449
score: 1
has text: Javascript != java...removed tag
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26766286

http://stackoverflow.com/comment/42199001
has text: Perfect, thanks for your help. I promise I'm not using those colors in my actual application!
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26800658

http://stackoverflow.com/comment/41966660
type: QuestionComment
has text: Oh, the question has changed. You can still extract the helper into a separate function though.
score: 0
comment on: http://stackoverflow.com/q/26684079
type: Comment

http://stackoverflow.com/comment/42097251
has text: chunk uploading can get you around server side upload limitations
type: QuestionComment
comment on: http://stackoverflow.com/q/26757031
score: 0
type: Comment

http://stackoverflow.com/a/26745422
has comment: http://stackoverflow.com/comment/42076480
has body: Try setting overflow to hidden when you're in fullWindowState; //toggle the fullscreen mode function fullscreen() { if (!fullWindowState) { fullWindowState = true; //canvas goes full Window canvas.width = window.innerWidth; canvas.height = window.innerHeight; canvas.className = "fullscreen" document.body.scrollTop = 0; // &lt;-- pull the page back up to the top document.body.style.overflow = 'hidden'; // &lt;-- relevant addition } else { fullWindowState = false; //canvas goes normal canvas.width = 820; canvas.height = 600; canvas.className = ""; document.body.style.overflow = 'visible'; // &lt;-- toggle back to normal mode } }
downvote count: 0
has comment: http://stackoverflow.com/comment/42076367
answers question: http://stackoverflow.com/q/26745292
score: 8
upvote count: 8
type: Answer

http://stackoverflow.com/q/26754510
upvote count: 1
type: Question
tagged with: nashorn
has title: Nashorn - debug javascript run in Nashorn
has body: I use eclipse luna as IDE. I'm working in web application. When I code in javascript, sometimes I forget to put semicolon, but everything still work fine if my javascript run in browser. But when I run my javascript in nashorn, it will throw an error because I didn't put semicolon the error say s nashorn Error: :1:68 Expected ; but found var ..... ... ... in at line number 1 at column number 68 The problem is, the console always shows me the error at line number 1, I think because nashorn reads my javascript file as single line, but truthfully my javascript file contains many lines. It is hard to find the error because the console always say the error is in line number 1. I know something is wrong with my code, but I don't know how to fix it. Nashorn.java public class Nashorn { public Nashorn() { } public static String readFileAsText(String theUrl){ String allLine = ""; try { URL url = new URL(theUrl); BufferedReader in = new BufferedReader(new InputStreamReader( url.openStream())); String inputLine = ""; while ((inputLine = in.readLine()) != null){ allLine += inputLine; //System.out.println("read : "+inputLine); } in.close(); } catch (MalformedURLException e) { System.out.println("url Error: "); } catch (IOException e) { System.out.println("I/O Error: "); } return allLine; } public static void main(String[] args) { ScriptEngineManager scriptEngineManager = new ScriptEngineManager(null); ScriptEngine scriptEngine = scriptEngineManager.getEngineByName("nashorn"); try { //readFileAsText String room = Nashorn.readFileAsText("http://localhost:8080/monsterpuzzle/data/Room.js"); scriptEngine.eval( room ); } catch (Exception e) { // TODO Auto-generated catch block System.out.println("nashorn Error: "+e.getMessage()); e.printStackTrace(); } } } Room.js var Room = function(){ this.test = function(){ print("lalala"); }; } var room = new Room(); room.test(); my problem : Nashorn always shows me the error at line number 1. However, the error is not in line number 1 but in anoth…
tagged with: javascript
has comment: http://stackoverflow.com/comment/42093128
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26785467
score: 1
tagged with: java

http://stackoverflow.com/q/26798133
has answer: http://stackoverflow.com/a/26798484
accepted answer: http://stackoverflow.com/a/26800866
score: 4
has title: Replace a part of text in textbox while typing text in it
has body: The format of text in the text box is like this: login -u username -p password While typing this text I want to replace 'password' with number of '*' equal to its length. So if I type: 'login -u abc@abc.com -p abc' in text box it should display like this: login -u abc@abc.com -p *** And also I need to store the actual password which is being replaced. Is there a possible way? Thank you in advance
has answer: http://stackoverflow.com/a/26801697
upvote count: 4
answer count: 4
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42178237
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42171152
possible better answer: http://stackoverflow.com/a/26801176
has comment: http://stackoverflow.com/comment/42171025
type: Question
has answer: http://stackoverflow.com/a/26801176
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42172029
has answer: http://stackoverflow.com/a/26800866
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42175152

http://stackoverflow.com/comment/42111839
type: Comment
score: 0
type: AnswerComment
has text: I dont support anything below ie9
comment on: http://stackoverflow.com/a/26747469

http://stackoverflow.com/q/26704281
score: -2
has comment: http://stackoverflow.com/comment/42001748
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/195951
has body: I want to replace font class in the whole document. When first-font-btn class click, I want to change class Second-font to first-font in this document. When second-font-btn class click, I want to change class first-font to second-font in this document. I have changeFont() method. How to do this problem using pure JavaScript without jQuery? Please Suggest! HTML 1 2 Javascript
has title: Replace Font Class
has comment: http://stackoverflow.com/comment/42002133
favorite count: 0
has answer: http://stackoverflow.com/a/26705002
has comment: http://stackoverflow.com/comment/42001895
downvote count: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26705002
type: Question
has comment: http://stackoverflow.com/comment/42001816
upvote count: 0

http://stackoverflow.com/q/26750924
has body: I have a little bit complicated html structure. I parse it to get this stuff: Option1: value Option2: value from this like html: * Option: 2,35 xx - 1156.00 900 xx - 506.00 and this too * Option: value01 (+1156.00) value02 (+1156.00) value03 (+1156.00) And using this I can get data from both types (inputs + selects). $('#product_options > div.option').each(function() { var Opt01 = ( $(this).find('option:selected').parent().parent().find('b').text() + $(this).find('option:selected').text() ); var Opt02 = ( $(this).find('input:checked').parent().find('b').text() + $(this).find('input:checked').next().text() ); console.log(Opt01); console.log(Opt02); }); But, I want to get Opt01 and Opt02 outside the .each() loop. How I can do this?
type: Question
has title: Access variables outside the jQuery .each() loop
has comment: http://stackoverflow.com/comment/42085639
tagged with: javascript
has answer: http://stackoverflow.com/a/26751002
has answer: http://stackoverflow.com/a/26751076
upvote count: 2
has answer: http://stackoverflow.com/a/26766674
downvote count: 0
has comment: http://stackoverflow.com/comment/42114435
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26750997
answer count: 5
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26751151
score: 2
type: UnansweredQuestion

http://stackoverflow.com/comment/41952733
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26676830
has text: Woops I was a bit to quick, thanks for mentioning it
type: AnswerComment

http://stackoverflow.com/q/26830437
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42227836
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42227967
tagged with: php
score: -1
has body: If I pass an hard coded numeric value from php to javascript, all works perfectly. But if i pass the numeric value from a variable, i get an error: javascript file (gallery.js) function goto_anchor(id) { var anchor = $("#anchor_" + id); $('html,body').animate({ scrollTop: anchor.offset().top - 20 }, 1200); } php file .... <?php $get_cat = 4; if (isset($get_cat)) { ?> <?php } ?> I need to pass the $get_cat variable in my php, not the harcoded numeric value. How ?? Thanks
has comment: http://stackoverflow.com/comment/42227844
has comment: http://stackoverflow.com/comment/42228844
upvote count: 2
downvote count: 3
has answer: http://stackoverflow.com/a/26831770
type: Question
has comment: http://stackoverflow.com/comment/42227832
tagged with: javascript
has title: How to pass a variable from php to javascript
has comment: http://stackoverflow.com/comment/42228125
has comment: http://stackoverflow.com/comment/42227887
has comment: http://stackoverflow.com/comment/42227816
has comment: http://stackoverflow.com/comment/42227794
has comment: http://stackoverflow.com/comment/42227755
answer count: 1

http://stackoverflow.com/a/26724969
downvote count: 0
answers question: http://stackoverflow.com/q/26721869
accepted answer of: http://stackoverflow.com/q/26721869
score: 4
has body: Your data is all on one day. The minRange of highstock is one day by default. So, the reason it appears your rangeselector is unusable when you have your data correctly defined within the series is that you are already zoomed into one day. Move the data from the navigator to a series and change the xAxis minRange to be a smaller number (I choose 1 minute) var chart = new Highcharts.StockChart({ chart: { renderTo: 'container' }, series: [{ data: chartData, markers: { enabled:true } }], xAxis : { minRange: 60 * 1000 // one minute }, }); http://jsfiddle.net/blaird/Yrygy/256/
has comment: http://stackoverflow.com/comment/42040975
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42113895
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/42040453

http://stackoverflow.com/comment/42105074
type: QuestionComment
comment on: http://stackoverflow.com/q/26754739
score: 0
has text: @anubhava: ((/^[0-9]{3,7}$/.test(1e3)))
type: Comment

http://stackoverflow.com/q/26722421
upvote count: 6
accepted answer: http://stackoverflow.com/a/26737340
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/svg
tagged with: selenium
score: 6
linked to: http://stackoverflow.com/q/26910417
type: Question
has title: How do I test a click on SVG objects using Selenium webdriver?
tagged with: javascript
has answer: http://stackoverflow.com/a/26737340
answer count: 1
downvote count: 0
has body: I am trying to write a code to check the functionality of a click on an SVG object - for example a US state on this URL http://www.amcharts.com/svg-maps/?map=usa This works, but is there a better way to do this? Something without physically moving the mouse? robert = new Robot(); robert.mouseMove(x, y); // full click once to get focus on the window robert.mousePress(MouseEvent.BUTTON1_MASK); robert.mouseRelease(MouseEvent.BUTTON1_MASK); // then set the filter robert.mousePress(MouseEvent.BUTTON1_MASK); robert.mouseMove(x, y); robert.mouseRelease(MouseEvent.BUTTON1_MASK);
favorite count: 0

dom
tags question: http://stackoverflow.com/q/26818300
tags question: http://stackoverflow.com/q/26699392
tags question: http://stackoverflow.com/q/26742762
tags question: http://stackoverflow.com/q/26785880
type: Tag
tags question: http://stackoverflow.com/q/26741603
tags question: http://stackoverflow.com/q/26732287
tags question: http://stackoverflow.com/q/26804928
tags question: http://stackoverflow.com/q/26800626
tags question: http://stackoverflow.com/q/26773912
tags question: http://stackoverflow.com/q/26739630
tags question: http://stackoverflow.com/q/26826108
tags question: http://stackoverflow.com/q/26738715
tags question: http://stackoverflow.com/q/26794439
tags question: http://stackoverflow.com/q/26755791
tags question: http://stackoverflow.com/q/26720291
tags question: http://stackoverflow.com/q/26697756
tags question: http://stackoverflow.com/q/26738599
tags question: http://stackoverflow.com/q/26749572
tags question: http://stackoverflow.com/q/26714484
tags question: http://stackoverflow.com/q/26831408
tags question: http://stackoverflow.com/q/26688855
tags question: http://stackoverflow.com/q/26678347
tags question: http://stackoverflow.com/q/26756815
tags question: http://stackoverflow.com/q/26819413
tags question: http://stackoverflow.com/q/26737377
tags question: http://stackoverflow.com/q/26808597
tags question: http://stackoverflow.com/q/26740250
tags question: http://stackoverflow.com/q/26829961
tags question: http://stackoverflow.com/q/26722662
tags question: http://stackoverflow.com/q/26812968
tags question: http://stackoverflow.com/q/26736587
tags question: http://stackoverflow.com/q/26782210
tags question: http://stackoverflow.com/q/26820050
tags question: http://stackoverflow.com/q/26692678
tags question: http://stackoverflow.com/q/26731021
tags question: http://stackoverflow.com/q/26729613
tags question: http://stackoverflow.com/q/26680626
tags question: http://stackoverflow.com/q/26776691
tags question: http://stackoverflow.com/q/26764638
tags question: http://stackoverflow.com/q/26805253
tags question: http://stackoverflow.com/q/26732436
tags question: http://stackoverflow.com/q/26807598
tag name: dom
tags question: http://stackoverflow.com/q/26825096
tags question: http://stackoverflow.com/q/26678603
tags question: http://stackoverflow.com/q/26741485
tags question: http://stackoverflow.com/q/26794924
tags question: http://stackoverflow.com/q/26734810
tags question: http://stackoverflow.com/q/26746850
tags question: http://stackoverflow.com/q/26798402
tags question: http://stackoverflow.com/q/26784131
tags question: http://stackoverflow.com/q/26783147
tags question: http://stackoverflow.com/q/26743423
tags question: http://stackoverflow.com/q/26767973
tags question: http://stackoverflow.com/q/26787566
tags question: http://stackoverflow.com/q/26770222

http://stackoverflow.com/q/26753323
has body: Trying to implement Bootstrap's popover which will appear after response for AJAX request will be received. Here is HTML code: Sorted laptops: Share results Here is JS code: $('#share_results').click(function(event) { var $share_results, delimiter, descriptions, query; $share_results = $(this); $share_results.button('loading'); descriptions = $.map($('td.laptop_desc'), function(val) { return $(val).text().trim().replace(/\s{2,}/g, ' '); }); delimiter = $('#delimiter').val(); query = descriptions.join(' ' + delimiter + '\n\n'); $.post('/path', { 'query': query, 'delimiter': delimiter }, function(resp) { var content, hash, url; $share_results.button('reset'); hash = resp['hash_string']; url = window.location.origin + window.location.pathname + '?q=' + hash; content = " "; return $share_results.popover({ container: '.container', html: true, delay: 500, placement: 'left', 'content': content }).popover('show'); }); }); No CSS changes were made. Initial button state: State after request is received: Here I am having two problems: popover always on top - doesn't disappear popover width is too small How to fix that?
tagged with: ajax
has title: Correct way to implement bootstrap popover with ajax request
type: UnansweredQuestion
tagged with: css
tagged with: twitter-bootstrap-3
answer count: 0
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/42112342
type: Question
has comment: http://stackoverflow.com/comment/42131308
tagged with: javascript
score: 0

http://stackoverflow.com/q/26733913
tagged with: addclass
possible better answer: http://stackoverflow.com/a/26734044
tagged with: javascript
type: Question
has answer: http://stackoverflow.com/a/26734006
score: 0
has comment: http://stackoverflow.com/comment/42054537
tagged with: removeclass
has body: Need some help. Managed to create a jQuery to change the class of the button after being clicked but I need you to click a new button class is removed from others. I'm trying but I can not. I've tried some way but whenever I try, I can remove all and clicked the button that was also not with the new class. Can anyone help me? $(document).ready(function() { $('div#filters-container button').click(function() { var id_button = $(this).val(); $("#" + id_button + "").addClass("cbp-filter-item-active"); }); }); .cbp-filter-item-active { background-color: #5d5d5d; color: #fff!important; border-color: #5d5d5d } Todos Família Finanças Propaganda Empreendedorismo Thank you for your attention.
tagged with: jquery
has comment: http://stackoverflow.com/comment/42054554
has comment: http://stackoverflow.com/comment/42054598
accepted answer: http://stackoverflow.com/a/26734006
answer count: 4
has answer: http://stackoverflow.com/a/26734067
has answer: http://stackoverflow.com/a/26734084
has title: Remove class added after clicking new button
has answer: http://stackoverflow.com/a/26734044
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42054532

http://stackoverflow.com/comment/42022692
type: Comment
comment on: http://stackoverflow.com/q/26716091
score: 0
has text: What's the output that you want?
type: QuestionComment

mongodb
tags question: http://stackoverflow.com/q/26682287
tags question: http://stackoverflow.com/q/26737796
tags question: http://stackoverflow.com/q/26813315
tags question: http://stackoverflow.com/q/26721227
tags question: http://stackoverflow.com/q/26706510
tags question: http://stackoverflow.com/q/26749565
tags question: http://stackoverflow.com/q/26804851
tags question: http://stackoverflow.com/q/26766650
tags question: http://stackoverflow.com/q/26790077
tags question: http://stackoverflow.com/q/26741177
tags question: http://stackoverflow.com/q/26746538
tags question: http://stackoverflow.com/q/26755391
tags question: http://stackoverflow.com/q/26730396
tag name: mongodb
tags question: http://stackoverflow.com/q/26749767
tags question: http://stackoverflow.com/q/26813914
tags question: http://stackoverflow.com/q/26689311
tags question: http://stackoverflow.com/q/26820896
tags question: http://stackoverflow.com/q/26749059
tags question: http://stackoverflow.com/q/26685255
tags question: http://stackoverflow.com/q/26768737
type: Tag
tags question: http://stackoverflow.com/q/26694718
tags question: http://stackoverflow.com/q/26689856
tags question: http://stackoverflow.com/q/26703985
tags question: http://stackoverflow.com/q/26829966
tags question: http://stackoverflow.com/q/26744069
tags question: http://stackoverflow.com/q/26800740
tags question: http://stackoverflow.com/q/26811792
tags question: http://stackoverflow.com/q/26712618
tags question: http://stackoverflow.com/q/26770788
tags question: http://stackoverflow.com/q/26814801
tags question: http://stackoverflow.com/q/26766941
tags question: http://stackoverflow.com/q/26756882
tags question: http://stackoverflow.com/q/26822391
tags question: http://stackoverflow.com/q/26681474
tags question: http://stackoverflow.com/q/26717647
tags question: http://stackoverflow.com/q/26827584
tags question: http://stackoverflow.com/q/26691543
tags question: http://stackoverflow.com/q/26791289
tags question: http://stackoverflow.com/q/26708036

http://stackoverflow.com/a/26782013
answers question: http://stackoverflow.com/q/26781965
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26781965
has body: jQuery is only aware of the elements in the page at the time that it runs, so new elements added to the DOM are unrecognized by jQuery. To combat that you have to use event delegation, bubbling events from newly added items up to a point in the DOM that was there when jQuery ran on page load. Many people use document as the place to catch the bubbled event, but it isn't necessary to go that high up the DOM tree. As a matter of course you should delegate to the nearest parent that exists at the time of page load. $(document).on('click', '.del_button', function(e) {
type: Answer

http://stackoverflow.com/comment/42034366
type: Comment
comment on: http://stackoverflow.com/a/26721348
has text: Alright, after fixing some dumb mistakes including 2 typos the script gets embedded - but not executed unfortunately: http://christianpfanner.at/tangle/ Any ideas why?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42229511
comment on: http://stackoverflow.com/q/26831408
has text: It should probably be `Element` constrictor.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26827584
score: 6
has answer: http://stackoverflow.com/a/60631837
has answer: http://stackoverflow.com/a/26833527
has answer: http://stackoverflow.com/a/76220482
type: Question
tagged with: mongodb
downvote count: 0
tagged with: mongoose
has title: Mongoose: Cast to date failed for value when updating a document
tagged with: javascript
has answer: http://stackoverflow.com/a/76907346
favorite count: 0
has answer: http://stackoverflow.com/a/63797045
answer count: 5
upvote count: 6
tagged with: node.js
has body: I use Mongoose in my project and in one of the schemas I use Date field, like this: reservationDay: { type: Date, default: Date.now } I can create document with this field without a problem. And when I console.log this date after it has been created I get: reservationDay: Thu Nov 20 2014 04:45:00 GMT+0100 (CET) However, there is a problem when I try tu update this document (even without changing reservationDay field). Here is the error message I get: name: 'CastError', message: 'Cast to date failed for value "20/11/2014 04:11" at path "reservationDay"' } CastError: Cast to date failed for value "20/11/2014 04:11" at path "reservationDay" Here is how I update this document on server side: Reservation.findOne({ _id: id }).exec(function(err, reservation) { if (err) { //handle } if (!reservation) { //handle } reservation = extend(reservation, req.body); reservation.save(function(err, updatedReservation) { if (err) { //handle } return res.json(reservation); }); }); and the date is not changed in the req.body. Any ideas what might cause this error? Thanks!
type: UnansweredQuestion

http://stackoverflow.com/q/26718444
has comment: http://stackoverflow.com/comment/42039675
tagged with: properties
type: AnsweredQuestion
has title: JavaScript method named 'method': where is it defined?
has answer: http://stackoverflow.com/a/26718948
type: Question
has comment: http://stackoverflow.com/comment/42027028
has comment: http://stackoverflow.com/comment/42039613
has body: Section 6.6. of the book 'JavaScript: The Good Parts', calls a method of Array as follows. Where in the prototypical inheritance hierarchy of JavaScript objects is the 'method' method defined. I have searched the annotated ECMAScript 5.1 reference on the Mozilla Developer Network JavaScript documentation but could not find it. Array.method('reduce', function (f, value) { var i; for (i = 0; i &lt; this.length; i += 1) { value = f(this[i], value); } return value; }); If anyone could tell me where this method is coming from I would greatly appreciate it. Thanks.
duplicate of: http://stackoverflow.com/q/3966936
answer count: 1
tagged with: arrays
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26718948
linked to: http://stackoverflow.com/q/16063394
linked to: http://stackoverflow.com/q/3966936
tagged with: methods

http://stackoverflow.com/comment/42131854
has text: Am Connecting Database from PHP itself. Am retrieving few fields and I want to display it for the user with the help of pop up message.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26775888

http://stackoverflow.com/q/26797334
answer count: 4
has answer: http://stackoverflow.com/a/26797480
has body: I'm trying to add functions into an array. These have to be named 'opdracht1' through to 'opdracht10'. Though, I cannot figure out how to give it a name. var opdrachtArray = []; for (i = 0; i &lt; 10; i++) { opdrachtArray.push(function() {func(i); }); } It adds the functions but as I said earlier I cannot find out how to add a name. Also, am I later just able to define the functions and call them when I need them?
accepted answer: http://stackoverflow.com/a/26797389
has comment: http://stackoverflow.com/comment/42169549
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42168730
has answer: http://stackoverflow.com/a/26797389
has answer: http://stackoverflow.com/a/26797722
has title: JS - Push functions into an array and name them
tagged with: javascript
has comment: http://stackoverflow.com/comment/42168770
possible better answer: http://stackoverflow.com/a/26797480
type: Question
score: 0
tagged with: for-loop
has comment: http://stackoverflow.com/comment/42168661
upvote count: 1
tagged with: function
downvote count: 1
tagged with: arrays
favorite count: 0
has answer: http://stackoverflow.com/a/26802076

http://stackoverflow.com/q/26810799
upvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26810836
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26810898
has answer: http://stackoverflow.com/a/26811346
has body: I have two functions that perform virtually the same task, but on different elements. I only thought I would have two, but now I'm planning on adding more, so I'm noticing there will be a lot of redundancy. What can I do to improve my jQuery? $('input#activity-view').change(function() { if (this.checked) { $('.action-view').show(); } else { $('.action-view').hide(); } }); $('input#activity-upload').change(function() { if (this.checked) { $('.action-upload').show(); } else { $('.action-upload').hide(); } }); The HTML is something like this: View Upload test abc kk yes jsFiddle http://jsfiddle.net/rLs82of1/
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/26811633
has answer: http://stackoverflow.com/a/26810852
tagged with: javascript
tagged with: jquery
has title: Combine functions that perform the same type of action

http://stackoverflow.com/comment/42214434
comment on: http://stackoverflow.com/a/26822550
type: Comment
score: 0
type: AnswerComment
has text: I don't know how to create fiddle for all code. It is jsp page actually

http://stackoverflow.com/comment/42040132
score: 0
has text: Thanks for all the help guys, I really appreciate it. And thank you for teaching me what I was doing wrong. I'm all set now. Thank a lot!
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26706269

http://stackoverflow.com/comment/91771350
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26700459
has text: Douglas Crockford doesn't agree with a lot of people ;-)
type: AnswerComment

http://stackoverflow.com/q/26760832
tagged with: loops
accepted answer: http://stackoverflow.com/a/26763000
linked to: http://stackoverflow.com/q/26751236
has answer: http://stackoverflow.com/a/26761607
downvote count: 1
has answer: http://stackoverflow.com/a/26761307
has comment: http://stackoverflow.com/comment/42103846
type: AnsweredQuestion
tagged with: underscore.js
score: 1
type: Question
has body: I have a data set which i've simplified : var data = [{ size: 400 }, { size: 500 }, { size: 800 }, { size: 400 }, { size: 400 } { size: 300 }, { size: 300 }, { size: 800 }]; var windowWidth = 800; Using lo-dash how would I make a new array based on how many of size would fit into windowWidth. the preferedfinal dataset will look like this var newArray = [{ group: [0], size: 400 }, { group: [1], size: 500 }, { group: [2], size: 800 }, { group: [3, 4], size: 800 }, { group: [5,6], size: 600 }, { group: [7], size: 800, } The key group refers to the indexes of data[n] that meet the condition of lessthan windowwidth. the key size refers to the accumulated size of the group. Note: data[n] just counts up and doesnt repeat for ever go back to data[0]. does data[n] fit inside window? yes? push to group; go to data[n +1 ].size; check expression no? create new group(); go to data[n +1].size; check expression
has comment: http://stackoverflow.com/comment/42103196
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/42103441
favorite count: 0
has comment: http://stackoverflow.com/comment/42103602
answer count: 3
tagged with: lodash
has answer: http://stackoverflow.com/a/26763000
upvote count: 2
has comment: http://stackoverflow.com/comment/42103275
has comment: http://stackoverflow.com/comment/42103573
has comment: http://stackoverflow.com/comment/42103474
has comment: http://stackoverflow.com/comment/42103547
has comment: http://stackoverflow.com/comment/42103305
possible better answer: http://stackoverflow.com/a/26761307
has title: Iterating through an array and sum a value based on a condition in lo-dash

http://stackoverflow.com/a/26723845
downvote count: 0
answers question: http://stackoverflow.com/q/26723258
type: Answer
upvote count: 1
score: 1
has body: i worked out this four you: JsFiddle $(document).ready(function() { var firstRow = $('.row'); $('.insert-row').on('click', function() { var code = $('&lt;div/&gt;', {clas: 'row'}).append($('&lt;div/&gt;', {class: "col-sm-12 pane"})), row = $('&lt;div/&gt;', {class: 'row'}), items = $('.insertion-point').nextAll(); row.append(items); firstRow.after(row); firstRow.after(code); }); }); Update: after seen the nextAll function by jQuery .. this will be much faster: updated fiddle

http://stackoverflow.com/q/26746978
possible better answer: http://stackoverflow.com/a/26747136
downvote count: 2
has answer: http://stackoverflow.com/a/26747136
upvote count: 1
type: AnsweredQuestion
has title: How to get the highest key and value from object
score: -1
has comment: http://stackoverflow.com/comment/42079632
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26747182
tagged with: javascript
has comment: http://stackoverflow.com/comment/42079207
linked to: http://stackoverflow.com/q/5525795
has comment: http://stackoverflow.com/comment/42079230
has body: I'm trying to get the highest key and value from an object, how can I return the desired result? Here's my object: categories = { 'personal' : 4, 'swag' : 3, 'mingle' : 2, 'attention' : 1 }; Desired functionality: returnMax(categories) // {personal : 4}
accepted answer: http://stackoverflow.com/a/26747182
has comment: http://stackoverflow.com/comment/42079095
has comment: http://stackoverflow.com/comment/42079100
favorite count: 0

http://stackoverflow.com/q/26699619
score: 9
type: Question
possible better answer: http://stackoverflow.com/a/70586873
has answer: http://stackoverflow.com/a/26699920
upvote count: 9
has answer: http://stackoverflow.com/a/74802457
has answer: http://stackoverflow.com/a/70586873
has answer: http://stackoverflow.com/a/29545444
tagged with: javascript
has body: I'm new to Bootstrap and just trying to get the collapsed dropdown nav bar to behave. It resizes perfectly, all the way up to the point that the window is so small that it triggers all the nav bar items being removed and placed inside the little data-toggle button. Because when I click that lil' data-toggle button, it does not expand and show the items in a drop down list like its supposed to. Toggle navigation Home Family Law Criminal Law Conveyancing About Contact I've used this identical code on all pages, however for some reason it only works on the home page of this site. The only difference between the home page and other pages is that beneath the tags there is another div of content containing the main text for that page & an image. That said, when I delete the entire code for this div from my page, the problem persists so I don't think its that.... I may also be (over)using redundant classes, but thats a story for later...
accepted answer: http://stackoverflow.com/a/26699920
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/47082937
answer count: 9
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/72223476
has answer: http://stackoverflow.com/a/26699764
tagged with: http://stackoverflow.com/tag/html
has title: Bootstrap collapsed navbar not expanding
has answer: http://stackoverflow.com/a/68352759
tagged with: css
has answer: http://stackoverflow.com/a/44243390
type: AnsweredQuestion

http://stackoverflow.com/comment/42015358
type: Comment
type: QuestionComment
has text: Typo at `stringify`? You omitted an `n` there.
score: 0
comment on: http://stackoverflow.com/q/26711266

http://stackoverflow.com/q/26817472
has comment: http://stackoverflow.com/comment/42205378
score: 0
has answer: http://stackoverflow.com/a/26817555
has comment: http://stackoverflow.com/comment/42205297
answer count: 1
tagged with: events
tagged with: jquery
type: UnansweredQuestion
has body: How can I access an object in a function that is called from the onclick event of a DOM element?
tagged with: oop
tagged with: onclick
has comment: http://stackoverflow.com/comment/42205273
type: Question
has comment: http://stackoverflow.com/comment/42205335
has title: Access object in javascript onclick function
tagged with: javascript

http://stackoverflow.com/comment/42075681
has text: What about changing it back and using window load instead of document ready: http://4loc.wordpress.com/2009/04/28/documentready-vs-windowload/ -- you could try it.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26744778

http://stackoverflow.com/a/26750878
accepted answer of: http://stackoverflow.com/q/26750370
type: Answer
has body: Check the JSFiddle :- JSFiddle $("#advanced").addClass('hide'); $(".button").click(function(){ $("#advanced").toggleClass('hide'); $("#general").toggleClass('hide'); if($(this).attr("value") == "Advanced"){ $(this).attr("value","General"); } else if($(this).attr("value") == "General"){ $(this).attr("value","Advanced"); } });
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26750370

http://stackoverflow.com/comment/42007198
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26707159
type: Comment
has text: @bert: because the function normally goes *so fast* that the browser never really has a 'window' to update the textbox. Visually it goes straight to ten. You need to artificially add this delay to give the browser time to update the UI.

http://stackoverflow.com/a/26827747
score: 0
has body: If you are loading your html pages from remote server, you need to add your servers domain to whitelist in the config.xml. http://docs.phonegap.com/en/3.5.0/guide_appdev_whitelist_index.md.html
has comment: http://stackoverflow.com/comment/42230707
type: Answer
has comment: http://stackoverflow.com/comment/42230946
answers question: http://stackoverflow.com/q/26826469

http://stackoverflow.com/comment/41951899
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26676241
has text: @plalx Whoops, i don't know. Just to make the boring questions a bit of fun? :P

http://stackoverflow.com/comment/42208274
comment on: http://stackoverflow.com/a/26813059
score: 0
type: AnswerComment
type: Comment
has text: Any solution without using jQuery ?

http://stackoverflow.com/a/26726166
has body: Your server-side logic is a bit off. The client connects and that's where the client socket is revealed and that's where you listen to events from a particular client. Usually, it would look like this: var io = require("socket.io")(port); io.on('connection', function (socket) { socket.on('ask question', function (data) { // the client socket that sent this message is in the // socket variable here from the parent scope socket.emit("Here's the answer"); }); }); This is shown in the socket.io docs here.
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26725488
answers question: http://stackoverflow.com/q/26725488
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42041748

http://stackoverflow.com/q/26747171
upvote count: 6
linked to: http://stackoverflow.com/q/19978761
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26747337
tagged with: alert
has body: I've just been messing around with setting a password protected directory on my webserver (so as to store hot copies of backups etc.) and was wondering if there's any way I may be able to style the password prompt that appears when a user attempts to access this page. As it stands nobody will notice my nice little note, which makes me sad. It seems to display similarly to a standard .js alert, though I've been unable to find a way to specify any css classes I may be able to alter, as the "alert" box does not show up in devtools, just the page bahind it: Any advice / tips would be greatly appreciated.
score: 6
linked to: http://stackoverflow.com/q/7853130
type: Question
accepted answer: http://stackoverflow.com/a/26747342
linked to: http://stackoverflow.com/q/15841420
has answer: http://stackoverflow.com/a/26747341
tagged with: javascript
has title: How can I style a .htaccess password protection promp?
answer count: 3
downvote count: 0
linked to: http://stackoverflow.com/q/16479493
tagged with: .htaccess
favorite count: 0
has answer: http://stackoverflow.com/a/26747337
has answer: http://stackoverflow.com/a/26747342
tagged with: css

http://stackoverflow.com/comment/42098949
type: Comment
comment on: http://stackoverflow.com/a/26749981
type: AnswerComment
score: 0
has text: Thanks let me know if you need further explanation. :).

http://stackoverflow.com/a/26815875
accepted answer of: http://stackoverflow.com/q/26815829
has comment: http://stackoverflow.com/comment/42212285
answers question: http://stackoverflow.com/q/26815829
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/42202747
type: Answer
has body: forEach operates on the original array elements. (If you want just iterate over all element you should use forEach) map is running through your array, applying a function to each element, and emitting the result as a new array. (if you want to apply some changes to each element you should use map)
upvote count: 8
score: 7

http://stackoverflow.com/comment/41988215
type: QuestionComment
has text: have you tried ajx and jquery post() function ??
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26696786

http://stackoverflow.com/q/26726811
has title: Using multi variables in function in jQuery
has answer: http://stackoverflow.com/a/26726894
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26726874
score: 1
has answer: http://stackoverflow.com/a/26726874
upvote count: 1
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26726894
answer count: 2
has body: I'm trying to use multiple variables in a function. This one works for 2 variables, but what if there are 5 sites to get scripts from? function scripts(url,url2){ window.setInterval(function (){ $.getScript(url); $.getScript(url2); },10000) } scripts('http://www.site1.com/1.jpg','http://www.site2.com/1.jpg'); What is the correct way to use multiple variables in a function, when we can use as more variables as we can?
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/26720562
has comment: http://stackoverflow.com/comment/42032219
has body: I have two PHP pages. On both I am referring to: just before the close of body tag. Problem is that while I am analyzing them via the Chrome network tab, I see that both these resources are loading with 200 code on one php, while as 304 on other PHP. This means that on the page where they are loading as 200, they do not get loaded from cache. Both page seem similar to me, so I am not sure what might be causing this difference. Any pointers please?
type: Question
has comment: http://stackoverflow.com/comment/42032814
has comment: http://stackoverflow.com/comment/42032405
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42041243
answer count: 0
type: UnansweredQuestion
has title: Some js/css loading as 200 instead of 304 on some of my pages
has comment: http://stackoverflow.com/comment/42031752
tagged with: css
has comment: http://stackoverflow.com/comment/42032296
has comment: http://stackoverflow.com/comment/42076647

http://stackoverflow.com/comment/42097316
comment on: http://stackoverflow.com/q/26757367
score: 0
has text: Why do you care? Yes, multiplication is commmutative. But in this case you are using different values in the two cases, due to the effect of the assignments. So it's like saying that `(1 + 2) * (4 + 1)` not being equal to `(4 + 1) * (4 + 2)` is somehow evidence of non-commutativity. In any case, probably doing these assignments in the middle of a computation is not the best idea. I am not sure what the spec says, but it is quite possible that a particular engine might choose to evaluate the two sides in reverse order, or even in parallel.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42160753
comment on: http://stackoverflow.com/a/26791560
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/64448/discussion-between-drax-and-carl-smith).
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42203628
has text: I tried. That doesn't work anyway. Just accidentally pushed it
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26812613
type: Comment

http://stackoverflow.com/q/26701216
has answer: http://stackoverflow.com/a/26701249
tagged with: css
has title: Weird margin on html page
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26701249
type: Question
has comment: http://stackoverflow.com/comment/41996076
has comment: http://stackoverflow.com/comment/41996393
answer count: 2
has body: There seems to be padding around the sides of my website, and I cannot get rid of it. Any types of hints will be appreciated. #introContainer{ background-color: #bdc3c7; } #navHeader{ background-color:#95a5a6; } #skillsHeader{ background-color:#3498db; } Local
has answer: http://stackoverflow.com/a/26710559
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/26710559
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/42222796
comment on: http://stackoverflow.com/a/26821323
type: Comment
has text: chek solution 2 in my answer
score: 1
type: AnswerComment

http://stackoverflow.com/q/26761396
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26761576
has body: I want to remove the {AC} which is in every description in the articles divs in the home page. Every div article has its title, its image thumbnail and some short description. At the beginning of every single description there is the {AC} part that i want to remove. So i tried the jQuery code below but not only removes the {AC} but also every div article has the same description. Which is unwanted. Can you help me out please? var descr = jQuery('.nspText').filter('.tleft').filter('.fleft'); descr.each(function(){ jQuery(this).html(descr.html().replace('{AC}','')); });
has answer: http://stackoverflow.com/a/26761576
tagged with: http://stackoverflow.com/tag/html
has title: Cannot remove a part of text in the description on every single article div with jQuery
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26761473
type: Question
has answer: http://stackoverflow.com/a/26761473
has comment: http://stackoverflow.com/comment/42104137
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42104233

datatables
tags question: http://stackoverflow.com/q/26789480
tags question: http://stackoverflow.com/q/26810368
tags question: http://stackoverflow.com/q/26735050
tags question: http://stackoverflow.com/q/26761308
tags question: http://stackoverflow.com/q/26749496
tags question: http://stackoverflow.com/q/26698477
tags question: http://stackoverflow.com/q/26742762
tags question: http://stackoverflow.com/q/26763507
tags question: http://stackoverflow.com/q/26810735
tags question: http://stackoverflow.com/q/26760990
tags question: http://stackoverflow.com/q/26712842
tags question: http://stackoverflow.com/q/26822224
type: Tag
tag name: datatables
tags question: http://stackoverflow.com/q/26789846
tags question: http://stackoverflow.com/q/26738097
tags question: http://stackoverflow.com/q/26760704

http://stackoverflow.com/comment/125436840
type: AnswerComment
has text: It seems the only solution in this thread
type: Comment
score: 0
comment on: http://stackoverflow.com/a/34041725

http://stackoverflow.com/comment/42183907
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26805216
type: Comment
has text: http://jsfiddle.net/KDtAX/3298/ as you can see here author set width, height and viewBox. This values are equal to image size that are also setted. In my case i get first image from collection, so i don't know it size. I need here some othe js that will detect image size and then set it to svg

http://stackoverflow.com/comment/41953475
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26677187
has text: You can't load it from config, so use `.run` section.

http://stackoverflow.com/comment/69700689
has text: I don't think this covers all possible characters that would break things. For example 0x200B is a silent killer - see here http://stackoverflow.com/questions/12719859/no-visible-cause-for-unexpected-token-illegal
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26741455

http://stackoverflow.com/a/26809620
answers question: http://stackoverflow.com/q/26809529
has comment: http://stackoverflow.com/comment/42192072
upvote count: 3
has body: Since you see the result momentarily, I'm going to hazard a guess that you have a form element on your page and when you hit return, it's actually submitting the form. You briefly see the result of the ajax operation and then your form submits causing the page to reload as a new blank page. This is a common issue and always has these same symptoms. You can either remove the form element or block the default submission of the form with javascript. If you show us more of your actual HTML, we could help more specifically with how to prevent the form from submitting.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42191917
type: Answer
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/42192179
accepted answer of: http://stackoverflow.com/q/26809529
has comment: http://stackoverflow.com/comment/42191933
has comment: http://stackoverflow.com/comment/42192814

http://stackoverflow.com/comment/41981398
comment on: http://stackoverflow.com/a/26692785
score: 0
type: AnswerComment
type: Comment
has text: I think the second array value is on purpose. He's getting the query string at the end of the URL. That would be the second array value, because he used the `split()` method.

http://stackoverflow.com/comment/42172269
score: 1
comment on: http://stackoverflow.com/q/26798862
type: Comment
type: QuestionComment
has text: I am not an expert in sequelize, but I see there code prone to SQL Injection.

http://stackoverflow.com/q/26822795
has title: In an AJAX update, how can I access code from an external javascript file?
tagged with: ruby-on-rails
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26822837
has body: I'm learning Ruby on Rails and I'd like to use some unobtrusive javascript to display a modal. When the user clicks on a remote link, it calls an action in one of my controllers that returns the following javascript... var SM = new SimpleModal({"width":600}); SM.addButton("Action button", "btn primary", function(){ this.hide(); }); SM.addButton("Cancel", "btn"); SM.show({ "model":"modal-ajax", "title":"Title", "param":{ "url":"/ajax/url", "onRequestComplete": function(){ /* Action on request complete */ } } }); ...but the problem is the code doesn't know what SimpleModal is since that's defined in a separate javascript file. How can I import or reference that SimpleModal code so that my AJAX update can create the SimpleModal object and show it? Thanks in advance for your wisdom!
score: 0
tagged with: simplemodal
answer count: 1
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion

http://stackoverflow.com/a/26704178
has body: The problem is that you change day and month variables in functions volgende() and vorige(). Try adding another variables for current day and month: //Vandaag// var day = today.getDay(); var currentDay = day; //vandaag zoekmaand// var month = today.getMonth(); var currentMonth= month; and use them in taken element: document.getElementById('taken').innerHTML += dayNamesFull[currentDay]+" "+vandaag+" "+monthNames[currentMonth];
has comment: http://stackoverflow.com/comment/42001537
type: Answer
accepted answer of: http://stackoverflow.com/q/26704067
answers question: http://stackoverflow.com/q/26704067
has comment: http://stackoverflow.com/comment/42001566
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/26722474
answers question: http://stackoverflow.com/q/26719424
has comment: http://stackoverflow.com/comment/42034883
downvote count: 0
score: 1
has body: Yes, you can use the --server option to specify which Meteor server your built mobile app should point to. This way, you have one Meteor backend running the web app, Android app, and iOS app. This should work just fine with Modulus.
upvote count: 1
has comment: http://stackoverflow.com/comment/42038486
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26719424
type: Answer

angularjs
tags question: http://stackoverflow.com/q/26764706
tags question: http://stackoverflow.com/q/26720157
tags question: http://stackoverflow.com/q/26782543
tags question: http://stackoverflow.com/q/26734232
tags question: http://stackoverflow.com/q/26712002
tags question: http://stackoverflow.com/q/26710502
tags question: http://stackoverflow.com/q/26827038
tags question: http://stackoverflow.com/q/26746850
tags question: http://stackoverflow.com/q/26779976
tags question: http://stackoverflow.com/q/26800221
tags question: http://stackoverflow.com/q/26783893
tags question: http://stackoverflow.com/q/26704319
tags question: http://stackoverflow.com/q/26755652
tags question: http://stackoverflow.com/q/26746482
tags question: http://stackoverflow.com/q/26809790
tags question: http://stackoverflow.com/q/26741319
tags question: http://stackoverflow.com/q/26792407
tags question: http://stackoverflow.com/q/26740478
tags question: http://stackoverflow.com/q/26692777
tags question: http://stackoverflow.com/q/26755078
tags question: http://stackoverflow.com/q/26753796
tags question: http://stackoverflow.com/q/26699786
tags question: http://stackoverflow.com/q/26691114
tags question: http://stackoverflow.com/q/26762458
tags question: http://stackoverflow.com/q/26821890
tags question: http://stackoverflow.com/q/26829325
tags question: http://stackoverflow.com/q/26705110
tags question: http://stackoverflow.com/q/26757357
tags question: http://stackoverflow.com/q/26830206
tags question: http://stackoverflow.com/q/26782629
tags question: http://stackoverflow.com/q/26765793
tags question: http://stackoverflow.com/q/26753400
tags question: http://stackoverflow.com/q/26769583
tags question: http://stackoverflow.com/q/26809351
tags question: http://stackoverflow.com/q/26817377
tags question: http://stackoverflow.com/q/26692263
tags question: http://stackoverflow.com/q/26778887
tags question: http://stackoverflow.com/q/26773747
tags question: http://stackoverflow.com/q/26687977
tags question: http://stackoverflow.com/q/26818849
tags question: http://stackoverflow.com/q/26803777
tags question: http://stackoverflow.com/q/26689252
tags question: http://stackoverflow.com/q/26829447
tags question: http://stackoverflow.com/q/26681376
tags question: http://stackoverflow.com/q/26702762
tags question: http://stackoverflow.com/q/26826757
tags question: http://stackoverflow.com/q/26767922
tags question: http://stackoverflow.com/q/26830901
tags question: http://stackoverflow.com/q/26754295
tags question: http://stackoverflow.com/q/26830960
tags question: http://stackoverflow.com/q/26828780
tags question: http://stackoverflow.com/q/26793066
tags question: http://stackoverflow.com/q/26790841
tags question: http://stackoverflow.com/q/26768808
tags question: http://stackoverflow.com/q/26820178
tags question: http://stackoverflow.com/q/26693272
tags question: http://stackoverflow.com/q/26821573
tags question: http://stackoverflow.com/q/26727289
tags question: http://stackoverflow.com/q/26741519
tags question: http://stackoverflow.com/q/26774357
tags question: http://stackoverflow.com/q/26810460
tags question: http://stackoverflow.com/q/26685498
tags question: http://stackoverflow.com/q/26707507
tags question: http://stackoverflow.com/q/26764879
tags question: http://stackoverflow.com/q/26809100
tags question: http://stackoverflow.com/q/26720664
tags question: http://stackoverflow.com/q/26814140
tags question: http://stackoverflow.com/q/26813011
tags question: http://stackoverflow.com/q/26779052
tags question: http://stackoverflow.com/q/26761637
tags question: http://stackoverflow.com/q/26746900
tags question: http://stackoverflow.com/q/26792137
tags question: http://stackoverflow.com/q/26674033
tags question: http://stackoverflow.com/q/26789640
tags question: http://stackoverflow.com/q/26682159
tags question: http://stackoverflow.com/q/26741307
tags question: http://stackoverflow.com/q/26798415
tags question: http://stackoverflow.com/q/26759468
tags question: http://stackoverflow.com/q/26770988
tags question: http://stackoverflow.com/q/26729941

http://stackoverflow.com/a/26802168
score: 4
has body: Sounds like caching issue. Try to prevent it with some random parameter: $('#photo_profile').prop('src', fullPath + '?' + Math.random()) Also src is a property, so it makes sense to use prop instead of attr.
has comment: http://stackoverflow.com/comment/42178363
type: AcceptedAnswer
type: Answer
upvote count: 4
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26802073
answers question: http://stackoverflow.com/q/26802073

http://stackoverflow.com/q/26731013
type: Question
tagged with: bubble-chart
score: 0
has comment: http://stackoverflow.com/comment/42051224
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I want to make the bubble position is random instead of people need to set the y and x position. Here the link of example bubble chart http://codepen.io/anon/pen/LowKD here the js script $(document).ready(function() { $('.graph-bar').each(function() { var dataWidth = $(this).data('value'); $(this).css("width", dataWidth + "%"); }); }); // Positioning of .bubbleChart $(document).ready(function() { $('.chart-bubble').each(function() { // Bubble Size var bubbleSize = $(this).data('value'); $(this).css("width", function() { return (bubbleSize * 10) + "px" }); $(this).css("height", function() { return (bubbleSize * 10) + "px" }); // Bubble Position var posX = $(this).data('x'); var posY = $(this).data('y'); $(this).css("left", function() { return posX - (bubbleSize * 0.5) + "%" }); $(this).css("bottom", function() { return posY - (bubbleSize * 0.5) + "%" }); }); }); I want this bubble chart to random positioning &lt;div data-value="7" data-label="500" data-x="50" data-y="50" class="chart-bubble"&gt;&lt;/div&gt; so I don't have to set the data x and y because I want to make it random when user fill the value
has title: How to make Bubble Chart Random Position
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/26731371

http://stackoverflow.com/comment/41961861
has text: Because I want it to have multiple searching options, and not necessary all have to be given, so with 3 options there are 9 ifs, with 4 16 ifs etc.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26681525
type: Comment

http://stackoverflow.com/q/26782224
score: 2
has title: Only end tick mark is showing on dc.js bubble chart
has comment: http://stackoverflow.com/comment/42149129
downvote count: 0
tagged with: axis-labels
has body: I have the following bubble chart coded with dc.js which is built upon d3.js. All is good, but for some reason I cannot see the tick marks. When I inspect the DOM I can see that they are present: &lt;line y2="6" x2="0"&gt;&lt;/line&gt; And I have applied CSS styles to them, but still they do not show! #referrals-bubble-chart .axis .tick line { fill: none; stroke: #000; shape-rendering: crispEdges; } I even added a stroke-width of 2px and still nothing shows! I know I'm targeting the right elements in my CSS because when I give it a stroke width of 10px and hover (Chrome Inspector), I see that the line is now 10px wide. Why is this happening? Chart Code is below: // define the referrals bubble chart attributes referralsChart .width(700) .height(400) .transitionDuration(1500) // (optional) define chart transition duration, :default = 750 .margins({top: 10, right: 50, bottom: 40, left: 50}) .dimension(diagnosisDimension) //Bubble chart expect the groups are reduced to multiple values which would then be used //to generate x, y, and radius for each key (bubble) in the group .group(diagnosisDimensionGroup) .colors(colorbrewer.RdYlGn[9]) // (optional) define color function or array for bubbles .colorDomain([0, 100]) //(optional) define color domain to match your data domain if you want to bind data or color .colorAccessor(function (d) { // color - mapped to internal scale return d.value.cost % 100; }) .keyAccessor(function (p) { // x-axis return p.value.avgrtt / p.value.referrals; }) .valueAccessor(function (p) { // y-axis return p.value.cost / 1000; }) .radiusValueAccessor(function (p) { // radius size - default is [0, 100] return p.value.referrals; }) .maxBubbleRelativeSize(0.1) // .x(d3.scale.linear().domain([0, 5000])) .x(d3.scale.linear().domain([1, 15])) .y(d3.scale.linear().domain([1000, 10000])) .r(d3.scale.linear().domain([0, 4000])) //##### Elastic Scaling //`.elasticX` and `.elasticX` determine whether the chart should rescale each axis to fit data. //The `.yAx…
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/42170622
accepted answer: http://stackoverflow.com/a/31264561
has comment: http://stackoverflow.com/comment/42170078
has comment: http://stackoverflow.com/comment/42169576
upvote count: 2
tagged with: d3.js
answer count: 1
tagged with: bubble-chart
tagged with: javascript
has answer: http://stackoverflow.com/a/31264561
has comment: http://stackoverflow.com/comment/42169048
tagged with: dc.js
type: AnsweredQuestion

http://stackoverflow.com/a/26782387
score: 3
has body: .trigger() allows to pass additional data via its arguments. You can call $(document).on('mousemove', function( event ){ $(document).trigger('myevent', event); }); Now you have access to the whole original event object within your custom event code.
answers question: http://stackoverflow.com/q/26782333
accepted answer of: http://stackoverflow.com/q/26782333
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 3

http://stackoverflow.com/q/26722090
accepted answer: http://stackoverflow.com/a/26722247
type: AnsweredQuestion
tagged with: java
type: Question
possible better answer: http://stackoverflow.com/a/26722656
has answer: http://stackoverflow.com/a/26722656
tagged with: javascript
tagged with: jquery
has body: I have a ppc landing page that I want to change the hidden value of a form field based on the URL parameter. The field &lt;input id="Campaign_ID" name="Campaign_ID" type="hidden" value="7g012455dv5441vdf"&gt; The URL would be something like mysite.com/?campaignidvalue=7g012455dv5441vdf There will be other field "values" that are also based on the URL parameter, so it has to tie the "input id" (or name) to that specific value.
has comment: http://stackoverflow.com/comment/42034736
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42034035
has comment: http://stackoverflow.com/comment/42034113
has comment: http://stackoverflow.com/comment/42034564
has title: populate hidden input form fields based on URLparameters
tagged with: php
has answer: http://stackoverflow.com/a/26722247

http://stackoverflow.com/comment/42179964
comment on: http://stackoverflow.com/a/26803310
score: 0
type: AnswerComment
has text: I've updated my question to give more information and entire method.
type: Comment

http://stackoverflow.com/q/26689681
score: -2
tagged with: forms
has body: Is it possible to check the form field values dynamically with javascript only. For example if I have form field for username and when the user enters their chosen username it checks whether this username is available and pops up an alert box or shows a message on the screen based on the result. all of this is done without clicking any button. and the data is stored in an array. Thanks in advance. Im trying to achieve this only by using javascript.
answer count: 2
has answer: http://stackoverflow.com/a/26689917
tagged with: validation
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26689789
favorite count: 0
has comment: http://stackoverflow.com/comment/41976201
has title: dynamically check form field values javascript
linked to: http://stackoverflow.com/q/14659098
type: UnansweredQuestion
downvote count: 2
type: Question

android
tags question: http://stackoverflow.com/q/26827503
tags question: http://stackoverflow.com/q/26699271
tags question: http://stackoverflow.com/q/26828869
tags question: http://stackoverflow.com/q/26678060
tags question: http://stackoverflow.com/q/26694003
tags question: http://stackoverflow.com/q/26810769
tags question: http://stackoverflow.com/q/26737270
tags question: http://stackoverflow.com/q/26758164
tags question: http://stackoverflow.com/q/26678914
tags question: http://stackoverflow.com/q/26826469
tags question: http://stackoverflow.com/q/26735117
tags question: http://stackoverflow.com/q/26798126
tags question: http://stackoverflow.com/q/26791310
tags question: http://stackoverflow.com/q/26812719
tags question: http://stackoverflow.com/q/26709128
tags question: http://stackoverflow.com/q/26724417
tags question: http://stackoverflow.com/q/26715836
tags question: http://stackoverflow.com/q/26774364
tags question: http://stackoverflow.com/q/26792947
tags question: http://stackoverflow.com/q/26714073
tags question: http://stackoverflow.com/q/26759855
tags question: http://stackoverflow.com/q/26745635
tags question: http://stackoverflow.com/q/26806344
tags question: http://stackoverflow.com/q/26692298
tags question: http://stackoverflow.com/q/26757136
tags question: http://stackoverflow.com/q/26700266
tags question: http://stackoverflow.com/q/26726682
tags question: http://stackoverflow.com/q/26710705
tags question: http://stackoverflow.com/q/26731417
tags question: http://stackoverflow.com/q/26830771
tags question: http://stackoverflow.com/q/26818021
tags question: http://stackoverflow.com/q/26779184
tags question: http://stackoverflow.com/q/26675265
tags question: http://stackoverflow.com/q/26683071
tags question: http://stackoverflow.com/q/26780781
tags question: http://stackoverflow.com/q/26809387
tags question: http://stackoverflow.com/q/26825115
tags question: http://stackoverflow.com/q/26771549
tags question: http://stackoverflow.com/q/26677865
tags question: http://stackoverflow.com/q/26721394
tags question: http://stackoverflow.com/q/26731021
tags question: http://stackoverflow.com/q/26742943
tags question: http://stackoverflow.com/q/26768911
tags question: http://stackoverflow.com/q/26787921
tags question: http://stackoverflow.com/q/26719424
tags question: http://stackoverflow.com/q/26733563
tags question: http://stackoverflow.com/q/26700152
tags question: http://stackoverflow.com/q/26803791
tag name: android
tags question: http://stackoverflow.com/q/26684190
type: Tag
tags question: http://stackoverflow.com/q/26755035

http://stackoverflow.com/q/26738681
score: 1
answer count: 2
tagged with: automated-tests
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Check title of multiple pages in Selenium
has body: I'm currently using WebDriver.js to run some automated testing on Browserstack. My goal is to take all the hrefs in a given div, open them and check the title of the page where the link is pointing to. To do that I'm doing the following: for (var i = 0; i &lt; hrefs.length; i++) { var href = hrefs[i], site_name = sites_names[i]; driver.get(href); driver.getTitle().then(function(title) { assert.equal(title, site_name); }); } My problem is that get and getTitle are both asynchronous methods and thus when I'm calling getTitle the page is already changed and thus the assertion is failing. What is the best pattern/solution for this kind of sitations?
type: UnansweredQuestion
tagged with: selenium
upvote count: 1
has answer: http://stackoverflow.com/a/26760785
has answer: http://stackoverflow.com/a/26743455
type: Question
tagged with: testing

http://stackoverflow.com/q/26794963
type: Question
accepted answer: http://stackoverflow.com/a/26795279
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/42164647
score: 0
has answer: http://stackoverflow.com/a/26795279
has title: Extracting JSON data locally using .getJSON but data will not appear
has comment: http://stackoverflow.com/comment/42164874
has answer: http://stackoverflow.com/a/26795260
type: AnsweredQuestion
has body: First off, I am trying to parse JSON and I'm using a file locally. When I run the following: $.getJSON('/trivia_demos.json', function(data) { alert("It worked!); }); The alert box comes up and I can confirm I am calling the right file locally. Console.log works as well. So far, so good. I now want to pull several parts of the data and show them on the page. The JSFiddle is here, but the relevant code is the following: $.getJSON('/trivia_demos.json', function(data) { var items = [] $.each(data.reponse, function(item, i) { items.push('&lt;li id="' + i.order + '"&gt;' + i.question + ' - ' + i.answer + '&lt;/li&gt;'); }); $('&lt;ul/&gt;', { 'class': 'my-new-list', html: items.join('') }).appendTo('#example');}); In effect, I want the order, question, and answer appended to my div "#example". When I load the page, nothing happens though. In light of my first point, I believe I am screwing up the construction of the JQuery to target those three pieces of data and display them. I believe something is missing between calling the json file and actually accessing the json object. Also, in the trivia_demos.json file, the following json is present. [{"id":1,"order":1,"question":"Who was the only American President to learn English as a second language? ","answer1":"John Quincy Adams", "answer2":"Martin van Buren","answer3":"William McKinley ", "answer4":"Andrew Jackson","correcta":"Martin van Buren", "published":"2014-11-04","url":"http://example.com/trivia_demos/1.json"}]
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/26795260

http://stackoverflow.com/comment/41977434
comment on: http://stackoverflow.com/a/26690398
type: AnswerComment
score: 0
has text: This answer is brittle. What if there is a change in the HTML (although not provided in the question, yet) and the closest LI is not the one whose style needed to be changed? In the absence of the HTML I would suggest using an ID to pick the appropriate LI element
type: Comment

http://stackoverflow.com/q/26730184
type: Question
has comment: http://stackoverflow.com/comment/42061778
tagged with: browser
answer count: 1
tagged with: noflo
tagged with: javascript
has comment: http://stackoverflow.com/comment/42053548
favorite count: 0
has comment: http://stackoverflow.com/comment/42053570
has body: I'd like to use noflo.js's workflow co-ordination in a browser application. Is that possible? If it's not possible, my bonus question is what is a workflow co-ordination library that does work in the browser, and allows external (i.e. not code) representations of the workflow?
type: UnansweredQuestion
score: 0
upvote count: 1
has answer: http://stackoverflow.com/a/26747194
downvote count: 1
has title: Can noflo.js be used in a browser?

http://stackoverflow.com/comment/41953236
type: Comment
comment on: http://stackoverflow.com/a/26676297
type: AnswerComment
has text: @Paul what will happen if he uses an older browser which doesn't support HTML5 ?
score: 0

http://stackoverflow.com/comment/42049523
score: 0
type: Comment
has text: @Cerbrus: OP is getting html. "<" is encoded as &lt; in html. "&" and ";" are encoded also. Fun fact: ">" does not need to be escaped, but usually is. You are assuming, there is javascript in the html. Well, I guess than a regex would be impossible.
comment on: http://stackoverflow.com/a/26730562
type: AnswerComment

http://stackoverflow.com/comment/42142711
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26782687
has text: Okay! Thank you very much! Than I will keep digging!
type: AnswerComment

http://stackoverflow.com/comment/42444714
has text: according to this - http://siddii.github.io/angular-timer/index.html#/markup you should add autostart="false"
type: Comment
comment on: http://stackoverflow.com/a/26826536
score: 0
type: AnswerComment

http://stackoverflow.com/q/26741773
tagged with: responsive-design
tagged with: javascript
has answer: http://stackoverflow.com/a/26742232
answer count: 1
has body: Slashpage height:100% I'm attempting to make a splash page that will fill the screen but taking into account the size of the header and footer. The footer and header are not fixed position but footer will become sticky when the footer reaches top:0; all sounds good until I actually attempt to get the splash screen to function on multiple devices, I've attempted CSS media queries but believe I actually need a javascript to monitor changes to the height of the browser when the page is first visited. NOTE: I've taken a look at How to make the web page height to fit screen height but doesn't seem to mention the possiblity of scrolling. HTML: Top Button 1 Top Button 2 Top Button 3 Bottom Button 1 Bottom Button 2 Bottom Button 3 CSS .top-menu{width:100%;height:40px;} .bottom-menu{width:100%;height:40px;} .splashpage{height:100%;height:100%;} .the-rest-of-the-page{width:100%;} So the splash page should fix the screen apart from the top and bottom bar, then user can then scroll down and see the rest of the page. Below is an image to demonstrate what I mean.
has title: Auto scaling DIV element and taking into account header and footer until scroll
linked to: http://stackoverflow.com/q/11868474
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
score: 0
type: Question

http://stackoverflow.com/comment/42096707
comment on: http://stackoverflow.com/a/26756408
type: AnswerComment
score: 0
has text: That's perfect Arun..!
type: Comment

http://stackoverflow.com/comment/41970219
comment on: http://stackoverflow.com/q/26686030
score: 0
has text: In fact none of that code is required: http://stackoverflow.com/a/7414607/227176
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26714547
type: Question
tagged with: ngtable
has answer: http://stackoverflow.com/a/47302469
tagged with: html-table
answer count: 2
has title: Adding dynamic row to ngTable not displaying
upvote count: 1
tagged with: javascript
favorite count: 0
has body: I have created an application with ngTable using grouping functionality, The application is working fine but the problem is that when I add dynamic data (rows) to the table, its not reflecting dynamically, unless or otherwise when we click the table title for sorting or when we click the pagination I have recreated the problem within a plunker, there you can find a button, when clicked one Dynamic row is added but not reflecting within the table PLUNKER Add Datas {{ group.value }} {{user.name}} {{user.age}} add function $scope.addDynamicDatas = function() { $scope.myDataOne.push({name: "Abcd", age: 10, role: 'Administrator'}); } Can anyone please tell me some solution for this?
tagged with: angularjs
has answer: http://stackoverflow.com/a/26714926
accepted answer: http://stackoverflow.com/a/26714926
possible better answer: http://stackoverflow.com/a/47302469
type: AnsweredQuestion
tagged with: dynamic
downvote count: 0
score: 1

http://stackoverflow.com/a/26756857
type: Answer
upvote count: 0
answers question: http://stackoverflow.com/q/26756672
downvote count: 1
has body: on php file if u found data acc to ur parameter than it ok if there is no data acc to ur parameter than this time u can call its an error so in thsi case echo "error"; and on ajax page check for result if its value is error then do what else u want success: function(result, success) { $("#city").val(result.place_name); $("#state_code").val(result.state_code); }
score: -1

http://stackoverflow.com/comment/42071153
has text: That would work of course but I am trying to achieve that type of function, thanks.
score: 0
comment on: http://stackoverflow.com/q/26742456
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42156576
score: 1
comment on: http://stackoverflow.com/q/26790273
has text: `$(...)` does not return an array, it returns a jquery object. It does so so that you were able to run some other functions over a matched collection. And it does not make much sense to make an exception for when 1 element is returned, since it's not different from where 0 or 42 elements returned instead.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26712363
answer count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
downvote count: 0
has title: jquery flexgrid callback functions
has body: I have function like this $j("#flex_home").flexigrid({ url: '{{ URL::to("homelistdata") }}', dataType: 'json', colModel : [ {display: val, width : 15, align: 'center', type_chk:1, hide: false, fixCol:true}, {display: 'Options', name : 'OrderNo', width : 50, sortable : true, align: 'left'}], sortname: "OrderNo", sortorder: "asc", usepager: true, title: 'PI/PO List', onSuccess : initialize_home, useRp: true, rp: 30, /*showTableToggleBtn: true,*/ }); On success working when the data is not empty. if the data is empty.What is the callback function ? any help really appericate
favorite count: 0
type: UnansweredQuestion
tagged with: flexigrid

http://stackoverflow.com/comment/42059388
type: Comment
type: QuestionComment
has text: Can't see so much code...What have you tried so far ?
comment on: http://stackoverflow.com/q/26736547
score: 0

http://stackoverflow.com/comment/42151839
score: 0
comment on: http://stackoverflow.com/a/26783113
type: Comment
has text: It happens *once* on every key press. It will not in either case provide a material difference in user experience, is my point, so that's why you should not worry about if it's faster in this case. Premature optimization is the root of all evil, as they say. Unless you have a specific scenario where performance is a problem, and you've done performance testing that shows this is a problem, do not worry about optimization. Make readability and maintainability your primary concern.
type: AnswerComment

http://stackoverflow.com/comment/42212123
type: Comment
type: QuestionComment
has text: @JonathanSampson my english not so good (as you can see), so maybe there is a misunderstanding. I mean, I think you are right about this is not a browser issue.
score: 1
comment on: http://stackoverflow.com/q/26820847

http://stackoverflow.com/q/26786500
has body: I have a question: I have an interactive map that I'm inheriting from another developer who's left the project half finished. There are two maps, one for World and one for the US. He had the US finished, so to make the world map work, I copied the JS and created a new instance where I replaced the IDs from US to WORLD. This works great! Only problem is that it disables the US function. Any ideas why? Here's the US map code: Here's the WORLD JS Code: And finally, this is the test site so that you can really dig into the code if you need to: http://vbfa.bwpcommunications.com Thanks for your help! Shadna
type: Question
tagged with: javascript
upvote count: 1
downvote count: 0
favorite count: 0
tagged with: rollovers
type: UnansweredQuestion
tagged with: maps
tagged with: css
tagged with: conflict
answer count: 0
score: 1
has title: Duplicate JS Code Overrides Map Hover Effect

http://stackoverflow.com/comment/41982360
has text: Nope :/ still not working properly
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26689927

http://stackoverflow.com/a/27301632
answers question: http://stackoverflow.com/q/26814434
type: Answer
score: 3
upvote count: 3
has body: As per my opinion @readonly is best in this case. whether it modified internally, it will be read only for external user.
downvote count: 0

http://stackoverflow.com/q/26802675
has comment: http://stackoverflow.com/comment/42182344
has comment: http://stackoverflow.com/comment/42182236
tagged with: angular-ui-router
has comment: http://stackoverflow.com/comment/42181357
tagged with: javascript
type: UnansweredQuestion
has title: Issue when refreshing page - Incorrect state
has comment: http://stackoverflow.com/comment/42181094
score: 2
answer count: 0
downvote count: 0
favorite count: 0
has body: Whenever I reload the browser when in my angular application, I lose the current state of the application. I am generating my routes dynamically based on information I get from a WebApi controller, so it would be pretty complicated to look at, but I can post it if need be. Basically whenever I refresh the page and setup my states/urls again, this output the current state. console.log($state.current); This results in this: Object {name: "", url: "^", views: null, abstract: true} which is not a state I am setting up. I can't reproduce this in a smaller website, so a plunkr wouldnt likely reproduce the issue, I am just wondering if anyone has ever seen this phantom state and what causes it? Edit: Also note that the $stateChangeStart does not fire on page refresh.
tagged with: angularjs
type: Question
upvote count: 2

http://stackoverflow.com/q/26803596
answer count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42180827
has body: I have a big problem and I hope I will find the solution here. After 4 days of useless search I come here to ask for a solution. Here is my problem. I use a SQL Server database and php as server side language with AJAX to send the params to the php server. My web app must display a list of some data if user input some date range. Here my html form code : Here is my javascript function LoadData() Here is my php script if(isset($_POST['date1']) && isset($_POST['date2']) ) { $date1 = $_POST["date1"]; $date2 = $_POST["date2"]; $db_name = "DATABASE"; $hostname = 'IO-SD-L1'; $username = ''; $password = ''; // connect to the database $dbh = new PDO( "sqlsrv:Server= $hostname ; Database = $db_name ", $username, $password); $sql = "SELECT name, CAST( DateReg AS DATE ) AS dateIn, price FROM TBL_USERS WHERE CAST( DateReg AS DATE )BETWEEN '".$date1."'AND '".$date2."'"; // the DateReg is datetime type $stmt = $dbh->prepare( $sql ); $stmt->execute(); $result = $stmt->fetchAll( PDO::FETCH_ASSOC ); foreach ($result as $row){ $return[]=array('Name'=>$row['name'], 'Date'=>$row['dateIn'], 'Price'=>$row['price']); } $dbh = null; echo json_encode($return); } If I put the date range directly in the code like date1="12/12/2011" ; date2="11/12/2014" it works perfectly but if I chose the date range by user input in the two date textfield and click on the Show data button, I don't get anything.
tagged with: php
has answer: http://stackoverflow.com/a/26803958
has comment: http://stackoverflow.com/comment/42180622
type: Question
has answer: http://stackoverflow.com/a/53554334
has comment: http://stackoverflow.com/comment/42180594
tagged with: javascript
linked to: http://stackoverflow.com/q/18701282
has title: PHP AJAX datetime range probleme on SQL Query
has comment: http://stackoverflow.com/comment/42180894
tagged with: ajax
tagged with: sql-server
score: 0
has answer: http://stackoverflow.com/a/26804029
has comment: http://stackoverflow.com/comment/42180441
tagged with: datetime
has answer: http://stackoverflow.com/a/26803762
has answer: http://stackoverflow.com/a/26860403

http://stackoverflow.com/a/26761882
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26761236
upvote count: 1
has body: Your double-quotes are a problem -- the fastest fix is to use single-quotes around your string. Additionally, using the innerHTML method on the body element will actually remove the entire contents of the body and replace it with your new elements. If you just want to append (add to) the body, use the insertAdjacentHTML method instead. document.body.insertAdjacentHTML('beforeend',' ')
type: Answer

http://stackoverflow.com/comment/42161530
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26793066
has text: If it compiles then that can't be the actual data returned by your API. As I said that isn't even valid Javascript.
score: 0

http://stackoverflow.com/q/26713011
has comment: http://stackoverflow.com/comment/42017019
has title: rails asset-url from javascript css
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26713617
tagged with: assets
favorite count: 0
has answer: http://stackoverflow.com/a/26713674
has answer: http://stackoverflow.com/a/26713617
type: Question
tagged with: helper
accepted answer: http://stackoverflow.com/a/26713674
has comment: http://stackoverflow.com/comment/42017169
tagged with: asset-pipeline
upvote count: 2
answer count: 2
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/42017258
has body: I have an external javascript plugin and there is a lot of code like this where the image src attribute is built dynamically. $prod.append("&lt;img class='fx_shadow' id='shd_" + i + "' + src='" + folderAssets + "/shadow_fx.png' /&gt;"); With rails 4.1+, I am precompiling the related images and assets that this external code provides and references above. Naturally, the images fail to load in production because using direct src attributes doesn't capture the fingerprint of the digested and precompiled image. How do I call the asset_url method (which does output the correct asset file name with the digest) properly from an external javascript file rather than a css file? (This javascript is not a restful template js.erb file, but rather, a js file included in the manifest.) Also, is there an elegant way to approach and refactor this?
has comment: http://stackoverflow.com/comment/42017133

http://stackoverflow.com/a/26680588
has body: If you absolutely must keep the button tag, you could add an onclick event like so: Lorem Ipsum However, a (IMHO) cleaner approach would be to wrap a submit button in a form with an action of the target URL:
downvote count: 0
has comment: http://stackoverflow.com/comment/41965137
has comment: http://stackoverflow.com/comment/41963677
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26680495

http://stackoverflow.com/q/26756989
tagged with: javascript
has answer: http://stackoverflow.com/a/26757244
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/26757364
tagged with: angularjs
duplicate of: http://stackoverflow.com/q/283956
has answer: http://stackoverflow.com/a/26757364
has title: How to change filename and extension while downloading a text file from data uri
linked to: http://stackoverflow.com/q/283956
possible better answer: http://stackoverflow.com/a/26757244
type: AnsweredQuestion
has body: When i download a data uri(this works in chrome/FF),using url1 = "data:attachment/plain;base64,encodeuri(&lt;base64data-xyz&gt;)" Here using attachment mime type forces it to download, using any other mime type like(text/html) will open the content of file in new tab, since i wanted to download ,i used attachment/plain-xyz [MIME type]. I tried the download attribute, but everytime,the file name downloaded is "download", and there is no extension, so it gets appeneded in my downloads folder as ".FILE", whereas i need to store it using "variable.txt" Please do guide me how you are able to change "download.FILE" to some "variable.txt", i have tried all attributes of data, download, data-downloadurl, contentdisposition,even tried setting pom attributes etc.. Please help in converting the downloaded file content to a file with some filename and .txt as extension
type: Question

http://stackoverflow.com/comment/42055884
comment on: http://stackoverflow.com/q/26733688
has text: Problem pops when trying to move between routs. when the iframe exists I get the above mentioned error, when ifram is deleted evrything works as expected. Even if the iframe is in the second format - when no Handlebar code is inserted in the tag... that's the problem nothing else.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26785434
has title: Check if a Typescript class has already been instantiated
type: Question
has comment: http://stackoverflow.com/comment/42147989
type: AnsweredQuestion
tagged with: typescript
has answer: http://stackoverflow.com/a/26785507
has answer: http://stackoverflow.com/a/26785774
tagged with: javascript
tagged with: prototype
tagged with: class
has body: I'm almost new to Typescript (and also to OOP) and I have a module like the following: module SIMULATOR { export class myClass extends myBaseClass{ constructor(){ //Make a div and append it to body } } } Than i have an element with onClick function that call myClass like this: $(button).on('click', ()=&gt; { if(//class hasn't been instantiated yet){ var myDiv = new SIMULATOR.myClass(); } else{ //do other stuff (eg: delete myClass instance) } }); My first goal is to understand how i can check if myClass has been already instantiated. Later i will destroy the created div with jquery and i would like to know how to "destroy" myClass instance too. I apologize if the questions may seem silly: I'm a beginner :)
score: 0
has answer: http://stackoverflow.com/a/68791946
tagged with: jquery
possible better answer: http://stackoverflow.com/a/68791946
has answer: http://stackoverflow.com/a/26786014
answer count: 4
accepted answer: http://stackoverflow.com/a/26786014
has comment: http://stackoverflow.com/comment/42148339

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

sharepointdocumentlibrary
tag name: sharepointdocumentlibrary
tags question: http://stackoverflow.com/q/26730991
type: Tag

http://stackoverflow.com/q/26789640
has comment: http://stackoverflow.com/comment/42182172
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42157340
has body: I am trying to figure a way to have my angular app use two modules. The main idea would be to separate login and the rest of the app. For that I need to override the module configuration. I simply don't want the user to be able to jump the login over to the normal app. I am using angular.bootstrap following Working with two modules in AngularJS angular.bootstrap(document.getElementById('app'), ['app']); This is how far I have come so far with the two modules. http://plnkr.co/edit/Euz6fK Can someone help me?
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42259540
has title: AngularJs two ng-app module webpage
score: 0
tagged with: module
linked to: http://stackoverflow.com/q/24522700
tagged with: angularjs
answer count: 0

http://stackoverflow.com/comment/42058332
comment on: http://stackoverflow.com/q/26736002
type: Comment
has text: http://mattbailey.io/a-beginners-guide-to-grunt/
score: 0
type: QuestionComment

http://stackoverflow.com/a/26779490
score: 2
answers question: http://stackoverflow.com/q/26779257
upvote count: 2
has comment: http://stackoverflow.com/comment/42137886
accepted answer of: http://stackoverflow.com/q/26779257
has comment: http://stackoverflow.com/comment/42137280
has comment: http://stackoverflow.com/comment/42137857
type: AcceptedAnswer
downvote count: 0
has body: If you want to replace all sources dynamicall without changing the file extension you can do this: $(document).ready(function () { changeVideoTo("fragmenten/real_schade2"); }); function changeVideoTo(name) { $("#video source").each(function () { var oldSource = $(this).attr("src"); var fileExtension = oldSource.split(".")[1] $(this).attr("src", name + "." + fileExtension); }); } Fiddle: http://jsfiddle.net/beznbxqc/2/
has comment: http://stackoverflow.com/comment/42137982
type: Answer

http://stackoverflow.com/q/26791027
has answer: http://stackoverflow.com/a/26791506
score: 2
type: AnsweredQuestion
downvote count: 0
has body: I have the following variable: scope.availabilities = [ { date : "2014-10-01 07:00:00", intervals : [...] }, { date : "2014-10-02 07:00:00", intervals : [...] }, ... ] I have a date picker, and you can select to see each month. Let's call this scope.month. Currently, I save this as an array of scope.month = [year, month], for instance scope.month = [2014, 10] because I want to be able to display each month's availabilities. Now, I want use ng-repeat, but filter these availabilities based on their date and only show the selected month. The only way I can think of doing this is to have my own custom filter, i.e. &lt;div ng-repeat="availability in availabilities | filterByDate:month"&gt; And then have my filter defined as: app.filter('filterByDate', function() { return function(availabilities, month) { // Here do the filtering, for instance, using underscore _.filter } }); But is there a way I could do this natively using AnuglarJS built in filters?
type: Question
has comment: http://stackoverflow.com/comment/42158303
tagged with: date
has title: Filter ng-repeat by date month and year
upvote count: 2
has comment: http://stackoverflow.com/comment/42158538
answer count: 1
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/26791506
tagged with: angularjs

http://stackoverflow.com/comment/41997292
type: Comment
type: QuestionComment
score: 4
comment on: http://stackoverflow.com/q/26701933
has text: You need to give us more concrete details and specific description of your problem. Did you see any error messages in your browser's console? Did you [check the project for known issues](https://github.com/mattdiamond/Recorderjs/issues)? It is difficult for us to help when your question is, in essence, "I don't have a code and I have a problem but it's not working".

http://stackoverflow.com/q/26733936
tagged with: http://stackoverflow.com/tag/html
score: 0
answer count: 2
has body: I'm trying to only allow the user to submit the form when the validation has returned true and they have dragged the images into the correct order. Currently, I have the form input elements working but there seems to be a bug where the user can still submit the form even if the images are in the wrong order. I have two submit buttons one which re-orders all the images in the array and one that I want to validate if all the data is correct. I currently have the onclick button on the submit button to onclick="return valid();. I'm not sure what I'm doing wrong. I think it might be something with two submit buttons? Can someone please help. I'm new to JavaScript and jQuery. HTML: Name : Address : email : JavaScript: $(window).load(function () { $(function () { $("#sortable").sortable({ placeholder: "ui-state-highlight", cursor: 'crosshair', update: function (event, ui) { var order = $("#sortable").sortable("toArray"); order = JSON.stringify(order); console.log(order); correct = JSON.stringify(["4", "3", "2", "1"]); if (order == correct) { valid = true; } } }); $("#sortable").disableSelection(); $('#submit').on('click', function () { var valid = true, message = ''; $('form input').each(function () { var $this = $(this); if (!$this.val()) { var inputName = $this.attr('name'); valid = false; message += 'Please enter your ' + inputName + '\n'; } }); if (!valid) { alert(message); console.log("not valid"); } else { //window.location.href = "http://stackoverflow.com"; console.log("valid"); } return false; }); }); });
has answer: http://stackoverflow.com/a/26734832
type: UnansweredQuestion
tagged with: validation
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26749615
has title: Trying to get form validation working with jQueryUI image array
type: Question

http://stackoverflow.com/comment/42062898
has text: What line of code gives you that error?
comment on: http://stackoverflow.com/q/26738522
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/a/26678551
has comment: http://stackoverflow.com/comment/41956929
type: Answer
answers question: http://stackoverflow.com/q/26678345
score: 0
has comment: http://stackoverflow.com/comment/41956275
has comment: http://stackoverflow.com/comment/41956311
has body: You can use offsetHeight to get the height of the element. In your case, you can check the height of the div in your ajax request and then use scrollBy, like this xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState != 4) return if (xmlhttp.status == 200) { //do some stuff you need var scroll_value = document.getElementById('div_that_loaded').offsetHeight(); window.scrollBy(0,scroll_value); } }
has comment: http://stackoverflow.com/comment/41956648
has comment: http://stackoverflow.com/comment/41956507
has comment: http://stackoverflow.com/comment/41956381
has comment: http://stackoverflow.com/comment/41956526

http://stackoverflow.com/a/26804727
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42182714
type: Answer
answers question: http://stackoverflow.com/q/26804672
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26804672
has body: You have to use $apply because the call doesn't come from inside of angular.js function please(){ $scope.$apply(function() { $scope.myVar = "New Value"; }); } Further reading here.
has comment: http://stackoverflow.com/comment/42182650

http://stackoverflow.com/comment/42088889
has text: Are you loading jquery-form plugin on page load or on every ajax call which load page content? And can you show me your ajax form submit code? And may be your ajax form submit is not working becuase of this error which causing to stop further javascript execution. Where is that error comming from? Is that from plugin or from your index page? I think if you sort out "undefined is not a function" problem, then your ajax form submit will also work.
type: Comment
comment on: http://stackoverflow.com/a/26718049
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42079561
has text: You HTML is broken. You are missing a closing ` ` for `.goal_left_box` and for ` Maintain Weight ` you use a closing ` ` to start the block. This is probably causing Jquery to not be a be able to find the element you want correctly.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26747272

http://stackoverflow.com/a/26828608
accepted answer of: http://stackoverflow.com/q/26828563
upvote count: 22
has body: You typed incorrect method name. Change $locationProvider.html5mode(true); to $locationProvider.html5Mode(true); with M uppercase in word mode.
answers question: http://stackoverflow.com/q/26828563
type: AcceptedAnswer
downvote count: 0
score: 22
has comment: http://stackoverflow.com/comment/42224822
type: Answer
has comment: http://stackoverflow.com/comment/42224803

http://stackoverflow.com/comment/42118490
has text: Try adding an image outside of the slider, it's most likely that the slider is causing a conflict somehow.
score: 0
comment on: http://stackoverflow.com/q/26768601
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26724165
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26724548
has title: IE9 window.open problems
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26724548
tagged with: internet-explorer
has body: I am not sure what is going on but IE's window.open works horribly! I have a piece of javascript code that gets called from an angular controller that opens a second window (within same domain, popup blocked turned off) and tries to call a javascript method on that second window. My code: var newWindow = $window.open('somefile.html?' + Math.random(1000)); var fn = function () { //alert('I got called'); newWindow.display($scope.mymsg); } if (newWindow.addEventListener) newWindow.addEventListener("load", fn, false); else if (newWindow.attachEvent) newWindow.attachEvent("onload", fn); else newWindow.onload = fn; I need to support IE8 and IE9. I fiddled around with the code and got it work on IE8, but I cant get it to work on IE9. If I uncomment the alert, in IE9, i never see this. I have no idea why, since i am attaching the onload handler correctly. I am suspecting there is some sort of race condition, but if that was the case, I would have problems in the new window's display(), but it does not even get there because onload does not get called. UPDATE: So playing around with wrapping newly created window with jQuery helped a lot: var newWindow = $window.open('somefile.html?z=' + Math.random(1000)); $(newWindow).load(function () { this.display($scope.mymsg); }); Also I added the dummy "z" param which I missed earlier. I almost have it working. Right now it seems like when you open this page for the first time, and quickly click the button to open second window, the second window opens up blank in IE8 (where it should have some messaged that were passed to it). But if you open the page and wait a couple of seconds the second window opens correctly displaying the passed in message. I also added a $(document).ready() in the second window's display() method. Another thing I did not mention before, but I think might have something to do with this, is that the whole mechanism which opens this window is wrapped inside a $q.all(). This is because before I open second window i…
tagged with: internet-explorer-8
tagged with: internet-explorer-9
type: Question

date
tags question: http://stackoverflow.com/q/26676380
tags question: http://stackoverflow.com/q/26801286
tag name: date
tags question: http://stackoverflow.com/q/26753824
tags question: http://stackoverflow.com/q/26696225
tags question: http://stackoverflow.com/q/26674499
tags question: http://stackoverflow.com/q/26807193
tags question: http://stackoverflow.com/q/26743356
tags question: http://stackoverflow.com/q/26711365
tags question: http://stackoverflow.com/q/26681307
tags question: http://stackoverflow.com/q/26709381
tags question: http://stackoverflow.com/q/26676184
tags question: http://stackoverflow.com/q/26782917
tags question: http://stackoverflow.com/q/26806443
tags question: http://stackoverflow.com/q/26685677
tags question: http://stackoverflow.com/q/26825433
tags question: http://stackoverflow.com/q/26681625
tags question: http://stackoverflow.com/q/26741177
type: Tag
tags question: http://stackoverflow.com/q/26791027
tags question: http://stackoverflow.com/q/26817225
tags question: http://stackoverflow.com/q/26696891
tags question: http://stackoverflow.com/q/26735520
tags question: http://stackoverflow.com/q/26716293
tags question: http://stackoverflow.com/q/26698999
tags question: http://stackoverflow.com/q/26699465
tags question: http://stackoverflow.com/q/26830658
tags question: http://stackoverflow.com/q/26779678
tags question: http://stackoverflow.com/q/26755459
tags question: http://stackoverflow.com/q/26701482
tags question: http://stackoverflow.com/q/26737103
tags question: http://stackoverflow.com/q/26749822
tags question: http://stackoverflow.com/q/26735854

http://stackoverflow.com/a/26809328
has comment: http://stackoverflow.com/comment/42195117
upvote count: 2
has comment: http://stackoverflow.com/comment/42266855
has comment: http://stackoverflow.com/comment/42193710
has comment: http://stackoverflow.com/comment/42198073
has body: I recommend this regex in a replace function to add commas in. Like this: endBalance = P.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",")
type: Answer
has comment: http://stackoverflow.com/comment/42193377
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42194447
has comment: http://stackoverflow.com/comment/42191399
has comment: http://stackoverflow.com/comment/42191462
has comment: http://stackoverflow.com/comment/42301119
answers question: http://stackoverflow.com/q/26809232

http://stackoverflow.com/q/26690022
has body: I need help.I work in a project for my new website,it's 1 page with scrollable images,a parallax site.The problem is when I click on a link like about,albums,contact,etc... it's ok,the page go to the about section or the contact section,but instantly,not with scroll.I tried different JQuery plugins,like scrollTo.js,stellar.js but id didn't works.Can you help me guys ? I put the folder that contains the index.html,style.css and the scripts and the images here: https://www.mediafire.com/folder/qne9srlc76xxa/Parallax_website Please take a look at the code and give me a solution.I just want to know how can I go to a section, to a div, when I click on the link menu with scroll,now directly. Thanks guys. Hope you can help me !
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/41976865
has answer: http://stackoverflow.com/a/26690051
upvote count: 0
score: -2
answer count: 1
has title: Page scrolling doesn't work
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26733664
has title: $state.go doesn’t redirect to given path
linked to: http://stackoverflow.com/q/21105528
has answer: http://stackoverflow.com/a/26734574
tagged with: angularjs
type: UnansweredQuestion
answer count: 4
has answer: http://stackoverflow.com/a/26733949
score: 0
tagged with: states
has body: i've got a view that's outside of my tabs, now when i try to redirect from that view to a tab i get redirected to the wrong tab. i've made a codepen to show you what i mean since i don't really know how to explain it well see the logs i create in the console .controller('MyCtrl', function($scope, $state, $rootScope, $ionicPlatform) { $rootScope.$on('$stateChangeStart',function(event, toState, toParams, fromState, fromParams){ // do something $scope.from = fromState; console.log(fromState); }) $scope.goBack = function(){ console.log($scope.from.name); $state.go($scope.from.name); } }) Codepen
type: Question
tagged with: angular-ui-router
has answer: http://stackoverflow.com/a/26734684
tagged with: javascript
tagged with: ionic-framework
has answer: http://stackoverflow.com/a/26733996

http://stackoverflow.com/q/26813796
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has body: I have a textbox to select Date and there is one action link in the razor page to redirect to another page with date value as one of the parameter. Is there any way to dynamically change the value of actionlink whenever a user change the date. My Razor view is like &lt;div class="col-md-4"&gt; @Html.TextBoxFor(model =&gt; model.Date, new { @class = "datepicker form-control" }) @Html.ValidationMessageFor(model =&gt; model.Date) &lt;/div&gt; @Html.ActionLink("Mark Attendance", "Add", "Attendance", new { @id = @model.ClassId }, new { @class = " btn btn-primary"}) And in Javascript i have been able to do $("#Date").datepicker({ showOn: 'both', altFormat: 'MM-dd-yy', dateFormat: 'MM-dd-yy', changeMonth: true, changeYear: true, yearRange: "1900:2050" }) .change(dateChanged) .on('changeDate', dateChanged); function dateChanged(ev) { //How can i change the action link in a way that add an extra param date with selected value ? } Is there any way to do it?
tagged with: razor
has comment: http://stackoverflow.com/comment/42199611
type: Question
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
score: 4
has title: Change Actionlink parameter from Javascript
upvote count: 4
has comment: http://stackoverflow.com/comment/42199317
answer count: 2
has answer: http://stackoverflow.com/a/26814211
has answer: http://stackoverflow.com/a/26814067

http://stackoverflow.com/comment/41968063
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26684946
score: 0
has text: Oh, now I see what you mean. Sorry, I have removed the slashes from thisMatch.

http://stackoverflow.com/q/26685093
type: Question
tagged with: javascript
has title: Jquery Slide messing up other div's
has answer: http://stackoverflow.com/a/26685106
score: 0
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26685106
tagged with: css
type: AnsweredQuestion
has body: I have a sight problem with jquery slide at the moment I have atached a code snippet that will show you the problem Right now when I click the wrapper3head to drop down the wrapper 3 information it push 3 of the pad shapes down My problem is that the 2 wrappers are now where near the pad but it still pushes them down I am looking for help to get the 3 pad shapes to stay when I click the wrapper3head if you run the snippet you will see what I mean just click the choose memory style div $(document).ready(function(){ $("#wrapper3head").click(function(){ $("#wrapper3").slideToggle("fast"); }); }); $(document).ready(function(){ $("#Informationhead").click(function(){ $("#Information").slideToggle("fast"); }); }); .wrapper { position: relative; width: 1000px; margin: 0 auto; border: 5px groove #8E2B2B; border-radius: 15px; } .wrapper2{ position: relative; width: 652px; margin: 0 auto; border: 5px groove #8E2B2B; border-radius: 15px; } .wrapper3head{ position: relative; width: 200px; margin: 0 auto; border: 5px groove #8E2B2B; border-radius: 15px; text-align:center; float:right; margin-right:1%; } .wrapper3{ position: relative; width: 185px; margin: 0 auto; display:none; border: 5px groove #8E2B2B; text-align:center; float:right; margin-right:1%; } .Informationhead{ position: relative; width: 652px; margin: 0 auto; border: 5px groove #8E2B2B; border-radius: 15px; text-align:center; } .Information{ position: relative; width: 635px; margin: 0 auto; display:none; border: 5px groove #8E2B2B; text-align:center; } .back { position: relative; width: 648px; height: 648px; z-index: 0; background-color: #000; border:3.5px ridge white; border-radius: 310px; } .pad { width: 300px; height: 300px; float: left; z-index: 1; margin: 10px; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; filter: alpha(opacity=60); opacity: 0.6; } .shape1 { border-top-left-radius: 300px; background-color: green; border:2.5px groove white; } .shape2 { float: left; border-top-right-radius: 30…

http://stackoverflow.com/comment/42030034
type: AnswerComment
comment on: http://stackoverflow.com/a/26678643
score: 0
has text: I attempted that but it didn't seem to work.. Any chance you can demonstrate with psuedo code or with the jsfiddle please?
type: Comment

http://stackoverflow.com/q/26733887
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26760400
has comment: http://stackoverflow.com/comment/42055329
answer count: 2
downvote count: 0
has title: ng-click in slickgrid formatter doesn't work
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26734261
favorite count: 0
has comment: http://stackoverflow.com/comment/42054545
linked to: http://stackoverflow.com/q/18392151
tagged with: slickgrid
has body: I'm a newbie in angularJS I use angularJS with ui-router and a slickgrid I try to call a method from a click on a image to call a web service and delete the row I have this controller : app.controller('customerController', ['$scope', '$compile', 'CustomerService', function ($scope, $compile, CustomerService) { // function to get customers $scope.getCustomers = function () { CustomerService.getCustomers($("#userId").val(), $scope.getArchived).then(function (customers) { dataView.beginUpdate(); dataView.setItems(customers); dataView.endUpdate(); grid.invalidate(); }, function (reason) { noty({ text: reason, type: 'error' }); }); } // function to archive customer $scope.archiveCustomer = function(customerId) { if (confirm(translate("LBL_DELETE_CUSTOMER_CONFIRMATION"))) { CustomerService.archiveCustomer(customerId).then(function () { $scope.getCustomers(); }, function (reason) { noty({ text: reason, type: 'error' }); }); } return false; } // create grid var dataView, grid; var options = { enableCellNavigation: true, enableColumnReorder: false, autoHeight: true }; var columns = [ { id: "id", name: "", field: "id", width: 20, formatter: deleteFormatter, cssClass: "centeredColumn" }, { id: "customer", name: translate("Customer"), field: "customer", width: 250 } ]; function deleteFormatter(row, cell, value, columnDef, dataContext) { html = "&lt;img src='images/delete.gif' alt='" + translate("LBL_DELETE_CUSTOMER") + "' style='cursor:pointer;' ng-click='archiveCustomer(" + dataContext.id + ");' /&gt;"; linker = $compile(angular.element(html)); htmlElements = linker($scope); html = htmlElements[0].outerHTML; return html; } dataView = new Slick.Data.DataView({ inlineFilters: true }); grid = new Slick.Grid("#customersGrid", dataView, columns, options); $scope.getCustomers(); }]); My problem is with the ng-click on the img element added by the deleteFormatter. What is wrong? I saw sample with directive but it's not clear in my mind... could you light me? Edit Try with asyncPostRe…
has comment: http://stackoverflow.com/comment/42056218
tagged with: angularjs
upvote count: 1
has answer: http://stackoverflow.com/a/26734261
accepted answer: http://stackoverflow.com/a/26760400
type: Question

http://stackoverflow.com/comment/42133820
type: Comment
comment on: http://stackoverflow.com/q/26776614
has text: @Joe-Nop,Im using handlebars...this will generate an html file...
score: 0
type: QuestionComment

http://stackoverflow.com/a/26763015
has body: Try var colors = ["lightblue", "lightgreen"] , elem = $("table tr td"); elem.map(function(i, el) { $(el).is(":even") ? elem.slice(i, i + 2) .css("backgroundColor", colors[0]) && colors.reverse() : null }) var colors = ["lightblue", "lightgreen"] , elem = $("table tr td"); elem.map(function(i, el) { $(el).is(":even") ? elem.slice(i, i + 2) .css("backgroundColor", colors[0]) && colors.reverse() : null }) FIRST BGCOLOR FIRST BGCOLOR SECOND BGCOLOR SECOND BGCOLOR FIRST BGCOLOR FIRST BGCOLOR SECOND BGCOLOR SECOND BGCOLOR
has comment: http://stackoverflow.com/comment/66626668
has comment: http://stackoverflow.com/comment/42108834
answers question: http://stackoverflow.com/q/26760691
has comment: http://stackoverflow.com/comment/66630139
score: 0
type: Answer

http://stackoverflow.com/comment/41993300
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26699629
has text: Is your server action returning an error in some cases?
score: 0

http://stackoverflow.com/a/26704944
has body: You can do it like this: $('.fade').each(function () { /* Check the location of each desired element */ var objectBottom = $(this).offset().top + $(this).outerHeight(); var windowBottom = $(window).scrollTop() + $(window).innerHeight(); var opacityPercentage = parseInt($(this).css("opacity") * 100); /* If the object is completely visible in the window, fade it in */ if (objectBottom &lt; windowBottom) { //object comes into view (scrolling down) if (opacityPercentage == 30) { $(this).fadeTo(500, 1); } } else { //object goes out of view (scrolling up) if (opacityPercentage == 100) { $(this).fadeTo(500, 0.3); } } });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26704637

http://stackoverflow.com/q/26717689
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/26731561
tagged with: javascript
has answer: http://stackoverflow.com/a/26718375
answer count: 2
downvote count: 0
score: 7
has title: Pass ng-model attribute to custom directive
possible better answer: http://stackoverflow.com/a/26718375
favorite count: 0
accepted answer: http://stackoverflow.com/a/26731561
tagged with: angularjs
linked to: http://stackoverflow.com/q/20828046
type: AnsweredQuestion
has body: So, I have a form, where I need to use a custom directive. What i need: pass the user model to the directive. &lt;form&gt; &lt;input type="text" ng-model="user.login"&gt; &lt;input type="password" ng-model="user.password"&gt; &lt;span ng-custom-directive ng-model="user.testfield"&gt;&lt;/span&gt; &lt;/form&gt; Directive template looks like this: &lt;span&gt;&lt;input type="checkbox" ng-model="[HERE I NEED user.testfield TO WORK WITH user]"&gt; &lt;/span&gt; How I can pass the user model to directive template? After form submit I need user.testfield to be avaliable in the $scope.user like: console.log($scope.user) { login: 'test', password: 'test', testfield: true|false }
upvote count: 7
type: Question

http://stackoverflow.com/comment/42331482
type: QuestionComment
has text: Did you try <link href="/assets/css/bootstrap.min.css" ... ?
score: 0
comment on: http://stackoverflow.com/q/26730663
type: Comment

http://stackoverflow.com/comment/48677905
comment on: http://stackoverflow.com/q/26780344
type: Comment
has text: @ToranBillups Really appreciate your effort in answering this. But unfortunately I am not working on this anymore. Thanks again
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42001943
has text: How does the title relate to the question?
comment on: http://stackoverflow.com/q/26704194
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42014844
has text: Check the other links on your page/form, add onclick="return false" to stop page reload/post.
score: 0
comment on: http://stackoverflow.com/q/26711810
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26828754
has comment: http://stackoverflow.com/comment/42224806
has body: I have a working code which changes the text of a button and panel if you click button 1, two or three. See this codepen: http://codepen.io/anon/pen/GgKOba I now want to use local-storage, in this way: when you first visit the page, the default text is displayed. When you have clicked button X, the button and panel text changes. The id is stored in local-storage. When you reload the page, it sees there's something in the local-storage and uses that to change the button and panel text. I tried it this way: http://codepen.io/anon/pen/JoPOQv That codepen contains this html: Panel Header default text default text Button 1 And this javascript: // if we have something on local storage if(localStorage.getItem('id')) { $("#panel p").html("This is info about stop " + this.id + "."); //then set this html text to the panel p $("#panel_button p").html("Info about stop " + this.id + "."); // and change the button text } $(document).on("ready", function () { $(".btn").on("click", function () { //if a button with class btn is clicked $("#panel p").html("This is info about stop " + this.id + "."); //then set this html text to the panel p $("#panel_button p").html("Info about stop " + this.id + "."); // and change the button text localStorage.setItem('id', this.id); //also add the last-clicked id to the local-storage }); }); As you can see I used an if-statement I found on google somewhere to check if the local-storage is empty, and if it is not execute some rules. But as you also can see it doesn't display the default text, neither does it read the local-storage correctly. What do I do wrong?
accepted answer: http://stackoverflow.com/a/26828926
has comment: http://stackoverflow.com/comment/42224879
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42224913
tagged with: jquery
has comment: http://stackoverflow.com/comment/42224931
type: Question
has comment: http://stackoverflow.com/comment/42224975
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26828926
score: 0
tagged with: local-storage
answer count: 1
has title: local-storage, the simple way
tagged with: javascript

http://stackoverflow.com/a/26688284
answers question: http://stackoverflow.com/q/26687498
has comment: http://stackoverflow.com/comment/41989879
type: Answer
has body: The following is the working simple example of adding text inputs according to selected option value (assuming it's an integer number): http://jsfiddle.net/45vsf519/2/ You didn't mention if you want it in vanilla JS so be it in jQuery for its simplicity. HTML 1 2 3 jQuery $(document).ready(function () { // Initiate default var example = $('#example'); var inputs = $('#inputs'); var optNum = parseInt(example.val()); for (var i = 1; i <= optNum; ++i) { inputs.append(' '); } // Adding text fields on select change example.change(function () { inputs.empty(); var optNum = parseInt($(this).val()); for (var i = 1; i <= optNum; ++i) { inputs.append(' '); } }); }); If you were checking with "Net" tab in Firebug or network tool in other browser, you would see that clicking on "Generate the code" leads to submitting a POST request to server. The HTML with its textarea filled by content is a response from the server. So you may generate this textarea server-side by submitting an HTTP request to some valid URI. This implies that the web server should resolve the URI to some server-side code (PHP or whatever it may be) for processing POST (or GET) parameters and generating HTML that the web server should send in its response to the browser. Or, if you don't want to process this action server-side (and, for example, log it in a database), you may generate this HTML with Javascript only. This implies that you have significantly more client-side Javascript logic, that may be relatively complex if you're not familiar with Single Page Application (SPA) techniques. IMHO, it's up to you to choose whether make it with requesting a server or pure client-side.
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26687498

http://stackoverflow.com/comment/42147972
type: AnswerComment
comment on: http://stackoverflow.com/a/26782985
type: Comment
has text: Updated answer to include the @
score: 0

http://stackoverflow.com/q/26751782
has comment: http://stackoverflow.com/comment/42087292
has body: Probably a relative simple question but I cant find an answer to it: Is it possible to fill a circle with a colour to an extent ( with a particular radius) ? Or have 2 border lines - one coloured and one white with a fill colour ? style="fill:steelblue; stroke-width: 2px; stroke: #8cc63f;" I'm looking to achieve something like this (or similar) in this fiddle:
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/42087141
has title: Svg Circle fill CSS
has answer: http://stackoverflow.com/a/26752511
type: Question
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/42212694
comment on: http://stackoverflow.com/a/26811896
type: Comment
type: AnswerComment
has text: I have done what you said and then in the js my function $scope.removeIngredientEdit = function ($index) { $scope.drinks[$index].ingredients.splice($index,1); console.log($index); }; But I doesn't always delete the correct one.
score: 0

http://stackoverflow.com/comment/42223203
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26812157
type: Comment
has text: Thank you for an answer I can learn from :) Regarding the XY problem, that was intentional. My question was indeed regarding the specific solution, and not about the original problem. I can re-arrange the data, but I wanted to learn from this how to better code using AngularFire.

http://stackoverflow.com/comment/50015285
has text: I see some downvotes on this answer guys, please leave a comment explaining why you think it is bad. Bearing in mind it is just a simplified version of the answer marked correct
comment on: http://stackoverflow.com/a/26694525
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26738061
has body: Ionic has a handy menu-toggle directive to use so you can toggle the menu on a button like this. http://ionicframework.com/docs/api/directive/menuToggle/ {{activeProject.title}}
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/42075977
answers question: http://stackoverflow.com/q/26736565
accepted answer of: http://stackoverflow.com/q/26736565
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47229814
has comment: http://stackoverflow.com/comment/42062746
upvote count: 3
has comment: http://stackoverflow.com/comment/47574943

http://stackoverflow.com/a/26723686
has body: Using the read only property. From http://www.w3schools.com/jsref/prop_text_readonly.asp : document.getElementById("myText").readOnly = true;
downvote count: 1
type: Answer
upvote count: 0
has comment: http://stackoverflow.com/comment/42039076
score: -1
answers question: http://stackoverflow.com/q/26723648

http://stackoverflow.com/comment/42097846
has text: don't add style use a class and define styles for different @media queries
score: 2
comment on: http://stackoverflow.com/q/26757807
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26718299
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26718109
accepted answer of: http://stackoverflow.com/q/26718109
upvote count: 2
type: AcceptedAnswer
has body: if(data.applications.indexOf(index.id){ // this is missing a parenthesis This line has the following actual behavior (thanks @Pointy for clarifying all the options) Not found (-1) = true First Element (0) = false Any other element (1 to n) = true From your question, your expected output is: Not found (-1) = false Found (0 to n) = true If you're attempting to use JS' 0 = false, anything else is true, then you can do: angular.forEach($scope.applicationsHere, function(index) { if(data.applications.indexOf(index.id) + 1) { index.selected = true; } }); Or, even shorter: angular.forEach($scope.applicationsHere, function(index) { index.selected = (data.applications.indexOf(index.id) + 1); }); That being said, I would still recommend doing an actual &gt;= 0 check for indexOf. Coercing like this causes confusion for other people reading the code since you're using an index for a boolean output. You can use a ternary operator if you're looking for compactness too. angular.forEach($scope.applicationsHere, function(index) { index.selected = data.applications.indexOf(index.id) &gt;= 0 ? true : false; });

http://stackoverflow.com/comment/42036498
comment on: http://stackoverflow.com/a/26685923
score: 0
type: AnswerComment
type: Comment
has text: @brenda Glad I could help! If this solved your problem, I'd appreciate if you clicked the little check mark to the right of my answer :)

http://stackoverflow.com/a/26732250
type: Answer
answers question: http://stackoverflow.com/q/26730296
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26730296
type: AcceptedAnswer
upvote count: 1
has body: So preventDestroy does not stop subViews within the region being destroyed just the actual region itself. Marionette by design trys to encourage the destruction of views and re initializing them so that clean up is all properly handled. One way round this though would be to listen to when view is being shown and then showing the sub app.listenTo(view1, "show", function () { view1.sub.show(subView) }); the only issue is that the sub view is still being destroyed so you could override the destroy method of the subView to not destroy the view, this gets a bit tricky to keep track off though as now you will have to manually ensure that the bindings are correctly applied/removed var SubView = Marionette.ItemView.extend({ template: _.template(' SubView '), destroy: function () { if (this.isDestroyed) { return; } var args = [].slice.call(arguments); this.triggerMethod.apply(this, ['before:destroy'].concat(args)); // mark as destroyed before doing the actual destroy, to // prevent infinite loops within "destroy" event handlers // that are trying to destroy other views this.isDestroyed = false; this.triggerMethod.apply(this, ['destroy'].concat(args)); // unbind UI elements????? well its not beng destoryed so probably don;t wantto do this //unless you manually handle rebind the events //this.unbindUIElements(); return this; } }); end result http://jsfiddle.net/ndr7262y/2/ but a better way here would be re iniatalize the sub view when view 1 is shown app.listenTo(view1, "show", function () { var subView = new SubView(); view1.sub.show(subView) }); and now you don;t have to worry about cleaning up or overriding the destroy method. http://jsfiddle.net/ndr7262y/4/

http://stackoverflow.com/q/26821321
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42240987
has body: I have a sub-menu on my Bootstrap-driven web page. In the Fiddle, if you click the first Bla, you will see a dropdown appear. Is it possible I could span the dropdown 100% width of my web page? Currently it's set to min-width: 700px. Here is my HTML: Toggle navigation Home Bla Bla Bla Bla Bla Bla Bla & CSS: html, body { height: 100%; /* The html and body elements cannot have any padding or margin. */ } /* Wrapper for page content to push down footer */ #wrap { margin: 0 auto; } /* ========================================================================== Author's custom styles ========================================================================== */ .navbar-inverse { text-transform: uppercase; border-top: 4px solid #C6252C; background-image: none; padding-top: 80px; } .navbar-inverse ul li ul { background-color: #C6252C; } .navbar-brand { color: white !important; } .navbar-inverse .navbar-nav>li>a { color: white; padding-bottom: 18px; } .yamm-content .navbar-nav>li>a{ padding-bottom: 5px; } .navbar-inverse .navbar-nav>li>a:hover { color: white; } .navbar-brand { padding: 7px; } .navbar-toggle { border: none; background-color: transparent !important; } .navbar-toggle:not(.collapsed) span.first { -ms-transform: rotate(45deg); /* IE 9 */ -webkit-transform: rotate(45deg); /* Chrome, Safari, Opera */ transform: rotate(45deg); top: 6px; position: relative; } .navbar-toggle:not(.collapsed) span.second { -ms-transform: rotate(-45deg); /* IE 9 */ -webkit-transform: rotate(-45deg); /* Chrome, Safari, Opera */ transform: rotate(-45deg); top: 0px; position: relative; } .navbar-toggle:not(.collapsed) span.third { display: none; } .yamm .nav, .yamm .dropup, .yamm .dropdown, .yamm .collapse { position: static; } .yamm .navbar-inner, .yamm .container { position: relative; } .yamm .dropdown-menu { left: auto; } .yamm .dropdown-menu > li { display: block; } .yamm .dropdown-submenu .dropdown-menu { left: 100%; } .yamm .nav.pull-right .dropdown-menu { right: 0; } .yamm .yamm-conten…
has comment: http://stackoverflow.com/comment/42212420
score: 1
has title: Set Bootstrap dropdown menu to 100% width of web page
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42212438
has comment: http://stackoverflow.com/comment/42212238
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion

http://stackoverflow.com/q/26823955
type: Question
has comment: http://stackoverflow.com/comment/42216972
tagged with: javascript
has comment: http://stackoverflow.com/comment/42217032
answer count: 3
upvote count: 1
possible better answer: http://stackoverflow.com/a/26824096
has title: Javascript function not changing HTML
favorite count: 0
has answer: http://stackoverflow.com/a/26824096
has answer: http://stackoverflow.com/a/26824014
accepted answer: http://stackoverflow.com/a/26824014
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26824121
has body: I am having difficulty with this script showing the yes or no permanently. Could anyone tell me why? Project Is it prime? This tool was designed to determine if a number is prime Basically I am trying to pass an entered value to my function isitprime() and then have text that says yes or no pop up.
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42216970

http://stackoverflow.com/q/26729776
upvote count: 13
tagged with: viewport
answer count: 1
tagged with: height
has title: How to toggle class after 100vh scroll
favorite count: 0
has answer: http://stackoverflow.com/a/26729887
accepted answer: http://stackoverflow.com/a/26729887
has body: How to make this function add the class after scrolling 100vh? Currently it adds the class after 850px. $("document").ready(function($){ var nav = $('#verschwinden'); $(window).scroll(function () { if ($(this).scrollTop() &gt; 850) { nav.addClass("doch"); } else { nav.removeClass("doch"); } }); });
score: 13
has comment: http://stackoverflow.com/comment/42047435
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42047498
tagged with: scroll
type: Question
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/26730020
score: 0
answers question: http://stackoverflow.com/q/26729782
type: Answer
has body: Remove Script tag from your demo and get Element using ID that solve your problem var levelselect; var operationselect; var num1; var num2; function start() { levelselect = document.getElementById("level").value; operationselect = document.getElementById("operation").value; alert(levelselect); alert(operationselect) } Untitled Document Choose your Level : 1 2 3 4 Choose your arithmetic operations : Addition Subtraction Division Multiplication

http://stackoverflow.com/a/26773919
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26773866
has body: instead of screen.width you need to use $(window).width(): DEMO $(".basecollections").each(function(){ var child_width = 100 / $(this).children().length; child_width = Math.floor(child_width); $(this).children().css("width", child_width + "%"); if ( $(window).width() &lt; 1000 ) { $(this).children().css('width','100%'); } }); also if you want the change to be dynamic, you need to write this piece of code inside the resize event of the window element: $(window).resize(function(){ $(".basecollections").each(function(){ var child_width = 100 / $(this).children().length; child_width = Math.floor(child_width); $(this).children().css("width", child_width + "%"); if ( $(window).width() &lt; 1000 ) { $(this).children().css('width','100%'); } }); });

http://stackoverflow.com/comment/42075119
has text: Are you wanting to slide the image with a fade out or just move the items within a large div?
comment on: http://stackoverflow.com/q/26744740
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42202737
type: Comment
type: QuestionComment
has text: Then I recommend you post one of your best efforts, or at least the last effort. Otherwise your post will be closed and down voted before you realizing it.
score: 0
comment on: http://stackoverflow.com/q/26815916

http://stackoverflow.com/q/26827989
has answer: http://stackoverflow.com/a/58964067
downvote count: 0
has title: Remove the first select option
has answer: http://stackoverflow.com/a/26827999
has answer: http://stackoverflow.com/a/55169163
favorite count: 0
accepted answer: http://stackoverflow.com/a/26827999
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/26828155
upvote count: 3
type: Question
has answer: http://stackoverflow.com/a/26828053
has comment: http://stackoverflow.com/comment/42223758
has answer: http://stackoverflow.com/a/67209110
has answer: http://stackoverflow.com/a/59157946
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26829097
has comment: http://stackoverflow.com/comment/42223716
has answer: http://stackoverflow.com/a/59157118
answer count: 11
has answer: http://stackoverflow.com/a/55579660
possible better answer: http://stackoverflow.com/a/26828058
has body: I'd like to remove the first option of an select tag when I click on the select tag. Is this possible? I don't want to see the first option after that click. Thanks for any help.
has answer: http://stackoverflow.com/a/26828058
has comment: http://stackoverflow.com/comment/42251896

http://stackoverflow.com/a/26730772
answers question: http://stackoverflow.com/q/26729639
score: 0
accepted answer of: http://stackoverflow.com/q/26729639
type: AcceptedAnswer
has body: document.frmReport returns undefined for me. Also, there's no official documentation about it, and it's not in the specs. So my guess is it's something that's added to the document object earlier in your application by someone else, and is being used now. Look for document.frmReport = something (probably an object) Do you understand why relying on eval and global variables is a bad practice now?
type: Answer

http://stackoverflow.com/comment/42162324
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26793606
has text: Sure -> **http://jsfiddle.net/adeneo/ddp09zvm/4/**
score: 0

http://stackoverflow.com/comment/42091756
comment on: http://stackoverflow.com/q/26754262
has text: 1) ignore error message, ask question on SO. 2) ??? 3) profit.
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26730690
has comment: http://stackoverflow.com/comment/42050874
score: 0
has comment: http://stackoverflow.com/comment/42049120
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26728618
has comment: http://stackoverflow.com/comment/42082341
has comment: http://stackoverflow.com/comment/42049400
has comment: http://stackoverflow.com/comment/42049867
has comment: http://stackoverflow.com/comment/42049819
type: Answer
accepted answer of: http://stackoverflow.com/q/26728618
has body: you are not dropping the data as a list item, append the layout variable inside a list element to the #blocks ul $("#blocks").droppable({ drop: function (event, ui) { var id = ui.draggable.attr('id'); layout = $.ajax({type:"GET",url:'wp-content/themes/dynamictheme/templates/' + id + '.html',async:false}).responseText; $("#blocks").append('&lt;li&gt;' + layout + '&lt;/li&gt;'); }

http://stackoverflow.com/q/26738990
favorite count: 0
accepted answer: http://stackoverflow.com/a/26739094
type: AnsweredQuestion
has title: Json check if certain element has been received
tagged with: http://stackoverflow.com/tag/json
has body: I have an ajax call to one of my servlets that does some database manipulation. The question I am asking is, is there and easy way to see if I receive a certain element in my json. For example, I am receiving back a { message: "Some data message" } but if there is an error, I want to send back {error: "my error message"}. Is there a simple way to see if there was an error sent? The logic I am thinking of is like this (this does not work) $.post( "database.json", { id: id, info: info}) .done(function( data ) { if(data.error){ alert(data.error); } else { alert(data.message); }
downvote count: 1
type: Question
upvote count: 0
tagged with: javascript
score: -1
tagged with: ajax
tagged with: boolean
answer count: 1
has answer: http://stackoverflow.com/a/26739094

http://stackoverflow.com/q/26729057
has answer: http://stackoverflow.com/a/26729638
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42046178
has comment: http://stackoverflow.com/comment/42047367
score: 0
has comment: http://stackoverflow.com/comment/42046454
type: Question
has body: I have a canvas that draw an image on it. If I set the canvas size by css in % then the image comes out very blurry. If I set it in pixels then the image is drawn fine. #myCanvas{ border:1px dotted black; width:100%; } img{ width:100%; height:150px; } Your Phone is Not Compatible With the APP. $("document").ready(function(){ function drawcanvas(){ var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); var imageObj = new Image(); imageObj.src ="http://www.artlimited.net/user/0/0/1/4/9/7/9/artlimited_img175960.jpg"; imageObj.onload = function() { context.drawImage(imageObj, 0, 0,context.canvas.width,context.canvas.height); document.querySelector("p").innerHTML="canvas height="+context.canvas.height+"canvas width="+context.canvas.height; }; } drawcanvas(); }); http://jsfiddle.net/prantikv/vvu6myy6/7/
tagged with: javascript
tagged with: canvas
has title: Responsive HTML5 Canvas Using CSS
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/a/26673934
upvote count: 4
has comment: http://stackoverflow.com/comment/41947848
downvote count: 0
has body: You would use :contains pseudo-selector: jQuery("#select_472 option:contains('Rich Yellow')").index();
has comment: http://stackoverflow.com/comment/41947752
accepted answer of: http://stackoverflow.com/q/26673857
score: 4
answers question: http://stackoverflow.com/q/26673857
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/26747353
tagged with: jquery
has comment: http://stackoverflow.com/comment/42080058
tagged with: console
favorite count: 0
has answer: http://stackoverflow.com/a/28964048
has title: Console Log: Uncaught SecurityError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data
has answer: http://stackoverflow.com/a/26747869
upvote count: 3
type: UnansweredQuestion
tagged with: plugins
score: 3
linked to: http://stackoverflow.com/q/26688168
has comment: http://stackoverflow.com/comment/42079686
tagged with: jquery-plugins
type: Question
has comment: http://stackoverflow.com/comment/42079756
answer count: 2
has comment: http://stackoverflow.com/comment/42079717
has body: Hey I'm trying to implement a jquery plug in called backgroundcheck and it gives me the console log error of: "Uncaught SecurityError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data." I have done everything he says to do in the instructions but it doesn't work. Any help would be greatly appreciated. UPDATE: These are the three errors under the main error in the drop down menu. calculatePixelBrightness VM682 background-check.min.js:571 processTargets VM682 background-check.min.js:631 check VM682 background-check.min.js:766 Here's a screenshot of it as well.
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/26797954
answer count: 4
downvote count: 0
has body: is there any way to make javascript array to initialize all the values to 0 without iteration like as shown below var array = [1, 2, 3, 4, 5]; to [0, 0, 0, 0, 0]
score: 1
has answer: http://stackoverflow.com/a/26798117
has answer: http://stackoverflow.com/a/26798006
has title: initialize all the values in a javascript array to 0 without iteration
type: Question
has answer: http://stackoverflow.com/a/26798278
tagged with: javascript
has answer: http://stackoverflow.com/a/26798462
upvote count: 1
tagged with: arrays
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/26728336
answers question: http://stackoverflow.com/q/26728309
type: Answer
accepted answer of: http://stackoverflow.com/q/26728309
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/42045184
has body: You don't have a syntax like if (comproll === 3, 5) { to compare 2 values you need to use if (comproll === 3|| comproll == 5) { or you can use an indexOf() like if([3, 5].indexOf(comproll)>-1) But have a look at this implementation $(function() { var compMap = { 1: "Lizard", 2: "paper", 3: "scissors", 4: "Spock", 5: "Rock" }, winMap = { 1: [2, 4], 2: [4, 5], 3: [1, 2], 4: [3, 5], 5: [1, 3] }; $(document).on('click', '.game-image', function(event) { var value = $(this).data('value'); var win; var comproll = 1 + Math.floor(Math.random() * 5); //$('#comproll').html('Result: '+comproll) var comp = compMap[comproll]; if (value === comproll) { win = "This ends in a tie" } else { var wins = winMap[value]; if (wins && wins.indexOf(comproll) == -1) { win = "You win, comp choose " + comp + "."; } else { win = "You lose, comp choose " + comp + "."; } } $('#win').text(win); }); //closes play function }); // closes function Lizard, paper, scissors, spock, rock
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26793737
has body: I think that the page does not fill more than the window , so that is why there is no scroll bar. When you do scroll up or down , there are most likely event listeners that are just altering the content. body { overflow:hidden } would work in some browsers , but not all - So , to avoid having a scroll bar, just don't have the content get larger than the window.
type: Answer
answers question: http://stackoverflow.com/q/26793486
score: 0

http://stackoverflow.com/a/39822546
downvote count: 1
answers question: http://stackoverflow.com/q/26708205
has comment: http://stackoverflow.com/comment/92553413
upvote count: 2
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/66956001
has body: An easy solution on MacOS is the following : Open two terminal windows in the same directory that your project resides. In the first terminal window run : webpack --watch In the second terminal windows run : webpack-dev-server I have tried many possible solutions and this seems to be the most reliable

http://stackoverflow.com/comment/41993950
type: QuestionComment
comment on: http://stackoverflow.com/q/26700120
has text: Do you update any html element with js or jquery after the page is loaded?
score: 0
type: Comment

http://stackoverflow.com/comment/42052102
has text: just check the `test.html` and other files of respond.js test stuff you downloaded. maybe **they** have done something wrong with the paths and nothing works on local (or they refer to files over the internet and you are offline) does it work on other browsers?
comment on: http://stackoverflow.com/q/26732195
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42108843
score: 1
comment on: http://stackoverflow.com/q/26763709
type: QuestionComment
type: Comment
has text: your `if` needs to be inside the `drop` function. Otherwise it breaks the object syntax and will certainly throw errors

http://stackoverflow.com/q/26697744
has title: Long Polling: Why do some messages come in twice?
has answer: http://stackoverflow.com/a/26703250
tagged with: php
has body: I'm currently building a chat application with log polling. The prototype is located here: http://chat.alexanderjank.de On server side PHP is used. But I think it's a javascript issue, that some messages come in a couple of times. The javascript code which is used is: var t; var xhr; var ids = []; var panel = $('#posts-panel'); var indexOf = function(needle) { if(typeof Array.prototype.indexOf === 'function') { indexOf = Array.prototype.indexOf; } else { indexOf = function(needle) { var i = -1, index = -1; for(i = 0; i < this.length; i++) { if(this[i] === needle) { index = i; break; } } return index; }; } return indexOf.call(this, needle); }; function getNewPosts(timestamp) { xhr = $.ajax({ url: 'chat.php', data: 'timestamp=' + timestamp, dataType: 'JSON', }) .done(function(data) { clearInterval( t ); // If there was results or no results // In both cases we start another AJAX request for long polling after 1 second if (data.message_content == 'results' || data.message_content == 'no-results') { t = setTimeout(function() { getNewPosts(data.timestamp); }, 1000); // If there was results we will append it to the post div if (data.message_content == 'results') { // Loop through each post and output it to the screen $.each(data.posts, function(index, val) { if(indexOf.call(ids, val.msg_id) == '-1') { ids.push(val.msg_id); $(' '+val.message_body+' Alex Deo | '+ val.posted_time +' ').appendTo('.posts'); panel.scrollTop(panel[0].scrollHeight); } }); } } }); } $(document).ready(function(){ $(function() { $('#posts-panel').jScrollPane({ horizontalGutter:5, verticalGutter:5, 'showArrows': false }); }); $('.jspDrag').hide(); $('.jspScrollable').mouseenter(function(){ $(this).find('.jspDrag').stop(true, true).fadeIn('slow'); }); $('.jspScrollable').mouseleave(function(){ $(this).find('.jspDrag').stop(true, true).fadeOut('slow'); }); if (!Date.now) { Date.now = function() { return new Date().getTime(); }; } panel.scrollTop(panel[0].scrollHeight); // Create an AJAX request to the …
has comment: http://stackoverflow.com/comment/41990536
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41990514
upvote count: 1
tagged with: long-polling
type: Question
accepted answer: http://stackoverflow.com/a/26703250
tagged with: javascript
has comment: http://stackoverflow.com/comment/41990064
has comment: http://stackoverflow.com/comment/41990199
tagged with: ajax
tagged with: chat
downvote count: 0
has comment: http://stackoverflow.com/comment/41990474
answer count: 1
score: 1
has comment: http://stackoverflow.com/comment/41990273
favorite count: 0
has comment: http://stackoverflow.com/comment/41990126

http://stackoverflow.com/comment/42068586
comment on: http://stackoverflow.com/a/26740923
type: Comment
has text: !important wont work in this case, why are you loading in an external form script? you could try build the form yourself which would make things easier
score: 0
type: AnswerComment

http://stackoverflow.com/a/26758648
type: AcceptedAnswer
has body: I ended up using teaspoon as recommended by JedSchneider. https://github.com/modeset/teaspoon This helped in getting it working. https://github.com/modeset/teaspoon/wiki/Testing-Engine-Assets
answers question: http://stackoverflow.com/q/26683536
type: Answer
accepted answer of: http://stackoverflow.com/q/26683536
score: 0

http://stackoverflow.com/a/26714731
score: 1
answers question: http://stackoverflow.com/q/26710692
has body: Possible setup: PHP web server (or NodeJS server - my personal favourite) Possible workflow: php upload page for CSV file / or upload by FTP/SSH csv is on server php page with param datafromid=csvfile provides the data conversion from csv to json.. (if the csv file does not contain too many rows, read it into an php array, and spit it out with json_encode() by getting each row (fgetcsv()) and adding a sub-array to your total array) depending on how you provide the data to d3, use ajax to access that php-page to access the json or include it in your page (i think loading it by ajax, accessing the file from the browser where the page lies, is better - you may use jQuery get())
upvote count: 1
downvote count: 0
type: Answer

http://stackoverflow.com/a/26759553
has comment: http://stackoverflow.com/comment/42100535
accepted answer of: http://stackoverflow.com/q/26758798
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42100882
answers question: http://stackoverflow.com/q/26758798
has comment: http://stackoverflow.com/comment/42102584
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42101691
has body: Your PHP looks fine, but you might need to change the way that you collect the JavaScript. Consider this example: http://jsfiddle.net/0vcewvkc/1/ If you are collecting JavaScript only, you can wrap the response in a jQuery tag ($()), and then append it to your document. $("#go").click(function() { // call the function here // your ajax code would go here, but either way you will end up with a string of JavaScript var response = '&lt;script&gt;alert("hi");&lt;/' + 'script&gt;'; // use jQuery to append this script to your document's body, like so: $(response).appendTo(document.body) }); Update To do this without jQuery, the end of your AJAX call would have this code: var response = 'alert("hi");'; // note that we have removed the &lt;script&gt; tag var s = document.createElement("script"); s.innerHTML = response; document.getElementsByTagName('body')[0].appendChild(s);

http://stackoverflow.com/q/26689376
has comment: http://stackoverflow.com/comment/41975630
tagged with: node.js
answer count: 0
type: UnansweredQuestion
has title: Acessing property of javascript object from closure
has comment: http://stackoverflow.com/comment/41975822
has comment: http://stackoverflow.com/comment/41975662
type: Question
tagged with: object
has body: I have an object like this var graphLUT = { table: [], createEmptyGraph: function (label) { var existsInTable = false; if(this.table.length &gt; 0) { for(var i=0; i&lt;this.table.length; i++) { if(this.table[i] === label) existsInTable = true; else existsInTable = false; } } else existsInTable = false; if(!existsInTable) { var graph = new Graph(label.toLowerCase()); this.table.push(graph.label); return graph; } }, ... other properties }; module.exports = graphLUT When I now try to acces the table from the createEmptyGraph function, the node.js compiler tells me the following: TypeError: Cannot read property 'length' of undefined What am I doing wrong? I also required the graphLUT and can access the table array from another module so it has the be initialized. Maybe the "this" is wrong? How do I access table?
has comment: http://stackoverflow.com/comment/41975667
tagged with: javascript
has comment: http://stackoverflow.com/comment/41975825
score: 0
has comment: http://stackoverflow.com/comment/41977053
has comment: http://stackoverflow.com/comment/42013470

http://stackoverflow.com/a/26706285
upvote count: 2
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/42040115
downvote count: 1
accepted answer of: http://stackoverflow.com/q/26706269
has body: &lt;script&gt; function yesorno2(){ var rad = document.getElementById('theForm').elements['escalation2']; if(rad.value != "") alert("You entered: " + rad.value) else alert("There is some problem") } &lt;/script&gt; &lt;form id='theForm'&gt; Is this an escalation?&lt;br&gt; &lt;input type='radio' name='escalation2' value='yes'&gt; Yes&lt;br&gt; &lt;input type='radio' name='escalation2' value='no'&gt; No&lt;br&gt;&lt;br&gt; &lt;input type='button' onclick='yesorno2()' value='Submit'&gt; &lt;/form&gt; You made two mistakes: the common attribute on the radio buttons is name, not id don’t “grab” the radio button, go for the form element: it contains an array (elements) which gives you direct access to the radio buttons “as a group”. There you find the value. Note: If using Firefox, you need version 33 (released 2014-10-14) or above. RadioNodeList finally reached Firefox.
answers question: http://stackoverflow.com/q/26706269
has comment: http://stackoverflow.com/comment/46820051
type: AcceptedAnswer

http://stackoverflow.com/comment/42008530
comment on: http://stackoverflow.com/a/26707922
type: Comment
type: AnswerComment
score: 0
has text: @epascarello yeah, this is definitly a good method, but OP is trying to programmatically kill himself.

http://stackoverflow.com/a/26677262
score: 2
answers question: http://stackoverflow.com/q/26676713
has body: Does this attribute exist? If you want only test, you can do this: object.onclick=function(){myScript}; What means: document.getElementById('button').onclick = function () { draw(); }; var context; var dx= 4; var dy=4; var y=150; var x=10; function draw(){ context= myCanvas.getContext('2d'); context.clearRect(0,0,400,400); context.beginPath(); context.fillStyle="#000000"; context.arc(x,y,10,0,Math.PI*2,true); context.closePath(); context.fill(); if( x&lt;0 || x&gt;400) dx=-dx; if( y&lt;0 || y&gt;300) dy=-dy; x+=dx; y+=dy; setInterval(draw,10); } Just be careful with that setInterval: it's gonna run forever. You want to create some condition to make it stop in the future. ;) Note: I know this onclick attribute is old fashion but it works in all mayor browsers. Consider using jquery to attach functions to your onclick event.
downvote count: 0
upvote count: 2
type: Answer

http://stackoverflow.com/comment/42026778
score: 0
comment on: http://stackoverflow.com/q/26718290
type: Comment
type: QuestionComment
has text: It works Awesomely http://jsfiddle.net/ta0pdxkj/ Whats issue?

http://stackoverflow.com/comment/42157873
score: 0
has text: Right now, you can't switch JS shells and expect the same behavior in all. There is no defined standard beyond the JS language that applies here. You can switch platforms with the same shell and have the same behavior (within a few limits of platform capabilities). In nodejs, you can make a bunch of http requests, collect the data, process it and write it all to a local file and do that exactly the same on any of the major OS platforms.
type: Comment
comment on: http://stackoverflow.com/a/26790314
type: AnswerComment

http://stackoverflow.com/comment/42075455
type: QuestionComment
type: Comment
has text: Maybe because of the i index the IE gets crazy and it does not work?
score: 0
comment on: http://stackoverflow.com/q/26744562

http://stackoverflow.com/comment/42252377
score: 2
has text: @ehmicky thanks for accepting my answer, but I don't think I really solved the problem for you -- I only spotted a typo, but you appear to have found the real problem and solved it. Accepting your own answer is fine, here, particularly in cases where you really did solve the problem yourself and none of the other answers offered the actual solution. You can "un-accept" my answer, I believe, by clicking the checkmark again.
comment on: http://stackoverflow.com/a/26812046
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42071038
comment on: http://stackoverflow.com/q/26742640
has text: Not with Javascript. You would need some backend script like PHP or C# that can read the filesystem.
score: 2
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26675802
answers question: http://stackoverflow.com/q/26675594
has body: NOTE generally, it is better practice to not hide the .parent(), but the .closest('.prompt') or closest with '#del_product' ... Prevents issues, where additional tags might be included by either you or the browser. Or a CMS.
downvote count: 0
score: 1
type: Answer
upvote count: 1

http://stackoverflow.com/q/26725751
type: UnansweredQuestion
tagged with: mustache
score: 1
has answer: http://stackoverflow.com/a/26725959
upvote count: 1
type: Question
has title: Mustache template with unknown properties name
tagged with: javascript
has answer: http://stackoverflow.com/a/26725871
answer count: 2
downvote count: 0
has body: Is it possible to template an array of object with unknown property? var objs: [{ propA: 'A', propB: 'B', propC: 'A', propD: 'B' }]; And the template could be: &lt;ul&gt; &lt;li&gt;{{property_name}}: {{property_value}}&lt;/li&gt; &lt;/ul&gt;
favorite count: 0

http://stackoverflow.com/comment/41986901
type: AnswerComment
comment on: http://stackoverflow.com/a/26695938
type: Comment
has text: @rob Your code shows that you are setting a timer for 5 seconds. When it fires, I would assume that you would set it up to fire again 5 seconds later. If you want to pause this, then you would cancel the timer from firing. Since it doesn't fire again, it won't restart again ... and hence we would have achieved a suspension.
score: 0

http://stackoverflow.com/q/26701632
has comment: http://stackoverflow.com/comment/41996882
type: Question
has title: Dynamically package css & js for templates
has comment: http://stackoverflow.com/comment/41996765
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41997439
score: 0
tagged with: freemarker
has answer: http://stackoverflow.com/a/26729713
has body: Sitrep: My pages are built on free marker templates. The currently include the css and js needed for it in the template file itself. But this results in quite a few duplicates. What I want to do : I want to be able to do a free marker analogue of the C++ #include. Basically a template mentions the js and css it needs and it gets picked from a central place when the template is rendering. Are there any preprocessors for this? Are there any approaches to this better than the #include?
has comment: http://stackoverflow.com/comment/41997028
type: UnansweredQuestion
tagged with: templating-engine
tagged with: css
has comment: http://stackoverflow.com/comment/41996979

http://stackoverflow.com/comment/41978307
type: QuestionComment
comment on: http://stackoverflow.com/q/26690842
has text: @Frankie "externally supplied js file" ... That's not a good explanation at all. Please show what your inputs are and what output you expect to generate from them.
score: 0
type: Comment

http://stackoverflow.com/comment/42105592
type: Comment
type: QuestionComment
has text: Pace.js http://github.hubspot.com/pace/docs/welcome/
comment on: http://stackoverflow.com/q/26762093
score: 0

http://stackoverflow.com/comment/41948768
score: 0
type: QuestionComment
has text: If the idea is for each picture to stay for some number of seconds use `setTimeout()`.
type: Comment
comment on: http://stackoverflow.com/q/26674628

http://stackoverflow.com/comment/42056320
has text: when I open your pen it doesn't work, tried to apply it to my project and didn't work their either, still get redirected to the alert template still thanks for the input
score: 0
comment on: http://stackoverflow.com/a/26734574
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/42013057
type: AnswerComment
type: Comment
has text: Incredible.. I was thinking of a really complicated step, but this was simple and right to the point. Thanks!
comment on: http://stackoverflow.com/a/26710624
score: 0

http://stackoverflow.com/comment/42155958
has text: Thanks, but this didn't seem to change anything
type: AnswerComment
comment on: http://stackoverflow.com/a/26789887
score: 0
type: Comment

http://stackoverflow.com/comment/42008945
type: QuestionComment
comment on: http://stackoverflow.com/q/26707916
score: 0
has text: @Kolban I think now its easy to understand . thank you
type: Comment

http://stackoverflow.com/comment/42222825
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26809439
has text: In UTF-8 "The first 128 characters (US-ASCII) need one byte. The next 1,920 characters need two bytes to encode". So even if one used a non-latin alphabet in the query string, 80kB = 40,000 characters. Which should suffice for must purposes. XD

http://stackoverflow.com/q/26799330
has answer: http://stackoverflow.com/a/26799896
type: Question
tagged with: javascript
tagged with: mobile-safari
answer count: 2
upvote count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26799896
has answer: http://stackoverflow.com/a/26799795
has body: The viewport of iPhone 5s is 320x568. When in vertical orientation, window.innerHeight returns 460, which is equal to the screen.height - the chrome. However, when in horizontal orientation, window.innerHeight returns 180. There is no chrome. To my mind it should be returning 320. This is with the viewport width set to 320. &lt;meta name="viewport" content="width=320"&gt; How is the window.innerHeight size derived in the horizontal (landscape) orientation?
type: AnsweredQuestion
downvote count: 0
score: 1
has title: Why does window.innerHeight return 180 when in horizontal orientation?
possible better answer: http://stackoverflow.com/a/26799795

http://stackoverflow.com/q/26757807
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42098733
upvote count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/42099837
tagged with: responsive-design
has title: Javascript and Media Queries show hide hidden divs
answer count: 0
tagged with: media-queries
has comment: http://stackoverflow.com/comment/42097846
type: Question
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42098476
has body: Does any one know how to use javascript with a media query? I am wanting a left column menu which is hidden in mobile view using the bootstap 3 hidden-xs but I want to be able to click a menu button which overlays the left column over the main content area - which an x to close the menu. using function showFunction() { document.getElementById("left-col").style.visibility="visible"; } function hideFunction() { document.getElementById("left-col").style.visibility="hidden"; } When testing this in a broswer this works OK but once I have clicked the cross to close the menu if I resize the screen to desktop or above the break point of the media query the left-col remains hidden. Is there anyway around this? Or is it a waste of time trying and the benefit of this would work on a mobile rather than users on desktops resizing browsers. Update -- In Desktop view I have 3 columns left Main Right with a header and a footer. In Mobile I am stacking the right colum under the main hiding the left column on default By clicking a menu icon i am displaying the left navigation over the main content, and click a cross on the left col to hide it. But once I close the left-col when I resize to desktop - the left col stays visible and I want it to be forced back. Thanks Any help would be great. Thanks
score: 1
has comment: http://stackoverflow.com/comment/42100485
favorite count: 0
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/42228839
type: QuestionComment
comment on: http://stackoverflow.com/q/26830327
has text: Do you have control of the API? Having these relationships async and then forcing them to all go fetch everything immediately seems like a waste of calls to your server. It seems like a good opportunity to use embedded records and skip async.
score: 0
type: Comment

http://stackoverflow.com/q/26828840
has comment: http://stackoverflow.com/comment/42225094
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42225586
answer count: 0
type: Question
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/1480133
score: 0
has comment: http://stackoverflow.com/comment/42225054
has body: I made a visualisation ;) https://www.dropbox.com/s/sj7mbi6vjx0ebx6/visual.png?dl=0 I want to get offset of element from HTML or body. (that red line :D) $('#awp').offset().left gives me 8, $('#awp').position().left gives 8 as well. I know that the offset from body tag is 500+. SOLVED!!!! My css was: img{display:inline;}, should be img,div{display:inline;} Mistakes like that are really annoying.
has title: How to get element's absolute postion in px? jQuery
tagged with: http://stackoverflow.com/tag/html
tagged with: client-side

http://stackoverflow.com/q/26801192
has comment: http://stackoverflow.com/comment/42240072
tagged with: internet-explorer-8
has comment: http://stackoverflow.com/comment/42176074
has title: Convert 2014-11-03T00:00:00 to yyyy-mm-dd in javascript
has comment: http://stackoverflow.com/comment/42175937
linked to: http://stackoverflow.com/q/2182246
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/42175911
tagged with: javascript
has answer: http://stackoverflow.com/a/26801353
has comment: http://stackoverflow.com/comment/42175951
has comment: http://stackoverflow.com/comment/42176205
score: 0
tagged with: datetime
has comment: http://stackoverflow.com/comment/42176640
has body: I have tried to change this date in yyyy-mm-dd using function convert(str) { var date = new Date(str); var mnth = ("0" + (date.getMonth() + 1)).slice(-2) var day = ("0" + date.getDate()).slice(-2); return [date.getFullYear(), mnth, day].join("-"); } But it's giving me the error Naan in i.e 8. It's working with all other browsers. Any one can help me in this? Thanks
has comment: http://stackoverflow.com/comment/42175936
accepted answer: http://stackoverflow.com/a/26801353
type: AnsweredQuestion

http://stackoverflow.com/q/26700161
upvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: i've select option below KJ01 KJ02 KJ03 KJ04 KJ DELUXE KJO6 and one text field with default value in hidden My question is I want to make when select value is == 6, then the text field will change to value="3" I've try with the jquery below but no luck $('#order_package_id').change(function() { if($(this).val() == 6) { $('#order_discount_id').val() == 3; } });
has answer: http://stackoverflow.com/a/26700187
has title: Select onchange and custom text field value
has answer: http://stackoverflow.com/a/26700193
possible better answer: http://stackoverflow.com/a/26700193
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
accepted answer: http://stackoverflow.com/a/26700187
answer count: 2

http://stackoverflow.com/q/26693556
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41982600
tagged with: http://stackoverflow.com/tag/xml
has comment: http://stackoverflow.com/comment/41984556
has answer: http://stackoverflow.com/a/26693581
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41984525
has comment: http://stackoverflow.com/comment/41982954
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41983034
has title: I want to display variable 'b[i]' instead of 'x[i].childNodes[0].nodeValue'. but either 'myFunction' or document.write(b[i]) seems not working
tagged with: function
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41983885
has body: I defined function 'myFunction(a, b)', and try to use it to convert a value from xml file to create new variable 'b', then write it in the table. but, either myFunction or document.write(b[i]) not work. Any idea what am I doing wrong? function defining
type: UnansweredQuestion

http://stackoverflow.com/a/26779547
type: Answer
has comment: http://stackoverflow.com/comment/42137854
downvote count: 0
score: 3
has comment: http://stackoverflow.com/comment/42137284
upvote count: 3
has comment: http://stackoverflow.com/comment/42136964
answers question: http://stackoverflow.com/q/26779466
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42136899
accepted answer of: http://stackoverflow.com/q/26779466
has body: css is immediate and not queued/delayable (like animate is). Your options are use setTimeout or add them to the animation queue (or use methods that are queued). e.g. using timer $('.container').css('height', 'auto' ); setTimeout(function(){ $('.container').css('height', $(window).height()); }, 2000); JSFiddle: (thanks to @Raghu Chandra) http://jsfiddle.net/zd5xweb6/ using a queue: $('.container').css('height', 'auto' ).delay(2000).queue(function(){ $(this).css('height', $(window).height()); }); JSFiddle: http://jsfiddle.net/zd5xweb6/1/

http://stackoverflow.com/comment/42190738
has text: Where is the js code? in a external file? Are you sure to include this file in the html page?
comment on: http://stackoverflow.com/q/26808999
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26685559
has comment: http://stackoverflow.com/comment/41969249
type: Question
tagged with: javascript
tagged with: fullcalendar
has body: I would like to put my JSON data (which I succesfully get) into events in FullCalendar Plugin, but unfortunetly It doesnt work for me... $('#calendar').fullCalendar({ events: function (start, end, timezone, callback) { $.getJSON("http://localhost:3000/test/2014-09-09", function (data, stat) { alert(data[0].dates[0].dateStart) start:data[0].dates[0].dateStart }); } });
score: 0
answer count: 1
tagged with: jquery
has title: Jquery FullCalendar Events
has answer: http://stackoverflow.com/a/26687043
has comment: http://stackoverflow.com/comment/41973390
type: UnansweredQuestion

http://stackoverflow.com/comment/42069655
comment on: http://stackoverflow.com/a/26741858
type: AnswerComment
score: 0
type: Comment
has text: I am not able to execute what you have suggested, does the script work with my existing script or without it, either way I am not sure how it works. Thanks though..

http://stackoverflow.com/a/26707859
has comment: http://stackoverflow.com/comment/42161384
downvote count: 0
has comment: http://stackoverflow.com/comment/42217878
has comment: http://stackoverflow.com/comment/42239109
has comment: http://stackoverflow.com/comment/42183227
type: Answer
has comment: http://stackoverflow.com/comment/42239016
has comment: http://stackoverflow.com/comment/42239058
score: 1
has body: If I understand your question correctly, you want to get a timestamp whenever the user changes his/her work area i.e. selects one of the options in your select menu. You could do that in javascript by exploiting the onchange property like so: Pictures ERO's ERO's Appraisal Wholesale Wholesale Pictues Lunch Break Whenever, an option is changed, the function foo() is called. The function could look like: You should check out the Javascript Date reference to understand which date method you would like to use in your case( there are many like getMonth(),getSeconds() etc.). Hope it gets you started in the right direction. EDIT Check this jsfiddle for a working demo. Adding selected options along with timestamp - Demo
has comment: http://stackoverflow.com/comment/42163076
has comment: http://stackoverflow.com/comment/42220508
upvote count: 1
has comment: http://stackoverflow.com/comment/42229912
has comment: http://stackoverflow.com/comment/42200770
has comment: http://stackoverflow.com/comment/42220539
has comment: http://stackoverflow.com/comment/42225846
has comment: http://stackoverflow.com/comment/42239133
answers question: http://stackoverflow.com/q/26707788

http://stackoverflow.com/q/26772038
score: 1
accepted answer: http://stackoverflow.com/a/26772151
favorite count: 0
upvote count: 1
possible better answer: http://stackoverflow.com/a/26772128
has answer: http://stackoverflow.com/a/26772208
has title: JavaScript regex does opposite of what's expected
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26772128
type: Question
has answer: http://stackoverflow.com/a/26772151
tagged with: javascript
has body: I have a regex that's doing the opposite of what's expected... I have something that could either be a number or not. I tried using isNaN but it gave odd results, so I thought I'd try a regex. That is giving even weirder results. The html looks like 31 and I grab it via var text = document.querySelectorAll('.label, .content'); Then I process it via: for (var i=0; i<text.length; i++) { if (text[i].innerText.search(/^[0-9]+$/)) { // do number stuff } } but it matches everything that's not a number and doesn't process the numbers. If I change the regex to /^[^0-9]+$/ (the negating character) it does match on the numbers. This is the opposite of what I would expect! Anybody have an idea what might be going on? Thanks.
has answer: http://stackoverflow.com/a/26772271
has comment: http://stackoverflow.com/comment/42123952
downvote count: 0

http://stackoverflow.com/q/26795643
possible better answer: http://stackoverflow.com/a/46269007
linked to: http://stackoverflow.com/q/12735778
has answer: http://stackoverflow.com/a/72555646
favorite count: 0
answer count: 12
has title: How to convert object containing Objects into array of objects
has body: This is my Object var data = { a:{"0": "1"}, b:{"1": "2"}, c:{"2": "3"}, d:{"3": "4"} }; This is the output that I expect data = [ {"0": "1"}, {"1": "2"}, {"2": "3"}, {"3": "4"} ]
has answer: http://stackoverflow.com/a/26795741
tagged with: lodash
upvote count: 110
has comment: http://stackoverflow.com/comment/42165643
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42165672
has answer: http://stackoverflow.com/a/72848477
has answer: http://stackoverflow.com/a/40242405
accepted answer: http://stackoverflow.com/a/40242405
has answer: http://stackoverflow.com/a/75812329
has answer: http://stackoverflow.com/a/67059029
has answer: http://stackoverflow.com/a/58364145
type: Question
has answer: http://stackoverflow.com/a/46269007
has answer: http://stackoverflow.com/a/26796152
tagged with: javascript
has comment: http://stackoverflow.com/comment/81028455
has answer: http://stackoverflow.com/a/26795784
score: 108
downvote count: 2
has answer: http://stackoverflow.com/a/51193241
has answer: http://stackoverflow.com/a/66515236

http://stackoverflow.com/q/26751042
score: 0
type: Question
tagged with: jsp
tagged with: javascript
tagged with: stripes
answer count: 1
has answer: http://stackoverflow.com/a/26770488
has body: I am using below code in jsp page. when i submit i want to get value for label also in java code. how to do this? i am getting null for empName in java. JSP Code: <stripes:form action="empManager.action?changeManager" method="post" id="empForm" name="changeManager"> <stripes:select class="selectMenu" name="empId" id="empId"> <stripes:option value="" selected="-- Emp --">-- Emp --</stripes:option> <stripes:options-collection collection="${actionBean.empList}" label="empName" value="empId" /> </stripes:select> Submit </stripes:form> function changeStore() {alert(1); document.getElementById("empForm").submit(); } Bean Class : @UrlBinding("/empManager.action") public class EmpActionBean extends BaseCDCActionBean { private String empId; private String empName; public Resolution changeManager() { System.out.println("storeId :"+this.empId); System.out.println("storeName :"+this.empName); do something..... return new ForwardResolution(Pages.empboard.getPageUrl()); } }
type: UnansweredQuestion
has title: How to get label value from stripes:options-collection in java script or java

http://stackoverflow.com/a/26773167
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26773044
answers question: http://stackoverflow.com/q/26773044
type: Answer
has body: you can use like this &lt;input type="button" onclick="LoadFancyBox(your id here)" value="test"/&gt; &lt;script type="text/javascript"&gt; function LoadFancyBox(id) { $("#"+id).fancybox({ 'width' : '90%', 'height' : '90%', 'autoScale' : false, 'transitionIn' : 'none', 'transitionOut' : 'none', 'type' : 'iframe' }); } &lt;/script&gt;

http://stackoverflow.com/comment/42070985
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26737896
has text: so if I use json , there's no need for adding type in there correct ? @meetamit thank you .
score: 0

http://stackoverflow.com/a/26748288
downvote count: 0
score: 7
answers question: http://stackoverflow.com/q/26744312
has body: My contribution is twofold. Firstly (Good news!) I am 100% certain that want you want to do using JavaScript is achievable CAVEAT: Chrome / Firefox will probably be all ok but it will only work in more modern versions of Safari (6+) and IE (IE10+). Source http://caniuse.com/filereader Secondly I hope that my contribution gets you pretty far along in solving the problem although I admit I haven't come up with the PDF417 image reading algorithm that would be the final piece of the puzzle. OK Here we go: a) To have JavaScript (running on the client machines) present a GUI to the user to allow them to choose a file from their local file system (a picture of their driving license) and then... b) Bring it into the JavaScript app (All without involving a server or Java); and ... c) ...have JavaScript parse it and interpret the dark / light patterns of the PDF417 barcode to extrapolate the 'plaintext' human-readable data encoded therein. I mention Java not being an option as Java applets, it seems, will never be allowed to run in Chrome although Java has a nice Image data handling package which is well sorted to this thing. Understanding and code required for a) HTML forms have allowed programmers to use a file upload field for many years. You'll need: &lt;input type="file" id="myFileInput"&gt; Understanding and code required for b) Also, on the JavaScript side of things you'll need (most importantly) use of the HTML5 FileReader Api (see http://blog.teamtreehouse.com/reading-files-using-the-html5-filereader-api) ...vis-a-vis: var reader = new FileReader(); // ... and ... reader.readAsDataURL(file); Where readAsDataURL() is going to give you the base64-encode binary data that is going to work for you when it comes to slotting into the src property of an instance of an image instantiated with var ing = new Image();. i.e. setting the srcto data:image/gif;base64,*data* With that done you can at least display the driving license in your webpage. Later on I mention taking this ne…
upvote count: 7
type: Answer

http://stackoverflow.com/a/26743695
has comment: http://stackoverflow.com/comment/42073284
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26743553
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42073161
answers question: http://stackoverflow.com/q/26743553
has body: You didn't add the id to the printWindow document as seen below: printWindow.document.write('&lt;img id="mainImage" src="..\Images\Layout\TestBadge.jpg"');

http://stackoverflow.com/a/26783155
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26782888
upvote count: 1
score: 1
has body: You can't return anything from casper.thenEvaluate. It will be disregarded. You need to split it into casper.then with casper.evaluate. See this question for something similar. casper.thenEvaluate is an asynchronous step function just like all other then* and wait* functions. Returning something useful from an asynchronous function is not possible. What you most likely want is this: var something; casper.start(url).then(function(){ something = this.evaluate(function(){ return 'foobar'; }); this.click("someSelector"); }).then(function(){ // do something with "something" on the new page }); I suspect you wouldn't be asking if you didn't want to use something later. All step functions return the initial casper object so that scripts can be written in promise syntax as in the above example.
accepted answer of: http://stackoverflow.com/q/26782888
type: AcceptedAnswer

http://stackoverflow.com/a/26794150
downvote count: 0
has comment: http://stackoverflow.com/comment/42163593
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26794048
has body: You have two problems here. 1 - You have an infinite loop by adding to an array that you are currently reading. This will cause it to expand, and you will keep reading this expansion repeatedly. 2 - You are not actually pushing NEW objects into your array, you are just simply adding a reference to existing objects. What will happen here is that when you add to your object, you are also adding to the object that you just added. In other words, you have another infinite loop here for (var a = 0; a &lt; emailAddresses.emails.length; a++) { emailAddr[i]['emails'].push(emailAddresses.emails[a]); } in that when you push to your array, you are actually pushing to the reference, meaning it will also expand indefintely. To fix this, use .slice(0) to copy arrays over instead, as below. var emailAddr = [{ customerID: "C20061102105257_678", emails: ["fandi@gmail.com", "fanjavaid@gmail.com"] }]; var dataEmail2 = { customerID: "C20061102105257_678", emails: ["weisk@gmail.com"] }; var dataEmail3 = { customerID: "C20061102105257_600", emails: ["eko@gmail.com"] }; var dataEmail4 = { customerID: "C20061102105257_678", emails: ["1@gmail.com", "156@gmail.com"] }; function addEmail(emailAddresses) { if (emailAddr.length == 0) { emailAddr.push({ customerID: emailAddresses.customerID, emails: emailAddresses.emails.slice(0) }); } else { // Checking var success = false; for (var i = 0; i &lt; emailAddr.length; i++) { if (emailAddr[i].customerID == emailAddresses.customerID) { success = true; for (var a = 0; a &lt; emailAddresses.emails.length; a++) { console.log("adding : " + emailAddresses.emails[a]); emailAddr[i]['emails'].push(emailAddresses.emails[a]); } } } if (!success) { emailAddr.push({ customerID: emailAddresses.customerID, emails: emailAddresses.emails.slice(0) }); } } } // End function addEmail(dataEmail2); addEmail(dataEmail3); addEmail(dataEmail4); console.log(emailAddr);
answers question: http://stackoverflow.com/q/26794048
type: Answer
has comment: http://stackoverflow.com/comment/42165715
score: 2

http://stackoverflow.com/comment/42022142
score: 0
has text: you could have better to prevent default submiting of the FORM, what should happen if user press `return` inside FORM? Should it submit FORM?
comment on: http://stackoverflow.com/q/26715791
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26682339
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26682211
has body: Just put the index into a var, i in this instance, and increment the value on each click. Also make sure to check if i is equal to the length of the array, if so reset it. A JS Fiddle for you var arr = [10001, 10302, 12303, 11004, 10044], i = 0; $(document).on('click', '#button', function() { if(i === arr.length){ i = 0; } $('#info').text(arr[i]); i++; return false; });
accepted answer of: http://stackoverflow.com/q/26682211
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/26712673
accepted answer of: http://stackoverflow.com/q/26712626
answers question: http://stackoverflow.com/q/26712626
score: 0
type: AcceptedAnswer
has body: function is return before window.open() function so return false; should be at bottom $(document).ready(function() { $('.open-new-window').click(function(){ window.open(this.href, 'newwindow', 'width=500, height=150'); return false; }); });
type: Answer

joomla-k2
tags question: http://stackoverflow.com/q/26782230
type: Tag
tag name: joomla-k2

http://stackoverflow.com/comment/49091758
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27293519
has text: Had `angular-mocks#1.2.x` and `angular#1.3.13` and started getting this error as soon as I needed to inject `$location` in my tests. After upgrading to `angular-mocks#1.3.13`, error went away.

http://stackoverflow.com/a/26778256
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26778206
answers question: http://stackoverflow.com/q/26778206
type: Answer
has body: Try this: {{atp}}

http://stackoverflow.com/a/26871333
accepted answer of: http://stackoverflow.com/q/26807193
has body: Below accurate version and w/o "February leap year" bug: HTML: Start Date End Date Days counted between dates: jQuery: $(document).ready(function() { $("#dataStart").datepicker({ minDate: '+1d', changeMonth: true, changeYear: true, dateFormat: 'mm/dd/yy', onSelect: function(date){ var dates = date.split('/'); var lastDate = new Date(dates[2], dates[0], 0); var y = lastDate.getFullYear(), m = lastDate.getMonth(), d = lastDate.getDate(); m = ('0'+ (m+1)).slice(-2); $('#dataEnd').val(m+'/'+d+'/'+y); var start = $('#dataStart').datepicker('getDate'); $('#dataEnd').datepicker({dateFormat: 'mm/dd/yy'}).datepicker('setDate', m+'/'+d+'/'+y); var end = $('#dataEnd').datepicker('getDate'); var days = ((end - start)/1000/60/60/24)+1; $('#calculated').text(days); } }); }); and JSFiddle PS. Thanks to Sµßhrånil∂ from jQuery Forum for tips
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26807193
type: Answer
score: 0

http://stackoverflow.com/comment/42129640
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26760845
has text: Only the destroy way is officially supported
score: 0

http://stackoverflow.com/q/26746517
answer count: 1
has answer: http://stackoverflow.com/a/26746952
tagged with: backbone.js
has body: Im new in backbone and Im stuck with this issue. I need to display 3 items for my collection and the after clicking show more display another 3 of them. I know I can use for example first() method for underscore.js but how ? Here is my code: $(function() { var Tasks = Backbone.Model.extend(); var TasksList = Backbone.Collection.extend({ model: Tasks, url: 'json/data.json' }); var TasksView = Backbone.View.extend({ el: "#tasks", template: _.template($('#taskTemplate').html()), render: function() { _.each(this.model.models, function(tasks){ var taskTemplate = this.template(tasks.toJSON()); $(this.el).append(taskTemplate); }, this); return this; } }); var tasks = new TasksList(); var tasksView = new TasksView({model: tasks}); tasks.fetch({reset:true}); tasks.bind('reset', function () { tasksView.render(); }); });
has title: How to display only 3 items from my backbone collection
type: AnsweredQuestion
tagged with: underscore.js
accepted answer: http://stackoverflow.com/a/26746952
linked to: http://stackoverflow.com/q/26755017
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/comment/42060147
comment on: http://stackoverflow.com/q/26737010
type: Comment
type: QuestionComment
has text: You can validate on client side, but that is not so secure, so you SHOULD always validate on server side too!
score: 1

http://stackoverflow.com/comment/42067696
has text: Right, but unbinding the click event isn't going to turn it off. It's just going to make the click not turn it back on. *(hint: `.on` binds a click event, and .off unbinds it. `.off` does not turn off any functionality, it simply unbinds an event.)*
type: QuestionComment
comment on: http://stackoverflow.com/q/26740761
type: Comment
score: 1

http://stackoverflow.com/comment/42171239
has text: have you checked no other code is modifying that content?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26798473

http://stackoverflow.com/comment/41996561
has text: The code I gave you above is working. Did you try it ?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26701365
type: AnswerComment

http://stackoverflow.com/q/26818893
has answer: http://stackoverflow.com/a/26819214
type: AnsweredQuestion
has body: I'm trying to simulate a publication doing a bunch of work and taking a long time to return a cursor. My publish method has a forced sleep (using a future), but the app always displays only Loading... Here's the publication: Meteor.publish('people', function() { Future = Npm.require('fibers/future'); var future = new Future(); //simulate long pause setTimeout(function() { // UPDATE: coding error here. This line needs to be // future.return(People.find()); // See the accepted answer for an alternative, too: // Meteor._sleepForMs(2000); return People.find(); }, 2000); //wait for future.return return future.wait(); }); And the router: Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading' }); Router.map(function() { return this.route('home', { path: '/', waitOn: function() { return [Meteor.subscribe('people')]; }, data: function() { return { 'people': People.find() }; } }); }); Router.onBeforeAction('loading'); Full source code: https://gitlab.com/meonkeys/meteor-simulate-slow-publication
score: 12
type: Question
upvote count: 12
has title: How do I simulate a slow Meteor publication?
downvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26819214
tagged with: meteor
favorite count: 0

http://stackoverflow.com/comment/42016586
type: QuestionComment
comment on: http://stackoverflow.com/q/26711810
score: 0
has text: Well I made the stupid mistake to use a foreach loop and add that jquery in for each product, so it would do the call mulitple times!
type: Comment

http://stackoverflow.com/q/26719794
possible better answer: http://stackoverflow.com/a/29813009
downvote count: 0
has answer: http://stackoverflow.com/a/40408042
tagged with: javascript
has answer: http://stackoverflow.com/a/29813009
has comment: http://stackoverflow.com/comment/44577990
answer count: 3
has title: Iterate over ES6 Set/Map in Coffeescript (with `of` operator)
favorite count: 0
has comment: http://stackoverflow.com/comment/42030301
accepted answer: http://stackoverflow.com/a/40408042
score: 16
has body: How can one iterate over an ES6 Map or Set in Coffeescript? In Javascript one would use e.g. s = new Set() s.add({a: 1}) for (x of s) { console.log(x); } However Coffeescript has its own of operator that gets converted to in, i.e.: console.log(x) for x of s becomes ... for (x in s) { ... }. How can one access Javascript's of operator in Coffeescript? One could write their own custom iterator by cycling over s.values().next(), but that'd be an abomination. :)
upvote count: 16
type: AnsweredQuestion
tagged with: coffeescript
has answer: http://stackoverflow.com/a/27911588
has comment: http://stackoverflow.com/comment/42030735
type: Question
tagged with: ecmascript-6
has comment: http://stackoverflow.com/comment/42029758
linked to: http://stackoverflow.com/q/24700210

http://stackoverflow.com/comment/42077480
comment on: http://stackoverflow.com/a/26745214
type: Comment
score: 0
has text: the reason there was ..... in place of localhost:8080 is due to the fact that when I tried to type that in, it wouldn't let me. Sorry. I know for a fact, however, that that is the correct link.
type: AnswerComment

http://stackoverflow.com/comment/42133297
comment on: http://stackoverflow.com/q/26777537
has text: what plugin are you using? doesn't the plugin provide a callback or an associated event?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26713175
type: Answer
score: 2
upvote count: 2
has body: I guess there is a problem in your CSS. Take a look at line 188 in your responsive.css. There's @media only screen and (max-width: 480px) and (min-with: 321px). Try to remove: position: absolute top: 50px Or replace it to position: static. Additional remarks You're using col-xs-12 col-sm-12 col-lg-12 - rather use container-fluid When you use col-lg-8 bootstrap makes it full-width for elements smaller than screen-lg-min. So col-xs-12 col-sm-12 are obsolete. You have some problem in footer. Because of improper structure: .container &gt; .row &gt; .container again. Cheers mate! I hope it helps.
has comment: http://stackoverflow.com/comment/42041832
accepted answer of: http://stackoverflow.com/q/26712821
answers question: http://stackoverflow.com/q/26712821
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26755194
downvote count: 0
has title: Using GM_xmlhttpRequest produces XrayWrapper denied access
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
has body: I'm trying to get info from a cross domain webpage using GM_xmlhttpRequest. It keeps on producing the following error: XrayWrapper denied access to property onload (reason: value is callable). See https://developer.mozilla.org/en-US/docs/Xray_vision for more information. Note that only the first denied property access from a given global object will be reported. The code is as follows: // ==UserScript== // @include http://stackoverflow.com/ // @grant GM_xmlhttpRequest // ==/UserScript== function GM_test4(){ console.log("test 4"); var xhr = GM_xmlhttpRequest({ method: "GET", url: "http://stackoverflow.com/", headers: { "User-Agent": "Mozilla/5.0", "Accept": "text/html" }, onload : function(xhr){ if(xhr.readyState == 4){ if(xhr.status == 200 &amp;&amp; xhr.responseText &amp;&amp; xhr.responseText.length &gt; 20){ console.log("Inside onload"); } } }, }); }
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: gm-xmlhttprequest

http://stackoverflow.com/q/26726549
has comment: http://stackoverflow.com/comment/42042540
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26726611
tagged with: http://stackoverflow.com/tag/html
score: 0
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42042136
has title: Changing the pitch of a speaking voice with JavaScript and html
answer count: 1
has body: I can change the speed of playback of a recording of a speaking voice very easily and effectively by using .playbackRate on an Audio tag . Is there any way to change the pitch of the voice during playback.
has comment: http://stackoverflow.com/comment/42042492
has comment: http://stackoverflow.com/comment/42042451

http://stackoverflow.com/comment/42025493
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26714928
has text: ahh cant believe i didn't see that. Even with the correct syntax it still wont read from my json file

http://stackoverflow.com/a/26784316
type: Answer
answers question: http://stackoverflow.com/q/26783379
has comment: http://stackoverflow.com/comment/42150399
score: 0
has body: I have no idea why, but this Gruntfile works fine now. I deleted my node_modules folder and package.json, then re-inititalized a new one and installed these modules: "devDependencies": { "grunt": "^0.4.5", "grunt-contrib-connect": "^0.8.0", "grunt-contrib-sass": "^0.8.1", "grunt-contrib-watch": "^0.6.1", "load-grunt-tasks": "^1.0.0" } and it works as i expected it to.
has comment: http://stackoverflow.com/comment/42153596

http://stackoverflow.com/comment/41970222
has text: possible duplicate of [How to cycle through siblings using jQuery?](http://stackoverflow.com/questions/7414573/how-to-cycle-through-siblings-using-jquery)
comment on: http://stackoverflow.com/q/26686030
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26777698
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26778218
type: Question
has title: onchange event on dynamic table row how to add text param
has body: I have code which allows for adding dynamic rows to a table, all working fine. On each row I have an onchange event, one of the params in the onchange event function needs to be some static text, the word: quantity, having problems just adding the static text to the onchange event. I have tried the following: onChange="postLineInput($(claim_id).val(),' + counter + ','quantity',$(this).val());" causes an error tried this: onChange="postLineInput($(claim_id).val(),' + counter + ',"quantity",$(this).val());" causes an error tried this: onChange="postLineInput($(claim_id).val(),' + counter + ',+ quantity +,$(this).val());" causes an error tried this: onChange="postLineInput($(claim_id).val(),' + counter + ','+ quantity +',$(this).val());" causes an error.
answer count: 1
tagged with: javascript
score: 0
tagged with: onchange

http://stackoverflow.com/a/26789541
upvote count: 1
score: 1
has body: Thanks to Danvk I figure out how to do it. Below is a jsfiddler links that demonstrate such a solution. http://jsfiddle.net/ng9vy8mb/10/embedded/result/ below is the javascript code that do the task. It changes the location of the marker in synchronizing with the video. There are still several improvement that can be done. Currently, if the user had zoomed in the graph and then click on it, the zoom will be reset. there is no support for you tube movies I hope that soon I can post a more complete solution that will also enable user to upload the graph data and video from their computer ; var dc; var g; var v; var my_graph; var my_area; var current_time = 0; //when the document is done loading, intialie the video events listeners $(document).ready(function () { v = document.getElementsByTagName('video')[0]; v.onseeking = function () { current_time = v.currentTime * 1000; draw_marker(); }; v.oncanplay = function () { CreateGraph(); }; v.addEventListener('timeupdate', function (event) { var t = document.getElementById('time'); t.innerHTML = v.currentTime; g.updateOptions({ isZoomedIgnoreProgrammaticZoom: true }); current_time = v.currentTime * 1000; }, false); }); function change_movie_position(e, x, points) { v.currentTime = x / 1000; } function draw_marker() { dc.fillStyle = "rgba(255, 0, 0, 0.5)"; var left = my_graph.toDomCoords(current_time, 0)[0] - 2; var right = my_graph.toDomCoords(current_time + 2, 0)[0] + 2; dc.fillRect(left, my_area.y, right - left, my_area.h); }; //data creation function CreateGraph() { number_of_samples = v.duration * 1000; // A basic sinusoidal data series. var data = []; for (var i = 0; i &lt; number_of_samples; i++) { var base = 10 * Math.sin(i / 90.0); data.push([i, base, base + Math.sin(i / 2.0)]); } // Shift one portion out of line. var highlight_start = 450; var highlight_end = 500; for (var i = highlight_start; i &lt;= highlight_end; i++) { data[i][2] += 5.0; } g = new Dygraph( document.getElementById("div_g"), data, { labels: ['X',…
answers question: http://stackoverflow.com/q/26760188
downvote count: 0
type: Answer

http://stackoverflow.com/q/26728904
has comment: http://stackoverflow.com/comment/42046021
has body: I have know that Math is an Object in javascript, however in the book it says when use the Math Object, we do not need to use the new keyword.For example, var pi = Math.PI; alert(pi); I want to know why it does not need, and in other Object, like Date, it needs the new keyword.
has answer: http://stackoverflow.com/a/26728920
tagged with: javascript
has answer: http://stackoverflow.com/a/26729304
has title: Why Math Object does not need new keyword in javascript
has answer: http://stackoverflow.com/a/26728908
downvote count: 1
upvote count: 4
answer count: 4
favorite count: 0
linked to: http://stackoverflow.com/q/413898
type: UnansweredQuestion
type: Question
score: 3
has answer: http://stackoverflow.com/a/26728935
tagged with: math

http://stackoverflow.com/comment/42191353
has text: What does`.focusout()` do exactly?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26809313

http://stackoverflow.com/comment/42061033
score: 1
type: AnswerComment
type: Comment
has text: Confirmed correct with [this JSFiddle](http://jsfiddle.net/troygizzi/0owft2cs/). However, I also added two other little changes for the OP to consider: (1) an example of throttling as a "best practice" when handling frequently-fired events like a window resize, and (2) an example of unbinding an event handler that is "idempotent" and therefore only needs to be called the first time it's triggered. Note that the throttling example is commented out in that fiddle, because for this particular case, unbinding makes more sense than merely throttling.
comment on: http://stackoverflow.com/a/26736540

http://stackoverflow.com/comment/42147618
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26785237
has text: Have you updated your jQuery version in the server?

http://stackoverflow.com/comment/44300650
comment on: http://stackoverflow.com/q/26746007
score: 0
has text: @JLRishe well, thats not too bad of an argument. Still they'd have to try hard to convince me to trust it as a browser after all these years but I admit that PM's in these forums are a pleasant surprise
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26754032
type: Question
has title: Using Javascript how can files be unzipped on mobile device from an app that is built using PhoneGap?
tagged with: unzip
answer count: 1
downvote count: 0
tagged with: javascript
has body: Using Phonegap 3.2.0, I am downloading a zip file and placing it in my mobile device. I am not supposed to use any Phonegap plugin to unzip this file. So, using JavaScript how can files be unzipped or deflated or extracted from a *.zip file on mobile device from a mobile app that is built using PhoneGap? PS: I am looking for a JavaScript based solution not a Phonegap plugin or Phonegap related solution. My zip file contains multiple files.
has answer: http://stackoverflow.com/a/26754416
favorite count: 0
tagged with: http://stackoverflow.com/tag/zip
tagged with: cordova
linked to: http://stackoverflow.com/q/21334174
type: UnansweredQuestion
upvote count: 1
score: 1

http://stackoverflow.com/comment/42039150
type: Comment
type: QuestionComment
has text: @Mike'Pomax'Kamermans my bad, I did miss looking at the actual css and was focused on the js properties
score: 0
comment on: http://stackoverflow.com/q/26724734

http://stackoverflow.com/q/26684603
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41997771
has comment: http://stackoverflow.com/comment/41967813
answer count: 0
linked to: http://stackoverflow.com/q/3953922
has body: I'm trying to make weather forecast using google map and wunderground api (since google weather layer is deprecated). I managed to apply custom icon markers for weather but I'm not sure how would I add text next to them just like they did https://developers.google.com/maps/documentation/javascript/examples/layer-weather Here is my piece of code var markers = [ ["London", 46.29999924, 16.37999916, 'http://api.wunderground.com/api/my_api_key/conditions/q/UK/London.json'], ["Manchester", 44.860735, 13.846721, 'http://api.wunderground.com/api/my_api_key/conditions/q/UK/Manchester.json'], ... ]; // for each city grab its json file and generate new marker $.each(markers, function(i, value){ $.ajax({ url : markers[i][3], dataType : "jsonp", success : function(data) { var position = new google.maps.LatLng(markers[i][1], markers[i][2]); bounds.extend(position); marker = new google.maps.Marker({ position: position, map: map, title: markers[i][0], icon: 'path_to_icon', }); map.fitBounds(bounds); } }); answer on this page works somewhat Is it possible to write custom text on Google Maps API v3? its just that i cant reposition text (it appears in corner and styling with css using "position: relative; top: -20px;" doesnt work). It also has a lot of code and I was hoping there is a better soluton nowadays since that reply was made in 2010. Thats like "Once upon a time..." in terms of web technologies :)
type: Question
tagged with: google-maps
has title: Google maps text next to marker
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42004568

http://stackoverflow.com/q/26753618
has title: CRM 4.0 - Create Method Cloning Quote Record
has body: Can anyone help me please? I'm trying to create a record using the create method through javascript. I need to copy all the fields' value and create a new entity. Like cloning a record in CRM 4.0 I'm using quote entity. I'm trying to pass the Opportunity. It was successful but when i look into the grid view, the opportunity field is blank. but in the form, it has a value. Then i try to look into the opportunity form and see related Quotation, but it doesn't appear there. Thank you for your reply. here's my code &gt; var authenticationHeader = GenerateAuthenticationHeader(); var OpportunityID = crmForm.all.opportunityid.DataValue[0].id; var varFields = "&lt;opportunityid&gt;"+ OpportunityID +"&lt;/opportunityid&gt;" var xml = "&lt;?xml version='1.0' encoding='utf-8'?&gt;" + "&lt;soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'"+ " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"+ " xmlns:xsd='http://www.w3.org/2001/XMLSchema'&gt;"+ authenticationHeader+ "&lt;soap:Body&gt;"+ "&lt;Create xmlns='http://schemas.microsoft.com/crm/2007/WebServices'&gt;"+ "&lt;entity xsi:type='quote'&gt;"+ varFields + "&lt;/entity&gt;"+ "&lt;/Create&gt;"+ "&lt;/soap:Body&gt;"+ "&lt;/soap:Envelope&gt;"; // Prepare the xmlHttpObject and send the request. var xHReq = new ActiveXObject("Msxml2.XMLHTTP"); xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false); xHReq.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/Create"); xHReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); xHReq.setRequestHeader("Content-Length", xml.length); xHReq.send(xml); // Capture the result var resultXml = xHReq.responseXML; // Check for errors. var errorCount = resultXml.selectNodes('//error').length; if (errorCount != 0) { var msg = resultXml.selectSingleNode('//description').nodeTypedValue; alert(msg); } // Open new contact record if no errors. else { var quoteid = resultXml.selectSingleNode("//CreateResult"); window.open("/sfa/quotes/…
answer count: 0
has comment: http://stackoverflow.com/comment/42133745
type: Question
tagged with: dynamics-crm-4
has comment: http://stackoverflow.com/comment/42132573
score: 0
has comment: http://stackoverflow.com/comment/42134033
tagged with: crm
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/q/26773912
has comment: http://stackoverflow.com/comment/42127421
tagged with: jquery-events
has answer: http://stackoverflow.com/a/26774146
has comment: http://stackoverflow.com/comment/42126992
upvote count: 1
possible better answer: http://stackoverflow.com/a/26774214
type: Question
has comment: http://stackoverflow.com/comment/42127461
has body: There is one button JavaScript of jQuery; first time I press the button, after some seconds again I press the same button. How to calculate the interval time between the two presses of a same button. Please can anyone help? Code I tried: this code down and up, how can I calculate for same button pressing? var startTime, endTime; $("#bu").on('mousedown', function () { startTime = new Date().getTime(); }); $("#bu").on('mouseup', function () { endTime = new Date().getTime(); longpress = (endTime - startTime < 500) ? false : true; });
type: AnsweredQuestion
has title: How to calculate interval time when same button clicked twice in JavaScript or jQuery
has answer: http://stackoverflow.com/a/26774214
accepted answer: http://stackoverflow.com/a/26774146
score: 1
tagged with: dom
answer count: 2
has comment: http://stackoverflow.com/comment/42127007
has comment: http://stackoverflow.com/comment/42126987
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/26688045
score: 2
has comment: http://stackoverflow.com/comment/41973652
has comment: http://stackoverflow.com/comment/41973443
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26687833
has comment: http://stackoverflow.com/comment/41973591
has comment: http://stackoverflow.com/comment/41973599
has body: To achieve what you want you've got some options. Choose which option is the best for you depending on your coding style, environment, etc. Here you are. Option 1 You can easily replace the .toString() method of the Array.prototype to return values separated by a vertical line (|) instead of the usual comma. You can do it like this: Array.prototype.toString = function() { return this.join("|"); }; Now you can easily do what you want: var t = { "fields": { "a": ["99", "98"] } }; console.log("My array is: " + t.fields); // My array is: 99|98 console.log("Its first element is: " + t.fields[0]); // Its first element is: 99 By the way, changing default objects' methods/properties is not always the best choice, because some libraries or native methods could use them and cause errors because they've been modified. Option 2 To achieve what you want, if you only have to do with a few arrays, you can modify their prototypes instead of the default Array.prototype, like this: // Let's assume you have arrays a, b and c var a = [1, 2], b = [3, 4], c = [5, 6]; a.toString = b.toString = c.toString = function() { return this.join("|"); }; This is a better way if you only work with few arrays, otherwise it would be heavy to change every prototype of every array you use, and would better do it with Array.prototype (like my first example). Option 3 Build your own function and use it. This is recommended because it doesn't change any existing prototype method, which could result in some errors depending on how you use your arrays. // Create your own function function myJoin(array) { return array.join("|"); } var a = [1, 2, 3]; myJoin(a); // "1|2|3" // Or add it to the prototype Array.prototype.myJoin = function() { return this.join("|"); } var b = [11, 22, 33]; b.myJoin(); // "11|22|33"
type: Answer
has comment: http://stackoverflow.com/comment/41973818
has comment: http://stackoverflow.com/comment/41973510
has comment: http://stackoverflow.com/comment/41974993
answers question: http://stackoverflow.com/q/26687833
upvote count: 3
downvote count: 1

http://stackoverflow.com/comment/108510080
has text: It should be window.location.href, not document.location.href
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26807624
type: Comment

http://stackoverflow.com/q/26815907
has body: I have two numbers, for example: var a = $('input#number_1').val(); // 12; var b = $('input#number_2').val(); // 0.01; How to fill a to precision of b? a: 12.01 b: 0.01 or fill both to for example: a: 12.0000 b: 0.0100 Edit: var a = parseFloat($('input#number_1').val()); // 12; var b = parseFloat($('input#number_2').val()); // 0.01;
has answer: http://stackoverflow.com/a/26836916
has answer: http://stackoverflow.com/a/26815962
score: -1
accepted answer: http://stackoverflow.com/a/26815962
has comment: http://stackoverflow.com/comment/42202729
type: Question
answer count: 2
upvote count: 0
tagged with: javascript
favorite count: 0
has title: How to fill two floats to precision of one of them?
possible better answer: http://stackoverflow.com/a/26836916
downvote count: 1
has comment: http://stackoverflow.com/comment/42202813
type: AnsweredQuestion

http://stackoverflow.com/comment/42141244
has text: IE8/9 uses `XDomainRequest`, which [jQuery does not (and will not) support](http://stackoverflow.com/questions/10232017/ie9-jquery-ajax-with-cors-returns-access-is-denied).
comment on: http://stackoverflow.com/q/26781535
type: Comment
type: QuestionComment
score: 3

http://stackoverflow.com/q/26725746
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42044858
has answer: http://stackoverflow.com/a/26743890
has title: What is the prefered way of simulating ui-sref from ng-swipe event?
accepted answer: http://stackoverflow.com/a/26743890
has comment: http://stackoverflow.com/comment/42073379
has comment: http://stackoverflow.com/comment/42040795
type: AnsweredQuestion
tagged with: angular-ui-router
has body: State Change On swipe: I need to trigger a state change using a swipe event. The ui-router docs lead em to $state.go() but i'm not sure if this is the best method? QUESTION: Using ng-swipe events how do I trigger a $state.go() with params?? Or is there a better approach to this scenario? I have a state called: name: 'root.store.ad.page.pageNumber', 'url': '/:pageNumber' on swipe of an li ideally it would look like this(doesn't have to): &lt;li ng-swipe-left="root.store.ad.page.pageNumber({pageNumber: nextPage})"&gt;&lt;/li&gt; Currently it looks like this : &lt;li ng-swipe-right="setPage(page.pageindex)"&gt;&lt;/li&gt; I've tried $state.go() but i'm having trouble making it work with params? ERROR: CTRL: scope.setPage = function(val){ //trying to make it just jump to page 5. $state.go('root.store.ad.page.pageNumber', { pageNumber: 5, } ); };
type: Question
has comment: http://stackoverflow.com/comment/42071145
tagged with: ui-sref
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42040862
score: 0

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/26711365
tags question: http://stackoverflow.com/q/26736793
type: Tag
tags question: http://stackoverflow.com/q/26798245
tags question: http://stackoverflow.com/q/26812936
tags question: http://stackoverflow.com/q/26746850
tags question: http://stackoverflow.com/q/26829555
tags question: http://stackoverflow.com/q/26770320

http://stackoverflow.com/q/26765072
score: 0
answer count: 1
has title: jquery autocomplete json response not filling up the textbox
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26766794
type: Question
has body: I am getting proper json response and I put javascript alert to check it, but not able to fill the data into text box using the response,why following code is not returning the items list to text box dropdown. response($.map(data, function (item) { alert(item.task_id); // getPreventDefault(); return { label: item.module_task, value: item.task_id}; })) is not working, i.e. it is not filling out the text box even though I got item.task_id and item.module_task correctly inside the success block. ** enter code here (function( $ ){ $(document).ready(function(){ $(document).on('click', '.autocomplete', function(){ $('[id^="repairRecordsTask"]').each(function() { $(this).autocomplete({ minLength:3, open: function() { // After menu has been opened, set width to 100px $('.ui-menu') .width(100); } , source : function(request, response) { //alert("inside the autocomplete "); $.ajax({ // alert("inside ajax"); url : "&lt;%=request.getContextPath()%&gt;/Task_Search_Controller.do", type : "GET", minLength: 3, contentType: "application/json; charset=utf-8", autoFill: true, //term is the input from request object data : { term : request.term }, dataType : "json", success : function(data) { alert(data.toString()); response($.map(data, function (item) { alert(item.task_id); // getPreventDefault(); return { label: item.module_task, value: item.task_id}; })) }, select: function (event, ui) { alert("here"); $(this).val(ui.item.module_task); //$(this).val(ui.item.value); //$("#txtAllowSearchID").val(ui.item.value); } /* error: function(jqXHR, textStatus, errorThrown){ //alert("error is " + errorThrown.toString()); // alert("error is " + textStatus); // alert("json reponse is " +jqXHR.responseJSON ); // alert("json reponse is " +jqXHR.responseJSON ); }*/ }); } }); }); $(document).on('autocompleteselect', '.autocomplete', function( event, ui ) { // alert("selected " + ui.item.value); var selectedTask = ui.item.value; lookUpDMCodeRea(selectedTask); }); }); }); })( jQuery ); and my json looks…

http://stackoverflow.com/comment/41984876
comment on: http://stackoverflow.com/q/26694828
score: 0
type: Comment
type: QuestionComment
has text: It's hard to understand your problem because you probebly used some online English translator. Anyway. Try changing to .

http://stackoverflow.com/comment/42033034
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26719908
type: Comment
has text: @eshortie You'll have to be more specific about the problem that using domains may cause. As I said in my answer, I've used domains for script-type code without any ill-effects. If this were meant to be used in a process that has to continue running indefinitely, that would be a different matter.

http://stackoverflow.com/q/26719884
has answer: http://stackoverflow.com/a/26719941
score: 70
tagged with: javascript
tagged with: gulp
has body: I am new to Gulp and wondering how can I minify (concatinate) my collection to single file instead of every file separately. Example var gulp = require('gulp'); var uglify = require('gulp-uglify'); gulp.task('minify', function () { gulp.src([ 'content/plugins/jquery/jquery-2.1.1.js', 'content/plugins/jquery/jquery-ui.js', 'content/js/client.js']) .pipe(uglify()) .pipe(gulp.dest('content/js/client.min.js')) // It will create folder client.min.js }); gulp.task('default', ['minify']); As you can see I'm trying to minify 3 javascript files and then output them into one client.min.js. Is it possible?
answer count: 3
favorite count: 0
possible better answer: http://stackoverflow.com/a/32930406
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26719941
downvote count: 0
upvote count: 70
has answer: http://stackoverflow.com/a/39050478
has title: Gulp minify multiple js files to one
type: Question
has answer: http://stackoverflow.com/a/32930406

kendo-ui
tags question: http://stackoverflow.com/q/26813738
tags question: http://stackoverflow.com/q/26715172
tags question: http://stackoverflow.com/q/26751811
type: Tag
tags question: http://stackoverflow.com/q/26793176
tags question: http://stackoverflow.com/q/26822621
tags question: http://stackoverflow.com/q/26738206
tags question: http://stackoverflow.com/q/26710929
tag name: kendo-ui
tags question: http://stackoverflow.com/q/26797247
tags question: http://stackoverflow.com/q/26760135
tags question: http://stackoverflow.com/q/26734769
tags question: http://stackoverflow.com/q/26746911
tags question: http://stackoverflow.com/q/26802106
tags question: http://stackoverflow.com/q/26715979

http://stackoverflow.com/q/26741674
type: Question
score: 0
has body: How can I stop all processes (loops, timeouts, intervals, etc.) and separately remove event handlers? I don't want to stop further execution, just stuff that's running. Example Usage: var i = 0; for(;;){ (i &gt;= 20000)?StopExecution:i++; }
has comment: http://stackoverflow.com/comment/42070313
has comment: http://stackoverflow.com/comment/42070115
has comment: http://stackoverflow.com/comment/42069857
tagged with: javascript
has comment: http://stackoverflow.com/comment/42069432
has comment: http://stackoverflow.com/comment/42069508
has comment: http://stackoverflow.com/comment/42069867
has comment: http://stackoverflow.com/comment/42069903
has title: Teminate all running processes
has comment: http://stackoverflow.com/comment/42069370
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42069260
has comment: http://stackoverflow.com/comment/42069963
has comment: http://stackoverflow.com/comment/42070057
has comment: http://stackoverflow.com/comment/42069811

window
tags question: http://stackoverflow.com/q/26743452
tags question: http://stackoverflow.com/q/26677156
tag name: window
tags question: http://stackoverflow.com/q/26734573
type: Tag
tags question: http://stackoverflow.com/q/26726455
tags question: http://stackoverflow.com/q/26683779

http://stackoverflow.com/a/26741865
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26741684
accepted answer of: http://stackoverflow.com/q/26741684
has body: You need to use html data- attribute to store the id of div which needs to be shown on click of bottle div: HTML: X Gary Vocals A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine. X Gary Vocals A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine. X Gary Vocals A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine. X Gary Vocals A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine. JQUERY: $(document).ready(function () { $(".colorbottle").click(function () { if (!$(this).hasClass('selected')) { $(".colorbottle.selected").removeClass("selected"); $(this).addClass("selected"); $(".ei_descr").fadeOut(1000); $('#' + $(this).data("id")).fadeIn(1000); $(".colorbottle").not(".selected").animate({ opacity: 0.2 }); $(".selected").animate({ opacity: 1 }); } }); }); UPDATED DEMO
type: AcceptedAnswer
downvote count: 0
score: 1

http://stackoverflow.com/comment/42109296
score: 0
has text: alright trying it out. I will inform you how it goes :p
type: AnswerComment
comment on: http://stackoverflow.com/a/26764111
type: Comment

http://stackoverflow.com/a/26693170
type: Answer
has body: function removeNodes(tree, desiredNode){ //check if node is one we want if (tree == desiredNode) { return tree; } //Check if root node contains any children. if(tree &amp;&amp; tree.children){ var children = tree.children; //Loop through all children and delete their everything further down in their hierarchy. for(var i = 0; i &lt; children.length; i++) { var node = removeNodes(children[i], desiredNode); if (node == desiredNode) { return node; } } } return false; //if no match found } var foo = removeNodes(tree, someNodeToKeep); if (foo) { var parent = tree.parentNode; parent.removeChild(tree); parent.appendChild(foo); //parent now contains only that node and children } Please note that like any recursive function, this can blow the stack on languages without proper tail calls, but unless you're using this to search a large data structure it should be fine.
score: 0
answers question: http://stackoverflow.com/q/26689301

http://stackoverflow.com/comment/41950603
score: 0
comment on: http://stackoverflow.com/q/26675594
type: Comment
type: QuestionComment
has text: Nothing in that code should not keep it from showing.

confirm
tags question: http://stackoverflow.com/q/26700716
tags question: http://stackoverflow.com/q/26708420
tag name: confirm
type: Tag

twilio
tag name: twilio
tags question: http://stackoverflow.com/q/26758144
type: Tag

http://stackoverflow.com/comment/45735825
type: Comment
comment on: http://stackoverflow.com/q/26756500
score: 2
has text: you can use the onEscape: function(){//callback } to do the trick with the options, you have given, give this as well and just say return in that onEscape: function(){return;} done http://bootboxjs.com/documentation.html
type: QuestionComment

express
tags question: http://stackoverflow.com/q/26723904
tags question: http://stackoverflow.com/q/26800740
tags question: http://stackoverflow.com/q/26695481
tags question: http://stackoverflow.com/q/26831643
tags question: http://stackoverflow.com/q/26712618
tags question: http://stackoverflow.com/q/26776093
tags question: http://stackoverflow.com/q/26780760
tags question: http://stackoverflow.com/q/26795766
tags question: http://stackoverflow.com/q/26690271
tags question: http://stackoverflow.com/q/26813431
tags question: http://stackoverflow.com/q/26681307
tags question: http://stackoverflow.com/q/26782628
tags question: http://stackoverflow.com/q/26674640
tags question: http://stackoverflow.com/q/26698218
tags question: http://stackoverflow.com/q/26761151
tags question: http://stackoverflow.com/q/26706209
tags question: http://stackoverflow.com/q/26809082
tags question: http://stackoverflow.com/q/26786681
tags question: http://stackoverflow.com/q/26795344
tags question: http://stackoverflow.com/q/26756237
tags question: http://stackoverflow.com/q/26791289
tags question: http://stackoverflow.com/q/26787606
tags question: http://stackoverflow.com/q/26786756
tags question: http://stackoverflow.com/q/26813053
tags question: http://stackoverflow.com/q/26749175
tags question: http://stackoverflow.com/q/26724192
tags question: http://stackoverflow.com/q/26684614
tags question: http://stackoverflow.com/q/26748612
tags question: http://stackoverflow.com/q/26825521
tags question: http://stackoverflow.com/q/26714354
tags question: http://stackoverflow.com/q/26727931
tags question: http://stackoverflow.com/q/26736067
tags question: http://stackoverflow.com/q/26730396
tags question: http://stackoverflow.com/q/26743655
tags question: http://stackoverflow.com/q/26812190
tags question: http://stackoverflow.com/q/26816008
tags question: http://stackoverflow.com/q/26692629
tags question: http://stackoverflow.com/q/26779846
tags question: http://stackoverflow.com/q/26712002
tags question: http://stackoverflow.com/q/26730134
tags question: http://stackoverflow.com/q/26702006
tag name: express
tags question: http://stackoverflow.com/q/26737883
tags question: http://stackoverflow.com/q/26766075
tags question: http://stackoverflow.com/q/26762353
tags question: http://stackoverflow.com/q/26808590
tags question: http://stackoverflow.com/q/26686379
tags question: http://stackoverflow.com/q/26691600
type: Tag
tags question: http://stackoverflow.com/q/26810796
tags question: http://stackoverflow.com/q/26811857
tags question: http://stackoverflow.com/q/26764686
tags question: http://stackoverflow.com/q/26736497
tags question: http://stackoverflow.com/q/26696868
tags question: http://stackoverflow.com/q/26740829
tags question: http://stackoverflow.com/q/26798251
tags question: http://stackoverflow.com/q/26819604
tags question: http://stackoverflow.com/q/26773347

http://stackoverflow.com/q/26692852
has title: X-editable with ASP MVC View, how to get the submitted form POST action to the controller
upvote count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/51672555
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42279991
has body: I am using X-Editable Plugin to capture user input, and performing submission to server. I'm getting an error on submission, what should I change to get the x-editable data working with the form. Do I change the Controller (signature or attribute?), or the Javascript AJAX arguments to get past the submission? for some scenarios, how do I autodetect the change in the inline, X-editable texbox to perform a post right away, when user leaves the box. What would I need to change in the Javascript to make it work with a partial view Would it enhance my solution if I were to encapsulate the HTML in a form, and use the user button submission Javascript: $('#Application').editable({ url: function (params) { return $.ajax({ url: 'Application/Create', type: "POST", contentType: 'application/json; charset=utf-8', data: JSON.stringify(params), dataType: 'json', async: true, success: function (response) { alert("Success"); }, error: function () { alert("Error in Ajax"); } }); } }); HTML: &lt;!-- language: lang-html --&gt; &lt;a href="#" id="Application" class="EditableApplication"&gt;&lt;/a&gt; &lt;!-- language: C# --&gt; [HttpPost] //[Authorize] public ActionResult Create(String params) { var = params; //Deserialize and Get params here and create application objeci Return View(); }
has answer: http://stackoverflow.com/a/27438539
type: Question
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/42996304
tagged with: x-editable
tagged with: javascript
tagged with: ajax
answer count: 2

http://stackoverflow.com/a/26729680
has comment: http://stackoverflow.com/comment/42048113
type: Answer
has comment: http://stackoverflow.com/comment/42047309
score: 0
has comment: http://stackoverflow.com/comment/42047920
has comment: http://stackoverflow.com/comment/42047680
has body: Sounds like you will want to bind to the document's ready event. This will wait till the document is loaded and it will allow your code to run after the document has been fully returned from the server. The easiest way to do this (and not use a library like jQuery) to use a self executing anonymous function: &lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; Your HTML here &lt;script&gt; (function() { // the document will be loaded here })(); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;
has comment: http://stackoverflow.com/comment/42047447
answers question: http://stackoverflow.com/q/26729555
has comment: http://stackoverflow.com/comment/42047532

http://stackoverflow.com/q/26798533
score: 0
has comment: http://stackoverflow.com/comment/42171401
has comment: http://stackoverflow.com/comment/42202877
has comment: http://stackoverflow.com/comment/42172087
tagged with: http://stackoverflow.com/tag/html
has body: I'm new to AngularJS and I'm working on this sample which is using AngularJS to making a slider <dive> tag I want to add another slider to HTML after clicking a button. This is how I changed the HTML part Click here for Hipster Ipsum. Bespoke aesthetic Bushwick craft beer. Qui aesthetic butcher, cardigan ex scenester Neutra American Apparel mumblecore. Add slider Slider And my Javasciprt code now looks like this angular.module('angularSlideables', []) .directive('slideable', function () { return { restrict:'C', compile: function (element, attr) { // wrap tag var contents = element.html(); element.html(' ' + contents + ' '); return function postLink(scope, element, attrs) { // default properties attrs.duration = (!attrs.duration) ? '1s' : attrs.duration; attrs.easing = (!attrs.easing) ? 'ease-in-out' : attrs.easing; element.css({ 'overflow': 'hidden', 'height': '0px', 'transitionProperty': 'height', 'transitionDuration': attrs.duration, 'transitionTimingFunction': attrs.easing }); }; } }; }) .directive('slideToggle', function() { return { restrict: 'A', link: function(scope, element, attrs) { var target = document.querySelector(attrs.slideToggle); attrs.expanded = false; element.bind('click', function() { var content = target.querySelector('.slideable_content'); if(!attrs.expanded) { content.style.border = '1px solid rgba(0,0,0,0)'; var y = content.clientHeight; content.style.border = 0; target.style.height = y + 'px'; } else { target.style.height = '0px'; } attrs.expanded = !attrs.expanded; }); } } }); function goAdd() { var ht=" Another Slider hi my name is Alex "; document.getElementById('slideholder').innerHTML=ht; } Although I'm making the exact code, my slider doesn't work. I think its because the module doesn't get to reload after I add some more HTML codes. So my question is how to reload the javascript module after I clicked the button? I'm going to use this code in my Cordova project for an android app using ionic, if it makes any difference. Thank you
has comment: http://stackoverflow.com/comment/42172823
has comment: http://stackoverflow.com/comment/42174844
has title: How to reload js module after changing the HTML programmatically?
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42208109
has comment: http://stackoverflow.com/comment/42171231
has comment: http://stackoverflow.com/comment/42218536
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42171026

http://stackoverflow.com/comment/42127071
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26768908
has text: Do you have a respond_to foramt.js in your controller?
score: 0

http://stackoverflow.com/q/26696174
score: 2
downvote count: 0
has title: Using React JS .12, how can the ownee know what ref it has been assigned
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41987860
has answer: http://stackoverflow.com/a/26701489
type: Question
has body: I have a problem that I have been battling out all night. I recently upgraded to .12 and I'm running into problems with my child (ownee) component getting the ref it was given. I understand that the ref attribute was removed from this.props but I cant seem to find it anywhere in my child component! Pretty much typeof this.ref === "undefined" Any ideas would be great! I'm tired of fighting tonight. Signing off.
has answer: http://stackoverflow.com/a/26727450
upvote count: 2
answer count: 2
type: UnansweredQuestion
tagged with: reactjs

http://stackoverflow.com/comment/42088070
score: 0
type: Comment
type: QuestionComment
has text: are you converting it to UTC date format before sending it to server?
comment on: http://stackoverflow.com/q/26752367

object-literal
tag name: object-literal
tags question: http://stackoverflow.com/q/26792125
type: Tag

http://stackoverflow.com/comment/41973138
type: AnswerComment
type: Comment
has text: just concerned about using sessionStorage , do it will give me same security and flexibility like asp or jsp gives ? can i code it to have one user session at a time ?
comment on: http://stackoverflow.com/a/26687496
score: 0

http://stackoverflow.com/comment/42205998
type: QuestionComment
has text: I think you're mixing up lista and list, additionally, you need to remove from lista, not lista[i].
score: 1
comment on: http://stackoverflow.com/q/26817886
type: Comment

http://stackoverflow.com/q/26674094
type: UnansweredQuestion
tagged with: buttonclick
has title: Change the order of images by clicking buttom
tagged with: onclick
duplicate of: http://stackoverflow.com/q/7742305
has answer: http://stackoverflow.com/a/26675137
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26675709
linked to: http://stackoverflow.com/q/282670
tagged with: javascript
has body: Help me to solve this trivial problem. I need to change an image order within button_Click. How can I do this? Actualy I need the **simplest** way, **no jQuery**. Will be very grateful for piece of working code with explanation - It's a headache for me [Here][1] is my code PS I already got some advises, but all them conneted to jQuery No jQuery Header HeaderHeaderHeader text text text
linked to: http://stackoverflow.com/q/7742305
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41947736

http://stackoverflow.com/comment/41954241
type: QuestionComment
comment on: http://stackoverflow.com/q/26677126
has text: @Nick to be fair, it was another SO member who suggested the OP create a new question about this.
score: 0
type: Comment

http://stackoverflow.com/comment/41958224
type: QuestionComment
has text: Similar to what @trnelson said, that value could also be cached and reset from `sessionStorage` (or, less appropriately in this case, `localStorage`).
type: Comment
comment on: http://stackoverflow.com/q/26679607
score: 1

http://stackoverflow.com/comment/42138328
comment on: http://stackoverflow.com/q/26779996
type: QuestionComment
type: Comment
has text: @LcSalazar Looks interesting. I need to look into that.
score: 0

http://stackoverflow.com/comment/42057396
score: 0
comment on: http://stackoverflow.com/q/26735256
type: Comment
type: QuestionComment
has text: Thanks for the response,here is jsfiddle link http://jsfiddle.net/premkumar_ks16/qgtxbx57/

http://stackoverflow.com/comment/42197582
type: QuestionComment
score: 2
has text: (I know this is off-topic, but) wow! `` elements with inline styles. Really?
type: Comment
comment on: http://stackoverflow.com/q/26812720

http://stackoverflow.com/q/26681116
has body: I'm building a function that will automatically scan a folder on server start or on folder change. The script will assemble a widgets folder for installed widgets, then concatenate and build a new partial file for inclusion in the front end app. The script looks like: concat.readMethodContents = function(concat) { var widget; for (widget in concat.widgets) { var method; for (method in concat.widgets[widget]) { if (concat.widgets[widget][method].ready) { concat.widgets[widget][method].ready = false; fs.readFile('./lib/widgets/' + widget + '/methods/' + concat.widgets[widget][method].handle, 'utf8', function(err, data) { if (err) { console.log(err); } else { concat.widgets[widget][method].contents = data; concat.writeJsPartialFile(concat); } }); } } } } Before this method is called, the concat object looks like: { "widgets": { "hello_world": [{ "handle": "method1.js", "ready": true }, { "handle": "method2.js", "ready": true }, { "handle": "method3.js", "ready": true }] } } The problem with the script is that when method is called, it is defined as done because the loop has finished and the async function is running a callback. How can I encapsulate or otherwise preserve the variable through that part of the operation?
has comment: http://stackoverflow.com/comment/41960958
linked to: http://stackoverflow.com/q/26682287
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: scope
tagged with: asynchronous
tagged with: node.js
has title: Undefined Variable Inside Looped Async Function in Node.js
tagged with: loops
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26682899
accepted answer: http://stackoverflow.com/a/26682899

http://stackoverflow.com/q/26777869
has body: I am looking at using Handlbars templating for my project. Can handlebars return a DOM object or can it only return HTML. For instance if I want to append a child to a DIV can I call DIV.appendChild(myTemplate); Something like this: var parentDiv = document.getElementById("parentDiv"); for(var i = 0;i&lt;myData.length;i++){ var source = $("#my-template").html(); var template = Handlebars.compile(source); var values = myData[i]; parentDiv.appendChild(template(values)); } From this I get an arg 1 of appendChild is not an object error thrown, because the rendered template is html/string. Is there something I can call in handlebars to gerenate objects? Am I trying to stetch templating too far or is there another solution that behaves in this manner or am I stuck writing createElement manually?
downvote count: 0
tagged with: javascript
type: AnsweredQuestion
has title: Handlebars/templating use template as an object
tagged with: template-engine
score: 1
favorite count: 0
type: Question
tagged with: handlebars.js
answer count: 1
linked to: http://stackoverflow.com/q/7327056
has answer: http://stackoverflow.com/a/26778077
upvote count: 1
accepted answer: http://stackoverflow.com/a/26778077

http://stackoverflow.com/comment/42010693
has text: @JamesShaver , he is sparky , :) his code Will work for sure :)
comment on: http://stackoverflow.com/a/26707682
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/42095443
comment on: http://stackoverflow.com/a/26755918
type: Comment
has text: My bad. Misunderstood it. Check this link for your refrence: http://stackoverflow.com/questions/24248576/prevent-form-submission-javascript
type: AnswerComment
score: 0

http://stackoverflow.com/q/26807927
has title: MVC post list of objects with property of SortedDictionary type
tagged with: javascript
has comment: http://stackoverflow.com/comment/42190655
tagged with: post
has body: im working on an mvc project and im stuck with posting an unknown number of values (complex object) - input fields are javascript generated. The problem is that on form POST, the properties of type SortedDictionary are empty. Here is how all of it looks like: The controller: public virtual ActionResult AddLocation(CompanyLocationModel model) { ...do something with the model ... } The CompanyLocationModel(simplified): public class CompanyLocationModel { public CompanyLocationModel() { WorkingHours = new List&lt;WorkingHour&gt;(); } public ObjectId Id { get; set; } public List&lt;WorkingHour&gt; WorkingHours { get; set; } ..... } The working hour class: public class WorkingHour { public WorkingHour() { Hours = new SortedDictionary&lt;DateTime, DateTime&gt;(); } public int DayOfWeek { get; set; } public SortedDictionary&lt;DateTime, DateTime&gt; Hours { get; set; } } How the html should look like? I've tried this: &lt;input type="hidden" name="WorkingHours[0].DayOfWeek" value="1"&gt; &lt;input type="hidden" name="WorkingHours[0].Hours[08:00]" value="16:00"&gt; ... repeat n times... and this: &lt;input type="hidden" name="WorkingHours[0].DayOfWeek" value="2"&gt; &lt;input type="hidden" name="WorkingHours[0].Hours.Key" value="08:00"&gt; &lt;input type="hidden" name="WorkingHours[0].Hours.Value" value="16:00"&gt; ... repeat n times... But it doesnt work. The WorkingHours list is submited and I get the DayOfWeek value of each item on POST, but the Hours value is empty.
has comment: http://stackoverflow.com/comment/42190816
score: 0
has comment: http://stackoverflow.com/comment/42190941
has comment: http://stackoverflow.com/comment/42189682
tagged with: sorteddictionary
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42190527
type: Question
has comment: http://stackoverflow.com/comment/42189476
tagged with: c#
tagged with: asp.net-mvc

http://stackoverflow.com/a/26722259
upvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/26721994
score: 3
downvote count: 0
has body: The problem is that you are doing a return, expecting that the router will get the content. Since is an async callback, that will not work. You need to refactor your code to be async. When you are doing return body; the function that is being returned is the callback of request, and in no part you are sending the body to the router. Try this: function getJson(myid, req, res) { var headers, options; // Set the headers headers = { 'User-Agent': 'Super Agent/0.0.1', 'Content-Type': 'application/x-www-form-urlencoded' } // Configure the request options = { url: 'http://www.XXXXXX.com/api/get_product.php', method: 'GET', headers: headers, qs: {'id': myid} } // Start the request request(options, function (error, response, body) { if (!error &amp;&amp; response.statusCode == 200) { res.send(body); } else { console.log(error); } }); } And this router: router.get('/:id', function(req, res) { getJson(req.params.id, req, res); }); Here, you are instead passing the res param to the getJson function, so the callback of request will be able to call it as soon as its able to do it.
has comment: http://stackoverflow.com/comment/42034339

datagridview
tag name: datagridview
tags question: http://stackoverflow.com/q/26750671
type: Tag

http://stackoverflow.com/q/26792190
downvote count: 0
possible better answer: http://stackoverflow.com/a/26792254
favorite count: 0
has comment: http://stackoverflow.com/comment/42159913
score: 6
tagged with: http://stackoverflow.com/tag/html
upvote count: 6
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26792254
has body: When reading about HTML5 on W3Schools I have come across a section called HTML APIs. These are for example how to use geolocation and drag/drop on a webpage. See example here W3Schools.com - geolocation Now the code is JavaScript and placed inside a HTML script tag. So my questions is, is these APIs a part of the HTML5 standard? I thought HTML was only HTML and not Javascript so why is this placed under HTML5?
accepted answer: http://stackoverflow.com/a/26796723
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26796723
answer count: 2
has title: HTML APIs - Are they a part of the HTML5 standard?

http://stackoverflow.com/comment/42160700
has text: @Godisgood please find the code
comment on: http://stackoverflow.com/q/26791903
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42108797
comment on: http://stackoverflow.com/a/26763821
type: AnswerComment
score: 0
type: Comment
has text: @Jose the title of your question is: "AngularJS display complex Object" and I'm showing you how you can display that object in your view. Perhaps you need to re-formulate your original question.

http://stackoverflow.com/comment/42043424
comment on: http://stackoverflow.com/q/26727261
has text: toggle(fn,fn) is deprecated , should avoid using it in new code http://api.jquery.com/toggle-event/
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26816312
has comment: http://stackoverflow.com/comment/42203324
type: Question
tagged with: javascript
score: 0
has title: Recursive XML walk finding empty nodes
answer count: 1
tagged with: http://stackoverflow.com/tag/xml
has body: Using the following function var data = []; function recurseXML(node, path) { var i, nodes; if (node.hasChildNodes()) { nodes = node.childNodes; path += (path ? "." : "") + node.tagName if (nodes.length &lt; 2) { recurseXML(nodes[0], path); } else { for (i = 0; i &lt; nodes.length; i += 1) { recurseXML(nodes[i], path + "[" + i + "]"); } } } else { data.push(path + " " + (node.nodeValue).trim()); } } When I try to walk the XML in this fiddle it outputs as though there are empty nodes, yet there isn't What's causing this, and how can I fix it?
has answer: http://stackoverflow.com/a/26816504
accepted answer: http://stackoverflow.com/a/26816504
type: AnsweredQuestion
tagged with: recursion
has comment: http://stackoverflow.com/comment/42203526

http://stackoverflow.com/a/26823924
type: Answer
score: 0
has body: Try this: function updateDiv(hash) { var $div = $('#nav-aj'); var options = $div.data('options'); switch (hash) { case 'A': options['default'] = 't1'; break; case 'B': options['default'] = 't2'; break; default: option['default'] = 't1'; } $div.attr('data-options', options); } $(function () { var hash = window.location.hash.split('#')[1] updateDiv(hash); $(window).on('hashchange', function () { updateDiv(window.location.hash.split('#')[1]); }); }); Also, use this since you have a bad quote in your data-options: &lt;div id="nav-aj" data-options='{"default":"t1","animation": {"duration": 500, "effects": "fade"}}'&gt;&lt;/div&gt;
answers question: http://stackoverflow.com/q/26823724

http://stackoverflow.com/comment/41992495
type: Comment
type: QuestionComment
has text: Whatever I do the overlayImage0 is always contained within the div tag in Chrome.
comment on: http://stackoverflow.com/q/26699096
score: 0

http://stackoverflow.com/comment/42146759
has text: there is no code to run, the svg is made in illustrator and is simply loaded to the canvas by fabric.loadSVGFromURL .
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26784912

http://stackoverflow.com/a/27438539
answers question: http://stackoverflow.com/q/26692852
downvote count: 0
has body: This seemed to work for me ... Javascript ... $('#searchresult a').editable({ url: function (params) { var requestData = ''; if (params.name == 'employeeno') requestData = { UserName: params.pk, EmployeeNo: params.value } else return; //perform no update return $.ajax({ cache: false, async: true, type: 'POST', data: requestData, url: 'EASMUser/UpdateAccountProperty', beforeSend: showWaitCursor('Updating EASM Account ...'), success: function (response) { alert("Success"); }, error: function (data) { debugger; alert(data); } }); } } ); Model ... public class EASMUserViewModel { public string UserName { get; set; } public string EmployeeNo { get; set; } public string Password { get; set; } public List<Entity> Entities {get; set;} /// /// Helper method to convert to string /// /// public string EntitiesToString() { if (Entities == null || Entities.Count == 0) return string.Empty; StringBuilder sb = new StringBuilder(); foreach( Entity pe in Entities) { string target = sb.Length > 0 ? ",{0}": "{0}"; sb.AppendFormat(target, Convert.ToInt32(pe)); } return sb.ToString(); } } Controller Method ... [HttpPost] public ActionResult UpdateAccountProperty(EASMUserViewModel easmuser ) { try { //using a grid with multiple x-editable controls if (!string.IsNullOrEmpty(easmuser.EmployeeNo)) { //Updating Employeeno //TODO: update db } else if (!string.IsNullOrEmpty(easmuser.Password)) { //Updating password //TODO: update db } return Content(string.Format("[{0}] updated successfully.", easmuser.UserName)); } catch (Exception exc) { //TODO: Add logging return ThrowJsonError(exc); } } Mark up (creating a table body with multiple x-editable controls) ... @foreach (var item in Model) { @item.UserName @item.EmployeeNo @item.Password }
type: Answer
score: 3
upvote count: 3

http://stackoverflow.com/q/26831626
accepted answer: http://stackoverflow.com/a/26832090
downvote count: 1
has title: Part of the function code isn't executed
has body: I'm doing a simple web app in javascript for a school project. It seems to be easy, but when I call a function not all lines of code are executed. It seems to stop after the for cicle. In fact nothing happens after the click on button. function calcola(){ var texts = document.getElementsByTagName('input'); var selects = document.getElementsByTagName('select'); var ang; var v; var h; for (var i=0;i&lt;texts.length+selects.length;i++) { if (selects[i].id == 'a') { ang = selects[i].value; } if (selects[i].id == 'v') { v = selects[i].value; } if (texts[i].id == 'h') { h = texts[i].value; } } var vy0 = v*Math.sin(ang*(Math.PI/180)); var t1 = vy0/9.81; var h1 = (vy0*t1)/2; var ht = h + h1; var t2 = Math.pow((2*ht)/9.81,0.5); var tt = t1 + t2; var vx0 = v*Math.cos(ang*(Math.PI/180)); var x = vx0*tt; document.body.innerHTML = "&lt;center style='font-size: 4.5em; font-family: monospace'&gt;Distanza percorsa: " + Math.round(x*100)/100 + " m&lt;/center&gt;&lt;br&gt;&lt;center style='font-size: 4.5em; font-family: monospace'&gt;Velocita' Iniziale: " + v + " m/s&lt;/center&gt;&lt;br&gt;&lt;center style='font-size: 4.5em; font-family: monospace'&gt;Angolazione: " + a + "&amp;deg;&lt;/center&gt;&lt;br&gt;&lt;center style='font-size: 4.5em; font-family: monospace'&gt;Newton Di Spinta: " + "..." + " N&lt;/center&gt;"; }
type: Question
upvote count: 0
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26832090
answer count: 1
has comment: http://stackoverflow.com/comment/42229940
favorite count: 0
has comment: http://stackoverflow.com/comment/42229850
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/comment/42506319
type: QuestionComment
comment on: http://stackoverflow.com/q/26747667
type: Comment
score: 0
has text: Hello Gordon thanks for your swift reply, the issue I am facing in particular is about filtering the right values. For both the chart sets I am using the same data therefore I only have one record for year 2010 and carrier 1117. But in the case of savings all the carrier's are shown when year 2010 is selected in the year pie chart. Whereas DIFOT carrier chart gets the right year filter and thus displays the data for that particular year. Thanks.

http://stackoverflow.com/comment/42081710
has text: Sure, using `split` in this way is a nice technique, but it's four times slower than using replace.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26748555
score: 0

http://stackoverflow.com/a/26721435
answers question: http://stackoverflow.com/q/26720134
has body: The date in the JSON needed to be a Date object which flot expects in time mode. So following worked for me: (converting string date to Date object before passing to flot): var graph_json = $.parseJSON(data); var j, i; for(j=0;j&lt;graph_json.length;j++){ for(i=0;i&lt;graph_json[j].data.length;i++){ graph_json[j].data[i][0] = new Date(graph_json[j].data[i][0]); } }
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26720134
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42114892
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26764407
type: Comment
has text: That would be correct. Without CORS support on the salesforce server, your only option is to make the request servers-side rather than client-side. (unless the salesforce server supports JSONP)

http://stackoverflow.com/comment/42257983
comment on: http://stackoverflow.com/q/26799375
score: 0
type: Comment
type: QuestionComment
has text: I agree, it's not correct. To fix it, I would need a properly drafted Requirement Spec and would probably choose to rewrite the code from scratch.

http://stackoverflow.com/a/26829584
score: 0
has body: To know if form is valid you have to add a form tag and inside your controller check $valid, on your example the form is always valid becaus you do not have any required field. See the below example on codepen The HTML Product Id: Product Name: {{result}} Form is valid: {{myform.$valid}} The JS var myModule = angular.module('myModule', []); myModule.controller('myCtrl', ['$scope', function ($scope) { $scope.myModel = {}; $scope.result = "(null)"; var getdata = function (newVal, oldVal) { var valid = null; if ($scope.myform.$valid) { valid = "is valid"; } else { valid = "is INVALID"; } $scope.result = "Changed value " + newVal + " form " + valid; }; $scope.$watch('myModel.id', getdata); $scope.$watch('myModel.productname', getdata); }]);
type: Answer
answers question: http://stackoverflow.com/q/26829088

http://stackoverflow.com/q/26809351
has comment: http://stackoverflow.com/comment/42191965
type: Question
accepted answer: http://stackoverflow.com/a/26809590
downvote count: 0
tagged with: javascript
has body: I would like display a list of objects from my controller using a directive. Inside that directive I'd like to be able to use one of several possible directives, but I won't always know which one. If I set that directive name in the controller's scope, how can I use it within the template of the main directive? Here's a plnkr with what's below. HTML: Favorite Bands JS: angular.module('music', []); angular.module('music').controller('rock', ['$scope', function($scope){ $scope.directiveName = 'dinosaurs'; $scope.bands = [ { name:'Rush'}, { name:'King Crimson' }, { name: 'Porcupine Tree'}, { name: 'Marillion'}]; }]); angular.module('music').directive('prog', function(){ return { restrict: 'E', replace: true, template: ' <{{directiveName}}>{{band.name}}</{{directiveName}}> ' }; }); angular.module('music').directive('dinosaurs', function(){ return { restrict: 'E', transclude: true, template: '<ng-transclude></ngtransclude> - DINOSAUR!' }; }); In this case, I'm setting the $scope.directiveName to dinosaurs, which is the name of the directive I want to use inside the main one, called prog. In prog's template, I'm trying to use interpolation to insert the name of the directive into the brackets. That, however, outputs this: <dinosaurs>Rush <dinosaurs>King Crimson <dinosaurs>Porcupine Tree <dinosaurs>Marillion I've also tried using class name on a span: , and that inserts "dinosaurs" into the span as a class but Angular doesn't then process it as a directive. I'm not sure if I need an isolate scope here, but from what I've read I don't think that's relevant. I'm also new to transclusion, but I think that the dinosaurs directive should take the content of each list item and add " - DINOSAURS!" to the end of it. What's the best practice way to go about passing in the name of one directive to another?
answer count: 3
has comment: http://stackoverflow.com/comment/42191706
linked to: http://stackoverflow.com/q/16787276
has comment: http://stackoverflow.com/comment/42191361
score: 1
favorite count: 0
possible better answer: http://stackoverflow.com/a/26809885
tagged with: angularjs
has title: Can I use arbitrary AngularJS directives inside other directives?
has answer: http://stackoverflow.com/a/26809885
has answer: http://stackoverflow.com/a/26810064
upvote count: 1
has comment: http://stackoverflow.com/comment/42192070
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26809590

http://stackoverflow.com/a/26779952
accepted answer of: http://stackoverflow.com/q/26779863
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/42138197
downvote count: 0
has body: Try this: $('#select_element option:selected').attr('val'); Or $('#select_element option:selected').val(); both are valid!
score: 4
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26779863

http://stackoverflow.com/a/26831210
answers question: http://stackoverflow.com/q/26831135
score: 0
has body: you must know that a dropdown (select) is not a input tag is a select tag, you are searching for an input but the dropdown is a select not an input
type: Answer

http://stackoverflow.com/comment/42061540
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26737611
score: 0
has text: No, post your code in your answer. If jsFiddle ever goes away or is inaccessible, your answer loses all value. jsFiddle should *supplement* an answer, not be the sole source of it.

http://stackoverflow.com/a/45230609
has body: none work but changing the bootstrap itself from (this.$body.css("padding-right")||0,10) to (this.$body.css("padding-right")||0,0) Took me about an hour to find it and change
score: 0
answers question: http://stackoverflow.com/q/26819725
type: Answer

http://stackoverflow.com/q/26740478
tagged with: angularjs
score: 0
has answer: http://stackoverflow.com/a/26740739
type: AnsweredQuestion
type: Question
has body: I have a big json object I am using to control a cascading select list that I am trying to filter down to prepare for sending to the server. The structure looks something like this - Accounts[{name:account1, id:1, selected:false, schools:[{name:school1, id:2,selected:true}]}] (With multiple accounts with multiple schools in each, keeping it simple for example purposes) What I am trying to do is put it through some maps/filters and achieve an array of ids of schools that have the key of selected = true. So my attempt is to filter down by first all schools, then by schools that have selected true, then just the id's of those schools. So here is my attempt - $scope.schooIDsForSave = $scope.accountTreeHere.filter( function(obj){ return obj.schools; }).filter( function(obj){ return obj.selected; }).map(function(obj){ return obj.id; }); This is only returning 1 ID so I'm getting something wrong here. I think I have something wrong with my usage of map/filter as I am still vey new to it. Any insight to point me in the right direction would be much appreciated! Thanks for reading.
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26740739
has title: Angular, filtering down a json object

http://stackoverflow.com/a/26742303
has body: Javacript is not a strongly typed language. It does it's best to interpret the type of variables and generally, if you try to add a string-like variable to an integer-like variable, it will interpret it as string concatenation. You could force the variables to be interpreted as integers like this: b = parseInt(g) + parseInt(h); Or, using other tricks that will force the variable to become numeric, like this: b = (g*1) + (h*1);
upvote count: 3
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26742245
type: Answer
accepted answer of: http://stackoverflow.com/q/26742245
has comment: http://stackoverflow.com/comment/42193914
score: 3

http://stackoverflow.com/comment/42186844
has text: Well indexOf() is the proper way to check for an element in an array. As for the efficiency I suppose you'd need to run some tests.
score: 2
type: QuestionComment
comment on: http://stackoverflow.com/q/26806941
type: Comment

http://stackoverflow.com/q/26796519
score: 1
has title: Deleting the file from client PC after upload but only after client permission
type: Question
tagged with: c#
has body: I got a requirement from client to delete file from his local pc after upload. It should ask to user if he want to delete the file after successful upload. If user opted yes then file should be deleted from client pc. I know this is not easy to achieve in web application while quite easy in desktop app.My client is upgrading from desktop app to web and expecting the same behavior. I heard that any browser plugin or small utility installed on client machine can do that. I have seen few example in other website that client is referring. Can someone please suggest me the plugin or utility logic that can help me to achieve this? And how we can interact with these stuff from our java script or code. Thanks in advance. Regards, Krishan
upvote count: 1
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42191774
tagged with: asp.net
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26796824
accepted answer: http://stackoverflow.com/a/26796824

http://stackoverflow.com/comment/42167898
has text: What's the error? Use the console browser
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26796932

http://stackoverflow.com/q/26695167
has comment: http://stackoverflow.com/comment/41992909
has body: I'm testing out Google's Polymer library, trying to get a working Drawer Panel (see here). But any advice from any core element would probably work. I followed the prescribed install process (see here). In just trying to get that component working, I'm coming across 2 main issues: By default, left panel doesn't respond to mouse clicks. However, it does hide when the width goes below 480px. The styling only works in Chrome (v 38.0.2125.104), not Firefox (v 33.0.2) or Safari (v 7.0.6). I thought that all these browsers provided Web Components support. And if not, that platform.js added Polyfill Support. Below is the HTML I'm using Any directions on i) how to get this working and ii) how to get this working across browsers ? Side Panel Main Panel
has comment: http://stackoverflow.com/comment/41993537
answer count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41996323
type: Question
tagged with: polymer
has comment: http://stackoverflow.com/comment/41996611
tagged with: javascript
tagged with: web-component
downvote count: 0
has comment: http://stackoverflow.com/comment/41993525
has comment: http://stackoverflow.com/comment/41993053
favorite count: 0
has title: Problems Using Polymer Core Element
type: UnansweredQuestion

http://stackoverflow.com/a/26775897
type: Answer
answers question: http://stackoverflow.com/q/26775823
has body: There is an unexpected end of input error..Are you sure yo have closed $(document).ready function $(document).ready(function(){ $("a.delete").click(function() { var userEmail = $(this).attr("title"); loadUserDelete(userEmail); }); });
score: 0
has comment: http://stackoverflow.com/comment/42130475

http://stackoverflow.com/a/26859283
has comment: http://stackoverflow.com/comment/53466580
type: AcceptedAnswer
downvote count: 0
has body: The permalinks plugin adds path metadata property that doesn't seem to be documented well. This should be what you need to achieve links. The Github page notes: If no pattern is provided, the files won't be remapped, but the path metadata key will still be set, so that you can use it for outputting links to files in the template. I haven't found anywhere else showing the use of this but I'd assume the above quote means that it is standard behaviour. You can use it like: {{#each collections.projects}} &lt;a href="/{{this.path}}/" class="portfolio-entry"&gt; The first / is so that it resolves to the current host and the trailing / is optional (depending on your http server configuration.
type: Answer
answers question: http://stackoverflow.com/q/26694052
accepted answer of: http://stackoverflow.com/q/26694052
score: 4
has comment: http://stackoverflow.com/comment/42380161
upvote count: 4

http://stackoverflow.com/q/26798245
tagged with: event-handling
favorite count: 0
tagged with: css
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion
has body: In the past with JS transitions, one could specify some behavior to happen after the transition, via a callback. E.g. //jQuery function hideTheContent() { $('#content').fadeOut(1000,function() { mandatoryLogicAfterHidingContent(); }); } Now with CSS3 transitions, we can do something like this. //CSS #content { opacity:1; transition: opacity 1s; } .hidden { opacity:0; transition: opacity 1s; } //jQuery function hideTheContent() { $('#content').addClass('hidden'); // still need to run mandatoryLogicAfterHidingContent } I know of the new transitionend events, so hypothetically we could do something like this: //jQuery function hideTheContent() { $('#content').on('transitionend', function(e) { mandatoryLogicAfterHidingContent() }) $('#content').addClass('hidden'); } but since we're now separating out the JS from the UI, it's possible that someone else could come along with a new UI where content-hiding is instant, remove the CSS3 transition, and inadvertently break the JS call to mandatoryLogicAfterHidingContent(). Another scenario, say I have a box and there's a reset function that resizes said box to size 50x50 (with transition), then calls a mandatoryLogicAfterResize(). If I call the reset fn twice, I don't think the transition event is guaranteed to fire in this case - but I still need mandatoryLogicAfterResize to run both times. In more complex codebases, I also worry about other transitions getting called before the specific transition I'm targeting. and prematurely triggering the mandatoryLogic(). I guess the core problem here is, with CSS3 transitions, how can I defensively tie the mandatoryLogicAfterHidingContent() event handler with my and only my invocation of addClass('hidden'), like I could with the jQuery callback?
has title: What's the robust way to have JS callbacks wait on a CSS3 transition, iff the transition happens?
type: Question
tagged with: css-transitions
tagged with: transitionend
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/26773655
answers question: http://stackoverflow.com/q/26773539
type: Answer
has body: You need to use the ng-click directive instead of onclick.
score: 0

http://stackoverflow.com/comment/42147232
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26785094
type: Comment
has text: @adeneo - its even easier than *you* think - check teh 2 similar answers!

http://stackoverflow.com/a/26746682
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26738925
answers question: http://stackoverflow.com/q/26738925
has body: A standard click tag in your html5 banner would be: window.open(clickTag, "_blank"); The value for clickTag will be a string provided by the media company trafficking your ad, just as it would be for a Flash banner.
upvote count: 1

http://stackoverflow.com/comment/42109076
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26762697
has text: put this `error_reporting(-1);` at the top of your code and check the response if it changes.
type: Comment

http://stackoverflow.com/a/26821156
type: Answer
answers question: http://stackoverflow.com/q/26821033
has comment: http://stackoverflow.com/comment/42213947
score: 1
accepted answer of: http://stackoverflow.com/q/26821033
upvote count: 1
has body: This jsfiddle example works. I think it was failing because this was actually the Window class, not the button element. http://jsfiddle.net/wy9g8cdp/ function url_qry_add(e) { e.preventDefault(); alert($(e.target).closest(".url").index()); }; 0 1 2 3 Add 1 1 Add 2 1 2 Add
has comment: http://stackoverflow.com/comment/42211939
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42211888
downvote count: 0
has comment: http://stackoverflow.com/comment/42212089

http://stackoverflow.com/q/26759981
has comment: http://stackoverflow.com/comment/42102192
score: 7
has comment: http://stackoverflow.com/comment/42102052
upvote count: 7
has comment: http://stackoverflow.com/comment/42102733
type: Question
has comment: http://stackoverflow.com/comment/42101435
answer count: 2
has answer: http://stackoverflow.com/a/26761099
has comment: http://stackoverflow.com/comment/42102848
tagged with: javascript
linked to: http://stackoverflow.com/q/1863309
has title: Detect when video is buffering, if so display gif
has body: I'am wondering if there's a way to display a .gif while the video is buffering. I'am using the HTML5 Video Tag, within this is there a way to detect when a video is buffering, if not is there an alternative? I've looked at: How to detect when video is buffering? However I don't think this would help me out.. as I have no clue what NetStream is or what actionscript-3 is. html: Your browser doesn't support the video element. Meer informatie Direct afsluiten
downvote count: 0
possible better answer: http://stackoverflow.com/a/47374577
tagged with: buffering
favorite count: 0
has answer: http://stackoverflow.com/a/47374577
accepted answer: http://stackoverflow.com/a/26761099
has comment: http://stackoverflow.com/comment/42102227
tagged with: http://stackoverflow.com/tag/html
tagged with: css
linked to: http://stackoverflow.com/q/8230748
has comment: http://stackoverflow.com/comment/42101644
tagged with: video
type: AnsweredQuestion

http://stackoverflow.com/comment/42062156
type: QuestionComment
score: 0
has text: is ajaxComplete() different from what I have above (I don't know much jquery). I tried the second thing and it didn't work.
comment on: http://stackoverflow.com/q/26737804
type: Comment

d3.js
tags question: http://stackoverflow.com/q/26690852
tags question: http://stackoverflow.com/q/26781625
tags question: http://stackoverflow.com/q/26768206
tags question: http://stackoverflow.com/q/26781129
tags question: http://stackoverflow.com/q/26737996
tags question: http://stackoverflow.com/q/26820348
tags question: http://stackoverflow.com/q/26724060
tags question: http://stackoverflow.com/q/26803161
tags question: http://stackoverflow.com/q/26766418
tags question: http://stackoverflow.com/q/26824549
tags question: http://stackoverflow.com/q/26745929
tags question: http://stackoverflow.com/q/26776378
tags question: http://stackoverflow.com/q/26784174
tags question: http://stackoverflow.com/q/26734509
tags question: http://stackoverflow.com/q/26781573
tags question: http://stackoverflow.com/q/26701321
tags question: http://stackoverflow.com/q/26760870
tags question: http://stackoverflow.com/q/26717620
tags question: http://stackoverflow.com/q/26680926
tags question: http://stackoverflow.com/q/26683936
tags question: http://stackoverflow.com/q/26786371
tags question: http://stackoverflow.com/q/26746850
tags question: http://stackoverflow.com/q/26735417
tags question: http://stackoverflow.com/q/26777310
tags question: http://stackoverflow.com/q/26793215
tags question: http://stackoverflow.com/q/26720288
tags question: http://stackoverflow.com/q/26686435
tags question: http://stackoverflow.com/q/26676380
tags question: http://stackoverflow.com/q/26803335
tags question: http://stackoverflow.com/q/26741919
tags question: http://stackoverflow.com/q/26737299
tags question: http://stackoverflow.com/q/26710692
tags question: http://stackoverflow.com/q/26806721
tags question: http://stackoverflow.com/q/26699439
tags question: http://stackoverflow.com/q/26770672
type: Tag
tags question: http://stackoverflow.com/q/26701777
tags question: http://stackoverflow.com/q/26783228
tags question: http://stackoverflow.com/q/26748747
tags question: http://stackoverflow.com/q/26817035
tags question: http://stackoverflow.com/q/26789005
tags question: http://stackoverflow.com/q/26724233
tags question: http://stackoverflow.com/q/26808260
tags question: http://stackoverflow.com/q/26693360
tags question: http://stackoverflow.com/q/26767185
tags question: http://stackoverflow.com/q/26742902
tags question: http://stackoverflow.com/q/26723324
tags question: http://stackoverflow.com/q/26740839
tags question: http://stackoverflow.com/q/26756464
tags question: http://stackoverflow.com/q/26683820
tags question: http://stackoverflow.com/q/26677209
tags question: http://stackoverflow.com/q/26801285
tags question: http://stackoverflow.com/q/26711224
tags question: http://stackoverflow.com/q/26679252
tags question: http://stackoverflow.com/q/26811347
tag name: d3.js
tags question: http://stackoverflow.com/q/26700510
tags question: http://stackoverflow.com/q/26784064
tags question: http://stackoverflow.com/q/26747638
tags question: http://stackoverflow.com/q/26782224
tags question: http://stackoverflow.com/q/26737896
tags question: http://stackoverflow.com/q/26697799
tags question: http://stackoverflow.com/q/26782776
tags question: http://stackoverflow.com/q/26831783
tags question: http://stackoverflow.com/q/26683985
tags question: http://stackoverflow.com/q/26803340
tags question: http://stackoverflow.com/q/26811812
tags question: http://stackoverflow.com/q/26741298
tags question: http://stackoverflow.com/q/26679256
tags question: http://stackoverflow.com/q/26804417
tags question: http://stackoverflow.com/q/26753465
tags question: http://stackoverflow.com/q/26825049
tags question: http://stackoverflow.com/q/26744181
tags question: http://stackoverflow.com/q/26760323
tags question: http://stackoverflow.com/q/26790013
tags question: http://stackoverflow.com/q/26699515
tags question: http://stackoverflow.com/q/26830386
tags question: http://stackoverflow.com/q/26719695
tags question: http://stackoverflow.com/q/26800262
tags question: http://stackoverflow.com/q/26691530

http://stackoverflow.com/a/26702810
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26702665
type: Answer
has body: CSS: #wrapper div{ display:none; } JQuery: jQuery('.thumbs a').click(function () { room = "#room" + $(this).data('slide'); $(room).slideToggle('fast'); $('#wrapper').children().not(room).slideUp('fast'); }); Demo: http://jsfiddle.net/ffoa3pno/1/
accepted answer of: http://stackoverflow.com/q/26702665
score: 0

http://stackoverflow.com/q/26763112
downvote count: 0
has comment: http://stackoverflow.com/comment/42107846
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42107573
favorite count: 0
has comment: http://stackoverflow.com/comment/42108534
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42107526
has body: I am getting a Uncaught TypeError: undefined is not a function on one page of my site. The function works without error on all the other pages. its a bit of a lengthy page code wise so i will only post it if need be, but here is the basics. the button for the popover: &lt;button class="btn btn-info" id="help" type="button" data-toggle="popover" data-trigger="focus" data-html="true" data-placement="bottom" title="ActiveMLS Documentation" data-content="&lt;small&gt;&lt;p&gt;&lt;strong&gt;List Custom Property Listings&lt;/strong&gt;&lt;/p&gt;&lt;/small&gt;"&gt;&lt;i class="fa fa-question-circle"&gt;&lt;/i&gt;&lt;/button&gt; the error Uncaught TypeError: undefined is not a function shell.js:23 the jquery from shell.js line 23 /*******************************/ /* POPOVER HELPER /*******************************/ $(document).ready(function(){ $('#help').popover() }); I'm baffled as to why it breaks on this page only? &lt;!-- blueimp Gallery styles --&gt; &lt;link rel="stylesheet" href="/static/uploadlib/css/blueimp-gallery.min.css"&gt; &lt;!-- CSS to style the file input field as button and adjust the Bootstrap progress bars --&gt; &lt;link rel="stylesheet" href="/static/uploadlib/css/jquery.fileupload-ui.css"&gt; &lt;div class="row-fluid"&gt; &lt;div class="col-md-12"&gt; &lt;div class="row-fluid"&gt; &lt;div class="section-header text-center"&gt; &lt;button class="btn btn-info" id="help" type="button" data-toggle="popover" data-trigger="focus" data-html="true" data-placement="bottom" title="ActiveMLS Documentation" data-content="&lt;small&gt;&lt;p&gt;&lt;strong&gt;List Custom Property Listings&lt;/strong&gt; - The list Custom Property listings page is an overview of all the Custom Property listings listings and information displayed on the website frontend&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Add Custom Property Listings&lt;/strong&gt; - Shortcut to the &lt;em&gt;Add Custom Property Listings&lt;/em&gt; page.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Records Per Page&lt;/st…
has comment: http://stackoverflow.com/comment/42107716
type: Question
has comment: http://stackoverflow.com/comment/42107586
score: 4
has comment: http://stackoverflow.com/comment/42108560
has comment: http://stackoverflow.com/comment/42108693
has answer: http://stackoverflow.com/a/31469289
upvote count: 4
has comment: http://stackoverflow.com/comment/42107477
has title: Boostrap Popover error: Uncaught TypeError: undefined is not a function
answer count: 1

http://stackoverflow.com/comment/42180998
score: 4
type: Comment
has text: @KthProg: No, of course you can: `[1, {foo: bar}]`. But you somehow mixed the syntax for objects and arrays, which doesn't work: `[1, foo: bar]`. See the difference?
comment on: http://stackoverflow.com/a/26803880
type: AnswerComment

http://stackoverflow.com/a/26696694
has body: use unshift method of array: ractive.unshift('BlogPosts.BlogPostId.Comments', newComment);
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26696671
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/26696671
score: 3

http://stackoverflow.com/comment/42045138
comment on: http://stackoverflow.com/q/26728419
score: 0
type: QuestionComment
type: Comment
has text: I think from looking at your code that you are probably going to be best served by studying more on JavaScript objects and functions. In your example, nutrientsConsumed is a reference to a function ... as such, you can't access "properties" because it doesn't have them ... it is a function.

http://stackoverflow.com/q/26778180
has title: How to parse javascript/jquery to echo / execute within/after ajax result
has answer: http://stackoverflow.com/a/26821585
answer count: 1
has comment: http://stackoverflow.com/comment/42134513
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/42135965
tagged with: php
has comment: http://stackoverflow.com/comment/42135161
has body: Ajax returns all expected html result from php code, except the javacript and jQuery inside the "script" tags var frm = $('#cell'); frm.submit(function (ev) { $.ajax({ type: "POST", type: frm.attr('method'), url: frm.attr('action'), data: frm.serialize(), success: function (html) { //Create jQuery object from the response HTML. var $return=$(html); //Query the jQuery object for the values var oneval = $return.filter('#cellWidthSlider').html(); alert(oneval); $("#cellWidthDiv").html(oneval); } }); ev.preventDefault(); }); I have tried to append to head, but the jQuery code would execute only - before the elements. var $response=$(html); $("head").append($response); var oneval = $response.filter('#cellWidthSlider').html();
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42134302
linked to: http://stackoverflow.com/q/889967
accepted answer: http://stackoverflow.com/a/26821585
type: Question
has comment: http://stackoverflow.com/comment/42134910
has comment: http://stackoverflow.com/comment/42134435
score: 0
has comment: http://stackoverflow.com/comment/42135737

http://stackoverflow.com/q/26806886
accepted answer: http://stackoverflow.com/a/26807106
has comment: http://stackoverflow.com/comment/42198461
linked to: http://stackoverflow.com/q/16063394
has answer: http://stackoverflow.com/a/26807191
has answer: http://stackoverflow.com/a/26807106
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42187148
has comment: http://stackoverflow.com/comment/42187287
has title: Inheritance in Javascript : child object still calling its parent method
tagged with: prototype
has answer: http://stackoverflow.com/a/26807237
has body: I'm trying to do a simple practice in Javascript Inheritance but I cannot understand what is going on with this code: function person() { this.firstName = 'asdf'; this.lastName = 'asdfasdf'; this.showName = function () { console.log(this.firstName); } } function employee() { person.call(this); } employee.prototype = person.prototype; employee.prototype.showName = function showName() { console.log = "I am an employee"; }; var p = new person(); p.showName(); var e = new employee(); e.showName(); In this code the e.showName is still calling its parent method, despite the fact that I was trying to override the method. What did I do wrong?
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26807191
tagged with: inheritance
score: 0
answer count: 3

http://stackoverflow.com/q/26703129
score: 0
answer count: 1
tagged with: ajax
type: UnansweredQuestion
tagged with: php
type: Question
has body: My script should bring up data in the textboxes when the Id number is entered in the ID textbox. The issue is that the information relating to the ID number comes up but only when i put in the ID number and reload the page not when the value is entered and the other information just automatically appear. here is the script <?php $client = new nusoap_client("http://localhost:1234/cwork/webfunction.php#"); $ans = $client->call('ArraySearch', array("inum" => $stf)); echo " "; $vars = explode(",", $ans); ?> Item# : <input type="text" class="tid" name="txtid" value="<?php if (count($vars) > 1) echo htmlspecialchars($stf); ?> " /> Name : <input type="text" name="txtname" class="tname" size="25" value="<?php if (count($vars) > 1) echo htmlspecialchars($vars[1]); ?>" /> Price : <input type="text" name="txtprice" class="tprice" value="<?php if (count($vars) > 1) echo htmlspecialchars($vars[2]); ?>" /> Quantity:
tagged with: javascript
has answer: http://stackoverflow.com/a/26703388
has title: Ajax PHP code not working

http://stackoverflow.com/comment/42109207
comment on: http://stackoverflow.com/q/26763809
has text: @The Paramagnetic Croissant thanks.. But when i use that array in my json its coming as '["xa"]'
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26810182
has body: Following your answer, this is a simplified version of your solution: &lt;?php //file1 session_start(); $token = uniqid(); $_SESSION['token'] = $token; ?&gt; &lt;!--page html here--&gt; &lt;script src="/js.php?t=&lt;?php echo $token;?&gt;"&gt;&lt;/script&gt; . header('Content-Type: application/javascript'); $token = isset($_GET['t'])? $_GET['t'] : null; if(!isset($_SESSION['token']) || $_SESSION['token'] != $token){ //lets mess with them and inject some random js, ih this case a random chunk of compressed jquery die('n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0&gt;a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0&gt;a?b:0);return this.pushStack(c&gt;=0&amp;&amp;b&gt;c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)}'); } //regenerate token, this invalidates current token $token = uniqid(); $_SESSION['token'] = $token; ?&gt; $.getScript('js2.php?t=&lt;?php echo $token;?&gt;'); . &lt;?php //js2.php //much the same as before session_start(); header('Content-Type: application/javascript'); $token = isset($_GET['t'])? $_GET['t'] : null; if(!isset($_SESSION['token']) || $_SESSION['token'] != $token){ //lets mess with them and inject some random js, ih this case a random chunk of compressed jquery die('n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z]…
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26803224
downvote count: 0
type: Answer

http://stackoverflow.com/comment/42186109
has text: Typo: There's an extra `)` after the `function` keyword -- `...ready(function ($) { ... });`
comment on: http://stackoverflow.com/q/26806551
type: QuestionComment
type: Comment
score: 5

http://stackoverflow.com/comment/41949322
has text: yes. Provide the Javascript/jquery code you currently have.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26674948

http://stackoverflow.com/a/26701945
type: Answer
has comment: http://stackoverflow.com/comment/41997742
has body: This is the way to add event listner: LCLInput.addEventListener("click", function() { alert("Yes"); });
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26701836
downvote count: 0

http://stackoverflow.com/comment/42037627
has text: ` var checkChoices = function(){ var value ; // here to declare for (var i = 0; i < choices.length; i++) { if (choices[i].checked) { value = choices[i].value; choices[i].checked = false; } } return value; };`
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26723815
type: Comment

http://stackoverflow.com/q/26799160
has comment: http://stackoverflow.com/comment/42172824
has comment: http://stackoverflow.com/comment/42172363
has comment: http://stackoverflow.com/comment/42172110
tagged with: javascript
has body: I want my site written in HTML5 and CSS3 to be only accessable for HTML 5 Users. So if a user is using a legacy browser just like IE 7 or something i want to make my site to be blank and show a notification, which says for example "Please update your browser to use this application". I already tried the modernizr plugin but it only supports feature detection and thats not what i want. I want to know if the users browser is able to display HTML5 and CSS3 correctly. Is there a way to do it?
has comment: http://stackoverflow.com/comment/42172185
has title: Only allow access to the site for HTML5 Users
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42172127
answer count: 0
score: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/6731303
has comment: http://stackoverflow.com/comment/42172893
type: Question
linked to: http://stackoverflow.com/q/15275463
duplicate of: http://stackoverflow.com/q/6731303

http://stackoverflow.com/q/26680485
type: Question
answer count: 1
tagged with: javascript
score: 0
has body: I have two WordPress installs - our main site which is installed on root, and a test site which is installed in a directory on root. They are both multisite installations and both have basically the same plugins and theme. I have a button that adds a product and leads to a shopping cart. On the test WordPress site, the button works fine. On the main site (on the root of domain), javascript in the button seems to be commented out, disabling the button. I have tried everything I know to do, including everything in the "Using Javascript" section on the WordPress support site. No matter what, I can not seem to get the button working. Is there any way I can get WordPress to stop commenting out the Javascript in the button? Here is a test button on the main WordPress site (button does not work): http://www.lifeleap.org/shopping2 Here is a test button on the test WordPress site (button does work): http://www.lifeleap.org/newblogtest/
accepted answer: http://stackoverflow.com/a/26680791
has title: javascript being commented out in page
type: AnsweredQuestion
tagged with: wordpress
has answer: http://stackoverflow.com/a/26680791

http://stackoverflow.com/a/26735094
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26735059
answers question: http://stackoverflow.com/q/26735059
type: Answer
downvote count: 3
has body: obj['na@me'] Bracket notation to the rescue. You can only use dot notation for regular identifiers.
score: 1
upvote count: 4

http://stackoverflow.com/a/26678352
answers question: http://stackoverflow.com/q/26677685
has comment: http://stackoverflow.com/comment/41956436
accepted answer of: http://stackoverflow.com/q/26677685
has body: it tells WebgL how to interpret the data: gl.vertexAttribPointer(attrib, index, gl.FLOAT, false, stride, offset); this means: for attribute attrib there are index components of type gl.FLOAT that are not normalized starting at offset and stride apart in the gl.ARRAY_BUFFER bound at the time of this call. The client is free to set its data anyway it wishes as long as they can be described as above.
has comment: http://stackoverflow.com/comment/41956078
has comment: http://stackoverflow.com/comment/41964993
type: AcceptedAnswer
upvote count: 16
type: Answer
has comment: http://stackoverflow.com/comment/41964175
downvote count: 0
score: 16

http://stackoverflow.com/comment/42172185
type: QuestionComment
has text: http://stackoverflow.com/questions/15275463/how-to-block-ie8-and-down
score: 0
comment on: http://stackoverflow.com/q/26799160
type: Comment

http://stackoverflow.com/q/26778271
has answer: http://stackoverflow.com/a/26862587
favorite count: 0
has title: AngularJS: Mock exception handler?
tagged with: angularjs
has body: I've added the following code to my Angular config to handle exceptions app.config(function($provide) { $provide.decorator("$exceptionHandler", ['$delegate', function($delegate) { return function(exception, cause) { // Awesome custom error handling } }]) }); But how do I prevent unit tests entering this? Can I mock this part of the code?
score: 2
upvote count: 2
type: UnansweredQuestion
tagged with: unit-testing
type: Question
tagged with: javascript
answer count: 1
downvote count: 0

http://stackoverflow.com/q/26682930
type: Question
has comment: http://stackoverflow.com/comment/41964648
has answer: http://stackoverflow.com/a/26742682
accepted answer: http://stackoverflow.com/a/26742682
tagged with: javascript
tagged with: jquery
has title: Hidden input field not being updated properly
possible better answer: http://stackoverflow.com/a/26683032
score: 0
has comment: http://stackoverflow.com/comment/41964553
has answer: http://stackoverflow.com/a/26683075
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26683164
has body: I am trying to get the referrer and update the referrer so that my users can go back to the page they came back from. I have a hidden input field which holds the value of the redirect. I have a static value in there just in case the referrer is empty. If the referrer is not empty, I want to update the value of it. Here is the code I have written, I even tested it and it said it was updated, however, I am not being redirected properly, so it is not working. JavaScript and HTML I have written (keep in mind, I have correctly linked the file and such): $(document).ready(function(){ if (document.referrer != "") { document.getElementsByName("redirect").value = document.referrer; var test = "false"; if (document.getElementsByName("redirect").value == document.referrer){ test = "true"; } alert(test); } }); &lt;script src="js/referrer.js"&gt;&lt;/script&gt; &lt;input type="hidden" name="redirect" value="https://www.google.com" /&gt; I feel like this is a minor error or there might be some sort of standard I am not following. Thanks for the help! I appreciate any insight!
has comment: http://stackoverflow.com/comment/41964626
answer count: 4
has answer: http://stackoverflow.com/a/26683032
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41964490
has comment: http://stackoverflow.com/comment/41964514

http://stackoverflow.com/a/26709413
answers question: http://stackoverflow.com/q/26703686
has body: There is a tutorial here for loading stage from a JSON String. You just have to do : var json = '{"attrs":{"width":578,"height":200},"className":"Stage","children":[{"attrs":{},"className":"Layer","children":[{"attrs":{"x":289,"y":100,"sides":6,"radius":70,"fill":"red","stroke":"black","strokeWidth":4},"className":"RegularPolygon"}]}]}'; // create node using json string var stage = Kinetic.Node.create(json, 'container'); Hope that answers the question.
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26703686
type: Answer

http://stackoverflow.com/q/26720947
type: Question
score: 5
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42031812
has title: Remove element, but keep all data and events bind
answer count: 1
has body: I have a container that could be injected in any specified container on the page (like a popup). Popup should have a button which deletes parent element. I tried using .remove() to delete parent element, however, it also removes popup and its events. I want it to remove popup (I still have the reference), however, I don't want .remove to unbind the events. So far, I got this: var popup = $('#popup'); $('body &gt; div').on('click', function () { popup.appendTo($(this)); }); popup.find('button').on('click', function () { $(this).closest('div:not(#popup)').remove(); }); http://jsfiddle.net/volter9/0zms29g1/ Basically, is there a way to delete an element without removing its data or events? Thank you for attention! P.S.: I tried to append and hide popup in the body, but it's not what I need.
favorite count: 0
has answer: http://stackoverflow.com/a/26720988
upvote count: 6
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26720988
downvote count: 1

http://stackoverflow.com/a/26815905
answers question: http://stackoverflow.com/q/26815652
has body: You can use clear() for clearing the canvas object and use renderAll() for redraw the given canvas. Try This Code: DEMO HTML: &lt;div id="container"&gt; &lt;input type="file" id="imageLoader" name="imageLoader" /&gt; Remove:&lt;input type="button" value="remove" id="imageRemove" name="imageRemove" onClick="handleRemove()"/&gt; &lt;canvas id="canvas" width="400" height="400" style="width:400px;height:400px" &gt;&lt;/canvas&gt; JS Code: var canvas = new fabric.Canvas('canvas', { backgroundColor: 'rgb(240,240,240)' }); var imageLoader = document.getElementById('imageLoader'); imageLoader.addEventListener('change', handleImage, false); function handleImage(e) { var reader = new FileReader(); reader.onload = function (event) { var img = new Image(); img.onload = function () { var imgInstance = new fabric.Image(img, { scaleX: 1, scaleY: 1 }) canvas.add(imgInstance); } img.src = event.target.result; } reader.readAsDataURL(e.target.files[0]); } //var imageRemove = document.getElementById('imageRemove'); //imageLoader.addEventListener('change', handleRemove, true); function handleRemove() { canvas.clear().renderAll(); // Here is your clear canvas function }
type: Answer
upvote count: 4
downvote count: 0
type: AcceptedAnswer
score: 4
has comment: http://stackoverflow.com/comment/75644520
accepted answer of: http://stackoverflow.com/q/26815652

http://stackoverflow.com/a/26791047
score: 3
answers question: http://stackoverflow.com/q/26790805
has body: As per the comments, since not calling perfect scroller on mobile is a valid solution, try doing some user agent detection as such: var is_mobile = ((/Mobile|iPhone|iPod|BlackBerry|Windows Phone/i).test(navigator.userAgent || navigator.vendor || window.opera) ? true : false); if ( !is_mobile ) { // whatever the init call is perfectScroller.init() }
has comment: http://stackoverflow.com/comment/42161655
downvote count: 0
type: Answer
upvote count: 3

datetimepicker
type: Tag
tags question: http://stackoverflow.com/q/26729683
tag name: datetimepicker

http://stackoverflow.com/q/26754600
has title: Getting checkbox value and display a div using jquery or java script
has answer: http://stackoverflow.com/a/26754974
has comment: http://stackoverflow.com/comment/42092868
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26754821
possible better answer: http://stackoverflow.com/a/26754722
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42091941
accepted answer: http://stackoverflow.com/a/26754974
tagged with: checkbox
has answer: http://stackoverflow.com/a/26754722
tagged with: css
has comment: http://stackoverflow.com/comment/42092193
has answer: http://stackoverflow.com/a/26755374
answer count: 5
upvote count: 1
has body: I would like to display a div which is by default is hidden, if checkbox value is "Yes". here is my html code <input type="checkbox" class="bestsell_chkbox" name="bestsellchk_box" value="<%=getCurrentAttribute('item','custitem_sumisho_overlay1')%>" style="display:none;" /> There are multiple items and for which the checkbox value is "Yes" i want to display div having class name "best-sell".This jquery code i have tried but its not working
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26754913
score: 1
has comment: http://stackoverflow.com/comment/42092382

http://stackoverflow.com/comment/42213028
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26821797
type: QuestionComment
has text: add MooTools framework

http://stackoverflow.com/comment/41989860
has text: I think he only wants to increment it in the timer, the click resets things.
comment on: http://stackoverflow.com/q/26697756
type: QuestionComment
score: 0
type: Comment

http://stackoverflow.com/comment/41947627
has text: You can declare variables out from function (with "var") and in your function/scope you use these variables without var => you declare your variables as global variables.
comment on: http://stackoverflow.com/q/26673854
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42093320
score: 0
comment on: http://stackoverflow.com/q/26754734
has text: Quentin, is not me who turns on or off the compatibility mode, it's the users. So, as a programmer I need to take this into account and show my page correctly in both modes. Don't you agree?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26830911
has comment: http://stackoverflow.com/comment/45149325
type: Question
downvote count: 0
tagged with: javascript
upvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/45323306
tagged with: cordova
answer count: 0
type: UnansweredQuestion
has title: Extending Phonegap's boilerplate index.js
has body: If you create an app with Phonegap 3.6 CLI, you get the following index.js sample code: var app = { // Application Constructor initialize: function() { this.bindEvents(); }, // Bind Event Listeners // // Bind any events that are required on startup. Common events are: // 'load', 'deviceready', 'offline', and 'online'. bindEvents: function() { document.addEventListener('deviceready', this.onDeviceReady, false); }, // deviceready Event Handler // // The scope of 'this' is the event. In order to call the 'receivedEvent' // function, we must explicitly call 'app.receivedEvent(...);' onDeviceReady: function() { app.receivedEvent('deviceready'); }, // Update DOM on a Received Event receivedEvent: function(id) { var parentElement = document.getElementById(id); var listeningElement = parentElement.querySelector('.listening'); var receivedElement = parentElement.querySelector('.received'); listeningElement.setAttribute('style', 'display:none;'); receivedElement.setAttribute('style', 'display:block;'); console.log('Received Event: ' + id); } }; Although I know the basics of JavaScript, I'm not familiar with the code style used, so I was wandering if someone would explain the different sections and the onDeviceReady: function() syntax which in the Phonegap documentation is shown differently: document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { // Now safe to use device APIs } I was also wondering where exactly would be the best place to extend the sample code in order to build my own app. Do I just replace the Update DOM on a Received Event section, or do I rather include my own .js file with my JavaScript custom code?
score: 1

http://stackoverflow.com/a/26777127
score: 6
accepted answer of: http://stackoverflow.com/q/26776921
has comment: http://stackoverflow.com/comment/42132559
answers question: http://stackoverflow.com/q/26776921
has body: The problem is that if the form is valid, you call .submit() on it, which calls your callback once more, which calls .submit() again, etc., etc. and you get an infinite recursion loop. Just remove else { $("form#searchform" ).submit(); return true; } altogether and it should work (your callback won't return anything and the browser will proceed with the default form submit behaviour).
type: AcceptedAnswer
upvote count: 6
type: Answer
has comment: http://stackoverflow.com/comment/42135004
downvote count: 0

http://stackoverflow.com/a/26796495
answers question: http://stackoverflow.com/q/26796308
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42168490
has body: Yes there are lots of ways to do this. You can check user input when changed. One of them is below. &lt;input type="text" onchange="changed(this);"/&gt; This input will call changed() function with the paremetre of self. So you can control its value and do some things. function changed(input){ alert(input.value) // check for input value if(input.value.length &gt; 54){ //do if value is longer than 54 characters //Do something } } You can find lots of ways on the internet. You can try using jQuery which will be easier for you. $("#myInput").change(function(){ //select the input box which id is 'myInput' then run function when its value changed each time alert("Wow, my value changed to:"+$(this).val()) //Get value with $(this).val() and alert! }); You can also bind this to all input fields using $("input").change(function(){ Changing my answer by your request. &lt;form name="myForm"&gt; &lt;!--Lots of divs here with input. You must hide these divs without touching form! --&gt; &lt;/form&gt; When you are on the last page all you need to do is function listUserValues(){ var els=document.myForm.elements; var l=els.length; for (var i=0; i&lt;l; i++) { alert('Field Name: '+els[i].name+'\nField Type: '+els[i].type+'\nField Value: '+els[i].value); //Do whatever you want with each value here. } }
has comment: http://stackoverflow.com/comment/42167260
has comment: http://stackoverflow.com/comment/42167477
upvote count: 1
has comment: http://stackoverflow.com/comment/42167313
score: 1
accepted answer of: http://stackoverflow.com/q/26796308

http://stackoverflow.com/comment/42148430
type: Comment
comment on: http://stackoverflow.com/a/26785801
score: 1
has text: Ah I see, I was just thinking about things a completely different way. This makes sense now.
type: AnswerComment

http://stackoverflow.com/a/26814430
downvote count: 0
answers question: http://stackoverflow.com/q/26814350
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42201423
score: 1
has body: in case you want the regex, ([4-9]|1[0-2])

http://stackoverflow.com/q/26831438
accepted answer: http://stackoverflow.com/a/26831455
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26831511
answer count: 3
has title: Javascript - Average calculation
favorite count: 0
has comment: http://stackoverflow.com/comment/42229498
has answer: http://stackoverflow.com/a/26831497
downvote count: 1
possible better answer: http://stackoverflow.com/a/26831497
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26831455
has body: Hi I am trying to write a simple calculation that will average the two numbers entered by user input and then click the average button to get the average of the two. MY problem is that it does not produce an answer. Here is the code &lt;html&gt; &lt;body&gt; &lt;input type="text" id="one"&gt; &lt;input type="text" id="two"&gt; &lt;input type ="button" onclick="average()"value="average"&gt; &lt;input type="text" id ="avg"&gt; &lt;script type"text/javascript"&gt;&gt; function average(){ var a=parseInt(document.getElementById("one".value); var b=parseInt(document.getElementById("two".value); var afinal=((a+b)/2); document.getElementById('avg').value=afinal; } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;
score: -1
type: Question
tagged with: average

http://stackoverflow.com/q/26749882
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26749926
has body: currently I have made it working. But there is another thing I want to add something like Color. From red to green. The following code are below. function checkPasswordMatch() { var password = $("#textpwd").val(); var confirmPassword = $("#textcfmpwd").val(); if (password != confirmPassword) $("#pwdWarning").html("Passwords do not match!"); else $("#pwdWarning").html("Passwords match."); } How to make "Passwords do not match!" in red color whereas "Passwords match" in green color?
has answer: http://stackoverflow.com/a/26749917
has answer: http://stackoverflow.com/a/26749922
has answer: http://stackoverflow.com/a/26750017
downvote count: 1
type: Question
has title: jQuery html change color
tagged with: javascript
score: -1
answer count: 6
has answer: http://stackoverflow.com/a/26749909
accepted answer: http://stackoverflow.com/a/26749922
possible better answer: http://stackoverflow.com/a/26749916
upvote count: 0
has answer: http://stackoverflow.com/a/26749916
tagged with: jquery
has comment: http://stackoverflow.com/comment/42083854
favorite count: 0
has comment: http://stackoverflow.com/comment/42083943

http://stackoverflow.com/q/26790805
favorite count: 0
has answer: http://stackoverflow.com/a/26941717
has comment: http://stackoverflow.com/comment/42157527
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42157801
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/26791047
type: Question
accepted answer: http://stackoverflow.com/a/26941717
answer count: 2
has comment: http://stackoverflow.com/comment/42157786
tagged with: mobile
has comment: http://stackoverflow.com/comment/42157833
has body: I've used meteorjs to build my website, blainehansenpiano.com, and it works and looks good on browsers and ipad. I'm using the perfect-scrollbar on the scrollable areas, and it is working fine. I'm also using bootstrap3, so my site can be easily viewed on mobile. I have this template: {{> backgroundPictures}} ... Along with this less: html, body, .container-fluid { .fill-height(); } .body-film { .fill-height(); background-color: @color; } .block-film { .fill-height(); background-color: @different-color; } .fill-height { height: 100%; } .scroller { .fill-height(); overflow-y: hidden; } @media (max-width: @screen-xs-max) { html, body, .container-fluid, .body-film, .block-film, .scroller { height: auto !important; overflow-y: visible !important; } } The intended behavior is that while the site is sized from .col-sm to .col-lg, the blocks are sized to the window and the scrollbar handles all the movement. Then when the site is sized at .col-xs the columns are broken into blocks, the height and overflow are changed back, and that turns off the scrollbar and lets the native behavior take over. On my browser this works great. When I resize my window to that small level, no scrollbars are displayed and things scroll naturally. However, when I try this on mobile browsers (all of them that I've tried), the .block-film area that had the scroller attached to it simply doesn't respond to touch scrolls. If you scroll down into that area, you just get stuck. What could be causing this?
downvote count: 0
possible better answer: http://stackoverflow.com/a/26791047
tagged with: javascript
tagged with: jquery
has title: perfect-scrollbar area doesn't scroll on mobile
has comment: http://stackoverflow.com/comment/42157631
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/42085639
score: 0
comment on: http://stackoverflow.com/q/26750924
has text: What exactly are you trying to achieve?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26721818
type: Question
has comment: http://stackoverflow.com/comment/42034483
has comment: http://stackoverflow.com/comment/42034510
tagged with: regex
has body: I am working on a regular expression for Canadian phone number in javascript and / or in jQuery. I'm having some trouble into the formating after I have passed my main regular expression. Mainly, I need to format a phone number in this way when the user leave the input field : 111-222-3333 111-222-3333 #44444 (up to 5 digits) 1-222-333-4444 1-222-333-4444 #55555 (up to 5 digits) As you can see above, I want to be able to format a normal phone number and a toll free number at the same time. The code In my HTML, I have done a simple input field. &lt;input id="assure_telephone" placeholder="Phone number" name="assure_telephone" maxlength="25" type="text" /&gt; For my jQuery, I picked up the code found in my large file and simplified it a little bit. We need to focus on my regular expressions. $('#assure_telephone').bind('change', function(){ // Delete all caracters and specials caraters except numbers telephone_user = $('#assure_telephone').val().replace(/[^0-9]/g, ''); // Format the new phone number telephone_user_regex = telephone_user.replace(/(\d{3})(\d{3})(\d{4})(\d{0,5})/, "$1-$2-$3 #$4"); $('#assure_telephone').val(telephone_user_regex); }); The logic behind my code As you can see, I'm starting by removing all special caracters to only keep numbers and then after I apply a formating with the .replace() Javscript function. Link to my actual demo : http://jsfiddle.net/y201gcdg/6/ As you can see, it is pretty obvious that a toll free won't work as my formating is really made for normal phone number and not toll free. My question is : Is there any way to work arround with the length of my telephone_user_regex variable to detect if it is a toll free or no OR is there any way to acheive it with a better regular expression? Alternatively, I founded this on Stackoverflow that might be helping : https://code.google.com/p/libphonenumber/ (Source: Phone number format in Javascript) Other ressource : http://www.w3schools.com/jsref/jsref_replace.asp EDIT#1 - Deleted it after…
has comment: http://stackoverflow.com/comment/42034492
score: 0
has comment: http://stackoverflow.com/comment/42034711
has comment: http://stackoverflow.com/comment/42034393
answer count: 1
has comment: http://stackoverflow.com/comment/42034557
has answer: http://stackoverflow.com/a/26746594
has comment: http://stackoverflow.com/comment/42034202
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/42034518
has comment: http://stackoverflow.com/comment/42034542
linked to: http://stackoverflow.com/q/123559
has comment: http://stackoverflow.com/comment/42034225
has comment: http://stackoverflow.com/comment/42034389
has title: How to format a phone number with .replace() function in Javascript
has comment: http://stackoverflow.com/comment/42034193
linked to: http://stackoverflow.com/q/7756510
has comment: http://stackoverflow.com/comment/42034665
has comment: http://stackoverflow.com/comment/42034043
has comment: http://stackoverflow.com/comment/42034279

http://stackoverflow.com/q/26761155
has body: I'm trying to set the 'grouped' property to TRUE for a list at run time by follwoing sencha touch API there is a 'setGrouped()' method but it's not existing!!! if you click 'source' at top right side in sencha touch docs it take you to list.js but I serached for setGrouped and NOTHING. I'm using sencha touch 2.4.1 Please help, How can I set grouped to true at run time?
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/28240313
tagged with: extjs
tagged with: touch
score: 0
has title: list.setGrouped(true) DOESN'T work?? How can I do it?
has answer: http://stackoverflow.com/a/26766131
type: UnansweredQuestion

http://stackoverflow.com/comment/42081130
score: 0
comment on: http://stackoverflow.com/q/26748068
type: Comment
type: QuestionComment
has text: You'll have more control over printing in C#/VB.NET than you will in JavaScript. You might want to look at de-coupling the act of hitting the Print button from the result of printing a PDF, such as - hitting Print queues a print task to be performed by a Windows Service instead. The 'queuing' part could be a record in a database table, MSMQ, etc. EDIT - although if you mean you want to print a PDF on the *client* machine, this isn't the solution.

http://stackoverflow.com/comment/42026524
has text: onlick lol you made my day. I am also assuming your JavaScript code is in ` ` tags, you posted combined with HTML for demonstration, right? Or does your file look like this?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26718142

http://stackoverflow.com/a/26830533
has body: you can achieve this wiht a server side script, for example PHP http://php.net/manual/en/function.scandir.php this function returns the dirs, you could nested to get all the dirs and files in directories then you can return to the javasript with &lt;? echo json_ecnode($array_with_dirs);?&gt; with an ajax Request
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26830487

http://stackoverflow.com/comment/42158561
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26791390
has text: This has something to do with how regex parts are escaped when creating a regex object from a string. `/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(88.5)` will return `true`

http://stackoverflow.com/q/26719928
has body: I'm stuck in areas where I need to have a custom variable accessible everywhere in the child elements like $parents, $parent that we can reference. Example: &lt;div data-bind:"addThisVariable: { name: '$hello', value: somethingTimeConsuming() }"&gt; &lt;div data-bind="foreach: something"&gt; &lt;span data-bind="text: $hello.stringReference"&gt; &lt;/span&gt; &lt;/div&gt; &lt;/div&gt; I wonder if it's already available with Knockout, or if anyone has a tip on how to achieve this. I want to populate a context and its subcontexts with a variable like "$something" But in knockout, for all contexts and child contexts of where I declared that. So I can do potentially time consuming tasks and not have to re-run them each time. EDIT: I don't want the "with:$something" binding which doesn't answer my answers It would like like a temporary var that I would need to populate sub-contexts, like we would do for a .forEach(function(item){ var somethingCalculated = 1234; item.someArray.forEach(function(subItem) { var somethingElse = somethingCalculated + 567; } })
has answer: http://stackoverflow.com/a/26723578
answer count: 3
tagged with: knockout.js
has title: Knockout advanced declaration javascript "with"-like
has answer: http://stackoverflow.com/a/26726767
possible better answer: http://stackoverflow.com/a/26719971
tagged with: javascript
has answer: http://stackoverflow.com/a/26719971
accepted answer: http://stackoverflow.com/a/26723578
type: AnsweredQuestion
type: Question
score: 0

http://stackoverflow.com/comment/42182983
score: 2
comment on: http://stackoverflow.com/q/26804663
has text: I don't know the answer to your question but I felt it was valid and presented well, and it doesn't seem to have been answered already, so I gave you an upvote. Hope you get an answer from someone more familiar with jQuery.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26742905
has answer: http://stackoverflow.com/a/26743172
tagged with: javascript
has comment: http://stackoverflow.com/comment/42072205
score: 0
has comment: http://stackoverflow.com/comment/42074233
has comment: http://stackoverflow.com/comment/42072991
answer count: 1
has comment: http://stackoverflow.com/comment/42074325
has comment: http://stackoverflow.com/comment/42072481
has body: basically I'm trying to pass an array from PHP to JavaScript, so far it is all working the methods I'm using are: PHP: echo json_encode($arrayname); JavaScript: $.getJSON( 'myphppage.php', {}, function(data){ // Do stuff here }); Obviously this echo's the text onto my webpage but I do not want this text to be displayed, I'm just wondering if there is anyway for me to use this without having a chunky array at the top of my webpage. (I tried it without the echo and it doesn't work, I've also gone through countless tutorials on this but no one seems to do it without using echo) Thanks a lot in advance ---------- Edit ------------- index.js $.getJSON( 'myphppage.php', {}, function(data){ // I loop through the data here } }).done(function() {}); myphppage.php &lt;?php $servername = "name"; $username = "username"; $password = ""; $dbname = "dbname"; $connection = mysql_connect($servername,$username); if(!$connection) { die("Database connection failed: " . mysql_error()); }else{ $db_select = mysql_select_db($dbname,$connection); if (!$db_select) { die("Database selection failed:: " . mysql_error()); } $result = mysql_query("select * FROM tablename"); if (!$result) { echo 'Could not run query: ' . mysql_error(); exit; } $array= array(); while($row = mysql_fetch_array($result)) { array_push($array, $row); } echo json_encode($array); }
has comment: http://stackoverflow.com/comment/42073862
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42071964
tagged with: php
has comment: http://stackoverflow.com/comment/42072357
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42071530
has comment: http://stackoverflow.com/comment/42072743
has comment: http://stackoverflow.com/comment/42073715
has title: Using json_encode without displaying it on my webpage via echo or print
type: Question
has comment: http://stackoverflow.com/comment/42071889
has comment: http://stackoverflow.com/comment/42074446

http://stackoverflow.com/comment/42208026
type: Comment
type: QuestionComment
has text: You have some weird col and row array, why? Why not just `$("#demo").append(itemt.title);` You are not telling us WHAT you want to show, only that your code is not showing what you are not telling us you want to see
comment on: http://stackoverflow.com/q/26818604
score: 0

http://stackoverflow.com/comment/42088475
score: 0
type: Comment
has text: I'm not familiar with PHP. But your `$offset = date('O');` will returns a string. And PHP seems will not concatenate integer and string. But try to parse string and generate results. Like if your timezone is Denver `'-0700'` and timestamp is `1415175975300` it will result `1415175974600`. So your new time was incorrect. You maybe need to use `$offset = date('Z')*1000;` .
comment on: http://stackoverflow.com/a/26751635
type: AnswerComment

http://stackoverflow.com/q/26741919
downvote count: 0
tagged with: d3.js
type: UnansweredQuestion
score: 1
linked to: http://stackoverflow.com/q/13740164
type: Question
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42072582
has body: I have hacked a directive containing a simple pie chart inside a directive. Here is the exact sample in jsfiddle that works. But once I am trying to move this to my web app, I get the graph being built on top of the previous session (overlay) but no animation. I get no console errors. When I do a log for the data, the data is passing correctly. Here is the software I am currently using: AngularJS v1.2.1, D3 version: "3.4.13", which is being hosted by Express and NodeJS. Any suggestions of to what could cause this error. I don't want to have to reset the SVG every-time I get new data, I want a smooth transition. var App = angular.module('App', ['ngRoute', 'ngCookies']); App.directive('barsChart', function($parse) { d3.edge = {}; d3.edge.donut = function module() { var width = 460, height = 300, radius = Math.min(width, height) / 2; var color = d3.scale.category20(); .............//rest is the same as the js fiddle example
tagged with: node.js
has title: D3 animation (transition) does NOT work on Angular app
has answer: http://stackoverflow.com/a/26786129
tagged with: http://stackoverflow.com/tag/svg

http://stackoverflow.com/comment/42141250
type: QuestionComment
comment on: http://stackoverflow.com/q/26781007
has text: it works in ff/chrome/Safari :) We support ie10 and above, so idk if it would work in <=ie9. Apart from that, I actually tried using id/for, but as mentioned above, no change because it's not necessary.
score: 0
type: Comment

http://stackoverflow.com/comment/42229747
has text: another typo found, updated answer...
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26831455

http://stackoverflow.com/comment/42209397
score: 1
comment on: http://stackoverflow.com/q/26819287
has text: @T.J.Crowder I see what he did there. The humor with Juhana is strong.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41989353
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26697501
has text: You can just use .index().

http://stackoverflow.com/q/26697956
tagged with: ember.js
tagged with: local-storage
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26914016
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26914016
tagged with: ember-data
tagged with: javascript
has body: I am using ember data beta 11 with localstorage adapter version 0.4.0 ( also tested with 0.3.2), but when I try the find method it always goes into rejection when I use it with a query. ex: This works this.store.find('segment'); but this does not work and always returns a rejected promise with its reason set to undefined this.store.find('segment',{locked:false}); what could be the reason for that ?
score: 0
possible better answer: http://stackoverflow.com/a/28755530
has answer: http://stackoverflow.com/a/28755530
has title: Ember Data LocalStorage Adapter find always rejected

http://stackoverflow.com/a/26729580
accepted answer of: http://stackoverflow.com/q/26729523
has comment: http://stackoverflow.com/comment/42061344
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42062716
has body: You can go specific numbers of pages to go back window.location.history.go("page numbers here, for example -2"); UPDATE It works for : a.html as; PAGE A go to b b.html as; PAGE B go to c and c.html as; PAGE C
type: Answer
answers question: http://stackoverflow.com/q/26729523
has comment: http://stackoverflow.com/comment/42052513
score: 0
has comment: http://stackoverflow.com/comment/42059373

http://stackoverflow.com/q/26721137
has comment: http://stackoverflow.com/comment/42032379
has title: Bootstrap tooltips to stay open on hover
has answer: http://stackoverflow.com/a/36056707
downvote count: 0
linked to: http://stackoverflow.com/q/15989591
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/46150107
has answer: http://stackoverflow.com/a/77753841
favorite count: 0
has answer: http://stackoverflow.com/a/48569235
has answer: http://stackoverflow.com/a/62409704
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42032376
has body: I have bootstrap tooltips set up on my webpage. When you roll over an image the tooltips show up, inside the tooltips I have a link, when I roll over the actually tooltip to click the link... it fades away. My question (which I oddly could not seem to find an answer anywhere for) is how can I get tooltips to stay open when I hover over the actually tooltip itself. I've seen and tried some solutions where you can set a delay, but I'd rather not go in that direction as I didn't like that effect. Any help would be great, thanks!
has answer: http://stackoverflow.com/a/52944621
upvote count: 7
tagged with: css
has answer: http://stackoverflow.com/a/76228717
score: 7
has comment: http://stackoverflow.com/comment/42032306
linked to: http://stackoverflow.com/q/7703878
has answer: http://stackoverflow.com/a/65224765
has comment: http://stackoverflow.com/comment/137076719
type: Question
answer count: 8
has comment: http://stackoverflow.com/comment/137480421

http://stackoverflow.com/q/26773745
type: Question
accepted answer: http://stackoverflow.com/a/27312877
tagged with: youtube-channels
tagged with: javascript
has body: Im using youmax plugin to display videos from one channel, now i want to display the 3 channel playlists in one page for html site. is it possible to duplicate the function to display multiple channels on one page. Reference for plugin : link is here for that plugin any help Thanks..?
answer count: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27312877
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/38114910
tagged with: youtube
score: 2
has answer: http://stackoverflow.com/a/38114910
type: AnsweredQuestion
has title: youmax plugin to display multiple channel playlists
tagged with: youtube-api

http://stackoverflow.com/a/26778790
has body: I think Facebook will not allow you to post any script. Rather you can post links and if the user clicks on that link they will be redirected and there you can implement your code..
score: 0
answers question: http://stackoverflow.com/q/26778722
has comment: http://stackoverflow.com/comment/42164239
type: Answer

http://stackoverflow.com/comment/42163249
type: Comment
has text: well explained however i can't seem to get any output at all this way. any suggestions?
comment on: http://stackoverflow.com/a/26793985
score: 0
type: AnswerComment

http://stackoverflow.com/a/26726749
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
has body: You can try to use the onload event of the script tags you are loading. See this question, for example: Trying to fire the onload event on script tag. However, this mechanism seems pretty sketchy and may not be cross-browser. Another possible approach is to have the script that is being loaded trigger an event that can be handled by the existing javascript on the page. This may or may not make sense for your particular case, and it requires you to have control over the loaded script. Finally, these days it's rare for javascript loading to be a performance bottleneck for your website. So why are you trying to dynamically load javascript? Could you solve the same problem by loading some other resource, e.g. by doing an AJAX request?
has comment: http://stackoverflow.com/comment/42042556
accepted answer of: http://stackoverflow.com/q/26726458
answers question: http://stackoverflow.com/q/26726458
score: 2

http://stackoverflow.com/q/26741072
has comment: http://stackoverflow.com/comment/42068512
tagged with: ajax
has title: SOAP request returns OPTIONS - How to handle this to get the request working?
type: UnansweredQuestion
tagged with: soap
tagged with: web-services
has comment: http://stackoverflow.com/comment/42072952
answer count: 0
has comment: http://stackoverflow.com/comment/42067995
linked to: http://stackoverflow.com/q/3076414
type: Question
duplicate of: http://stackoverflow.com/q/3076414
has body: I've create a very simple SOAP request to access an example web service hosted by W3Schools (Code below). Now, executing the script (by pressing the button), the response is an OPTIONS with code 200 OK. So the service is seemingly up, I've got "crossDomain" enabled in my ajax request, yet it won't post the actual data. How do I fix this? I've done days of research and still couldn't get an answer I could use for JavaScript. Please help! Kind regards, jaySon SOAP JavaScript Client Test
tagged with: javascript
score: 0
tagged with: jquery

http://stackoverflow.com/comment/42093128
type: QuestionComment
comment on: http://stackoverflow.com/q/26754510
has text: Sorry I've never used nashorn so I can only try to give you hints... usually when we see errors in line 1 it's because the javascript was minified. Maybe there is some option in nashorn / eclipse to enable automatic minification, and this option would have been turned on?
score: 0
type: Comment

http://stackoverflow.com/q/26805964
has answer: http://stackoverflow.com/a/26805999
has answer: http://stackoverflow.com/a/26806049
tagged with: javascript
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/14220321
has comment: http://stackoverflow.com/comment/42184900
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/14220321
tagged with: node.js
has comment: http://stackoverflow.com/comment/42184908
has title: Return value from asynchronous functions in Nodejs
type: Question
has body: Hi i am making a web scraper using node, but the code always return 'undefined', i tried use 'async' module but the result is the same. Where is the error? var request = require('request'); var cheerio = require('cheerio'); //this function returns a info of a movie var get_info = function (url){ var meta = { title : '', year : '', length : '', gen : '', details : '', raiting : '', }; request.get(url, function (error, response, html){ if (!error &amp;&amp; response.statusCode == 200){ var $ = cheerio.load(html); meta.title = $('.movie-title h1').find('a').text(); meta.year = $('.release').text(); meta.length = $('.running_time').text().replace('minutos', ''); meta.gen = $('.btn-tags-list').find('a').first().text(); meta.details = $('.description').find('p').text(); meta.raiting = $('.movie-rating-average').find('.average').text(); }; }); return meta; }; Thanks.

http://stackoverflow.com/comment/42007178
has text: I understand, but I basically wanted to do a "count up", so I had to slow down the function :)
type: AnswerComment
comment on: http://stackoverflow.com/a/26707283
score: 0
type: Comment

http://stackoverflow.com/comment/42034571
comment on: http://stackoverflow.com/q/26722264
score: 0
type: QuestionComment
type: Comment
has text: you need to stringyfy the object (just to see what you are getting back), then once you know what you are receiving, stop stringifying it and get the properties that you want from the object.

http://stackoverflow.com/a/26699889
score: 1
accepted answer of: http://stackoverflow.com/q/26699392
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26699392
type: Answer
has body: Unless you rely on window.open, iframes, or allow your application to span multiple inter-communicating windows/tabs (perhaps cmmunication through postMessage), you have no other choice to manipulate the same document: there's only one document. However, it's not because a single document is manipulated that the document itself can't be divided into multiple encapsulated collaborating modules. Nicholas Zakas exposes this concept very well in his Scalable JavaScript Application Architecture presentation. A module should be given a very strict portion of the document on which they operates. That's their own little sandbox and they shouldn't reach into other module's sandbox. If they need to communicate, they do it in a very decoupled way (e.g. through a Mediator). Most today's frameworks rely on client-side variations of Model-View-Controller (MVC), often referred to as MV*/MVW, to achieve that goal. I will not go in details here, but the main goal is to decouple the data from the view (presentation), as well as often decoupling the view from the handling of user actions which is done in a Controller object. Until very recently, there was no real way to enforce encapsulation. For exemple, it wasn't possible to prevent some code external to a jQuery plugin to modify the DOM structure generated by that plugin. We had to rely on programmer's professionnalism to ensure they did not reach into a plugin's internals. Now, with the Web Components specification which introduces new concepts such as Shadow DOM, real encapsulation will be able to take place. Unfortunately, the specification is not yet implemented in browsers, but luckily for us, there's Google's Polymer project, which can be seen as a Web Components shim.
upvote count: 1

http://stackoverflow.com/comment/42171352
has text: please review my last answer on bottom. I am very bored :(
type: AnswerComment
comment on: http://stackoverflow.com/a/26796556
score: 0
type: Comment

http://stackoverflow.com/q/26681061
linked to: http://stackoverflow.com/q/12859942
tagged with: ajax
has title: Php why doesn't send response to Jquery ajax?
has comment: http://stackoverflow.com/comment/41961011
has comment: http://stackoverflow.com/comment/41961287
has comment: http://stackoverflow.com/comment/41961401
tagged with: php
has comment: http://stackoverflow.com/comment/41960849
has comment: http://stackoverflow.com/comment/41961771
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26681125
score: 0
has body: I would like to get data from a mysql database without page refresh. I use jquery ajax in client side and php in server side. The request went but the response is empty(if i go to xhr in Firefox than the request is good,no problem, but when i click answer/response it is empty and the size of the request also 0).There aren't any errors, but nothing happened. Here is my script.js javascript file: $(document).ready(function(){ $.post("ajax.php", { task: "get_iron" }, function(data) { $("#iron").html(data); } ); console.log("js doesn't have any problem");//it works fine }); And this is my ajax.php file: <?php $method = $_SERVER['REQUEST_METHOD']; if(strtolower($method)=='post') { if(isset($_POST['task']) && $_POST['task'] == "get_iron") { $con = mysql_connect('myhost','myusername','mypassword'); if (!$con) { die('Could not connect: ' . mysql_error($con)); } $sql="SELECT iron FROM minerals WHERE username = 'username'"; $result = mysql_query($sql,$con); $row = mysql_fetch_object($result); echo json_encode($row); } } ?> Should i use $.ajax instead of $.post? Please help me and note that i'm a beginner. Thank you for the responses.
has comment: http://stackoverflow.com/comment/41961360
tagged with: mysql
has comment: http://stackoverflow.com/comment/41960943
has comment: http://stackoverflow.com/comment/41960902
has comment: http://stackoverflow.com/comment/41961504
type: Question
has comment: http://stackoverflow.com/comment/41961280
has comment: http://stackoverflow.com/comment/41960847
has comment: http://stackoverflow.com/comment/41960912
has comment: http://stackoverflow.com/comment/41960969
accepted answer: http://stackoverflow.com/a/26681125
has comment: http://stackoverflow.com/comment/41961051
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41960861

http://stackoverflow.com/q/26830718
has comment: http://stackoverflow.com/comment/42231210
has comment: http://stackoverflow.com/comment/42228257
has comment: http://stackoverflow.com/comment/42231034
has title: htaccess only allow internal use
type: Question
has comment: http://stackoverflow.com/comment/42228851
tagged with: apache
has comment: http://stackoverflow.com/comment/42228489
tagged with: javascript
tagged with: .htaccess
score: 0
has body: I want a .htaccess that blocks the direct url to the .mp3 file. But that can be used by the webpage with javascript. So this need to be blocked: http://www.domain.com/music/song.mp3 But this is allowed: play song $('.play').click(function (e) { e.preventDefault(); var music = this.href.slice(22); $("#jplayer_N") .jPlayer("setMedia", {title: this.title, mp3: '/music/' +music+'.mp3'}) .jPlayer("play"); }); I have this .htaccess now and this is only blocking everthing. RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com/ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com.*$ [NC] RewriteRule \.(mp3)$ - [F] ErrorDocument 403 http://www.doainm.com Can someone tell me how to do this?
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/42200906
has text: where is your method 'searchdata() '?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26814807
score: 0

http://stackoverflow.com/comment/42179074
comment on: http://stackoverflow.com/a/26800975
score: 0
type: AnswerComment
type: Comment
has text: None of his properties have to be hung directly on scope. THe examples I gave below are directly from Google's Angular style guide and demonstrate how to build your controller avoiding scope. If you have any desire to follow Google's best practices and migrate your code to Angular 2.0 then it's worth following the recommended design from the team.

http://stackoverflow.com/a/27107784
answers question: http://stackoverflow.com/q/26769093
score: 3
upvote count: 3
downvote count: 0
has body: Try running grunt --debug with the following usemin configuration for some more information: usemin: { html: '../cdm_common/cdm/layouts/scripts/index.html', options: { assetsDirs: ['js/dest/rev/test'], blockReplacements: { js: function (block) { grunt.log.debug(JSON.stringify(block.dest)); grunt.log.debug(JSON.stringify(grunt.filerev.summary)); return '&lt;script src="'+block.dest+'"&gt;&lt;/script&gt;'; } } } } This will echo the current block its generating and an object with the files modified by filerev. In my case I had an extra "public/" folder so my string would not match the key in the object, and therefor usemin was unable to find the new location made by filerev: [D] "js/build/vendors.js" [D] "public\\js\\build\\vendors.js": "public\\js\\build\\vendors.4e02ac3d2e56a0666608.js", "public\\js\\build\\main.js": "public\\js\\build\\main.acd1b38e56d54a170d6d.js"} Eventually I fixed this with this custom blockReplacements function, (i.e. replacing public/ and the obnoxious Windows path): js: function (block) { var arr = {}; for (var key in grunt.filerev.summary) { arr[key.replace(/\\/g, "/").replace(/\/\//g, "/").replace("public/", "")] = grunt.filerev.summary[key].replace(/\\/g, "/"); } var path = (arr[block.dest] !== undefined) ? arr[block.dest] : block.dest; return '&lt;script src="{{ asset(\''+Twig.basePath + path +'\') }}"&gt;&lt;/script&gt;'; },
type: Answer

http://stackoverflow.com/q/26793405
has title: display alert on each selected check box from a group of checkboxes
answer count: 3
accepted answer: http://stackoverflow.com/a/26793587
possible better answer: http://stackoverflow.com/a/26793612
tagged with: checkbox
has answer: http://stackoverflow.com/a/26793612
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/42162138
has answer: http://stackoverflow.com/a/26793587
type: Question
has answer: http://stackoverflow.com/a/26793615
tagged with: javascript
has body: I have 3 checkboxes and I want them to do certain actions i.e display an alert box when they are checked and when one check box is checked, the others should be unchecked. I've been able to get the second part to work where only one checkbox can be checked at a time but I can't seem to make the first part of displaying an alert box work. js that ensures only one box is checked at any time: function qtyBox(e) { var c = document.getElementsByClassName("qty"); for (var i = 0; i &lt; c.length; i++) { c[i].checked = false; } e.checked = true; } html: &lt;input class="qty" type="checkbox" id="pails" onchange="qtyBox(this)"/&gt;Pails &lt;input class="qty" type="checkbox" id="liters" onchange="qtyBox(this)"/&gt;Liters &lt;input class="qty" type="checkbox" id="gallons" onchange="qtyBox(this)"/&gt;Gallons Now all that's left is when Pails is checked,I want an alert box to display pails. when liters is checked, an alert box to display liters and when gallons is checked, an alert box to display gallons.
has comment: http://stackoverflow.com/comment/42161976

http://stackoverflow.com/comment/42080983
comment on: http://stackoverflow.com/q/26748076
has text: See this previous question on parsing query strings in javascript: http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26702345
has comment: http://stackoverflow.com/comment/41998785
type: Answer
has comment: http://stackoverflow.com/comment/41998632
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/41998663
has comment: http://stackoverflow.com/comment/41998944
score: 4
has body: Just do var fs = require("fs") (or var myLib = require("path/to/my/lib")) so many times you need (in different files). require has an internal cache (require.cache), so same memory will be used. From documentation: require.cache Modules are cached in this object when they are required. By deleting a key value from this object, the next require will reload the module. Example Having the following files: . ├── a.js ├── b.js └── u.js u.js this.say = "Hello World!"; a.js var u = require("./u"); u.say = "Hello Mars!"; // change `say` property value require("./b"); // load b.js file b.js console.log(require("./u").say); // output `say` property Output: "Hello Mars!". Why? Because u.js loaded from b.js is loaded from require.cache (where u.say is set to "Hello Mars!" by a.js). To prevent loading from cache you can remove files from require.cache using delete require.cache[<absolute-path-to-file>]. Let's change b.js content as follows: delete require.cache[require.resolve("./u")]; console.log(require("./u").say); // output `say` property Output: "Hello World!" because the file wasn't loaded from cache but from disk.
accepted answer of: http://stackoverflow.com/q/26702336
has comment: http://stackoverflow.com/comment/41998679
answers question: http://stackoverflow.com/q/26702336
type: AcceptedAnswer

http://stackoverflow.com/comment/42133223
type: AnswerComment
comment on: http://stackoverflow.com/a/26676688
score: 0
type: Comment
has text: How would you do to post a link, and then redirect the user from the servers side route? This is what I have right now: http://paste.ofcode.org/ELbiuViYqjzyAm4YZMffmB but the server side is not able to redirect the user anywhere... I would have to do in the client side... which is not desirable.

http://stackoverflow.com/comment/42111110
score: 0
type: Comment
type: QuestionComment
has text: @rjdown If i'm not mistaken, both of the considerations I've listed can be implemented with php/session. That alone doesn't really help me decide which one is the better solution.
comment on: http://stackoverflow.com/q/26764970

http://stackoverflow.com/comment/42216026
has text: http://javascript.crockford.com/prototypal.html
comment on: http://stackoverflow.com/q/26823408
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/26720354
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Ping functionality to display on HTML
type: UnansweredQuestion
upvote count: 1
tagged with: ping
downvote count: 1
linked to: http://stackoverflow.com/q/4282151
has comment: http://stackoverflow.com/comment/42030792
type: Question
has body: Based on a search, I came across this stackoverflow thread, 'Is it possible to ping a server from Javascript?', and decided to follow trante's jfiddle example. It works for what I need it to do with the jquery and CSS part all in the same page as the html code. My issue is and would like to see if some one could help me, is that when I create a .js file and a .css and reference them in the header of the html, the function does not work. So here is what I am trying to accomplish. - jquery in .js file - stylesheet in .css file - HTML output in html page Here is trante's jfiddle example: http://jsfiddle.net/GSSCD/203/ Here is my html example reference: Test Ping tester Thanks, Karsten
score: 0
has answer: http://stackoverflow.com/a/26722614
tagged with: javascript
has answer: http://stackoverflow.com/a/26720579
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26721471

http://stackoverflow.com/a/26792254
has comment: http://stackoverflow.com/comment/42163214
has comment: http://stackoverflow.com/comment/42162899
has comment: http://stackoverflow.com/comment/42160169
type: Answer
answers question: http://stackoverflow.com/q/26792190
has body: I think this is more of a factor of W3Schools sucking at what it does. While the HTML5 standard (recently completed! yay) sets only HTML elements I suspect w3schools added this on here because it is newer. You are correct in assuming this is not an HTML thing but really a javascript thing. Might I direct you to Mozilla Developer Network which is more accurate and awesome. Javascript evolves on its own separate of HTML. EDIT: So it appears what has happened here is you have stumbled upon one of the weird gray areas of the standards organization. While HTML5 is a specification directly aimed at HTML there are also certain feature that are nice to have for the webapp age we live in. One of these is geolocation. A geolocation API was laid out by the W3 as a means for encouraging support of it among browser vendors. These vendors naturally chose ECMAScript (javascript) to support the api instead of an HTML tag or whatever. So no this is not necessarily part of the HTML standard but it is something that falls under the W3's sphere of influence because their overall concern is the standards that help to make developing on the web better.
has comment: http://stackoverflow.com/comment/42160488
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42160238
has comment: http://stackoverflow.com/comment/42160853
has comment: http://stackoverflow.com/comment/42160086
upvote count: 1

http://stackoverflow.com/comment/41985843
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26695343
type: Comment
has text: Why does it HAVE to be the same format? Are you trying to replace jQuery without actually rewriting the code that uses it?

http://stackoverflow.com/q/26689401
tagged with: javascript
tagged with: jquery
tagged with: sticky
has title: how to call a jquery plugin for sticky kit
score: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26689746
type: Question
accepted answer: http://stackoverflow.com/a/26689746
has body: I know this is probably an easy peasy baby question, but when you don't know you don't know :) I've been trying to install the jquery plugin, but I do not know how to "Just call stick_in_parent on the elements you want to be stuck inside of their parent. " (quote from the sticky kit web page) I added &lt;script type="text/javascript" src="jquery.sticky-kit.js"&gt;&lt;/script&gt; after thejquery link and I tried (in a desperate blind stab in the dark)... &lt;script&gt; function () { $(".navtop").stick_in_parent() } &lt;/script&gt; Can anybody help me out? Thanks!
answer count: 1

http://stackoverflow.com/comment/42114790
score: 1
comment on: http://stackoverflow.com/a/26766875
type: AnswerComment
has text: Hello, what do You exactly mean " instantiated before emitting the event." please?
type: Comment

http://stackoverflow.com/a/26799320
answers question: http://stackoverflow.com/q/26798862
type: Answer
score: 2
has body: I am not an expert in sequelize, but I see there code prone to SQL Injection. This is wrong: db.sequelize.query('INSERT INTO social_urls (artist_id,urls,type) VALUES('artistId','videoURL','type')', function(err) It should be, at least: db.sequelize.query("INSERT INTO social_urls (artist_id,urls,type) VALUES('" + artistId + "','" + videoURL + "','" + type + "')'", function(err) But really, I think you should be doing something like this: var SocialUrl = sequelize.define('SocialUrl', { videoURL: Sequelize.STRING, artistId: Sequelize.STRING, type: Sequelize.STRING }, { tableName: 'social_urls', timestamps: false }); SocialUrl .create({ videoURL: videoURL, artistId: artistId, type: type }) .complete(function(err, socialUrl) { if (err) { // log error; } else { // Do stuff } })
upvote count: 2
downvote count: 0

http://stackoverflow.com/a/26734869
answers question: http://stackoverflow.com/q/26731894
has comment: http://stackoverflow.com/comment/42059356
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42105224
score: 0
type: Answer
has body: This is what's known as an "in-page gallery." See the barebones example: http://highslide.com/examples/gallery-in-page.html The example from RoadRash's site is also an in-page gallery. It is not a popup that floats above everything else on the page. Here's an example from RoadRash's site that has three in-page galleries on a page of ordinary HTML. There are no popups, and no modal windows: http://www.roadrash.no/hs-support/3galleries-in-page.html A regular Highslide JS popup looks like this: http://highslide.com/examples/mini-gallery.html
accepted answer of: http://stackoverflow.com/q/26731894

http://stackoverflow.com/a/26755276
answers question: http://stackoverflow.com/q/26755179
type: Answer
score: 1
upvote count: 1
has body: If you insist on one long string concatenation, you'll have to use the Ternary Operator (?:): "some_long_string" + (customerInfo == "changeCustomer" ? ' YoYo ...' : ' NO NO ...') + "another_long_string"
downvote count: 0

http://stackoverflow.com/q/26825762
has answer: http://stackoverflow.com/a/26825894
has answer: http://stackoverflow.com/a/26825908
tagged with: web-applications
type: Question
tagged with: javascript
has body: For a small, learning the language (JavaScript) better project, I'd like to create a simple quiz web app. I have two questions: If my questions and answers will always be the same and I'm creating a quiz app that only uses multiple choice questions (I assume I'll use radio buttons for selectors), do I need a database? Or can I simply code all my questions and answers into an array of objects inside say a main.js file? Each object would have a question, four option answers, and the correct answer. Then it's a simple if statement to compare the selection against the correct answer. I ask this predominately because I'm afraid there'd be a security issue by not using a database, though I can't figure out why since users wouldn't submit anything. Taking it a step further: To make it more dynamic, instead of writing out every single question and answer, could I dynamically generate questions and potential answers using objects? Say I have a list of soccer objects which are teams. Inside each team object, I list positions and a player names. Some positions have multiple players. Then I have a separate object filled with questions. Could I set a random number on the Questions object to randomly generate a question then have some logic that knows when that question is generated, only these certain key value pairings from my objects can fit as answers? E.g. if the question is, "Which one of these is a Manchester United defender?" It would pull a random one Manchester United defender and randomly fill up the remaining three options with defenders from other teams. Every time I try to write it out logically, I get muddled so I think I'm approaching this poorly. Thanks and sorry for the rookie questions!
has title: Auto-Generate Quiz Questions & Answers for JavaScript App: Do I Need a Database?
tagged with: security
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26827382
type: UnansweredQuestion

http://stackoverflow.com/comment/42184603
comment on: http://stackoverflow.com/a/26803605
score: 0
type: AnswerComment
has text: Good point! I really doubt that anyone will be trying alter the URL to find out if there is a test mode, but still, thanks for pointing this out. I know I can't be too certain about what others are trying to do out there...
type: Comment

http://stackoverflow.com/a/26718208
type: Answer
has body: You can combine :not and :has: $('#list &gt; li:not(:has(a))').css({'background': 'red'}); http://jsbin.com/quyalunipo/1/edit?html,css,js,output
answers question: http://stackoverflow.com/q/26718125
score: 0

http://stackoverflow.com/comment/42181012
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26803567
has text: Very impressive, why Plunker rather than JSFiddle?
type: AnswerComment

http://stackoverflow.com/a/26800234
accepted answer of: http://stackoverflow.com/q/26800164
has comment: http://stackoverflow.com/comment/65704962
has body: As MDN Window.history() describes : For top-level pages you can see the list of pages in the session history, accessible via the History object, in the browser's dropdowns next to the back and forward buttons. For security reasons the History object doesn't allow the non-privileged code to access the URLs of other pages in the session history, but it does allow it to navigate the session history. There is no way to clear the session history or to disable the back/forward navigation from unprivileged code. The closest available solution is the location.replace() method, which replaces the current item of the session history with the provided URL.
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26800164

http://stackoverflow.com/comment/42134302
comment on: http://stackoverflow.com/q/26778180
type: Comment
type: QuestionComment
has text: `"but the jQuery code would execute only - after the elements."` Please explain what you mean, this question is not clear
score: 1

http://stackoverflow.com/a/26781749
upvote count: 1
downvote count: 0
type: Answer
has body: Use $('#playlist').scroll(function() { console.log("div is scrolling"); }); instead (like you did for window). Thats the purpose of scroll(). See jquery documentation.
score: 1
answers question: http://stackoverflow.com/q/26781664
has comment: http://stackoverflow.com/comment/42140771
has comment: http://stackoverflow.com/comment/42140791

http://stackoverflow.com/comment/42067151
score: 1
comment on: http://stackoverflow.com/q/26740499
has text: `user.data` is an array. Try `console.log(user.data[0].name);` instead
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26696465
has comment: http://stackoverflow.com/comment/41987814
has comment: http://stackoverflow.com/comment/41987801
has body: Initialize the selectmenu with the select callback specified: Try this. $( "#state" ).selectmenu({ select: function( event, ui ) {} }); Or You might be using an older version of the jquery-ui plugin. please check if it supports the selectmenu plugin. try the following.
answers question: http://stackoverflow.com/q/26696431
has comment: http://stackoverflow.com/comment/41987609
score: 0
type: Answer

http://stackoverflow.com/comment/42062008
score: 0
comment on: http://stackoverflow.com/q/26737199
type: Comment
type: QuestionComment
has text: `ng-submit` will prevent posting the form, and, I need to watch for clicks on specific buttons.

http://stackoverflow.com/comment/41997092
type: Comment
type: QuestionComment
has text: Put that in an answer so we know this question is solved
comment on: http://stackoverflow.com/q/26699946
score: 0

http://stackoverflow.com/q/26738599
score: 3
upvote count: 3
has body: I am dynamically creating a table using JavaScript code below: function CreatTable(data) { var tablearea; var table; var thead; var tr; var th; tablearea = document.getElementById('ShowDataID'); table = document.createElement('table'); thead = document.createElement('thead'); tr = document.createElement('tr'); for (var i = 0; i &lt; data.length; i++) { var headerTxt = document.createTextNode(data[i]); th = document.createElement('th'); th.appendChild(headerTxt); tr.appendChild(th); thead.appendChild(tr); } table.appendChild(thead); for (var i = 1; i &lt; 4; i++) { tr = document.createElement('tr'); tr.appendChild(document.createElement('td')); tr.appendChild(document.createElement('td')); tr.appendChild(document.createElement('td')); tr.cells[0].appendChild(document.createTextNode('John')); tr.cells[1].appendChild(document.createTextNode('McDowell')); tr.cells[2].appendChild(document.createTextNode('ddd@gmail.com')); table.appendChild(tr); } tablearea.appendChild(table); } &lt;/script&gt; When I create table I also need to create checkbox column in the table above. Any idea how I can implement it using JavaScript? Or related link?
tagged with: dom
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has title: How to create checkbox column in the table?
has comment: http://stackoverflow.com/comment/42063139
has answer: http://stackoverflow.com/a/26738710
has answer: http://stackoverflow.com/a/26738659
linked to: http://stackoverflow.com/q/866239
favorite count: 0
tagged with: dom-manipulation
type: UnansweredQuestion

http://stackoverflow.com/q/26791758
type: Question
tagged with: javascript
tagged with: jquery
has body: I run a jQuery styleswitcher that change stylesheet on click.I tried some solutions but i cant find a solution for this. I dont understand how to set a cookie to this. Please anybody that can help me with this issue? Markup: jQuery (function ($) { "use strict"; var mainApp = { main_fun: function () { /*===================================== THEME SWITCHER SCRIPTS ===================================*/ //THE CALLING OF PANEL ON CLICKING PLUS BUTTON jQuery('#switch-panel').click(function () { if (jQuery(this).hasClass('show-panel')) { jQuery('.switcher').css({ 'left': '-50px' }); jQuery('#switch-panel').removeClass('show-panel'); jQuery('#switch-panel').addClass('hide-panel'); } else if (jQuery(this).hasClass('hide-panel')) { jQuery('.switcher').css({ 'left': 0 }); jQuery('#switch-panel').removeClass('hide-panel'); jQuery('#switch-panel').addClass('show-panel'); } }); $('#black').click(function () { $('#mainCSS').attr('href', 'assets/css/style.css'); //THE STYLE SHEETS WITH THEIR PATHS }); $('#blue').click(function () { $('#mainCSS').attr('href', 'assets/css/blue.css'); //THE STYLE SHEETS WITH THEIR PATHS }); $('#green').click(function () { $('#mainCSS').attr('href', 'assets/css/green.css'); //THE STYLE SHEETS WITH THEIR PATHS }); $('#red').click(function () { $('#mainCSS').attr('href', 'assets/css/red.css'); //THE STYLE SHEETS WITH THEIR PATHS }); }, initialization: function () { mainApp.main_fun(); } } $(document).ready(function () { mainApp.main_fun(); }); }(jQuery));
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/42159428
linked to: http://stackoverflow.com/q/4825683
tagged with: css
has answer: http://stackoverflow.com/a/26792322
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/26792322
upvote count: 2
tagged with: cookies
has title: jquery css styleswitcher set cookie to css

http://stackoverflow.com/q/26741603
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42069450
linked to: http://stackoverflow.com/q/13153897
has body: I'd like to have a transition on width of a container which width of the container is equal to the width of content and content is changing by dom. Here is a link http://jsfiddle.net/sabbasi/5xc5s08w/3/ Code from Fiddle: var container = $(".container"); var nav = $(".nav"); var menu = $(".menu"); $(".sth1").click(function(){ nav.detach(); menu.appendTo(container); menu.show(); }); $("button").click(function(){ menu.detach(); nav.appendTo(container); });
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/42069272
answer count: 0
score: 1
upvote count: 1
has title: Transitioning "width"property while DOM is changing
type: Question
tagged with: javascript
tagged with: dom
has comment: http://stackoverflow.com/comment/42069709
downvote count: 0
has comment: http://stackoverflow.com/comment/42070688

http://stackoverflow.com/q/26700716
accepted answer: http://stackoverflow.com/a/26700761
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: confirm
has title: jQuery confirm (href) not working correctly
has answer: http://stackoverflow.com/a/26700761
type: AnsweredQuestion
has body: I have a jQuery confirm action that doesn't open the right url. It opens the first url in the table row. &lt;td&gt;&lt;a class="confirm" href="verwijderen.php?page=honden&amp;id=&lt;?php echo $rows['id'];?&gt;" &gt;Verwijder&lt;/a&gt;&lt;/td&gt; . &lt;script&gt; $(".confirm").confirm({ text: "Weet je het zeker?", title: "Bevestig verwijderen", confirm: function(button) { window.document.location = $(".confirm").attr("href"); }, cancel: function(button) { return false; }, confirmButton: "Ja, dat weet ik zeker", cancelButton: "Nee", post: true }); &lt;/script&gt; The problem is the jQuery confirm script only executes the first url in the list - in this case id=1. For all the other items in the table it executes id=1 also. When I hoover the url's in the table rows it shows the correct id's, like id=6. On execution of the script, it goes wrong. Any ideas?
type: Question

http://stackoverflow.com/q/26718530
upvote count: 0
score: -2
has answer: http://stackoverflow.com/a/26718727
answer count: 1
has body: I want to get data from JSON and put that into a bidimensional matrix using JavaScript. I get my values in JSON like this: $(data).each(function(index,value){ // for each //getting my data values. Example: EU-New York var option = value.split('-'); // spliting by '-' var country = option[0]; // getting country var city = option[1]; // city // Here save to Javascript variable. For each Country, N cities. } Example to better understand. For each Country, N cities: country1 &gt; city1 &gt; city2 &gt; city3 country2 &gt; city1 &gt; city2 Is there any way to make a two-dimensions matrix and save it temporarily in a Javascript variable?
tagged with: javascript
favorite count: 0
has title: Make a two-dimensions (bidimensional) matrix in javascript provided by JSON
tagged with: matrix
tagged with: parsing
accepted answer: http://stackoverflow.com/a/26718727
downvote count: 2
has comment: http://stackoverflow.com/comment/42027159
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/42027970

http://stackoverflow.com/q/26768487
has answer: http://stackoverflow.com/a/26772010
has comment: http://stackoverflow.com/comment/42117624
has comment: http://stackoverflow.com/comment/42118373
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26771861
has comment: http://stackoverflow.com/comment/42117984
type: Question
has title: Dynamically loading content on local HTML page
has answer: http://stackoverflow.com/a/26769126
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42117705
score: 0
linked to: http://stackoverflow.com/q/10752055
has body: Context: Basically I'm attaching a little HTML help doc to go with my program (not meant to be on a server, viewed locally). HTML just because I'm most comfortable in making docs in it but I also want it to have some interactivity/dynamic content which I can't do in a PDF or whatever. I'm dynamically replacing the content when you click on a link instead of making every page need it's own HTML page, which is just something I'm used to doing so I can change the menu and banner and whatever else on a single 'main' html file without having to adjust every single other html file for one tiny change in the shared stuff. Current Method: Right now it's all done through javascript and jQuery. When a user clicks a link, I use jQuery's load() function to load the appropriate content (an html file) and replace the content div with what's in the loaded html file. Currently just using relative links. E.g. the core function is something like below: $("#ContentBox").load("content/faq.html"); This actually worked a few weeks ago when I first wrote it. It's not like I built the whole thing and didn't test its core concept until just now. But now it seems all the browsers are blocking it. Chrome says: XMLHttpRequest cannot load file:///C:/[....]/content/home.html. Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https, chrome-extension-resource. ` Question: So I understand why it's happening as it's a potential security risk to allow that, I just want to figure a good way around it that still does what I want (if it's possible). I mean I could just preload all the content as huge string variables in the javascript file or as hidden divs that get turned on and off, but I was hoping for something a little more elegant. And I can't expect all users of my program to setup a local web server just to view to help doc. I've considered the File and FileReader classes but they require a user input for a lot of functions. There's also iFrames but tha…
answer count: 3
type: UnansweredQuestion

http://stackoverflow.com/q/26699628
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26704700
has body: I have the following image upload script: function upload_media_async(form_name, media_type, file_path, file_url, file_embed, nb_uploads, max_uploads, upload_id) { var radio_buttons = []; for (var i = 0; i &lt; form_name.length; i++) { if (form_name.elements[i].type == 'radio' &amp;&amp; form_name.elements[i].checked == true) { radio_buttons[form_name.elements[i].name] = form_name.elements[i].value; } } var jsHttp = new JsHttpRequest(); var xmlHttp = GetXmlHttpObject(); if (jsHttp == null) { alert("Browser does not support HTTP Request"); return; } var media_name = ''; switch (media_type) { case 1: media_name = 'ad_image'; break; case 2: media_name = 'ad_video'; break; case 3: media_name = 'ad_dd'; break; } var media_box_name = 'display_media_boxes_' + media_name; file_embed = base64Encode(file_embed); var url = relative_path + 'ajax_files/upload_file.php'; var action = url + '?do=add&amp;media_type=' + media_type + '&amp;file_url=' + file_url + '&amp;file_embed=' + file_embed + '&amp;nb_uploads=' + nb_uploads + '&amp;upload_id=' + upload_id; var thumbnail_div = document.getElementById('display_media_boxes_' + media_name); var new_content = document.createElement('div'); if (file_embed != '') { xmlHttp.onreadystatechange = function() { if (xmlHttp.readyState == 4) { var response = xmlHttp.responseText; var results = response.split('|'); if (results[5] != '') { alert(results[5]); } else { new_content.innerHTML = results[3]; while (new_content.firstChild) { thumbnail_div.appendChild(new_content.firstChild); } var hidden_div = document.getElementById('hidden_media_boxes'); var hidden_content = document.createElement('div'); hidden_content.innerHTML = '&lt;input type="hidden" name="' + results[1] + '[]" id="hidden_' + results[2] + '" value="' + results[4] + '"&gt;'; while (hidden_content.firstChild) { hidden_div.appendChild(hidden_content.firstChild); } nb_uploads++; } // document.getElementById('div_file_' + media_type).innerHTML = document.getElementById('div_file_' +…
has comment: http://stackoverflow.com/comment/41996963
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42002103
has comment: http://stackoverflow.com/comment/41993208
has comment: http://stackoverflow.com/comment/41999176
has comment: http://stackoverflow.com/comment/41997021
type: Question
tagged with: javascript
tagged with: forms
has title: image upload not working when changing upload button from input to span
score: 0

http://stackoverflow.com/q/26758549
accepted answer: http://stackoverflow.com/a/27414591
tagged with: extjs
tagged with: extjs4
favorite count: 0
tagged with: extjs4.2
upvote count: 2
has body: Good day. I am developing a Web Application and there's a part where I print the form on button click. To achieve this, I overrode the definition of my Form Panel so that I can call form.print() anywhere in my code when I need to. Here is how I overrode my form: Ext.define('my_app_name.override.form.Panel', { override: 'Ext.form.Panel', print: function(pnl) { if (!pnl) { pnl = this; } // instantiate hidden iframe var iFrameId = "printerFrame"; var printFrame = Ext.get(iFrameId); if (printFrame === null) { printFrame = Ext.getBody().appendChild({ id: iFrameId, tag: 'iframe', cls: 'x-hidden', style: { display: "none" } }); } var cw = printFrame.dom.contentWindow; // instantiate application stylesheets in the hidden iframe var stylesheets = ""; for (var i = 0; i &lt; document.styleSheets.length; i++) { stylesheets += Ext.String.format('&lt;link rel="stylesheet" href="{0}" /&gt;', document.styleSheets[i].href); } // various style overrides stylesheets += ''.concat( "&lt;style&gt;", ".x-panel-body {overflow: visible !important;}", // experimental - page break after embedded panels // .x-panel {page-break-after: always; margin-top: 10px}", "&lt;/style&gt;" ); // get the contents of the panel and remove hardcoded overflow properties var markup = pnl.getEl().dom.innerHTML; while (markup.indexOf('overflow: auto;') &gt;= 0) { markup = markup.replace('overflow: auto;', ''); } var str = Ext.String.format('&lt;html&gt;&lt;head&gt;{0}&lt;/head&gt;&lt;body&gt;{1}&lt;/body&gt;&lt;/html&gt;',stylesheets,markup); // output to the iframe cw.document.open(); cw.document.write(str); cw.document.close(); // remove style attrib that has hardcoded height property cw.document.getElementsByTagName('DIV')[0].removeAttribute('style'); // print the iframe cw.print(); // destroy the iframe Ext.fly(iFrameId).destroy(); } }); Then on a click of a button in my Web App, I do something like: var form = Ext.getCmp('formIDHere'); form.print(); However, this code is rather inconsistent at times. There a…
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27414591
has title: ExtJS 4 - Printing Forms Programatically sometimes gives "Print Preview Failed" in Chrome
tagged with: forms
type: Question
score: 2
downvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41958637
type: Comment
has text: What do you mean by traditional URL string? Using $location service with relative URLs never makes the page reload in Angular.
comment on: http://stackoverflow.com/a/26679409
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42141963
type: QuestionComment
has text: The tooltip requires a div tag with the class demo-interact. If you see the code above I have used mRender and wrapped the contents of that cell in a div tag with that class.
comment on: http://stackoverflow.com/q/26760990
score: 0
type: Comment

http://stackoverflow.com/q/26782475
has comment: http://stackoverflow.com/comment/42187480
favorite count: 0
has body: I am trying to add a channel to a channel group and associate an auth_key for pub/sub to this channel using this code: pubnub.channel_group_add_channel({ callback: function(success) { pubnub.grant({ channel: channelName, auth_key: userAuthKeyForChannel, read: true, write: true, ttl:0, callback: function(response){ console.log(response); res.status(200).json({response: {ChatChannel: createdRecord}, token:req.token}); } }); }, error: function(err) { return hlprs.sendResWithErr(res,err,500,true,'Error while trying to add channel to group in our messaging platform'); }, channel: channelName, channel_group: channelGroupName }); But I always get the response { message: 'Forbidden', payload: { 'channel-groups': [ ':90c977bbc169b12054706b0de07dd9f2' ] } } When I disable Access Manager in PubNub admin panel, it (obviously) works perfectly. I'd also like to mention that this request takes place in a server backend where pubnub is initialized with subscriber_key, publish_key and secret_key. There are no other pubnub requests prior to this one and there's no one subscribed in other environments. EDIT: I suppose I need to grant permissions to the backend at the application level before proceeding with adding the channel in a group, however I am unsure how to properly do this.
tagged with: pubnub
score: 2
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/42169734
accepted answer: http://stackoverflow.com/a/26807417
type: Question
upvote count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26807417
has comment: http://stackoverflow.com/comment/42187381
has title: Message: 'Forbidden' when trying to add channel to channel group in PubNub
answer count: 1
has comment: http://stackoverflow.com/comment/42160010

http://stackoverflow.com/comment/41974277
has text: There are a lot of problems with your code, including: The nested loops and multiple ball variables are not doing anything. Your inner and outer functions have the same name. Try thinking about one function which creates a new ball and another separate function (not inside the first one) which updates all the animation in each frame. Also your canvases are not aligned with the boxes -see here http://jsfiddle.net/gyv81ez4/2/
score: 0
comment on: http://stackoverflow.com/q/26687939
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26714255
has body: Please check the Cordova config.xml file doc once. You basically have to add/modify a preference in config.xml. Orientation allows you to lock orientation and prevent the interface from rotating in response to changes in orientation. Possible values are default, landscape, or portrait. &lt;preference name="Orientation" value="landscape" /&gt;
has comment: http://stackoverflow.com/comment/42019323
has comment: http://stackoverflow.com/comment/42048261
answers question: http://stackoverflow.com/q/26714073
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42043221
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42048897
has comment: http://stackoverflow.com/comment/42049000
has comment: http://stackoverflow.com/comment/42019449
accepted answer of: http://stackoverflow.com/q/26714073
upvote count: 2
has comment: http://stackoverflow.com/comment/42048670

http://stackoverflow.com/comment/76764001
score: 1
type: Comment
has text: There is a [current issue with webpack 3 and the ModuleConcatenationPlugin](https://github.com/webpack/webpack-dev-server/issues/968) that prevents watching for file changes. Omitting it seems to allow it to work.
comment on: http://stackoverflow.com/a/28610124
type: AnswerComment

http://stackoverflow.com/q/26824820
type: AnsweredQuestion
tagged with: tabs
upvote count: 3
type: Question
has body: I have a simple jQuery tab working fine. The code for this feature is: $(document).ready(function() { var tabHead = $('ul li'); var tabContent = $('.content'); tabContent.not(':first').hide().end(); tabHead.on('click',function() { tabContent.hide().eq($(this).index()).show(); }); }); And the HTML markup for the tabs is: Head 1 Head 2 Some Content/........ Some Content/........ However, when I click the "Back" and "Forward" buttons of the browser, only the url changes e.g. http://some-path/demo-tabs/#tab2 The content of the tab does not show up. How can I make the tab's content also show up on clicking the "Back" or "Forward" buttons?
tagged with: javascript
has answer: http://stackoverflow.com/a/26824887
answer count: 2
score: 3
downvote count: 0
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26824887
possible better answer: http://stackoverflow.com/a/26824890
favorite count: 0
has answer: http://stackoverflow.com/a/26824890
tagged with: http://stackoverflow.com/tag/html
has title: Navigate between page tabs when the browser's Back and Forward buttons are clicked

http://stackoverflow.com/comment/42154948
comment on: http://stackoverflow.com/a/26789029
type: Comment
score: 0
has text: Thanks it worked all I had to do was change [0] to [3] and it worked great.
type: AnswerComment

http://stackoverflow.com/comment/42080098
has text: what exactly is the total behavior you expect? Fiddle isn't very defintitive
type: QuestionComment
comment on: http://stackoverflow.com/q/26747339
score: 0
type: Comment

http://stackoverflow.com/comment/42145418
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26782213
score: 0
has text: @Forlan07 Was expecting a more obvious function that splits the string rather than the one that returns the position. So.

http://stackoverflow.com/comment/42134621
has text: file here looks like it is an object containing various attribute, pick the one you want to send like `file.name`
score: 1
comment on: http://stackoverflow.com/q/26778225
type: Comment
type: QuestionComment

gmail
type: Tag
tags question: http://stackoverflow.com/q/26743377
tag name: gmail
tags question: http://stackoverflow.com/q/26831327

http://stackoverflow.com/q/26779204
tagged with: javascript
has answer: http://stackoverflow.com/a/26779382
answer count: 1
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26779382
has body: Input tags jQuery code to change value in hidden input when any user is searched terms.push( ui.item.emp_id ); jQuery("#user_id").val(ui.item.emp_id); Here emp_id is the userId passed from ajax response, so the input now looks like (12 is userID) How can I push multiple values in input so that it look like below Array being passed in json_encode $array_pm[] = array('label' => $row['emp_name'], 'value' => $row['emp_name'], 'emp_id' => $row['emp_id'] ); My current script pushes only single value in hidden inpput, but how to push multiple values when user searches more than one record ? Thanks.
type: AnsweredQuestion
has title: jQuery push multiple values in input tag
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
type: Question
tagged with: jquery-ui-autocomplete

http://stackoverflow.com/q/26792257
tagged with: google-maps
accepted answer: http://stackoverflow.com/a/26792425
answer count: 1
tagged with: javascript
tagged with: google-maps-api-3
score: 0
has body: I'm having trouble putting some things together. I can make a php page that will display results from a mysql database and I can get addresses to map with google, but I can't seem to put both of them together. What I am trying to do is to map the first 2 or 3 results for a database search. I just can't seem to pass in the address from the results into the geocoder. I've tried a few different ways but I really don't know where to start and a lot of what I am reading is over my head. (Javascript is NOT something I've really worked with much before.) I've got the code I have below. I know it is missing some elements so therefore does not work. It would be great if someone could help me out and show me how to pass my values in properly. <?php //Include Function- positive this is fine. include ('../includes/dbCon.php'); echo "Page Header Stuff "; $query= "SELECT full_addr from address_lst limit 2"; $result = mysql_query($query, $con); echo " "; while ($row = mysql_fetch_assoc($result)) { echo $row['addr']; } ?> Thanks in advance!
has answer: http://stackoverflow.com/a/26792425
has title: Map top results from a query wth Google Maps
tagged with: php
type: AnsweredQuestion
tagged with: mysql
type: Question

browser
tags question: http://stackoverflow.com/q/26781561
tags question: http://stackoverflow.com/q/26722325
tags question: http://stackoverflow.com/q/26712449
tags question: http://stackoverflow.com/q/26768402
tags question: http://stackoverflow.com/q/26793042
tags question: http://stackoverflow.com/q/26757651
tags question: http://stackoverflow.com/q/26826767
tags question: http://stackoverflow.com/q/26713079
tags question: http://stackoverflow.com/q/26812227
tag name: browser
tags question: http://stackoverflow.com/q/26816177
tags question: http://stackoverflow.com/q/26738943
type: Tag
tags question: http://stackoverflow.com/q/26730184

http://stackoverflow.com/comment/42218474
has text: I am not against the advanced solutions providing another "not" modifier for those who wish to use it. But I already have one, that is `!` in the programming language, and I don't need anything else. Having said this, I expect that there should be simplier (yet popular) testing solutions. But almost every testing framework duplicates the entities implying this is the correct approach. The "minimal list" of needed functions which I wrote in my question should actually cover all the cases I can imagine.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26812387

http://stackoverflow.com/comment/42213075
comment on: http://stackoverflow.com/a/26821735
type: AnswerComment
score: 0
has text: thank you not want on click i want mouseover or hover
type: Comment

http://stackoverflow.com/comment/47229814
type: Comment
comment on: http://stackoverflow.com/a/26738061
type: AnswerComment
has text: But what if you want to open side menu when the user click the hardware back button?
score: 0

http://stackoverflow.com/q/26730663
has comment: http://stackoverflow.com/comment/42050535
downvote count: 1
has comment: http://stackoverflow.com/comment/42049117
has comment: http://stackoverflow.com/comment/42331482
tagged with: css
has answer: http://stackoverflow.com/a/27824841
has body: I am new to jsp. I am using Glassfish server from netbeans. Problem is that i could link my jsp file with css and javascripts. Here's the format of my file structure Web Pages --Web-Inf --assets --css --style.css --js --jquery.js --includes --header.jsp --footer.jsp --sidebar.jsp --pages --home.jsp --index.jsp Here's the code in my index.jsp &lt;%@include file="includes/header.jsp" %&gt; &lt;% if (request.getParameter("page") == null) { %&gt; &lt;%@include file="pages/home.jsp" %&gt; &lt;% } else { %&gt; &lt;% } %&gt; &lt;%@include file="includes/sidebar.jsp" %&gt; &lt;/div&gt; &lt;!--Latest end--&gt; &lt;%@include file="includes/footer.jsp" %&gt; And here's my code in header.jsp &lt;link href="${pageContext.request.contextPath}/assets/css/bootstrap.min.css" rel="stylesheet"&gt;
has comment: http://stackoverflow.com/comment/42049080
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42049327
has comment: http://stackoverflow.com/comment/42363299
has comment: http://stackoverflow.com/comment/42050641
score: 2
has comment: http://stackoverflow.com/comment/42049558
tagged with: java
type: Question
has comment: http://stackoverflow.com/comment/42050202
answer count: 1
tagged with: jsp
tagged with: javascript
has comment: http://stackoverflow.com/comment/42050871
favorite count: 0
has comment: http://stackoverflow.com/comment/42049421
has title: JSP couldnt link css files and js files
has comment: http://stackoverflow.com/comment/42050434
upvote count: 3

http://stackoverflow.com/a/26827891
accepted answer of: http://stackoverflow.com/q/26827840
has body: Use $watch: var app = angular.module('testApp', []); app.controller('myController', function($scope) { $scope.ligas = ['Bronze', 'Prata', 'Ouro', 'Platina', 'Diamante']; $scope.$watch('currentliga', function(newValue, oldValue) { switch (newValue) { case 'Bronze': $scope.valor = 24; break; } }); }); {{ liga }}
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/42223511
answers question: http://stackoverflow.com/q/26827840
type: Answer

http://stackoverflow.com/a/26707343
has body: This sounds like it could be the problem with rails 4, jquery and turbolinks. Think of turbolinks as an ajax replacement of the entire page. It comes default with rails 4. The problem with it and jquery is your jquery ran and bound to stuff the first time the page was loaded... and is NOT rerun to bind to the new stuff on the next page "load". If you manually refresh your page and the problem stops it can be a sign of that. There are two possible solutions. In the past I've taken the quick short term solution of just ripping out turbolinks Here's a link with instructions on how to do that: http://blog.steveklabnik.com/posts/2013-06-25-removing-turbolinks-from-rails-4 Alternatively there is a gem that may help turbolinks play nice with your project. I haven't used it yet but it's discussed in this stackoverflow: Rails 4 TurboLinks and jQuery Dynamic Links Not Playing Nice
answers question: http://stackoverflow.com/q/26707039
upvote count: 1
has comment: http://stackoverflow.com/comment/42044535
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42040472
type: Answer

http://stackoverflow.com/comment/42574007
type: AnswerComment
comment on: http://stackoverflow.com/a/27001941
has text: Gotcha - just so i'm getting this right, it's not technically a circle then, right? Or, I should really say, it's a low resolution circle, right? Not that it's wrong, im just curious
type: Comment
score: 1

http://stackoverflow.com/comment/42073715
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26742905
has text: It looks like you are running `mypagephp.php` on page load,as well as returning a response with js.
score: 0

http://stackoverflow.com/comment/65201685
has text: I used: NSRunLoop.currentRunLoop().runMode("NSDefaultRunLoopMode", beforeDate: NSDate.distantFuture()) this worked! Thanks for your answer!!!
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/37871595
type: Comment

http://stackoverflow.com/comment/42183268
type: Comment
has text: You have to parse JSON, just like you have commented out in your code.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26802277

http://stackoverflow.com/comment/41997700
type: QuestionComment
has text: I see your server just serves a html page, thats the problem... - try this http://stackoverflow.com/questions/4064444/returning-json-from-a-php-script
comment on: http://stackoverflow.com/q/26701822
score: 0
type: Comment

http://stackoverflow.com/a/26782098
downvote count: 0
answers question: http://stackoverflow.com/q/26781576
score: 1
upvote count: 1
type: Answer
has body: The stroke-dasharray value needs changing as the radius changes. Note that 565.48 = 2 * PI * 90 so when you change the radius you need to change the stroke-dasharray attribute to be 2 * PI * r where r is the new radius.

http://stackoverflow.com/comment/42222466
type: QuestionComment
comment on: http://stackoverflow.com/q/26826906
score: 0
has text: ok..actually it is not happening for same domain also. And shouldn't it come to success handler after completion.?
type: Comment

http://stackoverflow.com/q/26802132
tagged with: call
has comment: http://stackoverflow.com/comment/42190477
type: Question
tagged with: function
has body: I got a question considering some php code i'm working with. In the code i got a function definde with 3 input values (as shown at the very bottom), that is called somewhere else in the programm with an x_ preceded. Furthermore it is called with 4 values even though the function definition only includes 3 values. The 4th value appears to me to be related with some javascript code, cause it calls a function in an .js document. (unfortunately im not familiar at all with js up to now) Now im wondering why the function is called with the preceding x_* and what the 4th value passed to the function is doing? The programm also includes sajax which i dont know at all, but maybe this helps providing an answer. I appreciate a lot your help! The code of the javascript file is the following: function assign_projekt_cb(data) { alert(data["meldung"]); } In the php code the function is called by the following code: echo " onClick=\"x_assign_recht('".$row["idUser"]."', 'download', this.checked, assign_recht_cb)\"&gt;"; and defined as follows: function assign_recht($user, $recht, $value) { if (rechtecheck("adminadmin",true)) { if ($value == 1) { $sql = "UPDATE `User` SET `$recht` = 1 WHERE `idUser` LIKE '$user';"; $meldung = "Passt! $recht = 1 bei User $user"; } else { $sql = "UPDATE `User` SET `$recht` = 0 WHERE `idUser` LIKE '$user';"; $meldung = "Passt! $recht = 0 bei User '$user'"; } $result = mysql_query($sql) or die ("Error manipulating information. " . mysql_error()); return array("meldung" =&gt; $meldung, "idartikel" =&gt; $idartikel); } } I'm new to the forum and just started learning php. Now im working on that particular php code using a js code at only one point what makes it pretty difficult for me to interpret that code segment at that specific point, cause of the lack of knowledge in js programming. On the other hand i dont have the capabilities right now to get familiar with java, so i hoped someone here can help me understand that code a bit better. Please forgive t…
tagged with: javascript
has comment: http://stackoverflow.com/comment/42177643
score: 0
has comment: http://stackoverflow.com/comment/42181815
has comment: http://stackoverflow.com/comment/42178306
has comment: http://stackoverflow.com/comment/42177828
has comment: http://stackoverflow.com/comment/42177646
answer count: 0
tagged with: sajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42179208
tagged with: php
has title: Using javascript functions in a php code
has comment: http://stackoverflow.com/comment/42633882

http://stackoverflow.com/a/26706073
answers question: http://stackoverflow.com/q/26705986
score: 0
has body: This is not possible by using html only. You could create a hidden input field and a "change" event handler on the range input field. The event handler sets the value of the hidden input field to the label corresponding to the selected number (1: bad, 2: ok, 3: good). Example: Bad Ok Good The advantage of this solution is, you can easily adopt your labels in the html code, you don't need to modify your php logic.
type: Answer

http://stackoverflow.com/q/26677112
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
score: 2
upvote count: 2
type: UnansweredQuestion
tagged with: fine-uploader
has body: Is there any method to get the size of file selected with Fine Uploader on a submit callback? .on('submit', function(obj, fileIndex, fileName){ }
type: Question
has answer: http://stackoverflow.com/a/26718733
has title: how to get file size with fine uploader on submit callback

http://stackoverflow.com/q/26699786
upvote count: 1
type: Question
tagged with: angular-routing
has title: Defer creation of controllers/services on app run angularjs
tagged with: javascript
has comment: http://stackoverflow.com/comment/41998255
answer count: 1
downvote count: 0
tagged with: deferred-rendering
has answer: http://stackoverflow.com/a/26707852
has comment: http://stackoverflow.com/comment/42002116
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42004647
tagged with: angular-services
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/26707852
has comment: http://stackoverflow.com/comment/41999451
has body: every time the route change, I check if is set a variable with the current logged user details, if this variable is not set, I simply redirect to the login page. Now I'm trying to achieve some kind of "remember me" functionality, so every time the route changes, if the variable user doesn't exist instead of redirecting to the login page, I check the local storage for an "authtoken", if is set I call a check function passing the authtoken to the server, that returns the user and the app will works the same way as after the manual login (that returns the same user as the check function). I'm pretty sure this is not the best way to do that. If I reload the page, first thing I run the check function that sends the authtoken to the server and wait for a response, if the user exists that value is assigned to a variable in the rootscope. I have different services that use the variable in the rootscope, for example angular.module('myApp') .service('AdminService', function AdminService($rootScope, $http, StorageService) { var authtoken = StorageService.get('authtoken'); var clientId = $rootScope.loggedUser.id; and of course when the check function runs it waits for the response, but the service is being instantiated and $rootScope.loggedUser.id does not exists. How can I tell the app to wait until the check function receive the response? This is my code .... }).run(function($rootScope, $location, AuthService, StorageService) { var intended = $location.path(); AuthService.check().success(function(data) { if(data.user) { $rootScope.loggedUser = data.user; $location.path(intended); } else $location.path('login'); }); $rootScope.$on('$routeChangeStart', function() { if($rootScope.loggedUser) { .... For example if the user bookmarks the page "myapp.com/#/admin/users", I don't want to redirect to the login, if I have in local storage the authtoken, but this causes the controller to be instantiated, that uses the service, that needs the $rootScope.loggedUser.id that is not yet popu…

http://stackoverflow.com/a/26756730
has body: Thank you all for your help. In the end I added an overlay, quick, simple, does the job.
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26756256
answers question: http://stackoverflow.com/q/26756256

http://stackoverflow.com/q/26743622
has title: Link and hover not working in jumbotron
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I am using bootstrap framework and what i am trying to achive is putting a background image over gradient with the following code: jumbotron{ position: relative; padding: 60px 30px; margin-bottom: 30px; color: #FFF; text-align: center; text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4), 0px 0px 30px rgba(0, 0, 0, 0.075); background: linear-gradient(45deg, #020031 0%, #6D3353 100%) repeat scroll 0% 0% transparent; box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.2) inset, 0px -3px 7px rgba(0, 0, 0, 0.2) inset; } .jumbotron:after{ content: ""; display: block; position: absolute; top: 0px; right: 0px; bottom: 0px; left: 0px; background: url('css/bs-docs-masthead-pattern.png') repeat scroll center center transparent; opacity: 0.4; } The problem i am facing is that when i use the position: absolute property in jumbotron:after all the link and hover (but i get an image over gradient) property ceases to exist. And when I don't use it, i don't get an image (but the link and hover property works). Is there any way to get both the things at the same time w/o messing up the layout?
score: 1
upvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26743924
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/42123706
has text: @dandavis I tried `typeof()` to get the type of `onchange`event.it shows `object` rather than `function`.So what could be the problem?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26765899

http://stackoverflow.com/a/26703940
has comment: http://stackoverflow.com/comment/42001051
has body: balls is [] when the loop starts. So balls[0] is undefined, and thus has no property length.
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26703896
has comment: http://stackoverflow.com/comment/42001747
type: Answer
upvote count: 3

http://stackoverflow.com/comment/41949186
comment on: http://stackoverflow.com/q/26674883
has text: I think this is OK. To make it look better you could add height and width to the so it looks less... well you know ;)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26752112
type: Question
has body: In my Yii PHP code I have an array as $groups = array( GroupA =&gt; array( a, aa, aaa, ), GroupB =&gt; array( b, bb, bbb, ), GroupC =&gt; array( c, cc, ccc, ), ); and drop dow having values as -> GroupA, GroupB, GroupC now when GroupA is selected fill three text box with values a, aa, aaa and same for all dropdown values. How to do this? Please give me a start, I will do rest of this.. Thank you
has title: PHP Get value of sub array in text box depending upon dropdown
answer count: 1
has answer: http://stackoverflow.com/a/26758995
tagged with: yii
tagged with: javascript
has comment: http://stackoverflow.com/comment/42092787
has comment: http://stackoverflow.com/comment/42124564
has comment: http://stackoverflow.com/comment/42124593
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26758995
score: 0
has comment: http://stackoverflow.com/comment/42090966
tagged with: php

http://stackoverflow.com/comment/42150783
score: 0
comment on: http://stackoverflow.com/q/26786969
type: Comment
type: QuestionComment
has text: And I guess you can't just store a plain function expression in your config, right?

http://stackoverflow.com/comment/42159900
has text: http://stackoverflow.com/questions/26773723/tell-directive-to-using-different-template-based-on-scope-variable/26775053
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26792137

http://stackoverflow.com/a/26690687
has body: Add a .htaccess file in the top folder that you want no one accessing with the following order deny,allow deny from all allow from 127.0.0.1 Note: This means that you also won't be able to show them to users using img tags or any other method that requires the user to send a request to the image. However, the server can still use them.
type: Answer
has comment: http://stackoverflow.com/comment/41977950
has comment: http://stackoverflow.com/comment/41977893
upvote count: 1
answers question: http://stackoverflow.com/q/26690645
score: 1
has comment: http://stackoverflow.com/comment/41977906
downvote count: 0

underscore.string.js
tags question: http://stackoverflow.com/q/26722492
type: Tag
tag name: underscore.string.js

http://stackoverflow.com/comment/41984690
comment on: http://stackoverflow.com/q/26694692
score: 0
type: Comment
type: QuestionComment
has text: what do you mean by I've gotten the javascript to work in console using chrome inspector but it's not working on page load. ?

http://stackoverflow.com/q/26711806
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42019527
has body: I have a use case where I want to have a collection of collectionViews (or composite views) rendered. What is the best way to do this using marionette.js? My model structure is as follows- A | |-- Collection&lt;B&gt; | |--Collection&lt;C&gt; I want to render as follows - A1 | |--B1 | | | C1 | | | C2 | | | C3 | |--B2 | C4 | C5 | C6 What is the best way to do this? I don't want it to be like this A1 | |--B1 | | | |--C1 | | | |--C2 | | | |--C3 | |--B2 | |--C4 | |--C5 | |--C6
score: 0
answer count: 1
tagged with: marionette
tagged with: backbone-relational
has answer: http://stackoverflow.com/a/26736720
accepted answer: http://stackoverflow.com/a/26736720
type: AnsweredQuestion
has title: how can I have CollectionView of CollectionView in marionette.js?
has comment: http://stackoverflow.com/comment/42014842

http://stackoverflow.com/q/26733199
type: AnsweredQuestion
tagged with: jquery
favorite count: 0
type: Question
has body: in application i have several gallery contain tens of images per gallery i used bootstrap and did something like below code but image modal is going to be show on right alignment not in center. Close
tagged with: css
tagged with: gallery
has answer: http://stackoverflow.com/a/26734576
score: -1
tagged with: twitter-bootstrap
downvote count: 2
has title: how to make a modal and slideshow for each image gallery?
upvote count: 1
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26734576

http://stackoverflow.com/q/26708331
tagged with: javascript
has title: Replace Class Name in elements but not remove other class in this elements pure javascript
favorite count: 0
has body: I want to replace font class in the whole document. How to do this problem using pure JavaScript without jQuery? Please Suggest! I don't want to remove other class in the changing class elements in javascript.How to do? Here is my project. Html Unicode Zawgyi Unicode Unicode Css .unicode{ border: 2px solid blue; } .zawgyi { border: 2px solid red; } .pull-right { float: right; } .pull-left { float: left; } .clearfix { clear: both; } Javascript function changeFont(num) { var fromFont = 'unicode ieUnicode'; var toFont = 'zawgyi'; if ( num==2 ) { fromFont = 'zawgyi'; toFont = 'unicode ieUnicode'; }; /* Change classes */ var elems = document.getElementsByClassName( fromFont ); var i = elems.length; while(i--) { var item = elems[i]; item.className = toFont; }; return false; };
answer count: 3
has comment: http://stackoverflow.com/comment/42008948
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42008887
downvote count: 1
has answer: http://stackoverflow.com/a/26708499
score: -1
has answer: http://stackoverflow.com/a/26708443
type: Question
has answer: http://stackoverflow.com/a/26708403
has comment: http://stackoverflow.com/comment/42008915
has comment: http://stackoverflow.com/comment/42008938
upvote count: 0

http://stackoverflow.com/a/64063257
upvote count: 2
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26756500
score: 2
has body: For those looking to close a single bootbox modal when you have multiple modals open I have found the following to work without breaking the others: dialog.find(".bootbox-close-button").trigger("click");

http://stackoverflow.com/q/26786488
tagged with: javascript
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/26869678
accepted answer: http://stackoverflow.com/a/26869678
favorite count: 0
tagged with: extjs
has body: This is not the only time someone has asked about this. Basically I want to know how to filter the store for a combobox. I know that the store has a collect method and using it works like this: store.collect('column'). The problem is that with a combobox at the time the combo is initially set the store has yet to have any data put in it. I read where someone else suggested that this be done in the beforequery listener (and in testing I can access the collect of the store at this point) the problem I have is how do I send the filtered store back to the combobox from the beforequery listener? And of course the code example looks like this: (some things will be changed to avoid showing information we don't want to give out) xtype: 'combobox' , multiSelect: true , forceSelection: true , store: IH.reportGroupStore , displayField: 'group' , valueField: 'group' , fieldLabel: "Show group(s)" , labelWidth: 110 , labelAlign: 'right' , labelStyle: 'white-space: nowrap;' , width: 275 , emptyText: 'All' , listeners: { beforequery: function(me, opts) { } , blur: function(me, opts) { filterReportSummary(); } , select: function(me, records, eOpts) { filterReportSummary(); } } So inside of beforequery if I pause in the browser there I can do me.combo.store.collect('group') and see the collection. I know that to use the collection from a store.collect() I will have to remove displayField and valueField. I just don't know how to get it back to the combobox. I'm attempting to find a generic way to do this aside from creating a whole new store. Any help or ideas will be greatly appreciated.
tagged with: combobox
type: AnsweredQuestion
downvote count: 0
type: Question
has title: extjs 4.2 combobox show only unique entries for store
score: 1
has comment: http://stackoverflow.com/comment/42300033

http://stackoverflow.com/comment/42098226
type: AnswerComment
type: Comment
has text: Similar to your `sucess: function` in you ajax call you can write an error function.
comment on: http://stackoverflow.com/a/26755865
score: 0

http://stackoverflow.com/comment/42179422
has text: I am making a data layer push to Google Analytics & Tag Manager where I use their callback function. This is my way of making sure the data gets collected before moving on.
type: AnswerComment
comment on: http://stackoverflow.com/a/26803087
type: Comment
score: 0

http://stackoverflow.com/comment/42012621
comment on: http://stackoverflow.com/q/26710414
score: 0
type: Comment
type: QuestionComment
has text: not in the section, inside article (article menu navigation) like links in wikipedia

http://stackoverflow.com/a/26741342
answers question: http://stackoverflow.com/q/26741060
type: Answer
has comment: http://stackoverflow.com/comment/42076183
has comment: http://stackoverflow.com/comment/42075922
has body: You can define some HTML for the loader element, then fade it out when you fade in the page. However currently you're hiding/fading the body of the page. You would need to wrap all the content you want to postpone displaying in another element as a sibling to your loader. For example: &lt;body&gt; &lt;div id="loader"&gt;&lt;img src="loading-image.png"&gt;&lt;/div&gt; &lt;div id="page-content"&gt; &lt;!-- content here --&gt; &lt;/div&gt; &lt;/body&gt; Then you change your CSS and JS to refer to #page-content instead of body. If you're fading the page in, why doesn't it also fade the banner image? I think you can wrap this in the same mechanic.
score: 0

http://stackoverflow.com/comment/42016374
score: 0
type: Comment
has text: sorry, then it's a mistake. i'm correcting it. sorry please.
comment on: http://stackoverflow.com/a/26712242
type: AnswerComment

http://stackoverflow.com/comment/42073315
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26743790
has text: Create two arrays of numbers. Test whether a number is in either of those arrays.

http://stackoverflow.com/a/26713899
has comment: http://stackoverflow.com/comment/42018530
has comment: http://stackoverflow.com/comment/42044002
upvote count: 2
answers question: http://stackoverflow.com/q/26713744
has comment: http://stackoverflow.com/comment/42018342
has body: Replace your code with This: function demoMatchClick(inputtxt) { var letters = /^[A-Za-z]+$/; var val = inputtxt.value.replace(/\s/g, ''); if (val.match(letters)) { alert("Successful match"); } else { alert("Not a match"); } } &lt;html&gt; &lt;body &gt; &lt;form onSubmit="alert('submit')" name="form"&gt; &lt;input type="text" name="name" value="name" onkeyup="demoMatchClick(this);"/&gt; &lt;input type="submit" value="submit"/&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt;
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/42145799
comment on: http://stackoverflow.com/q/26783991
score: 0
type: Comment
type: QuestionComment
has text: @Rocket Hazmat - In `events` if I use `foo(x).bar()` instead of `new foo(x).bar()` I get `cannot read property 'bar' of undefined`.

http://stackoverflow.com/q/26745263
type: UnansweredQuestion
tagged with: java
tagged with: selenium
tagged with: web-crawler
has answer: http://stackoverflow.com/a/26763396
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26745521
has body: I have started using selenium to collect data from a website that uses Javascript. I have managed to get to a point where I am able to select the cells from the table but I would now like to be able to select the "Individual" strings from each cell, for example: This is a cell from the table: 2014-11-02 21:15:00 AMALT 60007 107115 1 576833 I would like to be able to select the 2014-11-02 21:15:00 rows in the cell individually, how is this possible? I want to be able to do something like this List<WebElement> allRows = table.findElements(By.tagName("idx=0")); but that doesn't work. I am collecting the table and cells as a whole like this: // Now get all the TR elements from the table List<WebElement> allRows = table.findElements(By.tagName("tr")); // And iterate over them, getting the cells for (WebElement row : allRows) { List<WebElement> cells = row.findElements(By.tagName("td")); // Print the contents of each cell for (WebElement cell : cells) { System.out.println(cell.getText()); }break; } Thank you. Update, the table layout has changed to: 2014-11-04 23:00:00 gasdjjhg 11344 14500 saddasd sdsed dsfdsf 1 The table Layout keeps changing?
tagged with: javascript
score: 0
has title: Selecting individual parts of cell using Selenium

http://stackoverflow.com/comment/42095194
score: 0
type: Comment
has text: sorry O.O i didn't see that. now i've updated it .. maybe its solved now
type: AnswerComment
comment on: http://stackoverflow.com/a/26756157

http://stackoverflow.com/comment/48068860
comment on: http://stackoverflow.com/a/26738529
has text: Whats about node_module folder. I am recently start with gulp and bower. All things are good, but little confusion is handling folder structure for my site on local version and also for live version. Confusion is the node_module folder. Hope you understand.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26684001
type: Answer
has comment: http://stackoverflow.com/comment/41966930
answers question: http://stackoverflow.com/q/26683939
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26683939
has body: This should be shorter: $.each([5,4,3,2], function(i,v) { if( hpos(v) &lt; 0 ) { final(v); return false; } else if( v === 2 ) { final(1); } });

http://stackoverflow.com/q/26810719
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42194090
has title: javascript function saying it doesn't exist when it does
score: 0
has comment: http://stackoverflow.com/comment/42194039
has comment: http://stackoverflow.com/comment/42194095
type: Question
has comment: http://stackoverflow.com/comment/42194154
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/26810890
has comment: http://stackoverflow.com/comment/42194079
has comment: http://stackoverflow.com/comment/42194067
answer count: 1
has body: I'm trying to call a JavaScript function and then pass the value of the button clicked to that function but even though the function does exist its saying it doesn't and im not sure why. Basically I need to call the powerOn() function when the power on button is clicked and then return the status messages. All I need to know is why it won't call the function so I can make sure I get the basic response. Also I'm not entirely sure why sortable returns a console error when im following the documentation on http://github.hubspot.com/sortable/api/options/: ReferenceError: Sortable is not defined vmstatus:123 Use of getPreventDefault() is deprecated. Use defaultPrevented instead. jquery-1.10.2.js:5375 TypeError: powerOn is not a function Code:
has comment: http://stackoverflow.com/comment/42193981
accepted answer: http://stackoverflow.com/a/26810890

http://stackoverflow.com/q/26817369
has answer: http://stackoverflow.com/a/26817501
tagged with: javascript
tagged with: rest
score: 0
tagged with: api
has answer: http://stackoverflow.com/a/26817661
has title: AngularJS Controller to update $scope automatically when backend data changes
tagged with: angularjs
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/26817661
type: Question
has body: I have a Service which uses $http to 'get' some JSON data from a REST API. The Controller uses the Service to get this data and initialise it in the $scope. How can I make it so that every time the JSON API changes that change is updated in the $scope, and thus the view? Controller: app.controller('MainController', function ($scope, BuildService) { init(); function init() { BuildService.getBuilds().then(function() { $scope.builds = BuildService.data(); }); } }); Service: app.service('BuildService', function ($http, $q) { var BuildService = {}; var deffered = $q.defer(); var data = []; BuildService.getBuilds = function () { //return builds; $http.get('/api'). success(function(d, status, headers, config) { // this callback will be called asynchronously // when the response is available data = d; deffered.resolve(); }). error(function(d, status, headers, config) { // called asynchronously if an error occurs // or server returns response with an error status. deffered.reject(); }); return deffered.promise; }; BuildService.data = function() { return data; }; return BuildService; });
answer count: 2
possible better answer: http://stackoverflow.com/a/26817501

soa
type: Tag
tags question: http://stackoverflow.com/q/26680779
tag name: soa

http://stackoverflow.com/comment/42093159
type: AnswerComment
has text: @MorganTouvereyQuilling Log buffer has an overhead in fragment shader which adds, well - a logarithm function. As far as all the other things are concerned which need to happen for fragment's color and position to be computed - this is a tiny drop i the see. In other words: performance overhead is very small. Also, this overhead is static - no matter how many objects you have in the scene depth test is essentially done once per rendered pixel. Source https://github.com/mrdoob/three.js/blob/1769fbfc6c994b51a54c15a5c096855fd3cb8a1a/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26748408

http://stackoverflow.com/comment/42085512
score: 0
comment on: http://stackoverflow.com/q/26750845
has text: you can atlest put some valid images there..
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26771230
has comment: http://stackoverflow.com/comment/42122725
has title: remove all media query css rules from a div
downvote count: 1
has answer: http://stackoverflow.com/a/26771443
type: Question
score: 3
has comment: http://stackoverflow.com/comment/42122933
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26771443
has answer: http://stackoverflow.com/a/26771755
upvote count: 4
has answer: http://stackoverflow.com/a/26771852
has answer: http://stackoverflow.com/a/26771341
tagged with: jquery
favorite count: 0
has body: I want to remove those css style rules which are applied in media queries from a particular div (including its children too). For eg. .foo{ color: red;/*don't remove*/ } @media (max-width: 768px){ .foo{ background-color: blue;/*remove*/ font-size: .8em;/*remove*/ } div{ color: #000;/*don't remove*/ } } In the example .foo element css of media query should be removed but not css rules outside the media queries.
answer count: 4
accepted answer: http://stackoverflow.com/a/26771852
type: AnsweredQuestion

http://stackoverflow.com/comment/42066727
score: 2
comment on: http://stackoverflow.com/q/26740350
has text: Why do you have `contentType: "application/json; charset=utf-8",`? It's a GET request. You don't have a request body to describe the content type of! Why do you have `processData: false,`? You don't have a `data` argument to prevent being processed!
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26781817
possible better answer: http://stackoverflow.com/a/26781963
has body: I have 3 div's. The first is 100% width and 100px high. The second is 100% wide but I want to make it the height of the browser. The 3rd is 100% wide and 100px high but this 3rd div is fixed at the bottom of the screen. Here is my attempt that doesn't make the middle div fill the space between the top and bottom div's .top, .bottom{ background-color: grey; width: 100%; height: 100px; } .bottom{ position: fixed; bottom: 0; left: 0; } .middle{ background-color: white; width: 100%; height: 100%; border: 1px solid red; } Here is a JsFiddle of what I have attempted JsFiddle How do I get the middle div to expand to fill the space between the upper and lower div's?
has answer: http://stackoverflow.com/a/26781969
has answer: http://stackoverflow.com/a/26781972
has answer: http://stackoverflow.com/a/26782014
has title: How do I make a div full height of browser when it is positioned above a fixed div?
downvote count: 0
tagged with: jquery
favorite count: 0
answer count: 5
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26781963
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42141220
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26782014
has answer: http://stackoverflow.com/a/26827940
tagged with: javascript

http://stackoverflow.com/comment/41964553
has text: Is it permitted to put JavaScript in JQuery? I feel like that is all legitimate code and I do not receive any errors from the console in Chrome.
score: 0
comment on: http://stackoverflow.com/q/26682930
type: Comment
type: QuestionComment

permissions
tag name: permissions
type: Tag
tags question: http://stackoverflow.com/q/26824928
tags question: http://stackoverflow.com/q/26714216
tags question: http://stackoverflow.com/q/26720142

http://stackoverflow.com/comment/41948410
comment on: http://stackoverflow.com/q/26674503
has text: that is the default nature of javascript.... with one exception if `x` has an asynchronous method call then execution of `y` will not wait for the asynchronous method to finish
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/40415337
downvote count: 0
score: 9
answers question: http://stackoverflow.com/q/26829207
upvote count: 9
type: Answer
has body: We can use that. var myBoolean = { value: false } //get myBoolean.value; //set myBoolean.value = true;

http://stackoverflow.com/a/30446317
answers question: http://stackoverflow.com/q/26801630
has body: I do not have a specific answer for your issue but I would look for synchronous code (like fs.*Sync) I suggest node-inspector (https://github.com/node-inspector/node-inspector) which allow to get a clue of what is happening either with step by step in the code and some reporting about resources usage
score: 0
type: Answer

http://stackoverflow.com/comment/42248282
has text: have pasted my code can you help me out http://pastebin.com/QyjGh8jC
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26775888
type: Comment

http://stackoverflow.com/comment/42209128
comment on: http://stackoverflow.com/q/26819500
score: 0
type: QuestionComment
type: Comment
has text: Is this a typo? <li.sub-cat">Sub Item 1 - I assume you mean ...

http://stackoverflow.com/comment/42050535
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26730663
has text: @Naveen nope my index.jsp is not in the folder and i am not reffering to footer.jsp. Problem is i am not being able to link css files and javascript files.

http://stackoverflow.com/a/26790055
has body: You could create a module that exports from mongo to a temporal file and then use require to import that file. That way you wont be evaling and, like Bergi mentioned, it would prevent the scope problems that eval has. Also, once you export it, and before requiring it, you could use something like Esprima to create an AST of the code and analyse it to see if it complies with some criteria you may have. (Like, perhaps, you could forbid the use of this in the code imported as a safety measure - thats part of the rules ADSafe has)
upvote count: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26786969
type: Answer
accepted answer of: http://stackoverflow.com/q/26786969
score: 1

http://stackoverflow.com/a/26784277
accepted answer of: http://stackoverflow.com/q/26783921
has comment: http://stackoverflow.com/comment/42145528
answers question: http://stackoverflow.com/q/26783921
has body: You're having that problem because the menu is being position relative to the body so as the window width changes the position of the menu moves. To solve this problem you want to place your link and menu in an element with position: relative on it. This will then mean that you can absolute position your menu relative to the container its in. So something like ABOUT PRODUCTS HOME Cakes Cupcakes Fudges Ice Creams Hard Candies Obviously it's better not to use inline styles and instead apply a class to the container
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/comment/42178572
has text: I found that it was caused by reinitialization of the controller in template. So it created the new scope.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26802262
type: Comment

mongodb-query
tags question: http://stackoverflow.com/q/26755391
tags question: http://stackoverflow.com/q/26749767
tags question: http://stackoverflow.com/q/26689311
tag name: mongodb-query
tags question: http://stackoverflow.com/q/26706510
tags question: http://stackoverflow.com/q/26766650
type: Tag
tags question: http://stackoverflow.com/q/26708036

http://stackoverflow.com/q/26761019
accepted answer: http://stackoverflow.com/a/31885513
tagged with: javascript
favorite count: 0
score: 2
has comment: http://stackoverflow.com/comment/42105677
upvote count: 2
has comment: http://stackoverflow.com/comment/42105870
has body: I have a Plupload uploader running, which is making both a thumbnail and a large size image when uploading each image. The thumbnail I need to make fit into a 150x150px box. I have some javascript that scales the image down, so that the smallest width or height of the image gets to be 150px, and the bigger one is hidden with overflow:hidden. The problem is when I use the Plupload script for resizing, it only takes "maximum" sizes for width and height, meaning that if I have a image that have a 1:2 ratio, it would be resized to 75x150px. Is there any way of making this work as minimum sizes? This is how my thumbnail resize looks at the moment: var uploader = $('#uploader').pluploadQueue(); uploader.bind('BeforeUpload', function(up, file) { if('thumb' in file){ up.settings.url = 'upload.php?dir=' + ($("#chosen_gallery :selected").val()) + '&amp;subdir=thumbs', up.settings.resize = {width : 150, height : 150, quality : 60}; } }
tagged with: php
has answer: http://stackoverflow.com/a/31885513
type: Question
has title: Plupload - Resize image on upload, with a minimum height, and minimum width instead of maximum
type: AnsweredQuestion
tagged with: plupload
tagged with: image
has comment: http://stackoverflow.com/comment/42106132
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/42180360
has text: If you are just serving up a web page, the mailto: link is the best you can do. You will not get permission to launch an app for the user automatically.
type: QuestionComment
comment on: http://stackoverflow.com/q/26794919
score: 0
type: Comment

http://stackoverflow.com/a/33337587
has body: //FOR user FOON PrimeNumber=function(){ var d, l, primelist; _isPrimeNumber = function(n){ var result = true; _setVariables(n); while( d &lt; l ){ if(n % d == 0){ result = false; break; } do{ d = d + 1; }while(!_check(d)); primelist.push(d); l = n/d; } return result; }; _getAllPrimeTill = function(n){ _setVariables(n); while( d &lt; n ){ d = d + 1; if(_check(d)){ primelist.push(d); } } return primelist; }; _setVariables = function(n){ d=2; l=n/2; primelist = new Array(); primelist.push(d); }; _check = function(n){ var result = true; for(var i = 0; i &lt; primelist.length; i++){ if(n % primelist[i] == 0 ){ result = false; break; } } return result; }; return { isPrimeNumber :_isPrimeNumber, getAllPrimeTill : _getAllPrimeTill }; }();
type: Answer
answers question: http://stackoverflow.com/q/26722293
score: 0

http://stackoverflow.com/q/26802379
has comment: http://stackoverflow.com/comment/42178277
has title: socket.emit run function
has comment: http://stackoverflow.com/comment/42179064
type: Question
score: 0
tagged with: node.js
has comment: http://stackoverflow.com/comment/42178359
has comment: http://stackoverflow.com/comment/42178481
has comment: http://stackoverflow.com/comment/42178515
has comment: http://stackoverflow.com/comment/42178058
has body: I'm working with node.js and trying to run a function on an button click. var field = document.getElementById("field"); sendButton.onclick = function() { var text = field.value; //This works socket.emit('send', { message: text, username: name.value }); //This works socket.emit('send', { message: "I am a dog", Username: name.value }); //This does NOT work givePoints(false); }; //my function var givePoints = function(answer) { if (answer == false) { $('#dogStats').html(function (i, val) { return val * 1 + 1; }); } }; So my question is, how can I run the givePoints-function och the button-click? I'm a newbie on node.js so any help would be appreciated
answer count: 0
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/a/26689721
type: Answer
has body: To answer your question directly, no, I don't think there is a way to have the Ember logger report the correct line numbers. Logging to the console is just a commonly implemented API, it's not a Javascript standard. Because of this, the browser automatically determines where a log statement came from and makes it pretty much impossible to wrap a layer of indirection around it. There might be some clever ticks out there, but none that I know of. But more importantly, I don't think Ember's logger is really meant for third party consumption. It's mostly used internally by Ember, so the main reason you would override it is to redirect Ember's logging to a different location. In my opinion, it seems like a fairly poor way to handle your own application logging.
accepted answer of: http://stackoverflow.com/q/26685719
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26685719
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/42149209
comment on: http://stackoverflow.com/a/26785367
type: AnswerComment
has text: are your pipes are the same for all files?
score: 0
type: Comment

http://stackoverflow.com/comment/41995154
score: 0
type: AnswerComment
has text: Using objects in javascript is very useful, using string indexes on arrays in javascript violates the principle of least surprise. Thing is that if I use your code i will expect `array[0]` to be the first member and `array[array.length - 1]` the last.
comment on: http://stackoverflow.com/a/26700459
type: Comment

http://stackoverflow.com/q/26743011
accepted answer: http://stackoverflow.com/a/26743414
type: Question
tagged with: jquery-mobile
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26743254
has body: In jQueryMobile, on the page load, I would like to scroll to a given position. I know how to do it in classic jQuery, but in jQueryMobile there is an auto scroll top on the page load. I tried to do : $( document ).ready(function() { $.mobile.silentScroll(1000); }); That doesn't work. My page stay blocked to the top of the page. While if i click on a link with onclick="$.mobile.silentScroll(1000);" that works perfectly ! I just would like to scroll to a yPosition on the page load :) ! =======EDIT============ After suggestions of White Raven and Omar I've tried to do this : $( document ).delegate("#pagePkmn", "pageinit", function() { $.mobile.silentScroll(1000); }); OR this : $(document).one("pagecontainershow", function () { $.mobile.silentScroll(1000); }); But still no effect ... Thanks for your attention.
favorite count: 0
has answer: http://stackoverflow.com/a/26743254
has comment: http://stackoverflow.com/comment/42073302
has answer: http://stackoverflow.com/a/26743414
type: AnsweredQuestion
score: 1
has title: jQueryMobile - Scroll to a position onLoad
tagged with: scroll
upvote count: 1

http://stackoverflow.com/q/26791539
answer count: 2
has comment: http://stackoverflow.com/comment/42158872
tagged with: arrays
tagged with: javascript
has title: Javascript program - deleting an element from an array
has answer: http://stackoverflow.com/a/26791867
possible better answer: http://stackoverflow.com/a/26791867
has comment: http://stackoverflow.com/comment/42159051
has answer: http://stackoverflow.com/a/26792531
score: 0
has body: The program I wrote is about how a sports equipment company monitor the trampoline use; it records the customer NAME, and their STATUS (child or adult) that are currently on the trampoline. There are five functions, so we can add customer, display customer and delete the last customer. I am stuck on the last function where I have to use object constructor to identify and then delete the customer. PS: I can't use any predefined JavaScript array element-deleting or manipulating methods such as delete(), concat(), join(), pop(), push() const MAX_CUSTOMERS = 5; //maximum customer on the trampoline is 5 var customerList = new Array();//create new Array function addCustomer () { if (customerList.length &gt;= MAX_CUSTOMERS) alert('Sorry, no more than ' + String(MAX_CUSTOMERS) + ' customers are allowed on the trampoline.') else { var newIndex = customerList.length; customerList[newIndex] = new Object; customerList[newIndex].name = prompt('What is the customer\'s name?'); //ask user enter their name customerList[newIndex].status = prompt('Are you a Child or an Adult?'); //ask user enter their status while (!(customerList[newIndex].status == 'child' || customerList[newIndex].status == 'adult')) { customerList[newIndex].status = (prompt('Error Please Enter \'child\' or \'adult\':')); } } } function displayAllCustomers () { var message = ''; for (var i = 0 ; i &lt; customerList.length ; i++) { message += customerList[i].name + ', Status: ' + String(customerList[i].status) + '. \n'; } if (message == '') message = 'There are no customer to display!'; alert(message); } function deleteLastCustomer () { if (customerList.length &gt; 0) { customerList.length--; alert('The last customer has been deleted.'); } else alert('There are no customer to delete!'); } function identifyThenDeleteCustomer () { var customerName = prompt('Enter the name of the customer to delete:'); var customerStatus = prompt('Enter \'child\' or \'adult\':'); while (!(customerStatus == 'child' || customerStatus == …
has comment: http://stackoverflow.com/comment/42158877
type: Question
accepted answer: http://stackoverflow.com/a/26792531
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42159073

http://stackoverflow.com/comment/42169917
type: QuestionComment
type: Comment
has text: @oscarvady: No i have updated the Question. Kindly find it.
comment on: http://stackoverflow.com/q/26797872
score: 0

http://stackoverflow.com/comment/42087696
type: Comment
has text: yep, that did the trick. can you explain what readyState equal to 4 means? thanks!
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26752143

http://stackoverflow.com/comment/42071410
type: QuestionComment
comment on: http://stackoverflow.com/q/26742719
has text: Wait, wait, not file. You either need to download it or take the `file://` off. Get it from the answer below. %)P
score: 0
type: Comment

http://stackoverflow.com/comment/41971011
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26684124
type: Comment
has text: @sebnukem - I feel like it is our responsibility to the community to not just answer a bad question with bad advice, but rather to straighten out the OP and point them in the right direction. As it is, it appears that the OP has taken your advice and is now trying to make really a really buggy approach work. Even worse, someone else might find this answer and try to use it too.

http://stackoverflow.com/a/26705926
accepted answer of: http://stackoverflow.com/q/26705759
answers question: http://stackoverflow.com/q/26705759
has comment: http://stackoverflow.com/comment/42043836
score: 0
type: AcceptedAnswer
has body: Your var lp value is not posted/saved when the form is submitted, so this $liczba = " "; echo 'ilosc: '.$liczba; will not do what you expected. Try changing your php to something like // use pre_grep() to find match all the input=odp*, and use count() to get total, and add 1 since you are starting from opd2 $liczba = count(preg_grep('/^odp[\d]*/', array_keys($_POST)))+1; for ($i=2; $i <= $liczba; $i++) { //always sanitize your user data $odpowiedz2 = mysqli_real_escape_string($sqlc,$_POST["odp".$i]); $sql_wprowadz_odpowiedz="INSERT INTO odpowiedzi (Tresc_odpowiedzi, Poprawnosc, ID_pytania) VALUES ('$odpowiedz2', NULL, '$row[ID_pytania]')"; //dodawanie kolejnych odpowiedzi do bazy mysqli_query($sqlc,$sql_wprowadz_odpowiedz); }
has comment: http://stackoverflow.com/comment/42028455
type: Answer

http://stackoverflow.com/comment/42116714
type: QuestionComment
has text: you need to open it by calling javascript
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26767892

tic-tac-toe
tags question: http://stackoverflow.com/q/26722969
tag name: tic-tac-toe
type: Tag
tags question: http://stackoverflow.com/q/26706912
tags question: http://stackoverflow.com/q/26698576

http://stackoverflow.com/comment/42164437
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26794571
has text: Possible Duplicate: [How to use a filter in a controller?](http://stackoverflow.com/questions/14302267/how-to-use-a-filter-in-a-controller)
score: 0

http://stackoverflow.com/q/26754321
downvote count: 0
answer count: 1
tagged with: code-behind
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has body: Good day, I have a repeater that contain link button. The value and number of link button is generate base on data pull from database. The HTML code is something as follow: <asp:Repeater ID="repCategories" runat="server" EnableViewState="false"> <a href="<asp:Literal ID="litLink2" runat="server"> </asp:Repeater> Here is some code that I try to do in my code behind, for (int i = 0; i < table.Rows.Count; i++) { RepeaterItem itm = repCategories.Items[i]; GiftRow dr = tbl.GetRow(i); Literal litLink2 = (Literal)itm.FindControl("litLink2"); litLink2.Text = dr.Name; string myScript = string.Empty; myScript = "\n "; Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", myScript, false); } By doing this, I will get alert hi when I load the page.What I want to do is, I only want it do alert hi when I click on the link button, instead of page load.
favorite count: 0
type: UnansweredQuestion
upvote count: 1
score: 1
has answer: http://stackoverflow.com/a/26754568
type: Question
tagged with: c#
has title: Inject JavaScript to a link button from code behind in c#

http://stackoverflow.com/comment/42206809
comment on: http://stackoverflow.com/q/26817496
type: Comment
has text: i am using javascript templeting to generate the list..and after that i am registering the event which should work bcoz the DOM is already loaded and all the li tags exist but still facing problems
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42051682
has text: Thx this would my normal way to go but I'm not able to change anything in the code.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26725009

http://stackoverflow.com/comment/42170061
has text: http://api.jqueryui.com/datepicker/ Please check this page for all tutorial and help on jQuery DatePicker...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26798014

http://stackoverflow.com/q/26683071
score: 0
answer count: 1
has body: I'm trying to create a RSS Reader app for android in Cordova using this great sample. I followed all the instructions and emulate my app on emulator. But it just gives me this: Simple RSS Reader {{ entry.title }} Here's the code for index.html Simple RSS Reader {{ entry.title }} And this is my app.js contents angular.module('starter', ['ionic', 'starter.controllers', 'starter.services']); rssApp.controller("FeedController", function($http, $scope) { $scope.init = function() { $http.get("http://ajax.googleapis.com/ajax/services/feed/load", { params: { "v": "1.0", "q": "http://blog.nraboy.com/feed/" } }) .success(function(data) { $scope.rssTitle = data.responseData.feed.title; $scope.rssUrl = data.responseData.feed.feedUrl; $scope.rssSiteUrl = data.responseData.feed.link; $scope.entries = data.responseData.feed.entries; window.localStorage["entries"] = JSON.stringify(data.responseData.feed.entries); }) .error(function(data) { console.log("ERROR: " + data); if(window.localStorage["entries"] !== undefined) { $scope.entries = JSON.parse(window.localStorage["entries"]); } }); }; $scope.browse = function(v) { window.open(v, "_system", "location=yes"); } }); Does any knows how to fix this?
has answer: http://stackoverflow.com/a/26690376
accepted answer: http://stackoverflow.com/a/26690376
has title: Cordova RSS Reader app is not working
tagged with: angularjs
tagged with: android
has comment: http://stackoverflow.com/comment/41974837
type: AnsweredQuestion
tagged with: cordova
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41976631
type: Comment
has text: This could be because you are not giving the elements inside the array unique `key`s. See http://facebook.github.io/react/docs/multiple-components.html , dynamic children.
type: QuestionComment
comment on: http://stackoverflow.com/q/26689900
score: 0

http://stackoverflow.com/comment/42114462
score: 0
comment on: http://stackoverflow.com/q/26766750
type: QuestionComment
type: Comment
has text: Or also possibly http://stackoverflow.com/questions/5677799/how-to-append-data-to-div-using-javascript, or a million other questions.

http://stackoverflow.com/q/26718035
downvote count: 1
type: Question
has title: I have a php file and in the code inside i have one error i can't figure out how to fix it ? And where to add the rest of the codes
has body: The code is: change picture <?php $allowed_types = ['png','jpg','jpeg','gif']; $imageDir = 'files/radar-simulation-files'; /* Assumes this .php is being run from the http root on the same domain as the desired image files. */ $handle = opendir($imageDir); while (($imgPath = readdir($handle)) !== false) if ( in_array( strtolower(pathinfo($imgPath, PATHINFO_EXTENSION)), $allowed_types ) echo ' '; closedir($handle); ?> The error is on the line: ) echo ' Unexcpected echo after ) Then, where should I add the rest of the code? I have a javascript function and a css code. Should I add them in the same php file? If so, where? After the html code? Inside the html code? This is the java script code: (function(d) { // user defines var swapHours = 0, swapMinutes = 0, swapSeconds = 5, swapTotal = (swapHours * 60 + swapMinutes) * 60 + swapSeconds, loopSlideShow = true; // some handy helper functions function classExists(e, className) { return RegExp('(\\s|^)' + className + '(\\s|$)').test(e.className); } function classAdd(e, className) { if (classExists(e, className) return false; e.className += (e.className ? ' ' : '') + className; return true; } function classRemove(e, className) { if (!classExists(e, className)) return false; e.className = e.className.replace( new RegExp('(\\s|^)' + n + '(\\s|$)'), ' ' ) . replace(/^\s+|\s+$/g,''); return true; } function textReplace(e, newtext) { if (d.innerText) e.innerText = newText; else e.textContent = newText; } function nodeFirst(e) { e = e.firstChild; while (e && e.nodeType != 1) e = e.nextSibling; return e; } function nodeLast(e) { e = e.lastChild; while (e && e.nodeType != 1) e = e.prevSibling; return e; } function nodeNext(e) { while (e) if ((e = e.nextSibling).nodeType == 1) return e; return null; } function nodePrev(e) { while (e) if ((e = e.prevSibling).nodeType == 1) return e; return null; } // slideShow setup var slideShow = d.getElementById('slideShow'), slideCounter = d.getElementById('slideCounter'), firstSlide = nodeFirst(s…
tagged with: javascript
has answer: http://stackoverflow.com/a/26718147
score: -1
has answer: http://stackoverflow.com/a/26718104
upvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26718238
answer count: 5
has answer: http://stackoverflow.com/a/26718225
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26718104
possible better answer: http://stackoverflow.com/a/26718212
has answer: http://stackoverflow.com/a/26718212

http://stackoverflow.com/comment/42101915
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26760295
score: 1
has text: Show us your html please in your question, not on a picture.

http://stackoverflow.com/comment/42162275
has text: You just replace the newlines with one single newline, like this `string.replace(/\n\s*\n/g, '\n');`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26793606

http://stackoverflow.com/a/26801185
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 5
answers question: http://stackoverflow.com/q/26799660
upvote count: 5
accepted answer of: http://stackoverflow.com/q/26799660
has body: Define the objects in your controller scope. $scope.search={"car":"","driver":""} $scope.dates={"startDate":"","endDate":""} And change your method as like below $scope.createCsvFilename = function() { var startMoment = moment($scope.dates.startDate); var endMoment = moment($scope.dates.endDate); var filterCar = $scope.search.car; var filterDriver = $scope.search.driver; return startMoment.format('DD-MM-YYYY') + ' - ' + endMoment.format('DD-MM-YYYY') + ' - Car_' + filterCar + ' - Driver_' + filterDriver + '.csv'; } Also, remove params in calling a method &lt;button class="btn btn-success" type="button" ng-csv="filteredRecords" filename="{{ createCsvFilename() }}"&gt; Download {{filteredRecords.length}} results as CSV &lt;/button&gt;

kml
tags question: http://stackoverflow.com/q/26755696
tag name: kml
type: Tag

http://stackoverflow.com/a/26676530
answers question: http://stackoverflow.com/q/26675946
has body: @tony..Capture the querystring and display message using the below code. string urlid = Request.QueryString["urlid"]; if (urlid == "pass"){ //Alert message } else if (urlid == "fail"){ //Alert message } For Alert message use one of the following code whichever works for you. 1. Page.ClientScript.RegisterStartupScript(Page.GetType(), "my", "alert('Pass');", true); 2. ClientScript.RegisterStartupScript(typeof(Page),"PopUp", " ");
type: Answer
score: 0

http://stackoverflow.com/comment/104130122
type: AnswerComment
comment on: http://stackoverflow.com/a/26766150
type: Comment
score: 1
has text: This is not working for me either, I tried `.populate('model', 'field')`, `.populate('model', { field: 1})`, `.populate('model', [field])` with and without `lean()` and with and without `selectPopulatedPaths: false` on the model but I always got the full populated object in the response. The documentation says your answer is supposed to be the right one but I can't make it work. Is somebody having the same issue ?

http://stackoverflow.com/q/26818795
has answer: http://stackoverflow.com/a/27852109
upvote count: 4
has body: I'm trying to integrate Gulp with Tape (https://github.com/substack/tape), the NodeJs test harness. How can I do this? There doesn't seem to be an existing gulp plugin. I've see this, but it looks really inelegant: var shell = require('gulp-shell') gulp.task('exec-tests', shell.task([ 'tape test/* | faucet', ])); gulp.task('autotest', ['exec-tests'], function() { gulp.watch(['app/**/*.js', 'test/**/*.js'], ['exec-tests']); }); I've tried this, which looks like it should work: var tape = require('tape'); var spec = require('tap-spec'); gulp.task('test', function() { return gulp.src(paths.serverTests, { read: false }) .pipe(tape.createStream()) .pipe(spec()) .pipe(process.stdout); }); but I get a TypeError: Invalid non-string/buffer chunk error
tagged with: node.js
has answer: http://stackoverflow.com/a/34512427
downvote count: 0
has answer: http://stackoverflow.com/a/35919973
type: Question
type: AnsweredQuestion
tagged with: testing
possible better answer: http://stackoverflow.com/a/27852109
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/33014965
score: 4
accepted answer: http://stackoverflow.com/a/32327466
tagged with: node.js-tape
has answer: http://stackoverflow.com/a/34960950
tagged with: gulp
has title: How do I use gulp with tape?
favorite count: 0
has answer: http://stackoverflow.com/a/32327466

http://stackoverflow.com/comment/42414037
has text: print screens: http://tinypic.com/view.php?pic=314rswz&s=8#.VGYwx8mJfcw http://tinypic.com/view.php?pic=ncxf8g&s=8#.VGYwsMmJfcw
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26934069
type: Comment

http://stackoverflow.com/q/26772996
tagged with: bxslider
has answer: http://stackoverflow.com/a/26773088
has body: How to change slideWidth in bxSlider after creating? Standart bxSlider can't make right width of slides when viewport resizing.
tagged with: javascript
type: UnansweredQuestion
has title: How to change slideWidth in bxSlider after creating?
type: Question
answer count: 1
score: 0

http://stackoverflow.com/comment/42157349
has text: You know how to format code in a question. You also know how to express a coding problem in a very objective manner. That makes you a better programmer than dozens of people who wander around here everyday. You are not a noob. Keep coding and good luck.
comment on: http://stackoverflow.com/q/26790656
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26801931
has comment: http://stackoverflow.com/comment/42190697
has body: Just provide a default for gender. &lt;input type="radio" name="gender" id="gender" value="male" checked/&gt; This will avoid any possible confusion and requires less validation overall.
has comment: http://stackoverflow.com/comment/42177196
has comment: http://stackoverflow.com/comment/42186560
has comment: http://stackoverflow.com/comment/42178945
score: 0
answers question: http://stackoverflow.com/q/26801646
type: Answer

http://stackoverflow.com/a/26756841
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26756752
has comment: http://stackoverflow.com/comment/125195657
answers question: http://stackoverflow.com/q/26756752
has comment: http://stackoverflow.com/comment/42095782
score: -2
downvote count: 3
has body: Refer this, function createXMLHttpRequestObject() { // xmlHttp will store the reference to the XMLHttpRequest object var xmlHttp; // try to instantiate the native XMLHttpRequest object try { // create an XMLHttpRequest object xmlHttp = new XMLHttpRequest(); } catch(e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHttp"); } catch(e) { } } // return the created object or display an error message if (!xmlHttp) alert("Error creating the XMLHttpRequest object."); else return xmlHttp; }
upvote count: 1

cookies
tags question: http://stackoverflow.com/q/26810791
type: Tag
tags question: http://stackoverflow.com/q/26791758
tags question: http://stackoverflow.com/q/26684440
tags question: http://stackoverflow.com/q/26701331
tags question: http://stackoverflow.com/q/26744345
tags question: http://stackoverflow.com/q/26695848
tag name: cookies
tags question: http://stackoverflow.com/q/26682391
tags question: http://stackoverflow.com/q/26820747
tags question: http://stackoverflow.com/q/26764970
tags question: http://stackoverflow.com/q/26789382
tags question: http://stackoverflow.com/q/26695727
tags question: http://stackoverflow.com/q/26690436

http://stackoverflow.com/comment/68548996
type: AnswerComment
has text: I think you made a minor error: Instead of `xmlhttp.setRequestHeader('Content-Type', 'application.json')` it should be `xmlhttp.setRequestHeader('Content-Type','application/json')`
comment on: http://stackoverflow.com/a/36637707
score: 0
type: Comment

http://stackoverflow.com/q/26728072
has title: $scope.$on not triggering after $rootScope.$broadcast in angular service
has answer: http://stackoverflow.com/a/26729553
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/26731742
has answer: http://stackoverflow.com/a/26731742
score: 13
upvote count: 13
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42045701
accepted answer: http://stackoverflow.com/a/26729553
type: Question
has comment: http://stackoverflow.com/comment/42046419
answer count: 2
downvote count: 0
tagged with: javascript
has body: This may be the repeated question but the workaround I found for this issue is not working in my case thats why I am posting the question. I've following service: appRoot.service('MyService', function($rootScope) { var Messenger = { Temp: "", TempId:"", tempMethod: function(Id) { TempId = Id; $rootScope.$broadcast('FirstCtrlMethod'); } }; return Messenger ; }); In second controller: appRoot.controller('SecondCtrl', function ($scope, $location, MyResource, NotificationService, MyService) { $scope.invokeFirstCtrl= function() { var Id = '2'; MyService.tempMethod(Id); }); In first controller: appRoot.controller('FirstCtrl', function ($scope, $compile, $filter, $modal, $sce, $location, NotificationService, MyService) { $scope.$on('FirstCtrlMethod', function () { alert('I am from frist controller'); }); }); Problem: The line "$rootScope.$broadcast('FirstCtrlMethod');" is executing as expected but it is not causing to fire event "$scope.$on('FirstCtrlMethod', function () {.." in the first controller. I've used the differenct services in many places in my app in the same way and they are workig fine, I am not understanding why it is not working here.
has comment: http://stackoverflow.com/comment/42045527
favorite count: 0
has comment: http://stackoverflow.com/comment/42045536

http://stackoverflow.com/comment/42188472
has text: @enguerranws That's because it's specific to the Stream API (the IncomingRequest obtained from a ClientRequest is a stream). See here: http://nodejs.org/api/stream.html#stream_event_data
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26807694
type: Comment

http://stackoverflow.com/comment/42229496
score: 2
has text: JSON.parse() doesn't work like that. It [returns a value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse). ie: `var newvalue = JSON.parse(stringvalue);`
type: AnswerComment
comment on: http://stackoverflow.com/a/26831391
type: Comment

http://stackoverflow.com/comment/121612282
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26831180
type: QuestionComment
has text: write a pattern that has or condition. I dont know how but it should be standard regex

http://stackoverflow.com/comment/42112537
type: Comment
has text: Hm this does work nicely however if I wrap those divs in a container div it breaks. Something I don't get about how id selectors behave ? hrmmm
comment on: http://stackoverflow.com/a/26707214
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42163738
type: Comment
has text: Yes got it. Thanks. it was actually alert= that was giving the probblem. Thanks.
type: AnswerComment
comment on: http://stackoverflow.com/a/26794448
score: 0

http://stackoverflow.com/comment/41998011
has text: Well, i switched 2 last lines of newVerse function and here is the result http://jsfiddle.net/51tkx8cu/
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26702243
type: Comment

http://stackoverflow.com/q/26687243
type: Question
tagged with: browserify
tagged with: gulp
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26687632
has title: Using Gulp and Browserify to bundle multiple files
has body: I am relatively new to front-end development, and have a question about using Gulp and Browserify together. Here is a description of my setup: I have a project folder that contains everything related to my project (css, html, js, etc.) In my javascript directory, I have a sub-directory named "modules" which contains, say, three sub-directories of its own: A, B, and C. Each of these three sub-directories contains any number of js files. Take sub-directory A, for example; it may contain js files 1.js, 2.js, and 3.js. Each of these may import (using the 'require' statement that Browserify recognizes) node dependencies. I want Browserify/Gulp to give me a bundled js file for each of the sub-directories A, B, and C which contain the respective javascript files bundled along with their dependencies. Take again the example js files above in the directory A: the build process should produce an output A.js that contains 1.js, 2.js, and 3.js, as well as the modules imported via 'require'. Similar outputs should exist for B and C. Thanks in advance for any pointers whatsoever!
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26687632

bind
tags question: http://stackoverflow.com/q/26753339
tags question: http://stackoverflow.com/q/26777518
type: Tag
tags question: http://stackoverflow.com/q/26781664
tag name: bind

http://stackoverflow.com/a/26806607
type: Answer
accepted answer of: http://stackoverflow.com/q/26805884
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26805884
has body: In order to do this, you will need to keep track of all your rectangles, instead of just drawing random rectangles and then forgetting about them. Once the rectangles are drawn on the canvas, the canvas contains now knowledge of them anymore, only the pixels that resulted. var rectangleList = []; /* Creates 50 rectangles in random positions and colors */ for (i = 0; i &lt; 50; i++) { x = Math.floor((Math.random() * 550) + 1); y = Math.floor((Math.random() * 450) + 1); var color = getRandomColor(); // Save the rectangle in a list for later. rectangleList.push({ x: x, y: y, color: color, }); context.fillStyle = color; context.strokeRect(x, y, 50, 50); context.fillRect(x, y, 50, 50); } Once you have a list of all the rectangles, any time you change one, you will need to re-render the canvas to update it. context.clearRect(0, 0, canvas.width, canvas.height); context.strokeStyle = "rgb(0,0,0)"; for (i = 0; i &lt; rectangleList.length; i++) { // Iterate through each of the previously remembered rectangles, then re-draw them. x = rectangleList[i].x; y = rectangleList[i].y; var color = rectangleList[i].color; context.fillStyle = color; context.strokeRect(x, y, 50, 50); context.fillRect(x, y, 50, 50); }

http://stackoverflow.com/q/26798751
has answer: http://stackoverflow.com/a/26801685
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26824952
favorite count: 0
upvote count: 2
answer count: 5
type: UnansweredQuestion
has body: I have checked the google dev tools for console (https://developer.chrome.com/devtools/docs/console), and know that '%c' can apply CSS style rules to output string. Here is my problem: I want to write a functon redLog(msg, regExp), for example redLog('Page1, Page2', /\d/g) outputs the same text and style with console.log('Page%c1%c, Page%c2%c', 'color:red', 'color:black', 'color:red', 'color:black'), but the arbitrary css string('color:red', 'color:black', 'color:red', 'color:black') troubles me. My recent code snippet is listed as follows(This is my first experience of posting a question in English, i don't know for sure that my problem has made it clear to you guys.): // redLog('Page1, Page2', /\d/g) // function as console.log('Page%c1%c, Page%c2%c', 'color:red', 'color:black', 'color:red', 'color:black') // msg: the output string // regExp: when any characters match the regExp, red it function redLog(msg, regExp) { var cssStr = ''; if (msg &amp;&amp; regExp) { msg = msg.replace(regExp, '%c$&amp;%c'); // '$&amp;' inserts the matched substring. console.log(msg); // i cannot determine the cssStr } else { console.log(msg); } }
tagged with: console.log
score: 2
has comment: http://stackoverflow.com/comment/42171477
has answer: http://stackoverflow.com/a/60357474
has title: customize a console.log with css styling and with arbitrary arguments
has answer: http://stackoverflow.com/a/26799249
type: Question
has answer: http://stackoverflow.com/a/26799765

http://stackoverflow.com/a/76836790
type: Answer
has body: To populate multiple fields using findOne. For example, this is your model const productSchema = new mongoose.Schema( { user: { type: mongoose.Schema.Types.ObjectId, required: true, ref: "User", }, store: { type: mongoose.Schema.Types.ObjectId, required: true, ref: "Store", }, name: { type: String, required: true, }, }, ); const Product = mongoose.model("Product", productSchema); export default Product; To populate store and user without using path, do this: await Product.findOne({ name: "dancing shoe" }).populate("user store"); The next params will return a specific field in the populated models or just the _id where the field doesn't exist. In other words, the second params is used as select. await Product.findOne({ name: "dancing shoe" }).populate("user store", "name"); This will populate user and store model with _id and name only
score: 0
answers question: http://stackoverflow.com/q/26691543

http://stackoverflow.com/comment/41966354
type: Comment
has text: Thanks for the answer! This seems like exactly what I need, only thing i'm not sure is how to use the `scroll(".scrollToTop",160,800");` I know I have to change the variables each time but where do I place it each time to work for different elements.
comment on: http://stackoverflow.com/a/26683696
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41997228
comment on: http://stackoverflow.com/q/26701824
score: 0
type: QuestionComment
has text: Welp, I'm a total moron. Thank you.
type: Comment

http://stackoverflow.com/q/26782567
favorite count: 0
has answer: http://stackoverflow.com/a/26784379
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26786742
possible better answer: http://stackoverflow.com/a/26784379
has title: How to do not encode unicode, javascript
tagged with: http://stackoverflow.com/tag/json
tagged with: sendgrid
upvote count: 1
accepted answer: http://stackoverflow.com/a/26786742
tagged with: koa
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
score: 1
has body: I'm fetching data from one api, and get STRING like: [ { "reason": "Invalid address", "email": "j\u00c3\u00a9r\u00c3\u00b4mel\u00c3\u00a4ufer@com" }, { "reason": "Invalid address", "email": "dsfdsf" }, ] Now I just do JSON.parse(data), then return. But, in Frontend side, when render the page, i got some weird characters like: email: "jÃ©rÃ´melÃ¤ufer@com" What I want is to escape the \u00c3\u00a9r... these stuff, just to show on the page like email: "j\u00c3\u00a9r\u00c3\u00b4mel\u00c3\u00a4ufer@com" Or, encode these stuff, because I will use these email as a parameter to do some thing, but with these weird character, I can not get the same email. is this possible to do that? solution I've solved this issue, actually i'm fetching from sendgrid's api to get the invalid useremail list, api is GET https://api.sendgrid.com/api/invalidemails.get.json?api_user=user&amp;api_key=key and got the return data like: [ { "reason": "Invalid address", "email": "j\u00c3\u00a9r\u00c3\u00b4mel\u00c3\u00a4ufer@com" }, { "reason": "Invalid address", "email": "dsfdsf" }, ] so first I treat this string "j\u00c3\u00a9r\u00c3\u00b4mel\u00c3\u00a4ufer@com" using decodeURIComponent(escape(string)) which will be shown correctly on the web page, then when I want to remove this email and let this email as a parameter to call the remove email api from sendgrid like: POST(which is weriod,but it's official delete method) https://api.sendgrid.com/api/invalidemails.delete.json the body is: body:{ user: .., key: ..., email:unescape(encodeURIComponent(email)) } Then it works, so anybody knows why?
tagged with: unicode

http://stackoverflow.com/comment/42077484
score: 0
comment on: http://stackoverflow.com/a/26704572
type: Comment
has text: Thanks for the answer! I'll investigate whether it can emit the `Accept-Encoding: identity` header and post back.
type: AnswerComment

http://stackoverflow.com/a/26830245
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/42227565
type: Answer
answers question: http://stackoverflow.com/q/26830202
has comment: http://stackoverflow.com/comment/42227635
has comment: http://stackoverflow.com/comment/42227587
accepted answer of: http://stackoverflow.com/q/26830202
has body: Of course, you can do it in pure Javascript. Your HTML doesn't need the onclick property at all. HTML: Message me! JavaScript: var contact = document.getElementsByClassName("contactme")[0]; contact.addEventListener("click", function() { document.getElementById('download').style.display='none'; document.getElementByID('skype').style.display='none'; } Now you can use contact.addEventListener to add any function you want, like this: contact.addEventListener("click", hide);

http://stackoverflow.com/a/34565914
score: 0
has comment: http://stackoverflow.com/comment/56974103
answers question: http://stackoverflow.com/q/26768834
type: Answer
has comment: http://stackoverflow.com/comment/56876697
has body: Javascript slice method can be used alone to solve the problem. The first parameter for slice defines the first character position to grab. The second parameter (stop position) can be omitted which means you will get the rest of the string. By using the length of a as first parameter means it will skip as many character as the length of a and then pad with the rest of the contents of b: a + b.slice(a.length) // 'aaa456'

http://stackoverflow.com/comment/41962817
score: 1
type: Comment
type: QuestionComment
has text: try to use bind if you must use immediate invocation ,(function getListings() { / your code }).bind(xxx)();
comment on: http://stackoverflow.com/q/26681933

http://stackoverflow.com/comment/42227751
type: QuestionComment
has text: Thanks fred, but unfortunately that did not do it.
comment on: http://stackoverflow.com/q/26830361
score: 0
type: Comment

http://stackoverflow.com/q/26831105
tagged with: regex
linked to: http://stackoverflow.com/q/1693396
tagged with: preg-split
has comment: http://stackoverflow.com/comment/42229156
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42231374
has comment: http://stackoverflow.com/comment/42229316
possible better answer: http://stackoverflow.com/a/26832706
has answer: http://stackoverflow.com/a/26832706
upvote count: 1
downvote count: 1
type: Question
has body: I am looking for a way to use javascript for splitting a sentence with HTML into words, and leaving the inline HTML tags with the text content intact. Punctuation can be regarded as a part of the word it is closest to. I'd like to use regex, and probably preg_split() for splitting the sentences. Here follows an example: A word, words within tags should remain intact, so here's even more words Preferably, I would like to end up with the following: [0] => A [1] => word, [2] => words within tags should remain intact, [3] => so [4] => here's [5] => even more [6] => words I know about the discussion on parsing HTML with Regex (I enjoyed reading Bobince' answer :-P ), but I need to split the words of a sentence without harming html-tags with attributes. I don't see how I can do this with JS in a different way than Regex. Of course, if there are alternatives, I'd be more than happy to adapt them, to achieve a similar result. :-) Edit: I searched for similar questions on Stackoverflow about this, but these don't tick the boxes for me. To put it a little into perspective: splitting-up-html-code-tags-and-content: targets to split up the inline HTML, which is what I want to leave intact. php-regex-to-match-outside-of-html-tags: targets all text nodes in a HTML snippet, even within HTML tags. But as a matter of fact, I want to target only the spaces outside of HTML elements (so even excluding the spaces within the text nodes being wrapped with HTML tags).
linked to: http://stackoverflow.com/q/7891771
has title: Split a sentence with HTML into words (but leave inline HTML intact)
tagged with: javascript
linked to: http://stackoverflow.com/q/1732348
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26833172
tagged with: space
favorite count: 0
accepted answer: http://stackoverflow.com/a/26833172
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26827200
accepted answer: http://stackoverflow.com/a/26827377
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26848006
tagged with: javascript
score: 0
has title: max function implementation on underscore
has answer: http://stackoverflow.com/a/26827377
has body: I am in a code-reviewing some popular js, and I begun with underscore.js. Now I am analyzing the _.max function : _.max = function(obj, iteratee, context) { var result = -Infinity, lastComputed = -Infinity, value, computed; if (iteratee == null &amp;&amp; obj != null) { obj = obj.length === +obj.length ? obj : _.values(obj); for (var i = 0, length = obj.length; i &lt; length; i++) { value = obj[i]; if (value &gt; result) { result = value; } } } else { iteratee = _.iteratee(iteratee, context); _.each(obj, function(value, index, list) { computed = iteratee(value, index, list); if (computed &gt; lastComputed || computed === -Infinity &amp;&amp; result === -Infinity) { result = value; lastComputed = computed; } }); } return result; }; And I don't understand why it is used computed &gt; lastComputed || computed === -Infinity &amp;&amp; result === -Infinity instead of computed &gt; lastComputed in the if condition when an iteratee is provided. I think It is more performant ( very little ) if it only use "computed > lastComputed" in any case where an -Infinity appear in a collection ( one, some, or all elements ). If I am wrong, I wants to know what. Thanks, Pablo Benito
type: AnsweredQuestion
tagged with: performance
tagged with: underscore.js
has answer: http://stackoverflow.com/a/26848006

http://stackoverflow.com/q/26714525
tagged with: prestashop
tagged with: javascript
upvote count: 1
has title: Prestashop Currency size
answer count: 1
tagged with: prestashop-1.6
favorite count: 0
has answer: http://stackoverflow.com/a/26788038
tagged with: php
downvote count: 0
tagged with: prestashop-1.5
type: UnansweredQuestion
score: 1
type: Question
has body: Hello Guys im new to prestashop . i want to increase the size of the currency symbol. I wrote a module to override Tools.php and tools.js and placed it modules directory under themes. The file structure is as follows Mymodule\ --&gt;mymodule.php --&gt;override -----&gt;classes --------&gt;Tools.php -----&gt;js --------&gt;tools.js i just copied both the file from there respective folders and added the following code at Tools.php i added this line of code just before before if ($no_utf8) $c_char = '&lt;span&gt;'.$c_char.'&lt;/span&gt;'; at tools.js i added this line of code before if (currencyBlank > 0) currencySign = '&lt;span&gt;' + currencySign + '&lt;/span&gt;'; thanks for your time with Regards AB

http://stackoverflow.com/comment/42031617
score: 0
type: AnswerComment
type: Comment
has text: Take a look to [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/display). Also did this one worked?
comment on: http://stackoverflow.com/a/26719085

http://stackoverflow.com/q/26744175
has answer: http://stackoverflow.com/a/26745103
has answer: http://stackoverflow.com/a/26744341
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/3583724
has body: I am trying to make a image gallery and i am using a for loop to load all the images. but now I have the problem that it is going fast so I want to delay the the loop each time. I tried to set a timeout but that does not work does somebody know how to delay the loop with Jquery. js code: function test(){ var src = 'img/nature/'; var img = ['1.jpg']; var image = [ "1.jpg", "2.jpg", "3.jpg",'4.jpg','5.jpg','6.jpg','7.jpg' ]; for ( var i = 0; i &lt; image.length; i = i + 1 ) { $('#frame').append('&lt;img class="tile hide" src="'+src + image[ i ]+ '"&gt;'); $('.hide').show(500); setTimeout(function(){ },500); } } And I have a other question. Is it possible to load all the imags in a folder using Jquery?
upvote count: 1
has comment: http://stackoverflow.com/comment/42073955
answer count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/42074009
downvote count: 0
has comment: http://stackoverflow.com/comment/42074136
has comment: http://stackoverflow.com/comment/42073986
has comment: http://stackoverflow.com/comment/42074142
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42074350
score: 1
has answer: http://stackoverflow.com/a/26744393
accepted answer: http://stackoverflow.com/a/26744393
has answer: http://stackoverflow.com/a/26744426
has comment: http://stackoverflow.com/comment/42074057
type: Question
duplicate of: http://stackoverflow.com/q/3583724
possible better answer: http://stackoverflow.com/a/26744341
has comment: http://stackoverflow.com/comment/42074097
has title: How to delay a for loop in Jquery
has comment: http://stackoverflow.com/comment/42074172

http://stackoverflow.com/comment/42122651
type: AnswerComment
score: 0
type: Comment
has text: insert before: timeString = beginTime + "-" + endTime
comment on: http://stackoverflow.com/a/26770935

http://stackoverflow.com/q/26703518
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42000390
score: 1
has title: Highlighting Menu Item when clicked and active
upvote count: 1
has answer: http://stackoverflow.com/a/26703650
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26703680
answer count: 3
has body: I have a simple menu for my site with the normal paging links, home, About Us,... I have been trying to find a way to highlight the menu item that is clicked, but all solutions are not working, although it is working on the solution fiddles, so its probably a mistake from my side as I have very little javascript knowledge So.. The Menu is: Home About Us Our Work Contact Us Services The CSS: circle a { font-family:'Roboto Condensed', sans-serif; font-weight: 100; display: block; width: 20%; height: 20%; color:#000000; text-align:center; line-height:400%; margin-left: -11%; margin-top: -9%; position: absolute; text-align: center; border:1px solid #ffffff; border-radius: 50%; -webkit-transition: border-color 1s ease; -moz-transition: border-color 1s ease; -o-transition: border-color 1s ease; -ms-transition: border-color 1s ease; transition: border-color 1s ease; } .circle a:hover { color:#000000; border-color: #000000; } #nav a:active, #nav a.active { border-color:#000000 !important; } I tried many jQuery solutions for example: document.querySelector('.menu-button').onclick = function (e) { e.preventDefault(); document.querySelector('.circle').classList.toggle('open'); } $(document).ready(function() { $("#nav li").click(function (e) { e.preventDefault(); $("#nav li a.active").removeClass("active"); //Remove any "active" class $("a", this).addClass("active"); //Add "active" class to selected tab // $(activeTab).show(); //Fade in the active content }); }); I imagine its a simple thing, but I am stuck...
downvote count: 0
has answer: http://stackoverflow.com/a/26703572
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/42026990
has text: possible duplicate of [JQueryUI draggable](http://stackoverflow.com/questions/26634029/jqueryui-draggable)
comment on: http://stackoverflow.com/q/26710363
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41956906
has text: @mpdc -- Nope, `this` refers to the native DOM element.
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26678863

http://stackoverflow.com/q/26720142
tagged with: visualization
tagged with: api
answer count: 1
has answer: http://stackoverflow.com/a/26738699
has title: Google Visualization API Called Multiple Times Permission Denied (IE)
tagged with: permissions
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26738699
tagged with: charts
has body: I am new to the Google Charts API and am trying to implement it on one of our pages. What I have is a datatable which is filtered clientside. I want to redraw my charts client side as well, in real time. After some issues I've discovered (on SO) that if you call google.load AFTER the page loads (i.e. by having some button onclick), it wipes out your html, and the solution there seems to be google.load('version','package',{callback:.....}) to force it to append rather than inject. The problem there is that now the callback needs to be a global function, otherwise it won't resolve to anything in that inner context (or so it seemed).. Due to the above, my current setup is as follows: 1) The script at https://www.google.com/jsapi is included 2) google.load is called, passing in a callback pointer to my function which has the drawing logic Now #2 is the weird part, in the examples I've seen, "alert(zzz)" was passed in as a demo callback, for me I want to, obviously, draw the charts. But the charts all have different data so therefore the function is different each time it's called. As a test, I defined a global variable called "CALLBACK_PTR", and I then point that to an anonymous function which is re-defined with the new data every time the user clicks a button. This works, the data is properly displayed and updated, BUT if I look at dev tools in IE on button clicks (i.e. function calls) #2+, I see a bunch of permission denied errors. Any clue as to what that is? JS code below: var CALLBACK_PTR; function createChart(sChartType,sContainerID,oData,oOptions) { CALLBACK_PTR = null; // Load the Visualization API and the piechart package. google.load('visualization', '1.0',{'callback':'CALLBACK_PTR()'}); // Set a callback to run when the Google Visualization API is loaded. //google.setOnLoadCallback(drawVisualization); CALLBACK_PTR = function () { var oDataTable = new google.visualization.arrayToDataTable( oData ); var wrapper = new google.visualization.ChartWrapper( { chartTy…
tagged with: javascript
score: 0

http://stackoverflow.com/comment/42042630
type: AnswerComment
has text: Interesting. Someone suggested stringifying in that link and that seems to capture the state of execution, rather than it's current state, so that link was quite helpful. :)
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26726886

http://stackoverflow.com/comment/41962306
comment on: http://stackoverflow.com/q/26673424
type: Comment
type: QuestionComment
has text: I see, fetch is async, of u fave to wait till it will be finished
score: 0

http://stackoverflow.com/q/26726817
tagged with: tizen-web-simulator
answer count: 1
downvote count: 0
tagged with: javascript
has title: .html() not working in tizen
tagged with: jquery
favorite count: 0
has body: I am trying to change the contents of a div using jquery in Tizen. When I am using .html(htmlString) it is having no effect, whereas if I use .text() the contents are replaced, but HTML is not parsed, as is the behaviour of .text(). Can someone please suggest a workaround/a point where I am missing , so that .html(htmlString) works correctly in Tizen web simulator. The code is: function b() which is called on onload() event of restaurant.html In both of the pages, jquery is loaded correctly. Thanks
has comment: http://stackoverflow.com/comment/42043075
tagged with: tizen
accepted answer: http://stackoverflow.com/a/26747909
upvote count: 1
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/42042889
has answer: http://stackoverflow.com/a/26747909
type: Question

http://stackoverflow.com/comment/42052126
type: Comment
comment on: http://stackoverflow.com/a/26732316
has text: @user2003341 if in your `form` you already mentioned the `action`, then put `return false;` inside not valid statement, but if you don't specify the `action`, put the `return false;` in the end of `click` function. You should probably set the `action` though because you use `input type="submit"`
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42055631
comment on: http://stackoverflow.com/q/26734247
score: 1
has text: Do not break default browser behaviors and expected user interactions!
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26706768
tagged with: javascript
has answer: http://stackoverflow.com/a/26707274
has body: I'm currently making a web app editor and I have already implemented the suggestions box. Right now, this suggestions box is fixed to the top of the page, but I would like to have a suggestions box that pops up underneath the text that I'm currently typing. Sublime's suggestions box is exactly what I'm looking for: I've tried searching for tips on how to implement this kind of feature, but all I'm getting from my searches are for static fields (like search boxes that don't move) or drop down menus. I would like the suggestions box to pop up right under the current word I'm typing, meaning that it can't be fixed to a particular location. Any tips on where to start with this? Thanks!
answer count: 2
has title: JS/jQuery/CSS dropdown suggestions box like Sublime's
upvote count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/26707305
downvote count: 0
score: 1
type: Question

http://stackoverflow.com/a/26829007
type: Answer
answers question: http://stackoverflow.com/q/26828752
score: 0
has body: use setInterval for the interval and then jQuery $.load specifying some variable arguments attached to the file to load from... eg $('body').load('file.php?id=2&amp;time=2');
has comment: http://stackoverflow.com/comment/42226333

http://stackoverflow.com/a/26724416
answers question: http://stackoverflow.com/q/26723887
score: 0
has body: Try something like this (Note: I had a file already setup so the name is different): &lt;script type="text/javascript"&gt; $(function () { $.ajax({ url: "WebService.asmx/GetListData", success: OnSuccess, error: OnError }); }); function OnSuccess(data) { for (var i = 1; i &lt; data.all.length; i++) { alert(data.all[i].textContent); } } function OnError(data) { alert(data.statusText); } &lt;/script&gt;
type: Answer

http://stackoverflow.com/q/26817672
tagged with: jquery
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42206669
has comment: http://stackoverflow.com/comment/42205833
has comment: http://stackoverflow.com/comment/42206241
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26817719
tagged with: css
has answer: http://stackoverflow.com/a/26817931
has comment: http://stackoverflow.com/comment/42205652
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26817931
has body: I need advice because I am desperate yet. I made easy menu and I used a:hover to change color (red) . I also set class "active" to color was still red when I click on the link. For now everything is going well. But I would like to.. when I click on a link of menu so that was changed only one (content page). I know how load page or div in link, but I need to keep red color around link, when it is active specific link . I tried lots of solutions, but without success. If somebody helps me I will very grateful. link jsfiddle HTML: POČÍTAČE TVORBA W TISKOVINY SLUŽBY KONTAKTY CSS: nav ul ul { display: none; } nav ul li:hover > ul { display: block; } nav ul { background: rgb(1, 1, 1); box-shadow: 0px 0px 9px rgba(0, 0, 0, 0.15); padding: 0 20px; border-radius: 0px; list-style: none; position: relative; display: inline-table; font-family: Times New Roman; font-size: 70%; } nav ul:after { content:""; clear: both; display: block; } nav ul li { float: left; } nav ul li { float: left; font-family: Arial; font-size: 1; } nav ul li a:hover, nav ul li a.active, nav ul li a.visited { background: rgb(177, 2, 10); } nav ul li:hover a { color: rgb(255, 255, 255); } nav ul li a { display: block; padding: 5px 45px; color: rgb(255, 255, 255); text-decoration: none; position: relative; } #menu { position: relative; width: 780px; height: 35px; left: 50%; margin-left: -388px; overflow: hidden; top: -20px; }
has title: load html or div, menu
type: Question
accepted answer: http://stackoverflow.com/a/26817719
tagged with: javascript

http://stackoverflow.com/q/26706360
has comment: http://stackoverflow.com/comment/42005979
tagged with: local-storage
has title: Javascript localstorage messing up other code
has comment: http://stackoverflow.com/comment/42005635
type: Question
has comment: http://stackoverflow.com/comment/42008022
tagged with: event-listener
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26706708
has comment: http://stackoverflow.com/comment/42005596
has body: I have a todo list in javascript and decided to use localstorage to save the lists. The things is the list's individual remove item buttons don't work now without clicking on the button and then pressing enter. This only happens on chrome and safari. In firefox everything works fine so I'm not sure what the issue actually is and this is my first attempt at using localstorage. Here's the whole code base since I'm not really sure which part could be causing the issue. var input = document.querySelector('input[name=todoItem]'), btnAdd = document.querySelector('button[name=add]'), btnClear = document.querySelector('button[name=clear]'), btnSave = document.querySelector('button[name=save]'), list = document.querySelector('.todo'), storeList = []; list.innerHTML = window.localStorage.getItem('list'); function renderTodos(){ //Cached array length for use in for loop var listLength = storeList.length, //Created list item and button el = document.createElement('li'), x = document.createElement('button'); //Set text for remove button x.setAttribute('class', 'remove'); x.innerHTML = '&lt;i class="fa fa-trash-o fa-2x"&gt;&lt;/i&gt;'; //Loop for adding items to array and appending items to list for(var i = 0; i &lt; listLength; i++){ el.innerHTML = storeList[i]; list.appendChild(el); el.appendChild(x); } //Clear out and put focus back in input box input.value = ''; input.focus(); } //Add todo item to list function addTodos(e){ //Check to see that input isn't empty or only spaces with no characters // and add todo item if add button is clicked or enter key is pushed if(input.value.trim() !== '' &amp;&amp; (e.which ===13 || e.which ===1)){ storeList.push(input.value); renderTodos(); } else if(input.value.trim() === '' &amp;&amp; (e.which ===1 || e.which === 13)){ alert('Please Enter A Valid Item!'); input.focus(); } } function removeItem(e){ var node = e.target; var attr = node.getAttribute('class'); if(attr === 'remove'){ node = node.parentNode; node.parentNode.removeChild(node);…
type: UnansweredQuestion

http://stackoverflow.com/a/26773763
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Your mistake is that you select the jQuery object instead of DOM element: replace var inp = $('#myTextInput'); with var inp = $('#myTextInput')[0];. JSFIDDLE However, I'd recommend using the plugin from this answer, since the code will look cleaner: $.fn.selectRange = function(start, end) { return this.each(function() { if (this.setSelectionRange) { this.focus(); this.setSelectionRange(start, end); } else if (this.createTextRange) { var range = this.createTextRange(); range.collapse(true); range.moveEnd('character', end); range.moveStart('character', start); range.select(); } }); }; $(document).ready(function() { $('#btn').on('click', function() { var pos = 7; $('#myTextInput').focus().selectRange(pos, pos); }); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input id="myTextInput" type="text" value="some text2"&gt; &lt;input type="button" value="set mouse" id="btn" /&gt;
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26773658
answers question: http://stackoverflow.com/q/26773658

http://stackoverflow.com/comment/42058853
comment on: http://stackoverflow.com/q/26736270
type: QuestionComment
type: Comment
has text: Your regex also allows the character `?`; I bet that's unintentional.
score: 2

http://stackoverflow.com/comment/42134113
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26775888
has text: I got the soln for my problem. Sample code was really helpful. Thank you.

http://stackoverflow.com/q/26690987
answer count: 3
has comment: http://stackoverflow.com/comment/41978555
tagged with: javascript
has answer: http://stackoverflow.com/a/26691116
has answer: http://stackoverflow.com/a/26735026
possible better answer: http://stackoverflow.com/a/26735026
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26691124
has body: I have an API that returns indicator data in this format: [ { "concept": "population", "year": 2012, "value": 9.5, "country-name": "Sweden", }, { "concept": "education", "year": 2012, "value": 12, "country-name": "Sweden", }, { "concept": "population", "year": 2012, "value": 5, "country-name": "Norway", }, { "concept": "eduction", "year": 2012, "value": 12, "country-name": "Norway", } ] Based on this, I typically need to group this by country and year to get something like: var data = [ {id : Sweden, population : 9.5, education: 12}, {id : Norway, population : 5, education: 12}, ] Or just by country and year-values as an array: var data = [ {id : Sweden, values : [ { year : 2012, population : 9.5, education: 12 }, {...} ]}, {id : Norway, values : [ { year : 2012, population : 5, education: 12 }, {...} ]}, ] What JS libraries can help manage these common data transformations? Can you provide an example of doing the above (using a library or vanilla js)?
type: Question
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/26691124
has title: Transforming JSON data from API into useful format?

http://stackoverflow.com/q/26674628
downvote count: 1
tagged with: arrays
possible better answer: http://stackoverflow.com/a/26674659
has comment: http://stackoverflow.com/comment/41948889
tagged with: jquery
has comment: http://stackoverflow.com/comment/41948768
favorite count: 0
has body: I'm trying to make a simple slide show and i'm trying to make the current src become the new array but it doesn't seem to work. I know i made an error somewhere but i can't find it. Help? &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script&gt; images = ["1.png", "2.png", "3.png", "4.png"]; for (i = 0; i &lt; images.length; i++) { document.getElementById("demo").src= images[i] ; } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;img id="demo" src="1.png" style="width:500px;height:350px;border: 2px solid grey;"&gt; &lt;/body&gt; &lt;/html&gt;
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/26674659
has comment: http://stackoverflow.com/comment/41948659
has comment: http://stackoverflow.com/comment/41948805
type: Question
has answer: http://stackoverflow.com/a/26674914
accepted answer: http://stackoverflow.com/a/26674914
has comment: http://stackoverflow.com/comment/41949306
has comment: http://stackoverflow.com/comment/41948707
tagged with: javascript
has title: .src=Array[i] doesn't seem to work?
score: -1
has comment: http://stackoverflow.com/comment/41948637
answer count: 2

http://stackoverflow.com/comment/42191774
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26796519
has text: I think this is a case of "Tell the client that they don't really want websites to be able to delete files from their PC". If it's so important they won't listen, consider a desktop app.
score: 0

http://stackoverflow.com/q/26747667
accepted answer: http://stackoverflow.com/a/27221769
has comment: http://stackoverflow.com/comment/42917986
type: AnsweredQuestion
upvote count: 1
has title: dc.js chart groups not updating with correct values on charts after click on a parent chart
has body: My issue here is that I have a crossfilter group reduce function for calculating savings, but when a filter is applied on a chart, it seems to not pass the correct filter across. I also have a similar case working example. I have created two jsbin's out of which one of them has correct behavior. I have data for two years in this case 2010 and 2014. But in the Savings(not working) chart the carrier pie chart doesn't filter by year whereas it does in the DIFOT(working) chart. The links are : DIFOT(Working) : http://jsbin.com/bagohavehu/2/edit Savings (Not working as expected) : http://jsbin.com/yudametulo/2/edit Thanks a lot for your time and effort. Regards, Animesh
type: Question
has comment: http://stackoverflow.com/comment/42506319
has answer: http://stackoverflow.com/a/27221769
tagged with: javascript
tagged with: dc.js
has comment: http://stackoverflow.com/comment/42163463
tagged with: crossfilter
has comment: http://stackoverflow.com/comment/42879024
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42506898
score: 1
favorite count: 0

http://stackoverflow.com/q/26686883
score: 4
tagged with: unit-testing
upvote count: 4
tagged with: reactjs
tagged with: javascript
type: UnansweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/26690020
tagged with: jasmine
favorite count: 0
has title: How do I access methods in React for unit testing
has answer: http://stackoverflow.com/a/37598225
type: Question
answer count: 2
has body: I'm having an incredibly difficult time unit testing anything with React. The docs on TestUtils are sparse and there's no examples. Google seems to only be giving me a couple results. I'm using Jasmine, but that's not really the part that's giving me grief. Here's the simplest thing I've tried testing: var BigButton = React.createClass({ render: function () { return ( &lt;button className="big-submit" data-color={this.props.color} onClick={this.props.action}&gt;{this.props.text}&lt;/button&gt; ); }, foo: function () {}, bar: function () { this.foo(); } }); I have a test with describe('BigButton', function () { describe('render', function () { it('creates a button', function () { var button = &lt;BigButton /&gt;; TestUtils.renderIntoDocument(button); debugger; }); }); }); My question is how do I access anything meaningful in a React class from the outside? How do I even check if render returns a button HTML element? I know how to use testing spies, but how do I even find the method foo to spy on and how do I call bar? Everything seems to be somehow wrapped up in a way that's completely untestable.

http://stackoverflow.com/q/26732864
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26817948
has body: Using Magnific Popup is it possible to force a second popup, opened while the first one is still open, to accept new options? The documentation states the following: "If popup is already opened - it'll just overwite the content (but old options will be kept)." I'm opening the popup using the public open() method within some JavaScript. The issue I have is that my first popup is modal so has no close button added to it. The second popup shouldn't be modal but because it uses the options of the first rather than it's own, it is modal. Here's a jsFiddle with the problem: jsfiddle Here is an example: Html My modal popup My non modal popup, which should have a close button. CSS .popup_dialog { background: none repeat scroll 0 0 #fff; border-radius: 3px; margin-left: auto; margin-right: auto; max-width: 500px; padding: 30px; position: relative; } .mfp-hide { display:none; } JavaScript $(document).ready(function () { // Open the first, modal popup $.magnificPopup.open({ items: { src: $('#modal_popup') }, type: 'inline', modal: true }); // Open the second, non-modal popup setTimeout(function () { $.magnificPopup.open({ items: { src: $('#non_modal_popup') }, type: 'inline', modal: false, closeBtnInside: true }); }, 2000); });
favorite count: 0
tagged with: magnific-popup
upvote count: 1
has answer: http://stackoverflow.com/a/26817948
type: AnsweredQuestion
score: 1
has title: Magnific Popup: opening second popup with different options
type: Question
downvote count: 0
answer count: 1

http://stackoverflow.com/q/26720857
has comment: http://stackoverflow.com/comment/42031651
has body: I'm working on a webpage which uses sources I'm not familiar with. One of the elements is having its position changed on mouse hover, but I can't find any corresponding CSS that is triggering that behavior. Thus, it is probably JavaScript. How can I find the culprit without figuring every possible selector for this element and then going through every possible JavaScript file to attempt and find where it is being used?
has title: How to figure out which JavaScript functions are attached to an element?
has comment: http://stackoverflow.com/comment/42031628
has comment: http://stackoverflow.com/comment/42031756
has answer: http://stackoverflow.com/a/26720983
downvote count: 0
type: UnansweredQuestion
type: Question
linked to: http://stackoverflow.com/q/2008592
score: 1
linked to: http://stackoverflow.com/q/11065358
duplicate of: http://stackoverflow.com/q/2008592
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/26790326
type: Question
has comment: http://stackoverflow.com/comment/42157024
tagged with: javascript
has comment: http://stackoverflow.com/comment/42156874
has comment: http://stackoverflow.com/comment/42157177
has title: Meteor Getting incorrect typeof value on number
score: 0
tagged with: meteor
has body: I have a form where a user can make changes to a record. When the form is submitted I then compare previous values to new values and record any changes made in a change Log collection. I know that pulling the value of an amount field needs to be converted to a number before I check if it has changed. My problem is that after conversion my template helper still see's it as a string. Here's the code; var trxColl = trx.findOne(Session.get('trx_DB_currentID')); // Contains _id of the trx records on the screen var formColl = theTemplate.findAll('.trx_edit'); formColl.forEach( function(item) { docName = "trxColl." + item.name; // All the input names are the same as the DB field names var value = item.value; if (item.name === "trx_amount") { value = parseFloat(value).toFixed(2); } if (value !== eval(docName)) { console.log(value+ " has type : " + typeof value + " AND " + typeof eval(docName) + " has type : " + eval(docName)); } }); Input field is- Amount: &lt;input type="text" name="trx_amount" value="{{trx_amount}}" id="trx_amount" class="trx_edit"&gt; This is what I get in my console; 568.00 has type : string AND 568 has type : number Also when I update the datebase like this - trx.update({'_id': 'roJ4w9jg6htSF8vfj' }, {$set: {'trx_amount': 568.00}}) It always shows back up as 568.
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/41997795
has text: Surely everything within the directive itself doesn't need "namespacing" because it's all directly on $scope? Which bit needs to use xxx.yyy ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26702058

http://stackoverflow.com/a/26725959
score: 0
has body: Here's something to give you an idea on how to get the keys and values: HTML &lt;script type="text/html" id="tmpl"&gt; {{#objs}} &lt;div&gt; {{key}}: {{value}} &lt;/div&gt; {{/objs}} &lt;/script&gt; JavaScript $(document).ready(function () { var output = $("#output"); var template = $("#tmpl").html(); var objs = [{ propA: 'A', propB: 'B', propC: 'C', propD: 'D' }]; var mustacheFormattedData = { 'objs': [] }; for (var prop in objs[0]) { if (objs[0].hasOwnProperty(prop)) { mustacheFormattedData['objs'].push({ 'key': prop, 'value': objs[0][prop] }); } } var html = Mustache.render(template, mustacheFormattedData); output.append(html); }); Demo: http://jsfiddle.net/moogs/qK5NT/83/
type: Answer
answers question: http://stackoverflow.com/q/26725751

http://stackoverflow.com/a/26793839
has comment: http://stackoverflow.com/comment/42162966
has comment: http://stackoverflow.com/comment/42163354
score: 2
has body: If I'm understanding you correctly, you can prevent users from inserting line breaks by pressing the Enter key by adding a listener. Something like this: var textarea = document.getElementById("myTextArea"); textarea.addEventListener("keydown", function (e) { if (e.keyCode == 13) { // keyCode 13 corresponds to the Enter key e.preventDefault(); // prevents inserting linebreak } }); JSFiddle here As for replacing multiple new lines in the string, as pointed out by @adeneo in the comments, you can use JavaScript's string.replace() function. You can add another listener on the textarea that listens on the paste event, like this: textarea.addEventListener("paste", handler); where handler is a function you can define that will clean the line breaks. Here's a Fiddle showing this: JSFiddle
downvote count: 0
has comment: http://stackoverflow.com/comment/42164031
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42163115
accepted answer of: http://stackoverflow.com/q/26793606
answers question: http://stackoverflow.com/q/26793606
type: Answer

http://stackoverflow.com/a/26737526
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26737376
has body: According to the page you've linked: The start, rotate and stop callbacks provide the following in the ui argument of the callback: ... angle: An object containing information about the rotation angle, with the following keys: ... stop: The angle at the end of the rotation. Thus, you can read the final angle (in radians) from ui.angle.stop inside the stop callback: stop: function(event, ui) { alert(ui.angle.stop); }, To convert the value to degrees, you can simply do ui.angle.stop / Math.PI * 180.
accepted answer of: http://stackoverflow.com/q/26737376

http://stackoverflow.com/q/26679368
tagged with: javascript
has answer: http://stackoverflow.com/a/26683326
accepted answer: http://stackoverflow.com/a/26683326
score: 0
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
tagged with: twitter-bootstrap
type: Question
has body: I am trying to apply foggy.js (http://nbartlomiej.github.io/foggy/) to the back-drop of Bootstraps Modal. This would allow me to blur every element in the background which I have completed so far but the Modal Popup is also Blurry. So my question is how do I apply the blur to the back-drop and its child elements so the Modal isn't blurred but everything else is. Here is my code. Note I have some code to start and stop Vimeo as well as start and stop the Carousel. $(document).ready(function(){ $('.close-video').on('click', function (event) { for (var i = 0; i &lt; window.frames.length; i++) { window.frames[i].postMessage(JSON.stringify({ method: 'pause' }), '*') //Pauses Vimeo Video $('#AVRS-Carousel').carousel('cycle'); //Starts Carousel $('body').foggy(false); //Disables Foggy.js } }); $('[data-frame-index]').on('click', function (event) { var $span = $(event.currentTarget), index = $span.data('frame-index'); window.frames[index].postMessage(JSON.stringify({ method: 'play' }), '*') //Auto Plays Vimeo $('#AVRS-Carousel').carousel('pause'); //Pauses Carousel $('body').foggy(); //Applies Foggy.js }); }); Also here is CSS for Bootstraps back-drop class for the Modal: .modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: @zindex-modal-background; background-color: @modal-backdrop-bg; // Fade for backdrop &amp;.fade { .opacity(0); } &amp;.in { .opacity(@modal-backdrop-opacity); } filter: blur(5px) } Thank you for your time in advance.
has title: Apply jQuery to body (background) but not Modal using Bootstrap

http://stackoverflow.com/comment/42179211
has text: You would want to hide `test_wrapper` with inline CSS as well, or it may display briefly before the JS runs.
comment on: http://stackoverflow.com/q/26802934
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/41981777
type: QuestionComment
has text: This file 2000+ rows. There are more 5 places there I can send request to server... it can happen on different events
comment on: http://stackoverflow.com/q/26692776
score: 0
type: Comment

http://stackoverflow.com/a/26828416
score: 0
has comment: http://stackoverflow.com/comment/42224789
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42224969
type: Answer
has body: Using @Amit's answer I'd probably add a method to Object itself: Object.prototype.hasAllProperties = function(props, fire){ var result = Object.keys(this).sort().join() == propsNeeded.sort().join(); if (fire &amp;&amp; !result){ throw new Error('Object does not define all properties'); } return result; } and in your function: function someFunction(myObject){ var objComplete = myObject.hasAllProperties(["prop1", "prop2", "prop3"], false); } Update: After noticing the problem with @Amit's original answer, here's what I suggest: Object.prototype.hasAllProperties = function(props, fire){ var result = true; $(props).each(function(i, e){ if (!this.hasOwnProperty(e) ) { result = false; return false; } }); if (fire &amp;&amp; !result){ throw new Error('Object does not define all properties'); } return result; }
answers question: http://stackoverflow.com/q/26828161

http://stackoverflow.com/comment/42061856
comment on: http://stackoverflow.com/q/26736565
has text: Can you create a CodePen showing the problem?
type: QuestionComment
score: 0
type: Comment

http://stackoverflow.com/a/26762610
score: 0
has comment: http://stackoverflow.com/comment/42107159
upvote count: 1
answers question: http://stackoverflow.com/q/26762474
type: Answer
downvote count: 1
has body: You don't need a regex if you are just checking to see if it's empty: Validate

http://stackoverflow.com/q/26788823
has answer: http://stackoverflow.com/a/26789449
has body: I have an underscore filter which is returning the parent object which contains a child object I am looking for. But I want it to return just the child object. Since it is already doing the work of locating the child object in order to return the parent, I'm wondering how to simplify my code to return just the child. Here's the example: var filterObj = _.filter(filtersPath, function(obj) { return _.where(obj.filters, {id: prefilterCat}).length &gt; 0; }); So here, that nested object inside obj.filters, with the id of prefilterCat, is the object I want returned, not its parent. So currently I would have to do another find inside of filterObject to get what I need. Any ideas?
tagged with: underscore.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26788941
has title: underscore js - finding a nested object
tagged with: javascript
type: Question
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42154372

http://stackoverflow.com/a/26696297
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41987880
has comment: http://stackoverflow.com/comment/41988035
has comment: http://stackoverflow.com/comment/41987384
has comment: http://stackoverflow.com/comment/41987362
upvote count: 1
has comment: http://stackoverflow.com/comment/41987572
has comment: http://stackoverflow.com/comment/41988833
has body: If a JavaScript function does not explicitly return a value, the value returned will always be undefined. In this case, you don't have a return statement for your GetUserInfo() function. There's a return statement in the query.find success callback, but that only returns within the scope of the callback, and does not return a value for the parent function. If query.find is synchronous, you can assign the value of results to a variable created outside of your callback function. However, if query.find is asynchronous, you'll need to wait for the for the callback to run and return before your parent function can return a value. Try stepping through your function, and logging the results of your query. That will give you a better idea of what's going on inside your function.
type: Answer
has comment: http://stackoverflow.com/comment/41988104
answers question: http://stackoverflow.com/q/26696274

http://stackoverflow.com/q/26783921
has title: How can I align a div right under another?
has comment: http://stackoverflow.com/comment/42145741
downvote count: 0
tagged with: jquery
favorite count: 0
score: 6
tagged with: css
upvote count: 6
has answer: http://stackoverflow.com/a/26784277
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26783987
has body: I created a drop-down menu in Jquery and it's working perfectly but I have only one problem with the positioning of the menu. I created the menu right after I learned about jquery animations and I'm still a beginner so I didn't follow any tutorials. So I was wondering how can I put the menu right under the button? ABOUT PRODUCTS HOME Cakes Cupcakes Fudges Ice Creams Hard Candies The menu is set under the button using an absolute position. Here is how the site looks while full screen: Here is how the site looks while windowed: I would like to learn how to do this with JQuery/JScript or CSS.
type: Question
possible better answer: http://stackoverflow.com/a/26783987
has comment: http://stackoverflow.com/comment/42144723
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26784277
answer count: 2

http://stackoverflow.com/q/26797872
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26798246
has comment: http://stackoverflow.com/comment/42169917
tagged with: laravel
type: Question
has comment: http://stackoverflow.com/comment/42170143
has body: Here i am getting my Error Messages from a separate page and i am displaying it in a a div called #stage_error $('#stage_error').html(error_string); So, the errors will be displayed like this The bus no field is required. The comp id field is required. The total seats field is required. But what i want is to display the errors in its respective div's i.e., the Bus no should be displayed near the div &lt;div id='busno'&gt; like this. How can i do that ? Json : {"busno":["Bus No field is required"],"Comp Id":["Comp Id is required."]} Update : Script for request and showing error : &lt;script&gt; $(document).ready(function() { $("#driver").click(function(event) { var BusNo = $("#BusNo").val(); var CompID = $("#CompID").val(); var TotalSeats = $("#TotalSeats").val(); var _token = $("#_token").val(); $.post("managebus_register", { _token: _token, BusNo: BusNo, CompID: CompID, TotalSeats: TotalSeats }, function(data) { if (data != '') { obj = JSON.parse(data); var error_string = ''; $.each(obj, function(entry) { error_string += obj[entry] + '&lt;br/&gt;'; }); $('#stage_error').html(error_string); } else { $('#stage_success').text('Resistered Succesfully'); $("#stage_error").hide(); } }); }); }); &lt;/script&gt; Laravel Controller : public function managebusregister() { $BusNo = Input::get('BusNo'); $CompID = Input::get('CompID'); $TotalSeats = Input::get('TotalSeats'); $data = Input::except(array('_token')) ; $rule = array( 'BusNo' =&gt; 'required|unique:company_bus', 'CompID' =&gt; 'required', 'TotalSeats' =&gt; 'required|max:50' ) ; $validator = Validator::make($data,$rule); if ($validator-&gt;fails()) { $messages = $validator-&gt;messages(); return json_encode($validator-&gt;messages()); //php encoded value } else { DB::insert('insert into company_bus (BusNo, CompID, TotalSeats) values (?, ?, ?)', array($BusNo, $CompID, $TotalSeats)); return ''; } } Html Code : &lt;div id="stage_error" style="color:red;font-size:15px"&gt;&lt;/div&gt; &lt;div id="stage_success" style="c…
has title: Placing the errors in its respective div
has answer: http://stackoverflow.com/a/26798399
accepted answer: http://stackoverflow.com/a/26798399
answer count: 2
tagged with: laravel-4
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/26798246
has comment: http://stackoverflow.com/comment/42169828
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42169660

http://stackoverflow.com/comment/42026792
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26718142
has text: lol I've fixed it now. But once I click the sell I've got it to also deduct and update by -5 each time. However I can't go any lower. The javascript file is separate yes, it's not in script tags.
score: 0

http://stackoverflow.com/q/26764184
has comment: http://stackoverflow.com/comment/42109454
tagged with: arrays
downvote count: 0
has comment: http://stackoverflow.com/comment/42109410
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26764383
accepted answer: http://stackoverflow.com/a/26764383
answer count: 3
has body: I have a list of hidden divs and would like to be able to show one div at a time, when a button is pressed, .. I am having a hard time writing the proper loop for this. product_options: function() { var product_option = $('.product_product_options_option_name') $(product_option).css("display", "none"); $('.add_product_option').on('click', function (e) { e.preventDefault(); $(product_option).each(function(){ $(this).css("display", "block") }); }); } currently it displays them all onclick, i deleted all my other loop attempts, bc they were egregiously wrong or were not doing much
possible better answer: http://stackoverflow.com/a/26764268
has answer: http://stackoverflow.com/a/26764648
upvote count: 1
has title: javascript loop needed to show hidden list onclick one at a time
has comment: http://stackoverflow.com/comment/42109403
type: AnsweredQuestion
score: 1
tagged with: loops
has comment: http://stackoverflow.com/comment/42109459
type: Question
has answer: http://stackoverflow.com/a/26764268

http://stackoverflow.com/q/26814282
tagged with: jquery
tagged with: asp.net
has title: Date variable do not have method addDays
type: AnsweredQuestion
has body: I have two TextBoxes in which I am getteing 2 dates and getting array of dates between those two. I have a code $(".txtto").change(function () { var dates = new Array(); var dateto = new Date(); var datefrom = new Date(); dateto.format("dd/mm/yyyy"); datefrom.format("dd/mm/yyyy"); dateto = $(this).val(); datefrom = $(".datefrom").val(); while (datefrom &lt;= dateto) { dates.push(new Date(datefrom)); datefrom = datefrom.addDays(1); } }); But it is giving an error Uncaught TypeError: Object 18/11/2014 has no method 'addDays' 18/11/2014 is input date. Edit 1: Meanwhile I tried this $(".txtto").change(function () { var dates = new Array(); var dateto = new Date(); var datefrom = new Date(); dateto.setDate($(this).val()); dateto.format("dd/mm/yyyy"); console.log(dateto); datefrom.setDate($(".datefrom").val()); while (datefrom &lt;= dateto) { dates.push(new Date(datefrom)); datefrom = datefrom.setDate(datefrom.getDate() + 1); } }); but console.log(dateto); outputs invalid date :(
has answer: http://stackoverflow.com/a/26814301
accepted answer: http://stackoverflow.com/a/26814301
type: Question
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/q/26792947
has answer: http://stackoverflow.com/a/27040562
has comment: http://stackoverflow.com/comment/42171100
tagged with: node.js
has body: So i am planning on making my own web app/ mobile app and i am not sure where to start with choosing the technologies to use. Essentially the app will display a list of items sorted by distance from you or price. This allows people to see which stores near them sell which items and at which price, along with where the cheapest particular item is. So they can see store A and B bother sell item 1 but store A sells it for cheaper. So for the front end obviously HTML, CSS and Javascript. In the backend is where i would like some help. Should i use a framework to make the api? If so should i use play? or node? or another one. I have been doing a lot of reading about node being good for I/O apps since its async and you can make a REST API quickly passing JSON which from my understanding is all i will be doing. Thoughts? Am i over thinking this?
has title: Node JS or Play For Web App and Possibly Mobile
type: UnansweredQuestion
tagged with: web-applications
type: Question
tagged with: playframework
answer count: 1
tagged with: javascript
score: 0
tagged with: android

http://stackoverflow.com/a/26793759
type: Answer
answers question: http://stackoverflow.com/q/26793590
score: 0
has body: Every HTML element is positioned relative to the most nearest positioned element in the ancestor chain. So, making the parent element relative you can tell the child element to position relative to that parent and making them absolute will take them out of the document flow. Hope, you get my saying. Cheers!

http://stackoverflow.com/a/26790648
score: 0
type: AcceptedAnswer
type: Answer
has body: It is working: .... var place = autocomplete.getPlace(); if (!place.geometry) { return; } // If the place has a geometry, then present it on a map. if (place.geometry.viewport) { map.fitBounds(place.geometry.viewport); } else { map.setCenter(place.geometry.location); map.setZoom(17); // Why 17? Because it looks good. } ... was taken from https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete
accepted answer of: http://stackoverflow.com/q/26788082
answers question: http://stackoverflow.com/q/26788082

http://stackoverflow.com/comment/42179763
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26803224
has text: That's rather rude. Just because you don't see a use for this, doesn't mean it doesn't exist.

http://stackoverflow.com/a/26780161
accepted answer of: http://stackoverflow.com/q/26779622
downvote count: 0
answers question: http://stackoverflow.com/q/26779622
type: AcceptedAnswer
type: Answer
has body: You are waiting for a JSON answer, but you are not returning anything. jQuery is going to give you an error. Remove 'dataType' from your ajax request or return a valid json object. From jQuery documentation: "json": Evaluates the response as JSON and returns a JavaScript object. The JSON data is parsed in a strict manner; any malformed JSON is rejected and a parse error is thrown. As of jQuery 1.9, an empty response is also rejected; the server should return a response of null or {} instead. (See json.org for more information on proper JSON formatting.) jQuery ajax query
upvote count: 1
score: 1

http://stackoverflow.com/a/26753492
has comment: http://stackoverflow.com/comment/42094231
score: 0
has comment: http://stackoverflow.com/comment/42094450
type: Answer
has body: all the validators in ASP.NET have an EnableClientScript property which you can set to true or false based on your needs. If you set it to false, you will be able to perform a postback using javascript and then trigger validation in your code behind.
answers question: http://stackoverflow.com/q/26751790

http://stackoverflow.com/a/26749058
answers question: http://stackoverflow.com/q/26748824
upvote count: 1
has body: What you want is a solution like so: [ ["Item 1", "Item 2"], ["Item A", "Item B", "Item C"] ].reduce(function(first, second) { var result = []; first.forEach(function(first) { var str = first + ' '; second.forEach(function(second) { result.push(str + second); }); }); return result; }); The result: [ "Item 1 Item A", "Item 1 Item B", "Item 1 Item C", "Item 2 Item A", "Item 2 Item B", "Item 2 Item C" ] Update With multiple arrays: [ ["Black", "White"], ["Apple", "Orange", "Pear"], ["Fast", "Slow",] ].reduce(function(firstArray, currentArray) { var result = []; firstArray.forEach(function(first) { var str = first + ' '; currentArray.forEach(function(second) { result.push(str + second); }); }); return result; }); And the result: [ // Black "Black Apple Fast", "Black Apple Slow", "Black Orange Fast", "Black Orange Slow", "Black Pear Fast", "Black Pear Slow", // White "White Apple Fast", "White Apple Slow", "White Orange Fast", "White Orange Slow", "White Pear Fast", "White Pear Slow" ]
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42082686
has comment: http://stackoverflow.com/comment/42099945
type: Answer
accepted answer of: http://stackoverflow.com/q/26748824
has comment: http://stackoverflow.com/comment/42082616
score: 1

http://stackoverflow.com/comment/41954346
score: 0
type: Comment
has text: Sorry you have to wait but there will always be good folks here happy to assist with the questions when you do get to post again. Maybe take the time to write your question as clearly as possible in a wordprocessor so that when it is time to post again, you have an AWESOME question ready to be read?
comment on: http://stackoverflow.com/a/26677478
type: AnswerComment

http://stackoverflow.com/q/26747638
has answer: http://stackoverflow.com/a/26749371
favorite count: 0
possible better answer: http://stackoverflow.com/a/26749371
upvote count: 6
has answer: http://stackoverflow.com/a/26751989
type: AnsweredQuestion
has title: D3.js Titles on Collapsible Force-Directed graph
tagged with: d3.js
has body: So i've been working on a collapsible force-directed graph based of the following example. Im trying to advance from that and add titles to each node. I've followed a similar answer here on stackoverflow, but I cannot implement the solution from that answer into the example above and other similar solutions. Please can someone point me in the correct direction. See project code below before implementation. JS var w = 600, h = 600, radius = 10, node, link, root; var force = d3.layout.force() .on("tick", tick) .charge(function(d) { return -500; }) .linkDistance(function(d) { return d.target._children ? 100 : 50; }) .size([w, h - 160]); var svg = d3.select("body").append("svg") .attr("width", w) .attr("height", h); root = words[0]; //set root node root.fixed = true; root.x = w / 2; root.y = h / 2 - 80; update(); function update() { var nodes = flatten(root), links = d3.layout.tree().links(nodes); // Restart the force layout. force .nodes(nodes) .links(links) .start(); // Update the links… link = svg.selectAll(".link") .data(links); // Enter any new links. link.enter().insert("svg:line", ".node") .attr("class", "link") .attr("x1", function(d) { return d.source.x; }) .attr("y1", function(d) { return d.source.y; }) .attr("x2", function(d) { return d.target.x; }) .attr("y2", function(d) { return d.target.y; }); // Exit any old links. link.exit().remove(); // Update the nodes… node = svg.selectAll("circle.node") .data(nodes) .style("fill", color); node.transition() .attr("r", radius); node.append("title") .text(function(d) { return d.name; }); // Enter any new nodes. node.enter().append("svg:circle") .attr("class", "node") .attr("cx", function(d) { return d.x; }) .attr("cy", function(d) { return d.y; }) .attr("r", radius) .style("fill", color) .on("click", click) .call(force.drag); // Exit any old nodes. node.exit().remove(); } function tick() { link.attr("x1", function(d) { return d.source.x; }) .attr("y1", function(d) { return d.source.y; }) .attr("x2", function(d) { retu…
linked to: http://stackoverflow.com/q/18164230
type: Question
accepted answer: http://stackoverflow.com/a/26751989
tagged with: javascript
score: 6
answer count: 2
downvote count: 0
tagged with: jquery

http://stackoverflow.com/q/26763809
has answer: http://stackoverflow.com/a/26764213
has answer: http://stackoverflow.com/a/26763866
favorite count: 0
has comment: http://stackoverflow.com/comment/42109320
type: UnansweredQuestion
has body: This is a basic question in JavaScript. I tried a lot playing around this, but i can't the solution. I have an array. var keys = ["a", "b", "c"]; var array =[]; I am looping this keys to form another array for (var i =0; i&lt;keys.length; i++){ array[i]= "x" + keys[i]; } If i print this array i got ['xa']; but what i needed is ["xa"] only difference is the quotes "".. Why because i have to use this array in another json as with double quotes. Thanks in advance.. consider my json array name as final, var query = { "_source": { "include": final }. NOw here the query is forming like var query = { "_source": { "include": '["xa"]' } But i need: var query = { "_source": { "include": ["xa"] }
has comment: http://stackoverflow.com/comment/42109283
score: -3
has answer: http://stackoverflow.com/a/26763889
downvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/42108754
has comment: http://stackoverflow.com/comment/42110051
upvote count: 0
has title: javascript array values with double quotes
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/42109207
has comment: http://stackoverflow.com/comment/42108710
answer count: 3
linked to: http://stackoverflow.com/q/1144783

http://stackoverflow.com/a/26732051
accepted answer of: http://stackoverflow.com/q/26731732
answers question: http://stackoverflow.com/q/26731732
downvote count: 0
score: 1
type: AcceptedAnswer
has body: Try, $(function () { $('div').hide(); $('ul li ul').hide(); $('ul li').click(function () { $(this).siblings('li').children('ul').hide('slow'); var ul = $(this).children('ul'); if (!ul.filter(':visible').length &gt; 0) { ul.show('slow'); $($(this).find('a').attr('href')).show('slow').siblings('div').hide(); } }) }); DEMO
upvote count: 1
type: Answer

http://stackoverflow.com/q/26809865
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26810192
tagged with: angularjs
has body: I'm new to angular and would like to create a table with an unknown amount of columns. Additionally the table contains a second row of header columns, also with a different and unknown amount of columns. I have to use colspan in the second line, but don't know how. What would be a good way, maybe to create a directive? Or is there a simpler solution? For a better understanding I created: http://jsfiddle.net/uyLrjgyz/2/. I get all the data in JSON format like: { "header": { "columns": [ { "name": "0ColHeader", "subcolumns": [ { "name": "" } ] }, { "name": "1ColHeader", "subcolumns": [ { "name": "1Col1SubColHeader" }, { "name": "1Col2SubColHeader" }, { "name": "1Col3SubColHeader" } ] }, { "name": "2ColHeader", "subcolumns": [ { "name": "2Col1SubColHeader" } ] }, { "name": "3ColHeader", "subcolumns": [ { "name": "3Col1SubColHeader" }, { "name": "3Col2SubColHeader" } ] } ] }, "rows": { "data": [ [ { "value": "text" }, { "value": "0" }, { "value": "0" }, { "value": "1" }, { "value": "0" }, { "value": "1" }, { "value": "0" } ], [ { "value": "more text" }, { "value": "1" }, { "value": "0" }, { "value": "1" }, { "value": "1" }, { "value": "0" }, { "value": "1" } ] ] } } I can modify the json, as long as I don't have to convert it to much at the backend. This angularjs and template table is related to my problem, but it's a little bit skimped.
linked to: http://stackoverflow.com/q/12755881
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/26810192
type: Question
score: 5
upvote count: 5
tagged with: javascript
has title: Create a table with colspan and a dynamic amount of columns

http://stackoverflow.com/a/26827283
accepted answer of: http://stackoverflow.com/q/26827113
upvote count: 2
has comment: http://stackoverflow.com/comment/42240266
type: Answer
has body: You can use wrapAll() method as shown below: $(".header").each(function() { var $group = $(this).nextUntil(".break").addBack(); if (!$(this).closest(".group").length) $group.wrapAll(' '); }); .group { background: dodgerblue; } Test 0 Header 1 Test 1 Header 2 Test 2 Test 3 Break 1 Header 3 Test 4 Test 5 Header 4 Test 6 Break 2 Test 7 Header 5 Test 8 Reference: each() addBack() nextUntil() closest()
score: 2
has comment: http://stackoverflow.com/comment/42237614
has comment: http://stackoverflow.com/comment/42223254
answers question: http://stackoverflow.com/q/26827113
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/89087224
type: QuestionComment
type: Comment
has text: The blueimp/jQuery-File-Upload Wiki now has an entry on that: https://github.com/blueimp/jQuery-File-Upload/wiki/Multiple-File-Input-Fields-in-One-Form
comment on: http://stackoverflow.com/q/26822869
score: 0

http://stackoverflow.com/a/26802147
type: Answer
has body: Your problem can be easily found if you comment your code and go through every part, step by step. &lt;script type="text/javascript"&gt; //Declare a variable of the users choice var num = window.prompt("enter score"); //Declare counters var s, a; //Declare variable for holding number of times the loop has run var count=0; //Loop forever if num is greater than 0, since it is never changed while (num &gt; 0) { //Add n to s. (Where does n come from? - not defined) S is never initialized s += n; //Add one to count count++ } //Set a to be s / count a = s / count; //Write a to the document body document.write(a); &lt;/script&gt; Document.write will write over what is currently in the document body - effectivly removing your code. Do not ever use document.write() if you don't know what you're doing. You should also try to rewrite your code, since most of the lines could be removed by optimizing it further. EDIT: Op edited the code. &lt;script type="text/javascript"&gt; //Define and initialize a value input by the user var num = window.prompt("enter score") //Define sum (Not initialized) should be "var sum = 0;" var sum; //Define and initialize count var count=0; //For as long as num is larger than 0 (loop forever if num is bigger than 0) while (num &gt; 0){ //Add num to sum sum += num; //Add one to count count++; } &lt;/script&gt; I would suggest you to learn javascript further and go through your code line by line as I've done above.
downvote count: 0
has comment: http://stackoverflow.com/comment/42178278
has comment: http://stackoverflow.com/comment/42177617
accepted answer of: http://stackoverflow.com/q/26802049
score: 1
has comment: http://stackoverflow.com/comment/42178240
answers question: http://stackoverflow.com/q/26802049
has comment: http://stackoverflow.com/comment/42178053
has comment: http://stackoverflow.com/comment/42177923
has comment: http://stackoverflow.com/comment/42178999
has comment: http://stackoverflow.com/comment/42178488
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/42092187
type: Comment
has text: What do you mean "big zoom"?
score: 0
comment on: http://stackoverflow.com/a/26753913
type: AnswerComment

http://stackoverflow.com/q/26730296
type: AnsweredQuestion
type: Question
score: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26732250
has body: I want to reuse the views(previous opened screens) in the app, but the regions content disappear. How to prevent Marionette from doing this? var app = new Backbone.Marionette.Application(); window.app = app; app.addRegions({ root: 'body' }); var View1 = Marionette.LayoutView.extend({ template: _.template(' View1 '), regions: { sub: '.sub' } }); var View2 = Marionette.ItemView.extend({ template: _.template(' View2 ') }); var SubView = Marionette.ItemView.extend({ template: _.template(' SubView ') }); var view1 = new View1(); var view2 = new View2(); var subView = new SubView(); app.root.show(view1, { preventDestroy: true }); view1.sub.show(subView, { preventDestroy: true }); setTimeout(function() { app.root.show(view2, { preventDestroy: true }); setTimeout(function() { app.root.show(view1, { preventDestroy: true }); }, 500); }, 500); or the fiddle http://jsfiddle.net/ndr7262y/
tagged with: marionette
tagged with: backbone.js
has answer: http://stackoverflow.com/a/26732250
has title: Marionette doesn't render the sub-views when the parent is shown the second time

http://stackoverflow.com/q/26678990
downvote count: 0
favorite count: 0
tagged with: angularjs
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion
type: Question
has title: Force module to parse dom on filter return
has body: I have a filter returning an youtube embed that has a wrapper linked to a module. My issue is on filter return the module never gets applied to the returned html, wondering how I can force it to watch/recompile. Filter: angular .module( "filters" ) .filter( "youtubeFilter", [ "$filter", "$sce", function ( $filter, $sce ) { "use strict"; return function( message ) { var re = /https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube(?:-nocookie)?\.com\S*[^\w\s-])([\w-]{11})(?=[^\w-]|$)(?![?=&amp;+%\w.-]*(?:['"][^&lt;&gt;]*&gt;|&lt;\/a&gt;))[?=&amp;+%\w.-]*/ig; message = message.replace(re, "&lt;div fitvids&gt;&lt;iframe width='640' height='360' src='//www.youtube.com/embed/$1' frameborder='0' allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;"); // message = ""; return $sce.trustAsHtml( message ); } ; } ] ); Module: angular.module('fitVids', []).directive('fitVids', [function() { 'use strict'; if (!document.getElementById('fit-vids-style')) { var div = document.createElement('div'); var ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0]; var cssStyles = '&amp;shy;&lt;style&gt;.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}&lt;/style&gt;'; div.className = 'fit-vids-style'; div.id = 'fit-vids-style'; div.style.display = 'none'; div.innerHTML = cssStyles; ref.parentNode.insertBefore(div, ref); } return { restrict: 'A', link: function (scope, element, attr) { var selectors = [ "iframe[src*='player.vimeo.com']", "iframe[src*='youtube.com']", "iframe[src*='youtube-nocookie.com']", "iframe[src*='kickstarter.com'][src*='video.html']", "object", "embed" ]; var videos; if (attr.customSelector) { selectors.push(attr.customSelector); } videos = element[0].querySelectorAll(selectors.join(',')); angular.forEach(videos, function (item) { var $item = angular.element(item); var h…
tagged with: fitvids
tagged with: javascript

http://stackoverflow.com/a/26701932
has body: Try to use this: function addthisReady(evt) { // your jQuery code } addthis.addEventListener('addthis.ready', addthisReady); For more info look at http://support.addthis.com/customer/portal/articles/1365497-addthis-javascript-events EDIT: For the general purpose I can assume, that you can use event DOMSubtreeModified to execute your code, when widget will change HTML of widget's container, like that: var isChanged = false; $(".widget_container").bind("DOMSubtreeModified", function() { if (! isChanged) { isChanged = true; // your code } }); but it's better to use widget's built-in events, because DOMSubtreeModified is buggy in IE 9 (http://help.dottoro.com/ljrmcldi.php)
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41997690
accepted answer of: http://stackoverflow.com/q/26701883
has comment: http://stackoverflow.com/comment/41997778
answers question: http://stackoverflow.com/q/26701883
type: Answer
upvote count: 1

http://stackoverflow.com/q/26718330
has answer: http://stackoverflow.com/a/26718432
tagged with: javascript
has comment: http://stackoverflow.com/comment/42030786
tagged with: jquery
has comment: http://stackoverflow.com/comment/42027241
accepted answer: http://stackoverflow.com/a/26718432
score: 0
answer count: 1
has title: Enforce a max-height in CSS only when required
tagged with: css
type: AnsweredQuestion
type: Question
has body: I have pictures that I'm going to be displaying that are 400x300 that'll be scaled in a div accordingly (as low as 200x150). Now because of the various display sizes, I won't know ahead of time to what size the images will be scaled, however, I want to enforce the 4:3 ratio. Unfortunately in CSS there's no way to do something like this: max-height: width * 1.3, as far as I understand. I tried this in jQuery but the max-height attribute got set to 0: $(".image").attr('max-height', $(".image").width() * 1.3 + "px"); Is there anyway to accomplish this in pure CSS or jQuery?

http://stackoverflow.com/q/26785291
has answer: http://stackoverflow.com/a/26785351
accepted answer: http://stackoverflow.com/a/26785351
type: Question
has title: jQuery .data() returning value AND undefined
type: AnsweredQuestion
tagged with: javascript
score: 0
has body: // jQuery: $('.slidebutton').click(function(event) { var slide = $(this).data('slide'); slide = "#slide-"+slide; alert(slide); }); RECRUITING ONBOARDING PERFORMANCE LEARNING HRMS TALENT APPS The result is two alerts. The first is right, but the second is always #slide-undefined Where am I going wrong?
answer count: 1
tagged with: jquery

http://stackoverflow.com/q/26796442
score: 2
tagged with: js-beautify
downvote count: 0
has title: avoid line breaks in sublime text3 in short functions with js beautifier
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27474250
has body: I'm using Sublime Text 3 with the JavaScript Beautify Package. The code after beautifying looks like that: var jobDimension = ndx.dimension(function(d) { return d.status; }); But I want that it looks like that: var jobDimension = ndx.dimension(function(d) { return d.status; }); That are the available settings: { "indent_size": 4, "indent_char": " ", "indent_level": 0, "indent_with_tabs": false, "preserve_newlines": true, "max_preserve_newlines": 10, "jslint_happy": false, "space_after_anon_function": false, "brace_style": "collapse", "keep_array_indentation": false, "keep_function_indentation": false, "space_before_conditional": true, "break_chained_methods": false, "eval_code": false, "unescape_strings": false, "wrap_line_length": 0 } I tried different settings without success. Maybe you know how to achieve it with this package or an alternative.
accepted answer: http://stackoverflow.com/a/42864529
type: Question
upvote count: 2
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/42864529
favorite count: 0
possible better answer: http://stackoverflow.com/a/27474250
tagged with: sublimetext3

http://stackoverflow.com/a/26738851
has comment: http://stackoverflow.com/comment/42089807
has body: You have the right idea. You'll want to enqueue the scripts, but only if you're on a category archive page. Also, WordPress includes jQuery by default, so there's no reason to include your own. Keep in mind that this will mean you'll need to adhere to the noConflict mode wrappers. function enqueue_my_so_scripts() { if ( is_category() ) { wp_enqueue_script( 'script-name', get_template_directory_uri() . '/js/my_script.js', array('jquery')); } } add_action( 'wp_enqueue_scripts', 'enqueue_my_so_scripts' );
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/26738646
has comment: http://stackoverflow.com/comment/42089758
answers question: http://stackoverflow.com/q/26738646
upvote count: 1

http://stackoverflow.com/comment/42072784
has text: Just to be clear, that's not enough to validate an email address. This is not as easy a problem as it seems. http://www.regular-expressions.info/email.html
comment on: http://stackoverflow.com/a/26743560
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/a/26673968
score: 2
downvote count: 0
has body: You need to get the parent and then find the child : $(function () { $(".medtext").each(function(){ if($.trim($(this).text()) == '(Out of Stock)') { $(this).parent().parent().find(".price-new").css("color","red"); } }); });
upvote count: 2
answers question: http://stackoverflow.com/q/26673833
type: Answer

http://stackoverflow.com/comment/42094679
has text: If you want to allow graceful fall back for people without JavaScript, such a thing can be placed inside a `noscript` tag also, so it won't appear for browsers that never fire the `ready` event
comment on: http://stackoverflow.com/a/26756326
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26737340
has comment: http://stackoverflow.com/comment/42074807
has comment: http://stackoverflow.com/comment/42421913
has comment: http://stackoverflow.com/comment/42067704
has comment: http://stackoverflow.com/comment/42381606
has body: In SVG, everything displayed is a block defined by coordinates. In your case, every state is a block as well and therefore has an XPath which you will be able to use in your Selenium code. Use your browser developement tool to analyse the code of the page and find which block corresponds to the state you want to click on. Here is the element corresponding to California. &lt;path cs="100,100" d="M371.75,174.28l-1.09,4.03l-1.09,4.03l-1.09,4.03l-1.09,4.03l-1.09,4.03l-1.09,4.03l-1.09,4.03l-1.09,4.02l-1.09,4.03l-1.09,4.02l-1.09,4.02l-1.09,4.02l-1.09,4.02l-1.09,4.02l-1.09,4.02l-1.09,4.02l2.98,4.56l3,4.56l3.02,4.56l3.05,4.55l3.07,4.54l3.09,4.54l3.11,4.53l3.13,4.53l2.41,3.75l2.42,3.75l2.44,3.75l2.45,3.74l2.46,3.74l2.48,3.74l2.49,3.73l2.5,3.73l3.46,5.32l3.48,5.31l3.51,5.3l3.53,5.3l3.56,5.29l3.59,5.28l3.62,5.28l3.9,5.63l-0.39,1.82l0.45,2.66l1.95,5.06l0.13,1.14l0.03,0.03l-0.12,1.14l0.89,1.45l2.36,2.25l0.44,0.95l-0.01,0.07l-0.13,0.6l-0.83,0.59l-3.5,1.82l-2.02,1.65l-2.31,2.87l-0.28,2.66l-0.52,2.14l-0.76,1.62l-0.95,1.44l-1.15,1.26l-1.07,0.67l-0.98,0.09l-0.72,1.83l-0.46,3.58l0.59,2.36l1.64,1.14l0.86,1.39l0.08,1.64l-0.47,1.5l-1.03,1.37l-1.39,0.58l-2.61,-0.31l0,0l-0.11,0.19l-2.16,-0.21l-5.38,-0.65l-5.39,-0.67l-5.38,-0.69l-5.38,-0.7l-5.38,-0.72l-5.38,-0.74l-5.38,-0.76l-5.38,-0.77l-0.01,-0.15l0.44,-2.41l-0.65,-1.04l-1.22,0.26l0.24,-3.21l0.62,-1.39l0.21,-1.45l-0.19,-3.74l-1.69,-4.89l-4.56,-6.68l-2.53,-2.49l-1.78,-2.8l-1.32,-0.98l-1.81,-0.63l-0.79,0.87l-1.93,-1.21l0.94,-2.39l-1.17,-3.95l-1.57,-0.8l-4.25,-0.84l-5.11,-3.34l-1.36,-1.55l-0.04,-2.16l-2.15,-2.43l-2.98,-2.62l-2.02,-0.11l-2.43,-0.93l-3.22,-2.19l-2.03,-0.72l-4.14,-0.74l-1.44,-0.67l-0.97,-1.94l-1.29,-1.19l0.85,-1.82l0.29,-1.78l0.6,-1.28l0.15,-3.13l1.28,-2.58l-0.18,-1.11l-0.63,-0.99l-2.33,-1.86l-0.09,-1.53l0.98,-1.82l-0.33,-1.47l-1.82,-1.8l-1.25,-3.28l-2.13,-2.21l-0.34,-2.78l-1.13,-1.98l-0.15,-1.51l-2.06,-5.84l-2.58,-4.85l0.07,-2.34l0.73,-3.02l1.97,-1.4l1.24,-1.37l0.35,-1.49l0.09,-1.14l-0.71,-2.24l-4.53,-2.54L303,265.5l0.82,-3.6l-…
has comment: http://stackoverflow.com/comment/42183807
score: 12
has comment: http://stackoverflow.com/comment/42374548
has comment: http://stackoverflow.com/comment/42344320
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42408886
has comment: http://stackoverflow.com/comment/42399840
type: Answer
has comment: http://stackoverflow.com/comment/42304421
upvote count: 12
accepted answer of: http://stackoverflow.com/q/26722421
downvote count: 0
has comment: http://stackoverflow.com/comment/42301294
has comment: http://stackoverflow.com/comment/42065285
answers question: http://stackoverflow.com/q/26722421
has comment: http://stackoverflow.com/comment/42408540
has comment: http://stackoverflow.com/comment/42415573

http://stackoverflow.com/comment/42124882
comment on: http://stackoverflow.com/q/26771853
score: 0
type: Comment
type: QuestionComment
has text: I am using a JavaScript library called PageDown, it is what SO uses for it;s Markdown editor. The code in discussion is inside code that is triggered to run when the add image button is clicked which opens a Dialog window. In this dialog, simply selecting an image triggers it to start uploading right away though which is what led me to think that the posted `change` was the event originally. Not really important was just trying to understand it better as I am modifying it more to function more like StackOverflows image uploads from computer and from URL capabilities behave

http://stackoverflow.com/comment/41981965
type: QuestionComment
score: 0
has text: Use *i % numPages*. Then you will be able to use *i* variable infinitely.
comment on: http://stackoverflow.com/q/26693200
type: Comment

http://stackoverflow.com/comment/41951045
type: Comment
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/26675944
has text: ids should be unique...

http://stackoverflow.com/comment/41950374
type: QuestionComment
comment on: http://stackoverflow.com/q/26675389
has text: I changed the id in the selector to #nav, and it I still get the same error. And I definitely have the #nav in my CSS style.
score: 0
type: Comment

http://stackoverflow.com/comment/42100918
type: AnswerComment
comment on: http://stackoverflow.com/a/26759328
score: 0
type: Comment
has text: Thank you popovitsj, while this also worked I chose TrueBlue's answer as it highlighted other areas where I was going wrong. Nevertheless, great answer!

http://stackoverflow.com/a/26814111
type: Answer
has comment: http://stackoverflow.com/comment/42199861
has comment: http://stackoverflow.com/comment/42199920
score: 0
has body: The problem is you are using the background-image property like the background shorthand property. The shorthand is background with the url and repeat properties like this background: url('../images/phone/1x/healthCareBar_icon.png') no-repeat; so your jquery would be $(".healthCare_heading span").attr("style", "background: url('../images/phone/1x/healthCareBar_icon.png') no-repeat;margin-left: 0;background-size: 25px 25px;width: 30px;height: 30px;background-position: center;background-color: rgba(16,138,177,0.6);"); You may want to consider applying these styles with a css class selector and the jQuery .addClass() method, rather than changing the style property.
answers question: http://stackoverflow.com/q/26813365

http://stackoverflow.com/a/26806294
upvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/26749781
score: 3
downvote count: 0
has body: jQuery .remove and .append internally uses .removeChild and .appendChild methods to remove/insert the child elements. Theory: removeChild/appendChild maintains the attributes but doesn't maintain the element's property (maintaining the selection state) When you use removeChild and then appendChild to add the options back, the attributes are maintained, but the property of the element are not maintained. You can read more about .prop() vs .attr() here. In summary, attributes are initial values defined in the HTML that are parsed to set as properties to the Element by the browser, however setting the attributes doesn't guarantee setting the property. $(function() { var categoryDD = document.getElementById('category'); var removedOptions = remove.call(categoryDD.options); add.call(categoryDD, removedOptions); }); function add(options) { //add all options for (var i = 0; i < options.length; i++) { this.appendChild(options[i]); } } function remove() { //removes all options var el, returnOpt = []; while (this.length) { el = this[0]; returnOpt.push(el.parentNode.removeChild(el)); } return returnOpt; } Categroy 1 Categroy 2 Categroy 3 Categroy 4 Categroy 5 Categroy 6 Testing Results: On testing the above snippet, IE 10 and FF yielded me the same result which is selecting the last option from the drop down, however chrome seems to be bugged as it always selected the next option from the original selection. The results from IE 10 and FF made a little sense as to "Not maintaining the state", however Chrome behavior seems like a bug. Above is my theory based on my test case, however I couldn't find a legit reference that states the same. Anyways, tryout below solutions for a consistent output. Solution 1: Remove only options that are NOT equal to parentId. $('#sub-category option').filter(function () { return $(this).data('parentid').toString() !== $('#category').val().toString(); }).remove(); Categroy 1 Categroy 2 Categroy 3 Car1 Car2 Car3 Car4 Car5 Car6 Car7 Car8 Car9 Car10 C…

http://stackoverflow.com/comment/42268340
comment on: http://stackoverflow.com/a/26771976
score: 0
has text: Works with problems EDIT 2. By clicking on link3 opens slide 2, when clicking on the link 1 - slider does not always work
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26679501
has comment: http://stackoverflow.com/comment/41958119
has answer: http://stackoverflow.com/a/26679645
answer count: 4
type: AnsweredQuestion
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41958100
has answer: http://stackoverflow.com/a/38365465
type: Question
has body: so I've googled, searched here, went everywhere, and I can't find an answer. I'm using jQuery UI autocomplete to search a list of item ids numbers. They can be any length from 1 - 99999. The Issue: When I type '2' for example, nothing happens, then I hit backspace and type '2' again and this time, anything starting with 2 appears below, and the event shows up in the "Network List" on developer's tools. Furthermore, when I search 1, only 1 shows up, but it's not performing the search it's just spitting back the input value. but when i hit backspace and type in 1 again, the search fires and I get the same results as I did with 2. Normally no matter what number I type it should just fire by default shouldn't it? How do I correct this and get my autocomplete working properly. CODE: $('.item-inventory').on('keyup', '#item_num', function(){ //var search = $(this); var itemname; var itemprice; var itemdesc; $(this).autocomplete({ delay : 100, source: function(request, response){ $.ajax({ url: '../assets/server/orders/item_search.php', dataType: 'JSON', data: {search: request.term}, success: function (data){ var keys = data.search; // $('#item-name').val(data.search[0].item); // itemPrice = data.search[0].price; // itemDesc = data.search[0].desc; response($.map( keys, function(i){ return{ label : i.id }; })); } }); }, minLength : 1 }); //$('#item-search-results').removeClass('hidden'); $(this).on('autocompleteselect', function(event, ui){ $('#item-search-results').removeClass('hidden'); }); });
accepted answer: http://stackoverflow.com/a/26679645
has answer: http://stackoverflow.com/a/40925013
tagged with: autocomplete
has comment: http://stackoverflow.com/comment/41957952
tagged with: javascript
has answer: http://stackoverflow.com/a/65419828
possible better answer: http://stackoverflow.com/a/38365465
has comment: http://stackoverflow.com/comment/41957893
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/41957932
favorite count: 0
has title: Autocomplete not firing on first input

http://stackoverflow.com/comment/42135515
comment on: http://stackoverflow.com/a/26778777
has text: `checking equality will give misleading results`. Are you sure about that? Is your example (`if result`) testing equality (vs *truthfulness*)? Otherwise, nice overview
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/96430033
score: 0
type: Comment
has text: So how exactly do I modularize the JavaCC grammar (.jj-file) into several files?
comment on: http://stackoverflow.com/a/54823246
type: AnswerComment

http://stackoverflow.com/a/26805779
upvote count: 2
type: Answer
downvote count: 0
score: 2
has body: change css to and should be declared at the after the default css td.red-cell { background: #F00; /* Or some other color */ }
answers question: http://stackoverflow.com/q/26805726

http://stackoverflow.com/q/26743083
type: Question
has body: I can get text from the textarea with my current code. But I want to get it when the textarea contained in an iframe, is that possible? My current code is Click me to show text I tried editing that code like the code below but it didn't work Click me to show text You can see my demo at here http://check0909.vv.si/ Thank you in advance for any help!
tagged with: javascript
tagged with: jquery
has title: Get textarea value inside iframe
tagged with: textarea
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26743343
tagged with: iframe
accepted answer: http://stackoverflow.com/a/26743343
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/comment/41981171
type: AnswerComment
has text: There's a stray Double Quote, and i appreciate that this probably isn't the best way to go about it, (i've been doing JS/webdev for about 3 weeks now) but this doesn't fix it.
type: Comment
comment on: http://stackoverflow.com/a/26692755
score: 0

http://stackoverflow.com/a/26804737
answers question: http://stackoverflow.com/q/26786233
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/77074776
upvote count: 0
score: -1
has body: You should use an Angular.js wrapper for this. Check out ngCordova.

http://stackoverflow.com/a/26699851
score: 2
has body: As Amir said, success is spelled wrong. But I'm adding three things that will help you further. Since you are POSTing data, you need to add the form data to the data property when passing your options to the ajax function. Also, it's common practice to add the error callback as well. Finally - you should call preventDefault on the event so that the page doesn't reload. $('form').submit(function(e){ e.preventDefault(); $.ajax({ url:'/results', dataType: 'json', data: $(this).serialize(), type: 'post', cache: false, success: function(data){ $(data).each(function(index,value){ console.log(value); }); }, error: function(xhr){ console.log(xhr.responseText); } }); });
downvote count: 0
answers question: http://stackoverflow.com/q/26699694
has comment: http://stackoverflow.com/comment/41993499
accepted answer of: http://stackoverflow.com/q/26699694
has comment: http://stackoverflow.com/comment/41997998
has comment: http://stackoverflow.com/comment/41994344
has comment: http://stackoverflow.com/comment/41994244
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41993429
type: Answer
has comment: http://stackoverflow.com/comment/41994153

http://stackoverflow.com/a/26686260
score: 1
upvote count: 1
has body: I think there may be some confusion between the listItem in ng-model="listItem" and ng-repeat="listItem in itemArray". Try changing the second one to a different variable name like this: {{ item }} X Also, change that first line in your controller $scope.listItem; to $scope.listItem = '';.
answers question: http://stackoverflow.com/q/26686012
type: Answer
downvote count: 0

http://stackoverflow.com/a/26694096
has comment: http://stackoverflow.com/comment/41990931
score: 0
answers question: http://stackoverflow.com/q/26691364
has comment: http://stackoverflow.com/comment/41991102
type: Answer
has body: From what I see, there is absolutely no need to use JS on the page you're calling with AJAX. All of that stuff can be rendered by PHP only, and that's the way you should do it. Even if it wasn't, running JS code from an AJAX response can be quite unsafe and challenging. You would have to separate the JS code (maybe in a JSON variable) and then run eval() on it... Again, very very unsafe, and not recommended. If you still want to use JS after the AJAX call, define the function on the main page, and pass it just the arguments you get from the AJAX call. Something like this: function autoRefresh_div() { $.get("refreshpage.php", function(res){ var content = res.htmlContent; // say this is the content for the div var jsParam = res.jsParam; // and this is the JS parameter(s) $("#refreshdiv").html(content); handleAjax(jsParam); }); } function handleAjax(params) { /// do stuff here }

http://stackoverflow.com/q/26754651
type: AnsweredQuestion
has title: Angular way of getting and setting an elements height
has answer: http://stackoverflow.com/a/26754987
type: Question
upvote count: 4
downvote count: 0
tagged with: javascript
score: 4
accepted answer: http://stackoverflow.com/a/26754987
has body: I looked at this thread on the Angular way of getting an elements height, but as an angular newbie, I need a little help converting my own js to proper angular. app.js var AppModule = angular.module('App', ['ngAnimate', 'ngRoute']); AppModule.config(function($routeProvider) { $routeProvider .when('/page:pageNumber', { templateUrl: function ($routeParams) { return '/app/..../assets/html/page' + $routeParams.pageNumber + '.php'; }, controller: "PageCtrl" }) .otherwise({ redirectTo: "/page1" }); }); controller.js AppModule.controller("ViewCtrl", function($scope, $timeout) { $scope.$on("$routeChangeSuccess", function(event, current, previous) { $timeout(function() { $scope.animationStyle = "slideRight"; height = document.getElementById('page' + $routeParams.pageNumber).offsetHeight; document.getElementById('document').setAttribute("style","height:" + height + "px"); document.getElementById('document').style.height='"' + height + 'px"'; }); }); }); Firstly, I don't know how to call $routeParams to get pagenumber. I tried injecting $routeProvider into the controller but this didn't help. It doesn't seem to be in $scope either. Secondly, I don't know if I should put the code for DOM manipulation in the controller. I just stuck it there to try and get it working (which it does for one page if I substitute height = document.getElementById('page' + $routeParams.pageNumber) with height = document.getElementById('page2')
answer count: 1
favorite count: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/21895732

http://stackoverflow.com/comment/42198843
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26813389
has text: You should show what you've tried. If you've not tried anything, you should make an attempt to implement what you need. As it stands, we don't know if you don't know how to create a function, how to return a value, or how to get a value from an object. Your question doesn't have a clear problem statement.
score: 0

http://stackoverflow.com/comment/42003689
type: QuestionComment
has text: P.S. It is considered better practice to write `setInterval(increase, 400)` as opposed to `setInterval("increase()", 400)`.
comment on: http://stackoverflow.com/q/26705383
score: 0
type: Comment

http://stackoverflow.com/comment/42125466
type: AnswerComment
comment on: http://stackoverflow.com/a/26772714
score: 0
type: Comment
has text: I just answered my own question with the custom constructors. I'm still curious how the (!!val) works though.

http://stackoverflow.com/comment/42018342
has text: I don't know about you, but I'd be extremely annoyed if an alert box popped up just because my finger slipped.
comment on: http://stackoverflow.com/a/26713899
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26807417
downvote count: 0
has comment: http://stackoverflow.com/comment/53490554
has body: How do I secure my Channel Groups and Namespaces? Read more about PubNub JavaScript Stream Controller documentation. Grant access to manage Channel Group pubnub.grant({ channel_group : "90c977bbc169b12054706b0de07dd9f2", auth_key : "SUPER_SECRET", channel : channel, read : true, write : true, manage : true, // &lt;-- Manage Permission TRUE callback : success, error : errorback });
accepted answer of: http://stackoverflow.com/q/26782475
has comment: http://stackoverflow.com/comment/53506503
upvote count: 3
answers question: http://stackoverflow.com/q/26782475
type: AcceptedAnswer
type: Answer
score: 3

http://stackoverflow.com/q/26717894
has body: I'm retrieving a web page with OpenURI: require 'open-uri' page = open('http://www.example.com').read.scrub Now I'd like to parse the values of the attributes playerurl, playerdata and pageurl of the retrieved page. They appear in a &lt;script&gt; tag: &lt;script&gt; .. .. PlayerWatchdog.init({ 'playerurl': 'http://cdn.static.de/now/player.swf?ts=2011354353', 'playerdata': 'http://www.example.com/player', 'pageurl': 'http://www.example.com?test=2', }); .. .. &lt;/script&gt; What's the smartest way to accomplish this?
tagged with: regex
tagged with: open-uri
accepted answer: http://stackoverflow.com/a/26719643
tagged with: ruby
possible better answer: http://stackoverflow.com/a/26720412
tagged with: ruby-2.1
has answer: http://stackoverflow.com/a/26719643
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26720412
has title: Parse data from JavaScript of retrieved page
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42027849
tagged with: javascript
has comment: http://stackoverflow.com/comment/42028421
score: 0

http://stackoverflow.com/a/26747876
upvote count: 2
has body: You can use the following: $(document).ready(function() { $('form.pagination').attr('action', function() { return this.action.replace(/https:/i, 'http:'); }); }); function out( sel ) { $('.pagination').each(function() { $(sel).append( this.action + '\n' ); }); } $(document).ready(function() { out('.before'); $('form.pagination').attr('action', function() { return this.action.replace(/https:/i, 'http:'); }); out('.after'); }); ... ... ... BEFORE AFTER
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26747801
has comment: http://stackoverflow.com/comment/42080474

http://stackoverflow.com/a/26727747
has comment: http://stackoverflow.com/comment/42044000
downvote count: 1
answers question: http://stackoverflow.com/q/26727677
has comment: http://stackoverflow.com/comment/42079350
upvote count: 0
has comment: http://stackoverflow.com/comment/42044120
has body: Just add position:fixed; to the necessary elements in the CSS. So the CSS should look something like: .inside { top: 2px; border: 1px solid #000; background-color: #000; color: #FFF; height:50px; position:fixed; } .inside2 { bottom: 2px; border: 1px solid #000; background-color: #000; color: #FFF; height:50px; position:fixed; } Further read Updated fiddle to reflect the same.
score: -1
type: Answer

http://stackoverflow.com/comment/42178526
type: Comment
type: QuestionComment
has text: yea, but in the success callback, you try to call it using poll();
comment on: http://stackoverflow.com/q/26802288
score: 0

http://stackoverflow.com/q/26782531
accepted answer: http://stackoverflow.com/a/26782579
favorite count: 0
has comment: http://stackoverflow.com/comment/42142393
has comment: http://stackoverflow.com/comment/42142313
score: 0
has comment: http://stackoverflow.com/comment/42142335
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26782624
has comment: http://stackoverflow.com/comment/42142209
has title: Why plain strings are considered bug free?
has body: In the code if I have the following line of code doesn't throw an error: 'any string' console.log('test'); Obviously this throws: 'any string' console.log('test'); // missing ; But not this: 'any string'; console.log('test'); I mean the 'any string' has nothing to do in the script but it is considered bug free, why?
possible better answer: http://stackoverflow.com/a/26782624
answer count: 3
has answer: http://stackoverflow.com/a/26782721
tagged with: javascript
has answer: http://stackoverflow.com/a/26782579

http://stackoverflow.com/comment/42132033
type: QuestionComment
comment on: http://stackoverflow.com/q/26776721
has text: I don't see any use of `selectSingleNode` in your sample so if `selectSingleNode` is the problem you face then show a sample with that, explaining in detail the result you expect and how the one you get differs. Or at least explain for the samples posted what is the problem, i.e. which result you expect and how the result you get differs. Do you get any error? Are you using IE? Otherwise the whole approach with msxsl:script is not supported at all.
score: 0
type: Comment

http://stackoverflow.com/q/26775407
type: AnsweredQuestion
has title: Jquery remote completion, li's are not selectable
has comment: http://stackoverflow.com/comment/42131494
tagged with: jquery-mobile
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26777056
has comment: http://stackoverflow.com/comment/42130628
has comment: http://stackoverflow.com/comment/42130975
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42130790
tagged with: jquery
has answer: http://stackoverflow.com/a/26777056
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/42131525
has comment: http://stackoverflow.com/comment/42129943
has body: I'm trying to create a text input with text completion using a remote host. I've been trying to use the example in the following URL: http://demos.jquerymobile.com/1.4.0/listview-autocomplete-remote/ this is the javascript code from the example: $( document ).on( "pageinit", "#myPage", function() { $( "#autocomplete" ).on( "filterablebeforefilter", function ( e, data ) { var $ul = $( this ), $input = $( data.input ), value = $input.val(), html = ""; $ul.html( "" ); if ( value && value.length > 2 ) { $ul.html( " " ); $ul.listview( "refresh" ); $.ajax({ url: "http://gd.geobytes.com/AutoCompleteCity", dataType: "jsonp", crossDomain: true, data: { q: $input.val() } }) .then( function ( response ) { $.each( response, function ( i, val ) { html += " " + val + " "; }); $ul.html( html ); $ul.listview( "refresh" ); $ul.trigger( "updatelayout"); }); } }); }); so first of all I changed dataType from jsonp to json which makes the ajax call return a proper json object and the unordered list is filled properly. the problem that I encounter is that once I see the text completion (the li elements), I can't select any of the elements. I tried browsing this example on my Galaxy Note 2 and I encountered the same problem, the elements are not selectable. any ideas how to resolve the issue? thanks update as to @Omar comment i changed the following line: html += " " + val + " "; to html += " " + val + " "; now i can click on an item but it doesn't do anything. it supposed to close the list and add to the text field the selected item.
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42132308
type: Question

http://stackoverflow.com/comment/41980695
comment on: http://stackoverflow.com/q/26691364
has text: @Shomz here it is & AJAX has been removed thanks to you
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26787584
score: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26787675
answer count: 1
favorite count: 0
has title: Download URL can only pass 1 php variable to attributes for google maps markers?
upvote count: 2
tagged with: php
accepted answer: http://stackoverflow.com/a/26787675
type: AnsweredQuestion
type: Question
has body: I am a bit of a newbie when it comes to this sort of stuff, however I am struggling to pass some variables. Info: I have posted 2 values (using JQuery) from 2 drop down boxes from a HTML page year and month. I pass it to a PHP page to modify an SQL query which seems to be ok. Problem is when I download the PHP page via Download URL only the first value out of the 2 seems to be manipulating the attributes data for the markers. Any suggestions are appreciated. downloadUrl("city_markers2.php?yearID="+yearID+"city_markers2.php?monthID="+monthID, function(data) { var xml = data.responseXML; var markers = xml.documentElement.getElementsByTagName("marker"); var iconBase = 'http://www.google.com/mapfiles/'; for (var i = 0; i &lt; markercount.length; i++) { markercount[i].setMap(null); }
tagged with: google-maps

http://stackoverflow.com/q/26681611
tagged with: ruby-on-rails
type: Question
has comment: http://stackoverflow.com/comment/41962546
has body: I have the following code in a regular index.html Template At the end of the index.html, I want to incorporate the jquery javascript and the jquery-backstretch.min file into my rails application. Is there a standard rails way of doing this? I've tried to inject the following into a rails new.html.erb <%= javascript_include_tag '../assets/javascripts/jquery.js', 'data-turbolinks-track' => true %> <%= javascript_include_tag '../assets/javascripts/jquery.backstretch.min.js"', 'data-turbolinks-track' => true %> and but unfortunately both of them appears to be wrong. What should I do? EDIT: I've added the modified files to my application.js so now it looks like this //= require jquery //= require jquery_ujs //= require jquery.backstretch.min //= require turbolinks //= require_tree . and I've since then removed the corresponding script tags from new.html.erb. Now, at the bottom, it only contains the script call but unfortunately that is still incorrect
has title: converting regular javascript implementation to ruby on rails javascript implementation
score: 0
tagged with: ruby-on-rails-4
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27738793
has comment: http://stackoverflow.com/comment/41969704
tagged with: asset-pipeline
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41973555

http://stackoverflow.com/q/26812630
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42199180
has title: Why are controllers singletons in Ember?
tagged with: ember.js
has body: I'm hoping someone can clear this up for our team. Why exactly are controllers singletons which don't get reset on navigation? In what situations is it better for them to not reset every time. I've heard "Controllers as singletons make perfect sense in any long-lived application" but non ember devs I've talked to were equally confused by this. Is this a design flaw that is being improved in the future or are we just looking at things the wrong way? Hoping for a really clear answer I can take back to the team. Thanks everyone!
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/26552159
tagged with: ember-data
has answer: http://stackoverflow.com/a/26813284
type: Question
answer count: 1

http://stackoverflow.com/comment/42208413
score: 1
comment on: http://stackoverflow.com/a/26819306
has text: Why are you adding/removing class `menu-icon`..?
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42036134
score: 0
type: QuestionComment
has text: Why not use DAT.GUI?
comment on: http://stackoverflow.com/q/26723170
type: Comment

http://stackoverflow.com/comment/42178288
comment on: http://stackoverflow.com/q/26802515
score: 0
type: Comment
type: QuestionComment
has text: Is this an Angular app?

http://stackoverflow.com/comment/42436471
type: QuestionComment
comment on: http://stackoverflow.com/q/26811488
score: 0
type: Comment
has text: damn it, same issue here!!

http://stackoverflow.com/a/26805782
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26805726
has comment: http://stackoverflow.com/comment/42184661
answers question: http://stackoverflow.com/q/26805726
score: 5
has comment: http://stackoverflow.com/comment/42184633
type: AcceptedAnswer
upvote count: 5
has body: Your selector .tk099 td takes presidence over .red-cell because: It is more specific It is declared later than .red-cell (and CSS cascades) Declare .red-cell later on and make it just as specific/more specific: .tk099 td { background-color:#EEEEEE; text-align:center; border-bottom:1px solid #CCC; border-left:1px solid #CCC; } td.red-cell { background: #F00; /* Or some other color */ } JSFiddle

http://stackoverflow.com/comment/42156039
score: 1
has text: along with @Brennan's answer, `if (day = 1)` will assign 1 to day, not test it for equality
comment on: http://stackoverflow.com/q/26789876
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26683167
answers question: http://stackoverflow.com/q/26683083
score: 0
has body: First get the hash from the url with window.location.hash. That value will have a # prepended to it. Then you can use it directly as a jquery selector. var hash = window.location.hash; if(hash != '') { $(hash).modal(); }
type: Answer

http://stackoverflow.com/a/33892757
upvote count: 0
answers question: http://stackoverflow.com/q/26787001
score: -1
has body: In my case this was caused by a missing directory portal, which I detected by comparing the backups with the production application. Introducing a new folder solved the problem.
type: Answer
has comment: http://stackoverflow.com/comment/55548940
downvote count: 1

http://stackoverflow.com/comment/42040680
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26725628
score: 1
has text: Your code is what is at question here, but you haven't provided it. We can't diagnose nothing.

http://stackoverflow.com/a/26744351
has comment: http://stackoverflow.com/comment/42164622
downvote count: 0
answers question: http://stackoverflow.com/q/26735267
has comment: http://stackoverflow.com/comment/42130329
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42093261
has comment: http://stackoverflow.com/comment/42130553
has body: Based on your given query, I assume the UUID generated looks to be different on each loop : 1000 loops, 3 queries with 3 different node labels. Can you count distinct uuids you get from your database, like : MATCH (n) RETURN count(DISTINCT n.id)
has comment: http://stackoverflow.com/comment/42102460
type: Answer

http://stackoverflow.com/q/26830901
type: Question
has title: angularjs 1.3 javascript animation works on ng-repeat but not ng-if
tagged with: angular-ng-if
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/26853331
tagged with: javascript
has body: I'm trying to emulate some standard js code (with jQuery) in angularJS, for practice mostly, but I am pleased with how much simpler the angularJS code is. However, I have a problem with an animation: angular.module('app').animation('.slideDown', function() { return { enter: function (element, done) { jQuery(element).slideDown(2500); } } }); When I apply this to an ng-repeat-start the animation works just fine and the element reveals by sliding into view from the top: [content...] However, when I apply it to an ng-if (within the ng-repeat-end) the element doesn't reveal itself at all. If I take out the "display: none;" the element appears on the page (with no presentational flare): [content...] Please can someone tell me why the angularJS javascript animation works in the ng-repeat-start, but not on the ng-if? btw - inline style is used here simply to demonstrate the problem; I don't use inline styles in dev, let alone production!
favorite count: 0
tagged with: ng-animate
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26853331
upvote count: 1
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/42076074
comment on: http://stackoverflow.com/q/26736525
score: 0
type: Comment
type: QuestionComment
has text: Ok then how do I run the python code using a server like apache

http://stackoverflow.com/comment/94115512
comment on: http://stackoverflow.com/a/26757354
score: 0
type: AnswerComment
has text: the above code works! but i dont understand why its not gone in infinite loop? when we try to submit the form after 2 sec in setTimeout() method, it should call the same submit handler and return false immediately and set the timer again...
type: Comment

http://stackoverflow.com/comment/42184969
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26738058
has text: I asked the question in another post. Here is the answer : http://stackoverflow.com/questions/26777699/need-explanation-on-a-angular-direcive-load/26777902?noredirect=1#comment42135311_26777902
score: 1

http://stackoverflow.com/comment/42075784
comment on: http://stackoverflow.com/q/26745092
score: 0
type: QuestionComment
type: Comment
has text: hmm.. is your XHR object sync or async?..

http://stackoverflow.com/a/26755985
score: 3
downvote count: 0
has body: You can use min/max or use tickPositions
upvote count: 3
answers question: http://stackoverflow.com/q/26750597
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26750597
type: Answer

http://stackoverflow.com/comment/42182434
score: 0
comment on: http://stackoverflow.com/q/26804403
has text: How could it affect it when I remove it then? I have other pages almost identical without this issue.. Also the page initially loads fine and about 0.2 seconds after load the font switches to bold.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26752117
answer count: 1
favorite count: 0
has title: how can I show my loading icon after my ajax is finished
accepted answer: http://stackoverflow.com/a/26752143
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26752143
type: Question
has comment: http://stackoverflow.com/comment/42087667
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
has body: I have a simple javascript function like so: function showHint() { var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) { //extract data here } } xmlhttp.open("GET", "articles.php?q=" + cat + "&amp;year1=" + start_year + "&amp;year2=" + end_year, true); xmlhttp.send(); } I want to be able to show my loading icon after the ajax finishes. I show my loading icon at the very beginning of my js by using: $.mobile.loading("show"); which shows the icon nicely (using jquery mobile). However, I need to only hide the icon after the ajax is completely finished. I've attempted to use a .done() in jQuery like this but I don't think I'm using it properly: xmlhttp.onreadystatechange.done(function(){ $.mobile.loading("hide"); });
tagged with: ajax
upvote count: 1

http://stackoverflow.com/q/26788062
has title: Perform action after loading page with delay
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26788144
tagged with: javascript
has body: I want to show a div but it has to show when the page is fully loaded, and then it has to wait 3 seconds. So: Load page... Page loaded... Wait 3 seconds... Perform action. How do I do this? This is currently my code: jQuery(window).load(function () { $("#logoResize").attr('style', '-webkit-transform:scale(1.25); -moz-transform:scale(1.25); -ms-transform:scale(1.25); -o-transform:scale(1.25); transform:scale(1.25);'); });
type: Question
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26788144

http://stackoverflow.com/q/26746089
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/26746223
type: Question
has answer: http://stackoverflow.com/a/26746201
tagged with: jquery-plugins
answer count: 3
tagged with: google-maps
has answer: http://stackoverflow.com/a/26748415
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
has title: Js:Calling a function on click
has body: I use Maplace.js, A Google Maps Javascript plugin for jQuery. In a plugin has a function that will display the marker on the map. //triggers to show a location in map Maplace.prototype.ViewOnMap = function (index) { //view all if (index === this.view_all_key) { this.o.beforeViewAll(); this.current_index = index; if (this.o.locations.length > 0 && this.o.generate_controls && this.current_control && this.current_control.activateCurrent) { this.current_control.activateCurrent.apply(this, [index]); } this.oMap.fitBounds(this.oBounds); this.CloseInfoWindow(); this.o.afterViewAll(); //specific location } else { index = parseInt(index, 10); if (typeof (index - 0) === 'number' && index > 0 && index <= this.ln) { try { google.maps.event.trigger(this.markers[index - 1], 'click'); } catch (err) { this.debug('ViewOnMap::trigger', err.stack); } } } return this; }; I try to call this method but to no avail: Link how can I call from a link with key?

http://stackoverflow.com/a/26718104
downvote count: 0
answers question: http://stackoverflow.com/q/26718035
accepted answer of: http://stackoverflow.com/q/26718035
type: Answer
upvote count: 2
has body: the problem is that you are missing one ")" try while (($imgPath = readdir($handle)) !== false) if ( in_array( strtolower(pathinfo($imgPath, PATHINFO_EXTENSION)), $allowed_types )) echo ' &lt;img src="', $imageDir, '/', $imagePath, '" alt="slide" /&gt;'; closedir($handle); )) echo ' first is from in_array() second from if() Hope this helps! :D
score: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/42227173
has text: i am not home yet to test it out, i will take your answer once i tried it out! THanks a lot TJ
type: AnswerComment
comment on: http://stackoverflow.com/a/26820242
score: 0
type: Comment

http://stackoverflow.com/a/26798360
answers question: http://stackoverflow.com/q/26732823
upvote count: 3
downvote count: 0
has body: The issue is that the SplitContainer by default uses 100% height, but its parent, the View, has no defined height (it adapts to its content), so there's the typical CSS height shortcut where the height collapses to zero. On top of that, the SplitContainer hides any overflowing content, so the Button (and the rest) is not visible, even though it exists. Any solution needs to make sure the View has a defined height. A trivial solution would be to assign an absolute height (e.g. in pixels), a better one may set 100% height, but then all parent heights also need to be set to 100% (or an absolute value), so the CSS html, body, #content { height: 100%; margin: 0; // body has usually a margin in browsers } is required to make 100% height for the View work. Hint: displayBlock="true" should be set on the View in those 100% height cases, otherwise the default display (inline-block) adds 4 or 5 pixels below the baseline which cause a scrollbar.
type: Answer
score: 3

http://stackoverflow.com/a/26772376
upvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26772305
has body: Both your dropdown are calling the same function, change the function name and it will fix your issue. e.g. function showText() { .... &lt;select id="options" onchange="showText()"&gt; .... function showText2() { .... &lt;select id="options2" onchange="showText2()"&gt; ....
downvote count: 1
score: -1

http://stackoverflow.com/comment/42378544
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26843547
has text: If you would like your .Net code to do more of the work, you could change your AjaxEnginePage to generate the markup. That way, all your javascript would need to do is a simple replace. It also means that all your markup is generated and served from the server.
score: 0

http://stackoverflow.com/a/26719736
type: Answer
has body: Just call the openWin() function in a script tag at the bottom of your html page. Don't associate it with a click or other event, just call the function. The script will run when the page loads, calling the function, which will open a new window on browsers that don't have that turned off. Possibly, that will then annoy your users and they will go away.
answers question: http://stackoverflow.com/q/26719558
score: 0

http://stackoverflow.com/q/26736578
upvote count: 3
tagged with: transition
type: Question
has answer: http://stackoverflow.com/a/26737069
tagged with: javascript
tagged with: background-color
answer count: 3
tagged with: http://stackoverflow.com/tag/html
score: 1
tagged with: css
has answer: http://stackoverflow.com/a/26736600
favorite count: 0
has answer: http://stackoverflow.com/a/42148730
accepted answer: http://stackoverflow.com/a/26737069
downvote count: 2
possible better answer: http://stackoverflow.com/a/26736600
has body: How can I change the HTML background color automatically every 2 seconds? HTML5 with CSS3 fade in or fadeout? I tried to use transition with timer and CSS target without any success input[type=checkbox] { position: absolute; top: -9999px; left: -9999px; } label { display: block; background: #08C; padding: 5px; border: 1px solid rgba(0,0,0,.1); border-radius: 2px; color: white; font-weight: bold; } input[type=checkbox]:checked ~ .to-be-changed { color: red; }
type: AnsweredQuestion
has title: javascript css3 change background color every 2 seconds

http://stackoverflow.com/comment/42034389
score: 0
type: Comment
type: QuestionComment
has text: @sln I do not want to make this kind of thing. As zzzzBov said, it is not usefull to manually have to write down ALL the information. The length() could be a good work arround. Thx for the link.
comment on: http://stackoverflow.com/q/26721818

http://stackoverflow.com/comment/42179803
score: 0
comment on: http://stackoverflow.com/q/26802823
has text: have you tried with -moz in css for firefox
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26691364
downvote count: 1
type: Question
has title: refresh javascript after jquery request
has comment: http://stackoverflow.com/comment/41980435
score: 0
has body: I'm trying to refresh a using jQuery to call a PHP script that includes javascript. After refresh the page is loaded but javascript isn't executed. My problem is that I do not use javascript function but simply code. I know I have to use .on() or .live() but don't know how. The page I'm trying to call: require 'connexion.php'; $statement = $connexion->prepare("SELECT * FROM table"); $statement->execute(); echo " "; // generating content if (isset($statement)) { while($data = $statement->fetch()) { ?> <?php if ($data['user'] == 'user1') { echo " ".'Le '.$data['date'].' '.$data['user'].' à dit:'.' '."\n" ; ?> <?php echo " "."\n" ; } else { echo " ".'Le '.$data['date'].' '.$data['user'].' à dit:'.' '."\n" ; ?> <?php echo " "."\n" ; } } } echo ' '; ?> the main page:
has comment: http://stackoverflow.com/comment/41980336
has comment: http://stackoverflow.com/comment/41979881
has comment: http://stackoverflow.com/comment/41983430
answer count: 1
has answer: http://stackoverflow.com/a/26694096
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41980500
has comment: http://stackoverflow.com/comment/41979055
has comment: http://stackoverflow.com/comment/41979899
has comment: http://stackoverflow.com/comment/41980695
has comment: http://stackoverflow.com/comment/41982198
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41979022
upvote count: 1
tagged with: php

http://stackoverflow.com/q/26785694
has body: I have an issue in my recent implemented Rally Grid. _CreatePSIObjectiveGrid: function(myStore) { if (!this.objGrid) { var colCfgs = [{ text: 'ID', dataIndex: 'DragAndDropRank', width: 50 }, { text: 'Summary', dataIndex: 'Name', flex: 1 }, { text: 'Success Rate', dataIndex: 'c_SuccessRate', width: 200 }]; if (!this.getSetting("useSuccessRatioOnly")) { colCfgs.push({ text: 'Initial Business Value', dataIndex: 'PlanEstimate', width: 200 }); colCfgs.push({ text: 'Final Business Value', dataIndex: 'c_FinalValue', width: 200 }); } this.objGrid = Ext.create('Rally.ui.grid.Grid', { store : myStore, enableRanking: true, defaultSortToRank: true, height: 550, overflowY: 'auto', margin: 10, showPagingToolbar: false, columnCfgs : colCfgs }); Ext.getCmp('c-panel-obj-crud-table').add(this.objGrid); } } Although I have set "enableRanking" to "true", the ranking drag and drop doesn't work if I add my grid to a component. However, the drag and drop function does work perfectly if I change the last statement from Ext.getCmp('c-panel-obj-crud-table').add(this.objGrid); to this.add(this.objGrid); I don't know if this is a Rally bug. Try to compare the final html file generated, no clue is found.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26848505
has title: Drag and Drop issue in Rally Grid
type: Question
tagged with: javascript
tagged with: appsdk2
score: 0
answer count: 1
tagged with: rally

http://stackoverflow.com/comment/42143565
score: 0
has text: Are you sure the first script executed on the page correctly? Simply seems like `swMegaMenu` is undefined...
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26781450

http://stackoverflow.com/comment/42065030
has text: Hi. Thanks. I know this I just want to keep the functionality within my object.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26739513

http://stackoverflow.com/q/26816593
has answer: http://stackoverflow.com/a/26816671
accepted answer: http://stackoverflow.com/a/26816671
score: 0
possible better answer: http://stackoverflow.com/a/33733900
answer count: 2
has title: How do I use the tag to send data to a javascript function?
tagged with: http://stackoverflow.com/tag/html
has body: I was testing and trying to make an little form that when the user entered their name, it would take that name and display it on to the screen. Test-Page What is your first name? Name: Here is the js file function displaySystem(name) { document.getElementById("testingID").innerHTML("Ah, hello there" + name) } I know that I could probably do this in one HTML file, however I want to try and make the js and HTML separate. ANY help is appreciated.
type: AnsweredQuestion
tagged with: forms
type: Question
has answer: http://stackoverflow.com/a/33733900
tagged with: javascript

http://stackoverflow.com/comment/41987311
type: Comment
type: QuestionComment
has text: From https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript: "JavaScript distinguishes between `null`, which is a value that indicates a deliberate non-value (and is only accessible through the null keyword), and `undefined`, which is a value of type 'undefined' that indicates an uninitialized value — that is, a value hasn't even been assigned yet...in JavaScript **it is possible to declare a variable without assigning a value to it. If you do this, the variable's type is `undefined`**."
score: 1
comment on: http://stackoverflow.com/q/26695480

http://stackoverflow.com/a/26715357
type: Answer
answers question: http://stackoverflow.com/q/26681451
score: 0
type: AcceptedAnswer
has body: It turned out that the problem was related to the fact that I could have avoided all the mess with the cmsApp.config(function ($httpProvider) { ..... } part, and just set the object I was sending as json, because, firstly I had this Misc.update({ id:'text_descr_assoc' }, $scope.description); and by converting that in a json obj, and removing the now useless cmsApp.config part, everything worked out just fine Misc.update({ id:'text_descr_assoc' }, {"my_key":$scope.description});
accepted answer of: http://stackoverflow.com/q/26681451

http://stackoverflow.com/comment/41994454
comment on: http://stackoverflow.com/q/26696215
type: Comment
type: QuestionComment
has text: to access jquery insie module, in this way i need to pass jquery object to init method var module = { elem: $('#id'), // unable to access jquery object here init: function (jquery){ // yes getting here } } I hope I able to explain my problem?
score: 0

http://stackoverflow.com/comment/108776370
has text: I am seeing the same thing. But up until recently it was working. So clearly it was not blocked as you posted this in 2014 and mine was working in 2020.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26686753
score: 0

http://stackoverflow.com/q/26804717
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42183700
has title: Phonegap - Barcode scanner plugin - Windows Phone 8.1
answer count: 0
score: 1
tagged with: windows-phone-8.1
upvote count: 1
tagged with: barcode-scanner
type: Question
tagged with: javascript
tagged with: phonegap-plugins
has body: Hi I am currently developing a phone gap bar code scanner and will be supported across a number of devices. I am using the plugin https://github.com/wildabeast/BarcodeScanner and I have it working perfectly on Android but I need to get it working on windows phone 8.1. On the windows phone, nothing happens when I click the link. On android it launchs the scanner and can read the barcode. Below is the code I am using. The results of the barcode are appended to the results divs. Here is the JS document.addEventListener("deviceready", init, false); function init() { document.querySelector("#startScan").addEventListener("touchend", startScan, false); resultDiv1 = document.querySelector("#results1"); } function startScan() { cordova.plugins.barcodeScanner.scan( function (result) { alert("We got a barcode\n" + "Result: " + result.text + "\n" + }, function (error) { alert("Scanning failed: " + error); } ); } As I said, this works perfectly on Android. Is there something different I need to try to get it working on the windows phone?
downvote count: 0
favorite count: 0
tagged with: cordova

http://stackoverflow.com/a/26755865
downvote count: 0
has comment: http://stackoverflow.com/comment/42098226
has comment: http://stackoverflow.com/comment/42094340
answers question: http://stackoverflow.com/q/26755716
has comment: http://stackoverflow.com/comment/42094070
has body: You should encode your result to json. So instead of the statement echo $data use echo json_encode($data); it will return your result in json format. like {"id":23212,"place_name":"Holly Ridge"...} and in your javascript your can access your data
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/26755716
has comment: http://stackoverflow.com/comment/42095017

http://stackoverflow.com/comment/42006699
has text: @RobG : I'd pitch that to the OP... but perhaps in a month or two!
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26706949

http://stackoverflow.com/a/26760050
has body: $(".hidden").hover(function() { $(this).animate({ opacity: 1 }); }, function() { var _this = $(this); setTimeout(function (){ _this.animate({ opacity:0 }); },1000) });
answers question: http://stackoverflow.com/q/26759958
downvote count: 0
type: Answer
upvote count: 3
score: 3

http://stackoverflow.com/a/26779652
downvote count: 0
has body: To prevent the original click triggering the location change use e.preventDefault() then you can use the done or success call back, when an ajax call has been successful,to manually change the window hash location. myApp.Views.ExampleView = Backbone.View.extend({ el: "#myView", events: { "click a": "handleLink" }, handleLink: function (e) { e.preventDefault(); var link = $(e.currentTarget).attr('href'); $.ajax("/echo/json/") .done(function () { location.hash = link }) } }); var myView = new myApp.Views.ExampleView(); fiddle - http://jsfiddle.net/leighking2/hjcg77h2/
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26779117
answers question: http://stackoverflow.com/q/26779117
type: AcceptedAnswer

http://stackoverflow.com/a/26734912
answers question: http://stackoverflow.com/q/26734810
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42058665
downvote count: 0
score: 1
has body: document.write is archaic and useful only before the DOM has loaded. If it's used after that, it overwrites the current DOM, as you've discovered. Use DOM methods instead and prepare a container to receive the content. HTML: &lt;div id='container'&gt;&lt;/div&gt; JS: var cntr = document.querySelector('#container'), html = ''; for (var i = 0; i &lt; y.length; i++) { html += y[i].nodeName+"&amp;nbsp&amp;nbsp"+y[i].childNodes[0].nodeValue+"&lt;/br&gt;"; } cntr.innerHTML = html;
accepted answer of: http://stackoverflow.com/q/26734810

http://stackoverflow.com/comment/42188176
type: AnswerComment
comment on: http://stackoverflow.com/a/26807576
type: Comment
has text: Using `.*` here is not safe as I stated in my answer. Regex will find the longest possible match and so using a different string I get bad results : `'some text here [[quote=bob]This is some text bob wrote[/quote]] other text here[/quote]]'.match(/.*(\[\[quote=.*?\].*?\[\/quote\]\])/); ` gives : `["some text here [[quote=bob]This is some text bob wrote[/quote]]","[[quote=bob]This is some text bob wrote[/quote]]"]`
score: 0

http://stackoverflow.com/comment/41967018
type: Comment
comment on: http://stackoverflow.com/a/26684318
type: AnswerComment
has text: Thank you for your help and advice. im new to jsfiddle.. btw which one to take... i took 1.9.1
score: 0

http://stackoverflow.com/a/26844116
has comment: http://stackoverflow.com/comment/42253906
has comment: http://stackoverflow.com/comment/42272916
has body: You can use jQuery function like below, to encode or decode the input String function htmlEncode(value){ return $(' ').text(value).html(); } function htmlDecode(value){ return $(' ').html(value).text(); } htmlDecode('test') // result "test" htmlDecode('test') // result "test" In this code I'm actually creating a Div which is not actually present on the page Passing input string to the htmlDecode function jQuery automatically encode/decode the string Returning the new html/text Hope this helps!
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26711369
has comment: http://stackoverflow.com/comment/107204389

http://stackoverflow.com/comment/42106099
score: 0
type: AnswerComment
type: Comment
has text: before we commented out the last bit, I was getting the right response just multiple times
comment on: http://stackoverflow.com/a/26760494

http://stackoverflow.com/comment/41991673
type: QuestionComment
comment on: http://stackoverflow.com/q/26690886
has text: Thats why it does not work. ID's have to be unique. Try to change up to class and use the `.editableContent`selector after that
score: 0
type: Comment

http://stackoverflow.com/a/26745566
downvote count: 0
answers question: http://stackoverflow.com/q/26726418
type: Answer
has body: Current working solution: function completedProfile() { if (Meteor.user() &amp;&amp; Meteor.user().profile.primary_email &amp;&amp; Meteor.user().profile.display_name &amp;&amp; Meteor.user().profile.university_id) { return true; } else { return false; } } Router.map(function() { this.route('landing', { path: '/', // match the root path action: function() { if (this.ready()) { if (!completedProfile()) { this.render('splash'); this.stop(); } else { this.render('bulletin') } } } } });
has comment: http://stackoverflow.com/comment/42082430
has comment: http://stackoverflow.com/comment/42105965
upvote count: 1
score: 1

http://stackoverflow.com/q/26677345
has comment: http://stackoverflow.com/comment/41954708
has answer: http://stackoverflow.com/a/26677562
has answer: http://stackoverflow.com/a/26677551
favorite count: 0
tagged with: parsing
has comment: http://stackoverflow.com/comment/41953735
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41953694
duplicate of: http://stackoverflow.com/q/11922383
upvote count: 0
linked to: http://stackoverflow.com/q/11922383
has comment: http://stackoverflow.com/comment/41954444
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41953834
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41954810
has body: I have the follwing JSON: { "_id":"9876567833", "result":{ "Mercedes":[ { "category_name":"Car" }, { "category_name":"Fast" } ], "BMW":[ { "category_name":"Car" } ] } I don't know before "Mercedes" or "BMW" (it could change, this is just for the example). I need to get "Car", "Fast", "Car". The JSON is in categories So I tried: var categoArray = []; for(var i =0; i &lt; categories.length; i++){ for (var idx in categories[i].result) { if (categories[i].result[idx].length &gt; 0){ categoArray.push(categories[i].result[idx].category_name); } } } But it doesn't work. [EDIT] It is not the same :Access / process (nested) objects, arrays or JSON My question is much more complex Thanks for your help!
tagged with: javascript
score: -1
has title: JavaScript Parsing Complex JSON
has comment: http://stackoverflow.com/comment/41954291
answer count: 2
has comment: http://stackoverflow.com/comment/41954921
has comment: http://stackoverflow.com/comment/41954227

http://stackoverflow.com/q/26777868
tagged with: jquery-validate
type: Question
accepted answer: http://stackoverflow.com/a/26782643
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42134560
score: 0
has comment: http://stackoverflow.com/comment/42135403
has answer: http://stackoverflow.com/a/26782643
has comment: http://stackoverflow.com/comment/42136688
has title: ASP MVC jQuery validation onfocusout working, but not on form submit
has comment: http://stackoverflow.com/comment/42134149
type: AnsweredQuestion
tagged with: asp.net-mvc
has body: I have a problem with my ASP MVC project and jQuery client side validation. The problem is that when pressing the submit button, the form is validated but the errors are not displayed and the form gets submitted. The problem is only appearing when i call valid() inside a validation method. E.g.: i have a isdatebefore and isdateafter validation method. I want to check if #start is before #end. So when validating #start it also calles validate on #end to make sure error messages appear/disappear on both elements. I added validation onfocusout and this is working just fine (on the #start and #ejnd fields and all other fields in the form). However when I press the submit button, the form is validated (i placed some breakpoints to see if the method gets called), but is submitted although there are errors present. Here is my code: // Add IsDateAfter validation $.validator.addMethod("isdateafter", function (value, element, params) { var self = $(element); var parts = element.name.split("."); var prefix = ""; for (var i = 0; i &lt; parts.length - 1; i++) prefix = parts[i] + "."; var otherElement = $('input[name="' + prefix + params.propertytested + '"]'); var startdatevalue = otherElement.val(); if (!value || !startdatevalue) return true; var allowequal = params.allowequaldates.toLowerCase() === "true"; var start = Globalize.parseDate(startdatevalue); var end = Globalize.parseDate(value); if (!self.data('reval')) { self.data('reval', true); otherElement.data('reval', true); otherElement.valid(); self.data('reval', false); otherElement.data('reval', false); } var isValid = allowequal ? start &lt;= end : start &lt; end; if (isValid) { self.removeClass('input-validation-error'); } return isValid; }); $.validator.unobtrusive.adapters.add( 'isdateafter', ['propertytested', 'allowequaldates'], function (options) { options.rules['isdateafter'] = options.params; options.messages['isdateafter'] = options.message; }); // Add IsDateBefore validation $.validator.addMethod("isdatebefore…

http://stackoverflow.com/a/26688901
score: -2
answers question: http://stackoverflow.com/q/26688718
upvote count: 0
has body: There’s a popular convention that avoids the need to track this altogether: if your viewmodel’s constructor copies a reference to this into a different variable (traditionally called self), you can then use self throughout your viewmodel and don’t have to worry about it being redefined to refer to something else. See this link
type: Answer
downvote count: 2

http://stackoverflow.com/a/26932021
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26742297
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26742297
score: 1
type: Answer
has body: You said "I want to edit the contents of the home page and post back to the JSON file." You cant save to the local files with angular. "Get" request is working just because browser can load static file (its same with css or html). You definitely run application just by clicking html and not in any http-server. If you run server (for example nodejs http-server) in the folder and connect browser to it. It will not provide 404 (but of course it will not update json file) If you need data to be saved, you need real working application which will provide API and process request and store data.

http://stackoverflow.com/comment/42074009
type: Comment
comment on: http://stackoverflow.com/q/26744175
type: QuestionComment
has text: but if you load an image from a folder you actually load an image from the client folder system.
score: 0

http://stackoverflow.com/comment/42219627
has text: thank you for taking the time to answer. I've made the changes that you suggested but I still have the same problem. Can you guide me as to how to rewrite it? I've been trying all day since you posted this answer. Thank you.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26823174

http://stackoverflow.com/a/26813792
has comment: http://stackoverflow.com/comment/42200599
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42200391
has body: var data = [ { "12345": { "value": { "1": "2", "3": "4" } } }, { "12346": { "value": { "5": "6", "7": "8" } } }, { "12347": { "value": { "9": "0", "11": "22" } } } ]; function grabObject(id) { var result; for (i = 0; i &lt; data.length; i++) { for (var k in data[i]){ if(k == id) { result = data[i][k]; } } } return result; } console.log(grabObject('12345')); This is the code I tested check and let me know
has comment: http://stackoverflow.com/comment/42200678
answers question: http://stackoverflow.com/q/26813389

http://stackoverflow.com/a/26704694
has body: The issue is that floating point numbers in JavaScript are not always strictly .3 or .5, some other digits get added to the end as well. Try putting the first condition on top, and jump to the other if it's false, since it theory, you shouldn't have other states. I would also suggest assigning $(this) to a variable to prevent jQuery from having to create an instance of the same element 3 times. var $this = $(this), opacity = $this.css('opacity'); if (objectBottom < windowBottom){ if (opacity != 1) $this.stop().fadeTo(500,1); } else if (opacity == 1) $this.stop().fadeTo(500,.3); I also added .stop(), because if someone is scrolling up and down rapidly for whatever reason, the animation queue on the element may fill up and cause a pulsing effect due to all fading animations still being in the queue. Stop prevents this by clearing the animations from the queue, and thus executing the following animation instantaneously. Also, this $(window).scroll(function() {fade();}); can be shortened just to $(window).scroll(fade); Working example: $(window).on("load",function() { function fade() { $('.fade').each(function() { var objectBottom = $(this).offset().top + $(this).outerHeight(), windowBottom = $(window).scrollTop() + $(window).innerHeight(), $this = $(this), opacity = $this.css('opacity'); if (objectBottom < windowBottom){ if (opacity != 1) $this.fadeTo(500,1); } else if (opacity == 1) $this.fadeTo(500,.3); }); } fade(); $(window).scroll(fade); //Fade in elements during scroll }); .fade { margin: 50px; padding: 50px; background-color: lightgreen; opacity: .3; } Fade In 01 Fade In 02 Fade In 03 Fade In 04 Fade In 05 Fade In 06 Fade In 07 Fade In 08 Fade In 09 Fade In 10
answers question: http://stackoverflow.com/q/26704637
upvote count: 2
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/q/26780431
has answer: http://stackoverflow.com/a/26786004
accepted answer: http://stackoverflow.com/a/26786004
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
tagged with: c#
tagged with: jqgrid
upvote count: 2
answer count: 1
tagged with: javascript
favorite count: 0
has body: Hi i got a simple actinReault which return jsonResult. The method is following. [HttpPost] public JsonResult AllEmployees() { EmployeeService employeeService = new EmployeeService(); List&lt;EmployeeViewModel&gt; employeesViewMod = employeeService.allEmployee(); var AllEmpObjects= JsonConvert.SerializeObject(employeesViewMod); return Json(AllEmpObjects); } we can debug and see data on AllEmpObjects which is coming form DB "[{\"FirstName\":\"shuvo\",\"LastName\":\"ahmed\",\"Address1\":\"110, uttra\",\"Address2\":\"mymansing\",\"HomePhone\":1234,\"MobileNo\":2345,\"Email\":\"suvo@yahoo.com\",\"Dob\":\"10/01/1977\",\"StartDate\":\"2013-10-01T00:00:00\",\"InitialSalary\":0,\"AccHolderName\":null,\"BankName\":\"brac\",\"Brunch\":\"uttra\",\"AccountNo\":1234567890,\"PositionDDLId\":0,\"MarriageStatDDLId\":0,\"PositionIdString\":\"Md\",\"MarriageIdString\":\"Married\"}] My JS file which is responsible to show data using jqGrid: function allEmployeeFunc() { $("#list").jqGrid({ url: "/Employee/AllEmployees", datatype: "json", mtype: "POST", colNames: ["First name", "Last Name", "phone", "Mobile", "Email", "status"], colModel: [ { name: "FirstName", width: 55 }, { name: "LastName", width: 90 }, { name: "HomePhone", width: 80, align: "right" }, { name: "MobileNo", width: 80, align: "right" }, { name: "Email", width: 80, align: "right" }, { name: "MarriageIdString", width: 150, sortable: false } ], pager: "#pager", rowNum: 10, rowList: [10, 20, 30], sortname: "invid", sortorder: "desc", viewrecords: true, gridview: true, autoencode: true, caption: "Detail of all EMPLOYEE", }); } unfortunately there is no data on output but the grid appears with empty inside. can anyone help please?
has title: jqGrid is failing to loading data

http://stackoverflow.com/a/27753160
type: Answer
has body: As one of the approaches you can use Grunt. grunt.registerTask('dev', ['processhtml:dev']); grunt.registerTask('default', ['processhtml:prod', ...]); In html: It means that will be removed for dev, and will be removed for prod. Now to build a production environment use grunt command, and to build a development env. use grunt dev. And one more thing, you can use grunt-contrib-watch to automate dev builds: watch: { html: { files: ['www/*.html'], tasks: ['dev'] } } Hope it will help someone.
has comment: http://stackoverflow.com/comment/64405260
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/26802189
has comment: http://stackoverflow.com/comment/64392961
downvote count: 0

http://stackoverflow.com/comment/42184832
type: AnswerComment
has text: Thanks a bunch!!! I wish I could accept both answers. I am definitely using this css approach as it also involves less js spaghetti. I did need to know why my jQuery wasn't working so that now I can do other actions when the mouse leaves the frame.
comment on: http://stackoverflow.com/a/26805768
type: Comment
score: 0

http://stackoverflow.com/comment/42009253
type: Comment
has text: `java` `!=` `javascript`!.. same as _jar_ `!=` _Jarvis_
type: QuestionComment
comment on: http://stackoverflow.com/q/26708541
score: 3

http://stackoverflow.com/q/26695017
favorite count: 0
tagged with: ajax
possible better answer: http://stackoverflow.com/a/46729216
has answer: http://stackoverflow.com/a/26695087
type: AnsweredQuestion
has title: How to handle running into CORS error codes
score: 12
tagged with: http
type: Question
has comment: http://stackoverflow.com/comment/41985268
upvote count: 12
has body: Problem: I send a CORS request [edit: improperly-executed] The server receives the request and attempts to process it. The server returns an error response, for example a 422 Unprocessable Entity, along with JSON information about the errors. The idea is that my app could receive this error information and handle it appropriately in the UI. The browser blocks my error handler from getting the response content, or even getting the status code. Showing that the browser received the 401 status code but treated it as a CORS security error: The response object, showing that my code cannot access the response data (data: "", status: 0): Confusingly, when the server responds with a success code, the browser processes it as expected, and my client code receives the response. How have other people handled this limitation? My best guess right now is to hijack an HTTP "success" code (2XX) as an error code, and then include the error information in the response. This prevents me from using the ajax error handlers in a normal way, but I'm handling this as a global ajax filter anyway, so this filter would capture the deviant success code and trigger the error handlers instead.
accepted answer: http://stackoverflow.com/a/26695087
tagged with: javascript
answer count: 3
tagged with: cors
has answer: http://stackoverflow.com/a/46729216
downvote count: 0
has answer: http://stackoverflow.com/a/57344168

http://stackoverflow.com/q/26707225
type: UnansweredQuestion
tagged with: javascript-debugger
tagged with: google-chrome
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26707659
has comment: http://stackoverflow.com/comment/42007104
tagged with: google-chrome-devtools
score: -1
has comment: http://stackoverflow.com/comment/42007129
upvote count: 0
has body: I have a variable join in a page whose value is either true or false. When I run the page, how can I know which method modified the variable using the debug tool in chrome?
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42007124
favorite count: 0
has title: how to find where the variable is modified

http://stackoverflow.com/comment/42170373
comment on: http://stackoverflow.com/q/26797889
has text: What version of Bootstrap are they using? If it's version 3, there's some documentation on the events in http://getbootstrap.com/javascript/#collapse-usage. For v 2.3.2, look at http://getbootstrap.com/2.3.2/javascript.html#collapse
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26726799
accepted answer: http://stackoverflow.com/a/26728255
has comment: http://stackoverflow.com/comment/42061053
answer count: 1
tagged with: webjars
has title: Licensing concerns with webjars?
favorite count: 0
has comment: http://stackoverflow.com/comment/42042839
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26728255
downvote count: 2
type: Question
has body: This might seem like a dumb question, but are there any licensing concerns I should be aware of when deploying a commercial application which manages JS dependencies via webjars, other than the individual licenses of the JS sources themselves?
upvote count: 0
score: -2
tagged with: javascript

google-oauth
type: Tag
tag name: google-oauth
tags question: http://stackoverflow.com/q/26829446

http://stackoverflow.com/a/26773980
has comment: http://stackoverflow.com/comment/42127800
answers question: http://stackoverflow.com/q/26773694
score: 0
has comment: http://stackoverflow.com/comment/42127118
type: Answer
has comment: http://stackoverflow.com/comment/42127673
has comment: http://stackoverflow.com/comment/42128312
has body: Hi change your submit button to button. &lt;input type="button" id="btnSubmit" value="Log in" /&gt; data: {name: $('#txtfn').val() ,password: $('#txtln').val()},

http://stackoverflow.com/a/26782725
upvote count: 1
score: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42142681
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26782272
answers question: http://stackoverflow.com/q/26782272
has body: Either load each plugin individually, or include foundation.min.js, which automatically loads the Foundation Core and all JavaScript plugins.
type: Answer

http://stackoverflow.com/a/26710652
downvote count: 2
score: -2
answers question: http://stackoverflow.com/q/26710363
has body: Think what you need is HTML5 SVG. http://www.w3.org/TR/SVG/shapes.html draggable SVG draggable using JQuery and Jquery-svg background image Add a background image (.png) to a SVG circle shape
upvote count: 0
has comment: http://stackoverflow.com/comment/42013445
type: Answer

http://stackoverflow.com/comment/42054371
score: 0
comment on: http://stackoverflow.com/q/26733811
type: QuestionComment
type: Comment
has text: Vanilla Javascript, HTML and CSS fits all your requirements.

http://stackoverflow.com/q/26690862
has body: I have a user base, and with these I get the location with html5. Pro users would like to show the users who are close to him within 10 km .. How can I do this? What data do I need to save, and how to calculate? I'm completely lost
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
favorite count: 0
upvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26690952
has title: People close to me by geolocation
tagged with: geolocation
tagged with: mysql
type: Question
answer count: 1
tagged with: javascript
score: -1

getpixel
type: Tag
tag name: getpixel
tags question: http://stackoverflow.com/q/26724060

http://stackoverflow.com/comment/42143587
type: AnswerComment
score: 0
type: Comment
has text: @AhmedFaud Replace line 35 with `socket.emit("whoisonline", friends);`
comment on: http://stackoverflow.com/a/26782824

http://stackoverflow.com/a/31577948
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26804344
downvote count: 0
score: 1
has body: Note as of 2.4.1 you can pass in an array: View = Marionette.ItemView.extend({ behaviors: [ { behaviorClass : MyApp.Behaviors.InputFile1, elementSelector : "input.file1", field : "file1" }, { behaviorClass : MyApp.Behaviors.InputFile1, elementSelector : "input.file2", field : "file2" } ] });

http://stackoverflow.com/q/26802539
has title: Semantic UI, Dimmer Background color
has body: I am using semantic ui modal and I want to change background color of its dimmer but I cant. I used function modalist(){ $(".ui.modal").modal("show"); $(".ui.dimmer").css("background-color", "Yellow"); } It works, but for less than two sec. Please Help Me. Kindest Regards;
tagged with: semantic-ui
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27282883
has answer: http://stackoverflow.com/a/27499443
type: Question
tagged with: javascript
tagged with: jquery
tagged with: background-color
score: 0
answer count: 2

http://stackoverflow.com/q/26734359
has comment: http://stackoverflow.com/comment/42055518
tagged with: http://stackoverflow.com/tag/html
has title: search data from html input in mysql
has answer: http://stackoverflow.com/a/26734602
upvote count: 1
tagged with: php
accepted answer: http://stackoverflow.com/a/26734602
type: AnsweredQuestion
score: 1
tagged with: mysql
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has body: I want to get data from my database (mysql) and show it on the website, the script schould be save. This is the struture of files I have already: /includes db_connect.php functions.php getdata.php logout.php process_login.php psl-config.php register.inc.php /js forms.js sha512.js login.php protected_page.php register.php register_success.php seach.php Now follow the important files: psl-config.php <?php /** * Das sind die Login-Angaben für die Datenbank */ define("HOST", "localhost"); // Der Host mit dem du dich verbinden willst. define("USER", "sec_user"); // Der Datenbank-Benutzername. define("PASSWORD", "eKcGZr59zAa2BEWU"); // Das Datenbank-Passwort. define("DATABASE", "secure_login"); // Der Datenbankname. define("CAN_REGISTER", "any"); define("DEFAULT_ROLE", "member"); define("SECURE", FALSE); // NUR FÜR DIE ENTWICKLUNG!!!! ?> The db_connect.php <?php include_once 'psl-config.php'; // Da functions.php nicht included ist $mysqli = new mysqli(HOST, USER, PASSWORD, DATABASE); ?> This is my search.php <?php include_once 'includes/db_connect.php'; include_once 'includes/functions.php'; sec_session_start(); ?> Secure Login: Protected Page <?php if (login_check($mysqli) == true) : ?> Welcome <?php echo htmlentities($_SESSION['username']); ?>! Search Contacts Details You may search either by first or last name <?php else : ?> You are not authorized to access this page. Please login. <?php endif; ?> Where should I put my textbox entry to make a safe search for my website? Is my code safe to use? This is my sql command: SELECT * FROM produckte WHERE beschreibung = $search LIMIT 100; I want to print the result on the search website.
favorite count: 0
possible better answer: http://stackoverflow.com/a/26734663
has answer: http://stackoverflow.com/a/26734663

http://stackoverflow.com/comment/42079745
type: AnswerComment
comment on: http://stackoverflow.com/a/26747242
type: Comment
has text: Hmmm... I might try setting the focus outside the textbox, then simulating an enter keypress.
score: 0

http://stackoverflow.com/q/26813053
tagged with: express
favorite count: 0
upvote count: 8
tagged with: cross-domain
has comment: http://stackoverflow.com/comment/54553480
has comment: http://stackoverflow.com/comment/42199292
has answer: http://stackoverflow.com/a/60153402
score: 8
has comment: http://stackoverflow.com/comment/42198088
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/73655205
has comment: http://stackoverflow.com/comment/42199267
has comment: http://stackoverflow.com/comment/42199226
tagged with: node.js
has comment: http://stackoverflow.com/comment/42198921
type: Question
has comment: http://stackoverflow.com/comment/42198158
answer count: 2
has title: How to restrict API access to only authorized domains using Express.js?
tagged with: api
has comment: http://stackoverflow.com/comment/42199259
downvote count: 0
has body: I'm working on a layer of security for my Node.js/Express.js app where I would like restrict access to an authlist (authorized list) of domains. NB The opposite of an authlist is a denylist. The Rundown: Users create a Project on my system. Each Project is issued a Public Key and Secret Key that will be used to create signed requests. Additionally, the admin of any given Project will need to supply a authlist of domains that they'd like to be able to access the API for that given Project. This is done in the web-based console, not as part of every request. When the API receives a request, req.get('origin') is used to determine the origin domain of the request. The origin is checked against the authlist and either allowed or denied accordingly. In Code: var app = require('express'); app.post('/my-api-endpoint', function(req,res) { var originDomain = req.get('origin'); /// e.g. mysite.com /// Origin is then checked against the authlist array of domains }); The Questions What concerns do I need to be aware of with regard to Domain Origin Spoofing? Is this a worthy security feature at all? Or is it so easily spoofed that there's no point in bothering?
tagged with: javascript
has comment: http://stackoverflow.com/comment/42198469

http://stackoverflow.com/a/26791104
has body: I haven't used this before, but my guess is you need to use ${ctsDictionary[status.index-1] instead of ${cts[status.index-1] because cts is only the current item.
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26791070
answers question: http://stackoverflow.com/q/26791070
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26721597
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26733577
tagged with: http://stackoverflow.com/tag/xml
has title: Displaying the sum of counted keywords from xml files using xsl and javascript
tagged with: xslt
type: Question
tagged with: javascript
has body: I have an html file that uses javascript to read an xml file and apply an xsl file to it to output a count of the number of times a certain keyword appears in the xml file and display that count in a on the html page. I would like to get a count of these keywords from 2 separate xml files. How would I go about doing that? Here is my javascript: function transform1() { var xdoc1 = emilygfinalreadxml("xml/cleveland-browns-news.xml") ; var xslt1 = emilygfinalreadxml("xsl/browns-keywords.xsl"); var result = emilygfinalrunTransform(xdoc1,xslt1); var resultDiv = document.getElementById("browns-keywords"); resultDiv.innerHTML = result; } function clearDivs1() { var resultDiv = document.getElementById("browns-keywords"); resultDiv.innerHTML = ""; } and here is my xsl to count the number of keywords: &lt;div&gt; Number of times "quarterback" is used: &lt;xsl:value-of select="count(//*[contains(text(), 'quarterback')])"/&gt; &lt;/div&gt; &lt;div&gt; Number of times "Cleveland" is used: &lt;xsl:value-of select="count(//*[contains(text(), 'Cleveland')])"/&gt; &lt;/div&gt; &lt;/xsl:template&gt; Thank you for your help!
score: 0
answer count: 1

http://stackoverflow.com/comment/42257518
comment on: http://stackoverflow.com/a/26844276
type: AnswerComment
has text: Does $elem contains any matched elements? You may add a check for that: var $elem = $('.scrollable'); if($elem[0]) {// get and remove events data}
score: 0
type: Comment

http://stackoverflow.com/comment/42012317
has text: Thanks for recommendations an answer!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26685245
type: AnswerComment

http://stackoverflow.com/a/26752425
has body: Ok, after some more hunting around and trying out a few things, I've got a solution of sorts. Upside of this solution: It allows user to upload a file and you can save it as any filename you want and still display it on screen It works Downside of this solution: This only seems to work with AsyncFileUpload...the same code does not work for AjaxFileUpload, unfortunately. It requires forcing a postback so you get the "screen flashing" effect. Not elegant, but it works. The solution is straight-forward...In the javascript, rather than finding the filename and setting the image.src to that filename, simply force a postback of the updatepanel. This assumes you have set the ImageURL in the code-behind. Thus, the complete code is: In the Head section of the asp page: "upTop" is the ID of my UpdatePanel The Body asp code is standard: <asp:UpdatePanel ID="upTop" runat="server" UpdateMode="Conditional"> <asp:Panel ID="Panel1" CssClass="panelbox" runat="server"> <asp:Image ID="imgClient" runat="server" /> <ajaxToolkit:AsyncFileUpload ID="AsyncFileUpload1" OnClientUploadComplete="uploadComplete" OnUploadedComplete="AsyncFileUpload1_UploadedComplete" ThrobberID="MyThrobber" runat="server" /> <asp:Image ID="MyThrobber" ImageUrl="~/Images/pleasewait.gif" Style="display: None" runat="server" /> </asp:Panel> </asp:UpdatePanel> And finally the code-behind: Protected Sub AsyncFileUpload1_UploadedComplete(sender As Object, e As AjaxControlToolkit.AsyncFileUploadEventArgs) Dim Filepath As String Dim NewFileName As String Filepath = "/ClientPhotos" NewFileName = MapPath(Filepath) & "\" & CurrentCustomer.ID.ToString & ".jpg" Try AsyncFileUpload1.SaveAs(NewFileName) Catch ex As Exception ShowError("Error uploading photo: " & ex.Message) Exit Sub End Try Me.imgClient.ImageUrl = "~/ClientPhotos/" & CurrentCustomer.ID.ToString & ".jpg" Me.imgClient.Width = 200 Me.imgClient.Height = 200 End Sub Read More - http://forums.asp.net/t/1894718.aspx?AjaxFileUpload+Upload+and+display+image+
answers question: http://stackoverflow.com/q/26752344
score: 0
type: Answer

http://stackoverflow.com/comment/42230946
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26827747
type: AnswerComment
has text: If you can not connect to your server from outside, then there's obviously no way to load anything from there. You need to have a domain or ip of your server. For getting help setting it up you have to make another question.

http://stackoverflow.com/comment/41957439
comment on: http://stackoverflow.com/q/26678927
score: 0
type: Comment
type: QuestionComment
has text: It is included in a page which has jquery referenced.

http://stackoverflow.com/a/55224910
downvote count: 0
score: 1
upvote count: 1
has body: Using Jquery $('&lt;input&gt;').attr({ type: 'hidden', id: 'foo', name: 'bar', value: 'value' }).appendTo('form');
answers question: http://stackoverflow.com/q/26764240
type: Answer

http://stackoverflow.com/comment/42143187
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26780457
has text: no script errors and I paste it immedetialy in my source code...

http://stackoverflow.com/comment/42029068
comment on: http://stackoverflow.com/q/26719370
has text: Yes, using IDs is not the only way for selecting elements. jQuery selectors work like CSS selectors. You have many options. http://api.jquery.com/category/selectors/
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26707369
type: Question
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42007599
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26707682
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42010588
has answer: http://stackoverflow.com/a/26707682
has body: I have two radio buttons and a text input. I want one of the radios required for the text input to be then validated. I can disable the text input field unless selected, but I think it would be more user intuitive to allow text input first, and only error if they don't also select a radio. The form is giving me back an error that the radios are required, but I don't want the remote check to kick in unless one of the radio buttons is selected. So here's what I have... JQuery: jQuery( "#modalform" ).validate({ onkeyup: false, onfocusout: false, rules: { 'register_domain[]': { required: true }, chosen_domain: { required: true, minlength: 4, remote: { url: "check.php", type: "post", data: { register_domain: function() { return jQuery('input[name="register_domain[]"]'); } } } } }, messages: { 'register_domain[]': { required: "Choose one" }, chosen_domain: { required: "Required input", minlength: jQuery.validator.format("Please, at least {0} characters are necessary"), remote: jQuery.validator.format("Invalid domain name: {0}") } } }); Form Fields: Own Domain Register Domain Please choose one.
type: AnsweredQuestion
has title: JQuery Validation - radio button required for text input
tagged with: forms
tagged with: jquery-validate

http://stackoverflow.com/q/26782929
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42142992
favorite count: 0
type: UnansweredQuestion
tagged with: iframe
upvote count: 1
has comment: http://stackoverflow.com/comment/42143409
has comment: http://stackoverflow.com/comment/42144218
has comment: http://stackoverflow.com/comment/42668722
has body: I have a div element, which has a click event. When div is over iframe area (div is closer to user than iframe), click event doesn't rise! If div is somewhere else (not above iframe) - it rises. P.S.1. Iframe is YouTube video (another domain) P.S.2. When it is input[type="button"] element instead of div - click rises! P.S.3. Why div, not button? I need to realize drag event with div (and another element) and it is impossible to do whis button. I tried: transparent screen overlay between div and iframe - nothing; find who intercepts click event - nothing.
score: 1
has comment: http://stackoverflow.com/comment/42143184
has answer: http://stackoverflow.com/a/26783196
has comment: http://stackoverflow.com/comment/42144026
has title: Div click event doesn't rise when it is over iframe?
has answer: http://stackoverflow.com/a/26783221
type: Question
answer count: 2
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/42240678
type: Comment
comment on: http://stackoverflow.com/a/26827642
has text: I tried to put in this pic - http://wallpoper.com/images/00/44/95/50/autumn-scenery-2_00449550.jpg and the image does not resize with window resize
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42006979
score: 0
comment on: http://stackoverflow.com/a/26695640
type: Comment
has text: Writing letters into table cells souldnt cause any problems. e.g if you write A it still has correct title and id.
type: AnswerComment

http://stackoverflow.com/comment/42029935
has text: $_POST and $_FILES variables are empty.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26719750
score: 0

http://stackoverflow.com/comment/42066557
comment on: http://stackoverflow.com/q/26739694
type: Comment
score: 0
has text: @air6199 I would suggest reading up on [debugging](https://developer.chrome.com/devtools/docs/javascript-debugging). You can set breakpoints to pause the execution of your script and then inspect what's in variables. It will help you a lot now and with your future coursework. You'll be ahead of the game. (It might not be in your coursework, but you don't write any code to do it. I would be extremely surprised if an instructor was angry that you were debugging code)
type: QuestionComment

http://stackoverflow.com/a/26700338
has body: Your choice of variable names is quite confusing. Let's start with for(var array in Alerts), in this statement array is not actually an array, it's simply refers to the key, which in turns is a system in your domain, therefore I would change array to systemKey. Then, you go on and attach handlers inside the loop. This code is problematic because the second system will end up having two click handlers attached. for(var systemKey in Alerts){ var system = systemKey.toUpperCase(); $("#form_emergencies").append("&lt;div class='systems' id='" +systemKey +"'&gt;&lt;div class='select_box'&gt;&lt;/div&gt;&lt;h2&gt; " +system +"&lt;/h2&gt;&lt;/div&gt;"); } //Notice I used this.id rather than array $(".systems").on("click", function(){ $.each(Alerts[this.id], function(ind,item){ //... }) }) Finally, console.log(Alerts[array].item); is wrong, just put console.log(item);
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41994328
accepted answer of: http://stackoverflow.com/q/26700041
has comment: http://stackoverflow.com/comment/41994471
upvote count: 1
has comment: http://stackoverflow.com/comment/41995318
score: 1
answers question: http://stackoverflow.com/q/26700041

http://stackoverflow.com/q/26684186
has answer: http://stackoverflow.com/a/26684620
accepted answer: http://stackoverflow.com/a/26686153
answer count: 3
downvote count: 0
tagged with: svg-animate
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26684620
has answer: http://stackoverflow.com/a/26684642
favorite count: 0
has title: How to convert SVG CSS animation to pure JS code
tagged with: css
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/26686153
upvote count: 1
type: Question
has body: I would like to convert an svg path animation, to a pure javascript one. SVG code: <path class="path" fill="#FFFFFF" stroke="#000000" stroke-width="4" stroke-miterlimit="10" d="M66.039,133.545c0,0-21-57,18-67s49-4,65,8 s30,41,53,27s66,4,58,32s-5,44,18,57s22,46,0,45s-54-40-68-16s-40,88-83,48s11-61-11-80s-79-7-70-41 C46.039,146.545,53.039,128.545,66.039,133.545z"/> CSS code: .path { stroke-dasharray: 10 10; /* 10px fill, 10px gap */ -webkit-animation: dash 10s linear normal infinite; } @-webkit-keyframes dash { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } } Here is the Fiddle
score: 1

http://stackoverflow.com/q/26781672
answer count: 0
type: Question
score: 0
has comment: http://stackoverflow.com/comment/42140710
tagged with: javascript
has comment: http://stackoverflow.com/comment/42140851
tagged with: jquery
tagged with: html-lists
has comment: http://stackoverflow.com/comment/42141046
has title: Submenu width set to 100% not working
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: This gonna be hard to explain. I have this Dropdown Menu. You can have a look at it at this website: http://wpx.mirsoftware.de/ I also put the part of the code in jsfiddle: http://jsfiddle.net/zst0o747/5/ The Problem is, the ul is set with 100% but if look with firebug the inner html is longer as the ul. The ul didn't wrap it properly. I don't know how to explain. Anywhere in css my is a bug, but i have no idea where. I took a screenshot from firebug where you can see the ul isn't 100%. The problem with that is the child ul/li can't position properly. Well... i think it comes from this... So maybe someone has an idea? Here also is my code: HTML: Blog About Media Contact sdfsdgf Aboutdsgfdsgdsfg Contact sdgfsdagghgfdhfdghfdghfgh Allgemein Contact sdagfdsfg About CSS: /* General styles for all menus */ .twNav { background: rgb(86,107,132); /* Old browsers */ background: -moz-linear-gradient(left, rgba(86,107,132,1) 0%, rgba(62,86,117,1) 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(86,107,132,1)), color-stop(100%,rgba(62,86,117,1))); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(left, rgba(86,107,132,1) 0%,rgba(62,86,117,1) 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(left, rgba(86,107,132,1) 0%,rgba(62,86,117,1) 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(left, rgba(86,107,132,1) 0%,rgba(62,86,117,1) 100%); /* IE10+ */ background: linear-gradient(to right, rgba(86,107,132,1) 0%,rgba(62,86,117,1) 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#566b84', endColorstr='#3e5675',GradientType=1 ); /* IE6-9 */ -webkit-box-shadow: 13px 0px 51px -28px rgba(0,0,0,0.75), inset 13px 0px 51px -28px rgba(0,0,0,0.75); -moz-box-shadow: 13px 0px 51px -28px rgba(0,0,0,0.75), inset 13px 0px 51px -28px rgba(0,0,0,0.75); box-shadow: 13px 0px 51px -28px rgba(0,0,0,0.75), inset 13px 0px 51px -28px rgba(0,0,0,0.75); border-right: 1px solid #8aa5c7; position: f…
tagged with: css

http://stackoverflow.com/a/26721608
downvote count: 0
answers question: http://stackoverflow.com/q/26721454
type: AcceptedAnswer
has body: In order to 'send the data' from php, you need to echo it, after setting the correct header: header('Content-Type: application/json'); echo json_encode($data);
accepted answer of: http://stackoverflow.com/q/26721454
type: Answer
has comment: http://stackoverflow.com/comment/42033039
score: 1
upvote count: 1

http://stackoverflow.com/q/26819007
answer count: 1
has body: Im starting to learn the new features in angular 1.3, and i don`t understanding this feature, what he does and what is benefit?
downvote count: 1
accepted answer: http://stackoverflow.com/a/26819202
tagged with: javascript
has title: Angular 1.3 getter setter ng-model
has comment: http://stackoverflow.com/comment/42207861
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42207839
score: 1
favorite count: 0
tagged with: angularjs
upvote count: 2
has answer: http://stackoverflow.com/a/26819202

http://stackoverflow.com/a/26762487
answers question: http://stackoverflow.com/q/26751962
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26751962
type: Answer
has body: Single line which helped me is to add request = new XMLHttpRequest(); request.open('POST', SERVERHOSTNAME+"/XXXXXX/XXXXXX/XXXXX/XXXXXInsert"); request.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); request.send(req,300000); I found that 500 error is not only related to cross domain and even to other things ..
score: 0

http://stackoverflow.com/q/26714613
type: Question
has comment: http://stackoverflow.com/comment/42019776
accepted answer: http://stackoverflow.com/a/26714658
has body: I am using the below script to create dynamic date. The HTML: &lt;span id="spanDate"&gt;&lt;/span&gt; The Script: var months = ['01','02','03','04','05','06','07', '08','09','10','11','12']; var tomorrow = new Date(Date.now() + (1000*3600*24)); //tomorrow.setTime(tomorrow.getTime() + (1000*3600*24)); document.getElementById("spanDate").innerHTML = ('00' + tomorrow.getDate()).slice(-2) + "/" + months[tomorrow.getMonth()] + "/" + tomorrow.getFullYear(); Fiddle Link What happens is that when I render this code, it displays me a date for the next day (i.e tomorrow) from my machine date and does not displays me today's date. Why is this happening?
score: -1
linked to: http://stackoverflow.com/q/4904667
answer count: 2
possible better answer: http://stackoverflow.com/a/26714677
has comment: http://stackoverflow.com/comment/42019685
has comment: http://stackoverflow.com/comment/42019909
has answer: http://stackoverflow.com/a/26714677
has comment: http://stackoverflow.com/comment/42019657
tagged with: javascript
has comment: http://stackoverflow.com/comment/42020090
favorite count: 0
has comment: http://stackoverflow.com/comment/42020250
has answer: http://stackoverflow.com/a/26714658
has title: Dynamic javaScript date pointing date for tomorrow
has comment: http://stackoverflow.com/comment/42020730
has comment: http://stackoverflow.com/comment/42019753
type: AnsweredQuestion
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/42019611

http://stackoverflow.com/comment/41954300
type: Comment
comment on: http://stackoverflow.com/q/26676925
score: 0
type: QuestionComment
has text: @Bergi no they won't :-/

http://stackoverflow.com/a/26708404
type: Answer
score: 2
has body: Because the input is the first child of its parent span. You need var qty = thisObj.closest('div').children(':nth-child(3)').children("input").val(); or the easiest way is to find the input by its name var qty = thisObj.closest('div').find('input[name="qty[]"]').val();
upvote count: 2
answers question: http://stackoverflow.com/q/26708364
downvote count: 0

http://stackoverflow.com/q/26747388
has body: I have an HTML forum that is submitting with JavaScript: Username: Password: Submit While inside the testChecker function I have: $('user1').innerHTML = 'Enter Username'; //document.getElementById('user1').innerHTML = 'Enter Username'; The problem is when I use getElementById it works fine and its displayed. But when I use $('user1') it doesn't do anything. Any idea?
possible better answer: http://stackoverflow.com/a/26747408
favorite count: 0
has answer: http://stackoverflow.com/a/26747408
has comment: http://stackoverflow.com/comment/42079738
has comment: http://stackoverflow.com/comment/42079780
has comment: http://stackoverflow.com/comment/42080136
type: AnsweredQuestion
downvote count: 3
has comment: http://stackoverflow.com/comment/42079751
upvote count: 1
has answer: http://stackoverflow.com/a/26747439
type: Question
score: -2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26747424
answer count: 3
has title: getElementById alternative $('test1') not working
tagged with: http://stackoverflow.com/tag/html
tagged with: getelementbyid
accepted answer: http://stackoverflow.com/a/26747439

http://stackoverflow.com/a/29813009
has body: There's currently no way to use the new Javascript ES6 of operator from coffeescript (as of 1.9.2). The best option for now is to use s.forEach (x) -&gt; ... or m.forEach (value, key) -&gt; as mentioned above. For a set: s = new Set s.add {a: 1} s.forEach (v) =&gt; console.log v For a map: m = new Map m.set {a: 1}, {b: 2} m.forEach (v, k) =&gt; console.log k, v If you want to avoid creating new functions for whatever reason, you can use iterators directly from coffeescript. But its a little bit nasty. For sets: i = s.values() while(v = i.next(); !v.done) console.log v.value For a map: i = m.entries() while(v = i.next(); !v.done) [key, value] = v.value console.log key, value The parentheses on the while loop are necessary to make the while loop dependant on v.done. They can be done on one line too - but it looks pretty bad: i = s.values(); console.log v.value while(v = i.next(); !v.done)
type: Answer
has comment: http://stackoverflow.com/comment/47755390
has comment: http://stackoverflow.com/comment/47763859
has comment: http://stackoverflow.com/comment/80726541
upvote count: 9
score: 9
answers question: http://stackoverflow.com/q/26719794
has comment: http://stackoverflow.com/comment/47814488
downvote count: 0

asp.net-mvc-4
tags question: http://stackoverflow.com/q/26696017
tags question: http://stackoverflow.com/q/26778932
tag name: asp.net-mvc-4
tags question: http://stackoverflow.com/q/26724982
tags question: http://stackoverflow.com/q/26685606
tags question: http://stackoverflow.com/q/26694024
type: Tag
tags question: http://stackoverflow.com/q/26807325
tags question: http://stackoverflow.com/q/26808609
tags question: http://stackoverflow.com/q/26755212
tags question: http://stackoverflow.com/q/26740814
tags question: http://stackoverflow.com/q/26712372
tags question: http://stackoverflow.com/q/26708704
tags question: http://stackoverflow.com/q/26800389
tags question: http://stackoverflow.com/q/26784634
tags question: http://stackoverflow.com/q/26711530
tags question: http://stackoverflow.com/q/26701098
tags question: http://stackoverflow.com/q/26739335
tags question: http://stackoverflow.com/q/26804730
tags question: http://stackoverflow.com/q/26823822

http://stackoverflow.com/comment/42133356
type: QuestionComment
has text: @Brad: i have ovserved it for 14 hours now. I did a screen record with processor, memory usage and loop file, i saw the system had no issue with RAM, CPU it had enough space. But still it failed to loop after playing for 14 hours. It must be a BUG in Google Chrome/Canary. It would be nice if someone with knowledge report this issue in bug tracker cause its happening only with Chrome/Canary, when i used VLC or Gstreamer it works perfectly fine.
comment on: http://stackoverflow.com/q/26768625
score: 0
type: Comment

http://stackoverflow.com/comment/42115154
type: QuestionComment
type: Comment
has text: do you have a sample url we can look at?
comment on: http://stackoverflow.com/q/26764638
score: 0

http://stackoverflow.com/comment/42047885
type: Comment
comment on: http://stackoverflow.com/a/26727832
has text: It matters on the client side. Obviously if you are using the wrong selector the javascript is not going to work. I understand PHP sees it as ['file'], didn't dispute that.
type: AnswerComment
score: 0

http://stackoverflow.com/a/26746437
has body: You can use one of these alerts, even simpler than modals: If you use Bootstrap, Bootboxjs is for you: http://bootboxjs.com/ Sweetalert is also simple and cool: http://tristanedwards.me/sweetalert
answers question: http://stackoverflow.com/q/26746007
upvote count: 1
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/41993078
type: Comment
has text: I tried that but does not work with my controller $template_image; just shows text.
comment on: http://stackoverflow.com/a/26699625
type: AnswerComment
score: 0

http://stackoverflow.com/q/26809681
has answer: http://stackoverflow.com/a/26809854
answer count: 1
tagged with: dojo
accepted answer: http://stackoverflow.com/a/26809854
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has body: I am having an issue in Dojox charts wherein the zooming in operation is making the data points at the end of the series disappear for some reason. The more I zoom in the more data values I lose. Is there a workaround for this. I am using the MouseZoomAndPan module with a line chart. Attaching code. <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import="atk.graph.*" %>
has title: Dojo chart: zoom in values disappear
type: Question
score: 0

http://stackoverflow.com/comment/42224977
type: QuestionComment
score: 0
has text: What have you tried? If you look around, you'll find tons of examples of Ajax calls. Look into setTimeout();, specifically for the timed/repeated calls.
comment on: http://stackoverflow.com/q/26828752
type: Comment

http://stackoverflow.com/q/26711878
has comment: http://stackoverflow.com/comment/42015044
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26711914
has answer: http://stackoverflow.com/a/26711914
answer count: 2
has body: I know that @ symbol is an operator in regular expressions, but I need to check if it is inserted in a word, then I need to check if @is present. How can I write my regular expression? Actually my reg-exp (in Javascript) is this : /^[a-zA-Z0-9_]+$/ I need to grant the possibility ti insert an @ too. Thanks for your help.
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26711965
tagged with: regex
type: AnsweredQuestion
upvote count: 3
has title: How can I check for an @ in a regular expression?
type: Question
accepted answer: http://stackoverflow.com/a/26711965
score: 3
has comment: http://stackoverflow.com/comment/42015940
tagged with: expression

http://stackoverflow.com/q/26786616
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26786701
accepted answer: http://stackoverflow.com/a/26786701
upvote count: 1
downvote count: 1
type: Question
has title: ng-if angular not working
tagged with: javascript
score: 0
tagged with: angular-ng-if
answer count: 1
has body: My problem is that ng-if is not behaving as i pretend, i have an array of objects with _name attribute, im making a ng-repeat and inside that i want to discern between some that are named in specific way and the others. based on that im making my ng-if, but is printing two times the rows and it contents that should be either one or the other, anyone can point me out where im failing? tks Below the array in clusterEntity.cluster; locations:{ location:[ {_name: "staging", _path: ""}, {_name: "temp", _path: ""}, {_name: "working", _path: ""} ] }, <something here> <something there>
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/q/26676924
has comment: http://stackoverflow.com/comment/41973201
has title: Using XMPP for chat and notification service
linked to: http://stackoverflow.com/q/26507753
type: Question
has comment: http://stackoverflow.com/comment/41955420
tagged with: javascript
score: 0
tagged with: xmpp
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41973191
tagged with: strophe
answer count: 0
type: UnansweredQuestion
has body: I want to set up an XMPP chat and notification service. What I figured out so far is the following: I set up ejabberd and used strophe.js to connect to the BOSH, set the presence, send and receive messages. Though this post is a theoretical question, I hope I still get help. Next to sending chat messages (which is fairly easy) I want to send notification updates with data that i store in an array. I usually use JSON to do the job, yet XMPP is XML orientated and javascript on the client side is not goin to be happy about getting an xml like array. What is the best way to send this data? Is there any chance to use different types of messages to figure out which kind of notification it is? data <x xmlns='jabber:x:event'> <offline/> </x> I hope it can be understood what I am talkin about exactly. So thanks in advance for your answers. Any thoughts appreciated
tagged with: ejabberd

http://stackoverflow.com/a/26730799
upvote count: 2
has body: Try using the following code to toggle the audio of your video: $("#audio").click( function (){ $("#background").prop('muted', !$("#background").prop('muted')); });
downvote count: 0
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26730505

http://stackoverflow.com/comment/42108687
score: 1
comment on: http://stackoverflow.com/q/26763460
type: Comment
type: QuestionComment
has text: You have lots of problems with this code - select option values not matching class names, jQuery selectors pointing to the wrong level of divs. Rather than list all the changes in an answer, I've updated your fiddle to get it closer to what you want - http://jsfiddle.net/Rhumborl/tpvj0jv0/3/. Bottom line, always check line-by-line when something isn't working, starting with the obvious things - everyone gets those wrong from time to time, however experienced they are...

http://stackoverflow.com/a/26793169
has comment: http://stackoverflow.com/comment/42161676
upvote count: 2
has body: This has everything to do with closures. What's happening is that compile() must return a function that takes a variable, in this case scope. Let's look at a simpler example: function adder (first) { return function (second) { return first + second; }; }; adder(2)(3); // returns 5 var add2 = adder(2); // add2 now equals function (second) { return 2 + second; } add2(4); // returns 6 Often, a reason why you'd do this is because you want to reuse a function in a lot of ways. In the case of compile, you could run compile once, and reuse it with a number of different objects (or scopes). Also, you can make a number of variations with it. i.e. The example above could be adder3, adder4, etc. Compile probably has some behavior like this: function compile(html) { // Some code here to turn string template into something more useable return function (scope) { // Scope being an object with values to plug into a template return DOM_element; } }
type: Answer
has comment: http://stackoverflow.com/comment/42161609
has comment: http://stackoverflow.com/comment/42161633
has comment: http://stackoverflow.com/comment/42161774
score: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42161935
has comment: http://stackoverflow.com/comment/42161821
has comment: http://stackoverflow.com/comment/42162011
answers question: http://stackoverflow.com/q/26793090
has comment: http://stackoverflow.com/comment/42161749

http://stackoverflow.com/comment/42100442
type: Comment
comment on: http://stackoverflow.com/a/26759170
type: AnswerComment
has text: Actually i am able to access data the way you have answered, but i am atrying to learn rest adapter and i would like to know how to do that.I only want to know how to access that rest adapter response in route. if i am missing some methods plz let me know that.
score: 0

http://stackoverflow.com/a/26708601
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26708371
has body: Comment dataType like below and try this. $(document).ready(function(){ var requestURL = 'http://www.football-data.org/soccerseasons?callback=?'; $.ajax({ type: 'GET', // dataType: 'json', // comment datatype url: requestURL, success: function(data){ console.log(data) } }); });
score: 1

http://stackoverflow.com/q/26782178
has comment: http://stackoverflow.com/comment/42180314
tagged with: javascript
has comment: http://stackoverflow.com/comment/42141531
tagged with: ajax
has comment: http://stackoverflow.com/comment/42142226
upvote count: 1
has comment: http://stackoverflow.com/comment/42144317
has comment: http://stackoverflow.com/comment/42141571
has title: Ajax data variable is confusing for me, what I should put if I use only Javascript? (No JSON or JQuery)
has body: Well, yesterday I started learning how to use AJAX and well I saw this page: http://www.formget.com/submit-form-using-ajax-php-and-jquery/ where everything was well explained. So, I coded the next: if(isset($_POST['edited'])) { $real_name = mysqli_real_escape_string($conn, $_POST['real_name']); $email = mysqli_real_escape_string($conn, $_POST['email']); $gender = mysqli_real_escape_string($conn, $_POST['gender']); $date_day = mysqli_real_escape_string($conn, $_POST['date_day']); $date_month = mysqli_real_escape_string($conn, $_POST['date_month']); $date_year = mysqli_real_escape_string($conn, $_POST['date_year']); $final_date = $date_day."-".$date_month."-".$date_year; $location = mysqli_real_escape_string($conn, $_POST['location']); $web_title = mysqli_real_escape_string($conn, $_POST['web_title']); $web_url = mysqli_real_escape_string($conn, $_POST['web_url']); $skype = mysqli_real_escape_string($conn, $_POST['skype']); if($my_stats['real_name'] != $_POST['real_name']) { mysqli_query($conn, "UPDATE users SET real_name = '$real_name' WHERE id = '$my_id'"); } if($my_stats['email'] != $_POST['email']) { $act = md5(time()); mysqli_query($conn, "UPDATE users SET email = '$email' WHERE id = '$my_id'"); mysqli_query($conn, "UPDATE users SET activation = '$act' WHERE id = '$my_id'"); mail($email, 'GimmeAHit! - Activación de correo', '¡Hola! Para activar tu cuenta visita el siguiente link: http://'.$_SERVER['SERVER_NAME'].'/?action=act&amp;code='.$act); } if($my_stats['gender'] != $_POST['gender']) { mysqli_query($conn, "UPDATE users SET gender = '$gender' WHERE id = '$my_id'"); } if($my_stats['birthdate'] != $final_date) { mysqli_query($conn, "UPDATE users SET birthdate = '$final_date' WHERE id = '$my_id'"); } if($my_stats['location'] != $_POST['location']) { mysqli_query($conn, "UPDATE users SET location = '$location' WHERE id = '$my_id'"); } if($my_stats['web_title'] != $_POST['web_title']) { mysqli_query($conn, "UPDATE users SET web_title = '$web_title' WHERE id = '$my…
has comment: http://stackoverflow.com/comment/42141598
favorite count: 0
has comment: http://stackoverflow.com/comment/42142804
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42142063
has comment: http://stackoverflow.com/comment/42141687
tagged with: php
has comment: http://stackoverflow.com/comment/42141736
has comment: http://stackoverflow.com/comment/42141630
downvote count: 0
has comment: http://stackoverflow.com/comment/42144323
score: 1
tagged with: mysql
has comment: http://stackoverflow.com/comment/42142024
type: Question
has comment: http://stackoverflow.com/comment/42141829

http://stackoverflow.com/a/26808702
has comment: http://stackoverflow.com/comment/42191115
has comment: http://stackoverflow.com/comment/42191857
has comment: http://stackoverflow.com/comment/42191769
answers question: http://stackoverflow.com/q/26808590
score: 0
has comment: http://stackoverflow.com/comment/42190334
has comment: http://stackoverflow.com/comment/42190149
has comment: http://stackoverflow.com/comment/42191267
type: Answer
has comment: http://stackoverflow.com/comment/42191192
has body: since collection.find is asynchronous method that doesn't return immediately you need to change your code to, you can pass a callback function function userExists(db, uid,callback){ var collection = db.get('users'); collection.find({"uid":uid},{},function(e,docs){ callback(docs.length); }); } now you can call this userExists function as userExists(db, uid,function(ret){ //do something here })

http://stackoverflow.com/comment/42066640
has text: .br-widget class does not exist also i don't see a element in the html code
score: 0
comment on: http://stackoverflow.com/q/26740244
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42079699
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26747134
has text: @bowheart If I drag all users from one group to another I can't drag them back. I mean If in `ADMIN` group there are no users (they are all in `MIX` group) in that case I cannot to drag any users back to Admin group.

http://stackoverflow.com/q/26695276
upvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41985681
has answer: http://stackoverflow.com/a/26695295
has comment: http://stackoverflow.com/comment/41985637
accepted answer: http://stackoverflow.com/a/26695295
downvote count: 1
has comment: http://stackoverflow.com/comment/41985702
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26695307
score: -1
tagged with: forms
has title: Multiple choice quiz - issue with radio buttons and functions
has answer: http://stackoverflow.com/a/26695307
type: Question
answer count: 2
tagged with: radio-button
has body: I'm trying to create a multiple choice quiz using simple functions and radio buttons in the HTML form tags but it is only allowing me to check one radio button for the whole quiz instead of one per question. Also, the submit button is not activating the function checkAll, I don't know if this is because I am trying to do something impossible or simple because I'm just missing something. Any help would be appreciated! The code is below. . . I'm only new to JavasScript and html as well as StackOverflow, so sorry if I'm doing anything wrong with this question. Question1: Where in the world would you find the Spire? Kerry. Galway. Dublin. Donegal. Question2: Where in the world would you find the Colosseum? Taipei. Rome. Reykjavic. Brussels. Question3: Where in the world would you find the Taj Mahal? London. Brisbane. Paris. Agra. Question4: Where in the world would you find the Parthenon? Edinburgh. Oslo. Athens. Pyongyang. Question5: Where in the world would you find the Niagara Falls? Hong Kong. Moscow. New York. Ottawa.

http://stackoverflow.com/q/26827239
tagged with: angularjs
upvote count: 3
has comment: http://stackoverflow.com/comment/42222883
type: AnsweredQuestion
score: 3
type: Question
has answer: http://stackoverflow.com/a/26827614
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has title: How to detect that user is offline after an $http request
accepted answer: http://stackoverflow.com/a/26827614
has body: I'd like to test for the network connectivity (online/offline) after an unsuccessful request with the $http service in AngularJs. When looking for all the available response params in the error handler, I don't see anything that could help me. Thanks for helping, Olivier Code for the request: $http({ method: method, url: url, data: data, headers: headers }) .success(function (result) { deferred.resolve(result); }) .error(function (data, status, headers, config, statusText) { console.log(data); console.log(status); console.log(headers); console.log(config); console.log(statusText); deferred.reject(); }); Result in the console: GET http://192.168.0.12:3000/test net::ERR_INTERNET_DISCONNECTED ionic.bundle.js:16185 backEnd.js:25 0 backEnd.js:26 function (name) { if (!headersObj) headersObj = parseHeaders(headers); if (name) { return headersObj[lowercase(name)] || null; } return headersObj; } backEnd.js:27 Object {method: "GET", transformRequest: Array[1], transformResponse: Array[1], url: "http://192.168.0.12:3000/test", data: null…} backEnd.js:28 undefined backEnd.js:29

http://stackoverflow.com/a/26702429
has comment: http://stackoverflow.com/comment/41998706
downvote count: 0
has body: background-image is a CSS property, so use the .css method: var img = $('#id').css('background-image'); The call above will return the computed style property (containing url(path)). To remove the url part use a regex replace: img = img.replace(/^url\(|\)$/g, &quot;&quot;); You can do it one-line as follows: var img = $('#id').css('background-image').replace(/^url\(|\)$/g, &quot;&quot;); .css( propertyName ) Get the computed style properties for the first element in the set of matched elements.
has comment: http://stackoverflow.com/comment/41998761
type: Answer
answers question: http://stackoverflow.com/q/26702398
has comment: http://stackoverflow.com/comment/42064802
score: 5
has comment: http://stackoverflow.com/comment/41998875
upvote count: 5
has comment: http://stackoverflow.com/comment/41999014

http://stackoverflow.com/comment/41951412
type: QuestionComment
has text: You may want to paste this all into a jsfiddle and link it here.
comment on: http://stackoverflow.com/q/26673951
score: 0
type: Comment

http://stackoverflow.com/comment/42213764
score: 0
type: AnswerComment
type: Comment
has text: I don't know where this `$event.$target` is, but at any rate this sounds like a different question that you should post.
comment on: http://stackoverflow.com/a/26821593

http://stackoverflow.com/q/26759490
has comment: http://stackoverflow.com/comment/42113990
possible better answer: http://stackoverflow.com/a/26767077
tagged with: mysql
type: Question
has comment: http://stackoverflow.com/comment/42113793
has comment: http://stackoverflow.com/comment/42113877
answer count: 2
score: 2
has answer: http://stackoverflow.com/a/26846151
downvote count: 0
has body: I am working with two different tables that are in different servers. I am trying to compare the USERNAME field values from table "workstation_userlogged" and the MEMO_CODE field value (they are usernames) from table "telephony". I get the "memo_code" values with the use of a Stored Procedure as you will see in the code below. How can I save all the results returned from both tables, loop through them to match all usernames and then save the data so it can be returned with AJAX? This script will only run when an AJAX request button is clicked. So, I need to bring the data back and display it like so: If matching usernames from both tables: user: JOE time: 300 If no matching usernames: user: MARC time: N/A Some usernames from "workstation_userlogged" do not exist in the other table and vice versa. I know it has to do with handling arrays and all but I've been stuck for hours and wasn't able to accomplish it.I need to clarify things please ask. Thanks in advance! map.php HTML/AJAX: How do I fix this? AHT $(document).ready(function() { $('#aht').click(function(){ $.ajax({ type:"POST", url : "show_aht.php", data: { }, // pass data here success : function(data){ }//end success });//end ajax });//end click });//end rdy show_aht.php: when AJAX request is sent <?php Stored PRocedure just to show what I did: //get the StoredProcedure from the "query" field in the overlay table //and store it as a variable for later use for the AHT button if($row = mysqli_fetch_assoc($query_overlay_result)){ $sp_value = $row['query']; } Table workstation_userlogged: The results from this WHILE LOOP need to be matched with the results of the StoredProcedure below //the displayed users values will have to be matched with memo_code $user_data = array(); while($row = mysqli_fetch_assoc($get_user_result)){ $user_data[] = "user: " .$row['username']; } This is where I am trying to compare both usernames and bring the data back to map.php but had no luck. /********************************************…
tagged with: javascript
has title: PHP: How to compare/save different ARRAYS from different WHILE loops and send data to AJAX?
tagged with: ajax
has comment: http://stackoverflow.com/comment/42114342
tagged with: mysqli
has comment: http://stackoverflow.com/comment/42114410
favorite count: 0
accepted answer: http://stackoverflow.com/a/26846151
upvote count: 2
has answer: http://stackoverflow.com/a/26767077
tagged with: php
has comment: http://stackoverflow.com/comment/42114235
type: AnsweredQuestion

http://stackoverflow.com/q/26733811
tagged with: extjs
answer count: 1
accepted answer: http://stackoverflow.com/a/26736571
favorite count: 0
has comment: http://stackoverflow.com/comment/42054371
has comment: http://stackoverflow.com/comment/42054395
upvote count: 2
downvote count: 6
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/200284
score: -4
has answer: http://stackoverflow.com/a/26736571
type: Question
has body: I hope to find a Javascript UI framework which is stable, free, fast, browser-cross(support IE8), rich UI.
tagged with: frameworks
has title: Is there any javascript framework like extjs?
has comment: http://stackoverflow.com/comment/42054487
tagged with: javascript

http://stackoverflow.com/comment/42207964
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26818718
type: Comment
has text: Just to be on the same page: when you select "others", do you want the textbox to be empty or do you want it to be populated with some value?

http://stackoverflow.com/comment/42262042
type: AnswerComment
score: 0
has text: @tasserKATT, fyi - discovered this didn't work for child scopes (like ng-repeat="address in addressList") and I gave up.
type: Comment
comment on: http://stackoverflow.com/a/26822100

http://stackoverflow.com/a/26746227
answers question: http://stackoverflow.com/q/26746007
downvote count: 0
type: Answer
score: 2
upvote count: 2
has body: The IE version of prompt does not dynamically resize. You should only be using prompts for small messages, not whole paragraphs. like e-mail: or username: You should have any explanation stuff inline on the web page. or better yet don't use prompt's at all and use inline forms.

http://stackoverflow.com/q/26712372
has answer: http://stackoverflow.com/a/26713844
has title: Uncaught TypeError: undefined is not a function in datepicker
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/35426704
tagged with: datepicker
linked to: http://stackoverflow.com/q/23232897
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/42016194
upvote count: 3
accepted answer: http://stackoverflow.com/a/26713844
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/42015914
has comment: http://stackoverflow.com/comment/42015853
has answer: http://stackoverflow.com/a/26713241
type: Question
has body: I am trying to use date picker of jquery in mvc4. It was giving me error: Uncaught TypeError: undefined is not a function My jQuery function is like: $(document).ready(function () { $('#dpFrom').datepicker(); }); html part is like: I refered : Uncaught TypeError: undefined is not a function while using jQuery UI And included : So total javascript became: Still its giving me error. Please help...
has comment: http://stackoverflow.com/comment/42017576
downvote count: 0
possible better answer: http://stackoverflow.com/a/26713241
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26821573
answer count: 1
tagged with: angularjs
has answer: http://stackoverflow.com/a/26821593
accepted answer: http://stackoverflow.com/a/26821593
type: AnsweredQuestion
has body: i've an ng-include bootstrapped actually {{speaker.name}} {{speaker.title}}, {{speaker.company}} ng-include is boostrapping var self = this; angular.module(this.constructor.NAME, []) .controller("SpeakerController", function($scope, $location){self.speakerController($scope, $location)}) angular.bootstrap(document.getElementById("speakers"), [this.constructor.NAME]); and then the speakerController speakerController: function($scope, $location) { var self = this; $scope.myFunc = function(param){console.log('in');self.myFunc(param)} }, myFunc: function(param) { console.log(param); },
type: Question
has title: ng-click not working within bootstrapped ng-include
tagged with: javascript
tagged with: angularjs-ng-include
score: 0

http://stackoverflow.com/a/26785816
has comment: http://stackoverflow.com/comment/42150776
answers question: http://stackoverflow.com/q/26774321
downvote count: 0
has comment: http://stackoverflow.com/comment/42186279
has comment: http://stackoverflow.com/comment/42150647
type: Answer
has comment: http://stackoverflow.com/comment/42185138
has comment: http://stackoverflow.com/comment/42186080
has comment: http://stackoverflow.com/comment/42148943
has comment: http://stackoverflow.com/comment/42186271
upvote count: 1
has body: I solve sticky headers with a plugin that is a little smarter about handling widths than I am with my custom rolled CSS and HTML. Datatables is my weapon of choice. Here's a working demo: https://datatables.net/extensions/fixedheader/ One hidden benefit -- it's going to be far less markup for the browser (and you) to deal with. If you go this route and use the HTML table option, don't forget to use properly formatted html tables with &lt;head&gt; and &lt;body&gt; elements, as Datatables is quite particular.
score: 1

http://stackoverflow.com/a/26787353
accepted answer of: http://stackoverflow.com/q/26784639
type: AcceptedAnswer
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42177289
answers question: http://stackoverflow.com/q/26784639
has body: I know this has already been answered but just to add another option, underscore has a pluck method for just this use case, where you want to pluck an attribute from a list. you provied it the list then the name of the property you want to extract. It will then return an array of the property from each each item in the list. divisions = [{ name: "Orioles", division: "AL East" }, { name: "Yankees", division: "AL East" } ] divisionNames = _.pluck(divisions, "name"); console.log(divisionNames); &lt;script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.7.0/underscore-min.js"&gt;&lt;/script&gt;

http://stackoverflow.com/comment/42198813
comment on: http://stackoverflow.com/q/26812190
type: Comment
type: QuestionComment
has text: @mscdex, right, I got it all working because I redid everything. But, you can write that as an answer if you want.
score: 0

http://stackoverflow.com/q/26767719
tagged with: twitter-bootstrap
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/34004453
has answer: http://stackoverflow.com/a/26767911
upvote count: 1
score: 1
type: Question
has body: I am using JavaScript and Bootstrap for validation in my form. Everything works the way it should when I make all of these 4 fields required. However, I need an either/or situation. For example, if the first two fields, 'name' and 'SIN' are filled, then 'BusinessName' and 'BusinessID' are not required and vice versa. Here is the current code: Name SIN # Business Name Business #
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: jqbootstrapvalidation
has title: JavaScript Bootstrap validation
favorite count: 0

http://stackoverflow.com/comment/42209399
comment on: http://stackoverflow.com/q/26819865
has text: Write a script that just returns what should go into `#container`, and call that with `.load()` instead of calling the main `.index.php`.
score: 2
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26754332
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42091934
has comment: http://stackoverflow.com/comment/42091666
type: Question
has comment: http://stackoverflow.com/comment/42091825
has body: This problem is annoying me because it works with one set of images and not with another. I have a this object: function PreLoader(toLoad, parent, images) { var errored = 0; var loaded = 0; var toLoad = toLoad; function allLoaded() { // reset the counters so it can be used again loaded = 0; errored = 0; // determine which img is the tallest var l = 0; for (var i = 0; i < images.length; i++) { l = (l > images[i].height()) ? l : images[i].height(); } // set the height of the container to the tallest // unless it's already bigger // height() is from jQuery if (parent.obj.height() < l) parent.obj.css("height", l); } this.load = function() { ++loaded; if (loaded + errored == toLoad) allLoaded(); }; this.error = function() { ++errored; if (loaded + errored == toLoad) allLoaded(); }; } I have been using it in a similar way to this: var parent = {obj: $("#some-img-container")}; var slabLoader = new PreLoader(2, parent, [external.slab, internal.slab]); external.slab.src = "2.png"; external.slab.onload = slabLoader.load; external.slab.onerror = slabLoader.error; internal.slab.src = "1.png"; internal.slab.onload = slabLoader.load; internal.slab.onerror = slabLoader.error; The problem is, sometimes it doesn't work. I have multiple sets of images that are absolute positioned because they are layered on top of each other, but they can be different heights. Obviously I can't hard code the heights because I don't know what they are before the page loads... and because absolute positioned elements don't affect their parents size I can't rely on things like height: 100%. var l in the allLoaded() function sometimes returns 0 even though the images should be loaded by the time that is called. Am I correct in this statement or am I doing something wrong and it only works sometimes because of luck? The html looks like this: Some Image Sorry if the question is a bit difficult to understand. UPDATE: If I use .naturalHeight instead of jQuery .height()I get the height of the actual image on …
has title: javascript loaded img still has 0 height
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27061070
linked to: http://stackoverflow.com/q/3588102
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27061070
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42091979
tagged with: css

http://stackoverflow.com/comment/41986864
has text: Have you tried using the [`cors`](https://github.com/troygoode/node-cors) middleware instead of trying to manually?
score: 0
comment on: http://stackoverflow.com/q/26695481
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42148972
type: QuestionComment
has text: Can you suggest me some short way? @Royal Bg
comment on: http://stackoverflow.com/q/26785942
score: 0
type: Comment

http://stackoverflow.com/comment/42080342
comment on: http://stackoverflow.com/a/26745497
has text: @apparatix, glad it helped. In the case you show there's no need for a promise unless you don't want to _start_ the computation until later.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26727122
has body: This is my HTML code.I'm not using Upload Here is JS jQuery('#upload').on('click', function() { var file_data = jQuery('#sortpicture').prop('files')[0]; var form_data = new FormData(); form_data.append('file', file_data); form_data.append('id', 7); // ---> If I send this only i'm able to access `id` in php. If include `file` not access id in php file. jQuery.ajax({ url: 'upload.php', cache: false, contentType: false, processData: false, data: form_data, type: 'POST', success: function(response){ }, error:function(e){ } }); PHP file $name = $_FILES['file']['name']; //print_r($_FILES); $id = $_POST['id']; // Unable to get id. How can I get id in php file.Any suggestions please.
tagged with: php
has comment: http://stackoverflow.com/comment/42043124
type: Question
has title: Unable send data to php file via ajax
tagged with: javascript
has comment: http://stackoverflow.com/comment/42045928
linked to: http://stackoverflow.com/q/10899384
score: 0
has answer: http://stackoverflow.com/a/26727832
answer count: 1
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion

http://stackoverflow.com/q/26809811
accepted answer: http://stackoverflow.com/a/26809891
has title: Validate expression in javascript regex
tagged with: javascript
has answer: http://stackoverflow.com/a/26810318
has comment: http://stackoverflow.com/comment/42192245
has comment: http://stackoverflow.com/comment/42192647
downvote count: 4
type: AnsweredQuestion
favorite count: 0
score: -1
type: Question
possible better answer: http://stackoverflow.com/a/26809837
has answer: http://stackoverflow.com/a/26809891
has answer: http://stackoverflow.com/a/26809892
has comment: http://stackoverflow.com/comment/42192264
has body: Needed javascript regex to validate below expressions : 1+2 should return true 1+2+4 should return true 1+2+3+4 should return true 1 should return true +2 should return false 2+2+ should return false In above examples I used only "+", however I have operators as "+","-","/","*". Thanks for your help
has answer: http://stackoverflow.com/a/26809837
tagged with: regex
has comment: http://stackoverflow.com/comment/42192511
upvote count: 3
has comment: http://stackoverflow.com/comment/42192298
answer count: 4

http://stackoverflow.com/comment/79054935
type: AnswerComment
comment on: http://stackoverflow.com/a/26729553
type: Comment
has text: @satishkumarV You just need to make sure your controller is inside your app directive ("ng-app") and everything was correctly bound. For instance, `app.controller('FirstCtrl', FirstCtrl)`, etc.
score: 1

http://stackoverflow.com/a/49519597
upvote count: 6
score: 6
downvote count: 0
answers question: http://stackoverflow.com/q/26820656
type: Answer
has body: You can use: &lt;img draggable="false"... Or in CSS like this (May not be supported by all browsers, esp IE) pointer-events: none;

http://stackoverflow.com/comment/42472586
type: Comment
comment on: http://stackoverflow.com/a/26702768
has text: My friend as i said before im non javascript guy could tell me what does this code does what hash and how can i get that ?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41975921
comment on: http://stackoverflow.com/q/26689301
score: 0
type: QuestionComment
has text: @specialscope Yes, I think so too, but I only do "i--" if a node has a grandchild, so I don't understand why it won't stop at some point.
type: Comment

http://stackoverflow.com/comment/41964175
type: AnswerComment
type: Comment
has text: I think I understand now. I wasn't putting together that all attributes get their data from the array buffer. Thank you for the help!
score: 0
comment on: http://stackoverflow.com/a/26678352

http://stackoverflow.com/a/26731544
answers question: http://stackoverflow.com/q/26731476
type: Answer
has body: You're missing a paranthesis end on the }while... line &lt;script type='text/javascript'&gt; var done; do{ var num = prompt("Enter Number", "0") //prompt user to enter the number number = parseInt(num); //parse the num to number var i; document.write('&lt;table border="1" cellspacing="0"&gt;'); for(i=1;i&lt;=12;i++) { document.write("&lt;tr&gt;&lt;td&gt;" + i + " x " + number + " = " + number*i + "&lt;/td&gt;&lt;/tr&gt;"); } document.write("&lt;/table&gt;"); }while(window.confirm("Do you want to enter another number to show another multiplication table?"))
score: 0

http://stackoverflow.com/comment/42075402
has text: Thanks, that was obvious and hard to spot at the same time!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26742985
type: Comment

http://stackoverflow.com/comment/42032524
type: Comment
comment on: http://stackoverflow.com/q/26720288
has text: Thanks Lars – spot-on as always. Your solution implemented here: http://bl.ocks.org/alimzi/7ae652bbecebb2c03fac Only problem was that all lines displayed initially, *then* vanished and drew themselves out. I fixed that by toggling the "display" attribute during the transition. I'd love to mark this as "answered", but I don't think I can do that on a comment...? Also, I can't be the only member of the D3 community who wants to buy Lars a pony to say "thank-you" for all the help.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42051919
score: 0
comment on: http://stackoverflow.com/a/26732316
type: AnswerComment
type: Comment
has text: Awh thank you. I was stuck on that for far too long. Also do you have any idea how I would prevent the form from submitting if the oder of the array of images is not equal to correct? Right now even with an if else statement it seems to be allowing me to submit whether or not the order is equal to correct.

http://stackoverflow.com/a/26810204
has body: It has to do with load times. You could theoretically use your css to make them automatically render side-by-side with floats or inline-block and then in the javascript file disable that css by removing the class or simply removing the css. If it were me I wouldn't worry about it though. On my machine I could barely scroll down fast enough to see the vertical load. It could be an issue for users with slower internet I suppose.
type: Answer
answers question: http://stackoverflow.com/q/26809662
score: 0

http://stackoverflow.com/q/26804679
favorite count: 0
has answer: http://stackoverflow.com/a/26806316
accepted answer: http://stackoverflow.com/a/26806316
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/26638774
has body: recently I started playing with canvas element. Now I am able to draw lines(as many as I wish) on a canvas with mouse. You can see it here in the code: https://jsfiddle.net/saipavan579/a6L3ka8p/. var ctx = tempcanvas.getContext('2d'), mainctx = canvas.getContext('2d'), w = canvas.width, h = canvas.height, x1, y1, isDown = false; tempcanvas.onmousedown = function(e) { var pos = getPosition(e, canvas); x1 = pos.x; y1 = pos.y; isDown = true; } tempcanvas.onmouseup = function() { isDown = false; mainctx.drawImage(tempcanvas, 0, 0); ctx.clearRect(0, 0, w, h); } tempcanvas.onmousemove = function(e) { if (!isDown) return; var pos = getPosition(e, canvas); x2 = pos.x; y2 = pos.y; ctx.clearRect(0, 0, w, h); drawEllipse(x1, y1, x2, y2); } function drawEllipse(x1, y1, x2, y2) { var radiusX = (x2 - x1) * 0.5, radiusY = (y2 - y1) * 0.5, centerX = x1 + radiusX, centerY = y1 + radiusY, step = 0.01, a = step, pi2 = Math.PI * 2 - step; ctx.beginPath(); ctx.moveTo(x1,y1); for(; a &lt; pi2; a += step) { ctx.lineTo(x2,y2); } ctx.closePath(); ctx.strokeStyle = '#000'; ctx.stroke(); } function getPosition(e, gCanvasElement) { var x; var y; x = e.pageX; y = e.pageY; x -= gCanvasElement.offsetLeft; y -= gCanvasElement.offsetTop; return {x:x, y:y}; }; Now I want to draw arrow headed lines(for pointing to some specific point on a image) in the same way as I am drawing the lines. How can do that? Thank you in advance.
has comment: http://stackoverflow.com/comment/42182833
upvote count: 8
type: Question
has comment: http://stackoverflow.com/comment/42182978
score: 7
has comment: http://stackoverflow.com/comment/42182923
tagged with: canvas
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42183353
tagged with: javascript
has comment: http://stackoverflow.com/comment/42182879
has title: How can I draw arrows on a canvas with mouse

http://stackoverflow.com/q/26684334
tagged with: canvas
downvote count: 0
tagged with: javascript
tagged with: dom-events
tagged with: module-pattern
answer count: 1
has title: How can I call functions from module patterns from an event function
favorite count: 0
has body: I am experimenting with the Javascript module pattern and the html5 canvas by making a simple html5 based game and have run into my first obstacle. I am listening for a mousemove event over a canvas. init: function () { var gameCanvas = document.getElementById("gameCanvas"); gameCanvas.addEventListener("mousemove", this.redrawAvatar); } What I'm doing is letting my avatar follow the movement of the mousepointer over the canvas. The problem then is that I have several functions in my module which I wish to call from inside the redrawAvatar function, like so: redrawAvatar: function (mouseEvent) { var gameCanvas = document.getElementById("gameCanvas"), avatarCoord = {x: mouseEvent.offsetX, y: mouseEvent.offsetY}, enemyCoord = {x: 100, y: 100}; this.clear(gameCanvas); this.drawAvatar(avatarCoord); this.drawEnemy(enemyCoord); if (that.isCollision({coord: avatarCoord, size: 30}, {coord: enemyCoord, size: 30})) { alert("Avatar died, collided with enemy"); } } While inside redrawAvatar the this object is not my module anymore but is instead the source of the event (the canvas in this case). Here is the essence of my module: var MyGame = (function () { var Game = { draw: function (image, coord) {}, drawAvatar: function (coord) {}, clear: function (canvas) { canvas.width = canvas.width + 1 - 1;}, drawEnemy: function (xPos, yPos) {}, isCollision: function (a, b) {}, redrawAvatar: function (mouseEvent) { var gameCanvas = document.getElementById("gameCanvas"), avatarCoord = {x: mouseEvent.offsetX, y: mouseEvent.offsetY}, enemyCoord = {x: 100, y: 100}; this.clear(gameCanvas); this.drawAvatar(avatarCoord); this.drawEnemy(enemyCoord); if (that.isCollision({coord: avatarCoord, size: 30}, {coord: enemyCoord, size: 30})) { alert("Avatar died, collided with enemy"); } }, init: function () { var gameCanvas = document.getElementById("gameCanvas"); gameCanvas.addEventListener("mousemove", this.redrawAvatar); } }; (function () { var that = Game; that.init(); }()); }()); How do I get to the…
accepted answer: http://stackoverflow.com/a/26684380
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26684380
score: 1
type: Question

http://stackoverflow.com/comment/42023669
type: Comment
score: 0
has text: @rkmax Thank you. I tried like this. . But I'm not able to bind the variables with the controller .Any help on this ?
comment on: http://stackoverflow.com/q/26715571
type: QuestionComment

http://stackoverflow.com/q/26765793
has title: How can I bind bootstrap date time picker values to an angular model
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26765898
type: Question
has body: How can I bind bootstrap date time picker values to an angular model My model looks like this: $scope.Video = { StartTime: '', In my controller my date function looks like this: $(function() { $("#datetimepicker1").datetimepicker(); }); Here is my html: &lt;div class='input-group date' id='datetimepicker1' &gt; &lt;input ng-model="Video.StartTime" type='text' class="form-control" id="inputStartTime" /&gt; &lt;span class="input-group-addon"&gt;&lt;span class="glyphicon glyphicon-calendar"&gt;&lt;/span&gt; &lt;/span&gt; &lt;/div&gt; When a date is selected form my date picker the input field is populated however my angular model Video.StartTime isn’t assigned the value. I have tried adding the following to the date picker function which didn’t work: $scope.Video.StartTime = $("#datetimepicker1").value;
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/q/26807674
has answer: http://stackoverflow.com/a/26807719
type: UnansweredQuestion
downvote count: 1
has body: This loop crashes the browser when run, but I can't see why - function getN is one function of three designed to factorise quadratic equations. I am sure it is the loop causing the problem, I have tested this and the browser only crashes when the for loop is present. Any help will be appreciated. function getN(decP){ var a = document.getElementById("a-f").value; var b = document.getElementById("b-f").value; var c = document.getElementById("c-f").value; var n_1 =0; var n_2 =0; var result = Math.pow(10, (decP*-1)); var a_c = a*c; var neg_a_c = 0; var pos_a_c = 0; if(a_c&lt;0){ neg_a_c = a_c; pos_a_c = a_c*-1 } else{ pos_a_c = a_c; neg_a_c = a_c*-1; } for(x=neg_a_c;x&lt;=pos_a_c;x+result){ if(x!==0){ if(x+(a_c/x)===b){ var num1 = x; var num2 = a_c/x; } } } divideByCoefficient(num1, num2) };
score: 0
tagged with: loops
upvote count: 1
has comment: http://stackoverflow.com/comment/42188199
type: Question
tagged with: for-loop
tagged with: javascript
has comment: http://stackoverflow.com/comment/42188170
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: JavaScript for loop crashes browser
favorite count: 0

http://stackoverflow.com/q/26690518
downvote count: 1
type: AnsweredQuestion
has body: I am attemptint to create a Google Chart (Table chart) with the following JavaScript: &lt;script&gt; function drawChart() { var options = { width: 700 }; $.getJSON('/LifeListComparison/GetComparison', null, function (jsonData) { }).success(function (jsonData) { data = new google.visualization.DataTable(jsonData); chart = new google.visualization.Table(document.getElementById('GoogleTable')); chart.draw(data, options); }).fail(function (jqXHR, textStatus, errorThrown) { alert('Error: ' + textStatus + ' ' + errorThrown); }); } google.load('visualization', '1.0', { 'packages': ['table'], 'callback': drawChart }); &lt;/script&gt; The JS code is working fine and the success function is getting called. However, Google Charts is telling me the JSON being returned from the C# service method is invalid. The JSON is as follows: { "cols": [ {"type": "string" ,"label": "Common Name" }, {"type": "string" ,"label": "Scientific Name" }, {"type": "number" ,"label": "Sort Order" }, {"type": "number" ,"label": "Period 1" }, {"type": "number" ,"label": "Period 2" }, {"type": "number" ,"label": "Period 3" }, {"type": "number" ,"label": "Period 4" }, {"type": "number" ,"label": "Period 5" } ], "rows" : [ {"c" : [{"v": "American Coot"}, {"v": "Fulica americana"}, {"v": 3615}, {"v": True}, {"v": True}, {"v": False}, {"v": False}, {"v": False}]}, {"c" : [{"v": "American Crow"}, {"v": "Corvus brachyrhynchos"}, {"v": 19073}, {"v": True}, {"v": False}, {"v": False}, {"v": False}, {"v": False}]} ] } The JSON looks perfectly valid to me, so I must be overlooking something.
tagged with: http://stackoverflow.com/tag/json
score: -1
has title: Why is this an invalid JSON string for Google Charts
has comment: http://stackoverflow.com/comment/41977813
type: Question
answer count: 2
tagged with: google-visualization
upvote count: 0
has answer: http://stackoverflow.com/a/26690574
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/26690561
has answer: http://stackoverflow.com/a/26690561
accepted answer: http://stackoverflow.com/a/26690574

http://stackoverflow.com/q/26762906
upvote count: 2
has comment: http://stackoverflow.com/comment/42107150
type: Question
has comment: http://stackoverflow.com/comment/42118810
has title: Why does my div disappear after some AJAX calls?
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
score: 2
has body: I have problem I am suffering from for 4 days now. I am making a movie registry webpage. I made a smaller test project to reconstruct the error I get. divpingpong.php: I have 3 divs (A, B and C) and a pencil button outside of them. I include an uploader in div B first inside a #placeholder div (when the page loads). I want to use this #placeholder multiple times. For example if the user switches to div B, I want to make the uploader visible with javascript. I use the jQuery .appendTo function to move the #placeholder to the place I wish, then .show() it. Div A won't need the uploader. When user clicks on the pencil icon I want to display div C with a content loaded by AJAX and moving the uploader into it. On switching back to div B I want #placeholder to move back into div B. div_ccontent.php: This is the file, which is called by AJAX and has the content of div C. It also contains some sort of JS code, which helps (or at least intented to) to move the uploader into the right place. The problem: After a few (more than 1) AJAX calls my entire #placeholder div seems to disappear completely. It mustn't disappear, because I want use it to upload pictures at data input (represented by div B) and data manipulation (represented by div C). I know it's not the best method of programming, but I'm not good at writing nice codes. This program is only made for home usage. My researches: I tried every possible solutions and every relevant google search terms (including Stackoverflow), but with no success. I have found a useful link at technify.me about using the eval() function to run JS came from AJAX request, but it didn't help me either. I was trying possible soultions and searching for about 7-8 hours all together and it is very annoying. Here is my code: divpingpong.php: <?php @session_start(); include_once("initial.php"); ?> Div ping-pong Div ping-pong, that is replace a div with AJAX calls Div A Div B Div A This is the place for quick search. There is some amount of text in…
answer count: 0

http://stackoverflow.com/a/77753841
type: Answer
score: 0
has body: This is what worked in my case - slightly modified version of the first answer var originalLeave = $.fn.tooltip.Constructor.prototype._leave; $.fn.tooltip.Constructor.prototype._leave = function (event, context) { if (!event) { originalLeave.call(this, event, context); return; } var self = this; var timeoutId; var container; if (self._timeout > 0) { timeoutId = self._timeout; originalLeave.call(this, event, context); } else { timeoutId = setTimeout(() => originalLeave.call(self, event), 200); } if (event.currentTarget) { container = $("#" + $(event.currentTarget).attr("aria-describedby")); container.one("mouseenter", function () { //We entered the actual popover, so we don"t want to call original leave method anymore clearTimeout(timeoutId); //Let"s monitor popover content instead container.one("mouseleave", function () { originalLeave.call(self, event, context); }); }); } };
answers question: http://stackoverflow.com/q/26721137

http://stackoverflow.com/a/26805303
answers question: http://stackoverflow.com/q/26776203
score: 0
has body: try this document.addEventListener('msvisibilitychange', function () { videoElement.pause(); }); The msvisibilitychange catches when the app is not visible anymore.
type: Answer

http://stackoverflow.com/q/26802453
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42178259
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Writing .htm file name to the contents of the file in HTML
has comment: http://stackoverflow.com/comment/42178368
has comment: http://stackoverflow.com/comment/42179802
accepted answer: http://stackoverflow.com/a/26802896
has body: E.g. I have a file named: page1.htm In the HTML I need to show a link for Google result of a search for that file name. I.e.: https://www.google.co.uk/?gfe_rd=cr&amp;ei=6MhcVOGVHMnH8gej8oCQDQ&amp;gws_rd=ssl#q=page1 Obviously if I need to do this for lots of pages, it would be easier if there was a way to amend the end of that search string to depend on the filename (without the extension). Please tell me there is a simple way to produce that result! Thanks
type: AnsweredQuestion
tagged with: filenames
has comment: http://stackoverflow.com/comment/42178268
has answer: http://stackoverflow.com/a/26802896
type: Question

http://stackoverflow.com/a/26749240
has comment: http://stackoverflow.com/comment/42082922
type: Answer
accepted answer of: http://stackoverflow.com/q/26749151
answers question: http://stackoverflow.com/q/26749151
has body: What about this? if ($('#branchName' + branchList.branch).length == 0) { alert('if branchName'); $('#zzz').append( ' ' + ' ' + '' + branchList.branch + '' + ' ' + ' ' ); } else if ($('#branchName' + branchList.branch + 'combo' + xtrim.comboTrim).length == 0) { alert('if combo'); $('#branchName' + branchList.branch).append( ' ' + ' ' + '' + branchList.combo + '' + ' ' + ' ' ); } else if ($('#branchName' + branchList.branch + 'category' + xtrim.categoryTrim).length == 0) { alert('if category'); $('#branchName' + branchList.branch + 'combo' + xtrim.comboTrim).append( ' ' + ' ' + '' + branchList.category + '' + ' ' + ' ' ); } else if ($('#branchName' + branchList.branch + 'item' + xtrim.itemTrim).length == 0) { alert('if item'); $('#branchName' + branchList.branch + 'category' + xtrim.categoryTrim).append( ' ' + ' ' + '' + branchList.item + '' + ' ' + ' ' ); }
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/26798690
tagged with: django
upvote count: 1
answer count: 4
score: 1
has answer: http://stackoverflow.com/a/26798763
type: Question
has body: I can load content with Ajax to my project, but the content also has Ajax calls to the same function. But these calls don't work. $(function cargar_ajax(){ $(".call_cuerpo").on("click",function(){ var content_id = $(this).data("id") //~ console.log(content_id) $.ajax({ url: "/get_content?content_id="+content_id, }).done(function(res) { $( '.contenido_ajax' ).html(res); }); }); }); I read that you must call the function after loading content but not how or where. This is my div in HTML: A working Ajax call: Load ajax content This call doesn't work if it's loaded with Ajax: {{ item.code }} The code is loaded from an Ajax call. Note: I'm using: Django 1.6 + bootstrap 3.2 + html 5 Thanks in advance.
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/26972006
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26798758
has answer: http://stackoverflow.com/a/26799980
linked to: http://stackoverflow.com/q/8110934
has title: Load content from Ajax-loaded content

http://stackoverflow.com/q/26718228
favorite count: 0
type: UnansweredQuestion
has body: I am looking for a piece of code that lets me change the CSS of the clicked Object, like so: //Click &amp; Lock $('.pix').click(function(){ if(questionLock==false){questionLock=true; //correct answer if(this.id==rnd){ $(this).css('border-color:green'); score++; } //wrong answer if(this.id!=rnd){ $(this).css('border-color:red'); } setTimeout(function(){changeQuestion()},1000); }}) }
downvote count: 1
type: Question
has title: How do I manipulate the CSS of the current Object
has answer: http://stackoverflow.com/a/26718258
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26718257
answer count: 2
upvote count: 0

http://stackoverflow.com/q/26728681
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26728727
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26729036
type: Question
tagged with: javascript
has title: Make navigational bar transparent when reached anchor point
score: 0
answer count: 2
has body: Im trying to make my navigational bar go transparent when it reaches an anchor point that I setup down the website. Here is my Html Home About Logo Work Contact Here is my CSS .nav_bar { background-color: #ffc323; position: fixed; width: 100%; height: 80px; left: 0; top: 0; z-index: 10; } This is the Jquery Code that I have so far but it doesn't seem to work. var x = $("#about").offset().top; $(document).scroll(function(){ if($(".nar_bar").scrollTop() > x) { $(".nav_bar").css({"background-color":"none"}); } }); Im basically trying to reverse the nav bar of this website http://dangblast.com Is there a different method of doing this ? Or am I getting closer to achieving the desired effect.
tagged with: web
tagged with: jquery

http://stackoverflow.com/a/26790670
type: Answer
has body: The way jQuery works, is that any time your user $() it returns an array of jQuery objects of elements that match. This is why you can use $().each() because it works as an array. go to your console and paste $('body'). You'll see that an array shows up. While some may argue that a jQuery object is not an array, and this is true, it acts a lot like one. It isn't an actual array, but you can do things like $('body').length which returns how many elements are found in the object. You can iterate over the object like an array: for (var i = 0; i &lt; $('body').length; i++), and you can grab elements by index: $('body')[0]. You can even use some array methods: $('body').slice(0,0).
has comment: http://stackoverflow.com/comment/42157592
has comment: http://stackoverflow.com/comment/42157574
has comment: http://stackoverflow.com/comment/42157619
has comment: http://stackoverflow.com/comment/42157623
answers question: http://stackoverflow.com/q/26790273
has comment: http://stackoverflow.com/comment/42157475
score: 0
has comment: http://stackoverflow.com/comment/42157543
has comment: http://stackoverflow.com/comment/42157633
has comment: http://stackoverflow.com/comment/42157575

http://stackoverflow.com/comment/42179921
has text: Shoudl it be `this.click` or `$(this).click` ? I'm not sure. I think the latter, haven't really tried the former...
comment on: http://stackoverflow.com/a/26803310
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42077718
comment on: http://stackoverflow.com/a/26716801
score: 1
has text: @ls.: The problem is not being outside the loop, but being inside or outside the **function**. If `item` it's outside the function then it's a variable shared by all the functions, if it's inside the function then it's a different variable for each function.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26784343
has comment: http://stackoverflow.com/comment/42147001
has comment: http://stackoverflow.com/comment/42147342
has comment: http://stackoverflow.com/comment/42146278
answer count: 2
has comment: http://stackoverflow.com/comment/42145893
has comment: http://stackoverflow.com/comment/42145978
has comment: http://stackoverflow.com/comment/42147309
has body: I'm trying to make an upload method with Angular and PHP. that is what i have so far.... HTML Select a file to upload Only jpg,jpeg,png and gif file with maximum size of 1 MB is allowed. JS app.directive("fileread", [function () { return { scope: { fileread: "=" }, link: function (scope, element, attributes) { element.bind("change", function (changeEvent) { scope.$apply(function () { scope.fileread = changeEvent.target.files[0]; }); }); } } }]); app.controller('upController',function($scope,$http){ $scope.upoload=function(){ $http.post('server/uploadFile.php',$scope.uploadme). success(function(data, status) { alert(status +" -- "+ data) }) }}) PHP <?php //turn on php error reporting error_reporting(E_ALL); ini_set('display_errors', 1); //$data = json_decode( file_get_contents('php://input') ); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $name = $_FILES['uploadme']['name']; $tmpName = $_FILES['uploadme']['tmp_name']; $error = $_FILES['uploadme']['error']; $size = $_FILES['uploadme']['size']; $ext = strtolower(pathinfo($name, PATHINFO_EXTENSION)); switch ($error) { case UPLOAD_ERR_OK: $valid = true; //validate file extensions if ( !in_array($ext, array('jpg','jpeg','png','gif')) ) { $valid = false; $response = 'Invalid file extension.'; } //validate file size if ( $size/1024/1024 > 2 ) { $valid = false; $response = 'File size is exceeding maximum allowed size.'; } //upload file if ($valid) { move_uploaded_file($tmpName,'../uploads/'.$name); $response = 'OOOK!'; exit; } break; case UPLOAD_ERR_INI_SIZE: $response = 'The uploaded file exceeds the upload_max_filesize directive in php.ini.'; break; case UPLOAD_ERR_FORM_SIZE: $response = 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.'; break; case UPLOAD_ERR_PARTIAL: $response = 'The uploaded file was only partially uploaded.'; break; case UPLOAD_ERR_NO_FILE: $response = 'No file was uploaded.'; break; case UPLOAD_ERR_NO_TMP_DIR: $response = 'Missing a temporary folder. Introduce…
has answer: http://stackoverflow.com/a/26785258
tagged with: javascript
score: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42147206
type: UnansweredQuestion
has title: Angular JS file upload via php -- Undefined index:
has answer: http://stackoverflow.com/a/26786131
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/42147806

http://stackoverflow.com/comment/42077301
type: QuestionComment
comment on: http://stackoverflow.com/q/26741930
has text: @Bergi, XMLHttpRequest worked perfectly! Thank you for that. If you want to re-write that as an answer, I'll accept it.
score: 0
type: Comment

http://stackoverflow.com/q/26802853
score: 1
type: Question
has title: Modal box after conditional statement in php
tagged with: javascript
has body: I've found in this link a modal box written in CSS and HTML5 and I would like to display this after instruction statement written in php, for example: &lt;?php $a = 1; $b = 1; if($a==$b) { echo 'a=b'; } else { DISPLAY MODAL BOX; ?&gt; How to do this?
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26802999
tagged with: php
tagged with: css

http://stackoverflow.com/comment/53956765
comment on: http://stackoverflow.com/a/30752616
type: Comment
has text: Don't understand why someone voted you down because this was exactly what was going on: my framework threw an HTML error.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26785520
has comment: http://stackoverflow.com/comment/42148086
has comment: http://stackoverflow.com/comment/42147994
has comment: http://stackoverflow.com/comment/42149673
answers question: http://stackoverflow.com/q/26785458
has comment: http://stackoverflow.com/comment/42148182
score: 4
accepted answer of: http://stackoverflow.com/q/26785458
upvote count: 4
has comment: http://stackoverflow.com/comment/42148519
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42148245
has body: You need to wrap up your resulting array in a new Vector object: function Vector(components) { // TODO: Finish the Vector class. this.arr = components; this.add = add; } function add(aa) { if(this.arr.length === aa.arr.length) { var result=[]; for(var i=0; i&lt;this.arr.length; i++) { result.push(this.arr[i]+aa.arr[i]); } return new Vector(result); } else { return error; } } I should note also that you may want to do further reading on creating JavaScript objects, in the area of creating methods (such as your add method) on the prototype of the Vector object. There are many good tutorials out there.
type: Answer

http://stackoverflow.com/a/26798783
answers question: http://stackoverflow.com/q/26798325
has body: You can use jquery load function to load the content into a container div.This way we can have separate fragments for header and footer and be reused across pages For example $('#headercontainer').load('ajax/header.html #header') Please see [http://api.jquery.com/load][1] Hope this helps
score: 0
type: Answer

http://stackoverflow.com/comment/42178853
has text: Look up ternary operators
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26802809

http://stackoverflow.com/q/26677566
tagged with: javascript
type: UnansweredQuestion
favorite count: 0
type: Question
has title: WebStorm JavaScript "Document is not defined"
has body: I'm using WebStorm and I'm trying to assign an HTML element to a JavaScript variable.When I run the JS file the following error appears : ion (exports, require, module, __filename, __dirname) { var eagle = document.g ^ ReferenceError: document is not defined My JS code is in External file, i guess the problem is somewhere in the WebStorm settings, but i can't find it.here is my code: JavaScript var eagle = document.getElementById('eagle'); console.log(eagle); And HTML: Traverse Eagle
score: 0
has answer: http://stackoverflow.com/a/26677892
upvote count: 1
answer count: 1
downvote count: 1

http://stackoverflow.com/q/26831064
answer count: 1
tagged with: asp.net
has answer: http://stackoverflow.com/a/26831107
has title: Convert Javascript to Code Behind in ASP.NET
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26831107
type: Question
has body: I am trying to convert the following JavaScript into the code behind (C#) of an ASP.NET page. This is the JavaScript: function DisableButton() { document.getElementById("&lt;%=Submit.ClientID %&gt;").disabled = true; } window.onbeforeunload = DisableButton; I am trying to build a Client Script as follows (but get error message, see after the code): StringBuilder cstext = new StringBuilder(); cstext.Append("&lt;script type=\"text/javascript\"&gt; function DisableButton() {"); // I get error on the following line that semi-colon is missing cstext.Append("document.getElementById("&lt;%=Submit.ClientID %&gt;").disabled = true; }"; cstext.Append("window.onbeforeunload = DisableButton;"); cstext.Append("&lt;/script&gt;"); I get error that the semi-colon is missing. What do I need to change in my code?
tagged with: javascript
score: 0

http://stackoverflow.com/a/26679626
has body: Here is the code, what you need: function myFunction () { var context; var dy=4; //First: dx must be 0; var dx = 0; var y=150; var x=10; function draw(){ context= myCanvas.getContext('2d'); context.clearRect(0,0,400,400); context.beginPath(); context.fillStyle="#000000"; context.arc(x,y,10,0,Math.PI*2,true); context.closePath(); context.fill(); if (y &gt;= 300) { //Second: delete all if loop and add this y = 290; // | dy = 0; // &lt;-------------------------------| } x+=dx; y+=dy; } setInterval(draw,10); }` EDIT: And a tip: Press F12 in the browser, and click on the Console (or log under some browsers) and you got all the error message's.
answers question: http://stackoverflow.com/q/26677126
type: Answer
score: 0

http://stackoverflow.com/a/56530079
score: 3
answers question: http://stackoverflow.com/q/26705844
upvote count: 3
type: Answer
has body: If you do have source maps available for the minified JS, you can use sourcemap-lookup to manually find the corresponding position in the unminified JS: # note that ./my-js.min.js.map should also exist npx sourcemap-lookup ./my-js.min.js:11:60757
downvote count: 0

http://stackoverflow.com/q/26726832
linked to: http://stackoverflow.com/q/4057440
tagged with: javascript
has comment: http://stackoverflow.com/comment/42042673
has title: JS object, need explanation of what's happening and why
downvote count: 0
answer count: 1
has body: This is the code for Pet: function Pet() { this.vitals = new Vitals(); } function Vitals() { this.hunger = 5; this.thirst = 0; this.emotions = { happy: true, sad: true } } Below is the calling and so forth: $(document).ready(function () { var pet = new Pet(); console.log(pet); pet.vitals.emotions.happy = false; console.log(pet); }); This is what I get from the console: Question: Why is happy false in both readouts, and not just the second one?
linked to: http://stackoverflow.com/q/7389069
favorite count: 0
has answer: http://stackoverflow.com/a/26726886
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26726886
score: 1
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/23392111
upvote count: 1
type: Question
tagged with: object
duplicate of: http://stackoverflow.com/q/23392111

http://stackoverflow.com/q/26776721
has title: Unable to pass XML in xsl script
has body: Below is the XML and XSL and i want to pass the complete xml node to xsl script to do some operations on that node and I do not want to use XPATH and want to operate using selectsinglenode in msxslscript. XML <?xml version="1.0" ?> <?xml-stylesheet href="doc.xsl" type="text/xsl"?> Revolution 1 Life of a pie 5 XSL <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:user="com.nitish"> <msxsl:script language="javascript" implements-prefix="user" > function getNode(node){ return node.selectSingleNode("books/book/qty/@value"); } </msxsl:script> <xsl:template match="/"> Book Details <xsl:variable name="rootNode" select="books"/> <xsl:for-each select="//book"> <xsl:value-of select="user:getNode($rootNode)"/> </xsl:for-each> </xsl:template> </xsl:stylesheet> Please help.
tagged with: client-side
tagged with: http://stackoverflow.com/tag/xml
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26777945
tagged with: xslt
type: Question
has comment: http://stackoverflow.com/comment/42132033
accepted answer: http://stackoverflow.com/a/26777945
has comment: http://stackoverflow.com/comment/42133086
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26832288
score: 0
has comment: http://stackoverflow.com/comment/42231129
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/26832467
type: Question
has body: I switched from a Sony computer to an Asus, downloaded the same programs as I had on the Sony and cloned my Rails 4.0.10 project from Bitbucket. Everything else behaves the same, but Paperclip has inexplicably stopped working, though the two development environments should be exactly the same. I used Paperclip to add an avatar to my User model, but now User.create fails when I attach an avatar. I tried uninstalling and reinstalling it, but that made no difference. Does anyone with Paperclip experience know what might have happened? Gemfile: gem "paperclip", :git =&gt; "git://github.com/thoughtbot/paperclip.git" # ... models/user.rb class User &lt; ActiveRecord::Base has_attached_file :avatar, :styles =&gt; { :large =&gt; "500x500", :medium =&gt; "300x300&gt;", :thumb =&gt; "50x50!" }, :default_url =&gt; "/images/:style/missing.png" validates_attachment_content_type :avatar, :content_type =&gt; /\Aimage\/.*\Z/ # ... controllers/users.rb class UsersController &lt; ApplicationController def create # ... if @user.save render :action =&gt; "crop" else flash[:notice] = "Failed" redirect_to new_user_path end end private def user_params params.require(:user).permit(:name, :avatar) end views/users/new.html.erb &lt;%= form_for @user, :url =&gt; users_path, :html =&gt; { :multipart =&gt; true } do |f| %&gt; &lt;%= f.text_field :name, :placeholder =&gt; "Name" %&gt; &lt;br&gt; &lt;%= f.label :display_picture %&gt; &lt;%= f.file_field :avatar %&gt; &lt;br&gt; &lt;%= f.submit "Submit", class: "btn btn-primary" %&gt; &lt;% end %&gt; views/users/crop.html.erb &lt;% content_for(:head) do %&gt; &lt;%= stylesheet_link_tag "jquery.Jcrop" %&gt; &lt;%= javascript_include_tag "jquery.Jcrop.min" %&gt; &lt;script type="text/javascript" charset="utf-8"&gt; ready = $(function() { $("#cropbox").Jcrop(); }); &lt;/script&gt; &lt;% end %&gt; $(document).ready(ready); $(document).on('page:load', ready); &lt;%= image_tag @user.avatar.url(:large), :id =&gt; "cropbox" %&gt;
tagged with: javascript
has title: Rails: Paperclip gem no longer works after switching computers
tagged with: ruby-on-rails-4
answer count: 1
accepted answer: http://stackoverflow.com/a/26832467
tagged with: ruby
tagged with: paperclip
type: AnsweredQuestion

http://stackoverflow.com/a/26753342
answers question: http://stackoverflow.com/q/26676380
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26676380
has comment: http://stackoverflow.com/comment/56931112
type: Answer
score: 2
downvote count: 0
has body: maybe you need to define the .x(function (d) { return xValues.indexOf(d.x); }) the code listed below works fine in our project: nv.addGraph(function () { var chart = nv.models.lineChart() .margin({bottom: 20}) .x(function (d) { return xValues.indexOf(d.x); }) .useInteractiveGuideline(false) .forceY([-10, 40]) .tooltipContent(function (key, x, y, e) { return '&lt;h3&gt;' + key + '&lt;/h3&gt;' + '&lt;p&gt;' + e.point.y + ' at ' + x + '&lt;/p&gt;'; }) ; chart.xAxis //.axisLabel($translate.instant('loadTests.overview.testRuns.grid.startOn')) .showMaxMin(true) .tickFormat(function (d) { if (typeof(d) === 'number' &amp;&amp; d &gt;= 0 &amp;&amp; d &lt; xValues.length) { return d3.time.format('%m/%d')(new Date(1 * xValues[d])); } return 0; }) .tickValues(xValues) ; ... hope it helps! it would be better if you could create a fiddle for this.

http://stackoverflow.com/comment/41950183
has text: Updated answer to reflect what you just said. You're wanting to append to what's already there.
comment on: http://stackoverflow.com/a/26675122
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/26733497
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26733302
downvote count: 0
has body: You can add an eventListener for the seeked event and then check that, since a video that is being looped will automatically 'seek' the start of the video. If you then check that the start is 0, then it's (probably) not the user who reset it so its an automatic seek event. Either way, even if the user has put it back to zero it technically counts as a loop I think. You could technically also check if the user clicked and if they did, you know its not an automatic loop, otherwise if its not a click and the currentTime is set to 0, its a loop. It will work like the following: HTML &lt;video id="video" loop autoplay&gt; &lt;source src="video.mp4" /&gt; &lt;/video&gt; Javascript document.getElementById("video").addEventListener("seeked", function(event){ if(document.getElementById("video").currentTime === 0){ // do what you want to do on relax } }, false);

http://stackoverflow.com/comment/41968678
type: Comment
comment on: http://stackoverflow.com/a/26684268
score: 0
type: AnswerComment
has text: This can be proven by alerting the length of the date string `a1[0]`, you will see it is 6 characters longer than what is visible. That is because of these 6 'phanton' characters that IE puts there for some stupid reason.

http://stackoverflow.com/q/26720134
answer count: 2
has comment: http://stackoverflow.com/comment/42030321
tagged with: flot
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/42030661
has answer: http://stackoverflow.com/a/26721435
tagged with: php
has title: JQuery - plot time series data from php using Flot Charts
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26720217
has answer: http://stackoverflow.com/a/26720217
type: Question
accepted answer: http://stackoverflow.com/a/26721435
tagged with: javascript
has body: I get data from database which is formatted using php and returned as JSON response for an Ajax call. Every thing works fine and data is plotted. But if X-Axis contains date then nothing is plotted. I submit a starting and an end date using Ajax. Here is the data, I generate as response: [ { "data": [ [ "2014-11-02", 5 ], [ "2014-11-04", 12 ], [ "2014-11-07", 2 ], [ "2014-11-13", 21 ] ], "label": "Label1", "color": 8 } ] My x-Axis: xaxes : [ { mode : "time", timeformat : "%y-%m-%d", color : "black", axisLabel : "Date", axisLabelUseCanvas : true, axisLabelFontSizePixels : 12, axisLabelFontFamily : 'Verdana, Arial', axisLabelPadding : 10 }], I followed the tutorial : http://www.jqueryflottutorial.com/how-to-make-jquery-flot-time-series-chart.html but cannot figure out how to do it with when using data from ajax response. Also, how can I divide the ticks according to start and end dates automatically?
score: 0

http://stackoverflow.com/comment/41986867
type: AnswerComment
score: 0
type: Comment
has text: I have no idea, I went and made a [fiddle](http://jsfiddle.net/v1t6qc1a/1) out of the 3 files, and it does work in jsfiddle, but when I actually go to browser it does not (Chrome and I.E.)
comment on: http://stackoverflow.com/a/26695930

mocha.js
tags question: http://stackoverflow.com/q/26770345
tags question: http://stackoverflow.com/q/26719186
tags question: http://stackoverflow.com/q/26764886
tags question: http://stackoverflow.com/q/26788341
tags question: http://stackoverflow.com/q/26704677
tag name: mocha.js
type: Tag

http://stackoverflow.com/q/26790155
has comment: http://stackoverflow.com/comment/42156416
tagged with: twitter-bootstrap
type: UnansweredQuestion
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42163062
has answer: http://stackoverflow.com/a/26790392
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42156380
has title: Bootstrap modal causes page to shift right
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: -1
has body: I am having a little problem with Bootstrap modal on my website. I would like the page behind the modal to be fixed which is why I have added the following code: .modal-open { overflow: hidden; } However this causes the page to shift to the right (at least in Firefox) when the modal is open and shift back again when it closes. Any one who has a solution to this?

http://stackoverflow.com/a/26830389
has body: You could simplify your code significantly if you used some sort of data attribute which would target specific popup: And JS then: $(".bigPop").click(function () { $($(this).data('target')).fadeIn(); }); This approach offers additional flexibility, because now data-target can be any CSS selector, not only class name, but also id, etc.
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26830319
has comment: http://stackoverflow.com/comment/42229023
upvote count: 2

http://stackoverflow.com/a/26716801
has comment: http://stackoverflow.com/comment/42076875
type: Answer
has comment: http://stackoverflow.com/comment/42077718
upvote count: 5
score: 5
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42120490
downvote count: 0
has body: The key problem you're facing is that a closure capture variables by reference, not by value. For example: var i = 0; var f = function(){ i++; console.log(i); } var g = function(){ i++; console.log(i); } f(); g(); f(); g(); this will display 1, 2, 3, 4 because f and g are not capturing the value of the variable i, but the variable itself and therefore are both mutating the same variable. A very common mistake is to create multiple closures in a loop forgetting that all of them will capture the same variable (the one used in the loop) and thus that when this loop variable is incremented all the already created closures will see it changing. For example in your code for (var i = 0; i < 3; i++) { funcs[i] = function() { var item = "item" + i; // inside console.log("item: " + item + ", i: " + i); }; } item is a variable local to the function but i instead comes from the outside and it's shared between all of them. This can be seen for example with i = 42; funcs[0](); funcs[1](); funcs[2](); // Displays 42 three times i = 99; funcs[0](); funcs[1](); funcs[2](); // Now they all display 99 In the second case of your question things are just slightly different because in for (var i = 0; i < 3; i++) { var item = "item" + i; funcs[i] = function() { console.log("item: " + item + ", i: " + i); }; } also the item variable is now shared as it's defined outside the function and the closure captures it. In the display you see the last value that's assigned to it. The key point to remember that in Javascript a variable is local to the function, not local to the {...} block (like it's in C++ for example) and thus the discriminating factor is if the variables are declared inside the function or outside the function, not if they're declared inside or outside the loop. To overcome this common problem and have a separate index for each of the closures created in a loop often you will see code like var f = (function(i){return function(){ ... };})(i); where a function is created and immedi…
accepted answer of: http://stackoverflow.com/q/26687859
answers question: http://stackoverflow.com/q/26687859

http://stackoverflow.com/q/26731888
tagged with: angularjs-controller
has answer: http://stackoverflow.com/a/26732002
accepted answer: http://stackoverflow.com/a/26732002
type: Question
upvote count: 2
tagged with: angularjs-routing
answer count: 1
tagged with: javascript
favorite count: 0
has body: I am currently setting up resolves for my admin panel routes and am wondering what the best way of storing them is as ideally I don't want to have my router filled with methods like so: when('/admin', { templateUrl: 'app/private/admin/view.html', controller: 'admin', resolve: ['$q', '$location', 'api', function($q, $location, api){ var deferred = $q.defer(), session = api.session(); if(session){ deferred.resolve(session); } else { api.authorise().success(function(response){ deferred.resolve(response); }).error(function(error){ $location.path('/login'); deferred.reject(error); }); } return deferred.promise; }] }) I think an ideal structure would be to store the resolves in the controller I'm using for that route, so something like: when('/admin', { templateUrl: 'app/private/admin/view.html', controller: 'admin', resolve: adminCtrl.resolve }) However the admin controller is not accessible from the config so this leaves me with having to use a provider which is still going to be messy when expanding my application. How do you all handle your resolves/is it possible to store it in my controller?
tagged with: angularjs
has title: Best place to store resolve methods in angularJs
score: 2
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/a/26741221
downvote count: 0
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/42068571
accepted answer of: http://stackoverflow.com/q/26740959
has body: $('ul.dots li').click(function(){ var num = $(this).index(); var currentSlide = $('.active-slide'); var nextSlide = $('.slide:eq('+num+')'); var currentDot = $('.active-dot'); var nextDot = $(this); currentSlide.fadeOut(600).removeClass('active-slide'); nextSlide.fadeIn(600).addClass('active-slide'); currentDot.removeClass('active-dot'); nextDot.addClass('active-dot'); checkNav(); });
answers question: http://stackoverflow.com/q/26740959
has comment: http://stackoverflow.com/comment/42068617
type: AcceptedAnswer

http://stackoverflow.com/a/26828802
downvote count: 0
has comment: http://stackoverflow.com/comment/42224951
has body: The problem is that the span.hvr links are generated dynamically: when the page loads, they do not exist, but then a script generates them sometime later. So for your script to work, it should wait for span.hvr elements to be present first, before doing anything further. The following modified script should work: // ==UserScript== // @name linkify span href // @namespace http://use.i.E.your.homepage/ // @version 0.1 // @description enter something useful // @match http://www.thefreedictionary.com/* // @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js // @copyright 2012+, You // @grant GM_log // ==/UserScript== //alert("hello"); jQuery(document).ready(Greasemonkey_main); function Greasemonkey_main () { var isReady = jQuery("span.hvr").length &gt; 0; if (!isReady) { setTimeout(Greasemonkey_main, 500); return; } jQuery("span.hvr").each(function () { jQuery(this).wrap('&lt;a href="/' + jQuery(this).text() + '" style="text-decoration:none;color:inherit" target="_blank"&gt;&lt;/a&gt;') }); } If there are pages in which it is possible to have no span.hvr elements, then you should make the script a bit smarter – stop retrying after 5-10 seconds for example.
has comment: http://stackoverflow.com/comment/42225051
accepted answer of: http://stackoverflow.com/q/26828439
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26828439
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/42224981

http://stackoverflow.com/comment/42173982
type: AnswerComment
has text: I tried it says, Unable to get property 'value' of undefined or null reference
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26800168

http://stackoverflow.com/comment/51638239
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26813480
score: 1
has text: chrome 44 stable gBCR giving wrong data for a large document. struggling to create a small test case

http://stackoverflow.com/comment/42137177
type: QuestionComment
has text: I'm not sure what exactly you want to do.
comment on: http://stackoverflow.com/q/26778937
score: 0
type: Comment

http://stackoverflow.com/q/26774864
has comment: http://stackoverflow.com/comment/42128712
has comment: http://stackoverflow.com/comment/42128693
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26774981
accepted answer: http://stackoverflow.com/a/26774981
has body: I Want to Write simultaneously Textbox values in another Textbox like in Your Website. Javascript window.update = function() { var one = document.getElementById('one'), two = document.getElementById('two'); two.value = parseInt(one.value) * 2; }​ Html &lt;input id="one" type="text" onchange="update();" /&gt; &lt;input id="two" type="text" /&gt;​
type: AnsweredQuestion
has title: How to write simultaneously Textbox values in another Textbox?
upvote count: 3
downvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/42129017
has comment: http://stackoverflow.com/comment/42128603
score: 0
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42128695

http://stackoverflow.com/comment/42157849
score: 0
type: Comment
has text: You are welcome... if this solved your problem, then please mark the issue as solved. Regards Rdey
type: AnswerComment
comment on: http://stackoverflow.com/a/26790272

http://stackoverflow.com/comment/42050203
has text: use on instead of live, if you are using jquery 1.7+
comment on: http://stackoverflow.com/a/26729780
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26756157
downvote count: 0
has body: try this: &lt;script&gt; var default_name_value="Enter your name"; var default_lastname_value="Enter your last name"; function empty_fields(){ $("input[type=text]").each(function(index,item){ if($(item).val()==default_name_value||$(item).val()==default_lastname_value){ $(item).val(""); } }); } &lt;/script&gt; &lt;INPUT TYPE="text" NAME="name" id="name" onfocus="empty_fields();" value="Enter your name" size="16"&gt; &lt;INPUT TYPE="text" NAME="lname" id="lname" onfocus="empty_fields();" value="Enter your last name" size="16"&gt; UPDATE this will empty all text boxes in the page refine the selector in line 3 to something like $("#myform input[type=text]") to empty only boxes in the desired form UPDATE 2 now it will only be emptied for the first time
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26754734
has comment: http://stackoverflow.com/comment/42094593
has comment: http://stackoverflow.com/comment/42095194
answers question: http://stackoverflow.com/q/26754734
type: AcceptedAnswer

http://stackoverflow.com/q/26798014
has title: Select parent element of datepicker
accepted answer: http://stackoverflow.com/a/26798129
has comment: http://stackoverflow.com/comment/42170061
has comment: http://stackoverflow.com/comment/42170515
tagged with: datepicker
possible better answer: http://stackoverflow.com/a/26798194
has answer: http://stackoverflow.com/a/26798194
has comment: http://stackoverflow.com/comment/42170199
score: 0
has comment: http://stackoverflow.com/comment/42170282
has comment: http://stackoverflow.com/comment/42170104
has comment: http://stackoverflow.com/comment/42170139
has answer: http://stackoverflow.com/a/26798129
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42170184
has body: I am new to JQuery and JS. I have element inside which I am using JQuery datepicker. On datepicker select event I want to get a reference to the parent &lt;td&gt; element. How do I do it. Thanks in advance. &lt;td&gt; &lt;input type='text'/&gt; &lt;/td&gt;
has comment: http://stackoverflow.com/comment/42169920
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26769083
answer count: 1
has title: Add Static Lines on D3 Map Between Latitude and Longitude Points
has comment: http://stackoverflow.com/comment/42169632
favorite count: 0
tagged with: d3.js
type: UnansweredQuestion
upvote count: 1
score: 1
has answer: http://stackoverflow.com/a/26794557
has comment: http://stackoverflow.com/comment/42130616
type: Question
downvote count: 0
tagged with: javascript
has body: I have a D3 map of the world with markers on latitude and longitude points that I am interested in. Now I would like to draw simple, static lines connecting these points. How do I do this? This is my code for the map with markers: &lt;!DOCTYPE html&gt; &lt;meta charset="utf-8"&gt; &lt;body&gt; &lt;script src="http://d3js.org/d3.v3.min.js"&gt;&lt;/script&gt; &lt;script src="http://d3js.org/topojson.v1.min.js"&gt;&lt;/script&gt; &lt;script&gt; var width = 900, height = 500; // Create Projection var projection = d3.geo.mercator() // Generate paths based on projection var path = d3.geo.path() .projection(projection); // Create SVG var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height); // Group for the map features var features = svg.append("g") .attr("class","features"); // Build map with markers d3.json("countries.topojson",function(error,geodata) { if (error) return console.log(error); //Create a path for each map feature in the data features.selectAll("path") .data(topojson.feature(geodata, geodata.objects.subunits).features) .enter() .append("path") .attr("d", path) // Add markers for cities by their latitude and longitude. d3.csv("cities.csv", function (error, data) { features.selectAll("circle") .data(data) .enter() .append("circle") .attr("cx", function (d) { return projection([d.lon, d.lat])[0]; }) .attr("cy", function (d) { return projection([d.lon, d.lat])[1]; }) .attr("r", 5) .style("fill", "red"); }); }); &lt;/script&gt; cities.csv: name,lat,lon LA,34.05,-118.25 NY,40.7127,-74.006 This code produces something like this: Now I want to connect the markers with lines. Just a static line, doesn't need to be animated or anything. The result should look like: I added a new group for the lines above the d3.json() call: var lines = features.append("g"); Then inside the d3.json() call, I add something like this to create the array of line coordinates: var theLines = [ { type: "LineString", coordinates: [ [ data[0].lon, data[0].lat ],…
has comment: http://stackoverflow.com/comment/42159353

http://stackoverflow.com/q/26738559
tagged with: javascript
has answer: http://stackoverflow.com/a/26739123
has comment: http://stackoverflow.com/comment/42063370
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs-filter
downvote count: 0
possible better answer: http://stackoverflow.com/a/34184839
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42063750
upvote count: 2
has comment: http://stackoverflow.com/comment/42064233
linked to: http://stackoverflow.com/q/13278371
has comment: http://stackoverflow.com/comment/42063712
score: 2
type: AnsweredQuestion
has body: how to create Custom filter angularjs javascript controller side? i would like to search in array called segments by SegmentId, to create filter that do foreach on segments array search by SegmentId - //Controller $scope.GetSegmentDetails = function (id) { $scope.SegmentName = $filter('SegmentById')($scope.segments,id); } //Filter app.filter('SegmentById', function () { return function (input, searchPerson) { if (!searchPerson) return input; var results = []; angular.forEach(input, function (person) { } }); return results; } });
has answer: http://stackoverflow.com/a/34184839
accepted answer: http://stackoverflow.com/a/26739123
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42063333
has title: how to create Custom filter angularjs javascript controller side?

twitter-bootstrap-3
tags question: http://stackoverflow.com/q/26720211
tags question: http://stackoverflow.com/q/26727581
tags question: http://stackoverflow.com/q/26795498
tags question: http://stackoverflow.com/q/26764591
tag name: twitter-bootstrap-3
tags question: http://stackoverflow.com/q/26762258
tags question: http://stackoverflow.com/q/26737947
type: Tag
tags question: http://stackoverflow.com/q/26751728
tags question: http://stackoverflow.com/q/26831061
tags question: http://stackoverflow.com/q/26779848
tags question: http://stackoverflow.com/q/26695241
tags question: http://stackoverflow.com/q/26756500
tags question: http://stackoverflow.com/q/26776537
tags question: http://stackoverflow.com/q/26831128
tags question: http://stackoverflow.com/q/26795839
tags question: http://stackoverflow.com/q/26680835
tags question: http://stackoverflow.com/q/26753323
tags question: http://stackoverflow.com/q/26750370
tags question: http://stackoverflow.com/q/26717183

http://stackoverflow.com/comment/42037351
has text: nothing else, all it asks for is d3 and images
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26723324

http://stackoverflow.com/a/26695264
score: 2
downvote count: 0
has body: Remove the parenthesis in setTheClockByButton(), when you create a function you are actually setting a variable. The long hand for creating a function looks like this. var functionName = function() { //Your code here }; Therefore to assign a function to a handler, you must use the functions variable name, but to call the function you add the parenthesis. In this case you need simply the variable name so it would look like this. document.getElementById("send").addEventListener("click",setTheClockByButton);
upvote count: 2
answers question: http://stackoverflow.com/q/26695188
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26695188
type: Answer

http://stackoverflow.com/a/26746132
type: Answer
has body: If you are trying to toggle the visibility / availability of something, i would recommend creating 2 different classes. 1 for normal list / list item e.g class="normal" 2 for removing / disabling lists / list items. e.g list item before clicking would be like when you click a button and remove the list item, then you add the removed class and in css, removed class will override the text color and visibility settings for normal list item. when you want to re-enable the item, all you do, is remove the "removed" class. $( ".someitem").removeClass("removed")
score: 0
answers question: http://stackoverflow.com/q/26746044

http://stackoverflow.com/a/26803820
has comment: http://stackoverflow.com/comment/42212722
answers question: http://stackoverflow.com/q/26803659
upvote count: 2
has comment: http://stackoverflow.com/comment/76361440
has comment: http://stackoverflow.com/comment/76173839
has comment: http://stackoverflow.com/comment/42199362
type: Answer
has body: You could try node-inspector and pass environment run vars to meteor via NODE_OPTIONS='--debug-brk' meteor run and try your luck there. (2017 update: there was an answer here referencing Kadira (kadira.io) however this service is no more.. sad). You may also try the built-in NodeJS devtools available since 6.3. If you read the node-inspector github repo, you can see a blog post referenced there to get started: https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27#.pmqejrn8q
has comment: http://stackoverflow.com/comment/42196698
score: 2
downvote count: 0

http://stackoverflow.com/q/26802262
has comment: http://stackoverflow.com/comment/42178154
type: Question
score: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42178572
has comment: http://stackoverflow.com/comment/42178296
has comment: http://stackoverflow.com/comment/42177838
has body: I have following code in my template: &lt;div ng-if="selectedTheme.count_of_cards == 0" class="jumbotron" ng-controller="ThemesCtrl"&gt; &lt;h1&gt;{{ 'THERE_IS_NO_CARD' | translate }}&lt;/h1&gt; &lt;p&gt; &lt;a href="" ng-click="initEmptyTheme()" class="btn btn-primary btn-lg" role="button"&gt;{{ 'ADD_CARD' | translate }}&lt;/a&gt; &lt;/p&gt; &lt;/div&gt; And called method on the ThemesCtrl: $scope.initEmptyTheme = function() { //console.log("Trying to get cards for theme id: " +theme.id); //$rootScope.$emit('detailDisplayed', {}); $scope.displayedTemplate = "default"; $timeout(function() { $scope.$apply(function() { $scope.displayedTemplate = "default"; console.log("Meow"); }); }); }; EDIT: I also tried: $timeout(function() { $scope.displayedTemplate = "default"; console.log("Meow"); }); and $scope.$apply(function() { $scope.displayedTemplate = "default"; console.log("Maau"); }); But nothing works. I tried call the method with and without timeout and apply and console log is processed, but scope is not changed to "default" value (is still stucked on "empty" value). What can be wrong please? Thanks for any help.
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
has title: Angular - Cannot change scope value after ng-click
has comment: http://stackoverflow.com/comment/42178224

marker
tag name: marker
tags question: http://stackoverflow.com/q/26689124
type: Tag

http://stackoverflow.com/q/26750023
accepted answer: http://stackoverflow.com/a/26750095
type: AnsweredQuestion
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
type: Question
tagged with: checkbox
has body: In my jquery mobile(v 1.3.2) application i just created a checkbox and set checkbox text dynamically using jquery. When set like this the checkbox style is collapsed. Here's is the sample code: &lt;input type="checkbox" name="OptIconsLabels" id="OptIconsLabels" class="custom" data-theme="c" /&gt; &lt;label for="OptIconsLabels"&gt;&lt;/label&gt; Js: $("#OptToolbarLbl").text("Label"); $('label[for="OptIconsLabels"]').text("Opt Icon"); $("#OptIconsLabels").attr("checked", false).checkboxradio("refresh"); Here is the FIDDLE DEMO Note: I tried trigger page create also $(.page).trigger("pagecreate");
has title: Dynamically set checkbox label text cause the style issue in checkbox
has answer: http://stackoverflow.com/a/26750095
score: 0
answer count: 1

http://stackoverflow.com/comment/42048083
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26730063
has text: No, it's not. It's a hacky / useless way to remove duplicate keys. I'm sure you can think of a better alternative than string concatenation.

http://stackoverflow.com/q/26730768
tagged with: php
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26730825
has comment: http://stackoverflow.com/comment/42049059
tagged with: mysql
has answer: http://stackoverflow.com/a/26730825
downvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
score: -1
tagged with: ajax
has answer: http://stackoverflow.com/a/26730792
has title: How to send two variable by Ajax in same time ( by javascript)
answer count: 2
upvote count: 0
accepted answer: http://stackoverflow.com/a/26730792
favorite count: 0
has body: I have a textarea to post and a PHP variables. I made script like below: $(document).ready(function(){ $('.post').keyup(function(e){ var post = $.trim($('.post').val()); if (post != "" &amp;&amp; e.keyCode === 13 &amp;&amp; e.shiftKey === false) { $.post('send.php', { post: post }, function(data) { $('.post').val(''); }); } }); var to = "&lt;?php echo $name;?&gt;"; $.post('send.php', { to: to }, function(data){ }); }); After sending, I made a query to store in database, but as I sent two variable(post and to) in different time, so, in database every time two rows are generated where first row get only "to" variable and 2nd row get "post" variable. how to change the above javascript codes so that i can get one row each time(with "post" &amp;&amp; "to" variable)

http://stackoverflow.com/comment/42054121
type: AnswerComment
has text: Your example still includes all inputs as they are also descendants of `div` with `class=field-container-with-details`: http://jsfiddle.net/TrueBlueAussie/z8cqx8kq/2/
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26732446

http://stackoverflow.com/a/26694461
accepted answer of: http://stackoverflow.com/q/26689077
has comment: http://stackoverflow.com/comment/59633459
has comment: http://stackoverflow.com/comment/59641062
upvote count: 2
has body: If you just want the rule to trigger onclick of div with id 12345 then just put div#12345 as the element tag/selector field (it accepts a css path, which is evaluated with querySelectorAll). If you are looking to alternatively do it a more "manual" way, i.e. you just want the click event to be generic and do a 100% custom condition w/ your own logic, you MUST enter a value in the element tag/selector field, because DTM needs to know what to attach the event to. So at a minimum you need to do something very top level, e.g. body. IOW you need to do it same principle as event delegation. Then in... Rule Conditions -> Data -> Customs ..you can do pretty much anything you want, but it MUST return true or false. So for example, you had the following: $('#12345').click(function() { return true ; }); This isn't going to work as expected, because you are just attaching an event handler. An event based rule already handles the event, which is why you have to specify the event, i.e. "click". So that code is basically going to end up returning a falsey value since you aren't actually returning anything. So instead, you'd do something like this: Set the element tag/selector to div or something top level like body, then in the custom section, do something like this: if ( $(this).attr('id') == '12345' ) return true; else return false; Note that I use jQuery syntax because you used it in your post; DTM doesn't output jQuery or have it built-in, so you need to ensure jQuery is loaded for that to work. But it's easy enough to do the "vanilla js" version of getting the id attribute of this If you want to be able to specify your own event handler, like what you had: $('#12345').click(function() { return true ; }); Then the best thing you can do is instead output this in a page load rule in the javascript / 3rd party script section. From there you'd make the closure call a direct call rule instead of returning true, for example: $('#12345').click(function() { _satellite.track('doSomethi…
score: 2
answers question: http://stackoverflow.com/q/26689077
has comment: http://stackoverflow.com/comment/59406492
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/59398669
has comment: http://stackoverflow.com/comment/41996784
type: Answer

http://stackoverflow.com/comment/42229445
comment on: http://stackoverflow.com/q/26831324
type: Comment
type: QuestionComment
score: 2
has text: You usually also need to include jquery before jquery-ui. Try changing the order of those script tags.

http://stackoverflow.com/a/26715792
type: Answer
answers question: http://stackoverflow.com/q/26715551
score: 0
has body: I dont know what is pubsub but objA is local inside B is not an issue you can check this code function A() { function _publish(){ } function _doSth() { console.log("Done!"); } return { publish: _publish, doSth: _doSth }; } function B() { var objA = new A(); objA.doSth(); } new B(); // Sorry this is not an answer but i dont have reputation being able to comment. So i had to written in answer box

http://stackoverflow.com/q/26797649
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/42169853
tagged with: arrays
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26797973
has comment: http://stackoverflow.com/comment/42169959
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26797847
has comment: http://stackoverflow.com/comment/42200126
possible better answer: http://stackoverflow.com/a/26797973
has comment: http://stackoverflow.com/comment/42174112
tagged with: jsp
has comment: http://stackoverflow.com/comment/42169478
accepted answer: http://stackoverflow.com/a/26797847
has body: My jsp code is &lt;% List selected = (List) session.getAttribute("clist"); JSONArray arr = new JSONArray(); JSONObject tmp; for (int i = 0; i &lt; selected.size(); i++) { tmp = new JSONObject(); tmp.put("Id", selected.get(i)); arr.put(tmp); }%&gt; and i am using hidden field to pass this array to javascript &lt;input type='hidden' id="agencycontactid" name="agencycontactid" value="&lt;%=(null != arr) ? arr : ""%&gt;" /&gt; here arr gives value arr=[{"Id":"9"},{"Id":"11"}] My javascript code is var s=$('#agencycontactid').val(); alert(s); But alert gives only [{ Please help me Thanks
has comment: http://stackoverflow.com/comment/42169490
has comment: http://stackoverflow.com/comment/42169360
has title: how to pass json array from jsp to javascript?
type: AnsweredQuestion

http://stackoverflow.com/comment/42000391
has text: The first thing to do is bring up your JavaScript debug console. In Chrome, you can do this by right clicking in the browser window and select "inspect element" Then select console and see if there are any errors.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26703551
type: QuestionComment

http://stackoverflow.com/comment/41978555
type: QuestionComment
comment on: http://stackoverflow.com/q/26690987
has text: It's unclear how you get the result arrays from original
type: Comment
score: 0

http://stackoverflow.com/comment/42107376
type: AnswerComment
type: Comment
has text: @M.Page Thank you for your help. Altough, my table has borders, and when I executed this code the div was appended after the bottom border...=/
comment on: http://stackoverflow.com/a/26762197
score: 0

http://stackoverflow.com/comment/42208771
comment on: http://stackoverflow.com/a/26818821
score: 0
has text: So if I use "var b;alert(b&&b);" ,then b is a existent global symbol ,which will not cause a ReferenceError exception;If I use "alert(b&&b);" directly,then b is a "non-existent global symbol" ,which the word "undefined" in that part of es5 means.Is it right?
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41973930
type: Comment
comment on: http://stackoverflow.com/q/26687939
type: QuestionComment
has text: @Stuart: The logic is simple: I want multiple balls to be dropped into a box when that box is clicked multiple times. Same thing applies for other 2 boxes.
score: 0

http://stackoverflow.com/q/26778353
has comment: http://stackoverflow.com/comment/42134678
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42137474
has comment: http://stackoverflow.com/comment/83509492
type: Question
tagged with: canvas
accepted answer: http://stackoverflow.com/a/26781465
answer count: 1
downvote count: 0
has title: CSS Parallelogram with Text
tagged with: javascript
favorite count: 0
upvote count: 8
tagged with: css
score: 8
has body: I've made a parallelogram using CSS3's skew transform, and placed text within another div that has an opposite skew value so that the text remains un-transformed: JSFiddle example. Is there a way to have the text aligns to the edges of the parallelogram like this: I'm open to other suggestions, such as using the canvas if it's not possible using CSS. If there is a JavaScript technique to do this then any links that may be useful would be appreciated. UPDATE: After hunting for some cross-browser solutions, the easiest tool I found to achieve this was with this tool.
has comment: http://stackoverflow.com/comment/42134732
has answer: http://stackoverflow.com/a/26781465

http://stackoverflow.com/a/26773972
upvote count: 2
has body: You can achieve this by using document.getElementById $(document).ready(function(){ $('.calling').keyup(function(e) { $(this).requiredMethod(e.keyCode); });}); //My plugin (function ($) { $.fn.requiredMethod = function (keyCode) { return this.each(function () { var $this = $(this); var previndex = 0; var ctl = document.getElementById($this.attr("id")); var endPos = ctl.selectionEnd-1; var str =ctl.value; //My code goes here where i use previndex,endPos ans str }); }; })(jQuery);
type: Answer
downvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42129132
answers question: http://stackoverflow.com/q/26773781

string-interpolation
tags question: http://stackoverflow.com/q/26726727
tag name: string-interpolation
type: Tag

http://stackoverflow.com/q/26818849
has title: Angular JS $interpolate query
type: Question
linked to: http://stackoverflow.com/q/24512778
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/32530055
answer count: 1
has body: I newbie to Angular JS and way trying to understand directive functionality which is written as below function mydirective($interpolate, $compile) { return { restrict: 'E', scope: { mycontent: '=', myurls: '=', mydata: '@' }, replace: true, template: '&lt;div ng-bind-html="html"&gt;&lt;/div&gt;', link: function ($scope, element, attrs) { $scope.$watch('mycontent', function (value) { var html = $interpolate(value)($scope); element.html(html); $compile(element.contents())($scope); }); } } } I am not able to understand following from above. 1) What does this $interpolate(value)($scope) do ? what is this second argument $scope. 2) What is this $compile function doing ? 3) div ng-bind-html="html" in template what does it do ?
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42209393
upvote count: 1
score: 1

http://stackoverflow.com/q/26738943
favorite count: 0
has answer: http://stackoverflow.com/a/26739068
has comment: http://stackoverflow.com/comment/42063852
has title: How to tell whether running in a browser or in NodeJS?
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26739068
type: AnsweredQuestion
score: 1
tagged with: browser
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42063845
tagged with: javascript
has comment: http://stackoverflow.com/comment/42063744
has comment: http://stackoverflow.com/comment/42065315
linked to: http://stackoverflow.com/q/4224606
possible better answer: http://stackoverflow.com/a/26739226
has answer: http://stackoverflow.com/a/26739226
has body: What is the best way for Javascript code to tell whether it is running in a browser or in NodeJS? I'm looking for something which will evaluate to a boolean. Trying to access window and catching the exception seems rather clinky. Is there a better way?
duplicate of: http://stackoverflow.com/q/4224606
tagged with: node.js

http://stackoverflow.com/comment/41981612
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26692755
has text: The main problem with that code, is that it's not always a Video, and it's not always that video when it is a video. I've got a bunch of arrays that i inject into that code, so i guess i'll have to figure out some way to leave the two seperate.

http://stackoverflow.com/comment/42704607
score: 0
type: Comment
has text: Please elaborate your question. I didn't understood if you want update selected id in the database or you want to update the name for selected id ?
comment on: http://stackoverflow.com/a/27059677
type: AnswerComment

http://stackoverflow.com/q/26710484
accepted answer: http://stackoverflow.com/a/26710619
possible better answer: http://stackoverflow.com/a/26710644
tagged with: node.js
type: AnsweredQuestion
type: Question
has title: Function Calling Execution in nodejs
answer count: 2
has answer: http://stackoverflow.com/a/26710644
tagged with: javascript
has comment: http://stackoverflow.com/comment/42012654
score: 0
has body: I have this code. for(var i = 0; i&lt; bookmarks.length; i++){ (function(i) { parseArticle(i,bookmark_id,bookmark_url,function(err,result){ console.log("Success"); }); })(i); } function parseArticle(i,bookmark_id,bookmark_url,callback) { diffbot.article({uri: url}, function(err, response) { console.log("Diffbot is" ); }); console.log("Parse Article" ); callback(null,i); }; Now output is coming like this Parse Article Sucess Diffbot is I want to execute function in this way so output will be like Diffbot Parse Article Sucess Can anybody tell me what is exact problem here and how to resolve that Thanks
has answer: http://stackoverflow.com/a/26710619

http://stackoverflow.com/comment/41961443
type: AnswerComment
score: 0
type: Comment
has text: Despite me placing the code inside a function rather than in the global scope there is still one error in the book's code though. The last statement "jane;" does not yield undefined but causes a reference error which if not caught causes the script to terminate at runtime.
comment on: http://stackoverflow.com/a/26675459

http://stackoverflow.com/comment/42053226
type: Comment
type: QuestionComment
score: 2
has text: Oh I think I didn't explain it properly. give me 5 mins let me edit once the question with proper example.
comment on: http://stackoverflow.com/q/26732929

http://stackoverflow.com/a/26682290
has body: You can always make the "old and good" manual -inverse- push. You can make a Service in the App that checks every hour (or so) to the server for notifications. That requires a lot of programming + lot of resources in server + lot of network traffic in the phone... but NO REGISTRATION!!! I wouldn't recommend this, but since you don't want to register...
has comment: http://stackoverflow.com/comment/41967972
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/26678060
score: 1
has comment: http://stackoverflow.com/comment/42024491

http://stackoverflow.com/comment/41950724
score: 1
comment on: http://stackoverflow.com/q/26673951
has text: You might want to return `data.Product` instead of `data.products`?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42055962
score: 0
has text: this part i have understood but how do i get the $search? with the data from the textbox could you show it to me?
comment on: http://stackoverflow.com/a/26734602
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42163370
type: Comment
type: QuestionComment
score: 0
has text: thanks paul and greg
comment on: http://stackoverflow.com/q/26794254

http://stackoverflow.com/comment/42213125
type: QuestionComment
score: 0
has text: Use the Javascript debugger in your browser. Are you loading multiple versions of jQuery?
comment on: http://stackoverflow.com/q/26821855
type: Comment

http://stackoverflow.com/q/26708524
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42009194
has title: Blocking users using Chrome DevTool
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
answer count: 0
tagged with: web-applications
upvote count: 1
tagged with: emulation
type: Question
score: 1
tagged with: google-chrome-devtools
has comment: http://stackoverflow.com/comment/42009650
has body: I have a mobile web application which collects lot of data from the device like the users latitude and longitude, information about device operating system etc., I need to block the users who are using mobile emulators from sending false data to the system. I need a way to find if the user is using any emulators. Thanks in advance.
downvote count: 0
has comment: http://stackoverflow.com/comment/42009859

http://stackoverflow.com/a/26812917
downvote count: 0
upvote count: 2
has body: Your code has a number of typos and errors: funtion instead of function agular instead of angular no jQuery included, but you call $(function(){...}) Here's a plunker with your code working. Also, for future reference, if you remove .min from the angular source, it makes it easier to debug.
type: Answer
has comment: http://stackoverflow.com/comment/42198029
accepted answer of: http://stackoverflow.com/q/26812850
score: 2
answers question: http://stackoverflow.com/q/26812850
type: AcceptedAnswer

http://stackoverflow.com/comment/42141386
type: Comment
has text: Thanks this seems to be the most efficient way and `calc` appears to have good support.
comment on: http://stackoverflow.com/a/26782014
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42181702
type: Comment
score: 0
has text: Your first answer worked, thank you! But I need to see if new data's coming every second. Why EDIT?
type: AnswerComment
comment on: http://stackoverflow.com/a/26804159

http://stackoverflow.com/comment/42104088
comment on: http://stackoverflow.com/q/26761151
type: Comment
type: QuestionComment
score: 0
has text: @Shomz it should be a String - '#21928' something like this

http://stackoverflow.com/comment/42001015
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26702562
has text: Yes, omit the `_.` and assign the `map` etc functions to *variables*. But there's no reason to make those variables global. Make them local to your module - to the section of code that you control. You wouldn't import a module and assign its methods to global variables in python either.

onclick
tags question: http://stackoverflow.com/q/26815407
tags question: http://stackoverflow.com/q/26790764
tags question: http://stackoverflow.com/q/26674094
tags question: http://stackoverflow.com/q/26805726
tags question: http://stackoverflow.com/q/26681724
tags question: http://stackoverflow.com/q/26775999
tags question: http://stackoverflow.com/q/26749093
tags question: http://stackoverflow.com/q/26817204
tags question: http://stackoverflow.com/q/26771655
tags question: http://stackoverflow.com/q/26783216
tags question: http://stackoverflow.com/q/26827117
tags question: http://stackoverflow.com/q/26743857
tags question: http://stackoverflow.com/q/26822038
tags question: http://stackoverflow.com/q/26829406
type: Tag
tags question: http://stackoverflow.com/q/26783476
tags question: http://stackoverflow.com/q/26771793
tags question: http://stackoverflow.com/q/26675989
tags question: http://stackoverflow.com/q/26745526
tags question: http://stackoverflow.com/q/26695188
tags question: http://stackoverflow.com/q/26697148
tag name: onclick
tags question: http://stackoverflow.com/q/26778023
tags question: http://stackoverflow.com/q/26679459
tags question: http://stackoverflow.com/q/26797274
tags question: http://stackoverflow.com/q/26814584
tags question: http://stackoverflow.com/q/26817713
tags question: http://stackoverflow.com/q/26817472
tags question: http://stackoverflow.com/q/26786820

http://stackoverflow.com/comment/42167812
type: QuestionComment
comment on: http://stackoverflow.com/q/26796932
score: 0
has text: ***Where*** is the error thrown? Line number information is included in errors.
type: Comment

http://stackoverflow.com/a/26734674
has comment: http://stackoverflow.com/comment/42056795
has body: Drag-content attribute must be written over tag. For e.g : <ion-side-menu side="left"> Cards </ion-side-menus> This will do the job. !! Edit : To Create a Menu Close Button, add the attribute menu-toggle="menu_side" to the button. E.g
has comment: http://stackoverflow.com/comment/42056771
has comment: http://stackoverflow.com/comment/55068747
answers question: http://stackoverflow.com/q/26731903
accepted answer of: http://stackoverflow.com/q/26731903
type: AcceptedAnswer
downvote count: 1
score: 8
upvote count: 9
type: Answer

http://stackoverflow.com/q/26707327
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: database
tagged with: javascript
has answer: http://stackoverflow.com/a/27174275
tagged with: ios
answer count: 1
has comment: http://stackoverflow.com/comment/42018324
downvote count: 0
has body: I've created an iOS application and a little web-app. The web-app takes input and creates objects of class ("Jobs") in my parse DB. The iOS app then reads these jobs from the database (With all sorts of functionality). Now, this is the concept and I've had both parts working separately but they won't work together. // Function called to save all the information gathered. function submitFunction (name, phone, email, title, date, start, hours, address, notes) { console.log("worked"); var Jobs = Parse.Object.extend("Jobs"); var jobs = new Jobs(); jobs.save({ // these need to change to variables name: name, phoneNumber: Number(phone), email: email, date: date, title:title, startTime: start, numofHours: Number(hours), address: address, notes: notes }, { success: function(name) { // The object was saved successfully. }, error: function(name, error) { // The save failed. // error is a Parse.Error with an error code and message. } }); } This is a snippet of the javascript from my web-app, but when these are added to the DB, when i try to retrieve data my iOS app crashes (and vice versa). The Xcode query looks like this: PFQuery *updateTableArray = [PFQuery queryWithClassName:@"Jobs"]; [updateTableArray findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { if (!error) { // The find succeeded. NSLog(@"Successfully retrieved %d objects.", objects.count); // Do something with the found objects for (PFObject *object in objects) { //Init variables from parse NSString *titleString = object[@"title"]; NSString *dateString = object[@"date"]; NSString *timeString = object[@"startTime"]; NSString *hoursString = object[@"numofHours"]; NSString *addressString = object[@"address"]; NSString *notesString = object[@"notes"]; NSString *phoneString = object[@"phoneNumber"]; NSString *objectIdString = object.objectId; //add initialized vars into appropriate arrays [self.titlesArray addObject:titleString]; [self.dateArray addObject:dateString]; [self.timeArray addObject:timeSt…
favorite count: 0
has title: Parse Data base with iOS and Javascript
tagged with: parse-platform

http://stackoverflow.com/comment/42291227
has text: You shouldn't try to trigger the function; you just need to know which element catches the event. This will be `this` in Scope Variables at the moment the breakpoint is tripped.
type: AnswerComment
comment on: http://stackoverflow.com/a/26863396
score: 0
type: Comment

http://stackoverflow.com/comment/42214987
score: 0
type: Comment
type: QuestionComment
has text: @Rika You need something like this? http://jsfiddle.net/hstjs1k1/1/
comment on: http://stackoverflow.com/q/26822846

http://stackoverflow.com/comment/42017364
score: 0
type: Comment
has text: it dosn't help. I think there is no difference between this two posibilities. The problem is that, template function is working, whole data is soming from server (I checked it in schema.parse function) but in data object (in template function) application not see nested object.
type: AnswerComment
comment on: http://stackoverflow.com/a/26713228

http://stackoverflow.com/q/26736525
has comment: http://stackoverflow.com/comment/42059700
tagged with: python
has comment: http://stackoverflow.com/comment/42063152
has comment: http://stackoverflow.com/comment/42061781
has comment: http://stackoverflow.com/comment/42060652
has comment: http://stackoverflow.com/comment/42059809
answer count: 0
type: UnansweredQuestion
type: Question
tagged with: xampp
has comment: http://stackoverflow.com/comment/42076074
score: 0
has title: How to run python code from javascript code using xampp?
has body: I have a website written in html and I have a button that when clicked should run a python script. The button is programmed in javascript, and I have seen on this site how to connect javascript and python together, but the problem is that I'm running the website using xampp and localhost, so I don't know the configurations to run the python code. I have tried to use up mod_wsgi, but the instructions are very confusing and I really have no idea what I'm doing. I don't want to use JQuery or Ajax, I'd rather use just regular javascript to run the python code. How would I accomplish this? Basically I just want the button to run a python script I have, which is in the same directory as the website is. I don't want to run the python code from localhost directly, rather I want to reference and run it from the javascript code for the button. Edit: it has been pointed out to me that JavaScript and python are connected through a client server relationship. Therefore my question is how to run the python code through a webserver from xampp. Thanks in advance
tagged with: javascript
has comment: http://stackoverflow.com/comment/42059742

http://stackoverflow.com/a/26674194
answers question: http://stackoverflow.com/q/26674113
downvote count: 0
has body: When you write things like this, you seem to be testing whether: (5 &lt;= a) &gt;= 6 "5 &lt;= a" evaluates to true, but the statement "true &gt;= 6" evaluates to false.
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/26737010
has title: Form validation with more than one files and other input fields together
has comment: http://stackoverflow.com/comment/42060147
possible better answer: http://stackoverflow.com/a/26737485
has answer: http://stackoverflow.com/a/26737282
tagged with: php
has answer: http://stackoverflow.com/a/26737485
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42060253
tagged with: forms
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42083406
accepted answer: http://stackoverflow.com/a/26737282
tagged with: validation
tagged with: javascript
score: 0
has body: I have a form that allows the user to input text and upload at least one file, with file size less than 1GB. When clicking "Submit" button of the form, this requirement will be validated by javascript. However, when I add the validation for files, it does not have any response for showing the name and size of the files, especially if the file exceeds 1GB. Which one of the following approaches would be better? Check the file size after selecting the file, if the file size exceeds 1GB, there will be an alert telling the user that the file is too large and need to choose again. After choosing file(s), when clicking "submit" button, before proceeding to PHP for uploading file(s) to the server, the validation of the whole form, including input text field and file size, is done with JavaScript. Here's my form: Text input: File upload: And my validation JavaScript (validate.js): function validate_form() { var valid=true; if (document.forms['fileUpload']['text_input'].value=='') { alert('You have to enter text'); valid=false; } // File size validation goes here } EDIT at 12:20pm Hong Kong Time: Now the check of the files' sizes can be done as follows: In PHP file: Text input: File upload: In javascript var MAX_SIZE = 1073741824; var x=document.getElementById("upload_file"); for(var i=0; i<x.files.length; i++) { if (x.files[i].size > MAX_SIZE) { alert('The file "'+x.files[i].name+'" has exceeded the max file size, 1GB. Please choose smaller file.'); valid=false; return false; } } But then I have to face another problem: when I selected the files from file dialog, I just saw the word "2 files" near the "choose" button, instead of the names of selected files. So what can I do so that the selected files' names can be shown? Thanks again!

http://stackoverflow.com/a/26770071
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26770001
has body: You are using #middle as an ID in two places, the IDs need to be unique (I updated the IDs to something unique, they are arbitrary). So, jQuery finds the first ID it sees and updates it, that is why the top one gets updated when you click the bottom one. A simple fix is to use $(thisDiv).parent().children('input') when you want to update the value. That way you ensure you find the proper input to update. Here is a working codepen that I forked of your original. Also, you should not be using eval. There are better ways to convert a string into an int. Here is a good explanation as to why eval is a bad idea. - + - + $(function(){ $('.left').on('click',function() { subtractInputValue(this) }); $('.right').on('click',function() { addInputValue(this) }); }); function addInputValue(thisDiv) { inputVal = $(thisDiv).parent().children('input').val() if (inputVal == "") { $(thisDiv).parent().children('input').val(1) } else { $(thisDiv).parent().children('input').val(eval(inputVal) +1) // change it here } }
type: Answer
upvote count: 5
score: 5
answers question: http://stackoverflow.com/q/26770001
type: AcceptedAnswer

codeigniter
tags question: http://stackoverflow.com/q/26741945
tags question: http://stackoverflow.com/q/26699039
tags question: http://stackoverflow.com/q/26703146
tags question: http://stackoverflow.com/q/26802307
type: Tag
tags question: http://stackoverflow.com/q/26699629
tag name: codeigniter
tags question: http://stackoverflow.com/q/26751978
tags question: http://stackoverflow.com/q/26698633
tags question: http://stackoverflow.com/q/26699504
tags question: http://stackoverflow.com/q/26678124
tags question: http://stackoverflow.com/q/26685304
tags question: http://stackoverflow.com/q/26739795
tags question: http://stackoverflow.com/q/26693978

http://stackoverflow.com/comment/42076295
comment on: http://stackoverflow.com/a/26744829
has text: Because I want to minimize what changes I have to make.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26711735
has comment: http://stackoverflow.com/comment/42049011
has comment: http://stackoverflow.com/comment/42015399
has comment: http://stackoverflow.com/comment/42045719
has body: Your URL for the ajax request seems incorrect. The URL for getting the inbox messages via the API is: https://outlook.office365.com/api/v1.0/me/folders/inbox/messages Once you get the response, you can count the number of objects with the IsRead property set to false using a simple for loop and display that count.
score: 0
answers question: http://stackoverflow.com/q/26701330
type: Answer

http://stackoverflow.com/comment/42221222
score: 0
type: Comment
type: QuestionComment
has text: Which server side script are u using
comment on: http://stackoverflow.com/q/26759310

http://stackoverflow.com/comment/123377083
has text: Hi, I'm trying to do this but in my responseText I have an isolated string as html response from the server, It look like this: ` \n \n \n \n <meta http-equiv=\"` and so on. How Can I get normal Html from this isolated string? Maybe some nice ways instead of replace or trim the string?
comment on: http://stackoverflow.com/a/26770980
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41958913
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26679940
score: 0
has text: @JonathanM — I fail to see how jQuery would help at all with the problem described here.

http://stackoverflow.com/a/26721536
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26721535
answers question: http://stackoverflow.com/q/26721535
has body: Fiddle: http://jsfiddle.net/Td2NZ/261/ A couple things to note: the way to determine if something is hidden should be a property of the input to be hidden, not the select menu option. You had an attribute in the drop down affects: xxx, now that is an attribute of the input: hiddenBy: xxx. Also to hide the label as well the ng-hide has been moved to the tag. This should get you started. Another resource that helped solve this problem was http://plnkr.co/edit/SxIvt4KThWLtWvh3PnOh?p=preview The JSFiddle you provided almost works, if you want it to work with hardcoded "FL" change === to ==. === checks type and value, where you really want to just check value is equal. It is best practice to always use ===, but in this scenario you should use ==. angular var myApp = angular.module('myApp', []); myApp.controller('MyCtrl', function($scope) { $scope.addresses = [ {'state': 'AL'}, {'state': 'CA'}, {'state': 'FL'} ]; $scope.lov_state = [ {'lookupCode': 'AL', 'description': 'Alabama'}, {'lookupCode': 'FL', 'description': 'Florida'}, {'lookupCode': 'CA', 'description': 'California'}, {'lookupCode': 'DE', 'description': 'Delaware', 'affects': 'hidden'} ]; $scope.inputs_text = [ {label: "Start Date", input:'yyyy-mm-dd', name:'dat_start', isRequired: "true"}, {label: "End Date", input:'yyyy-mm-dd', name:'dat_end', isRequired: "true"}, {label: "hide_for_FL", input:'wow', name:'hidden', isRequired: "true", hiddenBy: 'FL'} ]; $scope.isHidden = function(){ return message = (address.state === 'FL'); }; }); html Billing State: address.state: {{address.state}} State selected: {{address.state}} {{input.label}} Input: {{input.input}}
type: AcceptedAnswer

http://stackoverflow.com/comment/42214761
score: 1
has text: @gstackoverflow - Try this `document.getElementById('scrollbarY').style.height;`. [Check out this Fiddle](http://jsfiddle.net/vkh1tpo6/1/)
type: AnswerComment
comment on: http://stackoverflow.com/a/26822550
type: Comment

http://stackoverflow.com/a/26675793
type: Answer
answers question: http://stackoverflow.com/q/26674537
score: 0
has body: Add this one it might help you var myApp = angular.module('myApp',[]); //myApp.directive('myDirective', function() {}); //myApp.factory('myService', function() {}); function MyCtrl($scope) { $scope.name = 'Superhero'; $scope.itemsArray = ["Test"]; $scope.AddInArray = function() { this.itemsArray.push("Test"); }; $scope.btn_click= function(){ var html = $("#lblDiv"); $("#container").html(html); $("#lblDiv").append(""); }; }

http://stackoverflow.com/comment/42064137
type: AnswerComment
has text: That's the big search haha. Because i know laravel has a complicated folder structure, So i don't want to make it even more complicated with my frontend preprocessors. But i really want to start using gulp or grunt :)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26738380

http://stackoverflow.com/a/26702717
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41998828
has body: As per our conversation in the chat. A quick solution would be to add a data-productname to the table so when you uncheck a checkbox, it removes the table with the same data-productname (notice that for this to work, the productname must be unique). You can see an example on this jsfiddle: http://jsfiddle.net/4g8nL9t5/1/
accepted answer of: http://stackoverflow.com/q/26701767
type: Answer
answers question: http://stackoverflow.com/q/26701767
has comment: http://stackoverflow.com/comment/42029382

http://stackoverflow.com/comment/52872435
score: 0
type: QuestionComment
type: Comment
has text: Did you find a solution for your problem ? Because I need to pass an object as a value to do some validation..
comment on: http://stackoverflow.com/q/26759217

yql
tags question: http://stackoverflow.com/q/26798735
type: Tag
tag name: yql

http://stackoverflow.com/comment/42228725
type: Comment
has text: I solved it using: var begin = moment(date).startOf('week').isoWeekday(1);
comment on: http://stackoverflow.com/a/26830714
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42024945
type: Comment
type: QuestionComment
has text: 1970 Chrome 38. http://screencast.com/t/lSfCJXhFp9Q
comment on: http://stackoverflow.com/q/26717400
score: 0

http://stackoverflow.com/comment/42104260
type: Comment
has text: @MarcelloRomanelli As an example, if hrefs[0]='google.com' and site_names[0]='Google' then the only possible way the assert will fail if the test is not waiting long enough for the page to load before validating the title. As mentioned earlier, wrapping the driver.getTitle() call in a wait should resolve the problem.
comment on: http://stackoverflow.com/a/26743455
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41950552
has text: please try to code cleaner. I can't make anything out of this. js is between html and its all unordered. seperate the js from html and css
comment on: http://stackoverflow.com/q/26675442
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26743780
has comment: http://stackoverflow.com/comment/42074367
has comment: http://stackoverflow.com/comment/42074876
has comment: http://stackoverflow.com/comment/42075207
has comment: http://stackoverflow.com/comment/42075560
has comment: http://stackoverflow.com/comment/42075368
score: 0
answers question: http://stackoverflow.com/q/26742830
has body: You can use HTML5 Local Storage feature and it works well in phonegap apps. (1) First save the user entered word or character in local storage var word = document.getElementById("word").value ; localStorage.setItem("searchword", JSON.stringify(word) ); (2) on the second page, just get it back. var a = JSON.parse(localStorage.getItem("searchword")); Using local storage, you can also add another feature in your app to show the history of last entered words. Just create an array in localstorage and use it to hold user inputs. Later on to clear all data from local storage. localStorage.clear(); Edit: In order to identify which button (letter) was picked by the user, you have to create a function that will get the label or value of that button and then save it inside the local storage as mentioned above. Once this is done then change the page and retrieve the stored item and accordingly show the results. for example: //below js must run inside the first page function saveSelectedChar() { var word = document.getElementById("charA").value ; // charA is the button ID or value....its up to you either use ID or value to identify selected char localStorage.setItem("searchword", JSON.stringify(word) ); } on second page: function showWords() { var char = JSON.parse(localStorage.getItem("searchword")); // now search in your dictionary object and show the results searchInDictionary( char ); }
type: Answer

http://stackoverflow.com/q/26755713
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/42125439
type: Question
has comment: http://stackoverflow.com/comment/42125567
tagged with: javascript
has answer: http://stackoverflow.com/a/35682406
accepted answer: http://stackoverflow.com/a/26779421
has title: Fancybox update() function reseting my scroll
answer count: 2
upvote count: 1
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/42107336
favorite count: 0
linked to: http://stackoverflow.com/q/13547007
has answer: http://stackoverflow.com/a/26779421
tagged with: http://stackoverflow.com/tag/html
tagged with: fancybox
has body: I have a fancybox popup in which I have multiple accordions. So the size of the popup varies on clicking of these accordions. Each of the accordion is an anchor tag. On expanding one or more accordions, there is a limit(max-height) to which my popup will expand, after which the content inside the popup becomes scrollable, i.e, the content inside the div with class .fancybox-inner . Whenever an accordion is clicked I call $.fancybox.update() as the popup need to be re-sized and respositioned. But $.fancybox.update() resets the current scroll position of the content inside popup. So i made this function adjustPopup and call it when any of the accordion is clicked function adjustPopup(target) { var fancyboxInner = $('.fancybox-inner')[0], scrollTop = fancyboxInner.scrollTop; //$.fancybox.update() function resets the vertical scroll of fancybox popup, so we store the //scrollTop before calling $.fancybox.update() and then assign it back when updated. $.fancybox.update(); fancyboxInner.scrollTop = scrollTop; } But this doesn't work. Even though i set the proper scrollTop value its again reset to 0 somehow. Does anyone know whats the issue here?
possible better answer: http://stackoverflow.com/a/35682406

http://stackoverflow.com/comment/42112001
type: Comment
comment on: http://stackoverflow.com/a/26765377
score: 0
type: AnswerComment
has text: Using regex gives the ability to find any number of digits as they increase with each click. Your answer doesn't show how you get the next value once it has incremented beyond 3

http://stackoverflow.com/comment/42049711
has text: What are you trying to achieve here? Is it a menu or something? Can you find an example of another website doing it? By the looks of it, it's overly complicated. Also, could you supply a [JSFiddle](http://jsfiddle.net/) or some HTML?
comment on: http://stackoverflow.com/q/26730907
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42075425
type: QuestionComment
has text: ocanal I want tab to move across columns not from left to right.
score: 0
comment on: http://stackoverflow.com/q/26744562
type: Comment

http://stackoverflow.com/comment/42011852
has text: I'd like to point out unrelated to the actual answers, you should name your constructor functions using PascalCase - a lot of lint tools will look for PascalCase functions and try to apply some constraints as if they're constructors(e.g. checking if you're calling them without new)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26709848

http://stackoverflow.com/a/26832467
has comment: http://stackoverflow.com/comment/42231992
has body: Make sure imagemagick is installed on your machine. This isn't something 'bundle install' will cover. Follow the instructions here http://www.imagemagick.org/script/install-source.php Or use homebrew or other package managers
has comment: http://stackoverflow.com/comment/42232049
type: Answer
has comment: http://stackoverflow.com/comment/42233676
has comment: http://stackoverflow.com/comment/42232392
has comment: http://stackoverflow.com/comment/42231965
has comment: http://stackoverflow.com/comment/42232522
upvote count: 2
has comment: http://stackoverflow.com/comment/42232065
score: 2
has comment: http://stackoverflow.com/comment/42232347
has comment: http://stackoverflow.com/comment/42236099
answers question: http://stackoverflow.com/q/26832288
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26832288
has comment: http://stackoverflow.com/comment/42233641
has comment: http://stackoverflow.com/comment/42232620

service
tags question: http://stackoverflow.com/q/26756992
tag name: service
type: Tag

http://stackoverflow.com/comment/42175937
comment on: http://stackoverflow.com/q/26801192
has text: To create a date from one with a T just do `str = str.replace("T"," ")` but no need. Just `return str.split("T")[0]`
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/26813517
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: Put a random generator script on page - it works. Add another one with different names - doesn't work
type: Question
has answer: http://stackoverflow.com/a/26814677
has answer: http://stackoverflow.com/a/26813553
accepted answer: http://stackoverflow.com/a/26813553
has body: Can someone tell me what I'm doing wrong? I have a function which creates a random name from two lists - a list of adjective and a list of nouns, then combines them to create a random name. As such, it works fine. But then I want to add another name generator to the same page that just randomly picks one name from a list and displays it on button click. So I copied the first function and changed the names (function name, result, placeholder). When I add both to the page, neither one works. Same function displayed twice, but the first one combines two words to make a name, and the second one just picks a name at random from a list and displays it. Since I changed the names on the second function, I think it should work fine. I don't know why adding the second function makes the first one not work (as well as the second one). Please check out my jsfiddle here: jsfiddle 2 different name generators The first function is: function generator(){ var wordlist1 = ["Cool","Masked","Tricky","Lovely","Big","Einstein","White","Rotten", "Blue","Black","Fancy","Red","Purple","Golden","Silver", "Queen", "King", "Gentle", "Tiny", "Teeny", "Silly", "Naughty", "Dear", "Sugar", "Sweet", "Agile", "Amazing", "Awesome", "Dainty", "Bright", "Noisy", "Nosy", "Quick", "Quiet", "Sassy", "Saucy", "Sharp", "Timid", "Touchy", "Snazzy", "Pretty", "Lazy", "Spirited", "Flaky", "Flashy", "Elfin", "Fiery", "Ferocious", "Bubbly", "Fussy", "Fiery", "Funny", "Gentle", "Gloomy", "Good", "Grouchy", "Crabby", "Cool", "Cranky", "Curious", "Hearty", "Hot-headed", "Electric", "Master" ]; var wordlist2 = ["Cavy","Moose","Llama","Duck","Bear","Eagle","Tiger", "Rocket","Bullet","Knee","Foot","Hand", "Yuki", "Aspen", "Tut", "Apollo", "Bandit", "Smokey", "Misha", "Snow", "Snowball", "Lord", "Prince", "Princess", "Giant", "Dwarf", "Sally", "Bee", "Star", "Dragon", "Buddy", "Lady", "Urchin", "Champion", "Cherub", "Oreo", "Soul", "Guy", "Emir", "Earl", "Admiral", "Baron", "Baroness", "Bishop", "General", "Chief", "Em…
score: 0
tagged with: random
answer count: 2
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26814677

http://stackoverflow.com/comment/41995665
comment on: http://stackoverflow.com/q/26700307
type: Comment
type: QuestionComment
has text: That is how sharing content on Facebook works – their crawler requests your content from the server, and expects the meta information to be contained within the response it is getting. And no, you can not “pass” these values any other way. So see to it, that you a) have individual URLs for each individual piece of content you want to share (a different hash part does _not_ make them different URLs), and b) that your server outputs the correct meta information directly when those URLs are requested.
score: 0

http://stackoverflow.com/comment/42063420
has text: please write whole document.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26738763

http://stackoverflow.com/comment/42207848
has text: If I understood, you need a remote server likes www.digitalocean.com . There you can install the node and run your goods,to remotly access... It was that?
comment on: http://stackoverflow.com/a/26818480
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26743254
upvote count: 1
type: Answer
has body: Use pagecontainershow as it triggers after page is shown and JQM performes a default scroll to page's top. $(document).one("pagecontainershow", function () { /* scroll */ });
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42073133
answers question: http://stackoverflow.com/q/26743011

http://stackoverflow.com/q/26679252
favorite count: 0
upvote count: 2
tagged with: d3.js
accepted answer: http://stackoverflow.com/a/26679797
tagged with: reshape
possible better answer: http://stackoverflow.com/a/26679570
has answer: http://stackoverflow.com/a/26679570
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/41957841
has comment: http://stackoverflow.com/comment/41958035
type: Question
has answer: http://stackoverflow.com/a/26679805
has title: Rearranging data in Javascript
downvote count: 0
tagged with: javascript
has body: I am pretty new to Javascript. My data is currently in csv format: place, time, value a, 2009, 25 b, 2009, 35 c, 2009, 14 a, 2010, 42 b, 2010, 13 etc. I want to arrange the data in the format [{'place': 'a', 'data':[{'t': '2009', 'v': '25'}, {'t': '2010' etc. so I can make some line graphs in d3 I am currently using the below code. However, I feel like this is inefficient because if I have a fair amount of data (30 places over 40 years), javascript will be iterating over all the data 30 times. Are there other ways I should be approaching this? var instlist = [{'place': 'a', 'data':[]}, {'place':'b', 'data':[]}]; var data = instlist; for (var i = 0; i &lt; placelist.length; i++){ for (var j = 0; j &lt; rawData.length; j++){ if (rawData[j]['place'] == instlist[i]['place']) { data[i]['data'].push({'t': rawData[j]['t'],'v': rawData[j]['v']}) } } } Thanks. Cheers
has answer: http://stackoverflow.com/a/26679797
answer count: 3
has comment: http://stackoverflow.com/comment/41957764

http://stackoverflow.com/comment/43003017
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26692474
has text: You should include some of the code from the fiddle in the post itself; links often becomes dead.

http://stackoverflow.com/a/26725346
downvote count: 0
has body: Everytime you run the $http.get, you're adding a new copy of this event handler: socketIO.on('answerSend', function (object) ... So, after running it twice, you'll have double event handlers. After running it three times, triple event handlers and so on. You need to make sure an event handler is only ever added once. I don't know the overall structure of your code, but I would guess that you want to add the event handler outside of the http response code so it is just added once.
score: 5
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26725100
type: Answer
answers question: http://stackoverflow.com/q/26725100
upvote count: 5

http://stackoverflow.com/q/26680379
has comment: http://stackoverflow.com/comment/41959973
answer count: 1
has comment: http://stackoverflow.com/comment/53743236
downvote count: 0
has comment: http://stackoverflow.com/comment/41960328
favorite count: 0
tagged with: cordova
type: UnansweredQuestion
tagged with: xmlhttprequest
upvote count: 19
has comment: http://stackoverflow.com/comment/41960080
score: 19
type: Question
has answer: http://stackoverflow.com/a/39220072
tagged with: javascript
tagged with: jquery
has body: I'm using the following $.ajax command to upload a file from a PhoneGap application: function updateProgress( evt ) { if ( evt.lengthComputable ) { var percentComplete = evt.loaded / evt.total * 100; console.log( percentComplete + "%" ); } } $.ajax({ url: url, type: "POST", data: data, cache: false, dataType: "json", processData: false, contentType: false, success: successCallback, error: errorCallback, xhr: function() { var xhr = new window.XMLHttpRequest(); xhr.addEventListener( "progress", updateProgress, false); return xhr; } }); The upload works fine. However the progress event only fires one time, once the upload has completed. It does not actually fire during uploading - so upload progress does not actually display. There is just a pause while it is uploading, and then it displays 100%. Any ideas what I am doing wrong?
has comment: http://stackoverflow.com/comment/57226213
tagged with: ajax
has title: XHR progress event not firing until upload completes?

http://stackoverflow.com/comment/42070205
comment on: http://stackoverflow.com/a/26742045
score: 0
type: AnswerComment
has text: It is not clear what you are trying to accomplish, so I have no idea.
type: Comment

http://stackoverflow.com/q/26763710
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26764073
upvote count: 2
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/42108803
tagged with: php
tagged with: page-refresh
score: 2
type: AnsweredQuestion
has body: I have a page with a auction product. When press byd (bid) it opens a bootstrap modal. Then i change the amount. Press button. it closes the modal but dont update amount before i refresh page. Any idea how to make it refresh. Have tried all similar questions. But when i use javascript it just loops. Maybe I dont know where to input it. (I dont sell hippos :-) ) Thx in advance. Here is the code: &lt;!DOCTYPE html&gt; &lt;html lang="da"&gt; &lt;head&gt; &lt;meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1?&gt; &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt; &lt;meta name="description" content=""&gt; &lt;meta name="author" content=""&gt; &lt;link rel="shortcut icon" href="../../docs-assets/ico/favicon.png"&gt; &lt;title&gt;Produkt&lt;/title&gt; &lt;link href="css/bootstrap.min.css" rel="stylesheet"&gt; &lt;link href="css/style.css" rel="stylesheet"&gt; &lt;link rel="stylesheet" type="text/css" href="css/jquery.countdown.css"&gt; &lt;script src="//code.jquery.com/jquery.js"&gt;&lt;/script&gt; &lt;script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/jquery.plugin.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/jquery.countdown.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/jquery.countdown-da.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;?php include "config.php" ?&gt; &lt;?php $antal = $db-&gt;query('SELECT * FROM produkt'); $row_count = $antal-&gt;rowCount(); ?&gt; &lt;p&gt;Produkter i DB &lt;span class="badge"&gt;&lt;?php echo "$row_count" ;?&gt;&lt;/span&gt;&lt;/p&gt; &lt;?php $bruger = 2; $sql = "SELECT bruger.brugerNavn, produkt.produktID, produkt.produktNavn, produkt.produktPris, produkt.dato, produkt.produktBeskrivelse FROM bruger LEFT JOIN produkt ON bruger.brugerID=produkt.brugerID WHERE bruger.brugerID = $bruger"; $stmt = $db-&g…
has comment: http://stackoverflow.com/comment/42108522
accepted answer: http://stackoverflow.com/a/26764073
type: Question
has title: Only changes after I refresh page! (modal Bootstrap)

http://stackoverflow.com/q/26820348
has body: I found this in d3: function d3_dispatch_event(dispatch) { var listeners = [], listenerByName = new d3_Map; function event() { var z = listeners, // defensive reference i = -1, n = z.length, l; while (++i &lt; n) if (l = z[i].on) l.apply(this, arguments); return dispatch; } event.on = function(name, listener) { ... Link to a line on github What does "defensive reference" mean here?
score: 4
accepted answer: http://stackoverflow.com/a/26822205
upvote count: 4
downvote count: 0
tagged with: javascript
has title: What is "defensive reference" in javascript?
type: AnsweredQuestion
favorite count: 0
has comment: http://stackoverflow.com/comment/42211202
has comment: http://stackoverflow.com/comment/42210630
has answer: http://stackoverflow.com/a/26822205
type: Question
tagged with: d3.js
has comment: http://stackoverflow.com/comment/42211343
answer count: 1

http://stackoverflow.com/a/26700430
answers question: http://stackoverflow.com/q/26700150
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26700150
score: 3
type: AcceptedAnswer
upvote count: 3
has body: Problem is that option does not trigger click event, adding this will solve it: $('.form-control').on('change', function() { $('.form-control option:selected').trigger('click'); }); Updated Fiddle here
type: Answer

http://stackoverflow.com/comment/42184856
has text: @ajmajmajma no problem! I'm happy to know that I was able to help you.
comment on: http://stackoverflow.com/a/26805618
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26734574
type: Answer
has body: This happened with me too. Try transitionTo method, instead of go $state.transitionTo($scope.from.name); This worked out in my case. More details can be found here Edit : I forked your original codepen and it worked there too.. Forked Codepen here
answers question: http://stackoverflow.com/q/26733664
has comment: http://stackoverflow.com/comment/42056320
score: 0
has comment: http://stackoverflow.com/comment/66471454

http://stackoverflow.com/q/26793321
possible better answer: http://stackoverflow.com/a/26793597
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26793597
has comment: http://stackoverflow.com/comment/42161895
favorite count: 0
has comment: http://stackoverflow.com/comment/42184087
has comment: http://stackoverflow.com/comment/42162243
upvote count: 2
has answer: http://stackoverflow.com/a/26834763
has comment: http://stackoverflow.com/comment/42183545
has comment: http://stackoverflow.com/comment/42161961
has comment: http://stackoverflow.com/comment/42212277
has body: I am trying to do some complicated effect, and to do it i have to break it down into its components, upon which i can build on and hopefully they will come together. Now to make a circle in canvas is easy. But i want to make it myself. So I want to write a function that would be given a point that's center, radius, and then it will draw a circle with 1 px stroke width. How would i go about it? If i look at from math perspective, what comes to mind is use circle distance formula and increment by small values, like .3 degrees, and make a dot at circumference. But if my circle is too small, like 2 px radius. Then it will waste lot of time drawing that won't matter, and if it's big enough you will see spaces between dots. so i want my circle drawing function to draw a dot if radius is 1px. 4 dots around the center if radius is 2px. ..and so on. also if this gonna make my circle look rigid, i want there to be antialiasing too :D I suppose once i know how to make outline filling it in won't be a problem..all i'd've to do is reduce the radius and keep drawing until radius is 1px.
has comment: http://stackoverflow.com/comment/42161854
has comment: http://stackoverflow.com/comment/42161869
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42161843
has comment: http://stackoverflow.com/comment/42165045
has comment: http://stackoverflow.com/comment/42211956
has comment: http://stackoverflow.com/comment/42215518
has comment: http://stackoverflow.com/comment/42198572
type: Question
has comment: http://stackoverflow.com/comment/42214890
has comment: http://stackoverflow.com/comment/42198633
answer count: 2
accepted answer: http://stackoverflow.com/a/26834763
tagged with: canvas
has title: Draw a circle in canvas manually pixel by pixel
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42197197
has comment: http://stackoverflow.com/comment/42198590
has comment: http://stackoverflow.com/comment/42196415
has comment: http://stackoverflow.com/comment/42161846

http://stackoverflow.com/comment/42136226
has text: SyntaxError: missing } after property list highlight: function(e) {
type: Comment
comment on: http://stackoverflow.com/a/26778202
type: AnswerComment
score: 0

http://stackoverflow.com/a/26744647
accepted answer of: http://stackoverflow.com/q/26744571
upvote count: 2
has comment: http://stackoverflow.com/comment/42075566
answers question: http://stackoverflow.com/q/26744571
type: Answer
score: 2
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42075601
has body: EDIT Read the question completely wrong the first time :P You shouldn't need to change any HTML, just take a look at this JS. Use JS to remove the active class from all elements before adding it to the clicked one. JS: for (var i = 1; i &lt;= 3; ++i) { (function (n) { $('.prod_switch_' + n).bind('click',function() { $('#prod_switch_' + n).removeClass('hidden'); $('.product_display').removeClass('visible'); $('#prod_switch_' + n).addClass('visible'); }); })(i); }

http://stackoverflow.com/comment/42048641
type: Comment
comment on: http://stackoverflow.com/a/26716074
score: 0
type: AnswerComment
has text: can you try `angular.element(document.querySelectorAll('[dropdown-toggle]')).on('click', function() { $scope.toggleDropdown(); });` and say if it has the same effect as your second snippet

http://stackoverflow.com/a/26794373
type: Answer
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26794048
has body: This might work. I guess you are trying to have an unique array of customerID's with all emails in it. function addEmail(emailAddresses) { if(emailAddr.length == 0) { emailAddr.push(emailAddresses); } else { // Checking var tempCheck = true; for (var i = 0; i &lt; emailAddr.length; i++) { if (emailAddr[i].customerID == emailAddresses.customerID) { for (var a = 0; a &lt; emailAddresses.emails.length; a++) { emailAddr[i]['emails'].push(emailAddresses.emails[a]); } tempCheck = false; } } if(tempCheck) { emailAddr.push(emailAddresses); } } } // End function
upvote count: 3

http://stackoverflow.com/comment/42067558
has text: All `h1` **except** the direct child `aside section h1` would be the selector wouldn't it?
comment on: http://stackoverflow.com/q/26740776
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/51193241
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26795643
has body: This worked for me. And it seems to be well supported. toArray(obj_obj) { return Object.keys(obj_obj).map(i =&gt; obj_obj[i]); } https://medium.com/chrisburgin/javascript-converting-an-object-to-an-array-94b030a1604c

http://stackoverflow.com/comment/42131308
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26753323
score: 0
has text: added HTML code, no changes were made to CSS

http://stackoverflow.com/comment/42024063
has text: well, you are using it for one element only. i hope you don´t use the id "subunit" more than one time, there should be no more than 1 element with the same id. id is a unique identifier. try without a parameter, just FB.XFBML.parse(); - although, i would not use a timeout, it must work right after you use the template.
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26714006

http://stackoverflow.com/q/26695188
answer count: 3
has comment: http://stackoverflow.com/comment/41985490
has title: Why does the browser trigger my onclick funtion?
tagged with: onclick
has answer: http://stackoverflow.com/a/26695223
has comment: http://stackoverflow.com/comment/41985512
accepted answer: http://stackoverflow.com/a/26695264
has answer: http://stackoverflow.com/a/26695225
type: AnsweredQuestion
has body: I am trying to create an onclick event(javascript), what takes input data from an HTML form, by pressing a button. I am using a window.onload function in my JS file. My form looks like: Hours: Minutes: Seconds: My onclick event: document.getElementById("send").addEventListener("click",setTheClockByButton()); and my setTheClockByButton(): function setTheClockByButton() { alert("wtf"); setTheClock(setHour, setMinute, setSecond); } and when I press view in google chrome,the alert with the wtf comes up, so it seems my button is clicked by "itself", and I got no clue why :(
has answer: http://stackoverflow.com/a/26695264
type: Question
score: 0
linked to: http://stackoverflow.com/q/15255801
possible better answer: http://stackoverflow.com/a/26695223
tagged with: javascript

http://stackoverflow.com/a/26737611
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26734479
has comment: http://stackoverflow.com/comment/42061479
accepted answer of: http://stackoverflow.com/q/26734479
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42067808
type: Answer
has comment: http://stackoverflow.com/comment/42061540
has body: Please find the link below http://jsfiddle.net/priyank_s/5x3yp6Lb/ you just need to use html and css &lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="UTF-8" /&gt; &lt;title&gt;CSS3 tabs&lt;/title&gt; &lt;link rel="stylesheet" type="text/css" media="all" href="tabs.css" /&gt; &lt;/head&gt; &lt;style&gt;body { font-family: "Segoe UI", arial, helvetica, freesans, sans-serif; font-size: 90%; color: #333; background-color: #e5eaff; margin: 10px; z-index: 0; } h1 { font-size: 1.5em; font-weight: normal; margin: 0; } h2 { font-size: 1.3em; font-weight: normal; margin: 2em 0 0 0; } p { margin: 0.6em 0; } p.tabnav { font-size: 1.1em; text-transform: uppercase; text-align: right; } p.tabnav a { text-decoration: none; color: #999; } article.tabs { position: relative; display: block; width: 40em; height: 15em; margin: 2em auto; } article.tabs section { position: absolute; display: block; top: 1.8em; left: 0; height: 12em; padding: 10px 20px; background-color: #ddd; border-radius: 5px; box-shadow: 0 3px 3px rgba(0,0,0,0.1); z-index: 0; } article.tabs section:first-child { z-index: 1; } article.tabs section h2 { position: absolute; font-size: 1em; font-weight: normal; width: 120px; height: 1.8em; top: -1.8em; left: 10px; padding: 0; margin: 0; color: #999; background-color: #ddd; border-radius: 5px 5px 0 0; } article.tabs section:nth-child(2) h2 { left: 132px; } article.tabs section:nth-child(3) h2 { left: 254px; } article.tabs section h2 a { display: block; width: 100%; line-height: 1.8em; text-align: center; text-decoration: none; color: inherit; outline: 0 none; } article.tabs section, article.tabs section h2 { -webkit-transition: all 500ms ease; -moz-transition: all 500ms ease; -ms-transition: all 500ms ease; -o-transition: all 500ms ease; transition: all 500ms ease; } article.tabs section:target, article.tabs section:target h2 { color: #333; background-color: #fff; z-index: 2; }&lt;/style&gt; &lt;body&gt; &lt;article class="tabs"&gt; &lt;section id…

http://stackoverflow.com/comment/41998556
has text: Thanks, I knew of this way but I thought there was an easier way of doing this.
type: Comment
comment on: http://stackoverflow.com/a/26702552
type: AnswerComment
score: 0

http://stackoverflow.com/q/26782888
accepted answer: http://stackoverflow.com/a/26783155
type: AnsweredQuestion
type: Question
score: 0
has title: Does thenEvaluate() return in the same way as evaluate()?
has body: So I know I can return data to casper from the window using return... casper.evaluate(function() { return 'foobar'; }, {}); How do I achieve the same thing with thenEvaluate()?
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/15967945
tagged with: casperjs
has answer: http://stackoverflow.com/a/26783155

http://stackoverflow.com/q/26804563
has body: I have this code to submit 1 form on click. $('#verify_id').click(function() { var formData = new FormData($('form#verify_id_form')[0]); $.ajax({ type: 'post', url: '/public_transaction/verify_id', data: formData, async: false, success: function (res) { alert(res); }, cache: false, contentType: false, processData: false }); return false; }); But, I want to submit 2 more forms with this. How can I change data to submit multiple forms? ID of other 2 forms are: #form1 and #form2. How can I modify this line? var formData = new FormData($('form#verify_id_form')[0]); EDIT there is a option in ajax to do something like this... var dataString = $("#filter-group1, #filter-group2").serialize(); (here 2 forms are getting submitted bu just 1 click) But, I don't know how to achieve this in my case?
has comment: http://stackoverflow.com/comment/42182313
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42182327
score: 0
has comment: http://stackoverflow.com/comment/42183148
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/42182446
has comment: http://stackoverflow.com/comment/42182884
downvote count: 1
tagged with: forms
has comment: http://stackoverflow.com/comment/42182546
type: Question
has comment: http://stackoverflow.com/comment/42182315
has title: submit multiple forms using JQuery ajax
linked to: http://stackoverflow.com/q/11373361
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/42182994
duplicate of: http://stackoverflow.com/q/11373361
has answer: http://stackoverflow.com/a/26805056
answer count: 1
has comment: http://stackoverflow.com/comment/42182417
has comment: http://stackoverflow.com/comment/42183167
favorite count: 0

http://stackoverflow.com/a/33014965
answers question: http://stackoverflow.com/q/26818795
has body: In a GitHub issue for tape jokeyrhyme mentions that gulp tasks can be Promises, and suggests a way to use that for running tape tests. Based upon that advice I've done this: gulpfile.babel.js: import glob from "glob"; gulp.task("test", () =&gt; { let module = process.argv[process.argv.length - 1]; return new Promise(resolve =&gt; { // Crude test for 'gulp test' vs. 'gulp test --module mod' if (module !== "test") { require(`./js/tape/${module}.js`); resolve(); return; } glob.sync("./js/tape/*.js").forEach(f =&gt; require(f))); resolve(); }); }); Looking at Ben's answer I suspect what I've done isn't very nice though, for one thing I've noticed that failing tests don't result in a non-zero exit code (although I've not tried Ben's approach to validate whether that does).
type: Answer
score: 0

http://stackoverflow.com/q/26827762
has title: Adding Datas via Javascript to existing JSON file on Server
has answer: http://stackoverflow.com/a/26828502
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42224353
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42223785
has body: I have following problem. I know that this is discussed quiet often, and i tried a lot of possibilities, but none is working up to now. I have some datas in my javascript file, which i want to add to a already exsiting .json file on my server. I tried to do it the following way, but whenever i open the .json file after calling ajax_get_json(), no new datas are added. function ajax_get_json(){ var hr = new XMLHttpRequest(); hr.open('POST', 'myyjson.json', true); hr.setRequestHeader ("Content-type", "application/x-www-form-urlencoded"); var us = document.getElementById("firstname").value; var msg= document.getElementById("message").value; hr.onreadystatechange= function(){ if (hr.readyState == 4 &amp;&amp; hr.status == 200){ var obj = JSON.parse(hr.responseText); obj['participant'].push({"user": us, "message": msg}); var sendingObj =JSON.stringify(obj); } } hr.send (sendingObj); } My myjson.json File has following structure: { "participant":[ {"user":"Steven", "message":" Hey,i m in!"}, {"user":"Tim", "message":" i wrote sth."}, {"user":"lukas", "message":"example"} ]} Does anyone have an Idea what the problem yould be or is there a better way doing it? Thanks in advance!
accepted answer: http://stackoverflow.com/a/26828502
tagged with: javascript
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42223255
favorite count: 0
tagged with: ajax

http://stackoverflow.com/q/26740829
has comment: http://stackoverflow.com/comment/42067681
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26740971
accepted answer: http://stackoverflow.com/a/26740971
has title: How to pass app = express() into another module?
tagged with: node.js
type: AnsweredQuestion
score: 2
type: Question
upvote count: 2
downvote count: 0
tagged with: javascript
tagged with: express
has comment: http://stackoverflow.com/comment/42067745
has body: I'm working on a basic Node app, I have app.js which requires most of my dependencies, then I have another module which just require http and url. However in this other module I need to pass my express app into it, because I'd rather not have to set var app = express() again inside the sub module. How would you pass app into my get_twitter.js? Main app.js var express = require('express'); var app = express(); var hello = require('./custom_hello'); var gettwitter = require('./get_twitter'); hello(); app.get('/', function(request, response) { response.sendFile(__dirname + "/index.html"); }); app.gettwitter(); app.listen(9000); console.log('listening on 9000...'); get_twitter module: /* ========================================= GET TWITTER Node module ========================================= */ var http = require('http'); var url = require('url'); app.get('/tweets/:username', function(req, response) { var username = req.params.username; options = { protocol: "http:", host: "api.twitter.com", pathname: "/1/statuses/user_timeline.json", query: { screen_name: username, count: 10 } } var twitterUrl = url.format(options); request(twitterUrl).pipe(response); }); Currently if I run this as is, app will of course throw the ReferenceError: app is not defined error.

http://stackoverflow.com/comment/42109737
type: QuestionComment
type: Comment
score: 1
has text: I guess it's because 1 ms is really a little interval, it's about the time of processing the setTimeout.
comment on: http://stackoverflow.com/q/26764399

http://stackoverflow.com/comment/42048983
has text: What you can do in a beforeunload handler is very limited. http://stackoverflow.com/questions/6063522/dialog-box-runs-for-1-sec-and-disappears
type: QuestionComment
comment on: http://stackoverflow.com/q/26730209
score: 0
type: Comment

http://stackoverflow.com/a/26721792
has comment: http://stackoverflow.com/comment/85737780
has comment: http://stackoverflow.com/comment/85736574
score: 3
has comment: http://stackoverflow.com/comment/42033825
downvote count: 0
has body: You can use negative lookahead for this: /ABC(?!\[)/ OR in general match any word that is not followed by [: /\b\w+\b(?!\[)/ (?!\[) is negative lookahead that avoids this match if next character is [.
has comment: http://stackoverflow.com/comment/42033857
answers question: http://stackoverflow.com/q/26721746
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26721746
upvote count: 3
type: Answer

http://stackoverflow.com/comment/41953998
has text: i tried that too. is there a difference between id & name?
comment on: http://stackoverflow.com/a/26673594
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26696671
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26696694
answer count: 1
tagged with: ractivejs
favorite count: 0
has answer: http://stackoverflow.com/a/26696694
upvote count: 5
has body: I've been using the following code to add new comment to the end of the list: ractive.push('BlogPosts.BlogPostId.Comments', newComment); But now I need to add an item to the beginning of the list. I've looked through ractive documentation but did not succeed in finding the appropriate method.
linked to: http://stackoverflow.com/q/8073673
type: AnsweredQuestion
downvote count: 0
duplicate of: http://stackoverflow.com/q/8073673
has title: Add item to the beginning of the list
type: Question
score: 5

http://stackoverflow.com/comment/42097016
comment on: http://stackoverflow.com/q/26757628
score: 2
has text: because there is **no integer type** in javascript ?
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26807097
downvote count: 0
has body: By calling .done( doStuff( data ) ), you're actually invoking the doStuff function immediately. What gets passed to the done function is its return value, which is equal to undefined in your case. Now, if the doStuff function were to return a function itself, that returned function could then be called as a callback by doStuff. What you want to do instead is pass the function as a value without invoking it right away: $.ajax({ url: urlIn, dataType: 'json', cache: false }).done(doStuff);
answers question: http://stackoverflow.com/q/26807063
type: Answer
accepted answer of: http://stackoverflow.com/q/26807063
upvote count: 10
score: 10
type: AcceptedAnswer

http://stackoverflow.com/a/26710873
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26703522
type: Answer
accepted answer of: http://stackoverflow.com/q/26703522
has body: Changing @guiStream.on('toggle', -&gt; to use fat arrow =&gt;, it works. See this related topic.

http://stackoverflow.com/comment/95137870
comment on: http://stackoverflow.com/a/26732435
type: AnswerComment
type: Comment
score: 11
has text: This is rather old now, but what about just doing: Object.values(person).join(',')

http://stackoverflow.com/a/44243390
has body: I had the same problem, confirm that you are including these two files. First one is for Bootstrap(css) and second one is for Bootstrap(javascript). In my case included the css one correctly but you know what I did at the time of including second one I included is as a stylesheet but it's a script. &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"&gt; &lt;script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"&gt;&lt;/script&gt;
answers question: http://stackoverflow.com/q/26699619
score: 0
type: Answer

http://stackoverflow.com/comment/42087667
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26752117
has text: Odd mix of native JS and jQuery here. If you're using jQuery for the loading spinner, you may as well use it to send your AJAX request which would be a one-liner using `$.get`.

http://stackoverflow.com/a/26925612
accepted answer of: http://stackoverflow.com/q/26751846
downvote count: 0
answers question: http://stackoverflow.com/q/26751846
score: 3
has body: I've tried to find out why the tests are not passing even though at first glance they should. Of course I would have to move the $scope.$apply(); from afterEach since that is not the place to call as @proloser mentioned. Even though I have done that, the tests are still not passing. I've also opened issues on chai-as-promised and angular to see if I get any input/feedback and I've actually been told that it's most likely not to work. The reason is probably because of Angular $q's dependency on the digest phase which is not accounted for in the chai-as-promsied library. Therefore I've checked the tests with Q instead of $q and it worked just fine, thus strengthening my hypothesis that the fault was not in the chai-as-promised library. I've eventually dropped chai-as-promised and I've rewritten my test using Mocha's done callback instead (even though behind the scenes, chai-as-promised does the same): "use strict"; describe("Promise", function () { var $rootScope, $scope, $q; beforeEach(angular.mock.inject(function (_$rootScope_, _$q_) { $rootScope = _$rootScope_; $q = _$q_; $scope = $rootScope.$new(); })); it("should resolve promise and eventually return", function (done) { var defer = $q.defer(); defer .promise .then(function (value) { value.should.eql("incredible, this doesn't work at all"); done(); }); defer.resolve("incredible, this doesn't work at all"); $scope.$apply(); }); it("should resolve promises as expected", function (done) { var fst = $q.defer(), snd = $q.defer(); fst .promise .then(function (value) { value.should.eql("phew, this works"); }); snd .promise .then(function (value) { value.should.eql("wow, this works as well"); }); fst.resolve("phew, this works"); snd.resolve("wow, this works as well"); var all = $q.all([ fst.promise, snd.promise ]); all .then(function () { done(); }); $scope.$apply(); }); it("should reject promise and eventually return", function (done) { $q .reject("no way, this doesn't work either?") .catch(function (value) { value.shoul…
upvote count: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/45647361
type: Answer

http://stackoverflow.com/q/26799968
answer count: 1
tagged with: asp.net
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
has title: CSS to popup window from IFrame
has body: I have a page which has an iframe. The iframe has a button which opens a new popup window. I want a CSS to be applied to the popup window. The page for the popup window is a third party application. So I cannot add CSS for that. Is there a solution for this?
has answer: http://stackoverflow.com/a/26802024
tagged with: javascript
type: Question
score: 0

http://stackoverflow.com/comment/41997093
type: Comment
type: QuestionComment
has text: The selector `#userregister form` would match a `form` element that is a descendant of an element with the id `userregister` – which is not what you have here.
comment on: http://stackoverflow.com/q/26701824
score: 2

http://stackoverflow.com/q/26710692
has comment: http://stackoverflow.com/comment/42012871
has comment: http://stackoverflow.com/comment/42016118
has comment: http://stackoverflow.com/comment/42013289
has comment: http://stackoverflow.com/comment/42013869
has comment: http://stackoverflow.com/comment/42018733
has comment: http://stackoverflow.com/comment/42012917
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42013914
linked to: http://stackoverflow.com/q/23740548
has comment: http://stackoverflow.com/comment/42024734
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/42013094
has title: How to convert CSV Data to JSON Object
has comment: http://stackoverflow.com/comment/42013494
has comment: http://stackoverflow.com/comment/42013170
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42012909
has comment: http://stackoverflow.com/comment/42015915
has comment: http://stackoverflow.com/comment/42012826
tagged with: arrays
has comment: http://stackoverflow.com/comment/42020846
tagged with: javascript
has comment: http://stackoverflow.com/comment/42012930
has body: So I have this csv file (the csv file might sit on server side preferably , but not decided yet). Most probably the user will be presented the options of selecting from these csv files from a drop-down menu. Then after selcting a particular file, user clicks "enter" , then this selected csv file should be read in javascript as an array. So how to do this ?? :- My question is on the lines of How to pass variables and data from PHP to JavaScript? ___csv_file____ Class, Subclass, Company, Product, Chocolate, Wafer chocolate, Nestle, KitKat, Chocolate, White chocolate, Nestle, Milkybar, Chocolate, White chocolate, Nestle, Milkybar, Chocolate, Caramel chocolate, Nestle, BarOne, Chocolate, Milk chocolate, Nestle, Nestle Milk chocolate, Chocolate, Milk chocolate, Nestle, Nestle Milk chocolate, Chocolate, Milk chocolate, Nestle, Nestle Milk chocolate, Chocolate, Milk chocolate, Nestle, Nestle Milk chocolate, Chocolate, Milk chocolate, Cadbury, Dairy milk, In order to read it manually this is what has been done. But as you can see it has all the csv_data hardcoded, but I'd like to get it automated (i.e. get generated by reading from a csv file ) root = { "name": "Chocolate", "tag":"class", "children": [ { "name": "Wafer", "tag":"subclass", "children": [ { "name": "Nestle", "tag":"company", "children": [ {"name": "KitKat", "tag":"product"} ] } ] }, { "name": "White", "tag":"subclass", "children": [ { "name": "Nestle", "tag":"company", "children": [ {"name": "Milkybar", "tag":"product"} ] } ] }, { "name": "Caramel", "tag":"subclass", "children": [ { "name": "Nestle", "tag":"company", "children": [ {"name": "BarOne", "tag":"product"} ] } ] }, { "name": "Milk", "tag":"subclass", "children": [ { "name": "Nestle", "tag":"company", "children": [ {"name": "Nestle Milk", "tag":"product"} ] }, { "name": "Cadbury", "tag":"company", "children": [ {"name": "Dairy Milk", "tag":"product"} ] } ] } ] }; The problem now is that I want the javascript to just read this csv file from local locat…
has comment: http://stackoverflow.com/comment/42012979
has comment: http://stackoverflow.com/comment/42013018
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26722286
has comment: http://stackoverflow.com/comment/42014991
tagged with: http://stackoverflow.com/tag/csv
has answer: http://stackoverflow.com/a/26714731
favorite count: 0

http://stackoverflow.com/comment/42028541
comment on: http://stackoverflow.com/a/26718924
type: AnswerComment
type: Comment
score: 0
has text: A factory is a singleton - meaning the function of a factory only gets called once by angular and then you get always the same object that it returned. I dont know what you mean by vanilla js syntax - angular is vanilla JS. But to catch up on your code, it would be more like: `var myGlobalServiceInstance = new serviceDesign(), myGlobalFactoryInstance = factoryDesign();`

http://stackoverflow.com/q/26775808
possible better answer: http://stackoverflow.com/a/26846015
has answer: http://stackoverflow.com/a/26826536
downvote count: 0
has answer: http://stackoverflow.com/a/26846015
tagged with: javascript
has title: angular timer directive not working with ionic framework
accepted answer: http://stackoverflow.com/a/26826536
has body: I am having issues with implementing the angular timer directive with the ionic framework. http://siddii.github.io/angular-timer/ When I implement the code using bower or the google cdn I have no issues. Plain Javascript Timer Example Plain JavaScript - Timer Example <timer ng-app="timer"/> Start Timer Stop Timer However when I use the ionic bundle http://code.ionicframework.com/1.0.0-beta.13/js/ionic.bundle.js I can not get the timer to work. And do not seem to get any errors in the console. Is this a known issue? What would be stopping it from working? Is there an alternate timer that people can reccomend? This one seemed the best to me?
has answer: http://stackoverflow.com/a/26932345
favorite count: 0
has comment: http://stackoverflow.com/comment/42320820
tagged with: timer
tagged with: angularjs
answer count: 5
tagged with: angular-directive
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26882739
score: 10
has answer: http://stackoverflow.com/a/26942315
has comment: http://stackoverflow.com/comment/42316402
upvote count: 10
tagged with: ionic-framework
type: Question
has comment: http://stackoverflow.com/comment/42220422

http://stackoverflow.com/comment/42139490
score: 0
comment on: http://stackoverflow.com/q/26768598
type: Comment
has text: @christian314159 I inherited code with this in there, and I'm also new to this, so I'm not sure why this was used, but I do know that it doesn't work.
type: QuestionComment

http://stackoverflow.com/comment/42123710
has text: http://jsfiddle.net/arunpjohny/bae3ufs5/1/
score: 2
type: Comment
comment on: http://stackoverflow.com/q/26771818
type: QuestionComment

http://stackoverflow.com/q/26706280
tagged with: angularjs
tagged with: css
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27572858
tagged with: jcarousel
has title: AngularJs Jcarousel implementation works only after pageresize
type: Question
has body: I have a kind of weird problem here. I took the for my part most fitting Example of JCarousel (http://sorgalla.com/jcarousel/examples/responsive/) and created a Angular directive out of it. So far so good, it basically works but I have to trigger one Frame/Window resizeing first, otherwise JS gives me a console error: Uncaught TypeError: Cannot read property 'index' of null - jquery.jcarousel.js:521 I've made up a smiplyfied jsfiddle here where you can reproduce the problem. The Carousel will work like a charme once you triggered a resize on the "Result" frame or the whole window: http://jsfiddle.net/nbtw3cnk/4/ I have absolutely no Idea how to solve this, any suggestions? Thanks a lot in advance! John JCarousel directive for AngularJs: var carousel = function () { return { restrict: 'A', replace: true, transclude: false, scope: { images: "=" }, template: '&lt;div class="jcarousel-wrapper"&gt;&lt;div class="jcarousel"&gt;&lt;ul&gt;&lt;li ng-repeat="img in images"&gt;&lt;!--&lt;img ng-src="{{img.imageKey}}" /&gt;--&gt;{{img.imageKey}}&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;a href="#" class="jcarousel-control-prev"&gt;&amp;lsaquo;&lt;/a&gt;&lt;a href="#" class="jcarousel-control-next"&gt;&amp;rsaquo;&lt;/a&gt;&lt;/div&gt;', link: function link(scope, element, attrs) { var jcarousel = $('.jcarousel'); jcarousel.jcarousel({ wrap: 'circular' }); $('.jcarousel-control-prev') .jcarouselControl({ target: '-=1' }); $('.jcarousel-control-next') .jcarouselControl({ target: '+=1' }); } } };
has answer: http://stackoverflow.com/a/27572858
tagged with: javascript
tagged with: resize
upvote count: 2
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/26822761
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/26822798
accepted answer: http://stackoverflow.com/a/26822771
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26822771
has body: I´m having problem making a little emoticons system for my chat. I´m working with the data attribute of HTML. So that their is a different data for every emoticon. So this is the HTML part :|" class="emoticon"> :|" title=">:|"> :D" class="emoticon"> :D" title=">:D"> <a href="#" data-emot="<3" class="emoticon"><img src="emots/emot-13.png" alt="<3" title="<3"> This is my JS /* Emoticons part */ $('a[href]').click(function(){ var emot = $('.emoticon').attr('data-emot'); $('#inputvalue').val($('#inputvalue').val() + emot); }); So the problem is that when I press on an emoticon, it needs to give me :-) or ;-)/(y). Now it keeps giving me this :). So it keeps giving me the first one of that list, can somebody help me? Thank you very much in advance! English isn't also my mother languages, my apologize for any bad grammar of spell mistakes :-)
type: Question
possible better answer: http://stackoverflow.com/a/26822798
has title: Not right data is being selected
tagged with: javascript
score: 0

http://stackoverflow.com/q/26816123
has answer: http://stackoverflow.com/a/26816193
downvote count: 2
tagged with: mysql
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26816195
has title: php- How to foreach mysqli_fetch_rows result in html?
tagged with: javascript
score: -1
answer count: 3
tagged with: arrays
has comment: http://stackoverflow.com/comment/42203047
has answer: http://stackoverflow.com/a/26816199
has body: I want to fetch rows in my mysql DB and show them using html. I am currently using: $result = mysqli_query($dbc,"SELECT * FROM offers"); $records = mysqli_num_rows($result); while ($row = mysqli_fetch_row($result)) { foreach ( $row as $field => $v) { echo "$field -> $v "; } } It produces the output as: 0 -> 38 1 -> Ashish 2 -> Description yet to put 3 -> http://google.com 4 -> 5 0 -> 12 1 -> David 2 -> Long description goes here... 3 -> http://facebook.com 4 -> 9 I want it to put all the data into as html (with loop) as: HERE I WANT TO PUT VALUE OF FIELD 1 HERE I WANT TO PUT VALUE OF FIELD 2 HERE I WANT TO PUT VALUE OF FIELD 3 HERE I WANT TO PUT VALUE OF FIELD 4 How can I do that?
favorite count: 0
has answer: http://stackoverflow.com/a/26816195
tagged with: http://stackoverflow.com/tag/html
tagged with: php
possible better answer: http://stackoverflow.com/a/26816193
type: AnsweredQuestion

http://stackoverflow.com/a/26762249
downvote count: 0
has body: You can simple use toggle: jQuery('#cat').change(function() { $("#statecat").toggle($(this).val() == "us"); }); #statecat { display: none } uk us maine georgia Reference .toggle()
type: Answer
accepted answer of: http://stackoverflow.com/q/26762168
answers question: http://stackoverflow.com/q/26762168
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/32305866
has comment: http://stackoverflow.com/comment/52631126
score: 0
type: Answer
has body: it's my tiapp.xml file about android config and the window that will only show a status bar:
answers question: http://stackoverflow.com/q/26757136

http://stackoverflow.com/q/26678998
score: 1
has body: I have firefox addon (made using the firefox addon sdk) which when instructed takes a screenshot of the currently active tab and sends it in an ajax request to a remote server. The following code in addon-script main.js is responsible for taking getting the thumbnail var tab_image_data=tabs.activeTab.getThumbnail(); var tab_image_data = base64.encode(tab_image_data); panel.port.emit("screenshot",{image_data:tab_image_data}); The image data generated by the function getThumbnail() is sent to a content script file belonging to a panel. In the content script the following code is responsible for sending the image data to the server var tab_image_data=addonmessage.image_data; var myBlob = new Blob([tab_image_data], { "type" : "text/base64data"} ); var formData = new FormData(); formData.append('img',myBlob); var xhr = new XMLHttpRequest(); xhr.open("POST", "http://xyz.abc.com/imageshot/index.php", true); xhr.onload = function() { if (xhr.status == 200) { console.log('all done: sq'); } else { console.log('Nope'); } }; xhr.send(formData); Everything works fine and the image file is created on server in jpeg format. But when I try to view that image, the windows photo viewer gives a not supported file format error. I tried to base64 encode the data before sending it but that did not work as well. Suprisingly I have a chrome extension that performs a similar function and that works flawlessly. In both cases the same php script is being used on the server side. Any help regarding this matter will be highly appreciated Thanks in advance.
upvote count: 1
tagged with: google-chrome
type: Question
tagged with: firefox
tagged with: javascript
downvote count: 0
has comment: http://stackoverflow.com/comment/42034098
favorite count: 0
type: UnansweredQuestion
has title: Sending tab screenshots to a remote server from a firefox addon
tagged with: php
tagged with: firefox-addon-sdk
answer count: 0

http://stackoverflow.com/comment/42031679
type: AnswerComment
comment on: http://stackoverflow.com/a/26718298
type: Comment
has text: thanks for pointing that out @torazaburo , was only considering data that op posted. fixed for keys with different first parts. have to think a minute about how to handle multi-part paths
score: 0

http://stackoverflow.com/comment/42047066
type: Comment
has text: You need to debug it whether expected response is being received from the server and what data is geting pushed in th dom. I can not find the reason why this is not working..
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26729423

http://stackoverflow.com/comment/41992500
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26699248
has text: Note: you don't need the `_constructorFunc` variable because the `constructorFunc` function parameter will still be accessible within the same closure.

http://stackoverflow.com/q/26697209
has answer: http://stackoverflow.com/a/26697265
accepted answer: http://stackoverflow.com/a/26697265
has body: I'm executing a javascript function but it's not executing properly. Primary E-Mail: Some text to edit Edit Info Save After executing the code I'm getting the Error "TypeErr: undefined is not a function" Please suggest the solution in purely javascript.
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
type: Question
has title: TypeErr: undefined is not a function
possible better answer: http://stackoverflow.com/a/26697253
has comment: http://stackoverflow.com/comment/41988896
has comment: http://stackoverflow.com/comment/41988888
has answer: http://stackoverflow.com/a/26697253
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41988926
answer count: 3
has answer: http://stackoverflow.com/a/26697273

http://stackoverflow.com/comment/42119011
has text: @Mike'Pomax'Kamermans, you're right, and this was covered in the comments on the question a little earlier.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26759739
score: 0

http://stackoverflow.com/a/26759854
has comment: http://stackoverflow.com/comment/42101274
score: 0
has body: You need to parse a date before filtering. Here is a working demo. $scope.dateModelName = Date.parse("Thu Nov 20 2014 18:39:01 GMT-0600 (CST)");
type: Answer
answers question: http://stackoverflow.com/q/26759468
has comment: http://stackoverflow.com/comment/42108552
has comment: http://stackoverflow.com/comment/42108340
has comment: http://stackoverflow.com/comment/42101784

http://stackoverflow.com/a/26766794
has comment: http://stackoverflow.com/comment/42133979
answers question: http://stackoverflow.com/q/26765072
has body: i think that the source should be the server code url where you get the json , and this is working for me , with php jQuery( this ).autocomplete({ source: "<?php echo site_url("search_users.php"); ?>", minLength: 1, select: function( event, ui ) { //do something when a item is selected console.log(ui.item.id); } }).data( "uiAutocomplete" )._renderItem = function( ul, item ) { return jQuery( " " ) .data( "item.autocomplete", item ) .append( ""+ " " + " " + " " + " " + " " + " " + item.label + " " + " " + " "+ "" ) .appendTo( ul ); }; and my json is : [ { "label": "Juan Perez", "value": "Juan Perez", "id": 25, "img": "http://localhost/admin/resources/as45265f." }, { "label": "Juan Perez", "value": "Juan Perez", "id": 25, "img": "http://localhost/admin/resources/as45265f.jpg" }, { "label": "Juan Perez", "value": "Juan Perez", "id": 25, "img": "http://localhost/admin/resources/as45265f.jpg" }, { "label": "Juan Perez", "value": "Juan Perez", "id": 25, "img": "http://localhost/admin/resources/as45265f.jpg" } ]
has comment: http://stackoverflow.com/comment/42114951
score: 0
type: Answer

webdriver-io
type: Tag
tags question: http://stackoverflow.com/q/26695531
tag name: webdriver-io

http://stackoverflow.com/a/26830076
downvote count: 0
has comment: http://stackoverflow.com/comment/42277360
has comment: http://stackoverflow.com/comment/42263002
type: Answer
has comment: http://stackoverflow.com/comment/42251624
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26825573
has body: I don't know if this is the only problem, but the following script source references are relative URLs: Because the URLs are not preceded with a /, they will be appended to the URL of the current page. So, if you are at /myapp/default/index, the first URL will reference /myapp/default/index/bower_components/Recorderjs/recorder.js, which will not be correct. You should keep your Javascript files in the /web2py/applications/myapp/static folder. In that case, it is best to use the web2py URL() function to generate proper URLs: Regarding internal URLs, assuming you move everything into the /myapp/static/js folder, a URL like: /bower_components/Recorderjs/recorderWorker.js would change to: /myapp/static/js/bower_components/Recorderjs/recorderWorker.js Relative internal URLs should continue to work without alteration.

http://stackoverflow.com/comment/42049550
comment on: http://stackoverflow.com/a/26730562
type: Comment
has text: Eh, no. Strings sent from the server containing HTML tags are not encoded like that at all.
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42019542
has text: Thats fine, http://stackoverflow.com/questions/26714613/dynamic-javascript-date-pointing-date-for-tomorrow
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26713102
type: AnswerComment

http://stackoverflow.com/comment/42062287
comment on: http://stackoverflow.com/q/26737804
type: QuestionComment
type: Comment
score: 0
has text: This event behaves the same as the complete event and will be triggered every time an Ajax request finishes.

calendar
tags question: http://stackoverflow.com/q/26796970
tags question: http://stackoverflow.com/q/26704067
tags question: http://stackoverflow.com/q/26787551
tags question: http://stackoverflow.com/q/26813808
tags question: http://stackoverflow.com/q/26716406
tags question: http://stackoverflow.com/q/26770494
tags question: http://stackoverflow.com/q/26714774
tag name: calendar
tags question: http://stackoverflow.com/q/26751961
type: Tag

http://stackoverflow.com/q/26725104
tagged with: selenium
upvote count: 1
has comment: http://stackoverflow.com/comment/42077616
type: Question
tagged with: protractor
tagged with: javascript
has body: So, I am trying to hit an endpoint with a POST through Protractor. I have wrote many different variations of the same code trying to get it to work. So I used 'request' as my http client seemed most popular, and found other http clients, and thought about trying those, if I can't get this one to work. I also use cucumber, and chai-as-promise. So the result of running this is nothing. So when I run this cucumber test and it goes through this When function it doesn't do the request.post. It just moves on to the next step. No Errors displayed in console. I used a REST client to do a GET to check if the POST worked, and noticed it did not work. I need some help to troubleshoot why it is doing that. will it make a difference If I were to put the post request into a function in a class somewhere else. and I called it sending it proper variables? Here is the code: this.When(/^I test this$/, function (next) { var request = require('request'); var options = { headers: { 'id': 'AQ8WHWC', 'sessionid': 'XnINW5KDQg=', 'Accept': 'application/json', 'Accept-Language': 'en-us', 'random': 'BS3P5Q' }, form: { "pay_load": [] } }; request.post('http://myurl.com/endpoint/test/', options, callback); function callback(error, response, body) { if (!error &amp;&amp; response.statusCode == 200) { var info = JSON.parse(body); console.log(info); } } browser.sleep(1).then(next) }); Output of console of running the cucumber test: Scenario: this is a cool test # endpoint/test/testing.feature:7 Given I run this endpoint test # endpoint/test/testing.feature:8 When I test this # endpoint/test/testing.feature:9 Then I see this # endpoint/test/testing.feature:10 1 scenario (1 passed) 3 steps (3 passed) [launcher] chrome passed Done, without errors.
tagged with: cucumber
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/26790522
has comment: http://stackoverflow.com/comment/42039523
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42039818
has answer: http://stackoverflow.com/a/26790522
has title: How to send a POST using Protractor
has comment: http://stackoverflow.com/comment/42039549
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/26726418
accepted answer: http://stackoverflow.com/a/26729205
downvote count: 0
tagged with: javascript
tagged with: meteor
favorite count: 0
has answer: http://stackoverflow.com/a/26745566
possible better answer: http://stackoverflow.com/a/26745566
has comment: http://stackoverflow.com/comment/42082345
tagged with: iron-router
upvote count: 1
type: AnsweredQuestion
score: 1
has body: Solved but looking for improvements, see answers function completedProfile() { if (Meteor.user() &amp;&amp; Meteor.user().profile.primary_email &amp;&amp; Meteor.user().profile.display_name &amp;&amp; Meteor.user().university_id) { return true; } else { return false; } } Router.map(function() { this.route('landing', { path: '/', // match the root path onBeforeAction: function() { this.subscribe('users').wait(); if (this.ready() &amp;&amp; completedProfile()) { this.render('bulletin') } else { this.redirect('splash'); } } }); }); The page will redirect to my splash template since the completeProfile function is false (all fields are null in if statement). Attempt 2 (hangs on splash after fields have been populated): Router.map(function() { this.route('landing', { path: '/', // match the root path action: function() { if (this.ready() &amp;&amp; completedProfile()) { this.redirect('bulletin') } else { this.render('splash'); } }, }); Attempt 3: function completedProfile() { if (Meteor.user() &amp;&amp; Meteor.user().profile.primary_email &amp;&amp; Meteor.user().profile.display_name &amp;&amp; Meteor.user().profile.university_id) { return true; } else { return false; } } Router.map(function() { this.route('landing', { path: '/', // match the root path action: function() { console.log(Meteor.user().profile); //this fails console.log(this.ready(), completedProfile()); //this then returns as expected if (this.ready() &amp;&amp; !completedProfile()) { this.redirect('splash'); } else { this.render('bulletin') } }, }); this.route('splash', { path: '/splash', // match the root path }); this.route('bulletin', { path: '/bulletin', // match the root path }); It's really weird that this works. The log of Meteor.user results in an error and then Meteor.user() loads giving me an appropriate completedProfile() return. The error is Exception in callback of async function: TypeError: Cannot read property 'profile' of undefined .
has answer: http://stackoverflow.com/a/26729205
has title: iron-router not waiting on meteor.user() to return
type: Question
answer count: 2

http://stackoverflow.com/comment/41981728
comment on: http://stackoverflow.com/q/26692776
has text: Please show your actual google maps request code so we can answer the question in the context of what you are actually doing.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26776403
has body: To extend tokyovariable's answer The easiest way to find the input element would be: $(thisDiv).closest('.doors').find(':input'); and forget about eval. You can use $.isNumeric to check if it's a number. This is a simplified version: $(function(){ $('.left').on('click',function() { calculateValue(this, -1, -1); }); $('.right').on('click',function() { calculateValue(this, +1, 1); }); }); function getInput(thisDiv) { return ($(thisDiv).closest('.doors').find(':input')); } function calculateValue(thisDiv, op, defaultValue) { var elem = getInput(thisDiv); var value = elem.val(); elem.val(!$.isNumeric(value) ? defaultValue : (parseInt(value) + op) ); } $(function(){ $('.left').on('click',function() { calculateValue(this, -1, -1); }); $('.right').on('click',function() { calculateValue(this, +1, 1); }); }); function getInput(thisDiv) { return ($(thisDiv).closest('.doors').find(':input')); } function calculateValue(thisDiv, op, defaultValue) { var elem = getInput(thisDiv); var value = elem.val(); elem.val(!$.isNumeric(value) ? defaultValue : (parseInt(value) + op) ); } .miniDoor { font-style: bold; height:30px; width:30px; background:#333; padding:10px; font-size:20px; text-align:center; color:#fff; line-height:1.5em; /* transition: all .3s ease-in-out;*/ transition:all .3s; transition-timing-function: cubic-bezier(0,0,0,1); transform-style: preserve-3d; float:left; } .miniDoor.right { -webkit-transition: background .7s; -moz-transition: background .7s; transition: background .7s; } .miniDoor.right:hover { background: #6B6A6A; background: rgba(107, 106, 106, 0.8); -webkit-transform: scale(0.93); -moz-transform: scale(0.93); -ms-transform: scale(0.93); transform: scale(0.93); color: #fff; } .miniDoor.left { -webkit-transition: background .7s; -moz-transition: background .7s; transition: background .7s; } .miniDoor.left:hover { background: #6B6A6A; background: rgba(107, 106, 106, 0.8); -webkit-transform: scale(0.93); -moz-transform: scale(0.93); -ms-transform: scale(0.93); tr…
downvote count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42237507
answers question: http://stackoverflow.com/q/26770001
type: Answer

http://stackoverflow.com/comment/41988899
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26697096
has text: If I do a setInterval the timer counter does not work correctly.
score: 0

treeview
tags question: http://stackoverflow.com/q/26824549
type: Tag
tag name: treeview

multi-device-hybrid-apps
tag name: multi-device-hybrid-apps
type: Tag
tags question: http://stackoverflow.com/q/26691474
tags question: http://stackoverflow.com/q/26745635

http://stackoverflow.com/q/26674537
tagged with: angularjs
has body: in angularJS I am using ng-repeat to build an list of items. The list is initially in a popup created through kendoui's window. There is a requirement that the popup should be pinnable so I am moving the contents of the div to another div. Works perfectly till now. After I refresh the array bound with ng-repeat through an ajax call the list becomes empty. I have created a simple fiddle to show that ng-repeat stops working if div is moved. In the fiddle there is no ajax call so the list does not get empty. Html: Add {{item}}-{{$index}}: Move JS: $scope.itemsArray = ["Test"]; $scope.AddInArray = function() { this.itemsArray.push("Test"); } $scope.btn_click = function() { var html = $("#lblDiv").html(); $("#container").html(html); $("#lblDiv").html(""); } Here is the fiddle
has answer: http://stackoverflow.com/a/26674851
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26674851
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has title: Angularjs ng-repeat does not work if div is moved
has answer: http://stackoverflow.com/a/26675793
tagged with: angularjs-ng-repeat
possible better answer: http://stackoverflow.com/a/26674654
has answer: http://stackoverflow.com/a/26674654

http://stackoverflow.com/a/26774042
has body: Use array to random sort the elements. $(function(){ var st = "It turns out tho, that if you append a string to the end of the URL that the CDN has never seen before, it will return the most recent version of the file. Bogus to be sure."; var array = st.split(" "), $ele = $("#result"); for( var i=0; i<8; i++){ array = array.sort(function(){ return Math.random() -0.5 }); $ele.val( $ele.val() + "\n" + i + ": " + array.join(" ") ); } });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26772847

http://stackoverflow.com/comment/42198310
comment on: http://stackoverflow.com/q/26813197
score: 1
has text: You have `var num = divs.length;`, but no variable named `divs`. Using any reasonably good IDE will highlight mistakes like these, get one.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42237412
type: AnswerComment
comment on: http://stackoverflow.com/a/26829277
type: Comment
has text: hi， Because it is another new problem， So I put here.[link]http://stackoverflow.com/questions/26835808/phantomjs-using-open-function-to-open-multiple-pages[/link]
score: 0

http://stackoverflow.com/q/26709880
has body: I have this keyboard that are meant to be used on a touch screen, like a info screen at the mall. And the purpose is to fill out a mailchimp form. I've got it working with a textarea, but not with the e-mail input field. Anyone can give me a clue on how to solve this? Linke: http://onelan.grafikomudv.dk/keyboard/ Thanks!
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42011487
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42011570
answer count: 0
downvote count: 0
has title: How do I link my screen keyboard, so it can fill out a mailchimp form?
score: 1
type: Question

http://stackoverflow.com/a/26681894
type: Answer
answers question: http://stackoverflow.com/q/26681644
has body: One iterative solution will be to go through each and remove the classroom object like this obj = {"Account": {"name": "name", "id": "id", "school": {"name": "name", "id": "id", "classroom": {"name": "name", "id": "id" } } }} for (key in obj){ try{ delete obj[key].school.classroom } catch(err){ console.log("didn't have classroom object") } } This has a linear complexity but is this the best solution.. not sure. Ill learn from this too
score: 0

http://stackoverflow.com/a/26757696
upvote count: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26757628
score: 3
type: Answer
has body: var time = $(this).attr("data-value"); var timeInt = parseInt(time) + 1000;
has comment: http://stackoverflow.com/comment/42097170

http://stackoverflow.com/comment/42114730
type: Comment
comment on: http://stackoverflow.com/a/26766963
has text: jQuery isn't getting confused, it's doing exactly as intended :P
type: AnswerComment
score: 4

http://stackoverflow.com/q/26831408
has title: Why Chrome don't print Element.classList property with a console.log()
tagged with: element
has comment: http://stackoverflow.com/comment/42230600
has comment: http://stackoverflow.com/comment/42229484
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26831424
upvote count: 1
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/42229511
type: Question
score: 1
has body: According to this document https://developer.mozilla.org/en-US/docs/Web/API/Element.classList , the classList property is a DOMTokenList Object in the Element class. With Chrome, when I print console.log(document.Element.prototype); I can't find any classList property, but when I do that if (("classList" in document.createElement("_"))) {...} The condition is true. In an other hand, when I do that if (!('classList' in window.Element)) {...} The condition is also TRUE ! There should be something I'm missing but what ?
tagged with: dom
accepted answer: http://stackoverflow.com/a/26831424
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42233263
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/26729794
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42047494
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26736714
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42047565
has comment: http://stackoverflow.com/comment/42047701
answer count: 4
has answer: http://stackoverflow.com/a/26731164
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42047821
linked to: http://stackoverflow.com/q/1897129
upvote count: 1
has body: How do I convert an unordered list in this format one two two One two One One twoTwo three four five six seven I want to convert this structure into structure
has answer: http://stackoverflow.com/a/26730122
has title: How to convert unordered list into dropdown using jquery?
linked to: http://stackoverflow.com/q/17857276
has answer: http://stackoverflow.com/a/26730136
score: 1
linked to: http://stackoverflow.com/q/11168257
type: Question

http://stackoverflow.com/comment/120482577
type: AnswerComment
comment on: http://stackoverflow.com/a/53102945
type: Comment
score: 1
has text: Object.keys() was the key for me. Thanks for sharing your demo!

http://stackoverflow.com/a/26779168
has comment: http://stackoverflow.com/comment/42136620
has comment: http://stackoverflow.com/comment/42136303
has comment: http://stackoverflow.com/comment/42136203
has comment: http://stackoverflow.com/comment/42137000
downvote count: 0
answers question: http://stackoverflow.com/q/26778987
has comment: http://stackoverflow.com/comment/42136467
has comment: http://stackoverflow.com/comment/42136954
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42136762
has comment: http://stackoverflow.com/comment/42137033
has body: Change your 'addRow2' to this: function addRow2(){ var ii = i++; $("#app_here2").append(rowTemplate2(ii)); //UPDATE: var rowTemplate2 is not a jQuery Object, as i thought $("#template2").find("input:empty").val("xx");; // added this row $("#delete_" + ii).click(function(){ $("#row_" + ii).remove(); }); }
score: 1

http://stackoverflow.com/comment/42180920
type: Comment
has text: Just managed to find where I used this and the only difference I can see between what you have done and mine is that the callback=? is the last parameter on my query string, in your case after the url attribute. Crazy shot in the dark but the best that I can come up with.
comment on: http://stackoverflow.com/a/26803187
score: 0
type: AnswerComment

http://stackoverflow.com/q/26721248
type: AnsweredQuestion
upvote count: 3
accepted answer: http://stackoverflow.com/a/26721348
type: Question
score: 3
has title: Can I use embedded Javascript in a ghost blog entry?
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has body: I am using the Ghost Blogging Software and tumbled over Tangle these days. So it would be great to be able to use that in some of my Blog posts. I have included the Tangle-files in my theme and load them in default.hbs. However, I cannot find a way to embed some javascript (to be executed, but not displayed) in the markdown document. I would like to write the javascript in the markdown document too as I do not want to add js-Files to my theme each time I write a blog post with reactive content. Is there a way to do this?
has answer: http://stackoverflow.com/a/26721348
tagged with: ghost-blog

http://stackoverflow.com/comment/42042540
type: QuestionComment
has text: Thank you horch260. I have not tried anything yet. I am trying to get an idea of the best direction to go in.
comment on: http://stackoverflow.com/q/26726549
score: 0
type: Comment

http://stackoverflow.com/a/26739506
score: 1
answers question: http://stackoverflow.com/q/26739306
downvote count: 0
type: Answer
has body: Max URL size is 2,083 characters. As mentioned by @Brian, the HTTP clients (e.g. browsers) may have their own limits, and HTTP servers will have different limits. Microsoft Support says "Maximum URL length is 2,083 characters in Internet Explorer". IE has problems with URLs longer than that. you should use post method for this, so: this code create a form and append it to the body and submit it. function tableToExcel() { var calendar = document.getElementById("calendar").innerHTML; var form = $('&lt;form action="ExportData" method="post"&gt;&lt;input type="text" name="calendar" /&gt;&lt;/form&gt;') form.find('input').val(calendar); form.appendTo('body').submit(); } I suggest you to add [HttpPost] attribute to your Action too. [HttpPost] public ActionResult ExportData(string calendar)
upvote count: 1

http://stackoverflow.com/comment/43321402
has text: Anil plese look for different functions which are not supported by IE 10
score: 0
comment on: http://stackoverflow.com/q/26753287
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26803605
has body: I would just use CSS for this (using display:none on the containers you want to hide). The only drawback for using a query parameter is that if users try, they can view your test-HTML. If that is not a problem then go for it. Just make sure you dont expose any API's that someone can exploit.
has comment: http://stackoverflow.com/comment/42184603
answers question: http://stackoverflow.com/q/26802934
score: 0
type: Answer

http://stackoverflow.com/a/26837185
answers question: http://stackoverflow.com/q/26810735
type: Answer
score: 0
has body: My suggestion is to use jqGrid: jQuery Grid Plugin Select example in left panel / Grouping / View Summary Row on Collapse

http://stackoverflow.com/a/26686300
type: Answer
has body: person[v] should work in this situation
score: 0
answers question: http://stackoverflow.com/q/26686281

universal-analytics
tag name: universal-analytics
tags question: http://stackoverflow.com/q/26802554
type: Tag

http://stackoverflow.com/a/26828873
type: Answer
has comment: http://stackoverflow.com/comment/42226018
has body: Try to use like this var body = $("html, body"); body.animate({scrollTop:0}, '500', 'swing', function() { alert("Finished animating"); }); See this example http://jsfiddle.net/hellosze/MMgXu/
score: 0
answers question: http://stackoverflow.com/q/26828824

http://stackoverflow.com/comment/42034531
comment on: http://stackoverflow.com/q/26721936
has text: can you give me the AMCHART CDN link which you are using??
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26759046
type: Answer
answers question: http://stackoverflow.com/q/26758971
downvote count: 0
score: 1
upvote count: 1
has body: One way is to use an if statement: onclick="if(ValidateJS()){ValidateVB()}"

http://stackoverflow.com/comment/42169027
type: Comment
comment on: http://stackoverflow.com/a/26797053
has text: Sure let me explain. `(^|\s)` matches line start OR space. `(?=\s|$)` is a positive lookahead that looks ahead a space or line end.
type: AnswerComment
score: 1

http://stackoverflow.com/comment/42199581
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26811105
type: AnswerComment
has text: Great. Suspected as much, but had to get it confirmed.

http://stackoverflow.com/q/26702784
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42011201
type: Question
has comment: http://stackoverflow.com/comment/42011021
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/42001208
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42010903
tagged with: popup
has body: uhere I upload a site for testing. When open it click albo than click on the two firsts names to see the popup in action (only on the two firsts because them are the only that are set), than go to stats and scroll and click on the two blue names (same speech as before, only these ), and everything works fine. Now try to navigate through the site/pages and you can see that not always the popups work! I tried some times and everything works only if you follow the pages in this order: albo - stats - story, and repeat. In this way more or less always work. But it's not good. To achieve this I create a function and I call it on the pagecreate of index $(document).on('pagecreate', '#splashpage', function(){ valoripopup(); }); And this is the function: function valoripopup(){ var cognome, tennista; var bgpopup = $(".bg-popup"); var close = $(".close"); var popup = $(".single-tennista-container"); $(".trigger-tennista").click(function(event){ popup = $(this).closest(".single-page").find(".single-tennista-container"); bgpopup.removeClass("outsidepopup").addClass("insidepopup"); $('html, body').on('touchmove', function(e){e.preventDefault();}); cognome = $(this).attr("data-cognome"); console.log(cognome); for(var i=0; i<players.all.length; i++){ tennista = players.all[i]; if (cognome == tennista.cognome){ popup.empty().append( ' ' + ' ' + ' ' + tennista.nome + ' ' + ' ' + tennista.cognome + ' ' + ' ' + tennista.eta + ' anni - ' + tennista.nazionalita + ' - ' + tennista.mano + ' ' + ' ' + ' ' + ' ' + ' '+ tennista.vittorie +' tornei vinti ' + ' '+ tennista.finali +' finali giocate ' + ' '+ tennista.partecipazioni +' volte qualificato ' + ' ' ); } } }); close.popup("close"); popup.popup({ positionTo: "window" }); popup.popup({ afterclose: function( event, ui ) { bgpopup.removeClass("insidepopup").addClass("outsidepopup"); $('html,body').unbind('touchmove'); } }); } Does anyone see any mistake? Thanks a lot! UPDATE Now works, but NOT if you go to previous page with the back butt…
answer count: 0
has title: jQuery Mobile popups not always working

http://stackoverflow.com/comment/42152493
type: QuestionComment
has text: You do not want to click on subscribe to check for the errors. Thats why you want to go for key up on input. Is that what you are trying to tell?
comment on: http://stackoverflow.com/q/26787893
score: 0
type: Comment

http://stackoverflow.com/comment/42018757
comment on: http://stackoverflow.com/a/26714026
has text: ..but i have seen the code which uses this before getelement by id in a chrome extension code..
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26766525
possible better answer: http://stackoverflow.com/a/47903997
accepted answer: http://stackoverflow.com/a/26808275
favorite count: 0
has title: Selenium jSoup get data from Javascript Webpage
has answer: http://stackoverflow.com/a/26808275
type: AnsweredQuestion
has body: Have asked a few questions around this recently, but haven't really found what I'm looking for. I am trying to get all of the matches from http://www.futbol24.com/Live/?__igp=1&amp;LiveDate=20141106 to print out, with time, home team and away team. I understand the content is loaded after the page is. I have been told to use Selenium and then use jSoup on the result to get the data I want. Does anybody have a tutorial or some sample code they could show me, for how to do it on the website above? Any examples would be greatly appreciated, thanks
upvote count: 0
tagged with: java
has answer: http://stackoverflow.com/a/47903997
downvote count: 2
tagged with: selenium
type: Question
has comment: http://stackoverflow.com/comment/42183777
has comment: http://stackoverflow.com/comment/42132832
tagged with: jsoup
has comment: http://stackoverflow.com/comment/42116051
score: -2
tagged with: javascript
answer count: 2

http://stackoverflow.com/a/26744934
downvote count: 0
answers question: http://stackoverflow.com/q/26744695
type: Answer
upvote count: 1
has body: This allows the following style of programming, which is used by jQuery UI for example: $('selector').datepicker('option', 'option-name', 'option-value'); If you call .datepicker() with no arguments or an object, it initializes the datepicker. When the first argument is a string, it's a call to a method of the datepicker. This approach is used for all the jQuery UI widgets, and is common among many other jQuery plugins as well.
score: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26744695

http://stackoverflow.com/a/26864637
type: Answer
upvote count: 5
has body: Taking a mix of your code and the highest-voted (not the accepted) answer at HTML Entity Decode, how about this: var decodeEntities = (function() { // this prevents any overhead from creating the object each time var element = document.createElement('textarea'); function decodeHTMLEntities (str) { if(str &amp;&amp; typeof str === 'string') { str = str.replace(/&lt;/g,"&amp;lt;"); str = str.replace(/&gt;/g,"&amp;gt;"); element.innerHTML = str; str = element.textContent; element.textContent = ''; } return str; } return decodeHTMLEntities; })(); Fiddle here: http://jsfiddle.net/ursu67z6/ You could also have a look at https://github.com/mathiasbynens/he maybe. I haven't gone through it myself, but it might deal with some cases better. I expect that if you are only decoding rather than encoding, the dom-based approach is better.
accepted answer of: http://stackoverflow.com/q/26711369
score: 5
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26711369
has comment: http://stackoverflow.com/comment/42289825

http://stackoverflow.com/comment/42049362
score: 0
comment on: http://stackoverflow.com/q/26730343
type: Comment
type: QuestionComment
has text: Written in...? Or is it a proprietary JavaScript interpreter, too?

http://stackoverflow.com/comment/42052894
score: 0
type: QuestionComment
type: Comment
has text: thanx for help, so what should I do to fix it, select tbody tr ..., or regex on the class attr ???
comment on: http://stackoverflow.com/q/26732783

http://stackoverflow.com/a/26764350
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26764240
downvote count: 0
score: 1
has body: If you have only one form tag in the page, you can use document.getElementsByTagName("form")[0]; It will return an array, just get the element in the first index

http://stackoverflow.com/q/26694669
tagged with: http://stackoverflow.com/tag/html
has body: Enter Without MLS # The above is my popover HTML syntax, set to data-trigger="focus" according to their instructions to make it dismiss on click. And then on document ready, I run this: $('#no_mls_entry').popover('show'); The popover shows up alright, but on clicking it, it does not go away.
has title: Bootstrap Popover Dismissable is not working
downvote count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/61908990
score: 1
tagged with: popover
answer count: 2
upvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27586285
favorite count: 0

http://stackoverflow.com/comment/41980737
score: 0
type: Comment
has text: nop, [3 question left] whats ur age [2 question left] whats ur dog name [1 question left] @maq
type: QuestionComment
comment on: http://stackoverflow.com/q/26692443

http://stackoverflow.com/a/26731205
type: Answer
accepted answer of: http://stackoverflow.com/q/26730907
has comment: http://stackoverflow.com/comment/42055273
has comment: http://stackoverflow.com/comment/42052697
answers question: http://stackoverflow.com/q/26730907
has body: i don't now, if it's my not cured cold or the fact, that i just got up a few hours ago, but i don't understand your code. what i understand, is what you want to achieve - and i suggest another method: $(".column:gt(0)").hide(); //first of all, hide all columns but the first one setInterval(function() { $('.column:first') //select the first column .toggle("slide") //slide it out .next().next() //select the 3rd column .toggleClass("last") //remove class "last" .next() //select first invisible column .toggleClass("last") //add class last .toggle("slide") //slide it in .end().end().end() //end the chain, to reselect the first element // since we used .next() three times, we have to end it three times .appendTo('#column-content'); //move the first element inside the dom to the end }, 5000); your interval should be running infinite now - always sliding out the first element, sliding in the next element end appending the first element to the end. therefore, the current element is always the first one... see the fiddle: http://jsfiddle.net/sv5j85df/2/
has comment: http://stackoverflow.com/comment/42055341
has comment: http://stackoverflow.com/comment/42250184
has comment: http://stackoverflow.com/comment/42062017
has comment: http://stackoverflow.com/comment/42242629
score: 0
has comment: http://stackoverflow.com/comment/42248490
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42242737

http://stackoverflow.com/q/26778744
type: Question
has comment: http://stackoverflow.com/comment/42135423
has answer: http://stackoverflow.com/a/26778868
has answer: http://stackoverflow.com/a/26778820
downvote count: 0
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/26778868
answer count: 3
linked to: http://stackoverflow.com/q/6800467
has body: Is it possible to give "" symbol itself in the html text box tag? My requirement is something like this: &lt;input name="myapi" id="testapi" type="text" value="{"value": "!MYAPI!sdfg" }" class="revapi" hidden="true"/&gt; where {"value": "!MYAPI!sdfg" } is the value of the text box Is there any way to do so?
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26778820
linked to: http://stackoverflow.com/q/4015345
has answer: http://stackoverflow.com/a/26778809
upvote count: 1
type: AnsweredQuestion
score: 1
has title: In the html text box, how to show value which itself contains "" symbol?

http://stackoverflow.com/q/26716011
has body: I have a textbox which will be initally invisible and checkbox OnClick JS method , I want the button to be visible , initally the checkbox seems invisible but when i click on the checkbox, JS Method gives me the error with object not found. and if i remove the Visible="false" from textbox code works fine. &lt;asp:Textbox id="day" runat="server" Visible="false" /&gt; &lt;asp:CheckBox ID="parts" runat="server" onClick="Click();" /&gt; &lt;script type="text/javascript"&gt; function Click(){ document.getElementById("day").style.visibility = "visible"; //ERROR **0x800a01a8 - Microsoft JScript runtime error: Object required** } &lt;/script&gt; //ERROR 0x800a01a8 - Microsoft JScript runtime error: Object required
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26720532
has title: ASP Textbox default invisible and visible from JS
tagged with: jquery
tagged with: asp.net
has comment: http://stackoverflow.com/comment/42022307
accepted answer: http://stackoverflow.com/a/26720532
has comment: http://stackoverflow.com/comment/42022856
has comment: http://stackoverflow.com/comment/42022359
type: Question
possible better answer: http://stackoverflow.com/a/26716167
tagged with: checkbox
has answer: http://stackoverflow.com/a/26716167
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42022404
tagged with: c#
tagged with: javascript

http://stackoverflow.com/comment/42165328
comment on: http://stackoverflow.com/q/26795462
has text: you think i must change the var url? I tried with xxx, but nothing chanced... :-(
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42050329
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26730500
has text: so u mean. if i use jquery and ajax i can do what i want? can u comment the code here sir..
type: Comment

http://stackoverflow.com/comment/42134171
type: QuestionComment
comment on: http://stackoverflow.com/q/26777443
has text: any error from console?
score: 0
type: Comment

http://stackoverflow.com/comment/42216812
score: 0
type: AnswerComment
has text: I think the answer to that problem is the same as I asked for yesterday. What you need to do is pass the recursive flag. raycaster.intersectObjects( group , true); http://stackoverflow.com/questions/26800922/threejs-raycast-click-detection-not-working-on-loaded-3dobject This way it checks for children of "group" too.
type: Comment
comment on: http://stackoverflow.com/a/26816870

http://stackoverflow.com/q/26714345
upvote count: 3
tagged with: javascript
has answer: http://stackoverflow.com/a/26717707
type: AnsweredQuestion
score: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
accepted answer: http://stackoverflow.com/a/26717707
favorite count: 0
has title: How to ensure that the css border goes inside the image
type: Question
possible better answer: http://stackoverflow.com/a/26714432
answer count: 2
has answer: http://stackoverflow.com/a/26714432
tagged with: css
has body: I have a some picture with border add with photoshop but these border are dirty. I would overwrite these border without doing it with photoshop again (Can not use a script because almost every picture are too specifics), because my client gave me about 15000 pictures with this error.. Then, I though about css border. So, how can I make the border around the image to fill the inside of it ? Is it possible ? Have you a better idea ? EDIT List of ideas which don't work for my case: css attribute : border-style: inset (thank you anyway Abdul Basit) css attribute : clip Thank you in advance.

http://stackoverflow.com/q/26785063
has body: I am looking at decorate function. For example, decorate function can make sum() function to return a double sum. But the following code doesn't work as desired, I changed the 'f' to 'sum', please see comment on relevant line, why I cannot change this? &lt;script&gt; function doublingDecorator(f) { return function() { return 2*sum.apply(this, arguments); // the original code is: return 2*f.apply(this,arguments) I changed to sum, then doesn't work. } } // Usage: function sum(a, b) { return a + b } var sum = doublingDecorator(sum); // sum gets decoration alert (sum(3,4)); //return 14 &lt;/script&gt;
tagged with: javascript
tagged with: decorator
has comment: http://stackoverflow.com/comment/42146893
favorite count: 0
type: AnsweredQuestion
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/26785120
has answer: http://stackoverflow.com/a/26785120
type: Question
has title: why this javascript decorate function doesn't work?
answer count: 2
has answer: http://stackoverflow.com/a/26785117
accepted answer: http://stackoverflow.com/a/26785117
upvote count: 1

http://stackoverflow.com/q/26785094
type: Question
has title: Show particular div and hide all another after click event
answer count: 2
has comment: http://stackoverflow.com/comment/42147794
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42147183
accepted answer: http://stackoverflow.com/a/26785201
has comment: http://stackoverflow.com/comment/42147653
score: 0
has answer: http://stackoverflow.com/a/26785221
has comment: http://stackoverflow.com/comment/42147753
possible better answer: http://stackoverflow.com/a/26785221
has comment: http://stackoverflow.com/comment/42146940
has body: I have three div elements: After the page is loaded the user should see the 1st div only. Here is the JS/jQ code (this works perfectly): $(document).ready(function() { $('.hide_banner').not('#' + 1).hide(3000); }); The user can pick another banner by click at links on this page: Image 1 Image 2 Image 3 After click for example on the 3rd link (href="#3") the div with id="1" should hide and the div with id="3" shold be shown. I have an idea how to maintain the problem combaining with PHP, but i want to solve it with JS/jQ only, so please help! ;) Here is my JS/jQ code which doesn't work: $(document).ready(function() { $('.hide_banner').not('#' + 1).hide(3000); $('a').click(function() { var id = $(this).attr('href'); if(id == 1) { $(id).show(3000); $('#2').hide(3000); $('#3').hide(3000); } if(id == 2) { $(id).show(3000); $('#1').hide(3000); $('#3').hide(3000); } if(id == 3) { $(id).show(3000); $('#1').hide(3000); $('#2').hide(3000); } }); }); P.s.: I know that it is incorrect to start id's names with a number ;)
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26785201
has comment: http://stackoverflow.com/comment/42147232

http://stackoverflow.com/comment/42149129
type: QuestionComment
has text: Did you verify that the CSS styles are applied to the correct elements and not overwritten by something else?
comment on: http://stackoverflow.com/q/26782224
score: 0
type: Comment

http://stackoverflow.com/a/26703416
score: 0
type: Answer
has body: Not sure I understood your question so I will just give you a solution and then you comment your requirements. You can have a div that contains another child div which is positioned inside the parent but does not change when you add more content to the parent. Here is a fiddle: http://jsfiddle.net/1fohx3qf/ .parent { border:2px solid black; padding:5px; position:relative; width:124px; height:120px; } .child { border:2px solid red; padding:30px; position:absolute; bottom:5px; right:10px; }
has comment: http://stackoverflow.com/comment/42000361
has comment: http://stackoverflow.com/comment/42000794
answers question: http://stackoverflow.com/q/26703342
has comment: http://stackoverflow.com/comment/42574379

http://stackoverflow.com/comment/42182019
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26804393
has text: you want to shift **or** shuffle your array?
type: Comment

http://stackoverflow.com/comment/42000033
type: Comment
comment on: http://stackoverflow.com/q/26681376
type: QuestionComment
has text: Any other suggestions?
score: 0

http://stackoverflow.com/comment/42022194
score: 0
has text: Did you initialize the app in `myapp.js`? `var app = angular.module('myapp', []);`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26715878

http://stackoverflow.com/q/26694467
upvote count: 27
linked to: http://stackoverflow.com/q/38213668
has answer: http://stackoverflow.com/a/26694761
tagged with: javascript
tagged with: http://stackoverflow.com/tag/q
accepted answer: http://stackoverflow.com/a/26694802
has body: I want to perform an operation repeatedly, with an increasing timeout between each operation, until it succeeds or a certain amount of time elapses. How do I structure this with promises in Q?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/62580658
score: 26
has answer: http://stackoverflow.com/a/26694705
favorite count: 0
answer count: 6
tagged with: promise
linked to: http://stackoverflow.com/q/23803743
type: Question
has answer: http://stackoverflow.com/a/26694577
downvote count: 1
has title: Promises: Repeat operation until it succeeds?
possible better answer: http://stackoverflow.com/a/26694807
has comment: http://stackoverflow.com/comment/76142941
has answer: http://stackoverflow.com/a/26694807
has answer: http://stackoverflow.com/a/26694802
linked to: http://stackoverflow.com/q/13239972

http://stackoverflow.com/q/26764324
tagged with: c#
tagged with: javascript
tagged with: user-controls
tagged with: visual-studio-2010
score: 0
answer count: 1
has body: I have a user control that loads a list of id's and values into a checkbox list and upon submission they are saved to the database. My issue is that I am using the control multiple times on the same page so when I go to submit and save each of the lists to the database I am seeing the same data from just one of the controls when saving each list. I have done some research on this issue but I am not understanding how to implement any solution into my control. Here is my codebehind. I have javascript that handles checking the boxes and displaying the list and that all appears to be functioning as it should. If anybody can point me in the right direction that would be greatly appreciated. public partial class DropDownCheckBoxList : System.Web.UI.UserControl { /// /// Value to set to the label describing the listbox /// public string ListName { get { return (string)ViewState["listname"]; } set { ViewState["listname"] = value; } } /// /// Page load events /// /// /// protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.lblListName.Text = ListName; } } /// /// Build the checkboxlist /// /// Data for all items in the list public void BuildCheckList(DataTable dtListItem) { //ddlChkList.Items.Insert(0, new ListItem()); int rowNo = dtListItem.Rows.Count; string lstValue = string.Empty; string lstID = string.Empty; ListItem lstItem = new ListItem(); for (int i = 0; i < rowNo; i++) { lstValue = dtListItem.Rows[i]["Value"].ToString(); lstID = dtListItem.Rows[i]["ID"].ToString(); lstItem = new ListItem("" + lstValue + "", lstID); lstItem.Attributes.Add("onclick", "getSelectedItem('" + lstValue + "','" + i + "','" + lstID + "','listItem');"); this.chkLstItem.Items.Add(lstItem); } this.divChkList.Style.Add("border", "black 1px solid"); this.divChkList.Style.Add("width", "155px"); this.divChkList.Style.Add("height", "auto"); this.divChkList.Style.Add("overflow", "AUTO"); this.divChkList.Style.Add("display", "none"); } /// /// Set the checkboxes in the list …
tagged with: asp.net
has answer: http://stackoverflow.com/a/26765047
accepted answer: http://stackoverflow.com/a/26765047
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42109807
has title: asp.net multiple user control client id issue
has comment: http://stackoverflow.com/comment/42109977
type: Question

http://stackoverflow.com/comment/42114951
comment on: http://stackoverflow.com/a/26766794
type: Comment
has text: no, my code is working fine until it returns the json object from ajax call, after I got json in the format I shown above, the response is not able to set in the textbox
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42109488
type: QuestionComment
has text: does `TMPL_VAR base_url` match in both environments? It would be more useful if you so us the rendered source. Where is your console logging taking place? Adding a console log is fine and all, but not without understanding where things are being logged.
comment on: http://stackoverflow.com/q/26764159
score: 0
type: Comment

http://stackoverflow.com/q/26768871
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26768980
tagged with: django
linked to: http://stackoverflow.com/q/14550396
has answer: http://stackoverflow.com/a/26769515
has comment: http://stackoverflow.com/comment/42118387
type: Question
tagged with: javascript
tagged with: jquery
has title: Append html after ajax request
tagged with: ajax
score: 0
has body: I am posting a comment to a thread with an AJAX call. It sends the request to the server as it should. How can I append the new comment to the other comments? I guess it will be something like .done(function () { ...().after(html); }); The style of the comments is a bit complicated so it's not enough to just append some text to a div. How is this normally done? I am using jQuery and Django. Should the html be generated by server-side with Django templates or just client-side with jquery (maybe a jquery templating system)? How is this done at sites as Facebook? Is it by appending html when posted successfully or is the page refreshing with an interval and updating the entire page?
has answer: http://stackoverflow.com/a/26768990
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26769036
answer count: 4

http://stackoverflow.com/comment/41948098
type: Comment
has text: You can check out https://github.com/tj/commander.js
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26674281

http://stackoverflow.com/comment/42036334
type: Comment
has text: The real problem is in pagination. This pagination is made in such way that any change in original collection (gifts) will lead to recalculating page and animation will be applied as well. I recomend you to rewrite it in convenient way.
type: AnswerComment
comment on: http://stackoverflow.com/a/26720388
score: 0

http://stackoverflow.com/comment/42103588
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26754109
has text: Hi @nyuen and thanks for getting back to me. I am indeed using Google Universal Analytics. I have also had this code up for over 24 hours and still nothing has shown up.
score: 0

http://stackoverflow.com/q/26770180
upvote count: 0
score: -3
has answer: http://stackoverflow.com/a/26770313
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42120707
possible better answer: http://stackoverflow.com/a/26770313
type: Question
answer count: 2
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26771689
has title: Javascript: Mouseover thumbnail to view large image - Multiple instances
has comment: http://stackoverflow.com/comment/42120759
accepted answer: http://stackoverflow.com/a/26771689
has body: I'm looking for a javascript option that will allow me to mouseover a thumbnail image to replace the "large" image. The trick here is using the anchor href from the thumbnail link as the large image source. I need this to work for multiple instances. The etc. can be removed if that helps Below is a simplified version of the HTML code I am using. This code cannot be changed. Every id and class can be unique. ... ...
downvote count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/42154796
type: AnswerComment
score: 0
type: Comment
has text: Well, it's nested in a `hover`, so it will only executing while you're hovering. Also, try removing `.stop()` method and executing it elsewhere/once
comment on: http://stackoverflow.com/a/26789259

http://stackoverflow.com/q/26794571
has title: Filter the Data from json or Server in angular js
linked to: http://stackoverflow.com/q/14302267
type: Question
has comment: http://stackoverflow.com/comment/42164437
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26794840
answer count: 2
tagged with: jquery
has body: I have json data with following information [ { "city":"Bangalore", "dob":"04-Oct-2014", "age":24, "maritalStatus":"Single" }, { "city":"Bangalore", "dob":"04-Oct-2014", "age":24, "maritalStatus":"Single" }, { "city":"Chennai", "dob":"04-Oct-2014", "age":24, "maritalStatus":"Single" } ] This data shown in list format {{user.city}} During HTTP request userDirectory.controller("userListControl", function($scope,$rootScope, $http) { $http.get('data/userData.json').success (function(data){ $scope.users = data; var usersDb = TAFFY(); usersDb.insert(data); }); }); Here, The data is coming from userData.json file. My Question is, Before the loading page. I will declare city = "bangalore". So based on city. I have to show the data based on city. I want to avoid other datas except city:bangalore from json. How can i filter particular city datas. I dont want use filter function. I have to filter at this stage $scope.users = data; Because i am using JS Db here. Then only i can store these data here and process in future
tagged with: angularjs
has answer: http://stackoverflow.com/a/26794749
accepted answer: http://stackoverflow.com/a/26794749
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26794840
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/69433232
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/122723700
answers question: http://stackoverflow.com/q/26732123
has body: var person = { name: "John", surname: "Smith", phone: "253 689 4555" } let personData = ${person.name},${person.surname},${person.phone} With this `` mark and $ dollar sign you will get the result.

http://stackoverflow.com/a/26747337
has comment: http://stackoverflow.com/comment/42079631
answers question: http://stackoverflow.com/q/26747171
downvote count: 0
type: Answer
has body: Add this to .htaccess ErrorDocument 401 /401.html Then in your root directory (where your index.html is) make your own 401.html file. If you want to make the login work, however, you'll need a server side language like PHP.
score: 1
upvote count: 1

http://stackoverflow.com/q/26731894
tagged with: css
score: 0
has answer: http://stackoverflow.com/a/26734869
has comment: http://stackoverflow.com/comment/42051126
answer count: 1
linked to: http://stackoverflow.com/q/26761907
has title: Highslide: how to make the gallery work directly in the page, not in a popup or modal window?
tagged with: javascript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26734869
tagged with: highslide
type: Question
tagged with: http://stackoverflow.com/tag/html
has body: I'm struggling to set up a highslide gallery to work like the one here: http://www.roadrash.no/hs-support/gallery-in-page+caption-above-thumbstrip.html However, there's a problem that the example on the page above is a popup window that is placed above everything else in a page. I want to place the gallery inside a page, without any z-indices, absolute positions etc, so that my highslide gallery would look like here: http://www.theinsider.ua/multimedia/543ce96463688/#1 Anyway, right now it seems like there's no way to do this with highslide. Am I mistaken?

http://stackoverflow.com/comment/42040642
has text: That's just the thing that keeps me wondering (even though both your comments are perfectly valid and I agree with them): that way we have to maintain the object properties both on the view code (when we want to display them) and on the controller code (when we want to conditionally show content on the view, by doing comparisons of these properties, for example).
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26725205
type: Comment

internet-explorer-8
tags question: http://stackoverflow.com/q/26795839
tags question: http://stackoverflow.com/q/26724165
tags question: http://stackoverflow.com/q/26735125
tags question: http://stackoverflow.com/q/26808792
type: Tag
tag name: internet-explorer-8
tags question: http://stackoverflow.com/q/26787342
tags question: http://stackoverflow.com/q/26763819
tags question: http://stackoverflow.com/q/26801192
tags question: http://stackoverflow.com/q/26731007
tags question: http://stackoverflow.com/q/26735616
tags question: http://stackoverflow.com/q/26733343
tags question: http://stackoverflow.com/q/26786045
tags question: http://stackoverflow.com/q/26732195
tags question: http://stackoverflow.com/q/26793941
tags question: http://stackoverflow.com/q/26738963

http://stackoverflow.com/q/26705205
linked to: http://stackoverflow.com/q/13280798
type: Question
accepted answer: http://stackoverflow.com/a/26705430
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has title: cell width attribute not copied correctly when border-collapse
has comment: http://stackoverflow.com/comment/42003560
has comment: http://stackoverflow.com/comment/42003828
has body: I'm cloning a table header line by copying the tr html and then copying the th widths. But this fails, because the widths are written as (width minus W) pixels when border: 'Wpx' and border-collapse: 'collapse'. If border-collapse is not set, the widths are written correctly. The code is simpleminded: var arr = []; // copy html, where abc is the destination &lt;tr&gt; and def is the source $abc.html($def.html()); // now copy widths of table header cells $def.children().each(function() {arr.push($(this).css("width"));}); $abc.children().each(function(index) {$(this).css("width", arr[index]);}); Fiddle shows the issue: http://jsfiddle.net/marvmartian/9z24j7vz/4/ A workaround (illustrated in the fiddle but commented out) is to check the final table sizes, and, if they are unequal, (hackily) add W to the widths before writing them. This behavior seems like a bug (using Chrome). Apparently it's a feature. What am I missing here?
tagged with: css
score: 2
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/26705430

http://stackoverflow.com/comment/42376452
type: QuestionComment
comment on: http://stackoverflow.com/q/26803237
type: Comment
has text: Well, no, obviously - application.css with all css combined and with proper url rewrite and application.js with all js combined and uglified. Usemin from my grunt scans the index.html, and there are special usemin block markers in there, to mark which files should be combined into application.css and application.js respectively. This part works. Everything works, really, just not the css url rewrite.
score: 0

http://stackoverflow.com/comment/42072310
type: Comment
has text: Teaching you how MVC works is a bit outside the scope of this question... but you shouldn't have to be manually declaring #chkTroubleshoot, it should be a bool property on your viewmodel and rendered with a @Html.CheckBoxFor(model=>model.Troubleshoot);
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26741155

http://stackoverflow.com/q/26812720
accepted answer: http://stackoverflow.com/a/26813012
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
score: 0
has title: How to check passwords correctly containing "/+=@#^" using AJAX and jQuery
upvote count: 2
downvote count: 2
tagged with: php
has answer: http://stackoverflow.com/a/26813012
has comment: http://stackoverflow.com/comment/42197934
has body: I currently have a php functionality for password checking that works flawlessly on php. However, When I try to return the result from AJAX, the "+" symbol is somehow not being detected. This is the php functionality: function pwd_contents($pwd, $notAllowedChar) { $pass_array = str_split($pwd); $notAllowedChar_array = str_split($notAllowedChar); foreach($notAllowedChar_array as $nChar) { if(in_array($nChar, $pass_array)) return true; } return false; } if(isset($_POST['password']))//If a username has been submitted { $pattern = '/\/\@\+\=\#\*/'; $password = $_POST['password'];//Some clean up :) if(pwd_contents($password, $pattern)) echo '1'; else echo '0'; } And this is the ajax call that calls it: $.ajax({ //Make the Ajax Request type: "POST", url: "ajax_check_password.php", //file name data: 'password=' + password, //data success: function(server_response) { $("#password_status").ajaxComplete(function(event, request) { if (server_response.trim() == '0') //if ajax_check_password.php return value "0" { $("#password_status").html(' Password is valid. '); $("#btn-submit-2").html(' CONTINUE '); //add this image to the span with id "availability_status" } else if (server_response.trim() == '1') //if it returns "1" { $("#password_status").html(' Password is not valid. '); $("#btn-submit-2").html('CONTINUE'); } }); } }); How would I actually get the response to be return me the result that I want if the password contains "+" on it? An example would be "Megason+2983". The result from the ajax call would give me "Password is not valid."
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42197539
has comment: http://stackoverflow.com/comment/42197582
type: Question
answer count: 1

http://stackoverflow.com/q/26801772
score: 0
tagged with: node-redis
tagged with: asynchronous
has title: Solve dependency in non blocking function call in nodes
has answer: http://stackoverflow.com/a/26802325
has body: In nodejs, a lot of function calls are implemented as non-blocking function. Sometimes there could be dependencies between these function calls. For example, when user login, I want first get the user type of the user and then according to the user type I can get the tasks which are just assigned this user type. In the non-blocking function, I use nested function call: $http.post(url_login, login_request) .success(function(req) { $http.post(url_get_tasks, req.type) .success(function(req) { //update tasks }) }) A lot of libraries provides non-blocking functions only, for example, the node_redis library. Is there any good way to handle the nested non-blocking function calls to solve the dependency problem.
tagged with: node.js
linked to: http://stackoverflow.com/q/23559341
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26801847
possible better answer: http://stackoverflow.com/a/26801847
type: Question
accepted answer: http://stackoverflow.com/a/26802325
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/42177026

http://stackoverflow.com/a/26861731
answers question: http://stackoverflow.com/q/26749760
has body: Ad the following to the header section of the ad tag: googletag.pubads().collapseEmptyDivs(true); Will collapse all empty divs. E.g. &lt;script type='text/javascript'&gt; googletag.defineSlot('/test/test1', [320, 50], 'slot1').addService(googletag.pubads()); googletag.pubads().enableSyncRendering(); googletag.pubads().enableSingleRequest(); **googletag.pubads().collapseEmptyDivs(true);** googletag.enableServices(); &lt;/script&gt;
upvote count: 2
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/42076463
type: Comment
comment on: http://stackoverflow.com/q/26745444
has text: `.toString()` is called whenever the object is converted into a string. `console.log()` doesn't do that, but whatever the actual use case is it should work. You can do `console.log(''+so)` if you want to check if `.toString()` is working.
score: 0
type: QuestionComment

http://stackoverflow.com/q/26816345
has title: Why is Q.all implemented like this?
linked to: http://stackoverflow.com/q/23803743
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26816572
upvote count: 2
has answer: http://stackoverflow.com/a/26816572
has answer: http://stackoverflow.com/a/26817582
type: Question
tagged with: javascript
tagged with: http://stackoverflow.com/tag/q
has body: I'm assuming Q.all([p1, p2, p3]).then(f) is no different than p1.then(function () { p2.then(function () { p3.then(f); }); }); Because when p1, p2 and p3 are created the async calls have already been made and we just have to wait for all of them to resolve and the order doesn't matter. Am I correct? If so, I've been looking at kriskowal's all implementation. I thought it would be something similar (chaining promises using then). But I find it to be implemented completely differently? Why is that? Edit: Let me be a little more clear. Say p1, p2, p3 resolve in 100ms, 200ms, 300ms respectively. The order of waiting for their response makes no differens p1.then(function () { // we're here at 100ms p2.then(function () { // 100ms later we're here p3.then(f); // f gets called 100ms later (at 300ms) }); }); p3.then(function () { // we're here at 300ms p2.then(function () { // boom! resolves in a snap p1.then(f); // f also gets called instantly (at 300ms) }); }); In both examples we only wait 300ms for all three promises to resolve.
answer count: 2
accepted answer: http://stackoverflow.com/a/26817582
score: 2
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/42224231
score: 0
type: Comment
has text: From the specification it seems to me `sort` should throw a `TypeError` when passed -3 instead of a function as argument. But (in Chrome anyway) it doesn't. http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.11
comment on: http://stackoverflow.com/a/26828289
type: AnswerComment

http://stackoverflow.com/comment/42190208
comment on: http://stackoverflow.com/a/26798006
has text: if this answer solved your problem, you should approve it, maybe editing the question to setup the answer better.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26732667
tagged with: jquery
tagged with: accordion
score: 0
has title: Finding elements in a jQuery accordion before activate for validation
tagged with: validation
accepted answer: http://stackoverflow.com/a/26732748
has answer: http://stackoverflow.com/a/26732748
has body: I have a jQuery accordion setup as follows: var checkout = $('#bookingaccordion').accordion({ header: 'h3.header', heightStyle: 'content', collapsible: false }); I want to validate each panel of the accordion before the user moves onto the next. I have each form field setup with a required attribute (HTML5). Using the accordionbeforeactivate event I want to loop through the inputs in the corresponding panel and flag up if there is a required field and stop the next panel being displayed. So far I have: checkout.on('accordionbeforeactivate', function(event, ui) { $(ui.oldPanel).each(function(index,element) { if($(element).prop('required')) { console.log($(this).prop('name')); //Validation and if fails, stop next panel } }) }); But I'm not seeing anything in the console. I'm sure my issue is just how I'm handling ui but can't figure it out. HTML structure is: &lt;div class="accordion ui-accordion ui-widget ui-helper-reset" id="bookingaccordion" role="tablist"&gt; &lt;h3 class="header ui-accordion-header ui-helper-reset ui-state-default ui-accordion-icons ui-corner-all" role="tab" id="ui-accordion-bookingaccordion-header-0" aria-controls="ui-accordion-bookingaccordion-panel-0" aria-selected="false" aria-expanded="false" tabindex="-1"&gt;&lt;span class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"&gt;&lt;/span&gt;Party Guest &amp;amp; Cost Information&lt;/h3&gt; &lt;div class="pane pane1 ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" id="ui-accordion-bookingaccordion-panel-0" aria-labelledby="ui-accordion-bookingaccordion-header-0" role="tabpanel" aria-hidden="true" style="display: none;"&gt; &lt;fieldset&gt; &lt;div class="form-row form-inline"&gt; &lt;label for="partybags"&gt;Party Bags (5 items) @ £&lt;span class="costvalue"&gt;5&lt;/span&gt; each bag:&lt;br&gt;(plus carriage)&lt;/label&gt; &lt;input type="number" name="partybags" id="partybags" min="0" required&gt; &lt;/div&gt; &lt;/fieldset&gt; &lt;/div&gt; &lt;h3 class="header u…
type: AnsweredQuestion
tagged with: jquery-ui-accordion
type: Question
has comment: http://stackoverflow.com/comment/42052329
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/122446448
has text: add flag "hour12: false" like this {hour: "2-digit", minute: "2-digit", hour12: false }
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/57603908

http://stackoverflow.com/a/26831454
score: 1
type: AcceptedAnswer
downvote count: 0
has body: To get things more clearly you should inspect all three ways you've posted with Firebug in Firefox. What the webkit-consoles output there has nothing to do with App.prototype but is the hierarchy of all functions called to setup the command-property. The App.prototype you find under App.__proto__. With your way 1) you definitely set all properties of object b as own properties of each App instance (= this). These props and also function extend() becomes not part of the App prototype. You can check it out: console.log(App.prototype); // or you create an instance of App and search for its prototype: var myapp = new App(); console.log(Object.getPrototypeOf(myapp)); You achieve exactly the same result as by way 1) when you incorporate function extend() in the App constructor like this: function App(b) { if (typeof b == 'object') for (var key in b) this[key] = b[key]; console.log(this); // Aside: you don't need 'return this', it's done automatically when you use 'new App()' } var obj = {command: function () {alert('command!');}}; var myapp = new App(obj); I would prefer this method because it's easy to rule which App object gets what properties simply by passing them in as argument. Only with your way 2) function extend() becomes a property of App.prototype because you explicitely define it so. Then its inherited to all App instances.
type: Answer
has comment: http://stackoverflow.com/comment/42235887
answers question: http://stackoverflow.com/q/26830314
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26830314

cross-browser
tags question: http://stackoverflow.com/q/26732085
tags question: http://stackoverflow.com/q/26714897
type: Tag
tags question: http://stackoverflow.com/q/26764591
tag name: cross-browser

http://stackoverflow.com/comment/42140780
score: 2
comment on: http://stackoverflow.com/q/26781664
has text: Wow ! that is some very old jQuery you're using (> 3 years old...). As of v1.7, `on()` replaced the `bind()` method. That said, most issues of that type are due either to the selector either to the fact that the element is dynamically generated and you need to use delegated events.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42888414
comment on: http://stackoverflow.com/q/26825379
score: 0
type: Comment
has text: See my answer. You might be able to get a better answer if you write up a proper question that involves fewer technologies. Something like "why is my controller getting invoked multiple times?", should be able to reproduce the behavior without using Firebase and Ionic. By reducing the number of technologies used, you broaden the audience that can answer your question.
type: QuestionComment

http://stackoverflow.com/q/26729333
has comment: http://stackoverflow.com/comment/42086806
has body: I want to initials the jQuery iViewer via AngularJS directives. The initialisation in jQuery is as follows $("#viewer2").iviewer( { src: "test_image2.jpg", zoom_min:'100', zoom_max:'400' }); My Angular Skeleton for the directive is as follows var vm = angular.module('vModule',[]); vm.directive('vModuleConfig',function(){ return { restrict:'A', link:function(scope,element,attrs){ // What to do here for initialisation } } });
has comment: http://stackoverflow.com/comment/42070248
has title: jQuery iViewer to AngularJS
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/42069309
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42085169
tagged with: angularjs
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/42153815
type: Comment
has text: You are targeting the element by the #id, is there a chance that there is another element with this id on your page? As stated above, your code works, and your code works for me also. Also, make sure that your element exists (is in the DOM) when the javascript is run. try `console.log($("#id_weight_goal_type_1"));` and make sure the element that is logged is the element you are expecting.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26788706

http://stackoverflow.com/comment/42005826
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26706504
has text: Try it without options, only lines, than add one by one.
score: 0

http://stackoverflow.com/q/26685932
tagged with: greasemonkey
answer count: 1
favorite count: 0
has title: nextElementSibling freezing firefox
has body: I'm trying to search specific text to highlight the link, when it is found. Because the links are not inside the h4 tags I don't know how to solve it. html code Title P ... Title X ABC EFG MNO XYZ Title Z ... The text I wanna find repeats under the others h4 tags, but I want to highlight only the ones inside Title X. So here is my code: // @grant GM_addStyle ... var h4 = document.getElementsByTagName("h4"); for (var i = 0; i < h4.length ; i++) { if (h4[i].textContent.indexOf("Title X") != -1) { var links = h4[i].nextElementSibling; while (links && links.nodeName != "H4") { if (links.textContent.indexOf("EFG") != -1){ links.setAttribute("id","color"); } if (links.textContent.indexOf("MNO") != -1){ links.setAttribute("id","color"); } } } } GM_addStyle ( ' \ #color { \ background-color: #ffd65e; \ } \ ' ); If I remove the while, the browser does not freeze. After the answer the working code was: var links = h4[i]; while ( (links = links.nextElementSibling) && (links.nodeName != "H4") ) { if (links.textContent.indexOf("EFG") != -1) { links.setAttribute("id", "color"); } ... }
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/26685971
accepted answer: http://stackoverflow.com/a/26685971
tagged with: javascript
upvote count: 1

http://stackoverflow.com/a/26699181
type: Answer
has comment: http://stackoverflow.com/comment/41996432
accepted answer of: http://stackoverflow.com/q/26698682
answers question: http://stackoverflow.com/q/26698682
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41996669
has comment: http://stackoverflow.com/comment/41996488
has comment: http://stackoverflow.com/comment/41996736
has body: There's a nice package that does nearly all the work for you. PHP-Vars-To-Js-Transformer However the basic principle is just passing variables to javascript by creating a &lt;script&gt; tag in your view and defining javascript variables. Here's an example: &lt;script type="text/javascript"&gt; var searchId = {{ $searchId }}; &lt;/script&gt; Attention depending on the data type of your variable you'll have to use quotes around it or maybe even serialize it with json.

http://stackoverflow.com/a/26741215
has comment: http://stackoverflow.com/comment/42069916
has comment: http://stackoverflow.com/comment/42068251
type: Answer
has comment: http://stackoverflow.com/comment/42068464
has body: Without actually seeing what your JavaScript is doing this is difficult to answer, however the generalized answer to your problem is to use CSS. You can do so within the head section of your html document using the
has comment: http://stackoverflow.com/comment/42070150
downvote count: 0
has comment: http://stackoverflow.com/comment/42068346
score: 1
has comment: http://stackoverflow.com/comment/42069198
has comment: http://stackoverflow.com/comment/42068381
accepted answer of: http://stackoverflow.com/q/26740820
answers question: http://stackoverflow.com/q/26740820
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42069841
has comment: http://stackoverflow.com/comment/42068532
has comment: http://stackoverflow.com/comment/42068475

http://stackoverflow.com/comment/42216899
comment on: http://stackoverflow.com/a/26823322
score: 0
type: Comment
has text: Yep, thats exactly what this project is for, read stuff, make it work (read: break) and then have something useful at the end. I could use a lot of studying... haha
type: AnswerComment

google-chrome
tags question: http://stackoverflow.com/q/26700150
tags question: http://stackoverflow.com/q/26771549
tags question: http://stackoverflow.com/q/26793578
tags question: http://stackoverflow.com/q/26765140
tags question: http://stackoverflow.com/q/26766770
tags question: http://stackoverflow.com/q/26786736
tags question: http://stackoverflow.com/q/26729011
tags question: http://stackoverflow.com/q/26784311
tags question: http://stackoverflow.com/q/26775955
tags question: http://stackoverflow.com/q/26831408
tags question: http://stackoverflow.com/q/26717336
tags question: http://stackoverflow.com/q/26816306
tags question: http://stackoverflow.com/q/26674837
tags question: http://stackoverflow.com/q/26716605
tags question: http://stackoverflow.com/q/26685719
tags question: http://stackoverflow.com/q/26711165
tags question: http://stackoverflow.com/q/26699166
tags question: http://stackoverflow.com/q/26817742
tags question: http://stackoverflow.com/q/26778599
tags question: http://stackoverflow.com/q/26802425
tags question: http://stackoverflow.com/q/26710351
tags question: http://stackoverflow.com/q/26801097
tags question: http://stackoverflow.com/q/26684190
tags question: http://stackoverflow.com/q/26711069
tags question: http://stackoverflow.com/q/26759279
tags question: http://stackoverflow.com/q/26769112
tags question: http://stackoverflow.com/q/26760387
tags question: http://stackoverflow.com/q/26793130
tags question: http://stackoverflow.com/q/26785809
tags question: http://stackoverflow.com/q/26743177
tags question: http://stackoverflow.com/q/26724971
tags question: http://stackoverflow.com/q/26771968
tags question: http://stackoverflow.com/q/26805797
tags question: http://stackoverflow.com/q/26718341
tags question: http://stackoverflow.com/q/26715023
tags question: http://stackoverflow.com/q/26767578
tags question: http://stackoverflow.com/q/26678998
tags question: http://stackoverflow.com/q/26744606
tags question: http://stackoverflow.com/q/26735117
tags question: http://stackoverflow.com/q/26677547
tags question: http://stackoverflow.com/q/26693363
tags question: http://stackoverflow.com/q/26810207
tags question: http://stackoverflow.com/q/26751555
tags question: http://stackoverflow.com/q/26715241
type: Tag
tags question: http://stackoverflow.com/q/26743252
tags question: http://stackoverflow.com/q/26768625
tags question: http://stackoverflow.com/q/26723440
tags question: http://stackoverflow.com/q/26831187
tags question: http://stackoverflow.com/q/26760940
tags question: http://stackoverflow.com/q/26752114
tags question: http://stackoverflow.com/q/26801984
tags question: http://stackoverflow.com/q/26759855
tags question: http://stackoverflow.com/q/26812315
tag name: google-chrome
tags question: http://stackoverflow.com/q/26745830
tags question: http://stackoverflow.com/q/26740212
tags question: http://stackoverflow.com/q/26703626
tags question: http://stackoverflow.com/q/26798148
tags question: http://stackoverflow.com/q/26800822
tags question: http://stackoverflow.com/q/26762093
tags question: http://stackoverflow.com/q/26810198
tags question: http://stackoverflow.com/q/26699096
tags question: http://stackoverflow.com/q/26819647
tags question: http://stackoverflow.com/q/26784113
tags question: http://stackoverflow.com/q/26810180
tags question: http://stackoverflow.com/q/26732287
tags question: http://stackoverflow.com/q/26707225
tags question: http://stackoverflow.com/q/26677156
tags question: http://stackoverflow.com/q/26811026
tags question: http://stackoverflow.com/q/26776876
tags question: http://stackoverflow.com/q/26746252
tags question: http://stackoverflow.com/q/26728703
tags question: http://stackoverflow.com/q/26683986
tags question: http://stackoverflow.com/q/26690265
tags question: http://stackoverflow.com/q/26712524

http://stackoverflow.com/q/26701861
has answer: http://stackoverflow.com/a/26707994
score: 4
possible better answer: http://stackoverflow.com/a/51804170
accepted answer: http://stackoverflow.com/a/26707994
tagged with: django
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
upvote count: 4
answer count: 2
has title: how to pass utf-8 data from Django to javascript
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: python-2.7
has answer: http://stackoverflow.com/a/51804170
has body: I have the following key value object in Django: data = { "id": 1, "question_text": "אנא בחר אחת מהתשובות הבאות", "answers": [ { "label" : "תשובה 1", "value" : 1, "count" : 30 }, { "label" : "תשובה 2", "value" : 2, "count" : 30 }, { "label" : "תשובה 3", "value" : 3, "count" : 30 }, } Note that some of the data is in Hebrew so when I save it in to the DB I use: unicode(self.answer_text).encode('utf-8') When I tried to send this object to a view, in order to use it in a Django template and as well in Javascript I have used this line: return render(request, 'reports/report.html', {'data': data }) and in the view I used: var question_data = {{ data }} #in order to get the data object that was sent to the view But I get this element: {&amp;#39;bad&amp;#39;: 45, &amp;#39;good&amp;#39;: 55, &amp;#39;question_text&amp;#39;: u&amp;#39;\u05e2\u05d3 \u05db\u05de\u05d4 \u05d0\u05ea\u05d4 \u05de\u05e8\u05d5\u05e6\u05d4 \u05d0\u05d5 \u05dc\u05d0 \u05de\u05e8\u05d5\u05e6\u05d4 \u05de\u05d1\u05d2\u05d3\u05d9 \u05e2\u05dc\u05d9\u05ea \u05d1\u05d0\u05d5\u05e4\u05df \u05db\u05dc\u05dc\u05d9?&amp;#39;, &amp;#39;id&amp;#39;: u&amp;#39;8&amp;#39;, &amp;#39;answers&amp;#39;: [{&amp;#39;value&amp;#39;: 30, &amp;#39;label&amp;#39;: u&amp;#39;\u05de\u05d0\u05d5\u05d3 \u05de\u05e8\u05d5\u05e6\u05d4&amp;#39;}, {&amp;#39;value&amp;#39;: 25, &amp;#39;label&amp;#39;: u&amp;#39;\u05d3\u05d9 \u05de\u05e8\u05d5\u05e6\u05d4&amp;#39;}, {&amp;#39;value&amp;#39;: 20, &amp;#39;label&amp;#39;: u&amp;#39;\u05dc\u05d0 \u05db\u05dc \u05db\u05da \u05de\u05e8\u05d5\u05e6\u05d4&amp;#39;}, {&amp;#39;value&amp;#39;: 25, &amp;#39;label&amp;#39;: u&amp;#39;\u05db\u05dc\u05dc \u05dc\u05d0 \u05de\u05e8\u05d5\u05e6\u05d4&amp;#39;}]} and this error in the console: SyntaxError: Unexpected token '&amp;'. Expected a property name I have also tried to use: var question_data = and I got this error: [Error] SyntaxError: Unexpected string literal '\u05e2\u05d3 ... I'm using Django 1.7 and Python 2.7.6 Please t…
tagged with: python

http://stackoverflow.com/comment/42109030
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26763908
has text: @icecub Alright. That's actually very helpful to me :D. Only thing I need to find out how to send form with ajax without showing it. Any idea on that, maybe quick fiddle?
score: 0

http://stackoverflow.com/comment/42135965
has text: I don't see how those questions are related - I need to load my script after html
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26778180
score: 0

http://stackoverflow.com/q/26701147
has title: JavaScript/jQuery .replace math inquiry
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41995959
has comment: http://stackoverflow.com/comment/41997063
downvote count: 0
has comment: http://stackoverflow.com/comment/41996184
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41996108
has comment: http://stackoverflow.com/comment/41995972
has comment: http://stackoverflow.com/comment/41996056
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/41996074
tagged with: math
upvote count: 1
type: Question
has body: $(function() { var links = $(".notranslate").map(function() { var gg = this.href gg.replace(/\D/g,''); }).get(); console.log(links); }); I'm curious on how I would make this just return the numbers out of the part that it logged. Error: Uncaught TypeError: Cannot read property 'replace'

http://stackoverflow.com/q/26776145
has comment: http://stackoverflow.com/comment/42130883
accepted answer: http://stackoverflow.com/a/26776656
upvote count: 3
downvote count: 2
tagged with: each
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26776656
has answer: http://stackoverflow.com/a/26776555
has comment: http://stackoverflow.com/comment/42130935
has comment: http://stackoverflow.com/comment/42130982
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26776555
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/42132139
has body: I want use a for loop instead of $.each. How is it? My code with $.each is as: $.ajax({ type: "POST", url: 'get_units', data: { id : '1'}, success: function (units) { $.each(units, function (index, val) { //I want change this line to for loop alert(index+'-'+val) // I want two result }); }, "error": function (x, y, z) { alert("An error has occured:\n" + x + "\n" + y + "\n" + z); } });
has title: Using for instead of jQuery each

http://stackoverflow.com/q/26687194
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26687432
has title: I want to add filtering,pagination to myTable
tagged with: http://stackoverflow.com/tag/html
has body: I want to add filtering,pagination to myTable, I have used Bootstrap code of Bootstrap-Table-With-Sorting-Searching-and-Paging. but it's not displaying the pagination and search box for my dynamic data.so how do I add it to my bellow code. Example of Employee Table with twitter bootstrap Bootstrap Table With sorting,searching and paging using dataTable.js (Responsive) <?php include 'config.php'; $resultcrud =mysql_query("SELECT * FROM customer"); ?> ID Name/Proprietors Name Email-ID Address Contact No Action <?php $count=mysql_num_rows($resultcrud); if($count==NULL) { echo ' '; echo ' '."No Records Found".' '; echo ' ';}else while($row=mysql_fetch_array($resultcrud)) { echo ' '; echo ' '. $row['customer_index'] . ' '; echo ' '. $row['firm_name'] . '/'. $row['prop_name'] . ' '; echo ' '. $row['email_id'] . ' '; echo ' '. $row['firm_address'] . ' '; echo ' '. $row['contact_no'] . ' '; echo ' '.$row['category'].''.$row['category_id'].''. $row['sub_category'] .''.$row['contact_no'].''.$row['service_detail'].''.$row['other_detail'].''.$row['photo'].' '; echo ' View Edit Delete '; echo ' '; } $dbo = null; ?>
type: UnansweredQuestion
tagged with: php
tagged with: mysql
type: Question
answer count: 1

http://stackoverflow.com/comment/42075566
score: 1
type: AnswerComment
type: Comment
has text: lol I noticed. It didn't worked how I wanted but I managed to use it to modified my code and make it work. Thanks!
comment on: http://stackoverflow.com/a/26744647

http://stackoverflow.com/q/26824473
tagged with: generalization
has title: Generalizing my Function
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26824684
tagged with: javascript
tagged with: resize
score: 0
has body: I wrote this function that resize an element by a selected corner function RelativeCornerResizer(Elements , StartSize , EndSize , Unit , Left , Top) { //var I = StartSize ; var SSpx = "" , LeftPx="" , TopPx=""; LeftPx = (Left)+Unit; TopPx = (Top)+Unit; if(StartSize &lt; EndSize) { StartSize+=2; SSpx = StartSize+Unit; if(Left!=0) LeftPx = (Left-StartSize)+Unit; if(Top!=0) TopPx = (Top-StartSize)+Unit; $(Elements).css({'width': SSpx,'height': SSpx}); $(Elements).css({'left' : LeftPx , 'top' : TopPx}); setTimeout(function(){RelativeCornerResizer(Elements , StartSize , EndSize , Unit , Left , Top)},1); } } now this resize only little elements to bigger ones , I want to generalize it to resizing from big to small , so : if my StartSize is greater than EndSize ---> BIG to SMALL else ---> SMALL to BIG a simple if else could loop it changing from SMALL to BIG to SMALL to BIG [...] there's a way without introducing another params to the function ? I modified the solution proposed by Markus , and it works , but i'm still not satisfied... function RelativeCornerResizer(Elements , StartSize , EndSize , Unit , Left , Top) { var SSpx = "" , LeftPx = "" , TopPx = "", Direction = StartSize &lt; EndSize , Condition ; LeftPx = (Left) + Unit; TopPx = (Top) + Unit; if (Direction) { StartSize+=2; Condition = StartSize &lt; EndSize ; } else { StartSize-=2; Condition = StartSize &gt; EndSize ; } SSpx = (StartSize) + Unit; LeftDiff = Direction ? Left - StartSize : Left + StartSize; TopDiff = Direction ? Top - StartSize : Top + StartSize; if(Left!=0) LeftPx = (LeftDiff) + Unit; if(Top!=0) TopPx = (TopDiff) + Unit; $(Elements).css({'width': SSpx,'height': SSpx, 'left' : LeftPx , 'top' : TopPx}); if(Condition) setTimeout(function(){RelativeCornerResizer(Elements , StartSize , EndSize , Unit , Left , Top)},1); }
answer count: 2
tagged with: function
has comment: http://stackoverflow.com/comment/42221615
possible better answer: http://stackoverflow.com/a/26824619
has answer: http://stackoverflow.com/a/26824619
accepted answer: http://stackoverflow.com/a/26824684

http://stackoverflow.com/q/26830507
score: 3
upvote count: 3
has body: I'm using Play framework 2.3.6 and Webjars for web lib dependencies. That is, my build.sbt contains something like "org.webjars" % "angularjs" % "1.2.26". To uglify my Javascript sources I added pipelineStages := Seq(rjs, uglify, digest, gzip) to my build.sbt. Now, when running Play's 'stage' or 'dist' tasks it looks like all Javascript files getting uglified, that is, also files from the Webjar libraries. [info] Uglify2 file: /target/web/rjs/build/lib/angularjs/angular.js I would have expected that sources from the external Webjar libraries are left untouched as there already is a minified version. One problem with that is that the uglify process takes way too long. How can I speed up the uglification process?
possible better answer: http://stackoverflow.com/a/28646446
has answer: http://stackoverflow.com/a/26832233
type: Question
tagged with: sbt
has answer: http://stackoverflow.com/a/28646446
tagged with: javascript
answer count: 2
tagged with: playframework
tagged with: webjars
downvote count: 0
accepted answer: http://stackoverflow.com/a/26832233
favorite count: 0
has title: Speed up Javascript uglification in Play 2.3.x build for external Webjar sources
tagged with: uglifyjs2
type: AnsweredQuestion

http://stackoverflow.com/comment/42008449
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26708013
has text: Sorry, but what wrong with using an SMTP server to send an email?
score: 0

http://stackoverflow.com/q/26821310
downvote count: 1
tagged with: javascript
score: 4
favorite count: 0
upvote count: 5
has comment: http://stackoverflow.com/comment/42212597
possible better answer: http://stackoverflow.com/a/27221258
has answer: http://stackoverflow.com/a/26821498
accepted answer: http://stackoverflow.com/a/26821498
has comment: http://stackoverflow.com/comment/42212240
type: AnsweredQuestion
tagged with: complexity-theory
has comment: http://stackoverflow.com/comment/61546824
type: Question
has body: I seek a Proof Of Work implementable in Javascript. Firstly, I wanted to use some hashcash based approach but realized this might not yield a acceptable protection. This is because the partial hash reverse task is at best CPU intensive. Here a attacker using a binary to generate this partial reverse hash will very likely beat any Browser performance. (maybe even JIT the enhanced). Therefore I seek a Proof of Work which is not heavy on CPU but forces a certain number of memory accesses for its completion which I think will be a task in which the Browser's Javascript enines will be much more at pair with a compiled binary solving the same task.I seek a hint how/where to find an implementation of some memory-bound Proof Of Work implementations.
has answer: http://stackoverflow.com/a/43314757
has answer: http://stackoverflow.com/a/27221258
has title: Is there a memory-bound Proof Of Work concept for use in Javascript?
answer count: 3

http://stackoverflow.com/a/26730833
answers question: http://stackoverflow.com/q/26730750
has body: This will do the thing: &lt;input onclick="EnableSubmit(this)" type="checkbox"&gt;
score: 0
type: Answer

http://stackoverflow.com/q/26778052
tagged with: acrobat
type: UnansweredQuestion
has body: I work on a basic pdf order form with 3 cells where I need calculation. If it was for only few fiels, I'm used to use the following in [Calculate] var price = this.getField("price"); var qty = this.getField("Qty"); event.target.value = price.value * qty.value; All my fields get the following name structure: [price_1] [Qty_1] [subTot_1] [price_2] [Qty_2] [subTot_2] [price_3] [Qty_3] [subTot_3] ... Now, what could be the function at document level that will take in consideration all the occurrence of price Qty and subTot fields, and will update my subTot fields when a user change on a Qty field ? I've play arround with for loop and so on but not able to target what I want. Thanks for any advices!
has title: JS calculation at document level inside a PDF
has comment: http://stackoverflow.com/comment/42169285
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26819481
tagged with: http://stackoverflow.com/tag/pdf
answer count: 1

http://stackoverflow.com/a/26683984
type: Answer
upvote count: 4
downvote count: 0
has body: i think you have to do something like this: $("#div").load( "url", function( response, status, xhr ) { var responseAsObject = $.parseJSON(response); console.log(responseAsObject.ok); });
accepted answer of: http://stackoverflow.com/q/26682904
score: 4
answers question: http://stackoverflow.com/q/26682904
type: AcceptedAnswer

http://stackoverflow.com/q/26729554
type: AnsweredQuestion
has body: I run into one small problem. &lt;button onclick="foo('${some_string_param}')"&gt;&lt;/button&gt; It goes without any trouble when some_string_param doesn't contain apostrophe. But when it contains any apostrophe, it goes with Uncaught SyntaxError: Unexpected identifier error. What should I change in my foo invocation?
has title: How to pass string parameter into function in button onclick event
upvote count: 1
has answer: http://stackoverflow.com/a/26730121
type: Question
linked to: http://stackoverflow.com/q/23986135
score: 1
tagged with: java
answer count: 2
has answer: http://stackoverflow.com/a/26729599
accepted answer: http://stackoverflow.com/a/26729599
downvote count: 0
tagged with: jsp
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26730121
favorite count: 0

http://stackoverflow.com/q/26776921
tagged with: jquery
score: -1
tagged with: ajax
answer count: 3
possible better answer: http://stackoverflow.com/a/26777158
has title: "Too much recursion" on submit by jQuery
has answer: http://stackoverflow.com/a/26777158
favorite count: 0
downvote count: 2
has body: This is my custom submit function with a validation. Its showing "Too much recursion" after I click on Submit. $('#searchform').on('submit', function(e){ var validateError = ''; var id = ''; var fieldError = []; $('#searchform :input:text').each(function(){ id = $(this).attr('id'); validateError = jQuery.fn.validationEngine.loadValidation(document.getElementById(id)); if (validateError) { fieldError.push(id); } }); if (fieldError.length != 0) { return false; } else { $("form#searchform").submit(); return true; } }); }); My form is taking too much time for submit. In console I can see my validation Ajax method is calling infinitely . How I can solve this problem.
upvote count: 1
has answer: http://stackoverflow.com/a/26777127
tagged with: onsubmit
tagged with: recursion
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26777235
type: Question
accepted answer: http://stackoverflow.com/a/26777127
tagged with: javascript

http://stackoverflow.com/q/26757221
has title: How to delay event propagation using jQuery
type: Question
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/26757354
has comment: http://stackoverflow.com/comment/42096447
has comment: http://stackoverflow.com/comment/42096344
accepted answer: http://stackoverflow.com/a/26757354
tagged with: event-propagation
has comment: http://stackoverflow.com/comment/42096392
has comment: http://stackoverflow.com/comment/42096417
answer count: 1
downvote count: 0
tagged with: delay
has comment: http://stackoverflow.com/comment/42096927
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42096415
has comment: http://stackoverflow.com/comment/42096467
has comment: http://stackoverflow.com/comment/42096618
favorite count: 0
has comment: http://stackoverflow.com/comment/42096774
has body: I want to display a note after the user submits a form but before he leaves the page. Currently I'm using this (reduced example code): $('form').submit(function(event) { $('.note').show(); setTimeout(function() { $('form').unbind().submit(); }, 2000); return false; }); This works but doesn't seem to be nice. Is there any other way, like a function $.delayPropagation(2000);? PS: The note covers the whole screen, so the user won't be able to submit again during this time.
has comment: http://stackoverflow.com/comment/42096706
upvote count: 3

http://stackoverflow.com/comment/95593381
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26716267
has text: @Romario the all details already there are in the start question as my opinion. 1 html file + 1 js file, I think my answer is quite enough for that. It is Angular 1st version, and I don't think that it is an actual answer for the new versions of angular.
type: AnswerComment

http://stackoverflow.com/q/26693580
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/41982864
type: Question
tagged with: google-analytics
has comment: http://stackoverflow.com/comment/41982770
tagged with: javascript
has comment: http://stackoverflow.com/comment/41982784
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41983424
has answer: http://stackoverflow.com/a/26693924
has comment: http://stackoverflow.com/comment/41982853
has answer: http://stackoverflow.com/a/26693654
type: UnansweredQuestion
has title: Adding google analytics to application.js
has body: I added this code function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m ) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-123mycode-1', 'auto'); ga('send', 'pageview'); to application.js, below the require lines. I'm seeing a ga.js in my Chrome source files, but no analytics.js. I don't see any updates on the Google Analytics page. I'm sure this is the right site because I'm able to edit a view and see it update. Why would this not show? Do I have to make a separate javascript file?

http://stackoverflow.com/comment/42038522
type: AnswerComment
has text: have you tried adding "focus" to the event handler? I updated my original code. But yes, if iframe html page sets the event, then yeah - not sure what can be done.
comment on: http://stackoverflow.com/a/26724446
type: Comment
score: 0

http://stackoverflow.com/q/26683428
possible better answer: http://stackoverflow.com/a/26683619
has answer: http://stackoverflow.com/a/26683619
has answer: http://stackoverflow.com/a/26683485
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41965583
tagged with: javascript
has body: I'm making a quiz in which their are six questions (no right or wrong answers). The questions are hidden in the HTML except for the first. There is a "Next" button at the bottom of the quiz. When people click "Next" after answering each question, I want it to find the question that is visible, hide it and then show the next question. I'm having trouble doing this. I know that I can hide all of the elements or show all of the elements, but I want to show only the next question that is hidden. For instance, on page load, question 1 is visible. When the user clicks next, question 1 should be hidden and question 2 should display. The rest of the questions should remain hidden. When the next button is clicked again, question 2 will be hidden and question 3 will be visible, and so on. I can't seem to figure this out. I tried to use the jquery each function and to somehow target the questions by index, but it didn't work. Here is my JS Fiddle: http://jsfiddle.net/amykirst/st5639ud/ HTML: Question Question 1 of 5 What is your age range? 20-34 35-39 40-44 45-49 50-54 55-59 60-64 65-69 70-74 75-79 What is your total cholesterol? Less than 160 160-199 200-239 240-279 Greater than 279 Don't know your total cholesterol? Attend one of our free screenings. Click here to view upcoming screenings in our events calendar. Are you a smoker? Yes No What is your high-density lipoprotein (HDL) cholesterol level? 60 50-59 40-49 Less than 40 HDL cholesterol is also known as “good” cholesterol. If you don’t know your HDL level, ask your doctor for a cholesterol test. Don’t have a doctor? Click here to find a primary care doctor near you. Are you on blood pressure medication? Yes No What is your Systolic Blood Pressure reading (first number)? Less than 120 120-129 130-139 140-159 Greater than 159 Don't know your blood pressure? Attend one of our free screenings. Click here to view upcoming screenings in our events calendar. CSS: .hide { display:none; }
has title: How to Show or Hide an HTML Element in the DOM Based on its Index Number
answer count: 2
upvote count: 0
accepted answer: http://stackoverflow.com/a/26683485
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41965525
score: -1
type: AnsweredQuestion

http://stackoverflow.com/comment/42177838
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26802262
type: Comment
has text: remove your `$scope.$apply()`, since your using the `$timeout` service, call `$scope.$apply` causes and error and your code is not executing.

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/26832288
tags question: http://stackoverflow.com/q/26801900
tags question: http://stackoverflow.com/q/26720907
tags question: http://stackoverflow.com/q/26681611
tags question: http://stackoverflow.com/q/26812626
tags question: http://stackoverflow.com/q/26807450
tags question: http://stackoverflow.com/q/26716508
tags question: http://stackoverflow.com/q/26767517
tags question: http://stackoverflow.com/q/26810260
tags question: http://stackoverflow.com/q/26740955
tags question: http://stackoverflow.com/q/26733677
tags question: http://stackoverflow.com/q/26738580
tag name: ruby-on-rails-4

http://stackoverflow.com/q/26803340
has body: I have found the following resources concerning the more or less direct use of an SVG exportet from Illustrator to use for WebGl with three.js and d3. Extrude, or, make 2d SVG path into 3d http://threejs.org/docs/#Reference/Extras.Geometries/ExtrudeGeometry https://github.com/josdirksen/learning-threejs/blob/master/chapter-06/05-extrude-svg.html Illustrator/SVG to JavaScript workflow? (A templating library?) None of these resources would ultimately help to directly use an SVG from Illustrator with three.js and d3. What I need is either: a method to directly use an SVG from Illustrator with three.js and d3 a conversion method to convert the SVG (also multiple path groups) from the Illustrator-SVG format to something that is usable with three.js and d3. Think of it as : User uploads his svg logo and gets a 3D preview. Manually re-formatting the Illustrator-SVG is not an option here, so I hope you can point me to a few useful resources to solve the incompatibilities. Thank you very much !
linked to: http://stackoverflow.com/q/16179510
tagged with: d3.js
tagged with: three.js
linked to: http://stackoverflow.com/q/7835693
tagged with: http://stackoverflow.com/tag/svg
downvote count: 0
type: UnansweredQuestion
score: 1
type: Question
tagged with: javascript
has title: Use Illustrator SVG 1.0 or 1.1 with three.js and d3
upvote count: 1
has answer: http://stackoverflow.com/a/27336008
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/42209869
comment on: http://stackoverflow.com/a/26819598
score: 0
has text: @jewelnguyen8 Yes I agree with you because I don't know why Muhammad do that, and as I wrote I do just improve the code to work, and then we can discus other "problems".
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26721994
upvote count: 6
favorite count: 0
has title: Return json body in REQUEST nodejs
has comment: http://stackoverflow.com/comment/42033819
has comment: http://stackoverflow.com/comment/42034230
has comment: http://stackoverflow.com/comment/42033795
possible better answer: http://stackoverflow.com/a/26722259
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26722259
accepted answer: http://stackoverflow.com/a/26722310
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42033853
tagged with: httprequest
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42034137
downvote count: 0
has comment: http://stackoverflow.com/comment/42034000
tagged with: javascript
score: 6
has body: I'm using the request module to make an HTTP GET request to an url in order to get a JSON response. However, my function is not returning the response's body. Can someone please help me with this? Here is my code: router.get('/:id', function(req, res) { var body= getJson(req.params.id); res.send(body); }); Here is my getJson function: function getJson(myid){ // Set the headers var headers = { 'User-Agent': 'Super Agent/0.0.1', 'Content-Type': 'application/x-www-form-urlencoded' } // Configure the request var options = { url: 'http://www.XXXXXX.com/api/get_product.php', method: 'GET', headers: headers, qs: {'id': myid} } // Start the request request(options, function (error, response, body) { if (!error &amp;&amp; response.statusCode == 200) { return body; } else console.log(error); }) }
has answer: http://stackoverflow.com/a/26722310

http://stackoverflow.com/comment/42110443
type: QuestionComment
has text: @epascarello , What do you mean ? I did not understand.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26764597

http://stackoverflow.com/comment/42140894
type: QuestionComment
comment on: http://stackoverflow.com/q/26781365
has text: The groups are defined specifying the `groupBy` ngTableParameter see https://github.com/esvit/ng-table/wiki/Configuring-your-table-with-ngTableParams
score: 0
type: Comment

http://stackoverflow.com/comment/41974175
type: AnswerComment
has text: Nope. I got it. I was assigning it instead of checking. Big mistake. Thanks!
type: Comment
comment on: http://stackoverflow.com/a/26686730
score: 0

http://stackoverflow.com/q/26704067
accepted answer: http://stackoverflow.com/a/26704178
tagged with: calendar
type: AnsweredQuestion
type: Question
answer count: 1
has title: Javascript calendar won't show current day+month
tagged with: javascript
has body: I'm making a calendar in javascript, and i wan't to show the current day, dayname and monthname inside a it is inside my function Kalender() but for some reason if i execute the function volgende() (Next Month) it changes the month in the aswell which isn't the current day and month how can i fix this? var dayNames = ['Zon', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; //Volledige Dagnamen// var dayNamesFull = ['Zondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrijdag', 'Zaterdag']; //Volledige Maandnamen// var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'Oktober', 'November', 'December']; //Maand lengte van 0 - 11// var monthLength = [31,28,31,30,31,30,31,31,30,31,30,31]; //Nieuwe datum// var today = new Date(); //Vandaag// var day = today.getDay(); //vandaag zoekmaand// var month = today.getMonth(); //vandaag// var vandaag = today.getDate(); //volledig jaar// var year = today.getFullYear(); //Kalender schrijf functie// function Kalender() { var buttons = ' Vorige Volgende ' var kalender = ""; document.getElementById('Header').innerHTML = monthNames[month]+" "+year+buttons; kalender += ' '; for (var j = 1; j <= monthLength[month]; j++) { if (vandaag == j ) { kalender +=" "+j; } else { kalender += " "+j; } if (j % 7 == 0) { kalender += " "; } kalender += ' '; } kalender += ' '; document.getElementById('kalen').innerHTML = kalender; document.getElementById('taken').innerHTML += dayNamesFull[day]+" "+vandaag+" "+monthNames[month]; } //Leap Year// if (month == 1) { if (year % 4 == 0) { monthLength = 29; } } //Volgende Maand functie// function volgende() { month = month + 1; if(month > 11) { month = -1; month = month + 1; year = year + 1; } Kalender(); } //Vorige maand functie// function vorige() { month = month - 1; if(month < 0) { month = + 12; month = month - 1; year = year - 1; } Kalender(); } HTML: Kalender
score: 0
has answer: http://stackoverflow.com/a/26704178

http://stackoverflow.com/comment/42143366
type: Comment
has text: @KushaTavakoli That would sound logical. Try to use "async.each" if under node.js, or similar flow control.
comment on: http://stackoverflow.com/a/26774918
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42191462
has text: I just gave that as an example. You can use it on any string. `yearlybalance.push(formattedValue.replace(/\B(?=(\d{3})+(?!\d))/g, ","))`
comment on: http://stackoverflow.com/a/26809328
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26782610
has comment: http://stackoverflow.com/comment/42142495
has body: My database table: TABLE `events` ( `event_id` INT(11) unsigned NOT NULL AUTO_INCREMENT, `event_title` VARCHAR(255) NOT NULL, `event_desc` TEXT, `event_location` VARCHAR(255) NOT NULL, `event_requirements` TEXT DEFAULT NULL, `event_date` DATETIME NOT NULL, PRIMARY KEY (`event_id`) The goal: When an event is selected in a select drop down menu, I would like to show the rest of the database data, which belongs to the event in a div below. The attempt to solve the problem (in a MVC architecture): Controller function index() { $overview_model = $this->loadModel('Events'); $this->view->events = $overview_model->getEventTypes(); $this->view->render('events/index'); } Model public function getEventTypes() { $sth = $this->db->prepare("SELECT * FROM events"); $sth->execute(); $events = array(); foreach ($sth->fetchAll() as $event) { $events[$event->event_id] = new stdClass(); $events[$event->event_id]->event_id = $event->event_id; $events[$event->event_id]->event_title = $event->event_title; $events[$event->event_id]->event_desc = $event->event_desc; $events[$event->event_id]->event_location = $event->event_location; $events[$event->event_id]->event_requirements = $event->event_requirements; $events[$event->event_id]->event_date = $event->event_date; } return $events; } View Choose an event: <?php foreach ($this->events as $event) { // Using the event's ID as a value makes it easier for us to look up the selected event. echo " event_id. "'>" .$event->event_title." "; }?> On the page nothing happens when I change the drop down selection. Console output (in chrome): The error: Uncaught SyntaxError: Unexpected token o According to my research the line, producing the error is this one (in the view): var events = <?php echo (count($this->events) > 0) ? "JSON.parse(" .json_encode($this->events). ");" : "null"; ?> Is the JSON format correct in the console? Another thread suggested to rather use $.getJSON() than JSON.parse() but, since this is the first time I am using JSON, I am no…
has answer: http://stackoverflow.com/a/26782687
accepted answer: http://stackoverflow.com/a/26782687
tagged with: php
has title: JSON related error: Unexpected token o
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/26734658
type: Answer
downvote count: 0
score: 5
has comment: http://stackoverflow.com/comment/42056097
has body: var fs = require('fs'), request = require('request'), url='http://upload.wikimedia.org/wikipedia/commons/8/8c/JPEG_example_JPG_RIP_025.jpg'; request(url).pipe(fs.createWriteStream('downloaded.jpg'));
answers question: http://stackoverflow.com/q/26734047
upvote count: 5

http://stackoverflow.com/a/26696546
type: Answer
score: 2
upvote count: 2
has body: There is an error in your Javascript file. All you need to do is navigate to http://www.javascriptlint.com/online_lint.php and paste your code in, then hit lint. The error is on line 73: SyntaxError: invalid assignment left-hand side. Any significant Javascript error will cause your code to fail silently.
answers question: http://stackoverflow.com/q/26696408
downvote count: 0
has comment: http://stackoverflow.com/comment/41987818
has comment: http://stackoverflow.com/comment/41987831

http://stackoverflow.com/comment/42192903
has text: I just want to use the css to actually change the color of the word, I don't have to do it no, I was just under the impression that it was the "proper thing to do"
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26810026

http://stackoverflow.com/q/26746270
tagged with: javascript
has body: I am visiting a website that is asking me to share my location. I want to know what they are doing with this information and where it is being sent. I tried looking at the JavaScript code for the page, hoping to find something involving geolocation, but there is a lot of code, and it is obfuscated. Is it possible to put a breakpoint inside my browser's built-in navigator.geolocation.getCurrentPosition or navigator.geolocation.watchPosition function so that when any of those functions are called, I can look at the call stack, see what is calling those functions, and maybe find the callback functions so I can examine those? I would prefer something that works in Firebug, but I would be happy with something that works with the developer tools built into Firefox, Chrome, or Safari.
tagged with: breakpoints
type: AnsweredQuestion
tagged with: firebug
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26764486
type: Question
has title: Making my browser debugger break on geolocation
upvote count: 1
answer count: 1
tagged with: geolocation
tagged with: google-chrome-devtools
accepted answer: http://stackoverflow.com/a/26764486
downvote count: 0

http://stackoverflow.com/q/26761186
has answer: http://stackoverflow.com/a/26781281
has body: I want to have template site in AngularJs with /example/car/id where in different ids is a page for different cars . In app.js i wrote : angular .module('carApp', [ 'ngCookies', 'ngResource', 'ngRoute', ]) .config(function ($routeProvider) { $routeProvider .when('/', { templateUrl: 'views/main.html', controller: 'MainCtrl' }) .when('/car/:id', { templateUrl: 'views/car.html', controller: 'CarCtrl' }) }); In Json i made 2 cars: [{ "model": "Audi", "year": "1999" } { "model": "BMW", "year": "2005" }] In car.js angular.module('carApp') .controller('CarCtrl', ['$scope','$http', function($scope, $http) { $http.get('scripts/controllers/cars.json').success (function(data){ $scope.cars = data; }); }] ); Where and what code I need to write to have templates where in example/car/1 will show details about Audi and example/car/2 will show details about BMW ?
score: 0
has comment: http://stackoverflow.com/comment/42105645
tagged with: javascript
has title: Angular template pages
tagged with: angularjs
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: templates
linked to: http://stackoverflow.com/q/13760070
has comment: http://stackoverflow.com/comment/42104311
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26761337
type: Question
has answer: http://stackoverflow.com/a/26762385

http://stackoverflow.com/comment/42207923
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26819004
type: Comment
has text: What should add_filter('...', 'do_shortcode') do?

http://stackoverflow.com/comment/65877124
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26713844
score: 0
has text: thank you - i am viewing my source, but how do I enumerate my jQuery references?

http://stackoverflow.com/comment/42098182
has text: @ Timson: I have no idea. I just know that I don't see `activityStart` on the API page.
score: 0
comment on: http://stackoverflow.com/q/26758164
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26784272
tagged with: javascript
tagged with: jquery
tagged with: z-index
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
has answer: http://stackoverflow.com/a/26784338
has answer: http://stackoverflow.com/a/26785663
upvote count: 1
possible better answer: http://stackoverflow.com/a/26784338
type: AnsweredQuestion
score: 1
has title: Z-index issue with jQuery fading an element in and out
type: Question
accepted answer: http://stackoverflow.com/a/26785663
has body: so I have an interactive graphic, in which you click a div and it will display the relative information for that person. I'm using 'animate' to fade in the opacity up to 1. The problem is that when opacity reaches 1 it then jumps behind the divs you've just clicked on. This is how one of these boards is structured.. hardie blablablablabla click to close bernstein/h3> blablablablabla click to close haldane blablablablabla click to close cohen blablablablabla click to close dawson blablablablabla click to close BACK The jQuery works like this... $( ".rollover" ).click(function() { $(".info").css('display', 'none'); person = $(this).attr('class').split(' ')[1]; $(".info."+person).css('display', 'block'); $(".info."+person).animate({"opacity": "1"}, 200); }); $( ".info" ).click(function() { person = $(this).attr('class').split(' ')[1]; $(".info."+person).animate({"opacity": "0"}, 200); $(".info."+person).css('display', 'none'); }); I have tried to correct the problem using css z-index attributes but to no avail. Is it something to do with them all being in the same div??? You can see an example if you follow this link and select the top-left picture (Pioneers), then click any of the pictures. http://thetally.efinancialnews.com/tallyassets/extramile/index.html Thanks for any help, I'm stumped
answer count: 2
downvote count: 0

http://stackoverflow.com/q/26678837
tagged with: ajax
linked to: http://stackoverflow.com/q/12936881
has comment: http://stackoverflow.com/comment/41957598
has comment: http://stackoverflow.com/comment/41956713
has comment: http://stackoverflow.com/comment/41958092
has comment: http://stackoverflow.com/comment/41957434
type: Question
has body: I have a unique problem that I hope someone can help with. I have a page that pulls data from a controller with AJAX and presents it to this function to construct a table: // make rows in table from json data function makeTableRows() { if (jsonTableData != null) { tbl = null; tbl = createTable('tableResults'); // constructHeader(tbl, 'left', jsonTableData[0]); newHeader(tbl, 'left', jsonTableData[0]); var totalItems = jsonTableData.length; var topItem; topItem = 0; if ((lastItem + perpage) &gt; totalItems) { topItem = totalItems; $(".btnNext").prop('disabled', true); } else { topItem = lastItem + perpage; } for (var i = lastItem; i &lt;= topItem - 1; i++) { makeTableRow(tbl, jsonTableData[i], 'left', true, 'showTourDetails(' + jsonTableData[i]["TransactionID"] + ',' + i + ')', 0); } $("#divSearchResults").html(tbl); makePagesLabel(); makeTableFooter(tbl); } } the function inside the separate file is this: function constructHeader(table, alignment, firstRow) { if (firstRow != null) { var thead = document.createElement('thead'); table.appendChild(thead); var tr = document.createElement('tr'); for (var key in firstRow) { var header = key.match(/[A-Z][a-z]*/g); var newHeader = ''; for (var i = 0; i &lt;= header.length - 1; i++) { newHeader += header[i] + ' '; } var th = document.createElement('th'); var text = document.createTextNode(newHeader); th.appendChild(text); th.style.textAlign = alignment; th.style.cursor = 'pointer'; th.setAttribute('title', "Sort by " + newHeader); th.onclick = function () { var rows = $(table).find('tbody').find('tr').toArray().sort(comparer($(this).index())); this.asc = !this.asc; if (!this.asc) { rows = rows.reverse(); } for (var j = 0; j &lt; rows.length; j++) { $(table).append(rows[j]); } $(table).find('tbody').find('tr:even').css("background-color", "#dae5f4"); $(table).find('tbody').find('tr:odd').css("background-color", "#b8d1f3"); }; tr.appendChild(th); } thead.appendChild(tr); } } Basically the function creates a sort process for th…
has comment: http://stackoverflow.com/comment/41956880
score: 0
has title: Need separate javascript file function to work and it is not
has comment: http://stackoverflow.com/comment/41957832
answer count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/q/26733337
has answer: http://stackoverflow.com/a/26734063
has comment: http://stackoverflow.com/comment/42054215
type: Question
has title: ng-change not working with radiobutton
has comment: http://stackoverflow.com/comment/42054042
downvote count: 0
linked to: http://stackoverflow.com/q/12648543
tagged with: javascript
has comment: http://stackoverflow.com/comment/42054763
has comment: http://stackoverflow.com/comment/42054726
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42054681
has body: I have a code like this: A B As you can see, there's a $data.choice ng-model that should trigger a "onChoice()" function when changed, defined at the controller (the ng-controller is defined at the view and works properly). The problem is that the function doesn't trigger, but if I erase the "$data" and leave it like ng-model="choice" it works perfectly. $data is just a variable defined by me at the $scope. I can actually trigger the onChoice() with a button and ng-click, but it doesn't work with the ng-change. I guess it's a problem with ng-change but I don't know what's happening. Edit Ok as I see that it's not that simple, I'll add some information: Here's my controller, It includes some interaction with the $parent controller so I don't know if that could affect: $scope.data = $scope.$parent.data; $scope.data.choice = $scope.data.choice || 'vote'; $scope.onChoice = function(){ //stuff }; I know that logic when initilizing the variable seems strange but that's important, I just simplified the code. Maybe I could change my logic in order to use just $scope.choice instead of $scope.data.choice, but I still want to know why isn't this working.
tagged with: angularjs
type: UnansweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/q/26675622
score: 0
has answer: http://stackoverflow.com/a/26676215
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26675897
has comment: http://stackoverflow.com/comment/41950557
has answer: http://stackoverflow.com/a/26675757
has comment: http://stackoverflow.com/comment/41950628
has comment: http://stackoverflow.com/comment/41950545
type: Question
has answer: http://stackoverflow.com/a/26675789
has answer: http://stackoverflow.com/a/26675785
has title: How to select all elements of the same class before
has body: I have something like this: string string otherString string I want to select all htx class elements before that one which contains otherString var res = $('.htx:contains("otherString")'); var sec = res.prevAll(); This didn't work.
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/48385862
downvote count: 0
has comment: http://stackoverflow.com/comment/86154226
has comment: http://stackoverflow.com/comment/86286144
has comment: http://stackoverflow.com/comment/86136981
score: 4
has comment: http://stackoverflow.com/comment/86136873
has comment: http://stackoverflow.com/comment/86134151
has body: The correct way to use the hash arguments in handlebars seems to be to check for the expected optional parameters in the hash attribute of the options argument (passed to any helper as last argument). In the OP example this would look like this: Handlebars.registerHelper('link_to', function(href) { var options = arguments[arguments.length - 1]; var title = options.hash.title || href.toString().charAt(0).toUpperCase() + href.slice(1); return new Handlebars.SafeString('&lt;a href="/' + href + '"&gt;' + title + '&lt;/a&gt;'); }); This way the helper can be used like this {{ link_to 'articles' title='Articles' }} or this {{ link_to 'articles' }} This has the advantage that you can add any number of optional template arguments and not just one. That is the above example could easily extended to provide an optional tooltip as well: Handlebars.registerHelper('link_to', function(href) { var options = arguments[arguments.length - 1]; var title = options.hash.title || href.toString().charAt(0).toUpperCase() + href.slice(1); var tooltip = options.hash.tooltip || title; return new Handlebars.SafeString('&lt;a href="/' + href + '" title="' + tooltip + '"&gt;' + title + '&lt;/a&gt;'); }); Now both title and tooltip can be specified independent of each other. I.e. you can specify a tooltip but no custom title: {{ link_to 'articles' tooltip='Go to Articles' }}
answers question: http://stackoverflow.com/q/26706213
type: Answer
upvote count: 4

http://stackoverflow.com/comment/42228887
type: AnswerComment
comment on: http://stackoverflow.com/a/26822842
type: Comment
has text: I updated the question with a minimal example that reproduces the issue.
score: 0

http://stackoverflow.com/comment/61717215
type: AnswerComment
comment on: http://stackoverflow.com/a/26679176
score: 0
type: Comment
has text: This did not work for me, because I'm using jasmine2, I used [protractor-jasmine2-screenshot-reporter](https://www.npmjs.com/package/protractor-jasmine2-screenshot-reporter) instead.

http://stackoverflow.com/a/26715002
has comment: http://stackoverflow.com/comment/42020858
has comment: http://stackoverflow.com/comment/42020500
has comment: http://stackoverflow.com/comment/42020788
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26714774
score: 1
accepted answer of: http://stackoverflow.com/q/26714774
has body: I'm not sure whether I get your question right, but shouldn't the following work? var div = document.getElementById('content'); for(i = 1; i&lt;=30;i++){ div.innerHTML += '&lt;div id=\'day\'&gt;' + i + '&lt;/div&gt;'; } Here is my jsfiddle-example Note: dont use the same values (day) for id. Use the class attribute: Change css to : .day { float: left; border: 1px solid black; width: 85px; height: 85px; padding: 5px; margin: 5px; border-radius: 18px; } And use this javascript code: var div = document.getElementById('content'); for(i = 1; i&lt;=30;i++){ div.innerHTML += '&lt;div class=\'day\'&gt;' + i + '&lt;/div&gt;'; }

http://stackoverflow.com/comment/42209375
comment on: http://stackoverflow.com/a/26819598
score: 0
type: AnswerComment
has text: Now the problem is when we click a navigation button it will not hide the previous loaded content and show the loader on the top of that content
type: Comment

http://stackoverflow.com/q/26698152
type: Question
tagged with: c#
answer count: 2
accepted answer: http://stackoverflow.com/a/26698375
linked to: http://stackoverflow.com/q/26690812
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26698608
has answer: http://stackoverflow.com/a/26698608
favorite count: 0
has title: C# equivalent of Python attribute customization / Javascript object literal
has answer: http://stackoverflow.com/a/26698375
tagged with: python
has body: One of the things I like about Python is the way you can customize attribute access: class Foo(object): def __getattr__(self, name): if some_predicate(name): # ... else: # Default behaviour raise AttributeError You can do something similar more directly with Javascript's object literal notation. My question is: how could you achieve something similar in C#? Overloading the '.' operator would be one way to do it, but it's not allowed in. An example of the kind of thing I have in mind would be to define a class as such: public class MyClass { public IDictionary Properties {get; private set;} public MyClass(IDictionary properties) { this.Properties = properties; } // Overload the '.' operator - not allowed! public static object operator .(MyClass inst, string name) { return inst.Properties[name]; } } Use the class like this: class Program { static void Main(string[] args) { IDictionary properties = new Dictionary&lt;string, string&gt;() { { "prop1", "value1"}, { "prop2", "value2"} }; var my = new MyClass(properties); System.Console.WriteLine(my.prop1); // Doesn't work! } } (Note: I asked a similar question about C++ here; originally the same question, but split to make more specific for each language.)
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/a/30776763
type: Answer
downvote count: 0
score: 2
has body: In index.html, replace menu-toggle="left" with ng-click="toggleProjects()" and in app.js add this $scope.toggleProjects = function() { $ionicSideMenuDelegate.toggleLeft(); };
answers question: http://stackoverflow.com/q/26736565
upvote count: 2

http://stackoverflow.com/comment/42186244
comment on: http://stackoverflow.com/a/26803958
score: 0
type: AnswerComment
type: Comment
has text: [Stop using alert() for troubleshooting.](http://stravid.com/en/stop-the-javascript-alert-madness/)

http://stackoverflow.com/a/45260287
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26728155
score: 1
has body: All in One! Meteor.users.findOne({ _id: Meteor.userId() }).username Then you can either returned value to variable, State or Session ..etc

http://stackoverflow.com/comment/42131024
has text: Thank you for that...it's good start. Im gonna develop this by myself
score: 0
comment on: http://stackoverflow.com/a/26764885
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26801861
has body: I have a table with thead, tfoot, tr, td and th inside it. The td or th has colspan or rowspan attribute, how to convert it to csv string with every merged cells unmerged as multiple fields? for example: 1 2 3 4 5 6 7 8 should be outputting: "1","2" "3","4" "","5" "6 7 8","" Is there any other plugin other than table2CSV? because this one displaying tfoot on the first row instead on the last row, also merged cells shown as single field.
type: Question
has answer: http://stackoverflow.com/a/26805321
has comment: http://stackoverflow.com/comment/42177474
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42177092
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42177601
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/15547198
has answer: http://stackoverflow.com/a/26801991
has title: How to convert html table to csv string

http://stackoverflow.com/comment/42082174
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26748697
has text: That helped! It loads the page, but then gives the the error below. I added a test and it looks like the anonymous function in the yelp.search is being ran twice with each request for the page. ```{ statusCode: 400, data: '{"error": {"text": "One or more parameters are invalid in request", "id": "INVALID_PARAMETER", "field": "ll"}}' }```

http://stackoverflow.com/comment/42103962
type: Comment
has text: HTML4 and below require non numeric IDs btw
type: QuestionComment
comment on: http://stackoverflow.com/q/26761235
score: 0

http://stackoverflow.com/a/26818120
has body: If you want to highlight the content of the DOM node containing the searched text, you should use jQuery's :contains selector: $('span:contains(Hello There)').addClass("customClass"); Demo: http://jsbin.com/wifulereyi/2/ If you want to highlight only the searched text, you need to process the jQuery selection result first, and then use something like .wrapInner('&lt;span class="highlight"&gt;&lt;/span&gt;'). In such case, you might better off use a plugin like jQuery.highlight
type: Answer
accepted answer of: http://stackoverflow.com/q/26817441
score: 0
answers question: http://stackoverflow.com/q/26817441
type: AcceptedAnswer

http://stackoverflow.com/a/26745094
downvote count: 0
has comment: http://stackoverflow.com/comment/42096167
type: Answer
has comment: http://stackoverflow.com/comment/42095901
answers question: http://stackoverflow.com/q/26744878
has body: b = "'someId=1&amp;another=29'" or var urlParamsJS ='&lt;%=b%&gt;' Select the one that better fits with your code. If you want to assing a string value to a variable (what you are doing with &lt;%=b%&gt;), the value must be quoted.
upvote count: 5
score: 5
accepted answer of: http://stackoverflow.com/q/26744878
type: AcceptedAnswer

http://stackoverflow.com/comment/42154661
score: 0
type: Comment
type: QuestionComment
has text: Please DO NOT link to live sites.
comment on: http://stackoverflow.com/q/26789137

http://stackoverflow.com/q/26707886
has comment: http://stackoverflow.com/comment/42008262
possible better answer: http://stackoverflow.com/a/26708084
has answer: http://stackoverflow.com/a/69368603
has comment: http://stackoverflow.com/comment/42008339
score: 4
has answer: http://stackoverflow.com/a/26708084
has comment: http://stackoverflow.com/comment/42008426
has answer: http://stackoverflow.com/a/26707925
has comment: http://stackoverflow.com/comment/42008367
downvote count: 1
has answer: http://stackoverflow.com/a/26707922
upvote count: 5
has comment: http://stackoverflow.com/comment/42008296
tagged with: javascript
has answer: http://stackoverflow.com/a/36725253
has answer: http://stackoverflow.com/a/36726114
type: AnsweredQuestion
has title: Easiest way to fill array with an object in JavaScript without coding a loop?
has answer: http://stackoverflow.com/a/36725306
accepted answer: http://stackoverflow.com/a/26707922
has comment: http://stackoverflow.com/comment/42008416
favorite count: 0
has body: Say I have the following object: var obj = { foo: 'bar' }; I want to add this object to an array X amount of times so the result is: [{ foo: 'bar' }, { foo: 'bar'}, ... , { foo: 'bar'}] Is there a way to accomplish this without explicitly coding a loop?
has answer: http://stackoverflow.com/a/26708045
type: Question
answer count: 8

scroll
tags question: http://stackoverflow.com/q/26694385
tags question: http://stackoverflow.com/q/26806880
tags question: http://stackoverflow.com/q/26831272
tags question: http://stackoverflow.com/q/26811399
tags question: http://stackoverflow.com/q/26796184
tags question: http://stackoverflow.com/q/26773423
tags question: http://stackoverflow.com/q/26682167
tags question: http://stackoverflow.com/q/26798580
tags question: http://stackoverflow.com/q/26719544
tags question: http://stackoverflow.com/q/26737618
tags question: http://stackoverflow.com/q/26743011
tags question: http://stackoverflow.com/q/26771961
type: Tag
tags question: http://stackoverflow.com/q/26716442
tags question: http://stackoverflow.com/q/26739483
tags question: http://stackoverflow.com/q/26729776
tag name: scroll
tags question: http://stackoverflow.com/q/26683450

http://stackoverflow.com/a/26758978
type: AcceptedAnswer
downvote count: 0
has body: You can easily check that with the following if (!window._ || window._.VERSION !== '1.7.0') { // Load underscore from CDN }
score: 6
type: Answer
upvote count: 6
answers question: http://stackoverflow.com/q/26758923
has comment: http://stackoverflow.com/comment/42099779
accepted answer of: http://stackoverflow.com/q/26758923

http://stackoverflow.com/a/26754857
type: Answer
has body: Yes. $('div.menuTab').hide() will result in style="display:none"
answers question: http://stackoverflow.com/q/26754738
score: 0

http://stackoverflow.com/a/26764003
upvote count: 3
has body: Global variables are not instantiated in requirejs.config. There are basically two ways to do it. You can use a script element and put the instantiation inline or in an external script, so long as this script element appears before the one that kicks off your module loading. So: &lt;script&gt; window.Foo = ... whatever; &lt;/script&gt; The other way is to use a RequireJS module to perform the work, lets say it is called foo-config: define(function () { window.Foo = ... whatever; }); And then your module that needs to have window.Foo defined must have the above module among its dependencies. This can be problematic if you are using a 3rd party module which itself uses define to define itself as an AMD module because there is no mechanism by which you can just add dependencies to such module. You can use a nested require: require(['foo-config'], function () { require(['third-party']); }); but this is ugly, and error prone. If you have multiple pages on which you use third-party, you need to always remember to use a nested require to load it. On the other hand, if that 3rd party module is not AMD-ready and consequently you use a shim configuration to load it, then you can add your module to the list of dependencies there. shim: { 'third-party': ['foo-config']; }
downvote count: 0
answers question: http://stackoverflow.com/q/26762248
type: Answer
score: 3

http://stackoverflow.com/comment/42006332
type: QuestionComment
comment on: http://stackoverflow.com/q/26706714
has text: Can't you make Function A call function B upon returning..which you could also pass as a parameter. Or you don't have any control over Function A
score: 0
type: Comment

http://stackoverflow.com/q/26709381
has title: AngularJS: Call a function when system date changes
has comment: http://stackoverflow.com/comment/42010760
has body: I want to refresh the content of my page when user's system date is changed. The user visits the page at 03-11-2012 (3rd Nov) at mid night, and when the system date is changed to 04-11-2014 (4th Nov) the content should be refreshed or a function should be called. we can use $interval(checksysDate(),5000) where checksysDate() will check if the date is changed at the interval of 5000. But, I was wondering if we can use $scope.$watch on system date (only date i.e 3rd or 4th Nov and not time). Any elegant solutions ?? Thanks,
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/26709513
score: 1
tagged with: date
has comment: http://stackoverflow.com/comment/42011020
has comment: http://stackoverflow.com/comment/42010737
type: Question
has comment: http://stackoverflow.com/comment/42011279
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42011178
linked to: http://stackoverflow.com/q/14235317
favorite count: 0

http://stackoverflow.com/comment/46719479
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26825657
has text: Not working like a charm on yosemite 10.10.2 firefox 36.0.4. I click once on the box, and it opens and closes...
type: AnswerComment

http://stackoverflow.com/a/26680501
has comment: http://stackoverflow.com/comment/42029123
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26680113
answers question: http://stackoverflow.com/q/26680113
score: 1
has comment: http://stackoverflow.com/comment/41962317
type: AcceptedAnswer
downvote count: 0
has body: You will need to reference the iFrame as follows: window.frames['myIFrame'].document.getElementById('myIFrameElemId'); So in your case: window.frames['wufooFormm73jde715tzew1'].document.getElementById('form227')
type: Answer

http://stackoverflow.com/a/26725449
type: Answer
has body: You're close, but not quite there. The current context-menu api does not have an onClick handler, instead you need to use content scripts to handle clicks and message back to the main add-on code manually. It's not great, and we have plans to improve it. For each context menu item, you need to instead listen for a message event by crearting an onMessage handler: var quickInkItem = cm.Item({ label: "Quick Ink", onMessage: handleClick, // Works! contentScriptFile: data.url("testscript.js") }); More importantly, you need to add something like the following code to 'testscript.js': self.on("click", function(node) { console.log(node.href); self.postMessage(true); // you could send data as well }); See the documentation about handling clicks for more info.
accepted answer of: http://stackoverflow.com/q/26692976
score: 0
answers question: http://stackoverflow.com/q/26692976
type: AcceptedAnswer

http://stackoverflow.com/a/28198277
upvote count: 4
answers question: http://stackoverflow.com/q/26742864
score: 4
downvote count: 0
type: Answer
has body: You could use filter: !{property:{text:'yes'}} This is usefull in situations where you can't use ng-if like &lt;select ng-options="element in elementList | filter: !{property: {text:'yes'} }" /&gt; (I know you can use ng-repeat in the options, but you get my point...)

http://stackoverflow.com/comment/42133637
type: Comment
has text: Just think of `$q.defer()` as a factory method which creates new deferred instances. I don't think you need `$q` for more than creating deferred objects.
comment on: http://stackoverflow.com/a/26755330
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41976711
type: Comment
type: QuestionComment
has text: No, this will NOT be hosted in a server. Local drive only.
comment on: http://stackoverflow.com/q/26689876
score: 0

http://stackoverflow.com/comment/42011972
type: AnswerComment
has text: @Zack - do you realize that if you get an answer that solves your question, then you should select the best answer and click the green check mark to the left of that answer. That both rewards the person that provided the answer and earns you some reputation points for following the correct procedure.
type: Comment
comment on: http://stackoverflow.com/a/26695834
score: 0

http://stackoverflow.com/q/26740350
favorite count: 0
score: -1
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/42066770
has comment: http://stackoverflow.com/comment/42066818
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27026309
type: Question
has comment: http://stackoverflow.com/comment/42066854
has comment: http://stackoverflow.com/comment/42069171
tagged with: jsonp
has body: In my client html / JS code, I am calling an external API from within a domain to fetch json data. The other API runs in a separate domain, so basically it doesn't allow me to use regular ajax/xhr request. The solution we agreed upon with the API vendor was the they support jsonp. So I am sending a jsonp request as follows: $.ajax({ url: "https://rest.somevendor.com/app/site/hosting/restlet.nl?script=204&amp;deploy=1&amp;cid=436&amp;callback=myCallBack", dataType: 'jsonp', type: 'GET', jsonp: "callback", contentType: "application/json; charset=utf-8", processData: false, headers: { "Authorization": "NLAuth nlauth_account=xxxxxxx,nlauth_email=yyyyy@pppp-zzzz.com, nlauth_signature=FGrmr5fjd" }, success: function(data){ //console.log(data); } }); My callback gets called with the json data, but there is a problem. When I make the same call from a browser REST client, I get back a valid json, which is escaped. However, when I make the same call from my client code, and I get back the data in my callback: function myCallBack(data) { jsonString=""; try{ jsonString=JSON.parse(data); }catch(err) { alert(err.message) } } The parse function throws an exception resulting from character (") which are not escaped. For some reason, it seems that somehow the returned data gets unescaped prior to arriving to my callback function. Therefore, I cannot parse the data, and face a problem.
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42066757
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/42066727
has comment: http://stackoverflow.com/comment/42066855
has comment: http://stackoverflow.com/comment/42069506
has title: JSONP Callback - data arrives unescaped when using jQuery call

http://stackoverflow.com/a/26733277
has body: As suggested by Sunil, you should put it in the scope: scope: { data: '=' } Because if you do not do it, the data is not updated within the directive. Here the fiddle: http://jsfiddle.net/0t4z02yw/2/
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26732785
type: Answer
answers question: http://stackoverflow.com/q/26732785
score: 2
downvote count: 0

http://stackoverflow.com/q/26744181
score: 0
tagged with: nested
accepted answer: http://stackoverflow.com/a/26783740
tagged with: d3.js
possible better answer: http://stackoverflow.com/a/26788804
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26783740
has title: Binding nested data to box plot / rectangles
type: Question
answer count: 2
has body: I'm still pretty new to d3, and am trying to overlay some box plots on top of a line graph. I currently have code to overlay the first box plot - however I am having difficulty trying to figure out how to bind the nested data to the rectangle elements to create all the box plots. My data is nested as such: databox = Object { key="Mon Jan 01 2007 ..." , values =[32]}, Object {key="Mon Jan 01 2008 ..." , values = [32]}, etc. And each values = [32] looks like [Object {Inst = 'Inst1', value = 4}, Object {Inst = 'Inst2', value = 6}, etc. yubox = []; yutemp = []; for (var i = 0; i &lt; databox.length; i++){ tempdata = []; for (var j = 0; j &lt; databox[i]['values'].length; j++) { tempdata.push(databox[i]['values'][j]['value']) } yutemp.push(tempdata); } yubox = yutemp[1].sort(d3.ascending); q1Val = d3.quantile(yubox, .25), medianVal = d3.quantile(yubox, .5), q3Val = d3.quantile(yubox, .75), iqr = q3Val - q1Val; box.append("rect") .attr("class", "box") .attr("stroke", "black") .attr("fill", "white") .attr('opacity',.8) .attr("y", y(q3Val)) .attr("x", -10) .attr("height", y(q1Val) - y(q3Val)) .attr("width", 20); }) I'm hoping to have the x value coincide with the date (in the higher nest), and then the box plot coincide with the 32 values in each nest. I assume i have to use some sort of data(function(d, i) { return i.value; }); sort of function, but i'm pretty lost Any suggestions? I was looking at http://www.samselikoff.com/blog/2013/12/18/starting-out-with-d3-chart/ and dashingd3js, but the nesting was really tripping me up. Update: I've been playing with boxchart = svg.selectAll("rect") .attr('class','box') .data(databox) .enter() .append("rect"); console.log(databox); boxchart .data(databox) .attr("class", "box") .attr("stroke", "black") .attr("fill", "white") .attr('opacity',.8) .attr("y", y(d3.quantile(yufunction , .75))) .attr("x", function (d) { return x(d.values[0].date);}) .attr("height", y(d3.quantile(yufunction, .25) - d3.quantile(yufunction, .75))) //.attr("y"…
has answer: http://stackoverflow.com/a/26788804
tagged with: javascript

http://stackoverflow.com/a/26773714
type: Answer
answers question: http://stackoverflow.com/q/26773509
accepted answer of: http://stackoverflow.com/q/26773509
score: 5
upvote count: 5
downvote count: 0
has body: You have not set the route for contactus.html . Add another get entry for that. app.get('/contactus.html', function(req,res) { data= fs.readFile('/home/swift-03/WebstormProjects/website/static/HTML/contactus.html', function (err, data) { res.setHeader('Content-Type', 'text/html'); res.send(data); }); If you want to set routes dynamically. You may set the route in the following way. Then you don't have to add multiple entries for each route. But be carefully about the security as user can access any file inside the directory.. app.get('/*', function(req,res) { data= fs.readFile('/home/swift-03/WebstormProjects/website/static/HTML/' + req.url, function (err, data) { res.setHeader('Content-Type', 'text/html'); res.send(data); });
type: AcceptedAnswer

http://stackoverflow.com/a/26681586
answers question: http://stackoverflow.com/q/26681511
type: Answer
has comment: http://stackoverflow.com/comment/41962850
has body: Add an id="ul" to the UL element then run: var el=document.getElementById('ul'); var li=el.getElementsByTagName('li'); if( / yes /.test(' '+li[0].className+' ')&amp;&amp; / yes /.test(' '+li[1].className+' ')&amp;&amp; / yes /.test(' '+li[2].className+' ') ){ alert('you win'); }else{ alert("You lose!"); } http://jsfiddle.net/k9sev1hq/
score: 0

http://stackoverflow.com/a/26733546
has comment: http://stackoverflow.com/comment/42054010
accepted answer of: http://stackoverflow.com/q/26732929
downvote count: 0
answers question: http://stackoverflow.com/q/26732929
score: 5
type: AcceptedAnswer
has body: Ok. The easiest and simpliest way is to add title attribute to your image. Hovering this image will cause the native browser tooltip to show over the image. Check this demo (place your mouse cursor over the image of pdf-icon). Also these questions has already been asked here.
has comment: http://stackoverflow.com/comment/42053888
upvote count: 5
type: Answer

http://stackoverflow.com/a/26762020
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/56357393
type: Answer
has comment: http://stackoverflow.com/comment/64292644
upvote count: 43
has comment: http://stackoverflow.com/comment/42320916
downvote count: 0
has comment: http://stackoverflow.com/comment/72436652
has comment: http://stackoverflow.com/comment/72452368
has body: You don't need to manage uniqueness, i.e. "UID", yourself. Instead, you can use getDOMNode to access the component's real node. Leaflet's API supports either a string selector or an HTMLElement instance. Leaflet is managing rendering, so the map should not live on state. Only store data in state that affects React's rendering of the DOM element. Beyond those two points, use the Leaflet API normally and tie callbacks from your React component to the Leaflet map as you like. React is simply a wrapper at this point. import React from 'react'; import ReactDOM from 'react-dom'; class Livemap extends React.Component { componentDidMount() { var map = this.map = L.map(ReactDOM.findDOMNode(this), { minZoom: 2, maxZoom: 20, layers: [ L.tileLayer( 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {attribution: '&amp;copy; &lt;a href="http://openstreetmap.org"&gt;OpenStreetMap&lt;/a&gt; contributors, &lt;a href="http://creativecommons.org/licenses/by-sa/2.0/"&gt;CC-BY-SA&lt;/a&gt;'}) ], attributionControl: false, }); map.on('click', this.onMapClick); map.fitWorld(); } componentWillUnmount() { this.map.off('click', this.onMapClick); this.map = null; } onMapClick = () =&gt; { // Do some wonderful map things... } render() { return ( &lt;div className='map'&gt;&lt;/div&gt; ); } }
has comment: http://stackoverflow.com/comment/72448648
accepted answer of: http://stackoverflow.com/q/26755251
score: 43
has comment: http://stackoverflow.com/comment/64296929
has comment: http://stackoverflow.com/comment/56466000
has comment: http://stackoverflow.com/comment/42333983
answers question: http://stackoverflow.com/q/26755251

http://stackoverflow.com/comment/42097704
has text: Im not familiar with such a thing but I can have a look at it. Im a js-novice.
comment on: http://stackoverflow.com/q/26757810
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26688095
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/41973462
accepted answer: http://stackoverflow.com/a/26688109
favorite count: 0
downvote count: 2
upvote count: 1
type: AnsweredQuestion
has title: how to get getUTCDate() with 0
type: Question
has body: how to get getUTCDate() and getUTCMonth() with 0 ? my code is var d = new Date(); var day = d.getUTCDate(); var month = d.getUTCMonth()+1; var year = d.getUTCFullYear(); If Today date is 1-1-2015 than i want to day=01 instead of 1 and month=01 instead of 1;
has answer: http://stackoverflow.com/a/26688109
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/26757967
has comment: http://stackoverflow.com/comment/42097904
accepted answer of: http://stackoverflow.com/q/26757102
has comment: http://stackoverflow.com/comment/42097752
has comment: http://stackoverflow.com/comment/42097836
has comment: http://stackoverflow.com/comment/42103200
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42101938
has comment: http://stackoverflow.com/comment/42102551
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26757102
has body: This may not be ideal for you but I got around this by setting the current time to localStorage once a minute, then when my app is opened the first thing my ready() function does is check the difference between the localStorage value and Date.now(). This sounds like a performance killer but it works fine in my app – best to test in yours before relying on it. I do it thus: function ticker() { var n=Date.now(); if (n%60000&lt;20) { localStorage.setItem("last_tick",n); } requestAnimationFrame(ticker); } Call ticker() to start it going. requestAnimationFrame() allows the browser to optimise. However, if your app goes into the background, the WebKit engine will slow down the frequency at which ticker() will be called and may stop it altogether so you may find you need to use setInterval(), which may bring its own performance problems (although I still think it would be fine). Your question was how did other people get around this and this is what works for me.

http://stackoverflow.com/a/26785035
has body: If you not define the width explicitly it will automatically take the available width but you have to define height explicitly. Here is the work around for setting available height for panel. Ext.onReady(function(){ Ext.create('Ext.panel.Panel', { renderTo:'myDiv', html: '&lt;div style="background-color: blue;"&gt;&lt;/div&gt;', //width: 500, height: (document.body || document.documentElement).scrollHeight, border: 'layout', items: [ { xtype: 'button', text: 'Test Button', region: 'north' },{ xtype: 'panel', html: '&lt;div style="background-color: red; "&gt;&lt;/div&gt;', region: 'center' } ] }); }); If you want to set height equal to any element then you can use Ext.get('divid').getHeight()
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26784177

http://stackoverflow.com/a/26689583
has body: Use the $timeout service to stay within angular context. var data = JSON.parse('[{"name": "Joe","account": "12355845454","rent": "500"}]'); angular.module('ngAppRentManager', []). controller('RentCtrl', ['$scope', '$timeout', function ($scope, $timeout) { $scope.tenants = data; }]); $timeout(function () { data = JSON.parse('[{"name": "Sara","account": "54874","rent": "600"}]'); console.log("Poke Angular!"); }, 2000);
upvote count: 3
type: Answer
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26689447
has comment: http://stackoverflow.com/comment/41998661

http://stackoverflow.com/a/26800619
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26800544
type: Answer
has body: To call a Selenium Command in user-extension.js, you need to use this syntax this.doCommandName(param) ie, to call echo Selenium.prototype.doMyFunction = function(){ this.doEcho("This info will show on logs"); }
accepted answer of: http://stackoverflow.com/q/26800544
score: 0

http://stackoverflow.com/q/26760845
tagged with: fullcalendar
score: 0
has title: gotoDate do not take into account calendar.options.firstDay in 2.1.1
type: UnansweredQuestion
has body: firstDay was working with this method in 1.6.3 but not in 2.1.1 Steps: 1- setting firstDay using: $('#calendar').fullCalendar('getView').calendar.options.firstDay = n; 2 - And then moving to a specific date: $('#calendar').fullCalendar('gotoDate, new Date()); Expected: Calendar moves to the new date, rendering the calendar with the firstDay set in step1. Plunker with version 1.6.3 Working. http://plnkr.co/edit/Onw9wb?p=preview Plunker with version 2.1.1 NOT working. http://plnkr.co/edit/9QkiNK?p=preview Differences on code: Dependency on moment.js Receiving a moment instead of a date at fullCalendar('getDate') I've open an issue, but probably somebody has an idea here. Thx! https://code.google.com/p/fullcalendar/issues/detail?id=2343&amp;thanks=2343&amp;ts=1415201096
has comment: http://stackoverflow.com/comment/42116211
answer count: 0
has comment: http://stackoverflow.com/comment/42129640
type: Question
has comment: http://stackoverflow.com/comment/42128081
tagged with: javascript

http://stackoverflow.com/a/26828286
answers question: http://stackoverflow.com/q/26828268
downvote count: 0
type: Answer
upvote count: 3
score: 3
has body: Check your console, maybe there are some errors. Try this example from https://google-developers.appspot.com/+/demos/signin_demo_trigger: 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

http://stackoverflow.com/q/26762093
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: How to show content loading progress bar in a browser?
type: AnsweredQuestion
upvote count: 0
tagged with: google-chrome
possible better answer: http://stackoverflow.com/a/26762158
type: Question
has answer: http://stackoverflow.com/a/26762158
has comment: http://stackoverflow.com/comment/42105592
tagged with: javascript
score: -1
has body: I loaded this website https://www.teamwork.com/ on chrome browser and I can see a progres bar (a blue colored) below the address bar. anybody have an idea what is it ? this is progress bar of chrome or something this website made ?
answer count: 2
has answer: http://stackoverflow.com/a/26762165
accepted answer: http://stackoverflow.com/a/26762165
downvote count: 1
tagged with: web
tagged with: jquery

http://stackoverflow.com/q/26764970
type: AnsweredQuestion
tagged with: cookies
has comment: http://stackoverflow.com/comment/42111110
has title: Restrict some site features for members
has comment: http://stackoverflow.com/comment/42112126
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42110923
accepted answer: http://stackoverflow.com/a/26765991
upvote count: 0
tagged with: session
tagged with: javascript
has comment: http://stackoverflow.com/comment/42111312
has body: I'm developing a site that has a set of core features available to everyone, as well as a set of special features reserved for members of the site. For instance, all users will be able to view a post but only members will be able to include tags, share the post, etc. As far as html output, the extra features would only result in a few extra icons within the post. What I'm looking for is guidance on the best way to reserve features for members. For instance, two options I've been considering are: Method 1 1. Creating a version of the site for non-members and a version for members. The version for members would include the entire non-member site plus the additional code (html, css, js, etc) required to implement the extra features. Cookies and/or sessions would then be used to check the status of the user and redirect them to the correct version of the site. Method 2 2. Having one version. The extra features (i.e. the few extra icons) would be hidden by default and become visible only when the user is logged in. (This would presumably take some js, which I'm not worried about users disabling). Searches for this type of problem returned a bunch of solutions regarding user admin levels, permissions and wordpress plugins. None of these really apply so if you have any other ideas, awesome! If not, I'd really appreciate your feedback on the methods listed above. Many thanks in advance.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
score: -1
has answer: http://stackoverflow.com/a/26765991
tagged with: php

http://stackoverflow.com/comment/42162150
score: 0
has text: Wow, several good answers have come in immediately. Not sure how to choose the best, but I'll choose in a minute here. I've also realized I need to loop through the elements with jquery and then run this routine on each via jquery's text() method.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26793314

http://stackoverflow.com/a/26819078
has body: There are no really better or shorter patterns to do that. All you can do is to avoid false positive by adding word boundaries where the comma may be missing: ,word1\b|\bword1\b,? If you have to deal with a large string, and only if the first letter isn't too frequent, you can try to use the first character discrimination technic to reduce the number of positions where the pattern will be tested: (?=[,w])(?:,word1\b|\bword1\b,?) (note that you need to test that in real life to see if it is really benefic.) Other way without regex if your target string is only a comma separated list, using a split/join stay the best solution.
answers question: http://stackoverflow.com/q/26818551
score: 0
type: Answer

http://stackoverflow.com/comment/42023512
has text: You have a `deferred` variable you never created. I think there's the problem.
comment on: http://stackoverflow.com/q/26716640
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/26799010
type: Question
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/42171907
upvote count: 1
tagged with: kibana
score: 0
downvote count: 1
tagged with: angularjs-directive
has title: bootstrap window management framework
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42597954
favorite count: 0
has body: Is anyone aware of an (angularjs / bootstrap based preferably) window management framework. I'm looking like something similar to what elasticsearch is using for their kibana dashboards. The concepts Im looking for is responsive, panels with mixed content, rows/columns with panels, user can change layout (change size, drag drop panels around) etc. Thanks! Sander
has comment: http://stackoverflow.com/comment/42174458
tagged with: angularjs

http://stackoverflow.com/comment/42065843
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26739694
score: 0
has text: @apsillers thank you! i read a page earlier that said to indent 4 times but i've always known that as pressing tab 4 times and that just skipped to the next text box! thanks for clarifying that

http://stackoverflow.com/comment/42117530
comment on: http://stackoverflow.com/a/26768251
type: Comment
score: 0
type: AnswerComment
has text: indeed I will most probably need this feature as I need to filter that data! Most welcomed addition, thanks!

http://stackoverflow.com/a/29498302
type: Answer
score: 2
has body: As the developer of JCH Optimize, from my experience, most of the problems people experience with the plugin is either from incorrectly configuring the plugin or errors on the website. Every website is different so needs to configured individually so I strongly recommend reading the documentation and tutorials on how to configure and use the plugin before trying to install it on your live site, something a lot of people fail to do. If you have errors in your javascript file or parsing errors in your css file, while they may seem to work well as individual files you WILL have trouble when these files are combined so it is best to check for these and correct them first. Check for javascript errors in your browser's javascript console and you can check for parsing errors in css using http://csslint.net/. Ignore errors about vendor specific rules like 'Unknown @ rule: @-ms-keyframes'. However there is ample support and information on the website for users of the plugin at https://www.jch-optimize.net/. Subscribers can get premium support and assistance in configuring the plugin on your site so no need to post support requests on stackoverflow. BTW the answer by itoctopus is incorrect. The plugin generates cache based on the name of the files or a hash of the content in inline styles/script, so any content generated on the fly will generate another cache. There's also a tutorial on the site that describes how to handle these kinds of situation to prevent excess cache from being generated. It would have served him well to read through the documentation before using.
downvote count: 0
answers question: http://stackoverflow.com/q/26749543
upvote count: 2

http://stackoverflow.com/q/26726455
tagged with: javascript
has comment: http://stackoverflow.com/comment/42045593
has title: Why does my window.onload code cancel out my other javascript?
favorite count: 0
type: UnansweredQuestion
tagged with: onload
has comment: http://stackoverflow.com/comment/42042426
downvote count: 0
has answer: http://stackoverflow.com/a/26726534
has comment: http://stackoverflow.com/comment/42080124
has body: My work has recently decided to frown upon the use of VB so I have been forced to convert all of my old code to Javascript (and only Javascript).. I have successfully remade all of it without a hitch except for this one piece that resizes my tool based off of the monitor height that my agents use: &lt;script type="text/javascript"&gt; window.onload = function resizePage() { if (screen.height&gt;=900) { window.resizeTo(455,820); document.body.style.zoom="110%"; } else { window.resizeTo(395,720) } } &lt;/script&gt; The funny thing is that the code works.. The annoying thing is that it cancels out all of my other javascript in my HTA and makes my buttons completely useless. If I get rid of this specific piece of code everything works perfectly, I do not understand how or why this is causing such an issue. I have tried multiple different ways to try and get this to work but cannot seem to solve it. I have also tried using body.onload in the body tag but even that causes issues because it makes my HTA go completely blank. Any help on this would be greatly appreciated! Thank you for the help everyone, all of your code works with the resizer but it does the same thing with canceling out my other javascript.. I figured out the answer but I am so confused as to how or why this works.. I don't think this will help anybody in the future but I will post it if anybody is interested in the outcome of this. I got it to work by putting this is my main file: &lt;script language="VBScript"&gt; &lt;/script&gt; &lt;script type="text/javascript"&gt; window.onload= function(){ if (screen.height&gt;=900) { document.body.style.zoom="110%"; } } &lt;/script&gt; and this in my external .js file: if (screen.height&gt;=900) { window.resizeTo(455,820); } else { window.resizeTo(395,720) } The thing that is completely stumping me is that if I remove my VB that does absolutely nothing it causes all of my Javascript to break again. This is blowing my mind and I think I am just going to have to deal …
type: Question
score: 1
tagged with: hta
tagged with: resize
has comment: http://stackoverflow.com/comment/42145732
answer count: 2
has answer: http://stackoverflow.com/a/26726669
upvote count: 1
tagged with: window

http://stackoverflow.com/q/26804163
has comment: http://stackoverflow.com/comment/42181529
has comment: http://stackoverflow.com/comment/42181915
has answer: http://stackoverflow.com/a/26804762
has comment: http://stackoverflow.com/comment/42181534
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26804331
has body: If I have a page that inserts an unwanted div on every load, is there any way to hide it without using CSS? I don't have access to that div and it doesn't have an ID or a CLASS. For example I don't want the browser to display the following div: Please click here I found a question and an answer for hiding a specific string of text, but it doesn't work with this.
has comment: http://stackoverflow.com/comment/42181568
linked to: http://stackoverflow.com/q/303956
has comment: http://stackoverflow.com/comment/42182196
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26804617
tagged with: hide
type: Question
tagged with: javascript
score: 0
has title: Hide specific div without css
answer count: 3
has comment: http://stackoverflow.com/comment/42182224

http://stackoverflow.com/q/26801286
tagged with: date
score: 0
upvote count: 1
downvote count: 1
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26801491
type: UnansweredQuestion
tagged with: php
tagged with: jqplot
has body: Refer to the attached image. Date strings from php in format Y-m-d are plotted on the x axis. But as you can see the more dates there are the more quashed up it is. I wanted to use the tickInterval property of jqplot but it just isn't working! It ignores the interval entirely and just plots each and every day there is. So if i have 1000 days it becomes complete unreadable. var plot1 = $.jqplot("analyse-bottom-left",[yValues],{ highlighter: { show: true, tooltipAxes: 'both' }, seriesDefaults:{ //renderer:$.jqplot.BarRenderer, rendererOptions: {fillToZero: true}, }, axesDefaults:{ tickRenderer: $.jqplot.CanvasAxisTickRenderer, }, legend: { show: true, placement: 'outsideGrid' }, //series:seriesNames, axes:{ xaxis:{ renderer: $.jqplot.CategoryAxisRenderer, rendererOptions: { tickRenderer: $.jqplot.dateAxisRenderer }, ticks:xValues, tickOptions:{ angle:30, formatString:'Y-m-d' }, tickInterval:'2 days' }, yaxis:{ tickOptions: {formatString: '£%d'} } } });
has title: jQPlot Date On X axis Tick Interval Isn't Working
type: Question
tagged with: javascript

http://stackoverflow.com/comment/42130465
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26775780
score: 0
has text: I was checked at 11 version, but I think that is not depends on version.

http://stackoverflow.com/comment/42109387
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26764213
type: Comment
has text: thanks, i got the array resut as ["xa"], as i already said i am using this array in an json, when i use this array in json i am getting '["xa"]' what can i do for that..

http://stackoverflow.com/comment/42159854
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26792137
has text: I just answered this 1 yesterday with this - http://plnkr.co/edit/yjiZjIZVTamswxFYAvof?p=preview. I find the SO link.
score: 0

http://stackoverflow.com/comment/42076765
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26745228
type: Comment
has text: @Barmar but he is getting the error because there is not json to parse

http://stackoverflow.com/comment/42178555
has text: no reason to use a closure like that here anyway, no benefit.
score: 1
comment on: http://stackoverflow.com/q/26802288
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42169048
comment on: http://stackoverflow.com/q/26782224
score: 0
has text: Yep I did that via the Chrome Console :(
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26761926
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42106148
has comment: http://stackoverflow.com/comment/42105315
has comment: http://stackoverflow.com/comment/42106760
score: 0
has comment: http://stackoverflow.com/comment/42105795
accepted answer: http://stackoverflow.com/a/26762716
has comment: http://stackoverflow.com/comment/42105184
has comment: http://stackoverflow.com/comment/42105704
has title: Duplicate div with script/style tags inside using JS
has comment: http://stackoverflow.com/comment/42105217
has comment: http://stackoverflow.com/comment/42105371
has body: I have the following html code: 1 ... ... 1 ... That generates this (from 1 to 20, actually): What I need is to insert a whole new div when the user presses the arrow button. It should copy the div with scripts and styles and insert after them with a new number (e.g. 21, then 22, etc.).
has comment: http://stackoverflow.com/comment/42105622
possible better answer: http://stackoverflow.com/a/26762197
has comment: http://stackoverflow.com/comment/42105888
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26762197
has comment: http://stackoverflow.com/comment/42105892
has comment: http://stackoverflow.com/comment/42105263
has comment: http://stackoverflow.com/comment/42105618
has answer: http://stackoverflow.com/a/26762716
has comment: http://stackoverflow.com/comment/42106278
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42105686
has comment: http://stackoverflow.com/comment/42105487

http://stackoverflow.com/q/26781306
tagged with: jquery
has title: Remove and Add scroll event handler using jQuery .off or .unbind
favorite count: 0
has body: I am writing my own image Lazy Loading function that when a div is scrolled to its bottom we load some new images, the height of the container div (#ScrollDiv in this case) is increased and when we scroll to the bottom again we make the same call. This is fine although I pass a 'pagination ID' with each request for more images (this is called appName.featureName.PaginationConstant and in a parent scope) and I want to remove or freeze the scroll event so we don't make other requests or increment the pagination ID. For example: appName.featureName.lazyLoader = function() { var currentScroll = $(this).scrollTop(), divHeight = $(this)[0].scrollHeight, actualHeight = $(this).height() + parseInt($(this).css('padding-bottom')) // have we hit the bottom of the Scroll Div? if((divHeight - actualHeight) &lt;= currentScroll ) { // yes we have, remove the scroll, see I name this function below $('#ScrollDiv').off('scroll', appName.featureName.lazyLoader); // Now get more photos, in the function below I shall re-bind the scroll functionality appName.featureName.getMorePhotos(++appName.featureName.PaginationConstant); } }; // this is the lazyload funtion appName.featureName.lazyLoad = function () { $('#ScrollDiv').on('scroll', appName.featureName.lazyLoader); }; Everything works great apart from the unbinding! I am still able to fire the scroll event handler despite the fact I have tried to remove it once my condition is met with $('#ScrollDiv').off('scroll', appName.featureName.lazyLoader); What am I doing wrong?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 1
has answer: http://stackoverflow.com/a/26781444
has answer: http://stackoverflow.com/a/26781433
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42140132
answer count: 2
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42140570

http://stackoverflow.com/comment/42212406
score: 1
has text: @Rika i dont think you can nest another tag inside p tag, as mentioned by Vohuman. Even though some browsers let you do it, its not standard
type: AnswerComment
comment on: http://stackoverflow.com/a/26821418
type: Comment

http://stackoverflow.com/a/26832090
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26831626
type: Answer
answers question: http://stackoverflow.com/q/26831626
has body: You're looping over the total number of "texts" and "selects" (texts.length+selects.length) - which is almost certainly going to result in an array out-of-bounds error when you index using i. You probably want minimum: for (var i=0;i&lt;Math.min(texts.length,selects.length);i++) {... or two separate loops to iterate over each of the elements and the elements.
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/41953799
type: Comment
type: AnswerComment
has text: One follow up question: can Exif (JFIF) encoded JPEG files also contain, non-Exif (non-JFIF) metadata at the same time? Or is it a fair assumption that an Exif or JFIF file contains either Exif stuff or JFIF stuff and nothing else.
comment on: http://stackoverflow.com/a/26675954
score: 0

http://stackoverflow.com/comment/41995071
comment on: http://stackoverflow.com/a/26693427
type: AnswerComment
has text: It works fine from the browser, but not from android. Thisn i really frustrating! Not a cross origin issue as i have now enabled cors via htaccess, this aspect is working fine. In android, via logcat i can see a status code 200 come back okay, but then i look at the db and theres nothing there. Thanks for your help :)
score: 0
type: Comment

http://stackoverflow.com/a/26791933
score: 6
downvote count: 0
has body: I figured it out. You can just manually validate/invalidate the form: Password is required *Password must be at least {{passwordLength}} characters Username/Password combination is incorrect and in your controller, on submit: $scope.login = function(){ $scope.form.password.$setValidity("correctPassword", true); // ...do some stuff... $http.post('/someUrl', {msg:'hello word!'}) .success(function(){}) .error(function() { $scope.form.password.$setValidity("correctPassword", false); }); }
upvote count: 6
type: Answer
answers question: http://stackoverflow.com/q/26789299

twitter-bootstrap
tags question: http://stackoverflow.com/q/26822383
tags question: http://stackoverflow.com/q/26708773
tags question: http://stackoverflow.com/q/26831333
tags question: http://stackoverflow.com/q/26726180
tags question: http://stackoverflow.com/q/26722224
tags question: http://stackoverflow.com/q/26816552
tag name: twitter-bootstrap
tags question: http://stackoverflow.com/q/26695651
tags question: http://stackoverflow.com/q/26799010
tags question: http://stackoverflow.com/q/26821321
tags question: http://stackoverflow.com/q/26707432
tags question: http://stackoverflow.com/q/26727581
tags question: http://stackoverflow.com/q/26795498
tags question: http://stackoverflow.com/q/26787742
tags question: http://stackoverflow.com/q/26767719
tags question: http://stackoverflow.com/q/26787295
tags question: http://stackoverflow.com/q/26685677
tags question: http://stackoverflow.com/q/26722449
tags question: http://stackoverflow.com/q/26697851
tags question: http://stackoverflow.com/q/26756158
tags question: http://stackoverflow.com/q/26741575
tags question: http://stackoverflow.com/q/26763710
tags question: http://stackoverflow.com/q/26767584
tags question: http://stackoverflow.com/q/26769208
tags question: http://stackoverflow.com/q/26744778
tags question: http://stackoverflow.com/q/26675944
tags question: http://stackoverflow.com/q/26764263
tags question: http://stackoverflow.com/q/26730083
tags question: http://stackoverflow.com/q/26737947
tags question: http://stackoverflow.com/q/26743622
tags question: http://stackoverflow.com/q/26788651
tags question: http://stackoverflow.com/q/26793339
tags question: http://stackoverflow.com/q/26778081
tags question: http://stackoverflow.com/q/26828061
tags question: http://stackoverflow.com/q/26724890
tags question: http://stackoverflow.com/q/26778842
tags question: http://stackoverflow.com/q/26772159
tags question: http://stackoverflow.com/q/26706586
tags question: http://stackoverflow.com/q/26799475
tags question: http://stackoverflow.com/q/26743551
tags question: http://stackoverflow.com/q/26755070
tags question: http://stackoverflow.com/q/26681071
tags question: http://stackoverflow.com/q/26766501
tags question: http://stackoverflow.com/q/26815086
tags question: http://stackoverflow.com/q/26679368
tags question: http://stackoverflow.com/q/26691018
tags question: http://stackoverflow.com/q/26831518
tags question: http://stackoverflow.com/q/26802853
tags question: http://stackoverflow.com/q/26767892
tags question: http://stackoverflow.com/q/26733150
tags question: http://stackoverflow.com/q/26818148
tags question: http://stackoverflow.com/q/26776537
tags question: http://stackoverflow.com/q/26733199
tags question: http://stackoverflow.com/q/26681376
tags question: http://stackoverflow.com/q/26783424
tags question: http://stackoverflow.com/q/26725870
tags question: http://stackoverflow.com/q/26699619
tags question: http://stackoverflow.com/q/26763112
tags question: http://stackoverflow.com/q/26675389
tags question: http://stackoverflow.com/q/26694669
tags question: http://stackoverflow.com/q/26673743
tags question: http://stackoverflow.com/q/26691776
tags question: http://stackoverflow.com/q/26766573
type: Tag
tags question: http://stackoverflow.com/q/26683083
tags question: http://stackoverflow.com/q/26796878
tags question: http://stackoverflow.com/q/26823274
tags question: http://stackoverflow.com/q/26817513
tags question: http://stackoverflow.com/q/26699833
tags question: http://stackoverflow.com/q/26742133
tags question: http://stackoverflow.com/q/26729000
tags question: http://stackoverflow.com/q/26691868
tags question: http://stackoverflow.com/q/26819725
tags question: http://stackoverflow.com/q/26797425
tags question: http://stackoverflow.com/q/26715307
tags question: http://stackoverflow.com/q/26780978
tags question: http://stackoverflow.com/q/26716442
tags question: http://stackoverflow.com/q/26813383
tags question: http://stackoverflow.com/q/26776294
tags question: http://stackoverflow.com/q/26734808

http://stackoverflow.com/comment/42017032
has text: what's the question here?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26713110

http://stackoverflow.com/q/26827822
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26827842
type: UnansweredQuestion
upvote count: 1
has body: This is about the minimal view (ie., when you touch-drag enter "fullscreen"): When viewport width is 320, then window.innerHeight is 529. When viewport width is 640, then window.innerHeight is 1057. Notice that viewport increased twice, but window.innerHeight did not (it should have been 1058 = 529 * 2).
tagged with: ios8
score: 1
has title: How is the window.innerHeight derived of the minimal view?
tagged with: mobile-safari
type: Question
downvote count: 0
answer count: 1

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/26689856
tags question: http://stackoverflow.com/q/26812257
tags question: http://stackoverflow.com/q/26822177
tags question: http://stackoverflow.com/q/26786039
tags question: http://stackoverflow.com/q/26733855
tags question: http://stackoverflow.com/q/26742362
tags question: http://stackoverflow.com/q/26800261
tags question: http://stackoverflow.com/q/26713493
tags question: http://stackoverflow.com/q/26803555
tags question: http://stackoverflow.com/q/26723313
tags question: http://stackoverflow.com/q/26678435
tags question: http://stackoverflow.com/q/26819505
tags question: http://stackoverflow.com/q/26784927
tags question: http://stackoverflow.com/q/26770833
tags question: http://stackoverflow.com/q/26741075
tags question: http://stackoverflow.com/q/26676130
tags question: http://stackoverflow.com/q/26682904
tags question: http://stackoverflow.com/q/26701330
tags question: http://stackoverflow.com/q/26707625
tags question: http://stackoverflow.com/q/26676113
tags question: http://stackoverflow.com/q/26735059
tags question: http://stackoverflow.com/q/26724430
tags question: http://stackoverflow.com/q/26709567
tags question: http://stackoverflow.com/q/26677597
tags question: http://stackoverflow.com/q/26814788
tags question: http://stackoverflow.com/q/26692393
tags question: http://stackoverflow.com/q/26738360
tags question: http://stackoverflow.com/q/26680670
tags question: http://stackoverflow.com/q/26798415
tags question: http://stackoverflow.com/q/26714928
tags question: http://stackoverflow.com/q/26767880
tags question: http://stackoverflow.com/q/26782610
tags question: http://stackoverflow.com/q/26713196
tags question: http://stackoverflow.com/q/26702413
tags question: http://stackoverflow.com/q/26774852
tags question: http://stackoverflow.com/q/26828138
tags question: http://stackoverflow.com/q/26825573
tags question: http://stackoverflow.com/q/26701565
tags question: http://stackoverflow.com/q/26679763
tags question: http://stackoverflow.com/q/26755149
tags question: http://stackoverflow.com/q/26715490
tags question: http://stackoverflow.com/q/26820127
tags question: http://stackoverflow.com/q/26823172
tags question: http://stackoverflow.com/q/26725038
tags question: http://stackoverflow.com/q/26701822
tags question: http://stackoverflow.com/q/26673003
tags question: http://stackoverflow.com/q/26706613
tags question: http://stackoverflow.com/q/26684665
tags question: http://stackoverflow.com/q/26703270
tags question: http://stackoverflow.com/q/26784064
tags question: http://stackoverflow.com/q/26694024
tags question: http://stackoverflow.com/q/26711520
tags question: http://stackoverflow.com/q/26797649
tags question: http://stackoverflow.com/q/26683375
tags question: http://stackoverflow.com/q/26697268
tags question: http://stackoverflow.com/q/26738990
tags question: http://stackoverflow.com/q/26711921
tags question: http://stackoverflow.com/q/26790258
tags question: http://stackoverflow.com/q/26750614
tags question: http://stackoverflow.com/q/26684699
tags question: http://stackoverflow.com/q/26784611
tags question: http://stackoverflow.com/q/26690518
type: Tag
tags question: http://stackoverflow.com/q/26809865
tags question: http://stackoverflow.com/q/26824974
tags question: http://stackoverflow.com/q/26790299
tags question: http://stackoverflow.com/q/26705057
tags question: http://stackoverflow.com/q/26712363
tags question: http://stackoverflow.com/q/26721994
tags question: http://stackoverflow.com/q/26698546
tags question: http://stackoverflow.com/q/26807450
tags question: http://stackoverflow.com/q/26807515
tags question: http://stackoverflow.com/q/26827472
tags question: http://stackoverflow.com/q/26788778
tags question: http://stackoverflow.com/q/26718530
tags question: http://stackoverflow.com/q/26748032
tags question: http://stackoverflow.com/q/26705333
tags question: http://stackoverflow.com/q/26808485
tags question: http://stackoverflow.com/q/26794571
tags question: http://stackoverflow.com/q/26673951

http://stackoverflow.com/q/26779227
tagged with: jquery
tagged with: openlayers
score: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26782317
has body: this may seem to be repeated question, as i have gone through many question already available, but as am new to Openlayers, i am not able to get, how should I set my Openlayers with jquery slider, I am able to position it, but it is not working. I have baske map of OSM and overlay layer is of .png, i wanted to check for opacity so that i caqn check base layer also. if possible someone could guide. Web Urban Atlas Urban Atlas Bangalore Bangalore is city of gardens delhi Content For delhi mumbai Content for mumbai
type: Question
type: AnsweredQuestion
has title: Jquery Slider UI for displaying Overlay Layer in OpenLayers based on Opacity
has answer: http://stackoverflow.com/a/26782317
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/26784830
has body: I'm not 100% what you're trying to do. My best guess is to open the panel below each heading on click? In that case just update the href in the second link to : href="#collapseTwo" If you do need to access the parent of an element $("element").parent() Hopefully this helps you, Pete
answers question: http://stackoverflow.com/q/26784496
has comment: http://stackoverflow.com/comment/42146662
has comment: http://stackoverflow.com/comment/42284251
score: 0
type: Answer

http://stackoverflow.com/comment/42064040
type: AnswerComment
comment on: http://stackoverflow.com/a/26738897
type: Comment
score: 1
has text: It works http://jsfiddle.net/ufctj1f9/5/. You just named the last row inputs the same as previous.

http://stackoverflow.com/q/26811765
type: Question
linked to: http://stackoverflow.com/q/23154254
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27001297
answer count: 2
tagged with: google-maps
has answer: http://stackoverflow.com/a/27001941
has answer: http://stackoverflow.com/a/27001297
has title: How to combine circles in Google Maps
downvote count: 0
favorite count: 0
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/27001941
upvote count: 2
has body: I would like to be able to draw multiple circles on a Google Map with javascript, but combine them as a "single shape" so that their areas don't overlap, but are shared. For example, I found this example at WalkScore.com: You can see that they are COMBINING circles, instead of overlapping them as separate shapes. Is this possible? (Clearly it seems to be, but how?)

http://stackoverflow.com/comment/42016118
type: QuestionComment
comment on: http://stackoverflow.com/q/26710692
score: 0
has text: @ashutiwari4 :-) Tiwari ji thats good link, but the csv file is on server side. The user selects the csv file via drop down menu, and then the JS will read this csv file into array and display it.
type: Comment

http://stackoverflow.com/comment/42321160
type: Comment
comment on: http://stackoverflow.com/a/26882739
type: AnswerComment
score: 0
has text: @ak85 i havent written tests for this, but it works.

dropbox
tags question: http://stackoverflow.com/q/26781903
tags question: http://stackoverflow.com/q/26784898
tag name: dropbox
type: Tag

http://stackoverflow.com/q/26683407
tagged with: javascript
has answer: http://stackoverflow.com/a/26683423
has title: Combining conditional statements in JavaScript
favorite count: 0
has body: I have two variables that hold objects: var person1 = { name: "Joe", study: false }; var person2 = { name: "Tom", study: true }; I've created two functions such that after a function is called, it will call both of these functions: var person1study = function() { if (person1.study === true){ person.study = false; } else { person1.study = true; } }; var person2study = function() { if (person2.study === true){ person2.study = false; } else { person2.study = true; } }; Is there a way that I can combine these who functions into a single function that does that same thing?
type: Question
has comment: http://stackoverflow.com/comment/41965377
score: -1
accepted answer: http://stackoverflow.com/a/26683423
answer count: 2
downvote count: 1
tagged with: conditional-statements
possible better answer: http://stackoverflow.com/a/26683429
has answer: http://stackoverflow.com/a/26683429
type: AnsweredQuestion
upvote count: 0

http://stackoverflow.com/a/26699558
has body: Try this: function formatNumber(val){ val = Math.round(parseFloat(val)); while (/(\d+)(\d{3})/.test(val.toString())){ val = val.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2'); } return '$ ' + val; } alert(formatNumber(1234567.89)); Fiddle: http://jsfiddle.net/dybg5ye1/2/ Edit: forgot the dollar sign :)
has comment: http://stackoverflow.com/comment/41993197
downvote count: 0
answers question: http://stackoverflow.com/q/26699534
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41993012

http://stackoverflow.com/comment/42208109
score: 0
has text: What I'm demonstrating in the fiddle is how to use animations in Angular, which you didn't quite seem to understand.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26798533

http://stackoverflow.com/a/26737919
answers question: http://stackoverflow.com/q/26737875
has comment: http://stackoverflow.com/comment/42062306
type: Answer
has comment: http://stackoverflow.com/comment/42062072
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42062096
has body: Popups are annoying, so browsers will only open them in response to a user action (such as clicking on a button). The document loading (i.e. the load event which you reference with the onload attribute) is not a user action, so the call to open is blocked. The specific rules for when a popup is allowed can be found in the HTML 5 specification. You also have a syntax error in your code (although it may be a transcription error when you created the question). You are missing }; from just before &lt;/script&gt;. This should be indicated in the developer tools in your browser.
has comment: http://stackoverflow.com/comment/42062558
upvote count: 2
has comment: http://stackoverflow.com/comment/42062160
has comment: http://stackoverflow.com/comment/42062152
has comment: http://stackoverflow.com/comment/42062346

http://stackoverflow.com/comment/42059703
has text: did you mean in each modal? in ...add twitter-bootstrap slideshow "carousel" in each cearosal
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26734576
type: Comment

http://stackoverflow.com/a/27158144
has body: "&lt;%= j post.content %>" did solve the problem, like "vee" write in the comment. http://api.rubyonrails.org/classes/ActionView/Helpers/JavaScriptHelper.html#method-i-escape_javascript
answers question: http://stackoverflow.com/q/26703246
accepted answer of: http://stackoverflow.com/q/26703246
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/q/26797353
has body: What area the consequences of an async function simply returning without calling back? I know you shouldn't do this. My question is hypothetical - I'm just interested to know what the consequences of doing this might be. Is it bad for the stack? Could it lead to memory leaks? For example: function whatAreMyConsequences(value, callback) { value++; if(value &gt; 1000) { return; } callback(null, value); }
has title: Node.js - what are the consequences of an async function not calling back?
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26797381
accepted answer: http://stackoverflow.com/a/26797381
type: Question
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42168754

http://stackoverflow.com/comment/42196346
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26812007
score: 0
has text: Pardon my ignorance, but wouldn't a JS or JQuery solution end up using CSS to solve the problem in the end? OTOH, that solution may be complex and a JS/JQuery lib could make your life a lot easier, so I understand the appeal.

http://stackoverflow.com/a/26721698
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26721329
has body: Hide the tooltip when clicking, if it is visible. You don't need more code than this: var popover = $('.popover'); var qs = $('.qs'); qs.click(function(e){ e.stopPropagation(); popover.slideToggle(); }); $('html').click(function() { if(popover.is(':visible')) { popover.slideUp(); } }); $('.popover').click(function(e) { e.stopPropagation() }); Codepen
answers question: http://stackoverflow.com/q/26721329
score: 2
has comment: http://stackoverflow.com/comment/42033724
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/q/26708655
tagged with: javascript
score: -1
possible better answer: http://stackoverflow.com/a/26708691
accepted answer: http://stackoverflow.com/a/26708677
favorite count: 0
type: AnsweredQuestion
has body: I am trying to substitute values into w and h but it does not seem to take it at all. got a solution? var width = img.Width; var height = img.Height; var w = window.innerWidth+"px"; var h = window.innerHeight+"px"; $('#outer').css('background-size','w h');
has answer: http://stackoverflow.com/a/26708677
downvote count: 1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26708691
upvote count: 0
has title: Inputting values into .css()

http://stackoverflow.com/comment/41962947
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26681376
type: QuestionComment
has text: have you included the ui-bootstrap-tpls file in addition to ui-bootstrap?

http://stackoverflow.com/q/26692934
has comment: http://stackoverflow.com/comment/42029608
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has title: Breeze knockout value binding outputs a function
has comment: http://stackoverflow.com/comment/41988809
tagged with: breeze
type: UnansweredQuestion
upvote count: 1
has body: I'm using breeze with knockout against an odata endpoint and it gives some strange results. Hopefully I'm just missing something obvious, though. This is my binding expression: &lt;input type="text" id="name" data-bind="value:organisation().name" /&gt; where organisation is a ko.observable&lt;myEntity&gt; and myEntity has a property called name. The value of the textbox is a function, which I suppose is the observable (although it might appear from reading the output that its actually a computed...?: function f(){if(0&lt;arguments.length){if("function"===typeof O)O.apply(d,arguments);else throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return this}a.k.Jb(f);n&amp;&amp;k(!0);return q} If I change the binding expression to value:organisation().name() then the correct values are displayed, but the two way binding is lost and changes won't be reflected. Hopefully I've made a common mistake someone around here might point out!
tagged with: typescript
has answer: http://stackoverflow.com/a/26698737
score: 1
tagged with: knockout.js
has comment: http://stackoverflow.com/comment/41988690
type: Question

http://stackoverflow.com/comment/42091982
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26746535
has text: Sorry, I thought I had written the question part. Fixed it.

debugging
tags question: http://stackoverflow.com/q/26675576
tag name: debugging
tags question: http://stackoverflow.com/q/26777433
tags question: http://stackoverflow.com/q/26725100
type: Tag
tags question: http://stackoverflow.com/q/26748543
tags question: http://stackoverflow.com/q/26801630
tags question: http://stackoverflow.com/q/26726269
tags question: http://stackoverflow.com/q/26763819
tags question: http://stackoverflow.com/q/26689865
tags question: http://stackoverflow.com/q/26696408
tags question: http://stackoverflow.com/q/26740212

http://stackoverflow.com/q/26822056
has body: Answers to this question explain how to route sub domains in Node.js with Express. I want to know how to do it without Express. Here's my server module, which returns a server object: module.exports.serve = function(port) { var server = https.createServer(options, function(req, res) { // Parse &amp; process URL var reqInfo = url.parse(req.url, true, true), path = reqInfo.pathname; debug.log("Client [" + req.connection.remoteAddress + "]requesting resource: " + path); // Quickly handle preloaded requests if (preloaded[path]) preloadReqHandler(req, res, preloaded[path], path); // Handle general requests else generalReqHandler(req, res, reqInfo); }).listen(port); return server; }; No need to go into detail with the modules that handle the requests, I'm just interested in how to detect www.example.com and route it to example.com or vice-versa, via my server. Just to add as much detail as possible, my goal here is to route all traffic from http://www.example.com and http://example.com and https://www.example.com and send it all to https://example.com. To do that, I think I just need to learn how to route the www sub domain, and then listen on both the http and https ports for that routing.
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26822146
has title: How do I route sub domains in Node.js without Express?
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26822146
has comment: http://stackoverflow.com/comment/42213495
linked to: http://stackoverflow.com/q/5791260
type: Question
tagged with: javascript

http://stackoverflow.com/q/26822535
tagged with: internet-explorer
type: UnansweredQuestion
has title: Ajax request from local file
tagged with: cross-domain
has answer: http://stackoverflow.com/a/26822930
tagged with: javascript
tagged with: ajax
type: Question
has body: I'm trying to make a HTA with cross-domain request inside using JQuery.Soap plugin. $.soap({ url: 'some url', method: 'some method', appendMethodToURL: false, namespaceURL: 'some namespace', enableLoggin: true, data: {}, success: function (response) { alert(response); }, error: function (response) { alert(response); } }); It's work perfectly in IE11, but only when I open it as a page on webserver. If I open it as a file on my PC - I get error "No transport", same with HTA. Is it possible to make a standalone page with Ajax?
score: 0
tagged with: web-services
answer count: 1

http://stackoverflow.com/a/26734295
has body: Try this code $(document).ready(function(){ $('input[type=text]').bind("cut copy paste",function(e) { e.preventDefault(); }); });
has comment: http://stackoverflow.com/comment/42055365
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26734247
has comment: http://stackoverflow.com/comment/42056396
downvote count: 0
has comment: http://stackoverflow.com/comment/42056135
score: 1
has comment: http://stackoverflow.com/comment/42056379

timer
tag name: timer
tags question: http://stackoverflow.com/q/26740575
tags question: http://stackoverflow.com/q/26813846
tags question: http://stackoverflow.com/q/26758785
type: Tag
tags question: http://stackoverflow.com/q/26775808
tags question: http://stackoverflow.com/q/26828596

gulp
tags question: http://stackoverflow.com/q/26715230
tags question: http://stackoverflow.com/q/26702781
tags question: http://stackoverflow.com/q/26738154
tags question: http://stackoverflow.com/q/26706962
tags question: http://stackoverflow.com/q/26784094
tags question: http://stackoverflow.com/q/26681717
tags question: http://stackoverflow.com/q/26705304
type: Tag
tag name: gulp
tags question: http://stackoverflow.com/q/26810526
tags question: http://stackoverflow.com/q/26781981
tags question: http://stackoverflow.com/q/26687243
tags question: http://stackoverflow.com/q/26818795
tags question: http://stackoverflow.com/q/26714390
tags question: http://stackoverflow.com/q/26809494
tags question: http://stackoverflow.com/q/26744685
tags question: http://stackoverflow.com/q/26817607
tags question: http://stackoverflow.com/q/26719884
tags question: http://stackoverflow.com/q/26824944
tags question: http://stackoverflow.com/q/26723864

http://stackoverflow.com/a/26816528
has body: If you have to use targetTouches, then you'll need to use the Touch object's target property, which is a DOM element. If you want to use jQuery methods on it, you'll have to wrap it. Finally, to access anything that jQuery doesn't explicitly copy to the jQuery event object, you need to use the originalEvent property of the jQuery event object. So for instance (using jQuery wrapper): // Using `target` ---------------------------v var test = $(e.originalEvent.targetTouches[0].target).attr('class'); // ^ ^-- using `originalEvent` ^ // +-- wrapping in jQuery obj --------------+ or just (direct to the reflected className property): var test = e.originalEvent.targetTouches[0].target.className; $(document).on("touchstart", function(e) { if (!e.originalEvent.targetTouches) { console.log(e.type + ": No e.originalEvent.targetTouches"); } else if (!e.originalEvent.targetTouches[0]) { console.log(e.type + ": No e.originalEvent.targetTouches[0]"); } else if (!e.originalEvent.targetTouches[0].target) { console.log(e.type + ": No e.originalEvent.targetTouches[0].target"); } else { console.log(e.type + ": e.originalEvent.targetTouches[0].target.className: " + e.originalEvent.targetTouches[0].target.className); } // Note that as I said in a comment, `e.target.className` works just fine // for the main element console.log(e.type + ": e.target.className: " + e.target.className); }); div { border: 1px solid #aaa; background-color: #eee; height: 4em; font-family: sans-serif; text-align: center; } top div middle div bottom div
downvote count: 0
answers question: http://stackoverflow.com/q/26816415
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26816415
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/comment/42133439
score: 0
has text: yes,split its id and make it the value of checkbox @dfsq
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26777542

http://stackoverflow.com/comment/41947257
has text: @chriz Yes Thank You! I got three working examples!
score: 0
comment on: http://stackoverflow.com/q/26673687
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26831073
has comment: http://stackoverflow.com/comment/42229247
has comment: http://stackoverflow.com/comment/42229059
has body: You need to add an explicit reject statement when an error is thrown by a service. var deferred = $q.defer(); someService().then(function(obj){ deferred.resolve(obj): }) .error(function(e){ deferred.reject(e); }); return deferred.promise;
answers question: http://stackoverflow.com/q/26830960
has comment: http://stackoverflow.com/comment/42229219
score: 0
type: Answer

http://stackoverflow.com/a/26771880
answers question: http://stackoverflow.com/q/26771764
has body: You can use function to avoid repetition. var createDiv = function() { var div = document.createElement('div'); div.className = 'what-ever-class'; return div; }; console.log(createDiv()); console.log(createDiv()); Open console ....
downvote count: 0
score: 1
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42195738
type: Comment
comment on: http://stackoverflow.com/a/26810564
has text: This should do that unless I misunderstand your intent. I understood you to mean that for each <marker /> XML tag, there could be any number of coordinate pairs in the polys attribute. See here: http://jsfiddle.net/4a87k/265/ When run, four pairs of coordinates are used.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41970611
type: Comment
has text: @istos I have read the article, it's explaining that JSON is a string and objects are the result of parsing those strings. I am still trying to find the connection between the problem the OP mentioned and the article. Maybe you're saying that there is JSON inside JSON...
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26686038

http://stackoverflow.com/a/26734287
type: Answer
downvote count: 0
score: 1
has body: The controller as syntax in angular was introduced in version 1.2 and you are using version 1.0.7. If you update the version of angular in your script tags to 1.2 or above it will work fine. You can also see this working fine on the following link: http://jsbin.com/tadinesime/2/edit I hope this helps.
answers question: http://stackoverflow.com/q/26734136
upvote count: 1

http://stackoverflow.com/a/26692656
has body: Some tips: You need any kind of DOM HTML parser, not only JS nor specifically JS. You can do that thing with Java with use of jTidy or jSoup libraries (I've used second one few times). It's pretty simple language to learn if you know JS and IDE like Netbeans helps a lot. So can be made quickly with that. You can use PhantomJS to create some job files and create shell/batch code to run them on some files. You might need to write a generator for job files (like taking a list of files, creating job files for each and running them). You can use Node.js which isn't much overkill, I'm sure any solution won't be trivial. You can create an ETL for processing with for example Pentaho ETL (which has JS embedded as one of two scripting languages... but without DOM parser - for that one you would need to use a bit of Java there and some library in way similar to this article). You can also do that with PHP with Simple HTML DOM Parser - so you can make a service online (or on local server) that takes those html files and throws out processed ones.
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41986232
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26692299

http://stackoverflow.com/q/26816579
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: Good day, I have a function inside a javaScript file. I have 10 button will trigger this function to do something based on the button name. The code is something as follow: function doSomething( name ){ switch(name){ case "1"; alert("i am 1"); break; case "2"; alert("i am 1"); break; // and so on... } } This doSomething is working fine. However, I would like to alert other things when there is noscript or JavaScript is disable. I do something like: &lt;noscript&gt; // if click on button 1, display &lt;image src="image/img1" /&gt; // if click on button 2, display &lt;image src="image/img2" /&gt; // and so on.. // I would like display different image when different button clicked. &lt;/noscript&gt; Kindly advise.
has answer: http://stackoverflow.com/a/26816614
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/26817156
tagged with: javascript
tagged with: noscript
score: 0
answer count: 2
has title: do conditional things in noscript
tagged with: asp.net

http://stackoverflow.com/comment/42180073
type: QuestionComment
has text: I don't fully understand what you're trying to accomplish. But if you want to bulk-set the data, you can simply do `x.set(data)`
comment on: http://stackoverflow.com/q/26801944
score: 0
type: Comment

http://stackoverflow.com/a/26690014
has comment: http://stackoverflow.com/comment/41978934
type: Answer
has comment: http://stackoverflow.com/comment/41977429
has body: This answer appears to address your question. Enable logging from the command line using the flags: --enable-logging --v=1 This logs everything Chrome does internally, but it also logs all the console.log() messages as well. The log file is called chrome_debug.log and is located in the User Data Directory. Filter the log file you get for lines with 'CONSOLE(\d+)'. via Save the console.log in Chrome to a file More here on logging. The Chromium Projects: How to enable logging
answers question: http://stackoverflow.com/q/26689967
score: 0

http://stackoverflow.com/q/26741405
score: 1
has body: If i open one domain chat.example.com in one browser and www.example.com(cross domain) on other browser. is it possible send a message from www.abc.com to chat.abc.com? I tried following: The script on receiver side i.e.www.example.com to receive message as follows: jqcc(document).ready(function() { var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent"; var eventer = window[eventMethod]; var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message"; // Listen to message from child window eventer(messageEvent,function(e) { if(e.data.indexOf("He") &gt;= -1){ console.log("Message Received:"+e.data); } },false); }); When i try sending message from http://chat.example.com as window.postMessage("Hello","http://www.example.com"); I got nothing in the console of browser. Please help
tagged with: postmessage
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26741505
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26741505
has title: sending Messages from one domain to another using postMessage function in javascript
type: AnsweredQuestion

http://stackoverflow.com/comment/106464488
type: Comment
has text: every time it clicked will remove first option, there should be an if block to check if its the option to be removed.
comment on: http://stackoverflow.com/a/26828058
type: AnswerComment
score: 0

ember.js
tags question: http://stackoverflow.com/q/26830327
tags question: http://stackoverflow.com/q/26824974
tags question: http://stackoverflow.com/q/26785038
tags question: http://stackoverflow.com/q/26806067
tags question: http://stackoverflow.com/q/26762759
tags question: http://stackoverflow.com/q/26733688
tags question: http://stackoverflow.com/q/26793012
tags question: http://stackoverflow.com/q/26752133
type: Tag
tags question: http://stackoverflow.com/q/26697956
tag name: ember.js
tags question: http://stackoverflow.com/q/26765541
tags question: http://stackoverflow.com/q/26751795
tags question: http://stackoverflow.com/q/26685719
tags question: http://stackoverflow.com/q/26709925
tags question: http://stackoverflow.com/q/26791780
tags question: http://stackoverflow.com/q/26807318
tags question: http://stackoverflow.com/q/26760386
tags question: http://stackoverflow.com/q/26780344
tags question: http://stackoverflow.com/q/26701436
tags question: http://stackoverflow.com/q/26741569
tags question: http://stackoverflow.com/q/26699954
tags question: http://stackoverflow.com/q/26807489
tags question: http://stackoverflow.com/q/26747762
tags question: http://stackoverflow.com/q/26749284
tags question: http://stackoverflow.com/q/26772554
tags question: http://stackoverflow.com/q/26812630
tags question: http://stackoverflow.com/q/26764769
tags question: http://stackoverflow.com/q/26710635
tags question: http://stackoverflow.com/q/26717903
tags question: http://stackoverflow.com/q/26711948
tags question: http://stackoverflow.com/q/26693242
tags question: http://stackoverflow.com/q/26679004
tags question: http://stackoverflow.com/q/26759931
tags question: http://stackoverflow.com/q/26775656
tags question: http://stackoverflow.com/q/26792117
tags question: http://stackoverflow.com/q/26734115
tags question: http://stackoverflow.com/q/26767674

http://stackoverflow.com/q/26806498
favorite count: 0
type: Question
has body: When using a custom text-selection function in jQuery, my contextMenu event gets disabled. Minimal working example, with javascript and the html file (the amount of javascript is less the it looks): var markFeature = { getSelected: function(){ var t = ''; if(window.getSelection) t = window.getSelection(); else if(document.getSelection) t = document.getSelection(); else if(document.selection) t = document.selection.creatRange().text; return t; }, applyHighlight: function(){ var st = markFeature.getSelected(); if(st!='') { var str1 = ''; var replacement = str1.concat(st,""); var _st = new RegExp(st, "g"); var replaced = $("body").html().replace(_st, replacement); $("body").html(replaced); } }, register_contextMenu: function(){ //markFeature.addCSS(); $.contextMenu({ selector: '*', items: { "item1": {name: "item-1"}, "item2": {name:"item-2"}, } }); }, init: function(){ $(document).bind("mouseup", markFeature.applyHighlight); } }; $(document).ready(markFeature.register_contextMenu); $(document).ready(markFeature.init); Right-Click ME! Please ignore a little bug: sometimes it adds text after a selection. So my problem is: after a selection I am unable to use the contextMenu.
upvote count: 1
has answer: http://stackoverflow.com/a/26810961
answer count: 1
tagged with: contextmenu
has title: Disabled jQuery contextMenu after a mouseup-event
downvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 1
has comment: http://stackoverflow.com/comment/42262050

http://stackoverflow.com/comment/42062494
type: Comment
type: QuestionComment
has text: @SergioTulentsev: Store a (_the_) global variable in a new variable and then use it? What?
comment on: http://stackoverflow.com/q/26738175
score: 0

http://stackoverflow.com/comment/42198754
comment on: http://stackoverflow.com/q/26807100
score: 0
has text: @VahanVardanyan yes, I'm completely sure,since I work with promises and this is part of a huge script. the fetching occurs at the very beginning and It only moves along as soon as it's ready. As you can see in the picture, I can try this on the console and I get the same error, no matter how long I wait.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26680856
has body: You do need a .deleter element a .msgbox element. You can use :checked psedo selector together with .length to check whether any checkbox is checked; delete the row if there is, otherwise output message. $(".deleter").click(function() { $('.msgbox').empty(); $(".table1 td :checked").length ? $(".table1 td :checked").closest('tr').remove() : $(".msgbox").text("There is nothing to delete."); }); Primary Address Construction Town Grade Select All #501 - 2206 Eglinton Avenue, Scarborough, O.N. A1B2C3 Fire Resistive 2 #501 - 2206 Eglinton Avenue, Scarborough, O.N. A1B2C3 Fire Resistive 2 Delete
score: 0
answers question: http://stackoverflow.com/q/26680626
type: Answer

http://stackoverflow.com/q/26727659
has comment: http://stackoverflow.com/comment/42044801
has comment: http://stackoverflow.com/comment/42044611
has comment: http://stackoverflow.com/comment/42043907
type: Question
has comment: http://stackoverflow.com/comment/42043875
has comment: http://stackoverflow.com/comment/42044062
has comment: http://stackoverflow.com/comment/42044822
tagged with: javascript
has body: i am a bit confuse to why the anytimepicker works perfectly on authorized page but not on publicly viewed page i just copied the code from the authorized page to my publicly viewed page the code is below &lt;link href="~/Content/anytime.5.0.5.css" rel="stylesheet" /&gt; &lt;link href="~/Content/bootstrap.css" rel="stylesheet" /&gt; &lt;link href="~/Content/bootstrap-theme.css" rel="stylesheet" /&gt; &lt;script src="~/Scripts/jquery-1.9.1.js"&gt;&lt;/script&gt; &lt;script src="~/Scripts/bootstrap.js"&gt;&lt;/script&gt; &lt;script src="~/Scripts/anytime.5.0.5.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { $(".dates").AnyTime_picker({ format: "%Y-%m-%d", hideInput: false }); }); &lt;/script&gt; and the html inputs where given the class name dates after running the public page the console from google chrome is telling me that there is an error Uncaught TypeError: undefined is not a function i have tried the plugins from bootstrap with the same result i am a bit confuse i had never encountered such error before any help is highly appreciated
score: 0
has comment: http://stackoverflow.com/comment/42080331
tagged with: jquery
has comment: http://stackoverflow.com/comment/42043967
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: anytime picker plugin works only on authorized page
has comment: http://stackoverflow.com/comment/42044685
answer count: 0

http://stackoverflow.com/q/26823172
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
score: -1
has body: I have tried various ways to do that, I am sure there some simple work around...trying to solve it for the last 2 hours still no luck..or errors..:( Here I am creating new form elements with values generated from json and jquery function.. var prevNewWidth = '&lt;input type="hidden" value="' + prevNewWidth + '" name=prevNew /&gt;'; var sliderValue = '&lt;input type="hidden" value="' + sliderValue + '" name="thisNew" /&gt;'; var thisCellId = '&lt;input type="hidden" value="' + item.thisCellId + '" name="thisCellId" /&gt;'; var prevCellId = '&lt;input type="hidden" value="' + item.prevCellId + '" name="prevCellId" /&gt;'; $('#sliderForm').append(prevNewWidth); $('#sliderForm').append(sliderValue); $('#sliderForm').append(thisCellId); $('#sliderForm').append(prevCellId); $('#sliderForm').submit(ajax); This is my ajax function.. function ajax() { $.ajax({ //this is the php file that processes the data and send mail url: "cellWidthUpdate.php", //method type: "POST", //pass the data data: cellNewWidth.serialize(), //success success: function (html) { alert(html); }, error: function(xhr, status, error) { var err = eval("(" + xhr.responseText + ")"); alert(err.Message); } }) };
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/88563370
upvote count: 0
has answer: http://stackoverflow.com/a/26824181
accepted answer: http://stackoverflow.com/a/26824181
downvote count: 1
has title: Trying to auto submit form with jQuery to ajax function failed, with no errors
type: Question

http://stackoverflow.com/q/26809113
has title: Remove duplicate module from browserify bundle
type: Question
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/45002410
tagged with: browserify
downvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/28321210
favorite count: 0
upvote count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44950126
has body: I have a browserify bundle, let's call it core.js, that contains a require('../module-a'); statement. core.js is included on every page on my website. I have a separate bundle that is page-specific, let's call it page.js. Inside page.js, there is a require('../../some/folder/module-a'); statement. As of right now, module-a is duplicated in both core.js and page.js. What I would like is to tell browserify that when page.js is generated, search the core.js bundle for module-a first, and use module-a from that bundle if it exists. What I don't want is to generate a common.js bundle that includes shared code from both core.js and page.js. I want core.js to stay the same, and to simply trim down page.js. I also don't want to have to manually tell the page.js bundle that core.js already contains module-a, I have way too many modules for that to be feasible. I need it to be done programmatically. Is this possible?

http://stackoverflow.com/a/26674032
downvote count: 0
answers question: http://stackoverflow.com/q/26673963
upvote count: 8
type: AcceptedAnswer
score: 8
type: Answer
has body: If you are using a relatively modern browser you can just do this: array.some(function(a) { return a[0] === 'string that you want'; }) or, more compactly: array.some(a =&gt; a[0] === 'string that you want') see Array.some
accepted answer of: http://stackoverflow.com/q/26673963

http://stackoverflow.com/a/26810545
score: 0
has body: Here works well, so try to use like this typeof (answers.QUEST122) == 'undefined' ? answers.QUEST122 = '00' : $scope.answers.QUEST122 = answers.QUEST122.substr(answers.QUEST122.length - 2);
type: Answer
answers question: http://stackoverflow.com/q/26810437

http://stackoverflow.com/a/37871595
type: Answer
has comment: http://stackoverflow.com/comment/65201685
answers question: http://stackoverflow.com/q/26778955
has body: I just stumbled about the same problem and wrote a little Swift (3.0) WKWebView extension for it, thought I might share it: extension WKWebView { func evaluate(script: String, completion: (result: AnyObject?, error: NSError?) -&gt; Void) { var finished = false evaluateJavaScript(script) { (result, error) in if error == nil { if result != nil { completion(result: result, error: nil) } } else { completion(result: nil, error: error) } finished = true } while !finished { RunLoop.current().run(mode: .defaultRunLoopMode, before: Date.distantFuture) } } }
downvote count: 1
has comment: http://stackoverflow.com/comment/87548728
score: 14
upvote count: 15
has comment: http://stackoverflow.com/comment/65201395

http://stackoverflow.com/q/26739266
has answer: http://stackoverflow.com/a/26739389
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26739350
has comment: http://stackoverflow.com/comment/42064538
has body: I've got code that looks like this (I've put the alerts in for testing purposes!): HTML5? Javascript? The first and second alerts fire off. The third doesn't. Am I overlooking something obvious?
has comment: http://stackoverflow.com/comment/42065090
answer count: 2
upvote count: 0
tagged with: javascript
has title: canvas.getContext not doing much
favorite count: 0
score: -2
has comment: http://stackoverflow.com/comment/42064596
has answer: http://stackoverflow.com/a/26739350
downvote count: 2
possible better answer: http://stackoverflow.com/a/26739389

http://stackoverflow.com/comment/41967267
score: 0
type: Comment
type: QuestionComment
has text: I use canvas yes. My objects are 50x50 colored cubes. The elements are spawning outside of the "view". You can scroll down when they spawn under the height.
comment on: http://stackoverflow.com/q/26684390

http://stackoverflow.com/a/26674018
downvote count: 0
answers question: http://stackoverflow.com/q/26673908
score: 1
has body: See this tutorial example http://jvectormap.com/examples/regions-selection/ You should see on regionStyle: { initial: { fill: '#B8E186' }, selected: { // here fill: '#F4A582' } }, onRegionSelected: function(){ if (window.localStorage) { window.localStorage.setItem( 'jvectormap-selected-regions', JSON.stringify(map.getSelectedRegions()) ); } }, Hope it helps you
upvote count: 1
type: Answer

http://stackoverflow.com/a/26792760
answers question: http://stackoverflow.com/q/26792637
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26792637
type: AcceptedAnswer
downvote count: 0
has body: Aha, I figured it out, simply use the function encodeURIComponent(). var a = document.createElement('a'); a.href = 'data:text/vcard,' + encodeURIComponent(out_string); a.target = '_blank'; a.download = 'contact.vcf'; console.log(a.href); document.body.appendChild(a); a.click(); document.body.removeChild(a);
type: Answer

http://stackoverflow.com/q/26761308
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/43342737
has body: how to add a JavaScript file in Ctools modal popup ? I added the js file (datatables.js) in the .tpl.php file but it does not work? The popup does not detect this file? drupal_add_js(drupal_get_path('module', 'my_module') . '/jquery.dataTables.min.js');
type: UnansweredQuestion
has title: Drupal : how to add a JavaScript file in Ctools modal popup
tagged with: drupal-ctools
score: 2
has comment: http://stackoverflow.com/comment/42115389
upvote count: 2
type: Question
tagged with: drupal-7
has answer: http://stackoverflow.com/a/29969445
tagged with: javascript
tagged with: datatables

http://stackoverflow.com/a/26785051
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2
has body: If you don't want any external dependencies, you can use this implementation of extend: function __extends(d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; var a = function(){}; a.prototype = new b(); for (var p in a.prototype) d.prototype[p] = a.prototype[p]; }; Example: var animal = function(){ }; animal.prototype.run = function(){ console.log("running"); }; var feline = function(){ }; feline.prototype.hunt = function(){ console.log("hunting"); }; var cat = function(){ }; __extends(cat, animal); __extends(cat, feline); var scaryCat = new cat(); scaryCat.run(); scaryCat.hunt(); Fiddle: http://jsfiddle.net/apqwf93a/9/
has comment: http://stackoverflow.com/comment/42179787
accepted answer of: http://stackoverflow.com/q/26784204
answers question: http://stackoverflow.com/q/26784204

http://stackoverflow.com/q/26740778
has title: FuelUX - Open datepicker calendar upward
accepted answer: http://stackoverflow.com/a/26767027
type: Question
has body: What is the best way to open the datepicker calendar upwards? The default is to open downwards. I have changed the margin to a negative value on datepicker-calendar-wrapper class and it works fine, but wondering if theres any other way to do this. JSFiddle .datepicker-calendar-open-up { margin: -356px 0 0; }
tagged with: css
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26767027
tagged with: javascript
tagged with: fuelux
type: AnsweredQuestion
tagged with: jquery

http://stackoverflow.com/comment/42009186
has text: @GovindSinghNagarkoti I am going through your answer in http://stackoverflow.com/questions/503093/how-can-i-make-a-redirect-page-in-jquery-javascript/21396837#21396837. That may help!
type: Comment
comment on: http://stackoverflow.com/q/26708473
type: QuestionComment
score: 0

http://stackoverflow.com/a/26708377
score: 4
upvote count: 4
has body: try this Email Us! Even you can add more details like CC,BCC,Subject or Body template, Email Us!
downvote count: 0
has comment: http://stackoverflow.com/comment/42009123
type: Answer
has comment: http://stackoverflow.com/comment/42009172
answers question: http://stackoverflow.com/q/26708013

http://stackoverflow.com/q/26776265
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/4074154
tagged with: architecture
tagged with: module
has body: I struggle to find a statisfying solution on how to expose service instances whose methods need to be accessed through multiple parts of my applications. The situation First things first, by a 'service', I mean an instance of a function that holds properties &amp; methods which are exposed through an API. Consider a REST service whose purpose it is to provide convenient methods to access REST points on a server. I would make the following assumptions on that service: It must be available throughout the application. It is likely that as the app grows, there will be new components that need access. There is no need of multiple instances of this service. We can consider it a singleton. My solutions I can think of 2 possible solutions: Concatenating scripts &amp; utilizing the global object I could combine all my script files (e.g rest.service.js, app.js) into a single file and create an object property on the global object (like App). Then, I could attach service instances to this object. This allows me to do something like this from everywhere within the app: App.restService.get() However, even if I wrap each service in an IIFE, i still have to add some variables on window in order to retrieve instances. Using commonJS / AMD modules I could require() my service instances from everywhere by using require.js / browserify The issues Now I got a headache because on the one hand, people are telling me that polluting the global object is bad practice. Singletons are bad practice also. On the other hand, we make a lot of effort to 'uglify' scripts, each byte saved considered an enhancement. Using browserify would lead to the same script injected in multiple files, though (I'm using web-components, therefore I've got a lot of isolated scripts). Not mentioning the fact that I have no idea on how to provide a state-safe service using browserify. So how should I approach this problem? How should I expose standard services that may or may not be instantiated multiple times? How s…
downvote count: 0
linked to: http://stackoverflow.com/q/8862665
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26967728
linked to: http://stackoverflow.com/q/137975
tagged with: design-patterns
type: Question
score: 3
has answer: http://stackoverflow.com/a/26846984
has title: Managing globally needed services in web applications
upvote count: 3
tagged with: commonjs
answer count: 2

http://stackoverflow.com/q/26726583
tagged with: image
type: Question
answer count: 2
tagged with: canvas
downvote count: 0
has answer: http://stackoverflow.com/a/26726637
tagged with: javascript
tagged with: jquery
has body: I need to upload the image onto the canvas, but the image keeps on coming beside the canvas instead of inside it. I made a code for that to happen but does not work. Thanks in advance. Js: //Link Canvas var canvas = document.getElementById('gameCanvas'); var context = canvas.getContext('2d'); var width = $('#gameCanvas').width(); var height = $('#gameCanvas').height(); //Car Image var car = new Image(); car.src = "http://images.clipartpanda.com/car-top-view-clipart-red-racing-car-top-view-fe3a.png"; //Car x,y Position var x = 220; var y = 200; //Car Speed and angle var speed = 7; var angle = 0; var mod = 0; //Keyboard Listeners window.addEventListener("keydown", keypress_handler, false); window.addEventListener("keyup", keyup_handler, false); var moveInterval = setInterval(function () { draw(); }, 30); //Draw Car function draw() { context.clearRect(0, 0, canvas.width, canvas.height); //Rotate Car When Turning x += (speed * mod) * Math.cos(Math.PI / 180 * angle); y += (speed * mod) * Math.sin(Math.PI / 180 * angle); context.save(); context.translate(x, y); context.rotate(Math.PI / 180 * angle); context.drawImage(car, -(car.width / 2), -(car.height / 2)); context.restore(); } //Keyboard Function function keyup_handler(event) { console.log('a'); if (event.keyCode == 38 || event.keyCode == 40) { mod = 0; } } //Keyboard keys to operate car function keypress_handler(event) { console.log(event.keyCode); if (event.keyCode == 38) { //Up arrow mod = 1; } if (event.keyCode == 40) { //Down arrow mod = -1; } if (event.keyCode == 37) { //Left Arrow angle -= 5; } if (event.keyCode == 39) { //Right Arrow angle += 5; } } function update() { window.requestAnimationFrame(update); x += speed; y += speed; if (x &gt;= $('#gameCanvas')){ speed = 0; } if (y &gt;= $('#gameCanvas')){ speed = -1.0 * speed; speed = 0; } } Code That does not work: var URL = [ "http://thumb101.shutterstock.com/display_pic_with_logo/69386/69386,1162932792,3/stock-photo-lone-car-in-four-lanes-from-above-2128171.jp…
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26726706
type: UnansweredQuestion
upvote count: 1
has title: Get the image onto the canvas

http://stackoverflow.com/a/26696756
type: Answer
has body: You need to place the quantifier within the capturing parentheses: url[i].match(/\/(\w*)\//) which will give you ["/subject/", "subject"] and ["/book/", "book"]. The first element of the list of matches always contains the entire match. If you repeat the capturing group itself, only the last repetition's match will be stored in the group's backreference.
answers question: http://stackoverflow.com/q/26696738
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/comment/51744264
type: Comment
comment on: http://stackoverflow.com/a/26832685
has text: How do we find the index of the items inside the row?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42016074
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26712431
has text: It returns an empty string @user3801433

http://stackoverflow.com/comment/42164761
comment on: http://stackoverflow.com/q/26795140
has text: can you use ng-class?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42152432
has text: History API isn't very old, so it has old browser compatibility issues. IF you are creating a global site, keep that in mind.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26787952
score: 1

http://stackoverflow.com/a/26780405
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26780268
type: Answer
has comment: http://stackoverflow.com/comment/42138790
accepted answer of: http://stackoverflow.com/q/26780268
upvote count: 2
has body: '?no, special-characters!'.replace(/[^\w,]/g, '') // =&gt; "no,specialcharacters" [^\w,] will match match non-alphabet, non-digit, non-underscore character excluding a comma.
score: 2

app-store
tag name: app-store
type: Tag
tags question: http://stackoverflow.com/q/26767450

http://stackoverflow.com/q/26713332
has title: Create new object by using namespace
has body: I have a very strange problem to instantiate an object by using namespace. If I try to do this, it will not work : this.myView = new this.getApp().Views.SubView({ // it doesn't work initialize: function () { console.log('bouh'); } }); But, If I try to do that, it will work : this.myView = new (this.getApp().Views).SubView({ // it works initialize: function () { console.log('bouh'); } }); You can see an example here : http://jsfiddle.net/queval_j/a0yr41mn/ This kind of code has been working previously, and since the last week. I have to update my code because of this new behavior.. So, is it a problem from the JS Compiler or have I been lucky since a while ?
type: AnsweredQuestion
type: Question
tagged with: javascript
score: 0
answer count: 1
tagged with: backbone.js
has answer: http://stackoverflow.com/a/26714027
accepted answer: http://stackoverflow.com/a/26714027

http://stackoverflow.com/comment/42016304
comment on: http://stackoverflow.com/q/26712626
score: 4
type: QuestionComment
type: Comment
has text: Because you are terminating your function with `return false` before any other actions occurred.

c#
tags question: http://stackoverflow.com/q/26700318
tags question: http://stackoverflow.com/q/26793042
tags question: http://stackoverflow.com/q/26751679
tags question: http://stackoverflow.com/q/26804730
tags question: http://stackoverflow.com/q/26719755
tags question: http://stackoverflow.com/q/26803357
tags question: http://stackoverflow.com/q/26740299
tags question: http://stackoverflow.com/q/26756938
tags question: http://stackoverflow.com/q/26826989
tags question: http://stackoverflow.com/q/26714687
tags question: http://stackoverflow.com/q/26785942
tags question: http://stackoverflow.com/q/26793997
tags question: http://stackoverflow.com/q/26814343
tags question: http://stackoverflow.com/q/26805338
tags question: http://stackoverflow.com/q/26686040
tags question: http://stackoverflow.com/q/26768349
tags question: http://stackoverflow.com/q/26801799
tags question: http://stackoverflow.com/q/26756800
tag name: c#
tags question: http://stackoverflow.com/q/26782563
tags question: http://stackoverflow.com/q/26708013
tags question: http://stackoverflow.com/q/26764324
tags question: http://stackoverflow.com/q/26788679
tags question: http://stackoverflow.com/q/26820115
tags question: http://stackoverflow.com/q/26751040
tags question: http://stackoverflow.com/q/26691866
tags question: http://stackoverflow.com/q/26816579
tags question: http://stackoverflow.com/q/26704563
tags question: http://stackoverflow.com/q/26685241
tags question: http://stackoverflow.com/q/26802624
tags question: http://stackoverflow.com/q/26754033
tags question: http://stackoverflow.com/q/26799342
tags question: http://stackoverflow.com/q/26716011
tags question: http://stackoverflow.com/q/26807330
tags question: http://stackoverflow.com/q/26794518
tags question: http://stackoverflow.com/q/26730845
tags question: http://stackoverflow.com/q/26748068
tags question: http://stackoverflow.com/q/26816177
tags question: http://stackoverflow.com/q/26762939
tags question: http://stackoverflow.com/q/26758565
tags question: http://stackoverflow.com/q/26738822
tags question: http://stackoverflow.com/q/26714523
tags question: http://stackoverflow.com/q/26817505
tags question: http://stackoverflow.com/q/26727989
tags question: http://stackoverflow.com/q/26761878
tags question: http://stackoverflow.com/q/26800389
tags question: http://stackoverflow.com/q/26752344
tags question: http://stackoverflow.com/q/26754505
tags question: http://stackoverflow.com/q/26673726
tags question: http://stackoverflow.com/q/26706196
tags question: http://stackoverflow.com/q/26770119
tags question: http://stackoverflow.com/q/26762491
tags question: http://stackoverflow.com/q/26691114
tags question: http://stackoverflow.com/q/26796519
tags question: http://stackoverflow.com/q/26761129
tags question: http://stackoverflow.com/q/26737826
tags question: http://stackoverflow.com/q/26814577
tags question: http://stackoverflow.com/q/26773694
tags question: http://stackoverflow.com/q/26801933
tags question: http://stackoverflow.com/q/26716274
type: Tag
tags question: http://stackoverflow.com/q/26805160
tags question: http://stackoverflow.com/q/26780431
tags question: http://stackoverflow.com/q/26674855
tags question: http://stackoverflow.com/q/26730565
tags question: http://stackoverflow.com/q/26744345
tags question: http://stackoverflow.com/q/26806901
tags question: http://stackoverflow.com/q/26718805
tags question: http://stackoverflow.com/q/26784634
tags question: http://stackoverflow.com/q/26693360
tags question: http://stackoverflow.com/q/26819631
tags question: http://stackoverflow.com/q/26824791
tags question: http://stackoverflow.com/q/26823542
tags question: http://stackoverflow.com/q/26762265
tags question: http://stackoverflow.com/q/26788993
tags question: http://stackoverflow.com/q/26740671
tags question: http://stackoverflow.com/q/26702204
tags question: http://stackoverflow.com/q/26762094
tags question: http://stackoverflow.com/q/26723887
tags question: http://stackoverflow.com/q/26815104

acrobat
type: Tag
tags question: http://stackoverflow.com/q/26778052
tags question: http://stackoverflow.com/q/26764842
tag name: acrobat
tags question: http://stackoverflow.com/q/26724122

http://stackoverflow.com/q/26811224
upvote count: 0
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26811261
favorite count: 0
has answer: http://stackoverflow.com/a/26811261
has title: Why can't a change the image's src attribute?
has comment: http://stackoverflow.com/comment/42195025
type: AnsweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/26811297
type: Question
has comment: http://stackoverflow.com/comment/42195036
score: -2
accepted answer: http://stackoverflow.com/a/26811297
tagged with: javascript
has body: The code in question. $( ".icon-image" )[index].attr('src', '/folder/newimage.jpg'); If I try to use .attr() like above it's undefined. $( ".icon-image" ).attr('src', '/folder/newimage.jpg'); However, if I do that it changes all the img tags/class name to the same image. Which I do not want. I only want to change the the image one at a time, when I decide, while I loop through with the index. Why can't this simple functionality, where I decide which element of the array should change, can not be achieved?
answer count: 2
has comment: http://stackoverflow.com/comment/42194909

http://stackoverflow.com/comment/41979302
score: 0
type: QuestionComment
has text: @self `'hello' + 'world'` Concatenation worked, thanks!
type: Comment
comment on: http://stackoverflow.com/q/26691600

http://stackoverflow.com/a/26788717
upvote count: 7
downvote count: 0
answers question: http://stackoverflow.com/q/26788689
type: Answer
score: 7
has body: You need to use the this keyword, and to do that you need to use find()? $(document).ready(function() { $('.project').hover( function () { $(this).find('p').css({"visibility":"visible"}); }, function () { $(this).find('p').css({"visibility":"hidden"}); } ); }); Here's another way to do it $('.project').on('mouseenter mouseleave', function(e) { $('p', this).css('visibility', e.type == 'mouseenter' ? 'visible' : 'hidden'); });

http://stackoverflow.com/q/26754260
type: Question
tagged with: javascript
has body: I have following code var Index = function( columns ) { this.columns = columns; }; Index.prototype = { indexes: [], push: function( object ) { this.indexes.push(object); }, compare: function( object1, object2 ) { var compareVal = -1; for( var i = 0; i &lt; this.columns.length ; i++ ) { compareVal = object1[this.columns[i]].localeCompare(object2[this.columns[i]]); if( compareVal != 0 ) return compareVal; } return compareVal; }, rebuildIndexes : function() { this.indexes.sort(this.compare); }, }; var testIndex = new Index( [ 'type', 'name', 'id' ] ); testIndex.push({ "id": "123", "name": "Name 1", "type": "4" } ); testIndex.push({ "id": "34", "name": "Name 3", "type": "3" } ); testIndex.push({ "id": "13", "name": "Name 2", "type": "2" } ); testIndex.push({ "id": "73", "name": "Name 4", "type": "2" } ); testIndex.rebuildIndexes(); var text = ""; for(var i=0; i&lt;testIndex.indexes.length;i++) { text += testIndex.indexes[i]['type'] + ", "; } $('body').html(text); But this code is not working. The compare function does not see this of the Index prototype, and says it is undefined. How can I access outer this in sort function in prototype. Here is the JSFiddle Link.
has comment: http://stackoverflow.com/comment/42102480
score: 0
has comment: http://stackoverflow.com/comment/42091680
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/16063394
has comment: http://stackoverflow.com/comment/42091618
has title: access outer “this” in Javascript sort method in prototype
answer count: 0
has comment: http://stackoverflow.com/comment/42091484

http://stackoverflow.com/q/26764192
downvote count: 0
type: Question
tagged with: javascript
tagged with: ajax
upvote count: 2
answer count: 2
has body: Here it is, I'm writing the new version of an AJAX library based on promises with XHR2 support (https://github.com/pyrsmk/qwest). I'm currently writing the unit tests and 95% of the library is now robust. Anyway, I need to verify that we can successfully retrieve an ArrayBuffer (XHR2 supports 'arraybuffer' response type) but how can I generate this ArrayBuffer with PHP? What protocol do I use? Base64? I really have no idea how I should handle the whole thing... EDIT : it seems that when I send an ArrayBuffer to PHP, the data is handled directly by the $_POST variable
possible better answer: http://stackoverflow.com/a/46996512
has answer: http://stackoverflow.com/a/26766327
accepted answer: http://stackoverflow.com/a/26766327
has answer: http://stackoverflow.com/a/46996512
favorite count: 0
tagged with: arraybuffer
tagged with: xmlhttprequest
tagged with: php
type: AnsweredQuestion
score: 2
has title: Sending an ArrayBuffer in PHP through JavaScript XHR2 object

http://stackoverflow.com/comment/42098812
type: QuestionComment
type: Comment
score: 1
has text: please add the relevant code that would allow this problem to be reproduced
comment on: http://stackoverflow.com/q/26758504

http://stackoverflow.com/a/26799004
score: 5
has comment: http://stackoverflow.com/comment/101666887
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/98748294
has comment: http://stackoverflow.com/comment/59023768
type: Answer
has body: f:convertNumber is a server-side conversion. The event of incrementing and decrementing the value is JavaScript, the f:convertNumber won't be taken into consideration until the value goes back to server, therefore an ugly JavaScript solution should be done. I have created a patch for this problem and I used Number.prototype.toLocaleString() to convert the number into a localized version. All you have to do is include pf.spinner.local.fix.js and set your preferred locale in the following way (in document.ready): PF('spinnerWidgetVarName').cfg['local'] = 'de-DE'; There are a couple of notes to be taken: Number.prototype.toLocaleString() This patch is tested and confirmed on PrimeFaces 5.0 and 4.0 Here's a small example on github and a Demo
has comment: http://stackoverflow.com/comment/42211948
accepted answer of: http://stackoverflow.com/q/26795175
upvote count: 5
has comment: http://stackoverflow.com/comment/42192299
answers question: http://stackoverflow.com/q/26795175

http://stackoverflow.com/q/26698758
answer count: 2
tagged with: mobile
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41991769
score: 0
has comment: http://stackoverflow.com/comment/41991633
has answer: http://stackoverflow.com/a/26699033
has answer: http://stackoverflow.com/a/43253570
has comment: http://stackoverflow.com/comment/41991955
type: UnansweredQuestion
has title: "click" doesn't work on mobile
linked to: http://stackoverflow.com/q/22015908
has body: This is the javascript I use for my burger navigation. My code works perfectly on Chrome, but it doesn't works on my iPhone. I think it has to do with the "click" but i'm not sure. I tried using "touchend" instead of click but that doesn't work either. This is my code: onload = function() { var hetMenu = document.querySelector("body &gt; header nav"); hetMenu.addEventListener("click", menuToggle); } function menuToggle() { var deBody = document.querySelector("body"); deBody.classList.toggle("navigatie"); console.log(deBody.classList); }
type: Question

http://stackoverflow.com/a/27035505
type: Answer
answers question: http://stackoverflow.com/q/26735267
accepted answer of: http://stackoverflow.com/q/26735267
type: AcceptedAnswer
has body: I assue your queries are executed massively in parallel, make sure to have a unique constraint for : nodes_type1(id) and nodes_type2(id) installed, otherwise MERGE cannot guarantee uniqueness. Also you should change your query to use parameters instead of literal values And it should also look like this: MERGE (n:nodes_type1 {id:{id1}}) ON CREATE SET n.att3={att3},n.count=1 ON MATCH SET n.count = n.count +1 MERGE (m:nodes_type2 {id:{id2}}) ON CREATE SET m.att5={att5}, m.att6={att6},m.count=1 ON MATCH SET m.count = m.count +1 MERGE (n)-[x:relation_type {id:{id3}} ]-&gt;(m) ON CREATE SET x.att8={att8},x.count=1 ON MATCH SET x.count = x.count+1 return n,r,m I don't think the id and counter on the relationship make sense in a real use-case but for your test it might be ok
score: 0

http://stackoverflow.com/q/26713641
has answer: http://stackoverflow.com/a/26713726
possible better answer: http://stackoverflow.com/a/26713729
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26713729
has title: How to load the content of <h> element using jquery
has answer: http://stackoverflow.com/a/26713761
has comment: http://stackoverflow.com/comment/42017980
has comment: http://stackoverflow.com/comment/42017977
has answer: http://stackoverflow.com/a/26713739
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26713726
has comment: http://stackoverflow.com/comment/42018062
answer count: 5
tagged with: http://stackoverflow.com/tag/html
has body: I have a tag like: Mobile I want to display the text of h3 ie "Mobile" in edit click button (on alert). $(".attEditCategory").button().on("click", function (event) {}); Please help.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42018042
has answer: http://stackoverflow.com/a/26713737
downvote count: 2
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42017946

http://stackoverflow.com/comment/41987213
type: AnswerComment
type: Comment
has text: Thank you for the complete answer. I'm accepting as the right one.
comment on: http://stackoverflow.com/a/26686789
score: 0

http://stackoverflow.com/a/26830222
score: 6
accepted answer of: http://stackoverflow.com/q/26802199
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You have an issue with your events array, specifically with those that don't appear on the popover (1 Day event 1 and 1 Day Event 2). By the description you have, I'm assuming these will be all day events. If this is the case, you should define the events in the following manner (remove the end option and add allDay: true): { title: '1 Day event 1', allDay: true, start: '2014-11-12' }, { title: '1 Day Event 2', allDay: true, start: '2014-11-12' }, If the events aren't supposed to be all day, then you must define the time part, as such: { title: '1 Day event 1', start: '2014-11-12T12:00:00', end: '2014-11-12T16:00:00' }, { title: '1 Day Event 2', start: '2014-11-12T18:00:00', end: '2014-11-12T20:00:00' }, Check this jsfiddle, where I've changed those events with the options I'm presenting here.
answers question: http://stackoverflow.com/q/26802199
upvote count: 6

http://stackoverflow.com/q/26792605
tagged with: vb.net
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/26796467
accepted answer: http://stackoverflow.com/a/26796467
type: Question
has body: Here is my problem. I'm storing in a hidden field URL on the server side and when the user clicks on a button I'm reading the URL and opening up a pop up window. That thing is the string coming up. URL(whatever) How do I get rid of the "URL()" and only get what's inside of the string? Example: url(https://www.test.com/cgis/CGT/Reports/CGT_ID_Badge.asp?PersonID=2749) Here is my code: Dim URL As String = Nothing URL = String.Format("url(https://www.test.com/cgis/{0}/Reports/CGT_ID_Badge.asp?PersonID={1})", m_User.CompanyCode, m_PersonID) hfShipping.Value = URL JavaScript: function PrintingReady(sender, args) { var test = document.getElementById("&lt;%=hfShipping.ClientID%&gt;").value $("#divLoadingMessage").css("display", "block"); var TryUrl = test; printform(TryUrl); // Opening up a popup window with the URL //__doPostBack("&lt;%=btnPrintIDBadge.UniqueID %&gt;", ""); } This is what I'm getting: url(https://www.test.com/cgis/CGT/Reports/CGT_ID_Badge.asp?PersonID=2749) How can I fix it?
tagged with: javascript
has comment: http://stackoverflow.com/comment/42160593
score: -1
answer count: 2
downvote count: 1
has title: Get only what inside of the String.Format
tagged with: url
tagged with: asp.net
favorite count: 0
possible better answer: http://stackoverflow.com/a/26792765
has answer: http://stackoverflow.com/a/26792765

http://stackoverflow.com/q/26795344
has answer: http://stackoverflow.com/a/26795444
type: AnsweredQuestion
has body: If I had defined a bunch of routes and wanted to get the total number of routes setup at any point, how would I do this? I cannot put a counter inside each route as they are spread out though-out the application. I am looking to do this via the Express.js API. I have had a look though the documentation but was unable to find anything.
accepted answer: http://stackoverflow.com/a/26795444
type: Question
answer count: 1
tagged with: javascript
tagged with: express
score: 0
has title: Express.js - How can I get the number of defined routes?

http://stackoverflow.com/comment/42048130
has text: That will create 4 todos, I just want todo one item and moreover I wanted to understand how can closures solve this problem in angularjs
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26730187
type: AnswerComment

http://stackoverflow.com/q/26755989
has comment: http://stackoverflow.com/comment/42094133
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42094335
has body: I have a image upload button on my page and the area to preview those images. I just want to change the way of displaying those images. Currently I have like this - Where as I want to preview in this way - Bit of explanation - When user uploads an image, uploaded image should replace the upload button div and button box will shift to right. When user uploads next image, same process would be repeated. Upload button box will keep on shifting to right the image will take its place. for (var i=1; i&lt;obj.image.length; i++) { var img_div_pre = document.createElement("div"); img_div_pre.className = "col-md-4 col-lg-4 col-sm-6 clearfix pre_uploaded-img-wrapper"; img_div_pre.id = "pre_uploaded-img-wrapper" +obj.image[i].image_id; img_div_pre.innerHTML = "&lt;a href='"+obj.image[i].url+"' target='_blank'&gt;&lt;img class='dl-new-iamges img-responsive' id='"+obj.image[i].image_id+"' src='"+obj.image[i].url+"' /&gt;&lt;/a&gt;"; img_div_pre.appendChild(pre_innerDiv); pre_uploaded_img_parent.appendChild(img_div_pre); } Here, I am getting img source and id in an object(obj) from the server through Ajax. Selected image first going to server and in response obj is returned. Thanks.
has title: Change the position of a div dynamically
type: Question
has comment: http://stackoverflow.com/comment/42094325
has comment: http://stackoverflow.com/comment/42094531
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42094138
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26756511
tagged with: css

http://stackoverflow.com/q/26761808
has body: I have this URL: http://website.com/wp-content/uploads/2014/11/this-is-an-image_0120(pp_w820_h548).jpg I want delete a parameter from the URL to look like this: http://website.com/wp-content/uploads/2014/11/this-is-an-image_0120.jpg How is it possible with Greasemonkey? var links = document.getElementsByTagName("a"); for(var i = 0, l = links.length; i &lt; l; i++) { var elements = links[i]; elements.innerHTML = document.body.innerHTML.replace(/(pp_w820_h548)/gi, ''); } I want also the width and height numbers will be unknown variables. Sometimes the images are png, so deleting everything after the (, and adding ".jpg" again to the end not the best solution. SORRY! I meant for targeting img element, not the a. So this is an image, not a link. Also pp need to be in there, because I only want to remove on the prophoto WP blogs. So, this is it: var links = document.getElementsByTagName("img"); for(var i = 0, l = links.length; i &lt; l; i++) { var images = links[i]; images.src= images.src.replace(/\(pp_w\d+_h\d+\)/gi, ''); } UPDATE The script only works with images which is near to viewport. Lazyloaded elements on the page still using the plus strings in url. Is it possible with Greasemonkey to phisically change the HTML, not just in DOM?
score: 2
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/42296493
tagged with: wordpress
possible better answer: http://stackoverflow.com/a/26762086
type: Question
answer count: 2
tagged with: greasemonkey
has comment: http://stackoverflow.com/comment/42104951
tagged with: javascript
has answer: http://stackoverflow.com/a/26761925
has title: Greasemonkey script to remove parameters from URL
accepted answer: http://stackoverflow.com/a/26761925
upvote count: 2
has answer: http://stackoverflow.com/a/26762086
favorite count: 0

http://stackoverflow.com/a/26698737
answers question: http://stackoverflow.com/q/26692934
has body: If you bind it to organistion().name() then knockout works in "normal js expression" mode and two-way bindings won't work. I don't realy know breeze, but it looks like your "name" observable is a property of an object which is a value of your "organization" observable. Try binding first to the outer with an "with" binding, and then to the inner one. Like this: &lt;!-- ko with:organization --&gt; &lt;input data-bind="value:name"&gt;&lt;/input&gt; &lt;!-- /ko --&gt;
downvote count: 0
type: Answer
upvote count: 3
score: 3

http://stackoverflow.com/q/26762094
has answer: http://stackoverflow.com/a/26762233
tagged with: jquery
has body: I have an issue with frameset. I have a web application hosted in my site by a third party vendor.Unfortunately I don't have access to the code behind and I am trying to do it in .aspx page using Jquery. I need to change the classname of a 'td' with in a frame with in a frameset. I tried it like this var doc = $("frame[name='frameTop']", top.document); var _div = emrdoc.getElementById('elementID'); _div.className = "Newclassname"; Can anyone help me on this? regards, Sivajith
tagged with: asp.net
type: Question
tagged with: css
score: 0
has title: Failed to Change css class inside frameset Asp.net c#
answer count: 1
tagged with: c#
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/42076026
comment on: http://stackoverflow.com/q/26744941
has text: Try using `&times;` (the character entity reference) instead of the character itself.
type: Comment
type: QuestionComment
score: 3

http://stackoverflow.com/q/26734578
answer count: 4
linked to: http://stackoverflow.com/q/9234051
possible better answer: http://stackoverflow.com/a/26736408
accepted answer: http://stackoverflow.com/a/26736401
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/26736408
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/52850010
score: 4
has title: Can javascript listen for the result of a confirm dialogue from a separate method?
upvote count: 4
downvote count: 0
tagged with: javascript
has body: I know that the usual JS way of taking an action only if a confirmation dialog is to have the confirmation inside the function, like this jQuery example: &lt;script type="text/javascript"&gt; $(function () { $("#dropdown").change(function () { var success = confirm('Are you sure want to change the Dropdown ????'); if (success == true) { // do something } else { // Cancel the change event and keep the selected element } }); }); &lt;/script&gt; This doesn't work in my case, because the confirmation is part of a Rails helper: &lt;%= link_to "Delete", {:controller =&gt; 'foo', :action =&gt; 'delete', :id =&gt; @item.id}, {:method =&gt; :post, :confirm =&gt; "Are you sure?", :class =&gt; "start_spinner"} %&gt; I want to run some javascript on click (hide the link to prevent clicking twice), but only if the confirmation is true. Unfortunately, at least in Rails 2.3.x, it's not possible to use :onclick when the :method or :confirm options are present. (This behavior is noted on ApiDock for the link_to helper and is the same in my application.) EDIT: I think I created some confusion by including the example from ApiDock instead of my exact code. Sorry about that. I've modified the code below to reflect the behavior that Rails has when the :method =&gt; :post option is included, as it must be in my code. The difference between the two outputs is still just dropping the destroyJsFunction method, but there's a whole bunch of other stuff that does happen in the onclick that seems to interfere with implementing the solutions suggested by Sukima and agnoster. &lt;%= link_to "Delete", {:controller =&gt; 'foo', :action =&gt; 'delete', :id =&gt; @item.id}, :method =&gt; :post, :confirm=&gt;"Are you sure?", :onclick=&gt;"destroyJsFunction()", :class =&gt; "start_spinner" %&gt; # expected output # =&gt; &lt;a href="/foo/delete/1" class='start_spinner' onclick="if (confirm('Are you sure?')) { var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(…
has answer: http://stackoverflow.com/a/26736401
favorite count: 0
has answer: http://stackoverflow.com/a/47490500

http://stackoverflow.com/q/26716923
has title: jquery - xeditable select source using function, using deffered and local storage (indexedDB)
downvote count: 0
possible better answer: http://stackoverflow.com/a/26726064
favorite count: 0
has answer: http://stackoverflow.com/a/26726064
upvote count: 2
tagged with: local-storage
accepted answer: http://stackoverflow.com/a/26740566
score: 2
type: AnsweredQuestion
has body: I am working on a web app for the company that I work for and I have a problem with a form that is required. I'm having a bit of trouble populating a select list with data from a different function using xeditable. The problem is the code that is being executed to populate the select box doesn't wait for the other function to get data from local storage and return it, even though I am using deffered, (I'm not sure if I am using the deffered/resolve functionality correctly). This is the code that I have: 3609 jquery: function popSelectBox(PID) { var rtn = []; $.indexedDB('testDatabase').objectStore('Lookup').index('PID').each(function (i) { var source = {}; source.value = i.value.ID; source.text = i.value.Name; rtn.push(source); }, PID).done(function (r, e) { console.log(rtn); console.log('popSelectBox function (I expect to see this first) - This section should complete before the makeEditable function'); return rtn; }); } function makeEditable() { $('.editable').editable({ validate: function (value) { if ($.trim(value) === '') { return 'This field is required'; } return false; }, success: function (response, newValue) { console.log($(this).data('pk'), newValue); //$(this).parent().css('background-color', 'green'); }, /**** this is the problem section of this function ****/ source: function () { //if the type is a select list then we need to populate it, this is done here if ($(this).data('type') === 'select') { var d = $.Deferred(); $.when(d).done(function (v) { console.log(v); return v; }); d.resolve(popSelectBox($(this).data('pid').toString())); console.log('makeEditable function (I expect to see this last) - This section should wait for the popSelectBox function to finish'); } } }); } I also have a fiddle here http://jsfiddle.net/f8otrayn/3/ that shows the above. Included in this fiddle is an example local storage set up that I am using, the functions to set this up are present, however I have commented out the function call, you can check the code and uncomment …
type: Question
tagged with: jquery-deferred
tagged with: x-editable
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26740566
answer count: 2

http://stackoverflow.com/comment/42060324
has text: @jAndy—the result of [*localCompare*](http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.9) is implementation dependent, I don't know how it works internally. However, `return a.date.localeCompare(b.date);` seems to work.
type: AnswerComment
comment on: http://stackoverflow.com/a/26735940
score: 0
type: Comment

http://stackoverflow.com/comment/42262694
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26820912
has text: Hi Shamun, I have edited the original post as you suggested. Thanks
type: AnswerComment

http://stackoverflow.com/comment/42197850
type: Comment
type: QuestionComment
has text: @wjohnsto sorry just miss type the n.
comment on: http://stackoverflow.com/q/26812850
score: 0

http://stackoverflow.com/q/26747251
has title: Is there any difference in these two ways of creating object methods?
score: 0
linked to: http://stackoverflow.com/q/310870
duplicate of: http://stackoverflow.com/q/310870
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has body: Is there any difference in the way these two objects create their methods? Are there performance differences? What's the difference here, if any? Method 1: var Point = function(x, y, z) { this.x = x; this.y = y; this.z = z; this.add = function(point) { this.x += point.x; this.y += point.y; this.z += point.z; }; this.sub = function(point) { this.x -= point.x; this.y -= point.y; this.z -= point.z; }; }; Method 2: var Point = function(x, y, z) { this.x = x; this.y = y; this.z = z; }; Point.prototype.add = function(point) { this.x += point.x; this.y += point.y; this.z += point.z; }; Point.prototype.sub = function(point) { this.x -= point.x; this.y -= point.y; this.z -= point.z; };
type: Question
has comment: http://stackoverflow.com/comment/42079481
has comment: http://stackoverflow.com/comment/42079513
tagged with: javascript

http://stackoverflow.com/q/26750566
favorite count: 0
has comment: http://stackoverflow.com/comment/42085036
has title: ZeroClipboard not working , not copying
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/12401524
downvote count: 1
has answer: http://stackoverflow.com/a/26750724
has body: I have here a simple copy link code, &lt;a class="sharelink-copy-link" data-clipboard-text="&lt;?php echo $sharelink; ?&gt;" href="javascript::void(0)"&gt; Copy link&lt;/a&gt; The Function I used to copy: &lt;script&gt; try{jQuery.noConflict();}catch(e){}; jQuery(function(){ var client = new ZeroClipboard( document.getElementsByClassName("sharelink-copy-link"),{ moviePath: "&lt;?php echo JURI::root(); ?&gt;components/com_brandize/assets/js/ZeroClipboard.swf" } ); client.addEventListener('complete',function(client,text) { alert('copied!'); }); }) &lt;/script&gt; This code works for both Google Chrome and Internet Explorer, but when it comes to firefox, See Image attached;
duplicate of: http://stackoverflow.com/q/12401524
score: -1
has comment: http://stackoverflow.com/comment/42085012
type: Question
has comment: http://stackoverflow.com/comment/42085298
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26723104
type: UnansweredQuestion
has title: jquery Waterfall plugin's wait until images load not working
linked to: http://stackoverflow.com/q/23437679
tagged with: waterfall
tagged with: knockout.js
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has body: I am using the waterfall plugin for jQuery on my site. I am using jQuery 1.9.1 and I am using Knockout.js for my js viewmodel. The data is from a ajax call to a web api service that return JSON objects to the knockout viewmodel. The images are all blobs inside an azure storage container. Waterfall plugin home I initialize the plugin in the following way as the OP indicates in this SO question: $(window).load(function () { // apply jQuery Waterfall plugin $("#ProductList").waterfall({ colMinWidth: 230, defaultContainerWidth: 970, autoresize: true }); $('#ProductList').load(function () { $("#ProductList").waterfall('reflow'); }) }); I use the window.load function because as I understand, it waits for all Dom elements to load. PROBLEM: But when a site loads for the first time, with no cache, the waterfall plugin does not render properly (as in the object sizes are not applied to the page so they overlap and the page height is too short for all the page objects). But if I refresh the page the waterfall plugin renders properly every page request after the first page load. I also tried placing this waterfall initialization in the following page function: $(document).ready(function () }); But the same problem exists. Google chrome dev tools is not showing any js errors on the page. QUESTION Can someone help me get this waterfall plugin to fire after all imgaes have loaded. Thanks in advance. Further Detail: Here is my knockout.js HTML template: <%-- BANNER PANEL-------------------------------------------------------------------------------------------------- --%> <%-- IMAGE PANEL-------------------------------------------------------------------------------------------------- --%> <%-- TITLE PANEL-------------------------------------------------------------------------------------------------- --%> <%-- PRICE PANEL-------------------------------------------------------------------------------------------------- --%> <%-- CART PANEL------------------------------------------…
has answer: http://stackoverflow.com/a/31151742
answer count: 1
tagged with: ajax

http://stackoverflow.com/q/26798251
has comment: http://stackoverflow.com/comment/42170565
tagged with: javascript
has comment: http://stackoverflow.com/comment/42170627
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42170698
has title: Express route with dynamic arguments in the URL
has answer: http://stackoverflow.com/a/26798367
tagged with: express
type: Question
has comment: http://stackoverflow.com/comment/42170544
tagged with: node.js
has body: first of all i am a very beginner of Node so my question gonna be surely basic. So, i learn Node with a website and i am blocked on a one Express exercice. I need to create a route that accepts dynamic arguments in the URL path and responds with quote (object see after in code) from the proper author. The js is like follows : var express = require('express'); var app = express(); var quotes = { 'einstein': 'Life is like riding a bicycle. To keep your balance you must keep moving', 'berners-lee': 'The Web does not just connect machines, it connects people', 'crockford': 'The good thing about reinventing the wheel is that you can get a round one', 'hofstadter': 'Which statement seems more true: (1) I have a brain. (2) I am a brain.' }; app.get('/quotes/:name', function(request, response){ response.send(request.params.name); /*And i'm blocked here*/ }); app.listen(8080);
score: 0
has comment: http://stackoverflow.com/comment/42170507
accepted answer: http://stackoverflow.com/a/26798367
answer count: 1

http://stackoverflow.com/comment/42016341
score: 2
has text: I don't think that table is the way to go.
comment on: http://stackoverflow.com/q/26712593
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42186603
type: AnswerComment
has text: That's a better approach of how to set the class
type: Comment
comment on: http://stackoverflow.com/a/26793472
score: 0

http://stackoverflow.com/comment/42134325
score: 0
type: Comment
type: QuestionComment
has text: So if twice becomes the inner function, what happens to the factor variable? Is it stored in memory or something? This could be obvious, but not to me...
comment on: http://stackoverflow.com/q/26777982

http://stackoverflow.com/a/26762030
upvote count: 0
has body: For my like button function, which is triggered in the event has as "click selector": "like", I have come up with the following. However this only works once. So when I click the button the first time it adds the class liked and removes the class unliked, which is the default for the html element. Then when it is clicked again, it removes the liked class and adds the unliked class. So far it works as desired. The problem is when I try to click it again, to like it again, and nothing happens. It doesn't call the like function anymore and the class remains the unliked. What is causing this problem and how can I fix it? like: function () { if (this.butn.hasClass("liked")) { this.unlike(); } else if (this.butn.hasClass("unliked")) { this.controller(); console.log("Like clicked"); } }, controller: function () { this.butn.removeClass("unliked"); this.butn.addClass("liked"); this.sPolyFill.animate({ transform: 't9,0' }, 300, mina.easeinout); this.sPolyEmpty.animate({ transform: 't-9,0' }, 300, mina.easeinout); }, unlike: function () { this.butn.removeClass('liked'); this.butn.addClass("unLiked"); this.sPolyFill.animate({ transform: 't0,0'}, 300, mina.easeinout); this.sPolyEmpty.animate({ transform: 't0,0' }, 300, mina.easeinout); console.log("Unliked"); }
type: Answer
downvote count: 1
answers question: http://stackoverflow.com/q/26759129
score: -1

http://stackoverflow.com/a/26896369
type: Answer
has body: Looks like I'm going to answer my own question again. It was a silly mistake anyway... After lots of time spent trying to solve a non-existing problem of cross-origin security, I discovered that the problem was occurring because I was testing locally (file:///), and filters or caching don't work in this case for some browsers. If you are having the exact same problem, just go localhost.
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26693363
answers question: http://stackoverflow.com/q/26693363
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42192298
type: Comment
comment on: http://stackoverflow.com/q/26809811
score: 0
type: QuestionComment
has text: Your examples are a good start, now try *writing what the rules are in words*. Pretty soon, you've written the regex yourself.

http://stackoverflow.com/comment/42135379
score: 0
type: Comment
has text: Awesome. Thank you so much. It reduced to much lesser code. Thanks a lot.
type: AnswerComment
comment on: http://stackoverflow.com/a/26778624

http://stackoverflow.com/q/26736270
upvote count: 2
downvote count: 1
has body: I'm trying to validate text field using JavaScript. It should allow (a-z, white space between words, and A-Z). I tried this but it doesn't work: function formValidator(){ var name = document.getElementById('name'); if(isAlphabet(name, "Please enter only letters for your name")){ return true; } return false; } function isAlphabet(elem, helperMsg){ var alphaExp = /^[a-zA-Z.,\b]+$/; if(elem.value.match(alphaExp)){ return true; }else{ alert(helperMsg); elem.focus(); return false; }
favorite count: 0
has comment: http://stackoverflow.com/comment/42058857
has comment: http://stackoverflow.com/comment/42058774
tagged with: regex
has answer: http://stackoverflow.com/a/26736392
accepted answer: http://stackoverflow.com/a/26736392
has comment: http://stackoverflow.com/comment/42058853
has comment: http://stackoverflow.com/comment/42063525
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42059011
score: 1
has title: Regex - How to allow white space comma and letters
has answer: http://stackoverflow.com/a/26736396
has comment: http://stackoverflow.com/comment/42058800
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42059172
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26736396

http://stackoverflow.com/comment/42029301
score: 1
type: Comment
type: QuestionComment
has text: In the modern browser, no one will see the pop up because pop up blockers will block it. Thank you pop up spam ads of the 90's an 00's. What you should do is use a modal layer on top of the page so you have control over it showing and knowing when a person clicks anywhere outside of the image on the page.
comment on: http://stackoverflow.com/q/26719558

http://stackoverflow.com/comment/42077324
type: Comment
comment on: http://stackoverflow.com/q/26744941
type: QuestionComment
has text: Even if changing your `x` to `&times` or `x` or `X` worked, @Mike'Pomax'Kamermans is right - you should add the UTF-8 meta tag, otherwise you may have vague issues like this in the future, especially if any of your database entries (if you have any) you use to populate pages contain unicode characters.
score: 0

http://stackoverflow.com/q/26804494
has body: In my app I have several screens that could appear due to a status, available, closed, ext. To make the different parts of the screens appear I was looking at using knockout if statements since the views and such all share the same values and such and it seems a waste to create that many files. However in my research I could only find knockout if statement that looks like this this appears And this will check if there are variables there and appear, but I can't seem to make it so it will check to see just what the variable that comes back is. I have tried something like this or Any help would be awesome!
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42182271
has comment: http://stackoverflow.com/comment/42182687
score: 0
has answer: http://stackoverflow.com/a/26804631
has title: Knockout if statement checking value of function
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/42183009
has comment: http://stackoverflow.com/comment/42184275
tagged with: javascript
has comment: http://stackoverflow.com/comment/42182891
answer count: 1

http://stackoverflow.com/comment/42081550
score: 0
has text: That URL returns a full web page starting with .
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26747811

http://stackoverflow.com/comment/42072582
comment on: http://stackoverflow.com/q/26741919
has text: [found this stack](http://stackoverflow.com/questions/13740164/d3-js-transition-not-working-when-browser-is-minimised) that could help me figure out why this is not working. **requestAnimationFrame** could e what is causing the animation not to work.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26775263
score: 0
has body: Can you use javascript? If so then you can run this javascript in the end of a page or in timeout: EDIT (i am not forcing to use javascript, there are great CSS answers also :) var setPosition = function(){ var foot = document.getElementById('gridContainer2'); foot.style.position = "relative"; if((foot.offsetTop + foot.offsetHeight) &gt;= window.innerHeight){ foot.style.position = "fixed"; } else{ foot.style.position = "relative"; //or whatever you wish } } setTimeout(function(){ setPosition(); window.onresize = function(){setPosition();}; },10);
type: Answer
has comment: http://stackoverflow.com/comment/42129277
answers question: http://stackoverflow.com/q/26774765

http://stackoverflow.com/q/26756945
type: UnansweredQuestion
has title: ajax update site from form submit
tagged with: javascript
has answer: http://stackoverflow.com/a/26757096
tagged with: ajax
tagged with: angularjs
type: Question
has body: As mentioned in this question How can I check for live updates without using setInterval/timeout? I am aware of websockets, but im interested in maybe a more simplistic solution, could I effectively just let php update a key value pair file and have all pages update accordingly only if a value has changed? eg. a bidding site where instead of polling for 100 or more items I only update the whole application when someone has essentially placed a bid , making it a one way flow place bid->process form->update database->refresh all instances of said bid currently open in other windows - hence the file that will store the info and maybe two way binding setup via angular template , or will caching be a issue? how else do I update the views but all based on the action of someone placing a bid(submitting a form)? Any ideas as to this approach?
linked to: http://stackoverflow.com/q/14112676
linked to: http://stackoverflow.com/q/26649449
tagged with: php
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42095911

ecmascript-harmony
tags question: http://stackoverflow.com/q/26769593
tag name: ecmascript-harmony
type: Tag
tags question: http://stackoverflow.com/q/26695346
tags question: http://stackoverflow.com/q/26783571

http://stackoverflow.com/comment/41981671
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26691815
score: 0
has text: Can you post up the form and the javascript code to see what you are doing wrong

http://stackoverflow.com/comment/42136157
comment on: http://stackoverflow.com/a/26779043
type: Comment
has text: it seems the OP has some div with empty paragraphs inside: I suppose he want to hide those containers, but :empty won't work in that scenario.
type: AnswerComment
score: 0

http://stackoverflow.com/q/26674987
tagged with: jquery
has comment: http://stackoverflow.com/comment/41949494
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26678992
type: Question
tagged with: css
answer count: 1
has title: Button doesn't update in Internet Explorer
score: 0
has body: When it's used in Chrome or Safari it works just fine, but in Internet Explorer it doesn't work. In Chrome the button changes almost instantly when you click it. But when you click the button in IE, the status changes (in database), but it is not displayed. When you refresh the page (F5), then you see the button changed. Now I found another problem in Internet Explorer. In older versions only the first button loads. Then the other buttons don't get displayed. Of course it does work in other browsers. I created a div on the page, where the button is created. And then use te following script: // JavaScript Document function checkStatus( data, user ) { var result = null, scriptUrl = "../../templates/template/php/status.php?data="+data+"&amp;user="+user; jQuery.ajax({ url: scriptUrl, type: 'GET', dataType: 'html', async: false, success: function(data) { result = data; } }); return result; } function setButton(data, user) { var status = checkStatus(data, user); if (status==='1') { jQuery( "#button" + data ).removeClass( "btn-primary" ).removeClass( "btn-danger" ).addClass( "btn-success" ).attr('value', 'aanwezig'); } if (status==='0') { jQuery( "#button" + data ).removeClass( "btn-primary" ).removeClass( "btn-success" ).addClass( "btn-danger" ).attr('value', 'afwezig'); } } function changeStatus( data, user ) { var status = checkStatus( data, user ); if ( status==='1' ) { //afmelden var scriptUrl = "../../templates/template/php/afmelden.php?data=" + data +"&amp;user="+user; jQuery.ajax({ url: scriptUrl, type: 'GET', dataType: 'html', async: false, success: function() { setButton(data, user); } }); } if (status==='0') { //aanmelden var scriptUrl = "../../templates/template/php/aanmelden.php?data=" + data + "&amp;user="+user; jQuery.ajax({ url: scriptUrl, type: 'GET', dataType: 'html', async: false, success: function() { setButton(data, user); } }); } } function showButton( data, user ) { //set a button jQuery( "#" + data ).replaceWith( "&lt;input type='submit' value='none…
tagged with: internet-explorer
has answer: http://stackoverflow.com/a/26678992
tagged with: javascript

http://stackoverflow.com/comment/41951863
type: Comment
has text: You can already reduce the file size of your images quite a bit without changing resolution. Try imageoptimizer.net .
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26675670

http://stackoverflow.com/a/26724022
has comment: http://stackoverflow.com/comment/42063091
has body: I just realized that my comment wasn't quite complete. PHP Code $fields = array(); foreach ($form["questions"] as $key =&gt; $value) { if (!empty($value["validators"])) { $fields[$key] = $value["validators"]; } } JavaScript Code $('#my_form').bootstrapValidator({ message: 'This value is not valid', feedbackIcons: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, fields: &lt;?php echo json_encode($fields); ?&gt; });
has comment: http://stackoverflow.com/comment/42038192
type: Answer
has comment: http://stackoverflow.com/comment/42037732
has comment: http://stackoverflow.com/comment/42037704
answers question: http://stackoverflow.com/q/26723799
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42038133
upvote count: 1

http://stackoverflow.com/a/26811639
has comment: http://stackoverflow.com/comment/42195883
has comment: http://stackoverflow.com/comment/42196114
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26811378
has comment: http://stackoverflow.com/comment/42196166
downvote count: 0
has comment: http://stackoverflow.com/comment/42196504
has body: Update The old answer (see bellow) won't work because it's only possible to access the controller of the required directives inside the link functions, and the templateUrl function gets executed before the link functions. Therefore the only way to solve this is to handle everything in the templateUrl function of the child directive. However this function only takes 2 arguments: tElement and tArgs. So, we will have to find the element of the parent directive and access the attribute child-template. Like this: angular.module('testApp', []) .directive('parent', function() { return { restrict: 'E', link: function(scope, element, attrs) { }, transclude:true, templateUrl: function(elem,attrs) { return attrs.parentTemplate || 'default.html' } } }) .directive('child', function() { return { restrict: 'E', require:'^parent', templateUrl: function(elem,attrs) { //if jQuery is loaded the elem will be a jQuery element, so we can use the function "closest" if(elem.closest) return elem.closest("parent").attr("child-template") || 'default.html'; //if jQuery isn't loaded we will have to do it manually var parentDirectiveElem=elem; do{ parentDirectiveElem=parentDirectiveElem.parent(); }while(parentDirectiveElem.length&gt;0 &amp;&amp; parentDirectiveElem[0].tagName.toUpperCase()!="PARENT"); return parentDirectiveElem.attr("child-template") || 'default.html'; } } }); Example Old Answer Since you are isolating the scope, you could try this, it's a bit hacky but I guess that it should work: angular.module('foo').directive('parent', function() { return { restrict: 'E', controller: function($scope) { this.childTemplate=$scope.childTemplate; }, link: function(scope, element, attrs) { }, templateUrl: function(elem,attrs) { return attrs.parentTemplate || 'some/path/default.html' }, scope: { childTemplate: '@' } } }) .directive('child', function() { return { restrict: 'E', require: '^parent', link: function(scope, element, attrs, parentController) { if(parentController.childTemplate) element.d…
has comment: http://stackoverflow.com/comment/42198870
type: Answer
has comment: http://stackoverflow.com/comment/42195741
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42196305
accepted answer of: http://stackoverflow.com/q/26811378
has comment: http://stackoverflow.com/comment/42195698
has comment: http://stackoverflow.com/comment/42196524
has comment: http://stackoverflow.com/comment/42196289

http://stackoverflow.com/comment/42137869
type: Comment
has text: I do not understand what you mean. "permissions": ["downloads","downloads.open","tabs"]? So, too, does not work. I have problems with English. Translator translates not clear)
comment on: http://stackoverflow.com/a/26778655
score: 0
type: AnswerComment

http://stackoverflow.com/q/26721542
score: 7
favorite count: 0
has body: I have been working on a project for a couple months now and I am nearing the end of it. One of the last steps is to provide a file which will be filled with information which has been generated by actions of the user during their session. Can I write files with HTML5/JS? and the answer by ecmanaut has gotten me very close since he provided two methods of doing so, one in pure html5 and one using JavaScript. I had first used the JavaScript method which would only work in Chrome, not in Mozilla or IE. So I used the pure html5 method combined with some alternate JavaScript to paste it to the page so it was click-able. document.getElementById('download').innerHTML = 'Save'; This code creates a file which is downloaded, but does not contain the newline which the article said was ' '. So I did a search to see what other character codes could be recognized. http://en.wikipedia.org/wiki/Newline provided me with many possible choices, none that I have tried have worked. The ones I have tried are: '&#10', ' ', '&#13', ' ', '\r\n', '\r', '\n', '\cr', '\c\r', 0x0D, 0x0A, 0c0D0A. In many of the cases the newline was removed and nothing would appear. While testing the above code, it works in Mozilla and Chrome (minus the newline), but the result in IE is different. When you click on the Save link, it actually moves to the page and has the url as what the data contents are. While the project might be acceptable without this feature working, I would very much like to get it working after having spent so much time and effort on it and having gotten so close. I also need to test this in Safari but I have not done any testing in that browser yet. Browser support required from most important to least is as follows: Mozilla, Chrome, Safari, IE. If possible I would like to avoid browser specific coding. I should also mention that like in the first link, I do not want to send to a server to have the download, I need it working locally on the client side with no server interaction. So to …
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: download
has comment: http://stackoverflow.com/comment/42033063
answer count: 2
upvote count: 7
has answer: http://stackoverflow.com/a/26721964
has title: HTML5 JavaScript Download attribute
possible better answer: http://stackoverflow.com/a/26721946
has answer: http://stackoverflow.com/a/26721946
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/4309958
tagged with: newline
accepted answer: http://stackoverflow.com/a/26721964
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/42072228
type: Comment
has text: Sounds like the page jump behavior when you jump to an unknown anchor. Like, if you use `<a href="#"` and don't override the click handler, Chrome will jump to the bottom of the page.
score: 0
comment on: http://stackoverflow.com/q/26743177
type: QuestionComment

http://stackoverflow.com/q/26806717
has answer: http://stackoverflow.com/a/26806861
has title: How to read local file that in located in the same directory as html using javascript
type: UnansweredQuestion
tagged with: compression
tagged with: file
type: Question
tagged with: local
has body: I have an application that creates html files that containes a lot of data to draw. This files are alwayes browsed from local file system (no http protocol at all). I have an idea to compress the data and than place it in a raw format in a separate .dat file that will be put in the same place as .html one. It is not a problem to read and uncompress this .dat file when it is on a web server. But I don't now how to read it when both files .html and .dat are local. Of course one can use browser file objects for it but in this case user will be alwayes asked to do a stupid action like to chose the the only file from an control.
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42186428
score: 0

http://stackoverflow.com/comment/42179643
has text: Then I have to parse already generated (by JSP) options and bind them somehow to angular variables, maybe array of booleans?
type: Comment
comment on: http://stackoverflow.com/a/26802927
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41968808
type: Comment
comment on: http://stackoverflow.com/q/26685241
score: 0
has text: There are free databases to load, but most services appear to require a monthly or yearly free if you plan to call them as a service.
type: QuestionComment

http://stackoverflow.com/a/26796653
has comment: http://stackoverflow.com/comment/42167745
has comment: http://stackoverflow.com/comment/42167646
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26796601
has comment: http://stackoverflow.com/comment/42167565
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42167621
has body: You can use removeAttr() in order to remove required attribute from input type radio inside li's as shown :- $(document).ready(function(){ $('input[type="radio"]').click(function(){ if($(this).attr("value")=="EStock"){ $(".box").hide(); $(".box ul li input:radio").removeAttr('required'); $(".EStock").show(); } if($(this).attr("value")=="InfiStall"){ $(".box").hide(); $(".box ul li input:radio").removeAttr('required'); $(".InfiStall").show(); } if($(this).attr("value")=="Delivery"){ $(".box").hide(); $(".box ul li input:radio").removeAttr('required'); $(".Delivery").show(); } }); }); Reference As commented by questioner he wants to remove value as well then you can try emptying the value or use .removeAttr() as shown : $(".box ul li input:radio").removeAttr('value'); OR $(".box ul li input:radio").val(''); OR As correctly commented by leo in comments section you can add a disabled attribute to the field and disabled field values can never be posted to the server.
score: 1
accepted answer of: http://stackoverflow.com/q/26796601
has comment: http://stackoverflow.com/comment/42167884
has comment: http://stackoverflow.com/comment/42167486

http://stackoverflow.com/a/26769188
answers question: http://stackoverflow.com/q/26768612
type: Answer
has comment: http://stackoverflow.com/comment/42119366
has comment: http://stackoverflow.com/comment/42120324
upvote count: 1
score: 1
has body: it looks like you'll need to slap each click event into an array and do a timed delay that handles what you want. I've done something rough that does this. http://codepen.io/anon/pen/fJcFo I've added some console.logs so you can see what happens at each event. But essentially what happens is: during the on click event, the html element text is put into an object under "queuedFloor". Inside of this object are two functions, one is button pressed, the other is at floor. The queued floor is then added to an array list called elevator.queue. what button pressed does is settimeout 3 seconds and then calls an alert to tell you you're at the floor, you could add your logic for when you are at the floor. It also calls the at floor function, which removes the object from elevator queue. If you want more flexibility with your html object. you could pass in the whole Element to the queuedFloor object by adding this to it: element:pressedItem Then when you want to reference the HTML element, you can call it by its object reference (elevator.queue[0].element) and do standard javascript manipulation such as: elevator.queue[0].element.classList.add('onfloor'); which would add a class to that specific element called "onfloor". Firstly I take create a javascript object: var elevator = elevator || {}; Then I add actions to my elevator object elevator.actions = { buttonPressed:function(pressedItem){ console.log(pressedItem); var queuedFloor = { floor: pressedItem.innerText; goToFloor: setTimeout(function(){ alert("arrived at floor" + elevator.queue[0].floor); //do your html manipulation for item here, remember its async so have to reference it by its position in the queue. In this case we only ever call the item in position 0 of the array. elevator.queue[0].atFloor(); }, 3000), atFloor: (function(){ elevator.queue.splice(0, 1); console.log('queue spliced', elevator.queue); }) }; elevator.queue.push(queuedFloor); elevator.actions.moveElevator(); } moveElevator:function(){ console.log('…
downvote count: 0

http://stackoverflow.com/comment/42188608
type: QuestionComment
has text: @muistooshort ok thks
score: 0
comment on: http://stackoverflow.com/q/26796964
type: Comment

http://stackoverflow.com/comment/42034253
type: AnswerComment
has text: Thank you for all the help epascarello!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26722094

http://stackoverflow.com/a/26754544
type: Answer
answers question: http://stackoverflow.com/q/26754033
upvote count: 2
has body: Nevermind. I just need to add the following code to my site master.
score: 2
has comment: http://stackoverflow.com/comment/42092139
has comment: http://stackoverflow.com/comment/42122375
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42167162
accepted answer of: http://stackoverflow.com/q/26754033

http://stackoverflow.com/comment/41957264
has text: //I don't see anything about a document ready function// `$(function)` is a shortcut for `$(document).ready(function)`. Also it turned out I was reading your code wrong because of the indentation [I fixed it].
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26678983

http://stackoverflow.com/q/26800863
has answer: http://stackoverflow.com/a/26801417
type: Question
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42176208
favorite count: 0
has body: AngularJS just looks messy and is hard to read. There is a model that exists in some very abstract netherworld accessed by $scope in controllers. Once I have a controller 100 lines long, a partial template 50 lines long with 15 directives and messy CSS class behaviors, it gets real difficult to keep tract of the variables, what they do, and where they are located in the code. I'm looking at a Todo app example: angular.module('todomvcApp') .controller('MainCtrl', function ($scope, $timeout, Todo, filterFilter, $location) { $scope.todos = []; $scope.newTodo = ''; $scope.editedTodo = null; $scope.status = $location.search().q || ''; //............. $scope.$watch('todos', function () { $scope.remainingCount = filterFilter($scope.todos, { completed: false }).length; $scope.completedCount = $scope.todos.length - $scope.remainingCount; $scope.allChecked = !$scope.remainingCount; }, true); //............ $scope.editTodo = function (id) { $scope.editedTodo = $scope.todos[id]; $scope.originalTodo = angular.extend({}, $scope.editedTodo); }; //............ $scope.revertEditing = function (id) { $scope.todos[id] = $scope.originalTodo; $scope.doneEditing(id); }; }); Here are the some of the $scope variables that require initialization: $scope.todos $scope.newTodo $scope.editedTodo $scope.status However, why are other $scope variables that don't require initialization also not defined early by the author? For example $scope.orginialTodo It makes the code very difficult to read both in the partial template and in the controller. Is there a structure or pattern that helps cleaning variable organization up in Angular?
tagged with: angularjs
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/26260444
has title: Is there a pattern for consistent declaration of $scope variables in AngularJS?
upvote count: 1
has answer: http://stackoverflow.com/a/26800975
downvote count: 1

http://stackoverflow.com/q/26730194
tagged with: jquery
has answer: http://stackoverflow.com/a/26730657
possible better answer: http://stackoverflow.com/a/26730223
has answer: http://stackoverflow.com/a/26730252
favorite count: 0
has answer: http://stackoverflow.com/a/26730303
accepted answer: http://stackoverflow.com/a/26730303
answer count: 5
tagged with: menu
has title: How to add a tag on the last word?
score: 2
type: AnsweredQuestion
has body: Menu One Menu Two How can I add a tag on the last element of the a tag using jQuery making the above example as follows: Menu One Menu Two I'm trying to use this code but it only adding a tag on the first word: $('.navbar-default .navbar-nav > li > a').each(function() { var html = $(this).html().split(" "); html = html[0] + " " + html.slice(1).join(" "); $(this).html(html); }); Menu One Menu Two
upvote count: 2
has answer: http://stackoverflow.com/a/26730223
type: Question
tagged with: split
tagged with: javascript
has answer: http://stackoverflow.com/a/26730279
downvote count: 0

http://stackoverflow.com/comment/42041355
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26726179
has text: Awesome we may be, but psychic we are not. 'It doesn't work' is not a suitable description of your problem.
score: 7

list
type: Tag
tag name: list
tags question: http://stackoverflow.com/q/26692670
tags question: http://stackoverflow.com/q/26819500
tags question: http://stackoverflow.com/q/26682498

http://stackoverflow.com/comment/42046888
type: Comment
has text: for (currentFrame.getAttribute("Caption") == null) can be written like (currentFrame.Caption == null) is it correct ?
type: AnswerComment
comment on: http://stackoverflow.com/a/26729322
score: 0

http://stackoverflow.com/comment/42606398
type: AnswerComment
type: Comment
has text: thanks so much for your help, ernesto! i was, unfortunately, unable to use it because of basic level of programming skills now. But i hope to improve soon and be able to try this out.
comment on: http://stackoverflow.com/a/26829497
score: 0

http://stackoverflow.com/q/26737618
has answer: http://stackoverflow.com/a/26737908
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26737908
tagged with: scroll
type: Question
has title: Make element appear after scrolling
tagged with: javascript
score: 0
has body: I am trying to make an element appear when the page goes past a certain Y position, but it appears after I reload the page and then stays on the page and doesn't disappear. var showScroll = function () { var url = document.URL; var urlToTest = 'http://localhost:55054/why-napit/membership-scheme-benefits'; var divEl = document.getElementById('action'); if (url == urlToTest) { if (document.documentElement.scrollTop &gt;= 800 || window.pageYOffset &gt;= 800) { divEl.style.display = "block"; } else { divEl.style.display = "none"; } } }(); window.addEventListener('load', showScroll, false); I have tried the scroll event but doesn't work, so I assume I'm close but not close enough.
answer count: 1

http://stackoverflow.com/comment/41957227
has text: Just what I thought when I saw the question in review queue ;)
type: Comment
comment on: http://stackoverflow.com/a/26678491
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42094092
comment on: http://stackoverflow.com/a/26755918
has text: The event handler is being triggered by the ready event, not by a form submission. Prevent the default action won't do anything (because there isn't a default action for the ready event).
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/42021585
score: 0
type: Comment
type: QuestionComment
has text: Can you provide some code from what you've tried
comment on: http://stackoverflow.com/q/26715571

http://stackoverflow.com/a/26793141
has comment: http://stackoverflow.com/comment/42161688
has comment: http://stackoverflow.com/comment/42161496
has comment: http://stackoverflow.com/comment/42161586
upvote count: 1
has comment: http://stackoverflow.com/comment/42161486
has body: compile('&lt;div my-directive&gt;&lt;/div&gt;') must return a function which has a scope argument. Maybe it would look something like this: function compile(stringArg){ return function(scopeArg){ if(typeof scopeArg === 'object'){ console.log(stringArg); } } }
answers question: http://stackoverflow.com/q/26793090
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/q/26689124
linked to: http://stackoverflow.com/q/3319400
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/42016308
tagged with: google-maps
tagged with: google-maps-markers
has body: I have a map that shows 500 markers and they are redrawn when the user scrolls the map. Each of the markers is quite complicated - they're numbered and have click, mouseover and mouseout (to animate them) events attached. This causes some performance issues because removing and adding these markers takes a lot of time. I've been wondering if I could attach a single click, mouseover and mouseout event handlers for the whole map and catch the event that bubbles up from the markers there. Is this possible? Would it improve the performance? I've found this - How do I make a single event handler for all markers in Google Maps V3? - it's better, but it still requires attaching the handler to each of the markers separately. I've also found Google Maps Data Layers - https://developers.google.com/maps/documentation/javascript/datalayer#add_event_handlers - it looks like there's only one event attached for the whole layer, but I'm not sure if it doesn't attach it to each of the markers internally anyway. I'm also not sure if the additional level of abstraction won't slow the things down. Are there any other solutions?
downvote count: 0
has title: Common event handler for all Google Maps v3 markers
tagged with: javascript
tagged with: marker
favorite count: 0
tagged with: google-maps-api-3
has answer: http://stackoverflow.com/a/28245730
has comment: http://stackoverflow.com/comment/42273154
has comment: http://stackoverflow.com/comment/42228824
has comment: http://stackoverflow.com/comment/42263049
answer count: 4
possible better answer: http://stackoverflow.com/a/26864997
has answer: http://stackoverflow.com/a/26884650
upvote count: 3
has answer: http://stackoverflow.com/a/26864997
has answer: http://stackoverflow.com/a/26870679
accepted answer: http://stackoverflow.com/a/28245730
type: Question

http://stackoverflow.com/q/26686096
answer count: 3
has answer: http://stackoverflow.com/a/26686123
tagged with: javascript
has title: How to REGEX match and doesn't match substring
tagged with: php
accepted answer: http://stackoverflow.com/a/26686104
tagged with: regex
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26686116
possible better answer: http://stackoverflow.com/a/26686123
has answer: http://stackoverflow.com/a/26686104
tagged with: match
has body: How to combine regex if match and doesn't match substring? Ex: http://www.domain.com/user.php?query=blah http://www.domain.com/member.php?query=blah http://www.domain.com/user.php?query=blah&amp;context=DkUdh8ShTkNNkwoIJkl http://www.domain.com/member.php?query=blah&amp;context=DkUdDh8ShTaDfkNNkwoIJkl I want to get url which contain "user.php" and "member.php" BUT I don't want to get url if contain "context" To match url if contain "user.php" and "member.php" I can use: (user\.php|user\.php) And if doesn't contain "context": ^((?!context).)*$ How to combine (user\.php|user\.php) and ^((?!context).)*$ ? My results should be: http://www.domain.com/user.php?query=blah http://www.domain.com/member.php?query=blah Thanks for help...
type: Question
score: 0

http://stackoverflow.com/q/26699975
type: Question
possible better answer: http://stackoverflow.com/a/26704628
tagged with: javascript
tagged with: jquery
has title: mouseover event and click event on same element conflicts on mobile
score: 0
accepted answer: http://stackoverflow.com/a/26712336
answer count: 2
tagged with: angularjs
has body: I'm using angular.js to build my website, and I have an element that MOUSEOVER event is supposed to show the navbar, and on mobile, clicking on that element, supposed to show the navbar + the menu. These two events conflict. Any ideas? //navbar fade in by mouse over menu button angular.element('.picture_hamburger&gt;.text').on('mouseover', function() { angular.element('#navbar').stop().fadeIn(); btnState.setPosition(1); // navbar fade out by mouse out of button angular.element('.menu_hamburger').one('mouseout', function() { btnState.setPosition(0); }); }); //menu open by click angular.element('.picture_hamburger&gt;.text').click(function () { angular.element('#navbar').finish().slideDown(); btnState.openMenu(); });
has comment: http://stackoverflow.com/comment/41993675
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26712336
has answer: http://stackoverflow.com/a/26704628

http://stackoverflow.com/a/26790703
answers question: http://stackoverflow.com/q/26790656
has body: Pass cleveland:ohio as an array like: test(['cleveland:ohio']); The following code: test(['cleveland:ohio','newyork:newyork']); should output: SPAN: cleveland:ohio SPAN: newyork:newyork
type: Answer
score: 0

http://stackoverflow.com/q/26799475
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26800829
has title: Twitter bootstrap carousel control with one button
tagged with: jquery
has answer: http://stackoverflow.com/a/26800189
accepted answer: http://stackoverflow.com/a/26800189
tagged with: twitter-bootstrap
type: AnsweredQuestion
has body: I have tried to find the best solution for Twitter Bootstrap Carousel 2.3 navigation control but I could not find any. The case is as following. I am trying to trigger carousel from one button but until now I haven't found the right solution. I know that I need to toogle carousel classes but how I really don't know. Here is jquery which I am using right now: $(function () { $('.modal-carousel').carousel({ interval:2000, pause: "false" }); $('.style').click(function () { $('.modal-carousel').carousel('cycle'); console.log('Starts carousel'); }); $('.stop.style').click(function () { $('.modal-carousel').carousel('pause'); console.log('Stops carousel'); }); }); The button has always .style class while .stop is added when user click on the button. any suggestions?
possible better answer: http://stackoverflow.com/a/26800829
type: Question

http://stackoverflow.com/q/26777982
has comment: http://stackoverflow.com/comment/42134177
tagged with: javascript
has comment: http://stackoverflow.com/comment/42134528
linked to: http://stackoverflow.com/q/111102
answer count: 1
favorite count: 0
duplicate of: http://stackoverflow.com/q/111102
has comment: http://stackoverflow.com/comment/42134791
has title: How does this function work without setting the parameter?
score: 2
upvote count: 3
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26778009
has body: I'm reading through Eloquent Javascript and saw this function: function multiplier(factor) { return function(number) { return number * factor; }; } var twice = multiplier(2); console.log(twice(5)); // → 10 However, I'm failing to grasp how the inner function is assigning the variable (5) to the number parameter? Eloquent JS tries to explain it but I'm not getting it.
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42134456
has comment: http://stackoverflow.com/comment/42134325
has comment: http://stackoverflow.com/comment/42134256

http://stackoverflow.com/a/26793099
score: 0
answers question: http://stackoverflow.com/q/26792881
type: Answer
has body: Below here will work, as you are expecting. Two issues I found for accessing HTML Element inside for loop, you need to use .item() as its HTMLCollection you are getting instead of an array. Also your inner for loop needs to use different looping index, with one additional if condition to leave clicked one as shown and rest hidden. One Two Three This is panel one. This is panel two. This is panel three.

http://stackoverflow.com/comment/42221616
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26826768
has text: @Mubasher no, as I said - it's not a "smart" library, it just makes it easier to create and manage draggable lists. From there you can make a manager that handles and creates new lists when this and that happens

http://stackoverflow.com/a/26673594
score: 2
has body: Use this: First, set the ID to talkNow, rather than the name. Then, use the following JavaScript to access it's value. document.getElementById("talkNow").value; Good Luck!
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26673470
has comment: http://stackoverflow.com/comment/41953998
has comment: http://stackoverflow.com/comment/41954095
has comment: http://stackoverflow.com/comment/41962314
upvote count: 2

http://stackoverflow.com/comment/42067399
has text: it doesn't work till, could this issue be from my select itself? $('.rating-c .br-widget a select[name=rating]')
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26740618
type: Comment

http://stackoverflow.com/a/26698695
has comment: http://stackoverflow.com/comment/41991844
score: 1
upvote count: 1
has body: You have to catch .hover() event and append text with .text(). $('#blue1').hover(function() { $('#whitebox').text('2nd Meet John at 2'); }, function() { $('#whitebox').text('whitebox'); }); 1 2 3 4 5 6 7 whitebox Script could be placed in ... section of site using:
has comment: http://stackoverflow.com/comment/41991789
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41991745
type: Answer
answers question: http://stackoverflow.com/q/26698654
accepted answer of: http://stackoverflow.com/q/26698654

http://stackoverflow.com/comment/71891554
has text: @BenTaliadoros Yeah, but it's usually a good idea to stick to one way of making line breaks. Since OP is already using ` ` in his view (rather than ` content `), he should probably stick with HTML line breaks.
type: AnswerComment
comment on: http://stackoverflow.com/a/26781942
score: 0
type: Comment

http://stackoverflow.com/a/26688791
upvote count: 1
answers question: http://stackoverflow.com/q/26688106
has body: Yes the answer from Avinash will also render the value. If you just want to render the symbol, there are two possibilities: 1.) HTML &pound; (more on currency symbols) 2.) Store the symbol in the message.property file and add it with to the jsp.
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/42088376
comment on: http://stackoverflow.com/a/26752476
has text: No. see what i wrote in the question im sending Mon Oct 27 2014 00:00:00 GMT+0200
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26795728
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26795933
downvote count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/42165889
has comment: http://stackoverflow.com/comment/42165725
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26796021
has body: I am using a script which someone assisted me with on stackoverflow. It works perfectly, however it does not work with my amchart in IE8-10 (I have logged this issue with amcharts too because the issue appears to be with the chart). I would like to troubleshoot further myself in the meantime with jQuery script. I am still learning jQuery and need some guidance in converting the following javascript code to a jQuery show() hide() script. I have tried it in it basic form: $(window).load(function() { $("div").hide(); }; It works in all other browser except IE 8-10 when you toggle the form the chart does not appear. Below please see exerpts of two scripts that work but in IE 8-10. &lt;script type="text/javascript"&gt; function chart1() { var show = ['chartdiv1', 'unit-price']; for ( var i = 0; i &lt; show.length; ++i ) document.getElementById(show[i]).style.display = "block"; var hide = ['chartdiv2', 'unit-price-value','chartdiv3', 'unit-price-rand']; for ( var i = 0; i &lt; hide.length; ++i ) document.getElementById(hide[i]).style.display = "none"; }; &lt;/script&gt; &lt;script&gt; function chart1() { document.getElementById("chartdiv1").style.display = "block"; document.getElementById("unit-price").style.display = "block"; }; function chart2() { document.getElementById("chartdiv2").style.display = "none"; document.getElementById("unit-price-value").style.display = "none"; }; function chart3() { document.getElementById("chartdiv3").style.display = "none"; document.getElementById("unit-price-rand").style.display = "none"; }; &lt;/script&gt; &lt;/head&gt; &lt;body style="background-color:#FFFFFF; margin: 10px;" onLoad="chart1()"&gt; or onload"chart1(), chart2(),.............
has comment: http://stackoverflow.com/comment/42167413
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has title: Creating a show hide function on window load?

http://stackoverflow.com/comment/42196889
has text: @confile, i changed my answer and explained all steps of your sample with a new one base your sample but with corrected codes. see this ;)
type: Comment
comment on: http://stackoverflow.com/a/26791060
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42056975
type: QuestionComment
comment on: http://stackoverflow.com/q/26735268
score: 1
has text: Post your html code to understand better!
type: Comment

http://stackoverflow.com/q/26757810
possible better answer: http://stackoverflow.com/a/26758508
score: 0
has title: Loop over array and compare to other array
accepted answer: http://stackoverflow.com/a/26758735
has comment: http://stackoverflow.com/comment/42097882
has body: I'm trying to create a code that will take a sentence as a param, split that sentence into an array of words and then create a loop that checks if any of theses word matches a word in some other arrays. In the example below, I have a sentence that contains the word "ski". This means that the return value should be categories.type3. How can I have make the loop check this? Could I have a function switching between different categories ? (ie : if a word is not in action, look in adventure and so on). var categories = { type1: "action", type2: "adventure", type3: "sport" } var Sentence = "This sentence contains the word ski"; var sport = ["soccer", "tennis", "Ski"]; var action = ["weapon", "explosions"]; var adventure = ["puzzle", "exploring"]; var myFreeFunc = function (Sentence) { for (var i = 0; i &lt; arrayLength; i++) { if (typeArr[i] == word) { } } }
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42097380
has comment: http://stackoverflow.com/comment/42097704
has comment: http://stackoverflow.com/comment/42097501
type: Question
has comment: http://stackoverflow.com/comment/42097614
has answer: http://stackoverflow.com/a/26758735
has answer: http://stackoverflow.com/a/26758508
has answer: http://stackoverflow.com/a/26758661
answer count: 3
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/comment/42140521
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26781483
type: Comment
has text: see this updated [JSFiddle](http://jsfiddle.net/tmu9kukz/9/), i have achieved this using a single iteration, but still i want to avoid that forEach iteration too

http://stackoverflow.com/q/26791424
score: 0
answer count: 3
tagged with: javascript
has answer: http://stackoverflow.com/a/26792505
has body: I've recently been learning javascript and came across the return statement or whatever it is. I've watched tutorials on it and I still don't get the point of it. Do I ever need it for anything and can someone please explain in detail what it does? Thanks
has comment: http://stackoverflow.com/comment/42158611
has comment: http://stackoverflow.com/comment/42158553
tagged with: return
has title: What is the point of the return in Javascript?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26791442
has answer: http://stackoverflow.com/a/26792418
type: Question

http://stackoverflow.com/q/26753287
score: 1
tagged with: internet-explorer-10
upvote count: 1
has title: each function Jquery throwing error in IE10
type: Question
has comment: http://stackoverflow.com/comment/43280774
tagged with: javascript
has comment: http://stackoverflow.com/comment/43321391
downvote count: 0
has comment: http://stackoverflow.com/comment/42090384
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has body: I have written a piece of code to search an entire document and find data . To do that I am using each function. Now this work perfectly fine in Chrome and Firefox but in IE10 implementation of each function in JqueryFramework.js, it throws error saying "Unable to get property 'replace' of undefined or null reference ". Here is the code I have written $(xml).find('interface').each(function () { oldxml=$(this); if ($(this).find('Param').html()!=null) { // alert($(this).find('Param').html()); if ($(this).find('Param').html().indexOf("Tunnel0")&gt;-1) { $(oldxml).find('tunnel').each(function () { // alert($(oldxml).html()); if ($(this).find('Param').text().length &gt;0 ) { //code // alert($(oldxml).text()); interfaceArray[interfaceArray.length]=$(this).find('Param').text().trim(); //alert($(this).find('Param').text().trim()); } if ($(this).find('IPAddressHostName').text().length &gt;0 ) { //code peerAddressArray=$(this).find('IPAddressHostName').text().trim(); } }); }else if ($(this).find('Param').html().indexOf("Tunnel1")&gt;-1) { $(oldxml).find('tunnel').each(function () { if ($(this).find('Param').text().length &gt;0 ) { //code interfaceArray[interfaceArray.length]=$(this).find('Param').text().trim(); } if ($(this).find('IPAddressHostName').text().length &gt;0 ) { //code peerAddressArray=$(this).find('IPAddressHostName').text().trim(); } }); } } });
has comment: http://stackoverflow.com/comment/43321402
answer count: 0
has comment: http://stackoverflow.com/comment/42089855

http://stackoverflow.com/comment/41962850
has text: It's good practice to make sure you select the `UL` we're working on and not some other UL on the page before we get to work. We're only being given a portion of the HTML, and we need to first uniquely select the container element from the HTML page. Adding an ID to the element is only good practice. If the HTML is so tight that we can't add an id to it, simply use `var el=document.getElementsByTagName('ul')[0];`
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26681586
type: Comment

http://stackoverflow.com/comment/42116568
has text: Can you show the code that calls the logger function? What is the source and type of data passed to it?
comment on: http://stackoverflow.com/q/26767655
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26796403
tagged with: http://stackoverflow.com/tag/html
has title: Image slider with modal prev/next buttons not working?
tagged with: twitter-bootstrap
tagged with: css
has answer: http://stackoverflow.com/a/26797275
type: AnsweredQuestion
type: Question
has body: Bootply: http://www.bootply.com/byUX0u7K0s css: .modal-body img{ width:100%; height:100%; } JS: $('img').click(function(){ $('.modal-body').html( $(this).parent().html() ); $('#myModal').modal({show:true}) }); HTML: ‹ › × Modal header Close In the above code i had implemented carousel with popupmodal in bootstrap.everything works fine in the code but when i open a model popup i want to use prev and next button in popup also.had anyone came accross this.any help would be appreciated.
answer count: 1
accepted answer: http://stackoverflow.com/a/26797275
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/26765470
answers question: http://stackoverflow.com/q/26765381
has body: First, you want script tags, not style tags. Second, if you're setting variables to string values, you need to enclose them in quotations marks. This is untested code, but should give you an idea. Using jQuery selectors, so you'll need this in your head tag: &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; Here is the code that goes at end of body tag: &lt;script type="text/javascript"&gt; $("document").ready(function(){ var IndentLeft = "150px"; var IndentRight= "250px"; if (screen.width &lt;=500) {IndentLeft="50px"; IndentRight="50px";} $(".para").each(function(){ $(this).css("margin-left", IndentLeft); $(this).css("margin-right", IndentRight); }); }); &lt;/script&gt;
score: 0
type: Answer

http://stackoverflow.com/comment/42061778
has text: @ArtjomB.Thanks for the info.
comment on: http://stackoverflow.com/q/26730184
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26785849
has comment: http://stackoverflow.com/comment/42148418
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42150037
has comment: http://stackoverflow.com/comment/42150263
tagged with: http://stackoverflow.com/tag/html
tagged with: php
linked to: http://stackoverflow.com/q/26787902
has comment: http://stackoverflow.com/comment/42154644
tagged with: http://stackoverflow.com/tag/xml
has comment: http://stackoverflow.com/comment/42148591
has body: I am confused on how to read information from an .xml file using AJAX. All I want my program to do is display a button that the user can press, then it will display a list of movies in the .xml file. Right now my webpage shows the button but when a user presses it nothing happens. I'm going to post my 3 files and hopefully someone can help me out. index.html AJAX - responseXML My Movies Get Movie Titles ajax.js function xmlHttpObjCreate() { var xmlHttp; try {xmlHttp=new XMLHttpRequest(); } catch (e) {try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { return false; } } } return xmlHttp; } movies.xml <?xml version= "1.0"?> Gone with the Wind 1939 2001: A Space Odyssey 1968 Jurassic Park 1993 The Shawshank Redmption 1994 Balto 1995 This is the error that I get Uncaught TypeError: Cannot read property 'getElementsByTagName' of null
answer count: 0
has comment: http://stackoverflow.com/comment/42148884
has comment: http://stackoverflow.com/comment/42149204
has comment: http://stackoverflow.com/comment/42148518
has comment: http://stackoverflow.com/comment/42149093
type: Question
has comment: http://stackoverflow.com/comment/42150130
has comment: http://stackoverflow.com/comment/42149860
has comment: http://stackoverflow.com/comment/42149083
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42149273
has comment: http://stackoverflow.com/comment/42152966
has comment: http://stackoverflow.com/comment/42148830
tagged with: ajax
has comment: http://stackoverflow.com/comment/42148479
has comment: http://stackoverflow.com/comment/42149036
has comment: http://stackoverflow.com/comment/42148465
has title: How to display xml information using AJAX

http://stackoverflow.com/q/26727461
favorite count: 0
downvote count: 1
has body: So, I have this: var listener = { _handleMessage: function(b) { var c = b.data; if (c) this.{c}; //this not works }, testFunc: function() { console.log("success"); } startListen: function() { window.addEventListener("message", this._handleMessage, !1) } }; listener.startListen(); What to be expected: when a data passes through startListen, it will pass data to _handleMessage. From there, it checks the data to call a function INSIDE the listener as well (for example, the testFunc will be called if b.data is testFunc). Using something like I post does not work. Using this[c](); does not work either (this[c] is not a function). Any other solutions? SOLVED Found a more elegant way: _handleMessage: function(b) { var c = b.data; if (c) { var d = listener[c.action]; d &amp;&amp; "function" == typeof d (function() { d.call(listener, c.params || {}); }); } },
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26728179
has answer: http://stackoverflow.com/a/26727763
has title: JS: Calling a function inside the object within the same object
score: -1
type: Question
possible better answer: http://stackoverflow.com/a/26728179
accepted answer: http://stackoverflow.com/a/26727763
has answer: http://stackoverflow.com/a/26727533
has comment: http://stackoverflow.com/comment/42044524
upvote count: 0
tagged with: function
has comment: http://stackoverflow.com/comment/42043655
tagged with: javascript
answer count: 3
linked to: http://stackoverflow.com/q/10260903

http://stackoverflow.com/comment/42125441
score: 0
type: QuestionComment
has text: you are not replacing the previous images. You are positioning(animating) you new images which doesn't update your first image container.
type: Comment
comment on: http://stackoverflow.com/q/26772818

http://stackoverflow.com/q/26826077
type: Question
tagged with: selenium-webdriver
tagged with: selenium-chromedriver
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26828244
has title: How to choose cssSelector value in Chrome browser using chrome Developer Tool(F12)?
tagged with: java
type: UnansweredQuestion
has body: How to choose cssSelector() from Chrome browser using Chrome Developer Tools? Can you show an example for the below code? WebElement searchBox = driver.findElement(By.cssSelector("selector")); searchBox.click(); How to chose the value for the SELECTOR field from the Chrome Developer Tool?-F12 in Chrome. Please explain with an example Thanks
tagged with: css-selectors
tagged with: javascript
has answer: http://stackoverflow.com/a/26830931

http://stackoverflow.com/a/26810955
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42194882
has body: You need to add + signs around the name and age concatenations in your function, and you should add quotes to your string. Like, function adultCheck(age, name) { if (age &lt;= 17) { alert("Sorry " + name + ", you are not allowed to " + "see this, you are too young."); } else { alert("Welcome " + name + ", you are " + age + " visit our lounge!"); } } adultCheck(15, 'Tami');
score: 1
answers question: http://stackoverflow.com/q/26810825
upvote count: 1

http://stackoverflow.com/comment/42043685
has text: @Vaibs_Cool i don't want scrolling
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26714796
score: 0

http://stackoverflow.com/comment/42224806
score: 0
has text: From DOC: `There is also $(document).on( "ready", handler ), deprecated as of jQuery 1.8. This behaves similarly to the ready method but if the ready event has already fired and you try to .on( "ready" ) the bound handler will not be executed.`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26828754

http://stackoverflow.com/a/26768724
has comment: http://stackoverflow.com/comment/42118861
type: Answer
has comment: http://stackoverflow.com/comment/42193140
answers question: http://stackoverflow.com/q/26768206
has body: One would simply increase the range of the y scale by 100. // Set the ranges: var y = d3.scale.linear().range([height, 0]); // Update the ranges (on click or whatever): y.range([height + 100, 0]); Then, the chart would update basing on this new y scale.
accepted answer of: http://stackoverflow.com/q/26768206
score: 0
has comment: http://stackoverflow.com/comment/42193036
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42118732

http://stackoverflow.com/comment/42186591
type: Comment
has text: As you can see the function change() has an alert which is NOT being called. The point is exactly why change() is not called.
comment on: http://stackoverflow.com/a/26806506
type: AnswerComment
score: 0

http://stackoverflow.com/a/26760816
score: 4
has comment: http://stackoverflow.com/comment/42103589
answers question: http://stackoverflow.com/q/26759426
has body: Your sample code was a bit long so I've simplified things a little. The problem here is that when you apply a scale transform to an SVG element, what you're basically doing is multiplying all the element's coordinates by the scale factor. If the element is offset from the origin before scaling, this offset will be scaled too. If you want things to scale about their centres, you need to adjust the local coordinates so that their centres are situated at the origin. You can do this by wrapping them in &lt;g&gt; elements with a suitable transform attribute. For example, here's an SVG containing two circles. The orange one is centred at (100,125) and has centre coordinates of cx=cy=0. When this circle is scaled, it stays exactly where it is. The blue circle has its origin set at (200,125) (shown by the blue cross), but with an additional offset of 100 in the centre x coordinate (cx=100). When this circle is scaled, the value of cx is doubled, causing it to fly out to the right. svg path { pointer-events:visibleFill; } svg circle { -moz-transform: scale(1); -webkit-transform: scale(1); -o-transform: scale(1); -ms-transform: scale(1); transform: scale(1); } svg circle:hover { -moz-transform: scale(2); -webkit-transform: scale(2); -o-transform: scale(2); -ms-transform: scale(2); transform: scale(2); opacity:0.5; } &lt;svg viewBox="0 0 400 250" width="400" height="250"&gt; &lt;rect x="0" y="0" width="400" height="250" fill="#ffa" /&gt; &lt;g transform="translate(100,125)"&gt; &lt;circle cx="0" cy="0" r="50" fill="#f90" /&gt; &lt;path d="M0-10V10ZM10 0H-10" stroke="#a60" stroke-width="2" /&gt; &lt;/g&gt; &lt;g transform="translate(200,125)"&gt; &lt;circle cx="100" cy="0" r="50" fill="#69f" /&gt; &lt;path d="M0-10V10ZM10 0H-10" stroke="#46a" stroke-width="2" /&gt; &lt;/g&gt; &lt;/svg&gt;
accepted answer of: http://stackoverflow.com/q/26759426
has comment: http://stackoverflow.com/comment/42104111
upvote count: 4
has comment: http://stackoverflow.com/comment/42105176
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/26744941
has comment: http://stackoverflow.com/comment/42075407
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42077324
tagged with: javascript
tagged with: jquery
has body: Somehow I received an A- where an X is supposed to be to close a window. Will someone please enlighten me where I should be looking to find this mistype or error if it was bootstrap or jQuery... What really annoys me is when I recreate this in a fiddle of course it shows an X again. Does anyone have any idea where I may be able to locate this issue? I am using: jQuery-1.11.1, (with smoothness ui) bootstrap 3.2.0, (with min.css) As you see here all I put was an X: (That's why I think it is a behind the scenes issue with either jQuery or bootstrap) ×Close Select a Specialty Plate
favorite count: 0
has comment: http://stackoverflow.com/comment/42081238
tagged with: css
accepted answer: http://stackoverflow.com/a/26744987
type: AnsweredQuestion
score: 2
upvote count: 2
tagged with: twitter-bootstrap
type: Question
has comment: http://stackoverflow.com/comment/42075328
has title: received an A- where an X is supposed to be to close a window
has comment: http://stackoverflow.com/comment/42076026
has answer: http://stackoverflow.com/a/26744987

http://stackoverflow.com/comment/42189069
score: 0
type: Comment
has text: Ya its possible if you are marking a SPA(single page application) or else you have to handle it in your page load code while you are loading the page up by recognizing the page and accordingly loading the image in the header bar...
type: QuestionComment
comment on: http://stackoverflow.com/q/26808111

http://stackoverflow.com/q/26694317
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41983967
has comment: http://stackoverflow.com/comment/41984101
has body: I'm doing something like seats booking page and Seat numbers, A1, A2, ... G1, ... G17, G18 should be added to the image tag dynamically on page load and display as tooltips when the mouse hovers over them. This is my function but it doesn't work: function allocateSeats(){ var table = $("#seats"); var num = 0; var rowName; table.each(function(){ $(this).find('img').each(function(){ var col = $(this).parent().children().index($(this)); var row = $(this).parent().parent().children().index($(this).parent()); num ++; switch(true){ case(num&lt;7): rowName='A'; break; case(num&gt;6 &amp;&amp; num&lt;13): rowName='B'; break; case(num&gt;12 &amp;&amp; num&lt;19): rowName='C'; break; case(num&gt;18 &amp;&amp; num&lt;37): rowName='D'; break; case(num&gt;36 &amp;&amp; num&lt;55): rowName='E'; break; case(num&gt;54 &amp;&amp; num&lt;73): rowName='F'; break; case(num&gt;72 &amp;&amp; num&lt;91): rowName='G'; break; } //alert("Column: " + col + ", Row: " + row); -----This should work $(this).attr('id',rowName + row); $(this).attr('title',rowName + row); $(this).draggable({ helper: 'clone', revert: 'invalid', cursor: 'move' }); $("#topLeft").droppable({ drop: handleDropEvent, out: handleDropOut }); }) }) }
has comment: http://stackoverflow.com/comment/41984011
has title: Adding seat numbers to the images ajax, JavaScript
accepted answer: http://stackoverflow.com/a/26695640
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41984163
has comment: http://stackoverflow.com/comment/41984072
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26695640
type: Question
has comment: http://stackoverflow.com/comment/41984136
tagged with: javascript
tagged with: ajax

http://stackoverflow.com/comment/42024284
has text: This is not enough. You also have to put this javascript in head tag not after DOM is ready or onload.
comment on: http://stackoverflow.com/a/26717138
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42110621
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26763550
score: 0
has text: What errors are you getting? Please include the full error message in your question. There's an "edit" link right under it for that purpose.

http://stackoverflow.com/comment/42322226
score: 2
type: AnswerComment
comment on: http://stackoverflow.com/a/26777268
has text: what when i stop drawing, is there any other function that register event back or i must call var key = map.on('click', function(evt) { … }); again
type: Comment

http://stackoverflow.com/a/40112495
score: 1
upvote count: 1
has body: Here the same without jQuery and with a bit ES6. ;) for(let tupel of document.querySelectorAll('video')) { tupel.addEventListener('mouseover', (e) =&gt; { e.target.play() }, false); tupel.addEventListener('mouseout', (e) =&gt; { e.target.pause() }, false); }
type: Answer
answers question: http://stackoverflow.com/q/26778714
downvote count: 0

http://stackoverflow.com/q/26699954
tagged with: ember.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26788139
type: Question
has title: emberjs force .find() to search for new data on server
tagged with: ember-data
tagged with: javascript
score: 0
answer count: 1
has body: My situation is I have a rendered {{each}} opened and then open a modal for a new entry as an overlay. with .findAll() my table updates when i save my new entry with my needed .find() not.. I need to reenter my route to get new data: return this.store.find('user',{filter:{where: {role: 'abonnent'}}}); Syncs perfectly with my api, but I can't append parameters: return this.store.findAll('user'); I would like to use it like so: import Ember from "ember"; export default Ember.Route.extend({ model:function(){ return this.store.find('user',{filter:{where: {role: 'abonnent'}}}); //return this.store.findAll('user'); } });
has answer: http://stackoverflow.com/a/26788139

http://stackoverflow.com/comment/42094596
score: 0
comment on: http://stackoverflow.com/q/26756222
type: Comment
type: QuestionComment
has text: You want to add a class named "active" or you want to add an active statement `:active` to an element ?

http://stackoverflow.com/q/26719340
has title: Add hover events to a vertex in mxGraph
type: Question
tagged with: javascript
tagged with: mxgraph
answer count: 1
downvote count: 0
tagged with: dom-events
favorite count: 0
has answer: http://stackoverflow.com/a/26775638
upvote count: 2
accepted answer: http://stackoverflow.com/a/26775638
tagged with: hover
score: 2
type: AnsweredQuestion
has body: Is there any way to handle hover events on vertices? I don't see anything relevant, such as mouseenter, mouseleave, mouseover, etc, in mxEvents or any of the examples, so I'm assuming no. (Are there any other crafty workarounds?)

http://stackoverflow.com/comment/42100932
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26755969
type: Comment
has text: i extracted the data and posted it using ajax but it is giving me this error ""Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource.This can be fixed by moving the resource to the same domain or enabling CORS". do you know what is the issue here?

http://stackoverflow.com/q/26696501
answer count: 1
has title: How to properly use button toggle function
accepted answer: http://stackoverflow.com/a/26696554
has comment: http://stackoverflow.com/comment/41987759
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41987833
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41987678
has comment: http://stackoverflow.com/comment/41987700
has answer: http://stackoverflow.com/a/26696554
tagged with: javascript
score: 0
has body: button1Toggle() function doesn't seem to work. Text in the button doesn't change. Can't find the bug. function button1Toggle() { if (document.myform.button1.value == "Mute") { document.myform.button1.value = "Unmute"; } else { document.myform.button1.value = "Mute"; } } Tablet

http://stackoverflow.com/comment/42182609
type: Comment
type: QuestionComment
has text: @DavidW. really? Could you please share one of those situations?
comment on: http://stackoverflow.com/q/26804581
score: 0

http://stackoverflow.com/q/26680626
tagged with: javascript
tagged with: jquery
score: -4
has comment: http://stackoverflow.com/comment/41960038
has answer: http://stackoverflow.com/a/26680763
downvote count: 4
answer count: 3
has comment: http://stackoverflow.com/comment/41960028
favorite count: 0
has comment: http://stackoverflow.com/comment/41960322
has answer: http://stackoverflow.com/a/26680856
possible better answer: http://stackoverflow.com/a/26680755
has title: Jquery code not removing TR from table
has answer: http://stackoverflow.com/a/26680755
accepted answer: http://stackoverflow.com/a/26680763
type: AnsweredQuestion
tagged with: dom
has body: I wrote a bit of code to remove a table row if the checkbox within that row is checked. I'm trying to get this to work as shown below but I'm having trouble targetting the TR itself. Can someone give me a pointer as to what I'm doing wrong? Or maybe I'm approaching this in the least efficient way? $(".deleter").click( function() { $(".table1 td :checked").prop("checked") ? $(".row1")remove() : $(".msgbox").text("There is nothing to delete."); }); Primary Address Construction Town Grade Select All #501 - 2206 Eglinton Avenue, Scarborough, O.N. A1B2C3 Fire Resistive 2 #501 - 2206 Eglinton Avenue, Scarborough, O.N. A1B2C3 Fire Resistive 2
type: Question
upvote count: 0

http://stackoverflow.com/comment/41974826
type: AnswerComment
score: 0
type: Comment
has text: I still don't understand. In the second case, why i in `console.log()` gets 3 which is the value when loop ended while i in `item` get 2 which is the value of the last iteration? what's main problem causing this difference and why?
comment on: http://stackoverflow.com/a/26687922

semantic-web
tags question: http://stackoverflow.com/q/26733978
type: Tag
tag name: semantic-web

http://stackoverflow.com/comment/41963964
has text: Can you share your HTML and CSS?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26682647

http://stackoverflow.com/q/26759781
type: AnsweredQuestion
downvote count: 0
tagged with: php
has body: I'm using SpBowerBundle to manage JS libraries on my Symfony2 project. It was working until days ago when any time I try to upgrade a package, I get this error: bower ECONFLICT Unable to find suitable version for moment I suspect that the problem is on my bower.json file due to a package version I'm using. This is the content of the mentioned file: { "name": "AppBundle", "dependencies": { "jquery": "latest", "jquery-migrate": "latest", "bootstrap": "latest", "font-awesome": "latest", "bootstrapvalidator": "master", "pwstrength-bootstrap": "latest", "select2": "latest", "fuelux": "latest", "moment": "master", "x-editable": "latest", "datatables": "latest", "bootbox": "latest", "knockout": "latest", "jquery-file-upload": "latest" } } Then, How do I find the conflict package? Any log? How do I install the latest release of each package? I mean which string I should use ?
tagged with: bower
type: Question
score: 3
has answer: http://stackoverflow.com/a/26853296
accepted answer: http://stackoverflow.com/a/26853296
upvote count: 3
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: symfony
has title: Find the conflict package in Bower and find the right package to install

http://stackoverflow.com/comment/42164557
score: 0
comment on: http://stackoverflow.com/q/26794802
type: Comment
type: QuestionComment
has text: try to run above code

http://stackoverflow.com/q/26763908
has comment: http://stackoverflow.com/comment/42159167
tagged with: php
has comment: http://stackoverflow.com/comment/42111710
score: 0
has answer: http://stackoverflow.com/a/26764111
answer count: 1
has comment: http://stackoverflow.com/comment/42109315
tagged with: javascript
tagged with: forms
has comment: http://stackoverflow.com/comment/42109030
has comment: http://stackoverflow.com/comment/42159107
accepted answer: http://stackoverflow.com/a/26764111
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42150853
tagged with: submit
has comment: http://stackoverflow.com/comment/42108963
has body: Basically my user inputs code. I can't check whether this code is valid or not(algorithm is a secret). Therefore I send(with form submit) this code to website that checks it (as $_POST variable). I have managed to do that. But how do I: -Not display this webpage (user must stay on my webpage!) -Get part of html from the website, that should not show and use it to fill variables (I know exactly which part of html I am looking for) Can anyone point in the right direction with this problem..
type: Question
has title: Submit form in background and use information in background
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26682579
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26682665
score: 2
upvote count: 2
tagged with: iframe
has answer: http://stackoverflow.com/a/26682772
type: Question
answer count: 2
has body: Right now i am working on a simple HTML/jQuery script where i want to change the iframe height when i'm clicking on a button which is loaded by the iframe it self. Take a look at my code: index.php: iframe.php: The iframe content Click me to resize the holding Iframe! Here is a demo of the index.php: http://beta.sportsdirect.bg/test/ When you open it you'll see the button which is loaded by the iframe. When you click the button the iframe is not changing height! Why, is there a mistake? Can you help me make this thing work ? Thanks in advance!
has title: jQuery - Change Iframe height in the onclick event of a button inside the iframe
tagged with: button
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41963847
favorite count: 0
has comment: http://stackoverflow.com/comment/41965895
type: UnansweredQuestion

http://stackoverflow.com/comment/42157874
has text: Thanks very much Slava. What I'm not understanding is why `fn()` and `sum()` both contain the same parameters? Why can't it simply be `return fn();` rather than `return fn(paramOne, paramTwo);`. Simply because if the function really being called is `sum()` then that already contains the parameters?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26790786
type: Comment

http://stackoverflow.com/comment/41958137
comment on: http://stackoverflow.com/a/26677229
type: Comment
has text: It does,you can decide if it fits your necessities or not.It is not about different scripts, everything is about context, as you can see on the example, regions represent DOM elements, so if you know the element you know the region, you use the region to get access to the view instance that is currently displayed on it, that's it. If you cannot access the app/layout/region context under your current one, there is no way that you can get or manipulate the backbone instance of your view, obviously you can access the DOM element with jquery, but it is a diff thing. Thanks,even 4 your -review
score: 0
type: AnswerComment

http://stackoverflow.com/q/26767892
has title: Bootstrap - Issue with Multiple Modals
tagged with: modal-dialog
answer count: 1
has comment: http://stackoverflow.com/comment/42116714
tagged with: twitter-bootstrap
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26768041
type: Question
tagged with: javascript
has body: i am trying to make a bootstrap website, and im having an issue with modals. I can make the first one fine, but when i go to make the second one it just wont open? the only linking tag i can see in the code is: div class="modal fade" id="project-modal1" tabindex="-1" role="dialog" aria-labelledby="project-modal-label" aria-hidden="true" &gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; And this is what i have on the image i want to link: &lt;a href="#" class="thumbnail" data-toggle="modal" data-target="#project-modal1"&gt; &lt;img src="img/port1.jpg" alt=""&gt; &lt;/a&gt; is there abything im missing? as i said, one works fine, but when i add a second and change the "id" it wont load?
tagged with: jquery
score: 0

http://stackoverflow.com/q/26755476
has comment: http://stackoverflow.com/comment/42093360
has answer: http://stackoverflow.com/a/26755585
tagged with: javascript
tagged with: prototype
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/26755585
has body: I'm am by no means an expert on javascript and trying to learn. I've created a simple piece of code that adds a person object and displays it in HTML with some poorly formated strings. As i have two persons (p1 and p2) i would like to have them both added to the div "output". The idea is to create a list of each person object and place the properties in the list items. My question is - how do i display each person object by iteration? Thank you
has answer: http://stackoverflow.com/a/26755722
accepted answer: http://stackoverflow.com/a/26755722
has title: Iterating through objects - Javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26755655
type: Question

http://stackoverflow.com/q/26803142
has comment: http://stackoverflow.com/comment/42179554
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/36726732
has title: Initialize AngularJS Constant using $http.get call response
linked to: http://stackoverflow.com/q/16286605
score: 14
type: AnsweredQuestion
upvote count: 14
has comment: http://stackoverflow.com/comment/42179640
has comment: http://stackoverflow.com/comment/74488542
has answer: http://stackoverflow.com/a/30032481
type: Question
has comment: http://stackoverflow.com/comment/42179697
has comment: http://stackoverflow.com/comment/42180966
tagged with: javascript
has answer: http://stackoverflow.com/a/26805190
has body: How can I initialize my angularjs app contant with reponse of a GET request. For example :- angular.module('A',[]); angular.module('A').run( function ($rootScope,$http){ $rootScope.safeApply = function (fn) { $http.get('url').success(function(result){ // This doesn't work. I am not able to inject 'theConstant' elsewhere in my application angular.module('A').constant('theConstant', result); }); var phase = $rootScope.$$phase; if (phase === '$apply' || phase === '$digest') { if (fn &amp;&amp; (typeof (fn) === 'function')) { fn(); } } else { this.$apply(fn); } }; }); I want to set the constant while my app get initialized and be able to share the constant across my components. What's is the best approach to accomplish this?
answer count: 3
has answer: http://stackoverflow.com/a/36726732
downvote count: 0
accepted answer: http://stackoverflow.com/a/26805190

canvas
tags question: http://stackoverflow.com/q/26749877
tags question: http://stackoverflow.com/q/26831946
tags question: http://stackoverflow.com/q/26831154
tags question: http://stackoverflow.com/q/26820847
tags question: http://stackoverflow.com/q/26778353
tags question: http://stackoverflow.com/q/26729057
tags question: http://stackoverflow.com/q/26808970
tags question: http://stackoverflow.com/q/26821480
tags question: http://stackoverflow.com/q/26815813
tags question: http://stackoverflow.com/q/26815652
tags question: http://stackoverflow.com/q/26783586
tags question: http://stackoverflow.com/q/26771373
tags question: http://stackoverflow.com/q/26686781
tags question: http://stackoverflow.com/q/26688168
tags question: http://stackoverflow.com/q/26710333
tags question: http://stackoverflow.com/q/26692575
tags question: http://stackoverflow.com/q/26774737
tags question: http://stackoverflow.com/q/26787921
tags question: http://stackoverflow.com/q/26745292
tags question: http://stackoverflow.com/q/26728611
tags question: http://stackoverflow.com/q/26731337
tags question: http://stackoverflow.com/q/26802817
tags question: http://stackoverflow.com/q/26784912
tags question: http://stackoverflow.com/q/26831731
tags question: http://stackoverflow.com/q/26735423
tags question: http://stackoverflow.com/q/26783780
tags question: http://stackoverflow.com/q/26726583
tags question: http://stackoverflow.com/q/26703955
tags question: http://stackoverflow.com/q/26683508
tags question: http://stackoverflow.com/q/26742180
tags question: http://stackoverflow.com/q/26828662
tags question: http://stackoverflow.com/q/26772087
tag name: canvas
tags question: http://stackoverflow.com/q/26748238
tags question: http://stackoverflow.com/q/26676726
tags question: http://stackoverflow.com/q/26798635
tags question: http://stackoverflow.com/q/26793321
tags question: http://stackoverflow.com/q/26810440
type: Tag
tags question: http://stackoverflow.com/q/26684334
tags question: http://stackoverflow.com/q/26803708
tags question: http://stackoverflow.com/q/26802908
tags question: http://stackoverflow.com/q/26729636
tags question: http://stackoverflow.com/q/26723324
tags question: http://stackoverflow.com/q/26705803
tags question: http://stackoverflow.com/q/26802117
tags question: http://stackoverflow.com/q/26804679
tags question: http://stackoverflow.com/q/26731947
tags question: http://stackoverflow.com/q/26787587
tags question: http://stackoverflow.com/q/26825636
tags question: http://stackoverflow.com/q/26799037
tags question: http://stackoverflow.com/q/26805884
tags question: http://stackoverflow.com/q/26691046
tags question: http://stackoverflow.com/q/26753792
tags question: http://stackoverflow.com/q/26681635
tags question: http://stackoverflow.com/q/26706912
tags question: http://stackoverflow.com/q/26806614
tags question: http://stackoverflow.com/q/26759079
tags question: http://stackoverflow.com/q/26816977
tags question: http://stackoverflow.com/q/26713073
tags question: http://stackoverflow.com/q/26818127

http://stackoverflow.com/comment/42205060
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26817059
has text: I just want to know that how can I call more than 1 servlet from same JSP file?

http://stackoverflow.com/a/26754158
type: Answer
answers question: http://stackoverflow.com/q/26753668
has body: you can try this one : $("div[id^='unlink_']").click(function(){ alert($(this).attr("id")); });
score: 0

http://stackoverflow.com/comment/42114642
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26766400
type: Comment
has text: How would I go about applying a class to `attr(placeholder)`? The `content` rule doesn't allow html.

http://stackoverflow.com/a/26744957
type: Answer
answers question: http://stackoverflow.com/q/26736067
score: 0
has body: Assuming the files actually eventually get served, the issue cannot be with the code. Here are a couple places I would suggest you look at to find the problem Do you have a lot of files in the '/build/assets/' folder? This may increase the disk seek time to find the requested file Is the disk slow? Are there other processes tying up the disk? Are there some large files that are taking a long time to serve and hence blocking the requests for the other files

http://stackoverflow.com/a/26710669
accepted answer of: http://stackoverflow.com/q/26710530
score: 0
type: Answer
upvote count: 1
downvote count: 1
has body: I dont't know how to do it in jsp but in our html and mvc project we create some layout pages which consists same background, menu etc. You can use layout page, and call it example pages. By using layout you get one template, different content for different users. Maybe this helps MVC Layout Usage 1 MVC Layout Usage 2
answers question: http://stackoverflow.com/q/26710530
type: AcceptedAnswer

http://stackoverflow.com/comment/42185454
type: QuestionComment
comment on: http://stackoverflow.com/q/26806188
has text: What happens if you keep the input type as hidden, but remove the `:hidden` from the Jquery?
score: 0
type: Comment

http://stackoverflow.com/comment/42271429
score: 0
comment on: http://stackoverflow.com/q/26744163
type: Comment
type: QuestionComment
has text: I don't mind helping but I need some info. What is the desired result of your code. Are you just trying to create html tables on a button click using jquery?

http://stackoverflow.com/comment/41989407
type: AnswerComment
score: 0
type: Comment
has text: the error showing in the console log is `SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 94 of the JSON data`. this is the curly ending brace of 1st object.
comment on: http://stackoverflow.com/a/26697287

http://stackoverflow.com/q/26697799
type: Question
has answer: http://stackoverflow.com/a/26698162
has answer: http://stackoverflow.com/a/26710223
has comment: http://stackoverflow.com/comment/42074979
has comment: http://stackoverflow.com/comment/41989991
has title: Retrieve value from password field
answer count: 2
has body: On a page like this, what kind of code could I write to prevent the page from sending a GET request (or a POST request)? Page: Let's do the login thing Code: d3.select("#keyform").on("submit", function () { console.log(d3.select('#key').property("value")); return false; }); I intend to capture the value of the password on submit, run it through md5 and send it to a server to compare with a hash in a database. But clicking "submit" causes the page to send a GET, which is undesirable.
has comment: http://stackoverflow.com/comment/41991041
tagged with: javascript
score: 0
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41989933
has comment: http://stackoverflow.com/comment/41991034
tagged with: http

http://stackoverflow.com/q/26754939
type: Question
tagged with: google-maps
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26757427
has title: google getLocation function not work in my script
has body: Hi all I need to show a google map in my site with my home like marker ( I use a store position for it) and centered in a user position. I try with: &lt;script&gt; var myCenter = new google.maps.LatLng('xxx'); var userCenter; function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } } function showPosition(position) { var latlon = position.coords.latitude + "," + position.coords.longitude; userCenter=new google.maps.LatLng(latlon); } var marker; function initialize() { var mapProp = { center: userCenter, zoom:15, mapTypeId:google.maps.MapTypeId.ROADMAP }; var map=new google.maps.Map(document.getElementById("googleMap"),mapProp); marker=new google.maps.Marker({ position:myCenter, }); marker.setMap(map); var infowindow = new google.maps.InfoWindow({ content:"Casa" }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; if I don't use userCenter and use MyCenter the map works and show it centered in MyCenter.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26757427

http://stackoverflow.com/a/26779795
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26779406
upvote count: 1
type: Answer
has body: If you listen to the change event on the element, you'll know when a file have been selected: $('input').change(function(){ console.log($(this).val()); }); You can use $(this).val(), if you want to show the filename. If you don't want to use jQuery, you're looking for the onchange event. Fiddle: http://jsfiddle.net/cphutg90/

http://stackoverflow.com/comment/44596411
score: 0
has text: @NaveenReddy Did you figure it out? I'm having the same scenario.
comment on: http://stackoverflow.com/q/26762265
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26725116
accepted answer of: http://stackoverflow.com/q/26725051
answers question: http://stackoverflow.com/q/26725051
has body: Use _.filter (returns a subset of a collection given a predicate function): _.filter(list, function(x) { return primary_key_list.indexOf(x.pk) &gt; -1; });
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/a/26809345
type: Answer
has comment: http://stackoverflow.com/comment/42191835
has comment: http://stackoverflow.com/comment/42201304
has comment: http://stackoverflow.com/comment/42227637
has comment: http://stackoverflow.com/comment/42215047
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42227769
has comment: http://stackoverflow.com/comment/42210108
has comment: http://stackoverflow.com/comment/42208399
answers question: http://stackoverflow.com/q/26808454
downvote count: 0
has comment: http://stackoverflow.com/comment/42227021
has comment: http://stackoverflow.com/comment/42231311
has comment: http://stackoverflow.com/comment/42226141
has body: Short answer: I think you are misunderstanding what $resource is, since you're trying to use it as you would use $http. $resource is a "wrapper" around $http to provide a Object Oriented CRUD way to interact with a RESTful api. (DOCS explain it well and provide good examples) From your URL, I don't think you're actually using a REST api so it would probably be better to use $http service instead of using $resource service. Regardless, here's a working fiddle. Resource and REST API A resource, in the context of angular, corresponds to a resource in context of REST and so, it will expect your webservice to behave like a RESTful app. To explain it further, let' take your "Friend" as example... (I will be reworking your URLS to better match a REST API) API Definition Take the following REST+CRUD conformant scheme (for a Friend resource) Resource URI Methods allowed Friend Collection api/friend GET, POST Friend api/friend/:id GET, PUT The basic idea here is that each Resource is univocally represented by a URI (that's actually the definition of URI: -> Uniform Resource Identifier) and the HTTP Method (Verb) is used to define the action that will be performed on said Resource. Of course, REST is much more than this and I suggest you read this SO POST or this funny article or even Roy Fielding's dissertation (the guy that came up with REST) that explain the concept a lot better than I ever can hope for. URL Structure This issue is prone to hot debate, and you can read some interesting points here in this SO Post and an article from Roy Fielding partially addressing this too. To sum up, REST does not require clean URLs. Actually, it doesn't require ANY kind of semantically logic URL structure. What REST APIs must be is hypertext-driven, that is, given an entry point (URL), the API must be self explanatory so that a client can "discover" resources and relations by itself, with type of resources given by media-types. That means, if an url changes, the API doesn't break!! So, …

http://stackoverflow.com/a/26761988
has body: Well, you don't have jquery-ui loaded in your fiddle. Your code works fine, I changed the CSS on .slider to position: absolute; ... right: 0; and took out the left property. I don't know if that's what you wanted. But HERE's a working demo. Cheers.
accepted answer of: http://stackoverflow.com/q/26761588
score: 1
answers question: http://stackoverflow.com/q/26761588
has comment: http://stackoverflow.com/comment/42106109
upvote count: 1
has comment: http://stackoverflow.com/comment/42106191
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42105412
type: Answer

http://stackoverflow.com/q/26686281
answer count: 2
has comment: http://stackoverflow.com/comment/41970428
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26686289
linked to: http://stackoverflow.com/q/4244896
score: 0
has title: How to get the value of an object property by using a variable
duplicate of: http://stackoverflow.com/q/4244896
possible better answer: http://stackoverflow.com/a/26686300
has answer: http://stackoverflow.com/a/26686289
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26686300
has body: Here is code I have var person ={ name: 'John' }; var v = 'name'; console.log(person.name); // John console.log(person.v); // undefined console.log(v in person); // true As you can see in the code, person.v returns undefined. I'd like to know if it is possible to print 'John' using variable v.
type: Question

http://stackoverflow.com/a/26763345
score: -1
has body: may be your solution is: $('#btn').click(function(e){ var singleStatus = $('.single-status').text(); alert(singleStatus); if(singleStatus === 'Pending'){ $('.single-status').css('color', '#f2721d'); // This does nothing console.log(singleStatus); // This does nothing... } }); Pending click
has comment: http://stackoverflow.com/comment/42107884
upvote count: 0
answers question: http://stackoverflow.com/q/26763057
has comment: http://stackoverflow.com/comment/42107934
has comment: http://stackoverflow.com/comment/42107844
type: Answer
downvote count: 1

http://stackoverflow.com/comment/42159713
score: 0
type: AnswerComment
type: Comment
has text: Hi and thanks. Did you try it with a private keys vs. the "demo" key? I included the code you suggested for the javascript and changed the keys to the same private keys in the Corona SDK code but can not receive. I'll email the modified code through the Corona Support email with my keys included. Let me know if that works with my keys. For anyone reading this I just want you to know I beleive pubnub is one of the very most innovative products I've seen in a long time and that they really work hard to help developers, even noobs like me. - Thanks PubNub!
comment on: http://stackoverflow.com/a/26770038

http://stackoverflow.com/comment/41961295
score: 0
has text: So which button do you want to remove, the one from jQuery UI? or one within the iframe itself? I don't see any "close" button when I create an `iframe` element.
type: Comment
comment on: http://stackoverflow.com/q/26680835
type: QuestionComment

http://stackoverflow.com/q/26711365
has body: In my app i want to navigate through certain dates. On first click i get the date i need, but on second click it stays the same. var getDate = function() { var d = new Date(); var month = d.getMonth()+1; var day = d.getDate(); var yesterday = d.getDate()-1; var tomorrow = d.getDate()+1; var output = d.getFullYear() + '/' + ((''+month).length&lt;2 ? '0' : '') + month + '/' + ((''+day).length&lt;2 ? '0' : '') + day; $('#yesterday, #tomorrow').click(function () { if (this.id === 'yesterday') { var output = d.getFullYear() + '/' + ((''+month).length&lt;2 ? '0' : '') + month + '/' + ((''+day).length&lt;2 ? '0' : '') + yesterday; $("#today_date").text(output); } else if (this.id === 'tomorrow') { var output = d.getFullYear() + '/' + ((''+month).length&lt;2 ? '0' : '') + month + '/' + ((''+day).length&lt;2 ? '0' : '') + tomorrow; $("#today_date").text(output); } }); $("#today_date").text(output); }; jsfiddle example here http://jsfiddle.net/7LXPq/800/
has comment: http://stackoverflow.com/comment/42013972
has comment: http://stackoverflow.com/comment/42014310
type: Question
has title: Date updated on each click
tagged with: date
has comment: http://stackoverflow.com/comment/42014048
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26711786
tagged with: javascript
tagged with: event-handling
tagged with: jquery
tagged with: click
has comment: http://stackoverflow.com/comment/42014481
has answer: http://stackoverflow.com/a/26711566
type: UnansweredQuestion

http://stackoverflow.com/a/26797870
answers question: http://stackoverflow.com/q/26796942
has body: Seems to be a problem with white space in the initial markup. The white space is not there in the markup returned by your ajax call. Executing this $("#loco-summary tbody").css("white-space", "nowrap"); in the console seems to fix the problem, so id suggest either remove all the white-space in the loco-summary table, or set the white-space using css.
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26796942

http://stackoverflow.com/a/28988212
upvote count: 1
answers question: http://stackoverflow.com/q/26751454
score: 1
accepted answer of: http://stackoverflow.com/q/26751454
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You can try these plugin as it will be helpful for horizontal slider also vertical one with custom arrow and inbuild arrow too http://www.woothemes.com/flexslider/

http://stackoverflow.com/comment/42017458
type: Comment
comment on: http://stackoverflow.com/a/26713241
type: AnswerComment
has text: Nice observation. It will be better if u suggest an example.
score: 0

http://stackoverflow.com/q/26785295
has comment: http://stackoverflow.com/comment/42147306
upvote count: 6
has body: Is it possible to disable hover event in CSS if element have class?
score: 4
has answer: http://stackoverflow.com/a/26785457
has answer: http://stackoverflow.com/a/26785402
downvote count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26785483
favorite count: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42147297
tagged with: css
has title: Is it possible to disable hover event in CSS if element have class?
has comment: http://stackoverflow.com/comment/42147329
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/42092944
type: AnswerComment
type: Comment
score: 1
has text: Shouldn't it be ` `? I'm struggling to apply this to my example...
comment on: http://stackoverflow.com/a/26754987

http://stackoverflow.com/a/26683696
accepted answer of: http://stackoverflow.com/q/26683450
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41966470
score: 1
has comment: http://stackoverflow.com/comment/41966674
answers question: http://stackoverflow.com/q/26683450
has comment: http://stackoverflow.com/comment/41967823
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41966853
has body: Maybe you can use a function like this I made reusing some parts of your code: function scroll(id,show,limit,timeout){ $(window).scroll(function(){ if ($(this).scrollTop() &gt; show) { $(id).fadeIn(); } else { $(id).fadeOut(); } }); $(id).click(function(){ $('html, body').animate({scrollTop : limit},timeout); return false; }); } And then use it like this: scroll(".scrollToTop",160,0,800); where first parameter is class or id you want to be affected, second is the position of the element at certain height (from top), third is limit (where you want to scroll up) and last one is the duration of the animate function. EDIT: You may also like to stop on specific px, not only scroll to top, so I changed the function to set the scrollTop position at your desire.
has comment: http://stackoverflow.com/comment/41966354
downvote count: 0

http://stackoverflow.com/comment/42201797
type: Comment
has text: @Louis you solve my problem! Thanks!!
type: QuestionComment
comment on: http://stackoverflow.com/q/26811857
score: 0

http://stackoverflow.com/comment/42220999
type: Comment
has text: this imageData works with canvas, is there a way to create a generic image object in term of jpeg/png?
comment on: http://stackoverflow.com/q/26825636
score: 0
type: QuestionComment

http://stackoverflow.com/q/26688132
tagged with: casperjs
has comment: http://stackoverflow.com/comment/41974266
has comment: http://stackoverflow.com/comment/41974270
upvote count: 1
has comment: http://stackoverflow.com/comment/41973562
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41974354
has answer: http://stackoverflow.com/a/26689391
has comment: http://stackoverflow.com/comment/41974448
has body: this function works very well, (this gives all &lt;div class = "menuFamille" ..&gt; for each &lt;div class = "menuRayonContent avecLiens" ..&gt; ) function getnb1() { var num1 = document.querySelectorAll(".menuRayonContent.avecLiens .menuFamille");// I get all divs menuFamille each div with class as "menuRayonContent avecLiens" return Array.prototype.map.call(num1, function (e) { try { return (/url\?q=(.*)&amp;sa=U/).exec(e.getAttribute("href"))[1] } catch (err) { return e.getAttribute("href"); } }); } But there div whose class is simply "menuRayonContent" so the result gives 0 and I don't know how to find all divs with class as with or without "avecLiens" and I will proceed as it function getnb2() { var num1 = document.querySelectorAll (".menuRayonContent .menuFamille"); // I get all //divs menuFamille each div with class as "menuRayonContent" return Array.prototype.map.call(num1, function (e) { try { return (/url\?q=(.*)&amp;sa=U/).exec(e.getAttribute("href"))[1] } catch (err) { return e.getAttribute("href"); } }); } This account all &lt;div class = "menuFamille" ..&gt; in the page. and as the page is like this &lt;div class = "menuRayonContent avecLiens" style = "display: block;"&gt; &lt;div class = "menuFamille" idCat = "1024" typecat = "2"&gt; &lt;div class = "menuFamille" idCat = "1025" typecat = "2"&gt; &lt;div class = "menuFamille" idCat = "1026" typecat = "2"&gt; &lt;div class = "menuFamille" idCat = "290" typecat = "2"&gt; &lt;div class = "menuFamille" idCat = "2595" typecat = "2"&gt; .......... ........... &lt;div class = "menuRayonContent " style = "display: none;"&gt; &lt;div class = "menuFamille" idCat = "4024" typecat = "2"&gt; &lt;div class = "menuFamille" idCat = "1325" typecat = "2"&gt; &lt;div class = "menuFamille" idCat = "1226" typecat = "2"&gt; &lt;div class = "menuFamille" idCat = "2590" typecat = "2"&gt; &lt;div class = "menuFamille" idCat = "1595" typecat = "2"&gt; ............. ............. &lt;div class = "menuRayonContent " style = "disp…
has comment: http://stackoverflow.com/comment/42008040
type: Question
has comment: http://stackoverflow.com/comment/41974503
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
has title: CSS and XPath selectors in CasperJS
has comment: http://stackoverflow.com/comment/41974306
accepted answer: http://stackoverflow.com/a/26689391
has comment: http://stackoverflow.com/comment/41974699
tagged with: selectors-api
tagged with: css
has comment: http://stackoverflow.com/comment/42010562
has comment: http://stackoverflow.com/comment/41975691
tagged with: xpath

http://stackoverflow.com/comment/42020888
type: QuestionComment
has text: @FlorinPop that's a very hard task to do manually
score: 2
comment on: http://stackoverflow.com/q/26715036
type: Comment

http://stackoverflow.com/a/26735478
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26735446
has comment: http://stackoverflow.com/comment/42057592
type: Answer
upvote count: 6
accepted answer of: http://stackoverflow.com/q/26735446
has comment: http://stackoverflow.com/comment/42057658
downvote count: 1
has body: it simply prevent the _g value to be null or undefined, if the _g on the right side is null or undefined, _g will be assigned to an empty array. it is like : if(!_g) { _g = []; }
score: 5
has comment: http://stackoverflow.com/comment/42057618
has comment: http://stackoverflow.com/comment/42057756

http://stackoverflow.com/q/26778635
type: Question
score: 3
tagged with: javascript
linked to: http://stackoverflow.com/q/1504717
upvote count: 3
has comment: http://stackoverflow.com/comment/42135164
answer count: 3
has answer: http://stackoverflow.com/a/26778938
has answer: http://stackoverflow.com/a/26779045
has title: Why should you avoid using "is" and "is not"?
type: UnansweredQuestion
tagged with: python
has comment: http://stackoverflow.com/comment/42135125
has body: I just started with Python and my online professor recommended using is and is not only when comparing a value to True, False, or None (or at least that is how I understood what he was saying.) Now in my head, I equate is with the JavaScript === and is not with the JavaScript "!==", and I think it is accepted as best practice to use === and !== as often as you can to avoid forced type conversion. First of all, is it true that we don't want to use is and is not as much as === and !== in JavaScript, and if so, why not?
linked to: http://stackoverflow.com/q/9494404
downvote count: 0
has answer: http://stackoverflow.com/a/26778777
linked to: http://stackoverflow.com/q/2988017
favorite count: 0
has comment: http://stackoverflow.com/comment/42135966

http://stackoverflow.com/q/26770222
score: 1
has comment: http://stackoverflow.com/comment/42120859
tagged with: image
tagged with: dom
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/26770431
has comment: http://stackoverflow.com/comment/42120939
downvote count: 0
tagged with: javascript
has body: I need to get the height and width of an image from it's url and display that image differently based on the orientation of the image (portrait or landscape). I get the image through an API request. I'm currently using the following code, and the code I need help with begins with the line var img = new Image; inside the attachments if statement in the case: 'link' section of the switch statement. FB.api('/', 'POST', { batch: [ { method : 'GET', name : 'user', relative_url : '/me' }, { method: 'GET', name : 'post-ids', relative_url: '/group-id/feed?fields=id', omit_response_on_success : false }, { method : 'GET', name : 'post-data', relative_url : '?ids={result=post-ids:$.data.*.id}&fields=id,actions,application,from,to,message,message_tags,with_tags,picture,place,properties,source,status_type,link,description,caption,attachments,object_id,type,created_time,updated_time,likes.summary(1),comments.summary(1)', omit_response_on_success : false }, { method : 'GET', name : 'post-likes', relative_url : '?ids={result=post-ids:$.data.*.id}/likes?limit=5000', omit_response_on_success : false }, { method : 'GET', name : 'post-comments', relative_url : '?ids={result=post-ids:$.data.*.id}/comments?fields=id,actions,application,from,to,message,message_tags,with_tags,picture,place,properties,source,status_type,link,description,caption,attachments,object_id,type,created_time,updated_time,likes.summary(1)&limit=5000', omit_response_on_success : false } ] }, function (response) { var membody = JSON.parse(response[0].body); console.log('Successful login for: ' + membody.name); var posts = JSON.parse(response[1].body); //console.log(posts); //console.log(posts.data[0].id); var feed = JSON.parse(response[2].body); for(var x = 0; x < posts.data.length; x++) { //console.log(posts.data[x].id); var post = feed[posts.data[x].id]; console.log(post); var entry = ' '; var from_id = post.from.id, from_name = post.from.name, post_id = post.id, type = post.type, created_time = post.created_time; e…
has comment: http://stackoverflow.com/comment/42120796
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42120931
has comment: http://stackoverflow.com/comment/42120972
upvote count: 1
has title: Javascript - Get info for multiple images from their URL, then insert them into DOM

http://stackoverflow.com/a/26691965
answers question: http://stackoverflow.com/q/26690944
downvote count: 0
score: 1
has body: Here is the working fiddle precisely as you want, http://jsfiddle.net/cpbdj4Lm/48/ Basically the idea is to keep HTML string in code. Once there is a click on .picker, just append it to DOM. var pickerHTMLString = '&lt;div class="picker"&gt;&lt;div class="color" id="red"&gt;&lt;/div&gt;&lt;div class="color" id="green"&gt;&lt;/div&gt;&lt;div class="color" id="blue"&gt;&lt;/div&gt;&lt;/div&gt;'; var pickerDOMElements = $.parseHTML(pickerHTMLString); $('.button').click(function (event) { if ($('.picker').length === 0) { $('body').append(pickerDOMElements); // Attach click handler on .color only once it is attached to DOM $('.color').click(function (event) { var chosen_color = $(this).css('backgound-color'); $('.picker').remove(); console.log(chosen_color); }); } else { $('.picker').remove(); } });
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26690944

http://stackoverflow.com/a/26800613
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/26800336
has body: You could do this in CSS3 using the nth-child selector. The nth-child selector accepts simple expressions which you can use to target certain elements in a sequence. .Block{ display:block; height:50px; width:100%; background:red; } .Block:nth-child(5n + 1){ background-color: red; } .Block:nth-child(5n + 2){ background-color: blue; } .Block:nth-child(5n + 3){ background-color: green; } .Block:nth-child(5n + 4){ background-color: orange; } .Block:nth-child(5n + 5){ background-color: purple; } This works by targeting every second element, then every third element etc. meaning the sequence will loop no matter how many 'blocks' you have in your container. Working demo here: .Block { display: block; height: 50px; width: 100%; } .Block:nth-child(5n + 1) { background-color: red; } .Block:nth-child(5n + 2) { background-color: blue; } .Block:nth-child(5n + 3) { background-color: green; } .Block:nth-child(5n + 4) { background-color: orange; } .Block:nth-child(5n + 5) { background-color: purple; } RED BLUE GREEN ORANGE PURPLE RED BLUE GREEN ORANGE PURPLE Browser support for this is IE9+, however polyfills exist if you need to target older browsers. There's some more useful information about how nth-child works here: http://css-tricks.com/how-nth-child-works/
score: 2
has comment: http://stackoverflow.com/comment/42174780
accepted answer of: http://stackoverflow.com/q/26800336
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42174939
has comment: http://stackoverflow.com/comment/42175087
has comment: http://stackoverflow.com/comment/42175026

http://stackoverflow.com/comment/41997410
type: Comment
comment on: http://stackoverflow.com/a/26696065
has text: @nikolas do you mean that the time offset for Athens changes over seasons ?
score: 0
type: AnswerComment

http://stackoverflow.com/q/26713738
tagged with: javascript
has answer: http://stackoverflow.com/a/26713896
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42018172
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: -3
tagged with: css
has body: I have a html page with a requirement to show multiple sections. example: employees, their roles, and departments they belong to etc. I want to have the flexibility of displaying each sections either as an accordian, tabs or any other possible view. Is there a framework/way to make the UI look a specific way either using css/javascript etc.
downvote count: 3
has comment: http://stackoverflow.com/comment/42018077
type: Question
has title: Display of div/section in different ways

http://stackoverflow.com/q/26748692
has answer: http://stackoverflow.com/a/26748952
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26748710
has answer: http://stackoverflow.com/a/26748710
has answer: http://stackoverflow.com/a/31422795
downvote count: 3
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
tagged with: header
answer count: 4
favorite count: 0
has body: I Have one registration and payment page. program flow is like registration > confirmation > payment. After validation and calculation in registration page need to go to confirmation page. My code is &lt;?php ob_start(); session_start(); include("header.php"); include("ini.php"); date_default_timezone_set('Asia/Brunei'); header('Cache-Control: max-age=900'); if (isset($_POST['submit'])) { $error = 0; //validations if ($error &lt;= 0) { //do some calculation header('location:confirm.php'); } } &lt;?php ob_flush(); ?&gt; Control entered in to if ($error &lt;= 0) clause, but stay on the registration page. I tried many ways like header('location:confirm.php', true, 302); instead of header('location:confirm.php'); removed ob_start() and ob_flush() add exit() after header() then it goes to blank page. Also try to use echo '&lt;script type="text/javascript"&gt;'; echo 'window.location.href="confirm.php";'; echo '&lt;/script&gt;'; Then the control goes to confirmation page but url seems to be as registration.php But header('location:confirm.php'); is working fine in my local server. Anybody please help me to resolve this issue.. Is there any alternate way for header(). Looking forward to you guys.. Thanks
has title: Header location is not working on live server
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/32754665
accepted answer: http://stackoverflow.com/a/26748952
type: Question
has comment: http://stackoverflow.com/comment/42081824
score: -2

http://stackoverflow.com/q/26829548
favorite count: 0
upvote count: 3
answer count: 3
has body: I'm getting the error across all browsers. I says "unable to process binding "component"...". I have read quite a number of articles including the requirejs site. I've checked out what can cause the error but I'm lost as to whether they apply to my code or not. To the best of my knowledge, I'm not manually loading anything using the script tag and every module is loaded with requirejs. I created a knockout project using yoman: yo ko. After that components are added using yo ko:component [name of component]. The page loads fine when the most of the time but periodically gives the error below. The frequency seems to be increased when I use two components. I edited the new component and removed the reference to the knockout object and the error still happens though not as frequently. The exact error is as follows: Uncaught Error: Unable to process binding "component: function (){return f}" Message: Mismatched anonymous define() module: function (a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return …
score: 2
has comment: http://stackoverflow.com/comment/42230918
has answer: http://stackoverflow.com/a/26829849
tagged with: requirejs
downvote count: 1
type: AnsweredQuestion
has title: Requirejs with Knockout error: Unable to process binding "component: function (){return f}" - Mismatched anonymous defined() module
has answer: http://stackoverflow.com/a/26834120
accepted answer: http://stackoverflow.com/a/26834120
tagged with: knockout.js
type: Question
possible better answer: http://stackoverflow.com/a/26829849
has comment: http://stackoverflow.com/comment/42227258
has answer: http://stackoverflow.com/a/79192895
tagged with: javascript

http://stackoverflow.com/comment/42171673
has text: Hi Kyojimaru, thanks for the response i am also not very good with math but i will give that a go.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26787996
score: 0

http://stackoverflow.com/a/26685187
has comment: http://stackoverflow.com/comment/41968638
has body: To make the popup appear at all times, I've added the following CSS: .ui-slider-popup { display: block !important; } Also to override any styles applied to the popup via jQuery, you can simply type in the style property followed by !important like I've done above. Moreover, to make the input fields static, you can use the readonly attribute inside the tag, here's your revised HTML structure: Dates: Rangeslider: Here's a jsFiddle Demo.
downvote count: 0
has comment: http://stackoverflow.com/comment/41968776
score: 1
has comment: http://stackoverflow.com/comment/41968527
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26685095
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26685095
type: Answer

http://stackoverflow.com/a/26743764
score: 1
upvote count: 1
has body: As others have pointed out, you are getting the scores from image html instead of having variables tracking it. I created a jsfiddle trying to understand your code. But I cleaned it up too much and looks little bit different. http://jsfiddle.net/sheth/uzagumu7/22/ I created short functions trying to make the code cleaner. var playerScore = 0; var computerScore = 0; var choices = ["Lizard", "Paper", "Scissors", "Spock", "Rock"]; var computerRoll = function () { return 1 + Math.floor(Math.random() * 5); } var resultOfGame = function (playerChoice, computerChoice) { if (playerChoice === computerChoice) { return 0; // tie } else if ( ((playerChoice === 1) &amp;&amp; ((computerChoice === 2) || (computerChoice === 4))) || ((playerChoice === 2) &amp;&amp; ((computerChoice === 4) || (computerChoice === 5))) || ((playerChoice === 3) &amp;&amp; ((computerChoice === 1) || (computerChoice === 2))) || ((playerChoice === 4) &amp;&amp; ((computerChoice === 3) || (computerChoice === 5))) || ((playerChoice === 5) &amp;&amp; ((computerChoice === 1) || (computerChoice === 3)))) { // player wins return 1; } else { return -1; } } Newer version of jsfiddle has image with usemap. Also removed the alert. http://jsfiddle.net/sheth/uzagumu7/78/
type: Answer
answers question: http://stackoverflow.com/q/26741948
downvote count: 0

http://stackoverflow.com/q/26691918
possible better answer: http://stackoverflow.com/a/26692204
has answer: http://stackoverflow.com/a/26692083
favorite count: 0
has answer: http://stackoverflow.com/a/26692204
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
has body: Lets say I have the following for my menu: $(document).ready(function() { alert($('ul li').html()); }); Users Overview As you can see as a return I get: Users Overview Now the problem is that I'm only interested in: Users. Is there a way to only get that as a return without putting it in a div or span? I already tried with .text() but this only gave me the actual text Users (obviously). Thanks in advance
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26692083
has title: Get only direct element value with jquery
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
downvote count: 0

http://stackoverflow.com/a/26971321
score: 1
answers question: http://stackoverflow.com/q/26735616
accepted answer of: http://stackoverflow.com/q/26735616
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/55087369
has body: Finally arrived at a solution. As I had mentioned in the issue description, the page works fine on refresh. So the solution is to refresh the page on load. I used the One time page refresh solution mentioned for the problem, in particular solution given by Cokegod. There is no perceptible difference in loading time. The best part is it works in IE8!
type: Answer
downvote count: 0

http://stackoverflow.com/comment/42062446
type: Comment
has text: It'd be the easiest way to go about it. JSON objects are light and easily parsed by jQuery.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26723934

http://stackoverflow.com/comment/42301575
type: QuestionComment
comment on: http://stackoverflow.com/q/26759527
score: 0
has text: Just a side note, if you're using bootstrap, maybe you can show a modal dialog that is not closable and then close it on success. Also I'd change the options on the ajax call to not be async.
type: Comment

http://stackoverflow.com/comment/42211616
has text: Thanks so much! I'm very new to this, as you can see.
comment on: http://stackoverflow.com/a/26820801
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26693205
has title: Clear url in adressbar with location.hash
answer count: 1
has answer: http://stackoverflow.com/a/26693249
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41981943
has body: How do i use location.hash to change url from: localhost:8080/login.php to localhost:8080 i have tried to to this body onload="location.hash = '1'
tagged with: javascript
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 0

http://stackoverflow.com/q/26811378
has answer: http://stackoverflow.com/a/26811639
tagged with: templates
has title: Angular: get Template URL from parent directive
has body: I understand that I can dynamically set a templateUrl base on an option DOM attribute template-url="foo.html" given the following code: angular.module('foo').directive('parent', function() { return { restrict: 'E', link: function(scope, element, attrs) { // code }, templateUrl: function(elem,attrs) { return attrs.templateUrl || 'some/path/default.html' } } }); However, I need to take this a step further and pass this string one level deeper, to a child directive. Given this HTML: Usage in Main project The child will not be exposed in most cases, so if child-template is set, it needs to implicitly replace templateUrl for all child elements that are located in the parent foo.html. The require: '^parent' attribute passes data from scope to scope, but I'm not seeing this available in templateUrl when it's declared. foo.html Title Directives angular.module('foo').directive('parent', function() { return { restrict: 'E', link: function(scope, element, attrs) { // code }, templateUrl: function(elem,attrs) { return attrs.parentTemplate || 'some/path/default.html' }, scope: { childTemplate: '=childTemplate' } } }) .directive('child', function() { return { restrict: 'E', link: function(scope, element, attrs) { // code }, templateUrl: function(elem,attrs) { return ??? // parent.attribute.childTemplate? || 'some/path/default.html' }, require: '^parent', scope: { childTemplate: '=childTemplate' } } });
tagged with: angularjs
has answer: http://stackoverflow.com/a/26819169
tagged with: angularjs-directive
score: 2
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/26819169
tagged with: angularjs-scope
type: Question
upvote count: 2
accepted answer: http://stackoverflow.com/a/26811639
answer count: 2
has comment: http://stackoverflow.com/comment/42195620
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/26732232
has body: I have using the window.print() function to print the page result. In aspx Page : XXXXXX <FHR:ErrMessage ID="EM" runat="server" visible="false" /> <asp:Panel ID="PanelView" runat="server" Visible="false" > <ucl:uclView ID="XXXViewScreen" runat="server" ></ucl:uclView> </asp:Panel> In user Control Page : / More than 500 lines code / In last line of the page : I have checked the print option in(IE11, IE10, Firefox, Chrome) browsers, working fine in our end. But some other system throws the following error: Anyone can meet out this issue..?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42294337
has title: window.print() throws error in IE Line no 1791 in preview.js
downvote count: 2
has comment: http://stackoverflow.com/comment/42051771
type: Question
has answer: http://stackoverflow.com/a/26865537
score: -2
has comment: http://stackoverflow.com/comment/42254216
has comment: http://stackoverflow.com/comment/42051814
tagged with: javascript
upvote count: 0
answer count: 1
tagged with: .net
linked to: http://stackoverflow.com/q/2555697
tagged with: asp.net
favorite count: 0
accepted answer: http://stackoverflow.com/a/26865537
has comment: http://stackoverflow.com/comment/42253860
has comment: http://stackoverflow.com/comment/42277387
has comment: http://stackoverflow.com/comment/42253946

http://stackoverflow.com/q/26830202
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26830451
downvote count: 0
possible better answer: http://stackoverflow.com/a/26830251
linked to: http://stackoverflow.com/q/3910736
favorite count: 0
has answer: http://stackoverflow.com/a/26830265
upvote count: 2
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26830293
has comment: http://stackoverflow.com/comment/42227422
has answer: http://stackoverflow.com/a/26830245
type: Question
has body: Can you put 2 JavaScript onClick events in a single element, this is what I have tried so far, I've tried calling functions but that wouldnt work either. Message me! Calling functions: function hide(){ document.getElementById('download').style.display='none'; document.getElementById('skype').style.display='none'; } HTML: Message me! However none of them seem to work.
has answer: http://stackoverflow.com/a/26830247
has title: Can I have 2 JavaScript onClick events in a single element?
has comment: http://stackoverflow.com/comment/42227466
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/26830251
accepted answer: http://stackoverflow.com/a/26830245
has comment: http://stackoverflow.com/comment/42227494

http://stackoverflow.com/comment/41965146
comment on: http://stackoverflow.com/a/26683288
has text: Yes it does, they aren't different. A multidimensional array is by definition is an **array of arrays**.
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42018358
has text: Just realised that I cant do a jsfiddle as the script that is being re set by the script above is one to load locally stored fonts. I Will add the script it appears to be defaulting to the question to see if that helps you guys.
type: Comment
comment on: http://stackoverflow.com/a/26713621
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42100543
comment on: http://stackoverflow.com/a/26752511
type: AnswerComment
has text: could You please provide an example using css for a svg circle ?
score: 0
type: Comment

http://stackoverflow.com/comment/42023404
type: AnswerComment
has text: Thanks! There's one more question though. Before this, I always used `ui-sref='about.us'`, but that doesn't work now. What should I change it into now?
type: Comment
comment on: http://stackoverflow.com/a/26716563
score: 0

http://stackoverflow.com/q/26811028
tagged with: payload
score: 1
tagged with: ssl
has title: node.js Check if payload header contains predefined sequence of characters, protocol - TLS
has answer: http://stackoverflow.com/a/26813199
has comment: http://stackoverflow.com/comment/42198492
answer count: 2
downvote count: 0
has body: I need to check, does paket payload header contains some defined data sequence. let's say somethng like "0xABCDEF65432ZZZ". Could you please give me some tips, how to do that. UPD: Protocol is TLS 1.2
tagged with: javascript
favorite count: 0
tagged with: node.js
has comment: http://stackoverflow.com/comment/42196882
type: UnansweredQuestion
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26813043

http://stackoverflow.com/q/26806156
tagged with: angularjs
upvote count: 2
score: 2
type: AnsweredQuestion
has body: I have an array of objects with multiple properties. All of these objects have a object.comment property, but in some is filled with a string ('comment' : 'comment text'), and the others are empty ('comment' : ''). I list the results with an ng-repeat like so: What I'm trying to accomplish is to add a checkbox filter to show only the results which object.comment property is filled when the checkbox is checked, and all results when is unchecked. Here's how my filter looks so far: Cancelled Commented records As you can see, I already have a filter that works on whether the object.cancelled is true or false, but I didn't manage to do the same for when the object.comment is empty or has a string. Any pointers?
has title: Filtering ng-repeat when object property is empty with AngularJS
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/27407325
has answer: http://stackoverflow.com/a/27407325
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26806937
favorite count: 0
tagged with: filter
accepted answer: http://stackoverflow.com/a/26806937

http://stackoverflow.com/comment/42188435
comment on: http://stackoverflow.com/a/26805203
has text: @KenFranqueiro That'd be amazing. Thank you for your help. Even so, if you're interested in refactoring the SimpleQueryEngine to make the inner functions more re-writeable let me know in general and i'll put out a PR
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/42149714
score: 0
type: Comment
has text: Thanks for the feedback. I'll test it on Chrome for Android and see what I can find. I only tested it on Chrome, FF, and IE for Windows so far.
comment on: http://stackoverflow.com/a/26765632
type: AnswerComment

http://stackoverflow.com/q/26697161
tagged with: razor
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/26697233
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/41989054
tagged with: javascript
has comment: http://stackoverflow.com/comment/41989295
type: AnsweredQuestion
has title: Unable to set HTML text into InnerHtml property
downvote count: 0
has body: My application has built in ASP.NET MVC 5. Now, what I am trying to do is that application retrieves the text data from database and generate some html text. So, i can set that html text into a specific div element by assigning innerHtml property. But, when i try to assign that html text into that div it doesn't render. It shows html text. This is my code &lt;script type="text/javascript"&gt; var elem = document.getElementById('discussion'); elem.innerHTML = "@Server.HtmlDecode(@discussionDiv.ToString())"; &lt;/script&gt; Is there any better way that can i use to set that html text into my dom element?
score: 1
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/26697233

http://stackoverflow.com/comment/42024709
has text: Are you logging the exception with the stack trace? Something is going wrong on your page, you'll need to debug it.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26716274

http://stackoverflow.com/comment/42091374
score: 0
type: Comment
type: QuestionComment
has text: Could you add it to a fiddle, pretty sure you can get away with just css for this.
comment on: http://stackoverflow.com/q/26753513

http://stackoverflow.com/q/26712524
has title: Esri JS api 3.11 stopped working with Chrome mobile
answer count: 1
tagged with: javascript
tagged with: esri
score: 0
type: UnansweredQuestion
tagged with: google-chrome
tagged with: dojo
has answer: http://stackoverflow.com/a/31464420
type: Question
tagged with: arcgis-js-api
has body: I've encountered some strange behaviour after out Esri libraries were updated. My code stopped working on Google Chrome mobile browser. I took some code from official samples, and it still has same issue. var esriMap = new Map(mapId, { basemap:"satellite", center :[-97.031, 37.638], zoom :4, slider :false }); on(esriMap, "click", function(){ alert("click esrimap"); }); Alert is displayed on Chrome emulator set to iPhone, on real iPhone. Not displayed on Nexus 5 with Chrome 38, on chrome emulator set to Nexus 5

http://stackoverflow.com/a/26713394
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
has body: I found solution myself. I used below code to check constantly for cookie var attempts = 30; var checkTime startProgressBar(true) checkTime= window.setInterval(function () { var cookieValue = $.cookie('downloadtoken'); if ((cookieValue == token) || (attempts == 0)){ stopDownload(); } attempts --; }, 1000); In finishDownload function i clear cookie and stop progress bar function stopDownload() { window.clearInterval(checkTime); $.cookie('downloadtoken', null); //clears this cookie value stopProgressBar(false); } This is html code for progress bar &lt;div data-bind="visible: stopProgressBar" style="top:248px;left: 320px;"&gt; &lt;img src="../images/ProgressBar.jpg" /&gt; &lt;/div&gt;
type: Answer
answers question: http://stackoverflow.com/q/26680845
accepted answer of: http://stackoverflow.com/q/26680845

http://stackoverflow.com/comment/42108341
score: 0
type: Comment
type: QuestionComment
has text: My bad, I got thrown off by seeing position:fixed on #test.
comment on: http://stackoverflow.com/q/26762881

http://stackoverflow.com/a/28289926
upvote count: 3
answers question: http://stackoverflow.com/q/26791179
type: Answer
score: 3
downvote count: 0
has body: Protractor builds on WebdriverJS, which uses an implicit-promise-queuing style of programming. See: https://github.com/angular/protractor/blob/master/docs/control-flow.md What that means is that each statement in a protractor test should be read as enqueuing a promise, not as actually executing. So for example, the line: browser.driver.findElement(By.id('question1')).getText() Does not return text, but returns a promise to return text. You must pass this promise to the other promise-expecting APIs, or provide a direct handler with .then(). The expect call you see in Protractor tests has been modified to wait for a promise to resolve. So something like: expect(name.getText()).toEqual('Jane Doe'); Is actually enqueuing a promise to compare the result of the promise on the left to the value on the right.

http://stackoverflow.com/q/26801097
answer count: 1
has title: AngularJS Material Design code working in Chrome but not in Firefox
tagged with: angularjs
has answer: http://stackoverflow.com/a/26808581
type: AnsweredQuestion
has body: I have made a simple program that displays a toolbar using the AngularJS Material Design framework that works on Google Chrome and Opera,however does not work in Firefox, as in, the toolbar is not displayed,only the text inside it is.The code for the html is as follows: SideNav Test Toolbar: blue-theme When I go to console in Firefox, I get the message "ReferenceError: angular is not defined". Thank you,any help is appreciated.
has comment: http://stackoverflow.com/comment/42175687
tagged with: google-chrome
type: Question
accepted answer: http://stackoverflow.com/a/26808581
tagged with: firefox
tagged with: javascript
score: 0

http://stackoverflow.com/a/26830540
has comment: http://stackoverflow.com/comment/42228046
has comment: http://stackoverflow.com/comment/42227999
upvote count: 1
has comment: http://stackoverflow.com/comment/42228037
answers question: http://stackoverflow.com/q/26830475
type: Answer
has body: try using evt.preventDefault() like this: $('#binBtn_btn').click(function(evt){ evt.preventDefault(); alert('hi'); }); Then it will not go to the next page.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42231117

http://stackoverflow.com/comment/42027212
comment on: http://stackoverflow.com/a/26691621
type: Comment
has text: Are you saying you want the value of 'data-src' to be set from the value of 'src'? That would be done by something like this: `ui.newPanel.find('iframe').each(function() {$(this).data('src',$(this).attr('src'); });`
score: 0
type: AnswerComment

http://stackoverflow.com/q/26755534
type: Question
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26862550
has comment: http://stackoverflow.com/comment/42094269
type: UnansweredQuestion
has body: I have a form whre I add from controller the element: oInput.setValue(oField.value); oInput.attachValueHelpRequest(this.handleValueHelp).setShowValueHelp(true); I have also oField.lookupOfSpecificInput, a string conains the function that I call on server; the lookup is different for each Input Field. The server answer with a list of suggestions. In the handle help function I have: handleValueHelp : function (oController) { var lookupOfSpecificInput=??????????????????? if (! this._oDialog) { this._oDialog = sap.ui.xmlfragment("sap.ui.demo.poa.view.fragment.FrgLookup", this); } this._oDialog.open(); } How can I retrieve the value of lookup from the input for which I need a help?
tagged with: sapui5
has title: Retrieve a value that i not bind

http://stackoverflow.com/q/26746823
possible better answer: http://stackoverflow.com/a/68229236
has title: jQuery UI drag and drop snap to center
favorite count: 0
tagged with: drag-and-drop
upvote count: 2
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26764579
type: Question
answer count: 2
tagged with: jquery-ui
downvote count: 0
has body: I need a little help please. I need to have a blue circle, a red circle, a blue square and a red square. I need to drag the red circle to the center of the red square and the blue circle to the center of the blue square. Unless I drag it to the correct position, it should revert to original position. This is what I have so far: $("#draggable, #draggable2").draggable({ revert: 'invalid', snap: "#droppable2" }); $("#droppable").droppable({ accept: '#draggable' }); $("#droppable2").droppable({ accept: '#draggable2', }); http://jsfiddle.net/tM7cp/269/ I can't position them the circles to the center of the squares, how can I do that?
tagged with: javascript
has answer: http://stackoverflow.com/a/68229236
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26764579

http://stackoverflow.com/comment/41993291
comment on: http://stackoverflow.com/a/26674680
has text: Nope, i just didn't use the destructuring assignment. I added the import for completeness.
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42062716
type: Comment
type: AnswerComment
score: 0
has text: @torazaburo I looked again and again but didnt see where op asked for an explaination, all i see is he asked for a solution which my code gives him.
comment on: http://stackoverflow.com/a/26729580

http://stackoverflow.com/q/26726179
accepted answer: http://stackoverflow.com/a/26726432
upvote count: 0
tagged with: javascript
tagged with: jquery
has title: Rock, paper, scissors jQuery game not working
favorite count: 0
linked to: http://stackoverflow.com/q/1661197
answer count: 3
has answer: http://stackoverflow.com/a/26726219
has comment: http://stackoverflow.com/comment/42041355
has comment: http://stackoverflow.com/comment/42041361
has answer: http://stackoverflow.com/a/26726432
possible better answer: http://stackoverflow.com/a/26726219
has comment: http://stackoverflow.com/comment/42041480
type: AnsweredQuestion
score: -5
has answer: http://stackoverflow.com/a/26726826
has body: Doing a Rock, paper, scissors, spock, lizard game, and it's not working. Im sure i wasnt writing it correctly, but wanted to do as much as i could before i asked for help. So yeah, it doesnt work :/ Jsfiddle - http://jsfiddle.net/yo5Lnmqn/ html - Lizard, paper, scissors, spock, rock JS- $(function(){ $(document).on('click', '.game-image', function(event) { var value = event.target.data('value'); var comproll = 1 + Math.floor(Math.random() * 5); //$('#comproll').html('Result: '+comproll) if (#comproll === 1) { comp = "Lizard"; } else if (#comproll === 2) { comp = "paper"; } else if (#comproll === 3) { comp = "scissors"; } else if (#comproll === 4) { comp = "Spock"; } else if (#comproll === 5) { comp = "Rock"; } if (#game-image === comproll) { #win = "This ends in a tie" } else if (game-image === 1) { if (comproll === 2, 4) { #win = "You win, comp choose" + comp + "."; } else if (comproll === 3, 5){ #win = "You lose, comp choose " + comp + "."; } else if (game-image === 2) { if (comproll === 4, 5) { #win = "You win, comp choose" + comp + "."; } else if (comproll === 1, 3){ #win = "You lose, comp choose " + comp + "."; } else if (game-image === 3) { if (comproll === 1, 2) { #win = "You win, comp choose" + comp + "."; } else if (comproll === 4, 5){ #win = "You lose, comp choose " + comp + "."; } else if (game-image === 4) { if (comproll === 3, 5) { #win = "You win, comp choose" + comp + "."; } else if (comproll === 1, 2){ #win = "You lose, comp choose " + comp + "."; } else if (game-image === 5) { if (comproll === 1, 3) { #win = "You win, comp choose" + comp + "."; } else if (comproll === 2, 4){ #win = "You lose, comp choose " + comp + "."; } });//closes play function });// closes function as usual, thanks, u guys are awesome.
downvote count: 5
type: Question
has comment: http://stackoverflow.com/comment/42041383

http://stackoverflow.com/comment/41947318
type: QuestionComment
has text: Nice! Make sure you accept one of the other answers if that has worked for you.
score: 0
comment on: http://stackoverflow.com/q/26673687
type: Comment

http://stackoverflow.com/comment/42122099
type: Comment
comment on: http://stackoverflow.com/a/26770912
has text: if you do not to get undefined then fill the buffer the randowm value at begining var serial_no="148934" and var serial_no12="148934"
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42227344
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26819761
type: Comment
has text: unfortunately, as noted in my original post, this actually doesn't solve my problem. There is something on my site that is preventing default behavior. Please see these two screenshots to illustrate what I am saying. http://beta.life.edu/life.png and http://beta.life.edu/overflow.png As you can see in the 2nd screenshot, the address bar collapses when scrolling. This does not happen on the Life site, as shown in the 1st screenshot. I have built several other sites where this behavior occurred by default.

http://stackoverflow.com/comment/42110392
score: 0
comment on: http://stackoverflow.com/q/26764597
type: Comment
type: QuestionComment
has text: I have 32.0.3 updating to latest version now

http://stackoverflow.com/a/26761188
score: 1
has body: sed 's#\(/\*bash_var\*/ *var foo = \).*\(; */\*end_bash_var\*/\)#\10\2#' If it is just the value of the foo in this context
downvote count: 0
answers question: http://stackoverflow.com/q/26760523
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42156320
comment on: http://stackoverflow.com/a/26788611
type: AnswerComment
has text: Rahul, the fiddle works, but I'm getting a syntax error as well.
score: 0
type: Comment

http://stackoverflow.com/comment/42048453
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26730377
has text: Also check this- url: 'url' (in ajax call). Dont use it as a string. It is a variable, which is passed to a function.

http://stackoverflow.com/a/26713383
has comment: http://stackoverflow.com/comment/42017734
has comment: http://stackoverflow.com/comment/42017806
has comment: http://stackoverflow.com/comment/42017538
accepted answer of: http://stackoverflow.com/q/26713270
has comment: http://stackoverflow.com/comment/42018369
has comment: http://stackoverflow.com/comment/42017480
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42017679
has comment: http://stackoverflow.com/comment/42017567
has comment: http://stackoverflow.com/comment/42017673
has comment: http://stackoverflow.com/comment/42018631
type: Answer
has comment: http://stackoverflow.com/comment/42017601
has comment: http://stackoverflow.com/comment/42017832
has comment: http://stackoverflow.com/comment/42017899
score: 1
answers question: http://stackoverflow.com/q/26713270
upvote count: 1
has body: Try this code &lt;a href="#" onclick="callServlet()"&gt;&lt;img src="https://www.paypalobjects.com/webstatic/en_US/btn/btn_buynow_pp_142x27.png" alt="PayPal - The safer, easier way to pay online!"&gt;&lt;/a&gt; EDIT: Finally we discovered that a servlet should be mapped without extension and doGet method is used to get the request from javascript.

http://stackoverflow.com/a/41453430
score: 1
has body: After trying a handful of strategies for fixing this problem I ended up just giving up but then while solving another issue I tried again and all of sudden the --watch flag was finally working. To be honest I do not know what specifically made it work but after performing the following steps it just started working: 1. Install most recent gcc version $ sudo port install gcc48 $ sudo port select --set gcc mp-gcc48 2. Install most recent clang version $ sudo port install clang-3.6 $ sudo port select --set clang mp-clang-3.6 3. Export variables holding the patch to C and C++ compiler $ export CC=/opt/local/bin/clang $ export CXX=/opt/local/bin/clang++ It might have happened that while installing these packages some dependency just added the missing piece of the puzzle, who knows ... Hope this help anyone struggling out there to make it working.
answers question: http://stackoverflow.com/q/26708205
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42183435
type: QuestionComment
comment on: http://stackoverflow.com/q/26804855
has text: I cannot reproduce. Which browser are you using? What output are you getting? Why do you expect it to be the same?
score: 0
type: Comment

http://stackoverflow.com/a/26696065
answers question: http://stackoverflow.com/q/26695604
downvote count: 0
has comment: http://stackoverflow.com/comment/42000671
has comment: http://stackoverflow.com/comment/41997127
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41997410
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42001086
has comment: http://stackoverflow.com/comment/42000397
has comment: http://stackoverflow.com/comment/42000479
type: Answer
has comment: http://stackoverflow.com/comment/42000276
has body: Actually your machine is not aware of 'Europe/Athens' time zone so you have to define it. How to do this ? refer to here : http://fullcalendar.io/docs/timezone/timezone/ Timezone string (like "America/Chicago") Use this mode if you store timezone information for your events and you want them displayed in a timezone that can be customized. { title: "event1", start: "2013-10-20T02:00:00+09:00" } // ^ ^ // will display as 2:00 | // | // timezone offset will always be +09:00 If you want to fetch TZ settings , usually it is done in server side , but using node.js + moment.js will be easier to for you , please check this : http://momentjs.com/timezone/docs/#/using-timezones/
has comment: http://stackoverflow.com/comment/41997077
has comment: http://stackoverflow.com/comment/41996926
accepted answer of: http://stackoverflow.com/q/26695604
has comment: http://stackoverflow.com/comment/41997467

http://stackoverflow.com/q/26741990
has title: Unable to load AWS SDK in Chrome App
type: Question
upvote count: 2
tagged with: javascript
tagged with: amazon-web-services
favorite count: 0
has answer: http://stackoverflow.com/a/26743946
accepted answer: http://stackoverflow.com/a/26743946
tagged with: google-chrome-app
has body: I'm poking around with this example on writing to an S3 bucket from Javascript in a chrome app, but seem to be getting blocked by permissions. I must include a local copy of the aws sdk: Otherwise I get a: Refused to load the script because it violates the following Content Security Policy The AWS SDK library then fails with: window.localStorage is not available in packaged apps. Use chrome.storage.local instead. Am I out of luck? @Amazon, can you make a version of your SDK for chrome apps?
answer count: 1
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: amazon-s3

http://stackoverflow.com/q/26723856
accepted answer: http://stackoverflow.com/a/26723960
upvote count: 1
has body: I'm trying to determine the height of images in containers and if any image has a height of less than 300 pixels then I want its container height to be set to auto. Here is my code: // This image height is less than 300 pixels. Any help would be appreciated.
type: Question
tagged with: javascript
has title: Get image height and change the image container height to auto
answer count: 3
has answer: http://stackoverflow.com/a/26723960
downvote count: 0
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26724149
has answer: http://stackoverflow.com/a/26739020
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26724149
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/q/26747177
has title: How to call function on text input enter key pressed?
has answer: http://stackoverflow.com/a/26747372
type: Question
has body: I have created a div in a table format that I am using to filter data options. I am having problems with pressing enter from inside the text box. When I press enter, the alert appears, but the page just reloads and isn't properly filtered with any of the options. Can anyone explain to me what is going on? Please let me know if I was unclear or need to explain anything! This is what my filter option bar looks like: HTML: Starts With: Site Status Online Offline Both </td\ > Usage Plan (in MB) Data Plan No Data Plan All Plans\ Javascript: SOLVED: I used jQuery click to call the same function used as the button. $(document).keypress(function(event){ if(event.keyCode == 13){ $('#filter').click(); // validate(); doesn't need to be called from here } });
tagged with: forms
tagged with: keypress
answer count: 2
has comment: http://stackoverflow.com/comment/52550329
downvote count: 0
has answer: http://stackoverflow.com/a/26747242
tagged with: javascript
linked to: http://stackoverflow.com/q/3276794
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
upvote count: 6
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26747242
possible better answer: http://stackoverflow.com/a/26747372
score: 6

http://stackoverflow.com/q/26676533
tagged with: javascript
has comment: http://stackoverflow.com/comment/41952085
score: -1
has comment: http://stackoverflow.com/comment/41952264
has comment: http://stackoverflow.com/comment/41952059
has answer: http://stackoverflow.com/a/26676836
answer count: 1
downvote count: 1
favorite count: 0
tagged with: element
tagged with: console.log
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/41952202
has body: My issue is that logging exactly the same variable value, but accessing it in a different way, yields two different results. console.log(car[1].wheels.radius) logs the integer 20 to the console, since 20 is the value assigned to car[1].wheels.radius. Now, if I log the whole object: console.log(car[1]) and access the element radius manually in the console, I can see that its value is 'NaN'. Same happens when I use car[1].wheels.radius in a calculation, for instance 3.14*car[1].wheels.radius returns NaN, even though this is a multiplication of 3.14, a number, and car[1].wheels.radius, also a number, so it should return a number. Anyone knows what the issue might be?
type: Question
tagged with: object
has title: Different console.log(variable) outcomes for exactly the same variable
linked to: http://stackoverflow.com/q/4057440
accepted answer: http://stackoverflow.com/a/26676836

http://stackoverflow.com/a/26736571
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26733811
has comment: http://stackoverflow.com/comment/42957989
answers question: http://stackoverflow.com/q/26733811
type: Answer
score: 1
upvote count: 1
has body: There are lists of Javascript UI framework which is mentions below. angular.js backbase.js zinoui.js also check the Comparison of Sencha ExtJS and AngularJS

http://stackoverflow.com/comment/42065199
comment on: http://stackoverflow.com/a/26739513
has text: Ok, then you can check if your object has the class if ($(this).hasClass('progress-bar-ok')) { your code }
score: 1
type: AnswerComment
type: Comment

asp.net
tags question: http://stackoverflow.com/q/26788993
tags question: http://stackoverflow.com/q/26756800
tags question: http://stackoverflow.com/q/26739661
tags question: http://stackoverflow.com/q/26699485
tags question: http://stackoverflow.com/q/26762094
tags question: http://stackoverflow.com/q/26711072
tags question: http://stackoverflow.com/q/26736434
tags question: http://stackoverflow.com/q/26682335
tags question: http://stackoverflow.com/q/26764324
tags question: http://stackoverflow.com/q/26788679
tags question: http://stackoverflow.com/q/26745050
tags question: http://stackoverflow.com/q/26754188
tags question: http://stackoverflow.com/q/26777725
tags question: http://stackoverflow.com/q/26799968
tags question: http://stackoverflow.com/q/26751040
tags question: http://stackoverflow.com/q/26700318
tags question: http://stackoverflow.com/q/26750671
tags question: http://stackoverflow.com/q/26772107
tags question: http://stackoverflow.com/q/26757651
tags question: http://stackoverflow.com/q/26707697
tags question: http://stackoverflow.com/q/26769195
tags question: http://stackoverflow.com/q/26756938
tags question: http://stackoverflow.com/q/26685241
tags question: http://stackoverflow.com/q/26778340
tags question: http://stackoverflow.com/q/26820127
tags question: http://stackoverflow.com/q/26685063
tags question: http://stackoverflow.com/q/26802624
tags question: http://stackoverflow.com/q/26785942
tags question: http://stackoverflow.com/q/26775604
tags question: http://stackoverflow.com/q/26716011
tags question: http://stackoverflow.com/q/26790459
tags question: http://stackoverflow.com/q/26686040
tags question: http://stackoverflow.com/q/26697763
tags question: http://stackoverflow.com/q/26801799
tags question: http://stackoverflow.com/q/26686170
tags question: http://stackoverflow.com/q/26782563
tags question: http://stackoverflow.com/q/26802992
tags question: http://stackoverflow.com/q/26825975
tags question: http://stackoverflow.com/q/26820115
tags question: http://stackoverflow.com/q/26822383
tags question: http://stackoverflow.com/q/26779094
tags question: http://stackoverflow.com/q/26724901
tags question: http://stackoverflow.com/q/26816579
tags question: http://stackoverflow.com/q/26734384
tags question: http://stackoverflow.com/q/26779996
tags question: http://stackoverflow.com/q/26673726
tags question: http://stackoverflow.com/q/26680251
tags question: http://stackoverflow.com/q/26754033
tags question: http://stackoverflow.com/q/26732483
tags question: http://stackoverflow.com/q/26796834
tags question: http://stackoverflow.com/q/26756461
tags question: http://stackoverflow.com/q/26828512
tags question: http://stackoverflow.com/q/26734305
tags question: http://stackoverflow.com/q/26797965
tags question: http://stackoverflow.com/q/26765871
tags question: http://stackoverflow.com/q/26814577
tags question: http://stackoverflow.com/q/26792605
tags question: http://stackoverflow.com/q/26794518
tags question: http://stackoverflow.com/q/26794973
tags question: http://stackoverflow.com/q/26748068
tags question: http://stackoverflow.com/q/26738822
tags question: http://stackoverflow.com/q/26685762
tags question: http://stackoverflow.com/q/26751811
tags question: http://stackoverflow.com/q/26718095
type: Tag
tags question: http://stackoverflow.com/q/26805160
tags question: http://stackoverflow.com/q/26688646
tags question: http://stackoverflow.com/q/26800064
tags question: http://stackoverflow.com/q/26718805
tags question: http://stackoverflow.com/q/26732232
tags question: http://stackoverflow.com/q/26752344
tags question: http://stackoverflow.com/q/26796970
tags question: http://stackoverflow.com/q/26693360
tags question: http://stackoverflow.com/q/26754505
tags question: http://stackoverflow.com/q/26740116
tags question: http://stackoverflow.com/q/26763762
tags question: http://stackoverflow.com/q/26762491
tags question: http://stackoverflow.com/q/26740671
tags question: http://stackoverflow.com/q/26702204
tags question: http://stackoverflow.com/q/26822272

http://stackoverflow.com/q/26773062
has body: I would like my JSHint to yell at me when I don't follow Crockford's function conventions - i.e.: "There should be no space between the name of a function and the ( (left parenthesis) of its parameter list. There should be one space between the ) (right parenthesis) and the { (left curly brace) that begins the statement body" Is there an option to enable this? I thought "white":true would work but it doesn't seem to. I know JSLint will complain about this as well. My .jshintrc: { "white": true, "node": true, "browser": true, "esnext": true, "bitwise": true, "camelcase": true, "curly": true, "eqeqeq": true, "immed": true, "indent": 2, "latedef": true, "newcap": true, "noarg": true, "quotmark": "single", "regexp": true, "undef": true, "nomen": false, "unused": true, "strict": true, "trailing": true, "smarttabs": true, "sub": true, "globals": { "angular": false, "d3": false } }
has title: JSHint: Function conventions
tagged with: jshint
answer count: 1
downvote count: 0
tagged with: jslint
tagged with: javascript
score: 1
favorite count: 0
tagged with: node.js
has answer: http://stackoverflow.com/a/28418352
type: UnansweredQuestion
upvote count: 1
type: Question
tagged with: naming-conventions

http://stackoverflow.com/q/26779406
accepted answer: http://stackoverflow.com/a/26780257
favorite count: 0
has body: I have a standard input field: &lt;input type="file"&gt; in my form, but I have it hidden so that I can use my own image for the button (as seen in many answers on stackoverflow) But when using this method, there's no confirmation given to the user that their file was selected, because the standard input box is hidden and so they never see the filename. So my question boils down to this: How can I detect that a file has been selected, and then display something on the page (not an alert box)? Ideally I just want to show a little icon or some text saying "file selected". Jquery is fine but if there's a way to do this without it, I'd much prefer that. Thanks!
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26781814
upvote count: 1
has title: Display confirmation when file has been selected in HTML input field
type: AnsweredQuestion
tagged with: javascript
tagged with: forms
type: Question
has answer: http://stackoverflow.com/a/26780257
answer count: 3
has comment: http://stackoverflow.com/comment/42137096
possible better answer: http://stackoverflow.com/a/26779795
downvote count: 0
score: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26779795

http://stackoverflow.com/comment/42212337
has text: @Ron Are you looking for something like that? Just adjusted the leaf fiddle: http://jsfiddle.net/zcrs6twx/
comment on: http://stackoverflow.com/a/26819771
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42186898
comment on: http://stackoverflow.com/q/26806941
score: 0
has text: You can change `if (arr.indexOf(3) != -1) return true;` to `return arr.indexOf(3) != -1;` because the statements returns true.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42119239
score: 0
type: Comment
type: QuestionComment
has text: Well, you *will* need some modifications there of course (for instance within your script you can just define some fake `window` object with required methods doing nothing, in particular disabling it from trying to read ` ` elements on load). Alternatively you could try to write your own [environment adapter](https://github.com/less/less.js/tree/master/lib) for `jsc` but that's apparently much more work.
comment on: http://stackoverflow.com/q/26767450

http://stackoverflow.com/comment/42035071
type: Comment
has text: That's an excellent point, I was just copying the OP regex, but you're right that was probably a mistake. I've made the change.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26722687

http://stackoverflow.com/comment/41991612
has text: Just a comment about your code. You really should stop using mysql_query, it's deprecated and have a lot of security issue. Consider using PDO or mysqli. Btw, you pass directly the `$_GET['id']` to your function and use it without escaping it. It lets your code open to SQL Injection.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26698790

http://stackoverflow.com/comment/42120876
type: QuestionComment
comment on: http://stackoverflow.com/q/26770001
has text: Ok, note taken thanks
score: 0
type: Comment

http://stackoverflow.com/q/26745691
has title: Import JavaScript Polymer element to Dart
downvote count: 0
tagged with: dart-polymer
type: Question
tagged with: polymer
tagged with: javascript
has body: How do I import a Polymer element made with JS to Dart? Is it possible to use one automatically or do I have to translate its internal JS to Dart?
upvote count: 2
tagged with: dart
answer count: 1
linked to: http://stackoverflow.com/q/24274450
favorite count: 0
has answer: http://stackoverflow.com/a/26750021
type: UnansweredQuestion
score: 2

http://stackoverflow.com/comment/42224354
comment on: http://stackoverflow.com/a/26828424
type: AnswerComment
type: Comment
score: 0
has text: different parts of the object function are called at different times however i need all of it to be encompassed into an object not a function.

http://stackoverflow.com/a/26767891
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42126126
has comment: http://stackoverflow.com/comment/42153142
answers question: http://stackoverflow.com/q/26766941
type: Answer
has comment: http://stackoverflow.com/comment/42147775
has comment: http://stackoverflow.com/comment/42147621
accepted answer of: http://stackoverflow.com/q/26766941
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42125557
has body: You should use something like this: db.collection.update( {'userId':'foL9NpoZFq9AYmXyj', 'details.subPlayer.gameSlug':'0-shooter'}, {'$set': {'details': [{ 'subPlayer': { 'members': { 'squad1':[{'username':'John','death':1}] } } }] } } ) UPD: Also, maybe a better way is to use find().snapshot().forEach(). But I don't know how Meteor supports it. Example: Stats.find({'userId':'foL9NpoZFq9AYmXyj', 'details.subPlayer.gameSlug':'0-shooter' }).map(function (e) { e.details.forEach(function (d) { var squad = 'squad1'; d.subPlayer.members[squad].forEach(function (s) { s.deaths = 10000; }); }); Stats.update({'_id': e._id}, e); });

http://stackoverflow.com/a/27375582
has body: Have you tried putting all your settings in an object and then passing that to the $http request var req = { method: 'POST', url: 'http://example.com', headers: { 'Content-Type': undefined }, data: { test: 'test' }, } $http(req).success(function(){...}).error(function(){...}); See here https://docs.angularjs.org/api/ng/service/$http#setting-http-headers
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26743401

http://stackoverflow.com/a/26717304
type: Answer
score: 2
downvote count: 0
has body: You'll need to loop through the array, determine whether the array entry is the first or not (so that they will be separated with ampersands, and use the JSON field names. var queryString = ""; for ( var i = 0; i++; i &lt; array.length ) { if ( i &gt; 0 ) { queryString = queryString + "&amp;"; } queryString = queryString + array[i]["name"] + "=" + array[i]["value"]; }
upvote count: 2
answers question: http://stackoverflow.com/q/26717228

http://stackoverflow.com/q/26699694
possible better answer: http://stackoverflow.com/a/26699710
has answer: http://stackoverflow.com/a/26699710
has answer: http://stackoverflow.com/a/26699851
accepted answer: http://stackoverflow.com/a/26699851
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has body: I'm currently trying to POST a Submit form with an input for search and get the results via JSON. All project is a Web App that search in some XMLs files for get the POST results. My form in my index.html starts like this: &lt;form method="post" action="/results"&gt; /results is the page where are JSON results in plain text. In other hand, in my script I am trying to get JSON results like this: $("#buttonid").on('click',function(){ $.ajax({ url:'/results', dataType: 'json', type: 'post', cache: false, success: function(data){ $(data).each(function(index,value){ console.log(value); }); } }); }; I can't see the results by console. What can I do? Any advice for solve my problem? Edited: Isn't only a simple typographical error, I solved the issue deleting action="/results" in my form and adding data: $(this).serialize(), in ajax options. Thanks to @foxygen.
score: 0
upvote count: 1
downvote count: 1
has title: Getting JSON result after POST
favorite count: 0

http://stackoverflow.com/q/26771455
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has comment: http://stackoverflow.com/comment/42123037
has comment: http://stackoverflow.com/comment/42123058
upvote count: 0
type: UnansweredQuestion
tagged with: php
has title: how to get a post from a href javascript button
has comment: http://stackoverflow.com/comment/42122995
score: -1
has answer: http://stackoverflow.com/a/26771508
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42123397
has comment: http://stackoverflow.com/comment/42123077
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26771517
has body: im using a template to make my project and there is a button which is a (a href ) styled button I want it use it as post in php to pull data .. but its not working . this is the button Search and i want to use it here ... <?php if(isset($_POST['submit'])) { echo ' '; } ?> but it does not seem to work ..plz help

http://stackoverflow.com/a/26811713
accepted answer of: http://stackoverflow.com/q/26811627
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26811627
has body: Try: $(document).ready(function() { $('#quantity').change(function() { var selectedValue = $('#quantity').find(":selected").text(); if ( selectedValue == '1' ) { $('.message').hide(); } else { $('.message').show(); } }); }); to hide/show the message when the user changes the select box value. Explanation: when the user selects an option from the select box, there will be called a change function the selected option will be stored as string in selectedValue if that value is '1' the message will be hidden otherwise the message will be shown P.S.: This is enough in your case, but if you want to compare the values as numbers, you can use something like this: var selectedValueAsNumber = parseInt(selectedValue); if ( selectedValueAsNumber &lt; 2 ) { ... } else { ... }
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42176355
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26801374
type: Comment
has text: Almost. It is on mouseDown but also how far your are sliding right

http://stackoverflow.com/q/26678829
accepted answer: http://stackoverflow.com/a/26678863
type: AnsweredQuestion
downvote count: 1
has answer: http://stackoverflow.com/a/26678891
type: Question
has title: Append ID of button to input value on click
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26678891
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26678863
favorite count: 0
upvote count: 1
has body: How can I append the id of a button to an input value on button click? Example input (buttons pressed): #en #de #fr #it #es Example output: &lt;input name="langs" value="en,de,fr,it,es,"&gt; This is what I have, but it's not working: $(".lang-btn").click(function() { $(this).toggleClass("active"); $("input[name=languages]").val() += $(this).attr("id") . ","; }); I would then like to be able to re-adjust the inputvalue, removing the id, when the button is pressed again.

http://stackoverflow.com/a/26705061
answers question: http://stackoverflow.com/q/26705040
upvote count: 1
downvote count: 1
has body: isNaN() is not the proper way to test in user input is a number. You have to use parseInt(), like this: parseInt(figWidthInput, 10).
score: 0
has comment: http://stackoverflow.com/comment/42003130
type: Answer

http://stackoverflow.com/q/26719695
tagged with: javascript
has answer: http://stackoverflow.com/a/26724450
score: 0
linked to: http://stackoverflow.com/q/25516078
answer count: 1
tagged with: d3.js
has body: I'm using d3 and I'd like to append a group with basic shapes attached to it, like the following: startEvent (a circle) task (a recangle) endEvent (two circles) since I'm new to d3 I'd like to know how to append each group dynamically depending on the 'shape type' and avoid to append each shape one by one using a foreach. this is the code: var shapes ={ startEvent:function(id,x,y,params){ var radius = 18, cy = Math.floor(Number(y) + radius), cx = Math.floor(Number(x) + radius), g = d3.select('g'); var circle = g.append('circle') .attr('cx', cx) .attr('cy', cy) .attr('r', radius) .attr('id', id); if(params.label!==undefined){ var txt = g.append('text') .attr('y',y).text(params.label); txt.attr('x',Number(x)); txt.attr('y',Number(y)); } return g; }, endEvent:function(id,x,y, params){ // something similar to startEvent, but with two circles instead of one }, task:function(id,x,y, params){ // something similar but with a rectangle } }; passing the data and rendering the elements: svg.selectAll('g') .data(data) .enter() .append(function(d){ params={label: d.meta.name}; return shapes[d.type](d.id,d.x,d.y,params); }); but I'm getting Error: Failed to execute 'appendChild' on 'Node': The new child element is null. I guess that's because I'm returning the selector, any ideas?
has comment: http://stackoverflow.com/comment/42033607
has comment: http://stackoverflow.com/comment/42037608
linked to: http://stackoverflow.com/q/21727202
type: AnsweredQuestion
has title: how to create a dynamic append using d3?
has comment: http://stackoverflow.com/comment/42030747
accepted answer: http://stackoverflow.com/a/26724450
type: Question
has comment: http://stackoverflow.com/comment/42033077

http://stackoverflow.com/a/26738063
score: 0
has body: Yo need to enter: document.getElementById("result").innerHTML = "&lt;img src='yourimg' alt='yourimgtext'/&gt;" where "yourimg" is the image you want to show.
answers question: http://stackoverflow.com/q/26737902
type: Answer

http://stackoverflow.com/comment/42000479
type: Comment
has text: have you checked how to use moment.js or not ?
comment on: http://stackoverflow.com/a/26696065
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42127720
has text: yes. at that time i use this "var fd = new FormData(); fd.append( 'file', input.files[0] );"
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26773257

http://stackoverflow.com/comment/42027590
type: QuestionComment
has text: your question is not so clear to me. Can you post an image about expected result?
comment on: http://stackoverflow.com/q/26718286
score: 0
type: Comment

http://stackoverflow.com/q/26681040
has answer: http://stackoverflow.com/a/26685107
has comment: http://stackoverflow.com/comment/41960917
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41960801
linked to: http://stackoverflow.com/q/1720320
has comment: http://stackoverflow.com/comment/41960839
has body: Is there any way within JS (using Angular / jQuery) to override/change, or create/remove a CSS class? I'm using a library that has predefined classes for particular features of the UI. I want the user to be able to specify some features that are defined in CSS (such as color). The library is using SVG, so I'm not sure if I can use the standard selector methods to add another class (I've not tried, but this might be possible). I could also modify the library to add a method to override the color, but this is not my preferred route if I can easily change CSS classes once loaded. As an example -: I might have a class that's defined in my CSS -: .buttonclass { color: black; } then in the library, this class is used (it's actually used within an SVG tag). I want to be able to change the color: property to something that's defined within javascript as it's user configurable. The specific example is the class is used to define the color of a graph in an SVG graphing library. There's no method in the library to change the color of the line, but I want the user to set this.
has answer: http://stackoverflow.com/a/26681965
has answer: http://stackoverflow.com/a/26682040
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41963683
has answer: http://stackoverflow.com/a/26681331
has comment: http://stackoverflow.com/comment/41965405
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41964033
has title: Over-riding css classes in javascript
tagged with: css
answer count: 4
has comment: http://stackoverflow.com/comment/41960982
score: 0
type: UnansweredQuestion

http://stackoverflow.com/q/26706510
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26707016
score: 1
upvote count: 1
type: Question
has title: Meteor and Mongo AND tag filters with a twist
tagged with: javascript
tagged with: mongodb
has body: Meteor application, where I have a mongo collection that has a tags field. [{name: "ABC", tags: {"@Movie", "#free", "!R"}}, {name: "DEF", tags: {"@Movie", "!PG"}}, {name: "GHI", tags: {"@Sports", "#free"}}] On my UI, there are three groups of checkboxes that are populated on the fly, based on the first letter of the tag name. filter group 1: [ ]Movie [ ] Sports filter group 2: [ ]free filter group 3: [ ]PG [ ]R The filter logic is the following: If filter group is empty then do not filter by that filter group If any checkbox from a filter group is checked, then apply that filter $and should be applied between filter groups (if movies and R checked, then only documents that have tags named "!Movie" and "#free" should be selected I am struggling to build a mongo criteria parameters that follows the above logic. My code currently looks like spaghetti with lots of nested ifs (in pseudo code) if (filter_group1 is empty) then if (filter_group2 is empty) then mongo_criteria= {_id: $in: $("input:checked", ".filtergroup1").map(function() {return this.value})} What would be the right way of doing this?
answer count: 1
has answer: http://stackoverflow.com/a/26707016
downvote count: 0
tagged with: meteor
favorite count: 0
tagged with: mongodb-query

http://stackoverflow.com/comment/42196046
type: QuestionComment
comment on: http://stackoverflow.com/q/26811857
has text: @elclanrs is that an alternative to requirejs? I don't want to give up because of such stupid bug ) Hope you'll help me
score: 0
type: Comment

http://stackoverflow.com/comment/42002457
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26704443
type: AnswerComment
has text: If my JSON looks more like [{"UserName":"Bob","UserId":"1"}] I guess it is necessary to use two $.each statements to get to the element "UserName" ?

http://stackoverflow.com/comment/42133758
comment on: http://stackoverflow.com/q/26776614
score: 0
type: Comment
type: QuestionComment
has text: @Tyler.z.yang-Thanks but since I use handlebars I must use it...

http://stackoverflow.com/q/26705372
upvote count: 1
type: Question
has title: How to select different elements using Selenium?
has comment: http://stackoverflow.com/comment/42004869
has answer: http://stackoverflow.com/a/26707807
downvote count: 0
tagged with: javascript
answer count: 1
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26707807
tagged with: selenium-webdriver
type: AnsweredQuestion
tagged with: java
has body: I had to start using Selenium recently as a website that I crawled had updated to javascript, after seeking some advise here Selenium was recommended as the program of choice in this situation. Using Selenium I am now able to crawl the website and "roughly" get what I want but I would like some guidance on how to select the different elements that I gathered when I crawled the Table. For example, When I use J-Soup to gather the data I get the Whole table like so: docVTS = Jsoup.connect("http://********************").timeout(10000).get(); Elements table = docVTS.select("table.dynlist"); Then I can gather the different parts of that table like this: Elements number = table.select("td:eq(0)"); vtsInt = number.size(); for (int i = 0; i &lt; vtsInt; i++) { ships = table.select("td:eq(1)").get(i).text().replace("&amp;nbsp",""); arr_ships.add(ships); dwt = table.select("td:eq(3)").get(i).text().replace("&amp;nbsp",""); arr_dwt.add(dwt); Is it possible to do the same with Selenium? I currently have: String text = driver.findElement(By.xpath("//div[@id='cphBody_Report_grid']")).getText(); This gets the table but I am unsure as to how I could select the different parts of the table like I do in j-soup. I would welcome any advice. Thank you. Edit: I found this CookBook for Selenium and selectors in general and found it rather helpful when starting with selenium: https://www.simple-talk.com/dotnet/.net-framework/xpath,-css,-dom-and-selenium-the-rosetta-stone/
tagged with: selenium

http://stackoverflow.com/a/26761409
upvote count: 2
score: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/42104844
answers question: http://stackoverflow.com/q/26761310
has comment: http://stackoverflow.com/comment/42104265
type: Answer
has body: If you're using jQuery: $("#target").blur(function() { alert("some text"); }); More info here: http://api.jquery.com/blur/ Otherwise: &lt;script type="text/javascript"&gt; function lostFocus() { alert("some text"); } &lt;/script&gt; &lt;input type="text" id="target" onblur="lostFocus();"&gt;
has comment: http://stackoverflow.com/comment/42104317
has comment: http://stackoverflow.com/comment/42104540

http://stackoverflow.com/q/26678439
tagged with: http://stackoverflow.com/tag/zip
answer count: 0
upvote count: 2
type: UnansweredQuestion
type: Question
has body: I have n Javascript float arrays. My goal is to generate and download a Zip file, using JS only, containing n CSV files, one per array. I am aware of Javascript librairies like JSZip: http://stuk.github.io/jszip/ for generating zip files. I also know how to generate and download a file on the fly using Blob and/or a library like FileSaver.js However, I cannot figure out how to achieve the whole thing, client-side only. Can anybody help me ?
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Generate and download Zip file on the fly in (client-side) JS
score: 2

http://stackoverflow.com/q/26724113
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26724227
upvote count: 1
has body: For example it has isNumber() which uses toString which will detect both primitive numbers and "boxed" numbers. But later in its code it will use typeof which will not detect boxed values. I know that typeof is faster but it will miss boxed values. This issue was brought up in my code base as well, and why I ask the question. Something to the effect of "if you don't use your own functions why would someone else". Is there something I'm missing here: Use of typeof if (typeof isSorted == 'number') { isNumber defenition _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) { _['is' + name] = function(obj) { return toString.call(obj) === '[object ' + name + ']'; }; });
type: Question
has comment: http://stackoverflow.com/comment/42038469
tagged with: underscore.js
score: 1
has title: Why isn't underscore consistent with its type checking?
has comment: http://stackoverflow.com/comment/42038887
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/26685049
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26685012
has body: You are using the assignment operator = here: if(action=0){ when you should be using the comparisson operator == as if(action==0){
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26685012
type: Answer

http://stackoverflow.com/comment/42090430
type: Comment
type: QuestionComment
has text: Please provide a REAL [**fiddle**](http://fiddle.jshell.net/) with your problem...
score: 0
comment on: http://stackoverflow.com/q/26753407

http://stackoverflow.com/q/26719464
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/26704637
score: 0
accepted answer: http://stackoverflow.com/a/26719565
has body: vol7ron showed me how to achieve an effect where an element fades in on scroll down, and fades out on scroll up here: Why does "($(this).css('opacity')==.3)" not work? jsfiddle: http://jsfiddle.net/b7qnrsrz/16/ $(window).on("load", function () { function fade() { $('.fade').each(function () { /* Check the location of each desired element */ var objectBottom = $(this).offset().top + $(this).outerHeight(); var windowBottom = $(window).scrollTop() + $(window).innerHeight(); /* If the object is completely visible in the window, fade it in */ if (objectBottom < windowBottom) { //object comes into view (scrolling down) if ($(this).css('opacity') != 1) { $(this).stop(true,false).fadeTo(500, 1); } } else { //object goes out of view (scrolling up) if ($(this).css('opacity') == 1) { $(this).stop(true,false).fadeTo(500, .3); } } }); } fade(); //Fade in completely visible elements during page-load $(window).scroll(function () { fade(); }); //Fade in elements during scroll }); This works almost perfectly. As is, the boxes wait to fade until I've stopped scrolling. So if I smoothly scroll past three of them, rather than fading one-by-one as I scroll past each one, they all wait to fade in until after I stop scrolling. How can I remedy this so that fade triggers even while scrolling, not waiting until after stopping?
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26719565
has title: Fix delayed jquery fade on scroll
type: AnsweredQuestion

http://stackoverflow.com/q/26790841
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26791025
accepted answer: http://stackoverflow.com/a/26791025
type: Question
has title: Switch among states in ui-router without clicks
tagged with: angular-ui-router
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I am new to angular and ui-router. I have implemented some sample like this. $stateProvider .state('route1', { url: "/route1", templateUrl: "route1.html" }) .state('route2', { url: "/route2", templateUrl: "route2.html" }) This is working fine, but it requires a click. What I am going to do is, the pages will automatically change among different states. And it would start the loop from the first page if it reached the end. Just like a slider. How can I accomplish that?
tagged with: angularjs

http://stackoverflow.com/q/26673726
tagged with: c#
has comment: http://stackoverflow.com/comment/41947170
has title: HttpSessionState returns HTML entity instead of character
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/26688493
tagged with: asp.net
has answer: http://stackoverflow.com/a/26688493
type: AnsweredQuestion
tagged with: asp.net-mvc
has body: A JavaScript function tries to use a string value that was stored in HttpSessionState; the string value also contains Swedish characters (e.g. consider the word MJÖLBY). The problem is that the special character is appeared as an HTML entity &amp;#246; instead of the real character. I tried to fix this by using encoding, but unfortunately it did not help and the result of encoding is undefined. Is there any idea how to pass Ö instead of entity code &amp;#246; for using in JavaScript and before publishing on the browser? Update: In Session_Start(), the string is set by Session["City"] = "MJÖLBY"; and then in JavaScript the value is being read by var city = @Session["City"].ToString();
type: Question

http://stackoverflow.com/comment/42143782
comment on: http://stackoverflow.com/a/26777972
type: AnswerComment
score: 0
type: Comment
has text: if($('.rsNav').children().hasClass("rsNavSelected")) { console.log('works!'); } This works in the console,but i need to know what element is it ( the 1st,the 2nd or the 3rd). Thank you!

http://stackoverflow.com/q/26726604
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42042212
score: 0
has comment: http://stackoverflow.com/comment/42042341
has comment: http://stackoverflow.com/comment/42042298
has title: unable to grab the children div
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42042581
has comment: http://stackoverflow.com/comment/42042186
answer count: 0
has body: I am trying to grab a div inside a divContainer. On a menu mouse over I am grabbing the value of custom data attribute and the name of div to grab. Now the code is: containerNameToGrab = $(this).attr('data-containerName'); It returns menu1Container. Now i added a # using this containerNameToGrab = '#' + containerNameToGrab;. And finally I am trying to find the div using this: currentContainerDiv = $('.mainMenuSlidingContainer').find(containerNameToGrab); Now, when i checked the value of currentContainerDiv it returned Object object. Please tell me where I am doing it wrong. Thanks. OK THE PROBLEM IS SOLVED NOW I USED # directly in data-customattribute and then grabbed the lement. thanks.
has comment: http://stackoverflow.com/comment/42042183
type: Question

http://stackoverflow.com/a/26741454
type: Answer
answers question: http://stackoverflow.com/q/26741319
score: 1
upvote count: 1
has body: 'this' is referring to the instance of your HelloCtrl... $scope is an entirely different object that's already got state and is managed through angular
downvote count: 0

http://stackoverflow.com/comment/42162522
comment on: http://stackoverflow.com/q/26793314
type: QuestionComment
has text: I like these types of questions, where the problem isn't necessarily difficult to solve, but you get a lot of interesting different approaches that accomplish the same thing. (Well, the answers that _work correctly_, anyway.)
type: Comment
score: 2

http://stackoverflow.com/a/26741339
type: Answer
answers question: http://stackoverflow.com/q/26740692
score: 1
upvote count: 1
has body: Solved HTML: ... In AngularJS Controller: $scope.initWaves = function(){ Waves.displayEffect(); }
downvote count: 0

http://stackoverflow.com/a/26677997
score: 2
upvote count: 3
has comment: http://stackoverflow.com/comment/41955671
has comment: http://stackoverflow.com/comment/41956408
type: Answer
has body: PDF files aren't the same as text (or json) files, try using a library like JSPDF to make client sided PDF files.
answers question: http://stackoverflow.com/q/26677904
downvote count: 1

http://stackoverflow.com/q/26701497
has title: Seeking big-picture guidance on how to incorporate a sortable grid into Google Spreadsheet
type: Question
has answer: http://stackoverflow.com/a/26704135
accepted answer: http://stackoverflow.com/a/26704135
tagged with: javascript
tagged with: google-apps-script
score: 0
answer count: 1
tagged with: jquery
has body: I'd like to make a 2x16 grid where you can sort the 16 rows (not items in individual columns) and, for each row, select either the left or the right element. Each grid will have an image, and after you're done, the data will be captured and submitted to a spreadsheet. The grid should be available to multiple users of the same spreadsheet. My first thought was Google Forms, but a) you can only use the default "ranking" button up to 10 ranks, and I need it to go up to 16, and b) there seem to be additional restrictions. I've found jQuery code for a movable grid, but it doesn't seem that you can ask Google Spreadsheet to use the jQuery library (I could be wrong on this, it's my first time using jQuery and I'm poorly self-taught in javascript... my first test was a simple "$(document).ready(function)" but Google Spreadsheets complains that $ isn't defined and that (document) isn't defined. If you can explain how to use jQuery code in the spreadsheet, then I should be good. Alternately, I figured I can try my hand at creating the sortable grid elsewhere, and then transferring the data to Google Spreadsheet. I might try Google Sites. However, I'm not sure a method exists to then transfer that data over to Google Docs. I could make a website where you sort the grid, click a button, and get your output, then I could have the user copy that and paste it into a Spreadsheet sell which is set up to parse the output and feed it into the sheet... but that seems like a lot of work for the people who are inputting data. Thanks for your ideas!
type: AnsweredQuestion

http://stackoverflow.com/q/26743763
has comment: http://stackoverflow.com/comment/42074673
has answer: http://stackoverflow.com/a/26743980
has comment: http://stackoverflow.com/comment/42075072
linked to: http://stackoverflow.com/q/19640531
has comment: http://stackoverflow.com/comment/42074929
has comment: http://stackoverflow.com/comment/42075344
upvote count: 1
has comment: http://stackoverflow.com/comment/42075033
possible better answer: http://stackoverflow.com/a/26743886
favorite count: 0
has body: I have five questions to a user that require user answers. Correct answers are counted and then the user is graded at the end. I would like the grading of each questions to appear immediately after each respective question, not after all have been asked. As it is now, it asks 2 out of 5 questions and then provides a response to the user but only after the questions are all asked. The order is: (ask, ask, answer, answer) but I need it to be (ask, answer, ask, answer) but I can't figure out why it's not doing that. // Counters var numberOfQuestions = 5; var correctAnswers = 0; // The five questions var raining = prompt("Is it raining today?"); var married = prompt("Am I married?"); /* Remaining questions var day = prompt("What day is it?"); var threes = prompt("What does 3 + 3 + 3 equal?"); var number = prompt("What number am I thinking of?"); */ // First question - Is it raining if (raining.toUpperCase() === "NO") { correctAnswers += 1; alert("Correct. \nYou have " + correctAnswers + " correct answers out of " + numberOfQuestions); } else { alert("Don't you wish it was. \nYou have " + correctAnswers + " correct answers out of " + numberOfQuestions); } // Second question - Am I married if (married.toUpperCase() === "YES") { correctAnswers += 1; alert("Correct! I am married. \nYou now have " + correctAnswers + " correct answers out of " + numberOfQuestions); } else { alert("Incorrect, I am married. \n You still have " + correctAnswers + " correct answers out of " + numberOfQuestions); } Any help would be most appreciated.
score: -3
answer count: 4
downvote count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42073274
has title: Why is order of answers not working as desired?
tagged with: if-statement
has answer: http://stackoverflow.com/a/26743886
type: Question
has comment: http://stackoverflow.com/comment/42073322
has answer: http://stackoverflow.com/a/26744275
has comment: http://stackoverflow.com/comment/42075474
has answer: http://stackoverflow.com/a/26743832
accepted answer: http://stackoverflow.com/a/26743832
tagged with: javascript

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/26782224
tags question: http://stackoverflow.com/q/26803161
type: Tag
tags question: http://stackoverflow.com/q/26754157
tags question: http://stackoverflow.com/q/26747667

http://stackoverflow.com/q/26676067
tagged with: controllers
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26676125
type: Question
score: 0
answer count: 1
has body: I want to create a new array of objects from an existing array of objects , such that new array will have only have those objects which matches the condition defined in if statement. Below is the code snippet which i am attempting Requirement is that when key.status=='completed' condition gets hit ,only those object which have status : 'completed' in orders array will get copied to temp array .But because of using angular.copy whole copy of objects is getting copied in temp array . . --------html----- &lt;body ng-app ="myModule"&gt; &lt;div ng-controller="myController"&gt; &lt;div ng-repeat="order in temp"&gt; {{order.id}} -- {{order.status}} -- {{order.name}} &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; -------xxxx------ -------JS---------- &lt;script&gt; var myModule = angular.module('myModule', []); myModule.controller('myController', function($scope) { $scope.orders = [ {id: '101' , status : 'completed' , name: 'Jacopo' } , {id: '102' , status : 'Rejected' , name: 'Dan' } , {id: '103' , status : 'created' , name: 'Erick' } ] ; $scope.temp = [ ] ; angular.forEach($scope.orders , function(key,value){ if(key.status == 'completed') { angular.copy($scope.orders,$scope.temp) } } ); } ) ; &lt;/script&gt; ------xxx--------
tagged with: javascript
tagged with: angularjs
has title: Copying specific objects(according to given condition) from array of objects into an another array in angularJS
tagged with: angularjs-ng-repeat

http://stackoverflow.com/comment/42006367
type: AnswerComment
has text: `add_parent` function is `asynchronous`. could it be detected if it was done executing?
type: Comment
comment on: http://stackoverflow.com/a/26706787
score: 0

http://stackoverflow.com/a/26833172
type: Answer
answers question: http://stackoverflow.com/q/26831105
accepted answer of: http://stackoverflow.com/q/26831105
has body: You can use the following snippet: function splitIntoWords(div) { function removeEmptyStrings(k) { return k !== ''; } var rWordBoundary = /[\s\n\t]+/; // Includes space, newline, tab var output = []; for (var i = 0; i < div.childNodes.length; ++i) { // Iterate through all nodes var node = div.childNodes[i]; if (node.nodeType === Node.TEXT_NODE) { // The child is a text node var words = node.nodeValue.split(rWordBoundary).filter(removeEmptyStrings); if (words.length) { output.push.apply(output, words); } } else if (node.nodeType === Node.COMMENT_NODE) { // What to do here? You can do what you want } else { output.push(node.outerHTML); } } return output; } window.onload = function() { var div = document.querySelector("div"); document.querySelector("pre").innerText = 'Output: ' + JSON.stringify(splitIntoWords(div)); } A word, words within tags should remain intact, so here's even more words It iterates through all child nodes, takes the text nodes and splits them into words (you can do this safely since text nodes can't contain children). This takes care of most issues. With this, HTML such as textTest will come out ["text", "Test"] unlike the answer above. This may fail with There are: 4 words which results in ["There are", ":" /* Extra colon */, "4", "words"] (which it's supposed to do, but not sure if it is desirable). I would think this is very safe with nested elements.
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42233121

http://stackoverflow.com/a/42692187
has body: Meteor.userId(); This code above return a string that is the unique ID of the logged user Meteor.userId() not the whole user object. So you can not attempt to any property . To have the current username do as following: 1 - / In meteor controller var uniqueID = Meteor.userId(); var username = Meteor.users.findOne({_id: uniqueID}).usename; 2 - / In meteor template {{ currentUser.username }}
score: 0
type: Answer
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/26728155

http://stackoverflow.com/q/26792407
has body: I'm using an ng-repeat to list out a set of items in a span tag. The problem is that I run out of room in my div so I need to limit the items. I've tried limitTo:3, but I run into a problem there where some of the words are longer than others so it still runs over. So is there a way I can count the total number of letters and use something like limitTo so I can keep it in the space I have available?
tagged with: javascript
score: 0
answer count: 1
tagged with: angularjs-ng-repeat
has answer: http://stackoverflow.com/a/26792596
tagged with: angularjs
type: UnansweredQuestion
has title: ngRepeat: Limit based on total character length instead of number of items
tagged with: angularjs-directive
type: Question

http://stackoverflow.com/comment/42069309
type: QuestionComment
has text: Have you tried putting the same code in link method an passing element instead of the id? Like this $(element).iviewer(...);
comment on: http://stackoverflow.com/q/26729333
score: 0
type: Comment

http://stackoverflow.com/q/26787794
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/56399976
tagged with: asp.net-web-api2
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/26860208
tagged with: odata
favorite count: 0
has answer: http://stackoverflow.com/a/26788763
tagged with: angularjs
type: Question
has title: Breeze js calls metadata but doesn't make a second call to the server
tagged with: breeze
upvote count: 2
answer count: 3
has body: am writing an angular application using breeze js and asp.net odata controller. Breeze JS makes the first call to the server for metadata successfully but doesn't make the second call to actually get the data. What i can see in Chrome is XHR finished loading: GET "http://localhost:31549/Odata/ClientInvestments/$metadata". which returns &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"&gt; &lt;edmx:DataServices m:DataServiceVersion="3.0" m:MaxDataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"&gt; &lt;Schema Namespace="Cadiz.Services.CadizOnline.Contracts.ClientInvestmentsService.DataContracts" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"&gt; &lt;EntityType Name="ClientInvestment"&gt; &lt;Property Name="InvestmentNumber" Type="Edm.String" /&gt; &lt;Property Name="Initials" Type="Edm.String" /&gt; &lt;Property Name="InvestorFirstName" Type="Edm.String" /&gt; &lt;Property Name="InvestorLastName" Type="Edm.String" /&gt; &lt;Property Name="InvestorNumber" Type="Edm.String" /&gt; &lt;Property Name="BrokerCode" Type="Edm.String" /&gt; &lt;Property Name="UnclearedUnits" Type="Edm.Decimal" /&gt; &lt;Property Name="UnclearedMarketValue" Type="Edm.Decimal" /&gt; &lt;Property Name="BlockedUnits" Type="Edm.Decimal" /&gt; &lt;Property Name="BlockedMarketValue" Type="Edm.Decimal" /&gt; &lt;Property Name="TotalUnits" Type="Edm.Decimal" /&gt; &lt;Property Name="NavDate" Type="Edm.DateTime" /&gt; &lt;Property Name="NavCents" Type="Edm.Decimal" /&gt; &lt;Property Name="CurrentValue" Type="Edm.Decimal" /&gt; &lt;Property Name="FundName" Type="Edm.String" /&gt; &lt;Property Name="FundCode" Type="Edm.String" /&gt; &lt;Property Name="ProductName" Type="Edm.String" /&gt; &lt;Property Name="ProductCode" Type="Edm.String" /&gt; &lt;Property Name="ProductType" Type="Edm.String" /&gt; &lt;Property Name="EntityCode" Type="Edm.String" /&gt; &lt;Property Name="In…

http://stackoverflow.com/comment/42089347
comment on: http://stackoverflow.com/q/26734464
type: Comment
type: QuestionComment
has text: Hey @TheUIXHouse, You must write individual function for each textbox in order get things going..
score: 0

http://stackoverflow.com/comment/42065908
has text: @DavidSherret the requirement is to return the value instead of alerting it but for testing purposes i had alerted it. either way, unfortunately we have not covered either of those methods yet therefore we cannot use them :(
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26739694
score: 0

http://stackoverflow.com/comment/42111637
has text: @NicholasKyriakides Yes, because there is no existing JS that attempts to do that.
score: 0
comment on: http://stackoverflow.com/q/26765277
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26805527
has comment: http://stackoverflow.com/comment/45076946
type: Question
has title: How do I make Protractor wait for a triggered promise to resolve?
accepted answer: http://stackoverflow.com/a/28376882
tagged with: protractor
tagged with: javascript
score: 4
upvote count: 4
answer count: 1
downvote count: 0
favorite count: 0
has body: So I have a site where upon clicking a button, it sends off to an angular service, which makes a promise, resolves it, gets some data, and displays that data on the page. I want an angular test that finds the button, clicks it, and verifies that I got data back. However, the test always finishes before the button resolves. I tried browser.sleep(), but that only paused things an the promise was never resolved. Many other promise-related questions here regarding protractor don't help, because the promise was not set up in the test, but by the page itself. Here is my test: it('should roll a d2', function () { element(by.id('d2Button')).click(); //whatever has to be here for the waiting to occur expect(element(by.binding('rolls.d2')).getText()).not.toEqual('0'); }); Here is the HTML: Roll Here is a brief summary of the angular code called on the click: $scope.rollD2 = function () { diceService.getD2Roll($scope.quantities.d2).then(function (data) { $scope.rolls.d2 = data.roll; }); }; And here is the service call: function getD2Roll(quantity) { var url = "Dice/D2/" + quantity; return getPromise(url); } function getPromise(url) { var deferred = $q.defer(); $http.get(url).success(deferred.resolve).error(deferred.reject); return deferred.promise; } How do I make the test wait correctly?
tagged with: angularjs
tagged with: angular-promise
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28376882

http://stackoverflow.com/q/26780840
has answer: http://stackoverflow.com/a/26781098
tagged with: angularjs
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26781483
type: Question
has answer: http://stackoverflow.com/a/26781483
has body: I have created an angularjs application for printing the Indian people count as well as those who have vote eligible count values, The application is working fine but i dont know how to get indians and vote eligible counts while iterating Working Demo Can Vote : Indians : {{getIndiansCount(emp.country, indiansCount)}} {{empl.country}} {{empl.employee.name}} {{empl.employee.canVote}} Can anyone please tell me some suggestion for this
score: 0
has title: AngularJS: Count while iterating in nested ng-repeat
accepted answer: http://stackoverflow.com/a/26781098
answer count: 2
tagged with: javascript

http://stackoverflow.com/comment/42108450
score: 0
type: Comment
type: QuestionComment
has text: Sorry, im click repetitively anything i see to the left but the only thing that is happening is it expands with some more details. So i labeled them, was it 1,2 or 3? http://prntscr.com/53bsp6
comment on: http://stackoverflow.com/q/26762697

http://stackoverflow.com/q/26791879
has answer: http://stackoverflow.com/a/26791899
type: Question
has body: I have a table 'mytable' that looks like: 11 2014-11-06 18:49:26 MESSAGE MATCH5 NO MATCH NO MATCH I want to get the value of column 4 "MESSAGE" from a row if its checked. In How to get value of table cell with jquery from checkbox using absolute row number it was shown that var ids = $('table input:checked').map(function(){ return $(this).closest('tr').find('td:eq(3)').text(); }); returns Object["MESSAGE"] How can I get just the contained text/html ?
has title: How to get the value out of Object[value] in javascript/jquery
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26791899
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/26788050

http://stackoverflow.com/q/26801150
score: 0
has comment: http://stackoverflow.com/comment/42175762
has comment: http://stackoverflow.com/comment/42175726
has comment: http://stackoverflow.com/comment/42177156
has answer: http://stackoverflow.com/a/26801209
accepted answer: http://stackoverflow.com/a/26801209
upvote count: 2
downvote count: 2
type: AnsweredQuestion
has title: Jquery not detecting my change event on text input
type: Question
has comment: http://stackoverflow.com/comment/42175763
has comment: http://stackoverflow.com/comment/42176090
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42175754
favorite count: 0
has body: I'm a little bit confused. I am trying to add a change event to a text. This is my html: &lt;input type="text" id="tag_search" placeholder="Start typing to search tags..." name="tag_search" size="33"/&gt; This is my script $("#tag_search").change(function(){ alert('Typing'); }); I'm aware that the change event will only fire once the input element loses focus but even when I do that the alert does not display. but it will not work at all. Can anyone help me.

http://stackoverflow.com/q/26747172
tagged with: asp.net-mvc-3
upvote count: 1
tagged with: razor
has title: Submit Button not responding in MVC3
downvote count: 1
has comment: http://stackoverflow.com/comment/42079508
has comment: http://stackoverflow.com/comment/42079926
type: Question
has comment: http://stackoverflow.com/comment/42079893
has comment: http://stackoverflow.com/comment/42079940
tagged with: javascript
has comment: http://stackoverflow.com/comment/42079837
has comment: http://stackoverflow.com/comment/42079552
has comment: http://stackoverflow.com/comment/42079991
favorite count: 0
has comment: http://stackoverflow.com/comment/42081895
answer count: 0
type: UnansweredQuestion
score: 0
has body: I have been working on ASP MVC3 but the submit button is not responding and if i use URL Action ( ) its redirection to GET and the model is empty but my POST is not working The controller is as follows [HttpPost] public ActionResult MarketAdmin(Reports report) { //my Code return View(); } [OutputCache(Location = OutputCacheLocation.None, Duration = 0)] public ActionResult MarketAdmin( ) { //my Code return View(); } The view is as follows @using XXXX.AdminPortal.Helpers; @model XXXX.Domain.Model.Reports @{ ViewBag.Title = "Reports"; } @using (Html.BeginForm("MarketAdmin", "AdminDashboard", FormMethod.Post, new { enctype = "multipart/form-data", id = "AdminDashboard" })) { $(document).ready(function () { $("#StartDate2").attr("readonly", "true"); $("#EndDate2").attr("readonly", "true"); $("#StartDate2").datepicker({ maxDate: -1 }); $("#StartDate").datepicker({ maxDate: -1 }); $("#EndDate2").datepicker({ maxDate: -1 }); $("#EndDate").datepicker({ maxDate: -1 }); $('#DateSubmit2').click(function () { alert(startDate1); alert(endDate1); var startDate1 = $('#StartDate2').datepicker('getDate'); var endDate1 = $('#EndDate2').datepicker('getDate'); if (startDate1 == null) { alert("Please enter Start Date."); $("#StartDate2").val(""); $("#StartDate2").focus(); return false; } else { if (endDate1 == null) { alert("Please enter End Date."); $("#EndDate2").val(""); $('#EndDate2').focus(); return false; } else { if (startDate1 >= endDate1) { alert("Start Date should be less the End Date"); $("#StartDate2").val(""); $('#StartDate2').focus(); return false; } } } // $("#StartDate").val(startDate1); alert(startDate1); alert(endDate1); }); //code continues @* *@ Dashboard XXX XXX Reports @Html.LabelWithStyleFor(model => model.StartDate, new { @class = "text" }) @Html.TextBoxFor(model => model.StartDate, new { @class = "inputtext", id = "StartDate2", name = "start_date" }) @Html.ValidationMessageFor(model => model.StartDate) @Html.LabelWithStyleFor(model => model.EndDate, new { @class …

http://stackoverflow.com/q/26747339
tagged with: css
possible better answer: http://stackoverflow.com/a/26747777
has comment: http://stackoverflow.com/comment/42080098
has comment: http://stackoverflow.com/comment/42079873
has answer: http://stackoverflow.com/a/26747777
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26747445
tagged with: javascript
has comment: http://stackoverflow.com/comment/42079901
score: 0
answer count: 2
has body: Got a product loop, where I need to change images on click. Like in every product loop, there is a whole bunch of divs with same classes. Which in my case get affected. Can't isolated them. Initial image does disappear. But not a single one, that's intended, but all of them. And no new images appear html of the single product and jquery $(".product").each(function () { $(this).find(".galcolor2").click(function () { $(".galitem").hide(); $(this).parent().find(".galitem2").show(); }); }); http://jsfiddle.net/h1twaf1y/
has answer: http://stackoverflow.com/a/26747445
tagged with: jquery
has comment: http://stackoverflow.com/comment/42079760
has title: jquery: run script without affecting divs with same classes
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/41055861
upvote count: 5
score: 4
has body: We did a prototype of doing exactly what you want to do, as part of this we created - https://github.com/PeculiarVentures/js-zxing-pdf417 which handles the PDF417 parsing. This solution is 100% client side. We found issues with camera resolution and lack of autofocus, but if you are reading the code from a file you will have no problem. I am also confident with some pre-processing on the webcam captured pictures (frame averaging, sharpening filters, etc) you can even get the web camera case to work reliably.
type: Answer
has comment: http://stackoverflow.com/comment/127319772
answers question: http://stackoverflow.com/q/26744312
downvote count: 1

http://stackoverflow.com/comment/42146258
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26782921
has text: I think it would be cleaner if you used `ng-click` and have controller call the JavaScript function instead of directly from the View.

http://stackoverflow.com/comment/42137826
score: 0
comment on: http://stackoverflow.com/q/26771655
type: Comment
type: QuestionComment
has text: Sorry for not responding sooner; I didn't realize the time and had to go to bed. RobG and sideroxylon(in a roundabout way) got my brain to click where it needed to, and I've determined the error in my judgement and a proper workaround for it. Thank you

http://stackoverflow.com/q/26682196
score: 2
type: AnsweredQuestion
has title: AngularJS 1.3 - why is the form valid on load, for inputs with a minimum length?
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26682743
has body: I am just getting started with AngularJS and wish to disable the submit button of the form, if the form has any fields which are invalid. I have a field called Title. It has a requirement that the minlength is 5. On load of the form, the form object provided by AngularJS reports that $invalid: false Title This is required Should be longer than 5 characters Should be shorter than 140 characters And here is my button: Submit Fine I thought, I'll just disable the button if the form is $pristine: true. That solved my 'on load' issue...but when a user clears the field and goes back to blank, $invalid reports as false. Why is this, when the field clearly has a minlength requirement? And, how can I get around it without checking each form field error individually? Thanks! EDIT: I might add, that I'm using this new ngMessages for 1.3
accepted answer: http://stackoverflow.com/a/26682743
favorite count: 0
tagged with: angularjs
upvote count: 2

http://stackoverflow.com/q/26726649
tagged with: dispatchevent
type: Question
tagged with: keypress
tagged with: firefox
tagged with: javascript
tagged with: firefox-addon
upvote count: 1
favorite count: 0
has title: firefox add-on: unable to dispatch keypress
has body: I am trying to make a firefox add-on using addon-sdk-1.17 to capture events from keyboard, remap certain keys and dispatch the new key events. I am able to capture the keys and block them from appearing on the webpage but unable to generate/dispatch the remapped keys to the webpage. Below is my code, main.js: code snippet var pageMod = require("sdk/page-mod"); var data = require("sdk/self").data; pageMod.PageMod({ include: "*", contentScriptFile: data.url("mykey.js") }); mykey.js: Full code window.addEventListener("keypress", captureKeyPress); function captureKeyPress(ev) { if( ev.cancelable &amp;&amp; ev.charCode &amp;&amp; !ev.altKey &amp;&amp; !ev.ctrlKey){ // event is cancelable not NULL, CTRL+ nor ALT+ if((ev.charCode &gt;= 97) &amp;&amp; (ev.charCode &lt;= 122)){ // a-z charecters ev.preventDefault(); //ev.stopPropagation ? ev.stopPropagation() : (ev.cancelBubble = true); generateKeyPress(String.fromCharCode(ev.charCode-32), ev.originalTarget); // a-z =&gt; A-Z } } } function generateKeyPress(ch, event_object) { var pressEvent = document.createEvent ("KeyboardEvent"); pressEvent.initKeyEvent ("keypress", true, true, null, false, false, false, false, 0, ch.charCodeAt(0)); event_object.dispatchEvent (pressEvent); } This code simulates the key and it is also caught by captureKeyPress(), but it is not seen on the webpage (text area). After some debuggin, I found that the original key-event which goes into the webpage is "Trusted" and the simulated key-event which is not seen on the webpage is Not "Trusted". How to overcome the issue and dispatch the simulated key into the webpage ?
answer count: 0
downvote count: 0
type: UnansweredQuestion
score: 1

http://stackoverflow.com/a/52320577
upvote count: 1
has body: I was able to get it working by using the children array. context.drawImage(video.children_[0], 0, 0, canvas.width, canvas.height); Also, don't rely on video.width and video.height. They don't seem to update. Use video.currentDimension("width") and video.currentDimension("height") instead.
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26748238

http://stackoverflow.com/comment/41965405
comment on: http://stackoverflow.com/q/26681040
score: 0
type: Comment
type: QuestionComment
has text: hehe ya i personally thought what you were asking was pretty clear :p i hope it helps

http://stackoverflow.com/comment/41976168
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26689432
has text: Yeah. but you forgot remove `.active` class from other `dd` before add `.active` class to clicked `dd`. And the class name for the icon too.
score: 0

http://stackoverflow.com/comment/41949762
score: 0
has text: add class name "playRecorded" for each files.so whenever i click the file, it starts playing within the quick time player
type: Comment
comment on: http://stackoverflow.com/a/26675267
type: AnswerComment

http://stackoverflow.com/q/26709263
has comment: http://stackoverflow.com/comment/42013792
has title: Haversine Formula still not working
score: 0
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/42010549
has comment: http://stackoverflow.com/comment/42011430
has comment: http://stackoverflow.com/comment/42011336
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42010511
has answer: http://stackoverflow.com/a/26711070
has answer: http://stackoverflow.com/a/26711615
has body: I used harversine formula to calculate if points are inside/outside of circle, but still it response that points are inside of the circle, it must be outside the circle. Take a look at my code. var xp = 7.070562277980709; // point_lat var yp = 125.60755640475463; // point_long var radius = 63.942490126300555; // radius var xc = 7.070479805752504; // circle_lat var yc = 125.60851603754577; // circle_lon var r = radius / 1000; // convert meter to kilometer var dlat = (xp - xc) * (Math.PI / 180); var dlng = (yp - yc) * (Math.PI / 180); var a = ((Math.sin(dlat / 2)) * (Math.sin(dlat / 2))); var b = ((Math.cos(xp * (Math.PI / 180))) * (Math.cos(xc * (Math.PI / 180)))); var c = ((Math.sin(dlng / 2)) * (Math.sin(dlng / 2))); var d = a + (b * c); var e = 2 * Math.atan2(Math.sqrt(d), Math.sqrt(1 - d)); var f = r * e; if (f &lt; r) { alert('INSIDE'); } else if(f &gt; r) { alert('OUTSIDE'); } this function should alert me "OUTSIDE". Whats wrong with this code?? Thanks for your help. All points are given by google map. And the default unit of radius of google map is meter, thats why I converted it to kilometer.
type: Question

http://stackoverflow.com/comment/53638298
has text: Domains are deprecated, and should be avoided. https://nodejs.org/api/domain.html#domain_domain
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26719908
type: Comment

http://stackoverflow.com/comment/42009544
type: Comment
comment on: http://stackoverflow.com/a/26708418
has text: @RobG The answer has nothing to do with a DOM library. The answer is to lay out data in a JS object and reference accordingly. The DOM library is purely for the demo, because typing `document.getElementById` is more work than `$("#...")`. Even though I just did it...
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42174004
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26800168
has text: How is the element rendered on the page? Are you executing your JavaScript AFTER the element is rendered?

http://stackoverflow.com/q/26832056
tagged with: vimeo-player
answer count: 1
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
has title: How to change the vimeo deafult skin
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27135498
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42311111
accepted answer: http://stackoverflow.com/a/27135498
upvote count: 1
has body: I need to know a way to change the vimeo player skin. I had done a bit of Google research and i came to know that it is not possible to change the vimeo skin as they do not allow it, the only thing we can do is that we can customize their controls. Actually i have some videos from YouTube,Vimeo and Dailymotion embedded in my website, i need to have a common player for all those videos. I know how to change the default skin in YouTube (through Video.js) but not sure if i can do the same for vimeo and dailymotion as well. Any help will be appreciated. Thanks
type: Question
tagged with: dailymotion-api
tagged with: javascript

http://stackoverflow.com/comment/42061232
score: 0
comment on: http://stackoverflow.com/q/26736497
type: Comment
type: QuestionComment
has text: @mscdex: No, https is for port 443, no? I check it with: `http://example.org:5008`

http://stackoverflow.com/comment/42061241
type: QuestionComment
type: Comment
has text: Peeking at Knockout!
comment on: http://stackoverflow.com/q/26736547
score: 0

http://stackoverflow.com/comment/42017538
score: 0
type: AnswerComment
type: Comment
has text: @SanKrish He wants an image button to go to a jsp page
comment on: http://stackoverflow.com/a/26713383

http://stackoverflow.com/comment/42229834
comment on: http://stackoverflow.com/a/26831455
score: 0
type: AnswerComment
has text: Alright thank you then final code worked
type: Comment

http://stackoverflow.com/q/26809917
type: Question
tagged with: addeventlistener
tagged with: javascript
tagged with: jquery
has title: Why does this window.addEventListener fire first, before doc.ready?
score: 0
has comment: http://stackoverflow.com/comment/42192471
linked to: http://stackoverflow.com/q/23815294
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/23815294
answer count: 0
has body: In my test code below, I am confused why #5 fires so soon. This is script located in the SCRIPT tag in the HEAD section of my HTML Test Page. window.onload=function(){ console.log("1"); }; (function testFunc() { // IIFE will fire right away console.log("2") })(); &lt;/script&gt; &lt;SCRIPT src="jquery.js"&gt;&lt;/SCRIPT&gt; &lt;SCRIPT src="script.js"&gt;&lt;/SCRIPT&gt; &lt;script type="text/javascript"&gt; $( document ).ready(function() { // jquery doc ready console.log("3"); }); window.addEventListener('load', function(){ console.log("4") }, false); function testFunc5() { console.log("5") // this is where 5 is defined }; window.addEventListener('load', testFunc5(), false); // and here is where it is fired This is the code in my script.js file $(function() { // jquery document ready console.log("6"); }); $(function() { // another jquery doc ready console.log("7"); }); I am not expecting 5 to be logged so soon. I expected it to show up at the end. My console output is.... 2, 5, 6, 7, 3, 1, 4 The order of all the other numbers makes sense, but not 5. It is added to the window.onload, and it's added after #4. Yet it runs near the beginning. The other window.onload and addEventListeners for load fire at the end.
has comment: http://stackoverflow.com/comment/42193479

http://stackoverflow.com/a/26728702
type: Answer
has body: It appears to be this part of convertSpeedToAngle(): var iSpeed = (options.speed / 10), iSpeedAsAngle = ((iSpeed * 20) + 10) % 180; If you put in 40, then you get (((40/10) * 20) + 10)%180 = 90 for the angle. How the hell they came up with that thinking is beyond me. Since you know that the range is 0-180 degrees, then you want to know the % of those degrees your current value uses and then find the related angle in degrees. The % as a decimal in the range [0-1] is given by options.speed / 240 since 240 is the max on your scale. Take that percentage and multiply it by 180 to get where it should fall in terms of the degrees. Then, the function quite simply becomes (without any error checking!): function convertSpeedToAngle(options) { return 180 * options.speed/240; } Try plugging that in and see if your issue remains.
answers question: http://stackoverflow.com/q/26728481
score: 0

http://stackoverflow.com/comment/42105703
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26762082
type: AnswerComment
has text: I tried your version of the code, and it worked as long as the geoXml.parse line is commented out. Is there a way that I can have the kml polygons displayed and use my addListener function?

http://stackoverflow.com/comment/42991084
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26701622
type: AnswerComment
has text: @mohsensolhnia, ahh, the purpose of my post was to show the OP how to accomplish smooth scrolling, but I understand that it might be too slow at the current speed. (I was trying to duplicate the functionality of the pervolo site.) However, your comment re "30 or 40 second" made me realize that I should *stop* the animation before starting a new one. My update may help resolve that problem at least. Appreciate the feedback!

http://stackoverflow.com/comment/42204704
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26817059
has text: May be you need a second button or second form or another servlet. It's generally unclear what are you asking.
type: Comment

http://stackoverflow.com/a/43824723
has comment: http://stackoverflow.com/comment/99142603
has body: The following 3 functions work in browsers which don't support classList: function hasClass(el, className) { if (el.classList) return el.classList.contains(className); return !!el.className.match(new RegExp('(\\s|^)' + className + '(\\s|$)')); } function addClass(el, className) { if (el.classList) el.classList.add(className) else if (!hasClass(el, className)) el.className += " " + className; } function removeClass(el, className) { if (el.classList) el.classList.remove(className) else if (hasClass(el, className)) { var reg = new RegExp('(\\s|^)' + className + '(\\s|$)'); el.className = el.className.replace(reg, ' '); } } https://jaketrent.com/post/addremove-classes-raw-javascript/
downvote count: 3
has comment: http://stackoverflow.com/comment/100749375
accepted answer of: http://stackoverflow.com/q/26736587
upvote count: 63
answers question: http://stackoverflow.com/q/26736587
score: 60
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/100740779

http://stackoverflow.com/comment/42090489
type: QuestionComment
comment on: http://stackoverflow.com/q/26753668
has text: does value attribute for div works?
score: 0
type: Comment

http://stackoverflow.com/q/26753016
has comment: http://stackoverflow.com/comment/42089813
type: UnansweredQuestion
has body: I've made a script that retrieves XML content from a web service. The process needs to be run once a week, but the script itself needs to be re-run about 180 times to complete the process. Each run of the script takes about 3-8 minutes. I would like it to re-run about 5 seconds after each completion. My current solution for this is: Task scheduler for windows opens the php page once a week. When script is run and completed, javascript makes the page restart 5 seconds after completion. When the last time of the script runs it removes the reload of the page so that it stops. The problem with this solution is that it opens a new browser window every week. Is there any good alternative ways of doing this without having to manually close down the browser? The reason of re-run of the script is due to script timeout settings of the php server max limit, and the possibility to after each run to see status whether any error occurred. I'm not using cron since it would require to do extremely many polls in order to get the process to start within 5 seconds of last time run. For the weekly start up of the script I assume it wouldn't work as long as the script uses javascript to rerun itself?
tagged with: web-services
tagged with: php
has title: PHP Script to re-run itself until process completed.and then restart every week
has comment: http://stackoverflow.com/comment/42090811
tagged with: automatic-updates
type: Question
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26754604
tagged with: cron

http://stackoverflow.com/comment/42229275
comment on: http://stackoverflow.com/q/26830256
type: Comment
type: QuestionComment
score: 0
has text: @istos explained it better, sorry.

http://stackoverflow.com/comment/42038670
comment on: http://stackoverflow.com/q/26723575
score: 0
type: Comment
type: QuestionComment
has text: Ok, that's a good explanation. But how do you do to stabilize FPS? Stop use of requestAnimationFrame and do my own framerate-control function? @gnarbarian: I can give you the emitter configuration, the rest of the code is useless for you. I'm making an open-source game where the player is an AI, I decided to migrate from EaselJS to Three yesterday, so I'm doing some experiments.

http://stackoverflow.com/comment/42194433
type: Comment
comment on: http://stackoverflow.com/a/26810780
type: AnswerComment
has text: Thanks for the quick response! I just inserted your modified code, but unfortunately I receive the same error, with the same wording and numbers. Also, the rows are blank, but there is a row for each JSON object (as before).
score: 0

http://stackoverflow.com/comment/42046593
type: AnswerComment
comment on: http://stackoverflow.com/a/26728779
type: Comment
has text: I've tried it but still doesn't work. It displayed 'Notice: Undefined index: fieldname'
score: 0

naming-conventions
tags question: http://stackoverflow.com/q/26771655
tags question: http://stackoverflow.com/q/26773062
tag name: naming-conventions
type: Tag

http://stackoverflow.com/q/26764045
accepted answer: http://stackoverflow.com/a/26846146
tagged with: javascript
upvote count: 4
tagged with: touch
answer count: 1
downvote count: 0
tagged with: jquery
tagged with: meteor
has body: I'm trying to use http://wipetouch.codeplex.com/ to implement swiping on a Meteor app to shift between templates in Iron Router. It works beautifully on iOS and Android but on Windows Phone, the OS' native swipe gesture (swiping right in the browser moves one page back in history) interferes with the user's swiping action. Is there any way I can disable this? Also which other platforms have similar functionality which would prevent the user from swiping in the web app effectively? As an example, this app also uses the same library to implement swipe gestures. Note: Using touch-action: none on the body tag does not work.
favorite count: 0
has title: Disabling swipe right to previous page on Windows Phone
has answer: http://stackoverflow.com/a/26846146
type: AnsweredQuestion
score: 4
type: Question

http://stackoverflow.com/q/26773781
has answer: http://stackoverflow.com/a/26773972
has answer: http://stackoverflow.com/a/26773803
tagged with: jquery-plugins
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/26773865
has answer: http://stackoverflow.com/a/26773865
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26773803
has title: how to use document.getElementById in jquery plug in so that it can take the id of the object which is using the plugin currently
type: AnsweredQuestion
has body: I am working on a jQuery plugin. I need to use document.getElementById('somid');The code is working if I use some id(suppose id of a particular text area). But as its a plugin I can not give an specific id because the plug in should be made like that it(the plug in) should work with any text area with which it is connected. My html my jquery.myplugin.js plugin $(document).ready(function(){ $('.calling').keyup(function(e) { $(this).requiredMethod(e.keyCode); });}); //My plugin (function($) { $.fn.requiredMethod = function(keyCode) { return this.each(function() { var $this = $(this); var previndex = 0; var ctl = document.getElementById('src1'); //This is where the problem is var endPos = ctl.selectionEnd-1; var str = $this.val(); //My code goes here where i use previndex,endPos ans str }); }; })(jQuery); My plug in is working for text area with id="src1". But this plugin should work with all text areas with class="calling". So what should be the code to do so ,so that I can get the var endPos = ctl.selectionEnd-1; for the text area I am working currently? I used the code var ctl = document.getElementByClassName('reverie'); but its not working. If anyone have not understand the problem please let me know,I will try to explain in more detail.
type: Question

http://stackoverflow.com/q/26802430
score: 1
has comment: http://stackoverflow.com/comment/42180017
has body: I am using the javascript firebase library to connect to the nest api. It works great in Chrome and FireFox. But in internet explorer (I'm using IE11) I get an script/websocket error. SCRIPT12008: WebSocket Error: Incorrect HTTP response. Status code 401, Unauthorized I have no problems connecting to a normal firebase server/URL. I need IE to run cause other people use it. Any ideas?? this is the code i use to connect to the nest api var dataRef = new Firebase('wss://developer-api.nest.com/'); dataRef.authWithCustomToken("{{user.token}}", function(error, authData) { console.log("{{user.token}}"); if (error) { console.log("Login Failed!", error); } else { console.log("Login Succeeded!", authData); } });`
upvote count: 1
has comment: http://stackoverflow.com/comment/42243138
has comment: http://stackoverflow.com/comment/42248477
type: Question
has title: IE 11 Nest(firebase) authentication/websocket error
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/42180483
tagged with: internet-explorer-11
tagged with: javascript
tagged with: nest-api
has comment: http://stackoverflow.com/comment/42186363
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42281229
tagged with: firebase
answer count: 0

http://stackoverflow.com/comment/41959821
has text: Are you wanting the user to click the button and go to that url?
comment on: http://stackoverflow.com/q/26680495
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26728663
answers question: http://stackoverflow.com/q/26728412
type: Answer
has body: I was going through a relevant SO post on using dynamic variable names in javascript and the accepted answer brings up a very good point (emphasis is mine): Since ECMA-/Javascript is all about Objects and Contexts (which, are also somekind of Object), every variable is stored in a such called Variable- (or in case of a Function, Activation Object).In the Global scope (= NO function context), you implicitly write those variables into the Global object (= window in a browser). So for example (again taken from the answer): function foobar() { this.a = 1; this.b = 2; var name = window['a']; // === undefined as it refers to the global context and is undefined alert(name); name = this['a']; // === 1 alert(name); // outputs 1 alert(a); //outputs 1 //Since we are talking about context here, you could clearly do this['qarowquestion'+obj.returnIntJson] = "foo"; alert(qarowquestion2043); //outputs foo } So in essence, variables can be accessed as objects in specific contexts which can be really helpful.
score: 0

http://stackoverflow.com/q/26753138
has comment: http://stackoverflow.com/comment/42090232
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42090770
tagged with: css
has comment: http://stackoverflow.com/comment/42089903
score: 0
has answer: http://stackoverflow.com/a/26754126
type: AnsweredQuestion
has body: I've been trying to achieve this for the last two days, but I'm fairly new to javascript, so maybe I'm just not seeing something. What I'm trying to create is a Sidenavigation, that highlights the current section you are at. I have found a jquery plugin that does that like a charm http://trevordavis.net/blog/jquery-one-page-navigation-plugin/ But I am working with subitems and I would like to trigger the visibility of this subitem, as soon as the current section is active. So the ul would be visible if the containing list item has the class of .current, and if one of the sublist's list items has the class .current. I have found out, that I'd probably need to trigger an event on the class change. I have tried the following, but it has not yet worked. Markup: Section 1 Section 2 Section 3 Subsection 1 Subsection 2 Subsection 3 For the jquery I have tried this: $('#nav').on('event', function(){ $('.parent').addClass('current').trigger('visibility'); }); $('.parent').on('visibility', function(){ $('.parent .sublist').addClass('visible'); }); What I am basically trying to do is what Bootrap does in its documentation. When scrolling down, you can see Glyphicons, as soon as you reached this section, the subitems pop open (available glyphs, how to use, examples) http://getbootstrap.com/components/ SASS applied to the Navigation so far: .overview{ transition: .3s all; ul{ margin-left: 10px; ul{ max-height: 0; transition: max-height 1s ease-out; overflow: hidden; } } } .current{ > a{ font-weight: $bold; } ul{ max-height: 9999px !important; transition: max-height 1s ease-out; } } I have been able to show the sublist if the parent is set to current, but as soon as the child is current, the sublist will be hidden, so I figured, I'd need some javascript
type: Question
accepted answer: http://stackoverflow.com/a/26754126
has comment: http://stackoverflow.com/comment/42090731
answer count: 1
has comment: http://stackoverflow.com/comment/42090729
tagged with: javascript
tagged with: jquery
has title: trigger visibility of sublist on class change
has comment: http://stackoverflow.com/comment/42090694

http://stackoverflow.com/comment/101472686
has text: @SivaprakashD do you mean you want to find the first instance where this is true? you could `var id = things.find(thing => thing.selected)` and it would stop after it finds the first instance https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find. Or use similar `.some` method to just get a true/false "does this object live in this array"
type: Comment
score: 1
comment on: http://stackoverflow.com/a/47877054
type: AnswerComment

http://stackoverflow.com/q/26720241
score: 0
has answer: http://stackoverflow.com/a/26720305
answer count: 1
linked to: http://stackoverflow.com/q/750486
linked to: http://stackoverflow.com/q/20209097
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42030543
tagged with: jquery
tagged with: ajax
type: Question
has body: I want to call another AJAX function with the new URL I got from my first AJAX call. But if I try for loop like this, it fails. I think the for loop does not wait until AJAX does its job, but I don't know how to fight it. Any suggestions? Example
has title: How to use AJAX inside for loop

http://stackoverflow.com/q/26719918
favorite count: 0
has title: What does functionname("#{....}") inside a onclick attribute of a button mean?
has comment: http://stackoverflow.com/comment/42034694
has comment: http://stackoverflow.com/comment/42030098
downvote count: 1
tagged with: http://stackoverflow.com/tag/xml
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42031424
has body: Its an XHTML page I'm going through. Inside the onclick attribute of a button, a JavaScript function is being called. What does the expression "#{...}" in the function parameter mean? (By ... I mean some variable of a class being referred to). Following line is the code I'm referring to in the XHTML page. What do they mean with # here.. &lt;input type="button" onclick="download("#{Hitlistbean.bean},#{Hitlist1.bean},...")"&gt;
has comment: http://stackoverflow.com/comment/42029889
score: 1
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/42043223
has comment: http://stackoverflow.com/comment/42031623
tagged with: http://stackoverflow.com/tag/xhtml
tagged with: javascript

http://stackoverflow.com/a/26809313
has comment: http://stackoverflow.com/comment/42191543
downvote count: 0
has comment: http://stackoverflow.com/comment/42191578
has comment: http://stackoverflow.com/comment/42191465
type: Answer
has comment: http://stackoverflow.com/comment/42191517
has comment: http://stackoverflow.com/comment/42191353
accepted answer of: http://stackoverflow.com/q/26809214
score: 3
answers question: http://stackoverflow.com/q/26809214
upvote count: 3
has comment: http://stackoverflow.com/comment/42191483
has comment: http://stackoverflow.com/comment/42191484
has comment: http://stackoverflow.com/comment/42191456
has body: Like said juvian: $(document).ready(function () { $('#my_text').on('keyup', function (e) { if(e.which == 32){ // Press space var words = $(this).text().split(' '); var lastWord = words[words.length - 1]; console.log(lastWord); } }); });
has comment: http://stackoverflow.com/comment/42191432
type: AcceptedAnswer

http://stackoverflow.com/a/26807752
has body: attrs.charStats.experience is just a number, so when you do this: addToStats(attrs.charStats.experience, 15); it is like you are just doing this: addToStats(0, 15); Primitive values in javascript like numbers are passed by value. They don't pass a pointer or reference to the field in the object, they just pass the value so there is no way to change the original property when just the number was passed. You can pass an object reference to a parent object. So, you could do this: function addToStats(obj, field, val) { obj[field] += val; } addToStats(attrs.charStats, "experience", 15);
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26807598
accepted answer of: http://stackoverflow.com/q/26807598
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26725841
score: 1
accepted answer of: http://stackoverflow.com/q/26724233
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26724233
has body: You can pass the assignments like this: chart_scatter.draw(); chart_scatter2._assignedColors = chart_scatter._assignedColors; chart_scatter2.draw();
type: Answer
downvote count: 0

http://stackoverflow.com/comment/42000571
type: QuestionComment
score: 0
has text: Could you elaborate on why you want only some *particular* variables to be able to silently remain unused? There may be a better approach to your problem.
type: Comment
comment on: http://stackoverflow.com/q/26703073

http://stackoverflow.com/q/26728001
has answer: http://stackoverflow.com/a/26730280
favorite count: 0
possible better answer: http://stackoverflow.com/a/26730726
tagged with: django-templates
upvote count: 2
has comment: http://stackoverflow.com/comment/42048773
tagged with: django
tagged with: python
linked to: http://stackoverflow.com/q/2336785
has comment: http://stackoverflow.com/comment/42048596
has body: I understand that Django renders the templates at the server side. The browser receives HTML content, which can then be manipulated using JavaScript. I have some JavaScript code to manipulate the Django language tag that will be difficult to maintain in its current form, so I am trying to come with a better way to code it, but I cannot think of such a way and need some help. Here is my code: The dynamic_language_code is a two letter code ie: en, fr, bg, ru, es, etc. function dateCalculation(dynamic_language_code) { var c = dynamic_language_code; //arabic if (dynamic_language_code == 'ar'){ var_month = "{% language 'ar' %}{% trans 'month' %}{% endlanguage %}"; var_months = "{% language 'ar' %}{% trans 'months' %}{% endlanguage %}"; var_year = "{% language 'ar' %}{% trans 'year' %}{% endlanguage %}"; var_years = "{% language 'ar' %}{% trans 'years' %}{% endlanguage %}"; //bulgarian. } else if (dynamic_language_code == 'bg'){ var_month = "{% language 'bg' %}{% trans 'month' %}{% endlanguage %}"; var_months = "{% language 'bg' %}{% trans 'months' %}{% endlanguage %}"; var_year = "{% language 'bg' %}{% trans 'year' %}{% endlanguage %}"; var_years = "{% language 'bg' %}{% trans 'years' %}{% endlanguage %}"; } ........ many more else if conditions ........ //default value of English. } else { var_month = "{% language 'en' %}{% trans 'month' %}{% endlanguage %}"; var_months = "{% language 'en' %}{% trans 'months' %}{% endlanguage %}"; var_year = "{% language 'en' %}{% trans 'year' %}{% endlanguage %}"; var_years = "{% language 'en' %}{% trans 'years' %}{% endlanguage %}"; } } The code should dynamically change the language of the month, years according to the passed in dynamic_language_code value. There really should be no need for an if else statement, just the assignment of the var_month, var_months, var_year and var_years values using the passed in dynamic_language_code value. How do I structure the code above to get rid of the if else condition and still return the corr…
type: AnsweredQuestion
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27207709
has title: Django Templates - client side manipulation of server side django tag
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27207709
has answer: http://stackoverflow.com/a/26730726
answer count: 3
score: 1

http://stackoverflow.com/q/26699351
has body: Please check >>>codepen &lt;&lt;&lt;&lt; I cant get the discountvalue input field to subtract from grandtotal. &lt;input id="discountvalue" type="number"&gt; function recordToFilename() { var input = document.getElementById('discountvalue'), discount12 = input.value; discount12 does not subtract from grand total. Please check >>>codepen &lt;&lt;&lt;&lt; document.getElementById('grandtotal').innerHTML = ": $" + (salesTotal * 0.13 + salesTotal - discount12).toFixed(2);
has answer: http://stackoverflow.com/a/26699370
has title: how to use html input to subtract total value
tagged with: cart
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26699513
type: Question
answer count: 2
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26699513
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26699370

angular-ui-router
tags question: http://stackoverflow.com/q/26725746
tags question: http://stackoverflow.com/q/26790204
tags question: http://stackoverflow.com/q/26812377
tags question: http://stackoverflow.com/q/26802675
tags question: http://stackoverflow.com/q/26733664
tag name: angular-ui-router
tags question: http://stackoverflow.com/q/26681160
tags question: http://stackoverflow.com/q/26719212
tags question: http://stackoverflow.com/q/26790841
tags question: http://stackoverflow.com/q/26794104
tags question: http://stackoverflow.com/q/26761136
tags question: http://stackoverflow.com/q/26828554
type: Tag
tags question: http://stackoverflow.com/q/26808672
tags question: http://stackoverflow.com/q/26716483

http://stackoverflow.com/q/26775074
has title: JQuery dataTable does not work with haml - Ruby - (sinatra)
has body: I'm trying to use a dataTable in my ruby project with Sinatra. Instead of HTML pages w're using HAML-files. My first idea was to make a normal table we could create if we looped trough our array, that worked out verry well. But since we wanted to use this table as a dataTable with JQuery &amp; javascript, We are having some issues. So to figer out what the problem was, I created a simple haml table with data in each TableRow. %table{:id =&gt; "test"} %thead %tr %th data1 %th data2 %tbody %tr %td data3 %td data14 %tr %td data15 %td data16 %tr %td data17 %td data18 So when I saw the installation manual on DataTables.net it said we had to import the CSS-Styling and the 2 jquery files. So said so done in my laout.haml file: !!! %html %head %meta{:charset =&gt; 'utf-8'} %title tooltitle %link{:href =&gt; "./css/jquery-ui-1.10.4.css", :rel =&gt; "stylesheet"}/ %link{:charset =&gt; "utf-8", :href =&gt; "./css/2close.css", :media =&gt; "screen", :rel =&gt; "stylesheet", :type =&gt; "text/css"}/ %link{:href =&gt; "./css/multi-select.css", :media =&gt; "screen", :rel =&gt; "stylesheet", :type =&gt; "text/css"}/ %link{:href =&gt; "./css/login.css", :media =&gt; "screen", :rel =&gt; "stylesheet", :type =&gt; "text/css"}/ %link{:href =&gt; "./DataTables-1.10.3/media/css/jquery.dataTables.min.css", :media =&gt; "screen", :rel =&gt; "stylesheet", :type =&gt; "text/css"}/ %script{:src =&gt; "./scripts/jquery-2.1.0.js",:type =&gt; "text/javascript"} %script{:src =&gt; "./scripts/jquery-ui-1.10.4.custom.js", :type =&gt; "text/javascript"} %script{:src =&gt; "./scripts/jquery.multi-select.js", :type =&gt; "text/javascript"} %script{:src =&gt; "./DataTables-1.10.3/media/js/jquery.js", :type =&gt; "text/javascript"} %script{:src =&gt; "./DataTables-1.10.3/media/js/jquery.dataTables.min.js", :type =&gt; "text/javascript"}** %script{:src =&gt; "./scripts/scripts.js", :type =&gt; "text/javascript"} %script{:src =&gt; "./scripts/test.js"} so as you can see, we are using multiple jquery file…
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26799062
accepted answer: http://stackoverflow.com/a/26799062
score: 0
tagged with: haml
answer count: 1
tagged with: datatable
tagged with: css
type: AnsweredQuestion

preload
tags question: http://stackoverflow.com/q/26728938
tag name: preload
type: Tag

http://stackoverflow.com/q/26781561
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42141838
type: UnansweredQuestion
tagged with: size
has comment: http://stackoverflow.com/comment/123189784
tagged with: xmlhttprequest
linked to: http://stackoverflow.com/q/2659952
has comment: http://stackoverflow.com/comment/42140625
has comment: http://stackoverflow.com/comment/42141906
has comment: http://stackoverflow.com/comment/42140580
linked to: http://stackoverflow.com/q/26061856
type: Question
has answer: http://stackoverflow.com/a/62269719
tagged with: browser
has title: How browser calculates size of xhr request
has body: I tried the following code to the find size of a xhr request. var request = new XMLHttpRequest(); request.open('GET', 'authenticate.json', false); request.send(); var size = request.getAllResponseHeaders().toLowerCase().match(/content-length: \d+/); console.log(size + " bytes"); When I checked it with a sample ajax call, I got 188 bytes. But on the network console, the browser show 535 bytes. How is the browser calculating the size of an xhr request? Is that a content length or some this else? How can I find the size using javascript instead of finding content length?
tagged with: javascript
tagged with: ajax

http://stackoverflow.com/q/26793272
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42161929
has comment: http://stackoverflow.com/comment/42161891
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26793464
accepted answer: http://stackoverflow.com/a/26793464
has comment: http://stackoverflow.com/comment/42161871
has comment: http://stackoverflow.com/comment/42161706
score: 0
has title: Not working eventlistener in html element
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42161711
has body: I am trying to add eventlistener to a html element but not showing any desired output My code is as follows: .html file SETTING UP YOUR CONNECTION Now let's connect to your Clipsal Hub 1. Go to the Wi-Fi settings on your phone 2. Connect to the Clipsal Hub network 3. Return to this app when you're done .js file var image_anim = document.getElementById("#image_anim"); image_anim.addEventListener("webkitAnimationStart", animationListener_start,false); image_anim.addEventListener("webkitAnimationIteration", animationListener_it,false); image_anim.addEventListener("webkitAnimationEnd", animationListener_end,false); function animationListener_start() { console.log('animation start'); } function animationListener_it() { console.log('animation iterating'); } function animationListener_end() { console.log('animation end'); } Here i have performed a animation on "#image_anim" and i want to attach a event handler as u could see in my js code.But there is no message displayed in the log

http://stackoverflow.com/q/26737270
score: 2
downvote count: 0
answer count: 0
tagged with: java
type: Question
has body: My webservice XML is as follow: HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> string string </soap:Body> </soap:Envelope> How do I go about receiving that as an array on my android app? I have attempted the following but the result returned is 0. (I know there is more than 0 entries) //panels webservice public static String[] invokeGetAllPanelsWS(String ON, String SA) { String[] returnList = null; // Create request to get all the panels SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE, ON); // Create envelope SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); //ensures that the envelope is .NET compatible envelope.dotNet = true; // Set output SOAP object envelope.setOutputSoapObject(request); // Create HTTP call object HttpTransportSE androidHttpTransport = new HttpTransportSE(SOAP_ADDRESS); try { // Invoke web service androidHttpTransport.call(SA, envelope); // Get the response SoapObject response = (SoapObject) envelope.getResponse(); // get the amount of list items int intPropertyCount = response.getPropertyCount(); //creates a new return array returnList = new String[intPropertyCount]; //loops through all the results for (int i = 0; i < intPropertyCount; i++) { String str = ((String)(response).getPropertyAsString(i)); returnList[i] = str; } } catch (Exception e) { //should show error screen //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! System.out.println(e.getMessage()); e.printStackTrace(); return null; } //Return array to calling object return returnList; } Now this I call on one of my main activities to test as such: public class WebServiceGetAllPanels extends AsyncTask<Void, Void, String[]> { @Override protected void onPreExecute() { // TODO Auto…
tagged with: javascript
tagged with: eclipse
upvote count: 2
tagged with: arrays
favorite count: 0
type: UnansweredQuestion
tagged with: android
has title: Android webservice: How to receive an array of string

http://stackoverflow.com/q/26733356
has comment: http://stackoverflow.com/comment/42053637
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42053982
has answer: http://stackoverflow.com/a/26733533
type: Question
has title: ngBindHtml doesn't work with ngSanitize
has comment: http://stackoverflow.com/comment/42053668
has comment: http://stackoverflow.com/comment/42053550
has comment: http://stackoverflow.com/comment/42058385
tagged with: javascript
has comment: http://stackoverflow.com/comment/42056044
has body: I'm a newbie on Angular.js so I know this is too basic question but here looks like only place to find answers to angular.js questions. I follow the book of Rodrigo Branas(Angular.js Essentials). He just use "parking" word as the name of variable instead of "example". I don't know if there is update for angular.js etc?
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42053616
has comment: http://stackoverflow.com/comment/42054399
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42054883

http://stackoverflow.com/comment/42071503
score: 0
type: AnswerComment
type: Comment
has text: The error is gone. Thanks ! But the button is still not working !
comment on: http://stackoverflow.com/a/26742821

http://stackoverflow.com/comment/42582755
comment on: http://stackoverflow.com/a/26722375
score: 0
type: AnswerComment
type: Comment
has text: cpp or m4 both do file inclusion. You could also just concatenate a number of files together using cat or ANT's concat task.

http://stackoverflow.com/q/26697683
has answer: http://stackoverflow.com/a/26698298
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41989889
has title: Break JavaScript When run document.forms[0].submit();
has body: onchange="document.forms[0].action = 'policyTypeSelection.do?method=policyTypeSelection'; document.forms[0].submit(); optionCheck(this);"&gt; optionCheck(this); is Java Script : function optionCheck(frm) { var i, len, optionVal, helpDiv, btnStatus, selectOptions = document.getElementById("options").submit(); // loop through the options in case there // are multiple selected values for (i = 0, len = selectOptions.options.length; i &lt; len; i++) { // get the selected option id optionVal = selectOptions.options[i].id; // find the corresponding help div helpDiv = document.getElementById("help"); Statussecond = document.getElementById("second"); Statusfirst = document.getElementById("first"); // move on if we didn't find one if (!helpDiv) { continue; } // set CSS classes to show/hide help div if (selectOptions.options[i].selected) { helpDiv.className = "helpTextShow"; Statussecond.className = "hiddenShow"; Statusfirst.className = "none"; } } }
type: Question
has comment: http://stackoverflow.com/comment/41989782
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/42121026
has text: Thanks for your quick response. I've done as you say both in Lua Corona and Javascript (see code below), but the javascript still is not receiving data. Below I am posting the Lua/Corona code first and the html/javascript 2nd:
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26770038
score: 0

http://stackoverflow.com/comment/42100237
type: Comment
type: QuestionComment
has text: is TPT application yours?,do you have control over TPT application
comment on: http://stackoverflow.com/q/26759310
score: 0

http://stackoverflow.com/comment/42229488
type: Comment
comment on: http://stackoverflow.com/a/26831379
type: AnswerComment
has text: Thanks! How should I specify the contents of the response?
score: 0

http://stackoverflow.com/comment/42213272
has text: Sounds like you might be describing https://github.com/twbs/bootstrap/issues/14040
comment on: http://stackoverflow.com/q/26819725
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26756301
has body: To prevent content from being pushing bottom, you must use position: absolute; But that cause problems with dropdown menu width, as you are using table/table-cell structure. There is no easy way to adjust the width of dropdown menu with css, so you can use JQuery to calculate it. $(document).ready(function() { $('.dropmenu').hover(function() { $(this).find('.submenu').stop().slideToggle().css('width', $(this).width()); }); }); Fiddle
score: 3
has comment: http://stackoverflow.com/comment/42094822
type: Answer
answers question: http://stackoverflow.com/q/26755692
upvote count: 3
downvote count: 0

http://stackoverflow.com/comment/42164303
has text: I thing u need to use the relative path
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26793177

http://stackoverflow.com/a/26771770
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26771500
answers question: http://stackoverflow.com/q/26771500
type: Answer
has body: to load other js files from one js file,you can include this code snippet, you can add different scripts with this method var server_name="abc.com" (function() { var some_scrpt = document.createElement('script'); some_scrpt.type = 'text/javascript'; some_scrpt.async = true; some_scrpt.src = 'http://' + server_name + '/static/js/your_script.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body'[0]).appendChild(some_scrpt); })(); Hope it helps.

http://stackoverflow.com/a/26703671
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26702781
has body: You might want to have a look at Yeoman; you can install various generators for the different types of project that you may want to build. Many of the generators will walk you through creating a new project, what frameworks you'd like to install etc, plus often generate a gulpfile or gruntfile automatically. If you find yourself starting a lot of projects with the same boilerplate then it is worth having a look at. Here's a generator for a gulp powered webapp: https://github.com/yeoman/generator-gulp-webapp
type: Answer
accepted answer of: http://stackoverflow.com/q/26702781
score: 0

http://stackoverflow.com/comment/42179759
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26802075
has text: This is my config method
score: 0

http://stackoverflow.com/q/26679900
has title: meteor onepage_scroll package not working with tabs
has body: Gist of code: https://gist.github.com/FA-ViPer/325251949e6dc70d0278 Issue on package: https://github.com/eahefnawy/meteor-onepage-scroll-0.9/issues/1 I use a template to create my div sections and have one jquery call that executes when it is rendered on a new page. From trouble shooting, it looks like when I go from one page to the next the classes will still update but the webkit-transform fails to be updated in the style.
tagged with: meteor
upvote count: 1
has answer: http://stackoverflow.com/a/26684547
type: AnsweredQuestion
score: 1
type: Question
tagged with: webkit
accepted answer: http://stackoverflow.com/a/26684547
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/42123382
has text: Yes, I'm executing the sortbutton(); function in my main function. The button loads, but when I click, it doesn't do anything.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26771633
type: Comment

http://stackoverflow.com/a/26693093
answers question: http://stackoverflow.com/q/26692848
score: 7
type: AcceptedAnswer
downvote count: 0
has body: Though you provided your code, it's not easy to guess why the arrows aren't displayed. One simple reason could just be that the image for the arrows is missing / misplaced, so just check if the image controls.png is at the correct location. bxslider uses this image to display the arrows - http://bxslider.com/lib/jquery.bxslider.css line 106: .bx-wrapper .bx-prev { background: url("images/controls.png") no-repeat scroll 0 -32px rgba(0, 0, 0, 0); } If you don't want to adjust the CSS, you can add a directory images in the folder where your bxslider.css is located and copy this image to this folder. To check if the controls are already at the slider and only the image is missing, you can check with web dev tools if following div is inside the Prev Next
type: Answer
has comment: http://stackoverflow.com/comment/47903675
upvote count: 7
accepted answer of: http://stackoverflow.com/q/26692848

http://stackoverflow.com/comment/41957347
has text: Can you update your question and explain what currently happens when they click the "Insert" button?
comment on: http://stackoverflow.com/q/26679078
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42154496
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26788827
has text: Thank you so much for finding this for me. It's perfect
score: 0

http://stackoverflow.com/q/26770304
has answer: http://stackoverflow.com/a/26770592
has answer: http://stackoverflow.com/a/26770693
has title: Javascript mousewheel event scroll
score: 0
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26770693
tagged with: javascript
has body: I have the following http://jsfiddle.net/o0krp0yf/ basically if I scroll with mouse wheel, stop it (I want to scroll slides). But my problem is if I have an element with normal scroll behavior I have no way of scrolling that element (see .scroll). Is there anyway to detect if an element (which the cursor is over, ie I want to scroll that element) is scrollable or has scrollbars, and if it does I want to scroll that element normally. Basically I want to allow my normal method to work perfectly, unless I am trying to scroll .scroll element.
answer count: 2
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26770592

http://stackoverflow.com/comment/42132479
type: QuestionComment
has text: Ids have to be **unique** - `id="css"` is set at least twice
type: Comment
comment on: http://stackoverflow.com/q/26777077
score: 0

http://stackoverflow.com/comment/42079403
type: Comment
type: QuestionComment
has text: Interestingly, the solution offered by @Mavis does fix the `langEntries` error, but my page is still missing some functionality (that it has in development mode). This functionality all exists in app/assets/javascripts/ckeditor/plugins/. Any ideas as to why this dir is a problem in dev mode?
comment on: http://stackoverflow.com/q/26740955
score: 0

http://stackoverflow.com/a/26759900
has body: Try using a tool like UA-Parser.js. It will correctly detect almost anything you'll want to know about the device hitting your app, including whether the device is a mobile or tablet device. I use it and can vouch that it does an excellent job. And it's free. The code will look something like this: var parser = new UAParser(); parser.setUA(navigator.userAgent); var result = parser.getResult(); /* alert(result.browser.name); alert(result.browser.version); alert(result.device.model); alert(result.device.type); alert(result.device.vendor); alert(result.os.name); alert(result.os.version); */
has comment: http://stackoverflow.com/comment/42129901
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/42101343
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26759855
answers question: http://stackoverflow.com/q/26759855
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26805824
has body: I have an aspx text box with class num_input. This should allow only numbers and automatically add comma separator: $('.num_input').live("keyup", function () { $(this).numeric(); var num = $(this).val().replace(/(,)/g, ''); $(this).val(num.replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,")); }); We have a new requirement to select all text when user navigates through others textbox using tab or placing a cursor in the text. I tried to use $(this).select(); but it didn't work!!
has comment: http://stackoverflow.com/comment/42184784
type: UnansweredQuestion
downvote count: 2
type: Question
upvote count: 0
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/26805868
tagged with: jquery
answer count: 1
has title: Select all text on focus in numbers fields
favorite count: 0
has comment: http://stackoverflow.com/comment/42184666

http://stackoverflow.com/q/26739725
tagged with: highcharts
tagged with: javascript
has answer: http://stackoverflow.com/a/26756002
upvote count: 2
has body: I have coin currency market application and I would like to integrate a graph in it, however I don't know from where data should be taken. Is there some API that I can integrate into my highcharts in order to get graphical representation of values of the coin in the past 7,14,30 days? I have scrapped all data from http://coinmarketcap.com/ but I can't scrap graph because it's canvas. Can you help me with that? Where to search for coin data in the past?
answer count: 2
tagged with: bitcoin
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26753470
type: UnansweredQuestion
tagged with: python
score: 1
has title: Implementing highcharts for Coin currency market
type: Question
tagged with: scraper

http://stackoverflow.com/q/26792552
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/43006638
tagged with: google-plus
favorite count: 0
type: UnansweredQuestion
has title: How to Embed Google Plus Write a Review
tagged with: plugins
score: 3
tagged with: review
upvote count: 3
has body: Does anyone know if there is a way to allow visitors on your site to leave a review directly on your personal webpage, without having to redirect them to your Google+ Local Page, without making them click anything extra? Ideally it would just be an embedded plugin, just like the Google+ Recommend Button, or Facebook Like... but instead of liking/sharing/following - display the star rating selector, and a textarea. And, when someone fills it out, and presses publish, it will post directly to your Google+ Local Page. I am not interested in showing existing reviews/testimonials. I just want people to be able to write the review right then and there without leaving my page. This would be on a custom CMS (not WordPress, or Shopify, or anything of that sort), but a hard coded HTML page. I have been looking for API or any other method, but it seems that no such thing exists as far as I can tell. I would prefer not to write an explanation of how someone has to go to Google+ and Log in (or create an account), then find my local page, then click write a review, then.... blah blah blah. Can we just skip ALL of that, and have them write it without any extra steps (anonymously, not anonymously, doesn't matter). I don't want to pander to my customers about how it would mean a lot for them to write a review or anything of that sort. I just want them to see that the option is available, and decide for themselves. Has anyone ever heard of this being done?
type: Question
tagged with: api

http://stackoverflow.com/comment/42190272
score: 0
type: Comment
has text: Yes I meant to say rotate the array, but I did not know the proper terminology
type: QuestionComment
comment on: http://stackoverflow.com/q/26804393

http://stackoverflow.com/q/26774271
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26774326
type: Question
tagged with: javascript
has title: How to close modal box after successful submit and open second modal conditionally on form submit
score: 0
has body: I want to close form modal after successfully submit form and show another modal box after all error clear When the form is submitted and the value of a html select list on the form has changed, then the conditional js confirmation pop up will display. The user must click the OK button on the js confirmation pop up for the form submission to proceed. Or else if the html select list has not changed the js confirmation pop up will not display and the form will submit. these are my codes: $('#infoForm').bootstrapValidator({ // live: 'disabled', message: 'This value is not valid', fields: { sName: { validators: { notEmpty: { message: 'The name is required and cannot be empty' }, stringLength: { min: 6, max: 30, message: 'The username must be more than 6 and less than 30 characters long' }, regexp: { regexp: /^[a-zA-Z0-9_\.]+$/, message: 'The username can only consist of alphabetical, number, dot and underscore' } } }, sfName: { validators: { notEmpty: { message: 'The Father name is required and cannot be empty' }, stringLength: { min: 6, max: 30, message: 'The Father name must be more than 6 and less than 30 characters long' }, regexp: { regexp: /^[a-zA-Z0-9_\.]+$/, message: 'The Father name can only consist of alphabetical, number, dot and underscore' } } } } }); ×Close Modal Box Submit × second modal box Your Information successfully submit
answer count: 1
tagged with: jquery

http://stackoverflow.com/a/54781843
upvote count: 5
has body: Chrome browser uses V8 engine for compiling Javascript just as other browsers may use Rhino Or SpiderMonkey. V8 is a JavaScript engine built by Google written in C++. It is used for compiling JS, in both client-side (Google Chrome) and server-side (node.js) applications. In order to obtain speed, V8 translates JavaScript code into more efficient machine code instead of using an interpreter. V8 compiles JavaScript code into machine code at script execution by implementing a JIT (Just-In-Time) compiler like a lot of modern JavaScript engines such as SpiderMonkey or Rhino (Mozilla) are doing. The main difference with V8 is that it doesn’t produce bytecode or any intermediate code. It just compiles JavaScript on the fly. Hope this helps!
downvote count: 0
type: Answer
score: 5
answers question: http://stackoverflow.com/q/26709524

http://stackoverflow.com/q/26689927
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41979718
has comment: http://stackoverflow.com/comment/41981208
type: Question
has comment: http://stackoverflow.com/comment/41977184
has body: I want to prevent the cloasing of the dorpdown menu on click of a button inside of the suggestion. Code: $(document).ready(function(){ $('#search2').typeahead({ hint: true, highlight: true }, { name: 'products', displayKey: 'name', source: function (query, process) { return $.post("php/Products.php", { action:'sell-search',search_value: query}, function (data) { process(JSON.parse(data)); }); }, templates: { empty: [ ' ', ' Няма намерена стока ', ' ' ].join('\n'), suggestion: Handlebars.compile( ' ' + ' {{name}} {{category}} ' + ' {{price_retail}} лв/{{measure}} '+ ' ' + ' ') } }); }); $(document).on('click','.products-info', function(e){ e.stopPropagation(); console.log("Cliicked"); console.log('Inside link'); alert('test'); return false; }); I tryed whith e.stopPropagation(); but it does not working and the 'test' message is alerted after the menu is hidden.
has comment: http://stackoverflow.com/comment/80810040
tagged with: twitter-typeahead
has comment: http://stackoverflow.com/comment/41982101
has comment: http://stackoverflow.com/comment/41979012
has comment: http://stackoverflow.com/comment/41982360
tagged with: javascript
tagged with: jquery
score: 0
has title: Typeahead clickable suggestions
answer count: 0

http://stackoverflow.com/comment/42114828
comment on: http://stackoverflow.com/a/26767001
type: Comment
has text: all except enjoys of course, though i like this solution better.
score: 1
type: AnswerComment

http://stackoverflow.com/a/26777602
has body: Have you considered doing it via JQuery? You can post the values like this without a refresh: $('#button').on('click', function(){ $.post('/url/to/your/function', {'post': value}, function(data){ if(data !== 0) { } }, "json"); }); You can find more info here Edit: It's not possible to upload files with jQuery $.post, neverthless, with the file API and XMLHttpRequest, it's perfectly possible to upload a file in AJAX, and you can even know how much data have been uploaded yet… $('input').change(function() { var fileInput = document.querySelector('#file'); var xhr = new XMLHttpRequest(); xhr.open('POST', '/upload/'); xhr.upload.onprogress = function(e) { /* * values that indicate the progression * e.loaded * e.total */ }; xhr.onload = function() { alert('upload complete'); }; // upload success if (xhr.readyState == 4 &amp;&amp; (xhr.status == 200 || xhr.status == 0)) { // if your server sends a message on upload sucess, // get it with xhr.responseText alert(xhr.responseText); } var form = new FormData(); form.append('title', this.files[0].name); form.append('pict', fileInput.files[0]); xhr.send(form); } More info here
has comment: http://stackoverflow.com/comment/42133384
has comment: http://stackoverflow.com/comment/42133299
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26777550
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26777550
has comment: http://stackoverflow.com/comment/62546363
type: Answer
has comment: http://stackoverflow.com/comment/42134094
has comment: http://stackoverflow.com/comment/42133282
has comment: http://stackoverflow.com/comment/42133326
score: 2
downvote count: 0

http://stackoverflow.com/q/26801508
has answer: http://stackoverflow.com/a/26801684
tagged with: if-statement
possible better answer: http://stackoverflow.com/a/26801684
answer count: 2
accepted answer: http://stackoverflow.com/a/26801596
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42176533
type: AnsweredQuestion
has title: multiple nested if statements not calculating
has body: I'm trying to get this payslip calculator to run multiple if statements nested in eachother. The conditions it requires to meet are as follows: If the monthly gross pay is 2000 for example and the last letter of the NI code is A to work out a national insurance allowance you do the gross pay divided by 4. 2000 / by 4 = 500. Meaning that the NI band is a2. The sum then is "gross * a2" (as seen on the variables listed at the top of the code) This then displays the result as "Your NI deduction:??" I'm struggling to get the if statements to run if a different letter is inputted.. For example "B" Untitled Document Your Monthly Gross Pay: £ The numerical part of your tax code: last letter of your NI code: Code here: http://jsfiddle.net/n384noLk/ I look forward to your help
has answer: http://stackoverflow.com/a/26801596
type: Question

http://stackoverflow.com/a/26752163
has comment: http://stackoverflow.com/comment/42088766
type: Answer
answers question: http://stackoverflow.com/q/26752069
accepted answer of: http://stackoverflow.com/q/26752069
has body: You need to use JSONP to make CROSS DOMAIN Requests. Please read: Loading cross domain endpoint with jQuery AJAX Make cross-domain ajax JSONP request with jQuery
score: 0
upvote count: 1
type: AcceptedAnswer
downvote count: 1

http://stackoverflow.com/q/26800740
type: AnsweredQuestion
score: 3
upvote count: 3
has body: Hello i have the following query that executed in Robomongo works as expected: db.av.group( { key: { roomId: 1}, cond: { dateOfDay: { $gte: new Date('12/01/2014'), $lt: new Date('12/30/2014') } }, reduce: function( curr, result ) { result.total += curr.price; result.count++; }, initial: { total : 0, count : 0 }, finalize: function(result) { result.avg = Math.round(result.total / result.count); } } ) After implemented that in a express app : app.get('/api/checkAv/:checkIn/:checkOut', function(req, res) { var checkIn = req.params.checkIn, checkOut = req.params.checkOut, roomType = req.params.roomType; model.Av.group( { key: { roomId: 1}, cond: { dateOfDay: { $gte: new Date('12/01/2014'), $lt: new Date('12/30/2014') } }, reduce: function( curr, result ) { result.total += curr.price; result.count++; }, initial: { total : 0, count : 0 }, finalize: function(result) { result.avg = Math.round(result.total / result.count); } } ).exec(function(err, av) { if (err) res.send(err); res.json(av); }); }); i get on the console : TypeError: Object function model(doc, fields, skipId) { if (!(this instanceof model)) return new model(doc, fields, skipId); Model.call(this, doc, fields, skipId); } has no method 'group' at /home/www/domain.com/api/routes/routes.js:58:18 at Layer.handle [as handle_request] (/home/www/domain.com/node_modules/express/lib/router/layer.js:82:5) at next (/home/www/domain.com/node_modules/express/lib/router/route.js:100:13) at Route.dispatch (/home/www/domain.com/node_modules/express/lib/router/route.js:81:3) at Layer.handle [as handle_request] (/home/www/domain.com/node_modules/express/lib/router/layer.js:82:5) at /home/www/brasovapartments.com/node_modules/express/lib/router/index.js:234:24 at param (/home/www/domain.com/node_modules/express/lib/router/index.js:331:14) at param (/home/www/domain.com/node_modules/express/lib/router/index.js:347:14) at param (/home/www/domain.com/node_modules/express/lib/router/index.js:347:14) at Function.proto.process_params (/…
type: Question
accepted answer: http://stackoverflow.com/a/26802632
tagged with: mongodb
tagged with: mongoose
tagged with: javascript
has title: Mongoose group query in node.js / express route
tagged with: express
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26802632
tagged with: node.js

http://stackoverflow.com/comment/41991760
type: QuestionComment
has text: Did you try onBlur event or using jQuery to link your code to object?
comment on: http://stackoverflow.com/q/26698829
score: 0
type: Comment

http://stackoverflow.com/a/26742928
downvote count: 0
answers question: http://stackoverflow.com/q/26742575
type: Answer
accepted answer of: http://stackoverflow.com/q/26742575
has body: You are not retrieving the radio button's checked value correctly. Try changing you if condition like below. if ($("input[name='locate']:checked").val() == 'Internal'){ $( "#dueDate" ).datepicker( { minDate: '-6M', maxDate: '+6M' }); } else { $( "#dueDate" ).datepicker( { minDate: -0, maxDate: '+6M' }); } UPDATE 1: Use destroy to destroy the datepicker and recreate it as the radio button's option changes. Here is the complete code. Link to working DEMO $("input[name='locate']").click(function() { locate = this.value; var dateField = $('#dueDate'); if ($("input[name='locate']:checked").val() == 'Internal'){ dateField.datepicker('destroy'); dateField.datepicker( { minDate: '-6M', maxDate: '+6M' }); } else { dateField.datepicker('destroy'); dateField.datepicker( { minDate: -0, maxDate: '+6M' }); } }); When you choose Internal you'll be able to go back upto 6 months and when Extrenal is chosen then it's from the current date.
upvote count: 1
has comment: http://stackoverflow.com/comment/42071946
score: 1
has comment: http://stackoverflow.com/comment/42072553
type: AcceptedAnswer

http://stackoverflow.com/comment/41947514
has text: What the hell is a drill down feature?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26673901

http://stackoverflow.com/q/26748990
has title: Odoo add widget to website frontend
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26758090
favorite count: 0
score: 8
tagged with: http://stackoverflow.com/tag/xml
upvote count: 8
has answer: http://stackoverflow.com/a/29508237
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/79192977
tagged with: widget
tagged with: odoo
has body: I'm new to Odoo and I'm stuck at an easy point. I already added some widgets to the backend in my custom module. Now I want to add a widget to my website frontend and I don't get it work. I have the following snippets: frontend_views.xml And the JavaScript code for the widget: static/src/js/frontend.js openerp.test_module = function(instance, local) { local.TestWidget = instance.Widget.extend({ start: function() { console.log('Widget loaded!'); this._super(); }, }); instance.web.client_actions.add('example.action', 'instance.test_module.TestWidget'); } How could I call the widget in my template? I tried the following things: frontend_views.xml Example Client Action example.action <t t-call="website.layout"> <t t-set="title">Details</t> Run Widget </t> But I don't get the Widget running. I'm a little confused, maybe I don't understand the whole thing how to integrate a widget because in the backend i just put in the following line to add the widget <widget type="test_module.MyWidget" /> But how to do that in in frontend?
type: Question
answer count: 2

http://stackoverflow.com/comment/42109015
has text: This is odd that the original length of the array matters. Can you recreate in a fiddle? Distilled my understanding of your problem to this but it seems to work regardless if array is originally empty or not... http://jsfiddle.net/0xnotggr/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26763706

http://stackoverflow.com/comment/42131525
comment on: http://stackoverflow.com/q/26775407
has text: @Omar i don't know how to get the text element from the autocomplete component in order to fill it with the proper text.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42197422
type: AnswerComment
has text: if its working for you maybe there's other code interfering with it. although there is no other JS code that deals directly with the submit. yeah your code doesn't work either, is it not bad practice to have variables outside of functions?
type: Comment
comment on: http://stackoverflow.com/a/26812493
score: 0

http://stackoverflow.com/comment/56974103
comment on: http://stackoverflow.com/a/34565914
has text: I agree. I added more details about the slice function and why it is suitable alone as the easiest solution to solve the problem.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26807450
answer count: 1
has body: I have a page(like https://www.helloabc.com/han.html) that is loaded inside an iframe on an app of different domain. I added the following to enable loading the page in an iframe to remove the error("Refused to display document because display forbidden by X-Frame-Options"). config.action_dispatch.default_headers['X-Frame-Options'] = "ALLOW-FROM https://xyz.com" The iframe page sends data through ajax json to another page as follows . $.ajax({ url: 'https://www.helloabc.com/hello', type: 'POST', dataType: 'json', data: { "url" : hjurl, "data" : senddatavar }, success: function(a){ console.log("success"); console.log(a.message); }, error: function(request, status, error) { console.log("error"); } }); I receive 200 ok in my iframe page. heroku[router]: at=info method=POST path="/hello" host=www.helloabc.com request_id=ac3ed869-75cc-484f-94ea-65ea2fccbb9e fwd="117.203.154.1" dyno=web.1 connect=3ms service=26ms status=200 bytes=900 app[web.1]: Started POST "/hello" for 117.203.154.1 at 2014-11-07 16:45:29 +0000 app[web.1]: Processing by HomePageController#hellojson as JSON app[web.1]: Parameters: {"url"=&gt;"https://abc.yupp.com/hs/_/krki5gea", "data"=&gt;{"0"=&gt;{"id"=&gt;"937bacaeb0f928", "person"=&gt;{"id"=&gt;"1984762436", "dName"=&gt;"zzzzz", "image"=&gt;{"url"=&gt;"https://sbc/photo.jpg"}}, }}} app[web.1]: Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.0ms) I am new to rails. I don't know how to grab this data and store it. And I dont know how to do it the right way. Can anyone please share what is the best practice to send data through ajax securely and store it?
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26911731
has comment: http://stackoverflow.com/comment/42242144
has comment: http://stackoverflow.com/comment/42232583
type: AnsweredQuestion
has title: Rails4 - How to receive and send JSON data securely through Ajax and store it?
score: 0
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
tagged with: ruby-on-rails
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26911731
tagged with: javascript
tagged with: ruby-on-rails-4

http://stackoverflow.com/a/54312267
has comment: http://stackoverflow.com/comment/95445281
upvote count: 2
answers question: http://stackoverflow.com/q/26792694
has body: You can use Sprites! var sound = new Howl({ src: ['sounds.webm', 'sounds.mp3'], sprite: { blast: [0, 3000], laser: [4000, 1000], winner: [6000, 5000] } }); // Shoot the laser! sound.play('laser'); :) I found it at this link How to Create and use Sprites
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/95453016

http://stackoverflow.com/comment/41968847
comment on: http://stackoverflow.com/q/26684196
score: 0
type: QuestionComment
type: Comment
has text: PhantomJS behaves (nearly) as any other browser. Using `document.write` doesn't removed all other DOM elements, why would you expect that PhantomJS does this? You would have to do something like `var s = document.querySelector("script"); s.parentElement.removeChild(s);` inside `page.evaluate`.

http://stackoverflow.com/comment/41962723
has text: Sorry gents, let me re-post my actual code. I tried to strip it down so it wouldn't be a nightmare to read. :) One moment.
type: QuestionComment
comment on: http://stackoverflow.com/q/26681933
type: Comment
score: 0

http://stackoverflow.com/a/31425315
answers question: http://stackoverflow.com/q/26735136
score: 0
type: Answer
has body: You can add a title for the chart that will be placed just above the colorAxis : var options = { title: 'How can I add a caption to this bar?', colorAxis: {colors: ['yellow', 'red']}, hAxis: { title: "X AXIS" }, vAxis: { title: "Y AXIS" } }; It's not exactly the caption of the colorAxis, but it can have the same effect.

http://stackoverflow.com/q/26825227
score: 0
answer count: 1
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I am trying to update the width of a div with a javascript variable but cannot understand how to format it properly. This way works where you define a fixed percentage. divider.style.width = '20%'; But I am unable to use a variable like this: var progress = 40/100; divider.style.width = progress; Can anyone point out the proper way to format a float variable into a string that the width property will understand?
type: AnsweredQuestion
type: Question
has title: How to convert number to width string property? Javascript
tagged with: width
tagged with: javascript
has answer: http://stackoverflow.com/a/26825240
accepted answer: http://stackoverflow.com/a/26825240

http://stackoverflow.com/a/34521440
type: Answer
has body: You are getting this error "Cannot call method 'activityStart' of undefined" since the notification object may not be available. Can you confirm whether the notification plugin is installed or not. To check: cordova plugin ls and it should show cordova-plugin-dialogs 1.2.0 "Notification" in the list. If not you need to install this plugin and try again. cordova plugin add cordova-plugin-dialogs This is was the tips i did for getting my issue fixed.
answers question: http://stackoverflow.com/q/26758164
score: 0

http://stackoverflow.com/a/26680494
type: Answer
answers question: http://stackoverflow.com/q/26680428
has comment: http://stackoverflow.com/comment/41959776
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41966300
accepted answer of: http://stackoverflow.com/q/26680428
type: AcceptedAnswer
downvote count: 0
has body: The easiest way to check whether a string contains a given substring is with .indexOf. var s = "Hello, how are you today? Is everything alright?" // if you want the search to be case insensitive: // s = s.toLowerCase(); var myWords = ["how", "everything"]; for (var i = 0; i &lt; myWords.length; i++) { var pos = s.indexOf(myWords[i]); if (pos == -1) { console.log("word", myWords[i], "not found."); } else { console.log("word", myWords[i], "found at position", i); } } If you want to store all the matches, you could have a var matches = []; and, under the else block, have matches.push(myWords[i]); If you need to support ≤IE8, then you can use the following function to search for a substring within a string: var getPosition = function (s, word) { var len = s.length, wlen = word.length; for (var i = 0; i &lt; len - wlen + 1; i++) { if (s[i] == word[0] &amp;&amp; s.slice(i, i + wlen) == word) return i; } return -1; } This can be useful, if you don't want to load an external library, i.e., jQuery or Polyfill, just for indexOf.

http://stackoverflow.com/a/26733220
accepted answer of: http://stackoverflow.com/q/26730719
upvote count: 2
has comment: http://stackoverflow.com/comment/42100920
type: Answer
answers question: http://stackoverflow.com/q/26730719
has comment: http://stackoverflow.com/comment/42110505
has body: Mate, there are a couple of issues with your app. Your service retains "state" although is only used to retrieve information You're using the same controller to 2 different views (bad practice) $scope.status = 'Unable to load data: ' + error.message; --> Error is not defined There are a couple of js errors too, like strayed commas and stuff Anyways, here's a revised version of your code. Fiddle // Instantiate your main module var myApp = angular.module('myApp', ['ngRoute']); // Router config myApp.config(['$routeProvider', function($routeProvider) { $routeProvider .when('/', { templateUrl: 'templates/view1.html', controller: 'CountryListCtrl' }) .when('/:id', { templateUrl: 'templates/view2.html', controller: 'CountryCtrl' }) } ]); // Your Factory. Now returns a promise of the data. myApp.factory('Countries', ['$q', function($q) { var countriesList = []; // perform the ajax call (this is a mock) var getCountriesList = function() { // Mock return json var contriesListMock = [{ "id": "0", "name": "Portugal", "abbrev": "pt" }, { "id": "1", "name": "Spain", "abbrev": "esp" }, { "id": "2", "name": "Andora", "abbrev": "an" }]; var deferred = $q.defer(); if (countriesList.length == 0) { setTimeout(function() { deferred.resolve(contriesListMock, 200, ''); countriesList = contriesListMock; }, 1000); } else { deferred.resolve(countriesList, 200, ''); } return deferred.promise; } var getCountry = function(id) { var deferred = $q.defer(); if (countriesList.length == 0) { getCountriesList().then( function() { deferred.resolve(countriesList[id], 200, ''); }, function() { deferred.reject('failed to load countries', 400, ''); } ); } else { deferred.resolve(countriesList[id], 200, ''); } return deferred.promise; } return { getList: getCountriesList, getCountry: getCountry }; } ]); //Controller of home page (pretty straightforward) myApp.controller('CountryListCtrl', ['$scope', 'Countries', function($scope, Countries) { $scope.title = 'Countries List'; $scope.countries = []; $scope.s…
has comment: http://stackoverflow.com/comment/42089196
has comment: http://stackoverflow.com/comment/42089163
score: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41997951
type: QuestionComment
comment on: http://stackoverflow.com/q/26702255
has text: `//` only works if you are testing it using a web server/accessing the page via HTTP(S) – if you are just opening the HTML document via the file system, you need to replace it with `http://` explicitly.
score: 0
type: Comment

http://stackoverflow.com/a/26746775
has comment: http://stackoverflow.com/comment/42079191
type: AcceptedAnswer
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42079139
accepted answer of: http://stackoverflow.com/q/26746715
has comment: http://stackoverflow.com/comment/42079039
answers question: http://stackoverflow.com/q/26746715
has comment: http://stackoverflow.com/comment/42078833
has body: Check for the link tag's href, if it equals master2, switch back to master1 like the same way above. Can't think about why you'd do this, considering the exact thing can be done using css classes instead of two different files.

http://stackoverflow.com/a/26685486
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26685440
answers question: http://stackoverflow.com/q/26685440
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42128244
has text: Sticky table headers are really tricky to realize. Read [this](http://tympanus.net/codrops/2014/01/09/sticky-table-headers-columns/) tutorial about it. There is a new CSS-Property called `position:sticky;`, but it isn't supported by all browsers. If you want to get a good answer here, you should post a code snippet. Oherwise it is to hard to figure out your problem.
comment on: http://stackoverflow.com/q/26774321
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26706912
has comment: http://stackoverflow.com/comment/42006532
answer count: 1
has comment: http://stackoverflow.com/comment/42006597
tagged with: javascript
has comment: http://stackoverflow.com/comment/42006782
linked to: http://stackoverflow.com/q/6727601
tagged with: http://stackoverflow.com/tag/html
has body: I am new to JavaScript and was assigned to make a Tic Tac Toe game using only the canvas tag. I have the canvas done, got the Xs and Os working, and now I am trying to write a code to check the winners. After finishing, however, I received the error "Uncaught ReferenceError: Invalid left-hand side in assignment" for the first line under the function 'checkForWinners.' I was wondering if anyone could tell me why and help me find a solution to fix it. Thank you for your time. P.S I do not know jquery. Christin's Project 7 Welcome to Tic - Tac - Toe! Instructions: To play Tic-tac-toe, you and another player take turns marking the spaces on the grid. After assigning which player is the X or the O, The player who succeeds in placing three respective Xs or Os in a horizontal, vertical, or diagonal row wins the game. If neither player succeeds, play again.
favorite count: 0
has title: Trying to check winners for JavaScript Tic Tac Toe Game but keeps getting Uncaught ReferenceError: Invalid left-hand side in assignment
has answer: http://stackoverflow.com/a/26706949
score: -3
tagged with: tic-tac-toe
accepted answer: http://stackoverflow.com/a/26706949
type: AnsweredQuestion
downvote count: 3
has comment: http://stackoverflow.com/comment/42006830
type: Question
tagged with: canvas
upvote count: 0

http://stackoverflow.com/q/26771655
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42123385
has comment: http://stackoverflow.com/comment/42124204
upvote count: 0
has body: Is it possible to use JavaScript to set the click event to a variable function name? I want to dynamically set each of the selected elements to functions that the names are declared elsewhere. These functions are class methods. I don't know if this is why it's not working. I know this is funky monkey stuff, but it's preferable to the alternative of using a switch, with all the functions I have to parse through. function name get // get last part of the string var x = strName.split("_"); var y = x[x.length - 1]; This works holder[j].onclick = function(){ini['add']();}; This does not, for some reason holder[j].onclick = function(){ini[y]();}; // I checked: y == 'add' in the test
tagged with: onclick
has title: javascript onclick set to variable function name?
type: Question
tagged with: naming-conventions
has comment: http://stackoverflow.com/comment/42137826
tagged with: javascript
score: -1
answer count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/26780083
favorite count: 0
has comment: http://stackoverflow.com/comment/42123436

http://stackoverflow.com/comment/42154598
type: AnswerComment
has text: @epascarello what you mean with `toggleClass()`? Can you put an example here?
type: Comment
comment on: http://stackoverflow.com/a/26789088
score: 0

http://stackoverflow.com/comment/42067643
comment on: http://stackoverflow.com/q/26740814
score: 0
type: Comment
type: QuestionComment
has text: Have you looked in your dev tools or with Fiddler to see the POST and if there's an error?

http://stackoverflow.com/comment/42212511
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26820982
type: AnswerComment
has text: if you look closely at my html i have linked jquery ui which allows me to do color animations

http://stackoverflow.com/q/26816376
type: AnsweredQuestion
type: Question
tagged with: encoding
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26818566
score: 0
tagged with: url
tagged with: google-plus
accepted answer: http://stackoverflow.com/a/26818566
has title: Google plus url sharing
has body: I use this link for sharing my page via google plus. https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fcompany%20name%2search so I use encodeURIComponent for getting this url (also tried to use encodeURI). but when sharing box appears link is incorrect. It is: http://example.com/company Forsure I can change ' ' with, for example, '-' (or another symbol), but I use value from url in my AngulaJs app for correct initializing and it will be better to use native way for this. What is my fault or are there any native ways to fix this?

http://stackoverflow.com/q/26762353
has body: I have 3 .jade files each embedded a level deeper than the previous. All files are in the same folder, but only layout.jade and index.jade are connecting, inner.jade isn't showing up when everything is compiled. The outer most (layout.jade): doctype html html head title= title link(rel='stylesheet', href='/stylesheets/style.css') body block content The middle layer (index.jade): extends layout block content div.wrap h1= title div.content div.display block innerContent div.helper The inner most (inner.jade): extends index block innerContent table(width="600" align="center") tr td(width="600") table(width="600")
type: AnsweredQuestion
type: Question
tagged with: pug
answer count: 1
tagged with: javascript
tagged with: express
score: 0
has title: Jade Templates Not Linking
has answer: http://stackoverflow.com/a/26762965
tagged with: node.js
accepted answer: http://stackoverflow.com/a/26762965

http://stackoverflow.com/q/26820964
accepted answer: http://stackoverflow.com/a/26821160
score: 0
answer count: 1
has body: hello friends below are my array. data.php file $array = array( '0' =&gt; array( 'id' = 1, 'name' = 'test', 'key' = array( '0' = 'key1', '1' = 'key2', '2' = 'key3' ) ), '1' =&gt; array( 'id' = 3, 'name' = 'test3', 'key' = array( '0' = 'key7', '1' = 'key8', '2' = 'key9' ) ), '2' =&gt; array( 'id' = 15, 'name' = 'test30', 'key' = array( '0' = 'key4', '1' = 'key5', '2' = 'key6' ) ) ); echo json_encode($array); below are my js code. $http({method: 'GET', url: $rootScope.serverURL+'data.php'}). success(function (data, status, headers, config) { $rootScope.simpleData = data; }). error(function (data, status, headers, config) { }); $scope.$watch('page + numPage + simpleData', function() { console.log('working'); },true); this is working fine now i want to set want on "key". $scope.$watch('page + numPage + simpleData.key', function() { console.log('not working'); },true); this code is not working when i write this code like this is working fine. $scope.$watch('page + numPage + simpleData[0].key', function() { console.log('working'); },true); when i write js like it is working fine. angular js watch on key but only for "0" Element. in the array i have lot's of elements how can i watch on all elements "Key". please help thank you
has answer: http://stackoverflow.com/a/26821160
tagged with: angularjs
tagged with: multidimensional-array
has title: Angular js $watch on multidimensional array?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42211699
has comment: http://stackoverflow.com/comment/42211633
has comment: http://stackoverflow.com/comment/42211681
type: Question
has comment: http://stackoverflow.com/comment/42211731
tagged with: javascript
has comment: http://stackoverflow.com/comment/42211568

http://stackoverflow.com/q/26682581
has body: By fiddling it seems IE11 does not make an ajax request if it is cross origin. FF and Chrome will at least make the request and throw an error if the resource API is not sending necessary headers. The resource API (Web API 2.0) in my case is adding required headers which will be helpful IF IE makes the request, but it doesn't. Client's JavaScript: jQuery.support.cors = true; $.fn.somePlugin = function () { $.ajax({ url: apiUrl + '/articles/list/', type: 'GET', crossDomain: true }).done( function (data, textStatus, xhr) { console.log('hello world!'); }); return this; } The ajax request above works perfectly in Chrome and FF but not in IE11. I've tried: adding a reference to XDomainRequest.js without any effect. enabling cross origin request in IE Security options - even though it seems bizarre to do this on every client machine. Regardless, it made no difference.
has answer: http://stackoverflow.com/a/35525491
type: Question
tagged with: internet-explorer
has title: IE11 not initiating CORS request
has comment: http://stackoverflow.com/comment/41963944
tagged with: javascript
tagged with: jquery
tagged with: ajax
upvote count: 3
tagged with: cors
downvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41964599
has comment: http://stackoverflow.com/comment/41968084
type: UnansweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/42657427
has comment: http://stackoverflow.com/comment/41964032
linked to: http://stackoverflow.com/q/27072572
has comment: http://stackoverflow.com/comment/41968422
has comment: http://stackoverflow.com/comment/42039218

http://stackoverflow.com/a/26790117
answers question: http://stackoverflow.com/q/26790077
score: 1
accepted answer of: http://stackoverflow.com/q/26790077
has comment: http://stackoverflow.com/comment/42156499
has comment: http://stackoverflow.com/comment/42156309
has comment: http://stackoverflow.com/comment/42159138
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42156815
has comment: http://stackoverflow.com/comment/42156261
has body: mongo is just the shell cli to interact with the mongo server. As far as i know you still need to start mongo server first. Check in the explorer what other files are in the bin directory. there should be a mongod.exe file. When you open it a command line should open. As long as this is open, the server is running and you should be able to interact with it through the mongo command.
type: Answer
downvote count: 0

http://stackoverflow.com/q/26716640
downvote count: 3
type: Question
has title: Why "undefined is null or not an object"?
has comment: http://stackoverflow.com/comment/42023512
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42023459
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42027422
has comment: http://stackoverflow.com/comment/42023471
has answer: http://stackoverflow.com/a/26716806
favorite count: 0
score: -3
accepted answer: http://stackoverflow.com/a/26716806
type: AnsweredQuestion
has body: I'm trying to understand this code example. I've scrubbed the URL for posting purposes, but I'm reasonably certain that's not the issue..... I'm lookin at the Script/Debug F12 , and the console says: LOG: A 'undefined' is null or not an object at this line "A().then(B()).then(C()).then(D());" I also stripped the 2 second delay &amp; put an alert(), same error. ...lil' help? &lt;script&gt; function A() { console.log("A"); } function B() { console.log("B"); var intervalId = setInterval(function() { clearInterval(intervalId); console.log("Section: "); deferred.resolve(); }, 2000); console.log("B and 2 sec"); } function C() { console.log("C"); } function D() { console.log("D"); } function dMain() { A().then(B()).then(C()).then(D()); } &lt;/script&gt; &lt;input id="clickMe" type="button" value="Generate Exam" onclick="javascript:dMain();" /&gt;

http://stackoverflow.com/a/26780534
has body: You can create a simple resize function like this: function resize(popup) { var y = $(window).scrollTop(); var winH = $(window).height(); var winW = $(window).width(); popup.css('top', y + 20); popup.css('left', winW/2-popup.width()/2); } You should also call the above function when ever the browser window is resized: $(document).ready(function() { $(window).resize(function() { resize($('#popupexe')); }); });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26780356

http://stackoverflow.com/a/26792710
answers question: http://stackoverflow.com/q/26792687
has comment: http://stackoverflow.com/comment/42160948
has body: In this example (assuming you just need to get rid of zeroes) By your encoding example above, an actual 0 char will appear as two consecutive zeroes, so first encode it to some special string, then decode after removing all the unnecessary zeroes. $kw = str_replace('00', ';;;zero;;;', $kw); $kw = str_replace('0', '', $kw); $kw = str_replace(';;;zero;;;', '0', $kw); This should work. However, this is kind of a quick-and-dirty fix for your problem. The fact that your string is arriving in your program with each character padded with zeroes is odd, and fixing that problem at its source would be the ideal solution.
has comment: http://stackoverflow.com/comment/42160818
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26792687

http://stackoverflow.com/comment/42087842
comment on: http://stackoverflow.com/a/26746952
type: Comment
score: 0
type: AnswerComment
has text: I works thanks a lot but how to for example load 3 more tasks after clicking button show more ?

http://stackoverflow.com/comment/42149210
has text: Call `yourPage.aspx?macAddress={theMacADdressVariable}` then take that from the GET request in your C# code
comment on: http://stackoverflow.com/q/26785942
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26682198
score: 16
type: Answer
has body: Try document.querySelectorAll('input:not([value])') This should return all the input that don't have the value attribute.
has comment: http://stackoverflow.com/comment/41963075
upvote count: 16
accepted answer of: http://stackoverflow.com/q/26682146
answers question: http://stackoverflow.com/q/26682146
has comment: http://stackoverflow.com/comment/41963089
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26823263
has comment: http://stackoverflow.com/comment/42215659
has comment: http://stackoverflow.com/comment/42216396
score: -1
has comment: http://stackoverflow.com/comment/42221027
has comment: http://stackoverflow.com/comment/42216311
has comment: http://stackoverflow.com/comment/42216673
has body: Try to put your js code at the bottom of div with images.. For the reference please go to "view-source:http://flexslider.woothemes.com/" Search for: And make a note where the code is located.
downvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26823165
upvote count: 0

http://stackoverflow.com/a/26860208
score: 1
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42283687
answers question: http://stackoverflow.com/q/26787794
has body: Not sure if this makes a difference, but you can try to write the query like this: var query = breeze.EntityQuery .from("ClientInvestments"); manager.executeQuery(query); or like this: new breeze.EntityQuery() .from("ClientInvestments") .using(manager) .execute(); I'm also not sure if OData is the correct dataservice or if you should use webApiOData instead.
has comment: http://stackoverflow.com/comment/42282617
downvote count: 0

http://stackoverflow.com/q/26716293
linked to: http://stackoverflow.com/q/542938
has comment: http://stackoverflow.com/comment/42022967
answer count: 0
type: UnansweredQuestion
has title: What is the correct way to count the number of days between two dates in javascript
has comment: http://stackoverflow.com/comment/42027354
linked to: http://stackoverflow.com/q/3224834
tagged with: date
type: Question
tagged with: javascript
duplicate of: http://stackoverflow.com/q/542938
has body: This question: Get difference between 2 dates in javascript? proposed the following way to calculate the difference between two dates: var _MS_PER_DAY = 1000 * 60 * 60 * 24; // a and b are javascript Date objects function dateDiffInDays(a, b) { // Discard the time and time-zone information. var utc1 = Date.UTC(a.getFullYear(), a.getMonth(), a.getDate()); var utc2 = Date.UTC(b.getFullYear(), b.getMonth(), b.getDate()); return Math.floor((utc2 - utc1) / _MS_PER_DAY); } That's correct for some purposes, but not all purposes. Specifically, with day light savings time you could have a 24-hour span that does not pass midnight, which does not count as a full day for medical billing purposes, for example. How do I calculate specifically the number of midnights that occur between two dates in javascript?
score: 0

http://stackoverflow.com/a/26689588
has body: Fix your code alert("thisVal === restoreVal : " + (thisVal === restoreVal)); cause in your variant you compare ""thisVal === restoreVal : 65" and "65" - they are not equal http://jsbin.com/dowihoqizi/1/
score: 0
answers question: http://stackoverflow.com/q/26689531
type: Answer

http://stackoverflow.com/q/26711369
has title: XSS safe html decode for Javascript
has body: I need to decode html in javascript. e.g.: var str = 'apple &amp;amp; banana'; var strDecoded = htmlDecode(str); // I expect 'apple &amp; banana' There is no guarantee that the given str is already encoded and common jquery and DOM tricks are XSS vulnerable: var attackStr = '&amp;amp;&lt;/textarea&gt;&lt;img src=x onerror=alert(1)&gt;&amp;#x30cf;&amp;#x30ed;&amp;#x30fc;&amp;#x30ef;&amp;#x30fc;&amp;#x30eb;&amp;#x30c9;'; // if you see 1 alerted, it means it is XSS vulnerable var strDecoded; // I wish to get: &amp;&lt;/textarea&gt;&lt;img src=x onerror=alert(1)&gt;ハローワールド strDecoded = $('&lt;div/&gt;').html(attackStr).text(); // vulnerable in all browsers strDecoded = $('&lt;textarea/&gt;').html(attackStr).text(); // vulnerable in ie 9 and firefox var dv = document.createElement('div'); dv.innerHTML = attackStr; // vulnerable in all browsers strDecoded = dv.innerText; var ta = document.createElement('textarea'); ta.innerHTML = attackStr; // vulnerable in ie 9 and firefox strDecoded = ta.value; Is there any XSS-safe way to html-decode?
linked to: http://stackoverflow.com/q/5796718
has answer: http://stackoverflow.com/a/26828559
has answer: http://stackoverflow.com/a/26814994
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/42014267
accepted answer: http://stackoverflow.com/a/26864637
upvote count: 3
has comment: http://stackoverflow.com/comment/42015006
has answer: http://stackoverflow.com/a/26844116
has answer: http://stackoverflow.com/a/26767567
has comment: http://stackoverflow.com/comment/42050852
type: Question
linked to: http://stackoverflow.com/q/25842070
has comment: http://stackoverflow.com/comment/42024371
tagged with: javascript
has answer: http://stackoverflow.com/a/26826864
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26767567
answer count: 6
has comment: http://stackoverflow.com/comment/42051454
has comment: http://stackoverflow.com/comment/42022580
has comment: http://stackoverflow.com/comment/42028330
tagged with: xss
tagged with: security
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26864637
downvote count: 0
has comment: http://stackoverflow.com/comment/42014167
favorite count: 0

http://stackoverflow.com/comment/42125163
comment on: http://stackoverflow.com/q/26772480
score: 0
type: QuestionComment
has text: No, but an array will. Will I just have to do an if (typeof type === 'object' && !Array.isArray(type)) to combat this?
type: Comment

http://stackoverflow.com/a/26713844
type: Answer
upvote count: 12
has comment: http://stackoverflow.com/comment/65877124
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26712372
score: 12
answers question: http://stackoverflow.com/q/26712372
type: AcceptedAnswer
has body: I think that you have a duplicate jQuery reference. Could you open a "View Source" on your web browser and enumerate your jQuery references? It is a common error and easily missed. Maybe a bundle definition or your layout and content pages have the same reference.

http://stackoverflow.com/comment/42072406
score: 1
comment on: http://stackoverflow.com/q/26743220
type: Comment
type: QuestionComment
has text: That comma comes from javascript because you parse directly the array. You can use join: http://www.w3schools.com/jsref/jsref_join.asp

http://stackoverflow.com/q/26803948
answer count: 1
has comment: http://stackoverflow.com/comment/42181552
score: 0
has answer: http://stackoverflow.com/a/26804227
linked to: http://stackoverflow.com/q/950087
has body: I am doing a web application, which is planned to allow a client website to embed javascript from my web application in the following way on its pages: &lt;script src="http://example.org/showPopup.js"&gt;&lt;/script&gt; Suppose my web application is at http://example.org. I cannot assume that the pages at the client websites have JQuery and Fancybox. So I need to load JQuery and Fancybox in showPopup.js. This is what I have for showPopup.js var serverName="localhost"; (function() { var myScript = document.createElement('script'); myScript.type = 'text/javascript'; myScript.async = false; myScript.src = 'http://' + serverName + '/lib/jquery/jquery-1.11.1.min.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body'[0])).appendChild(myScript); myScript = document.createElement('script'); myScript.type = 'text/javascript'; myScript.async = false; myScript.src = 'http://' + serverName + '/lib/jquery.fancybox/source/jquery.fancybox.pack.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body'[0])).appendChild(myScript); var link = $('&lt;a&gt;'); link.css('display', 'none'); link.attr('href', 'http://example.org/mypage.html'); link.addClass('fancybox fancybox.iframe'); link.fancybox(); link.trigger('click'); })(); Note that the above code works if I use it on a page of my own application. However, I got this error when testing the above code in a page of a client website. var link = $('&lt;a&gt;'); ReferenceError: $ is not defined How can I fix it? What is the right way to do this? Thanks and regards. ----------UPDATE----------- Qunice provided working code. To make the code fully working, fancybox css must be loaded. Based on Quince's code, I added CSS part. It appears working. Please let me know if there is anything wrong. (function () { var requestedJQuery = false; var requestedFancyBoxJs = false; var requestedFancyBoxCss = false; function requestJQuery() { var myScript = document.createElement('script'); mySc…
has comment: http://stackoverflow.com/comment/42181215
type: AnsweredQuestion
has title: Display a popup window with JQuery and Fancybox via Javascript embedded in client websites
accepted answer: http://stackoverflow.com/a/26804227
tagged with: javascript
type: Question
tagged with: fancybox
has comment: http://stackoverflow.com/comment/42181507

http://stackoverflow.com/q/26702688
tagged with: javascript
has body: I'm using jQuery to select the children li and perform some actions, and it works fine, the code should perform different actions if the parent li is selected, the only problem is that that when I select the children it perform the parents actions first and then performs the children actions and it is messing the result of my code. Here are portions of the code I'm using. The HTML Materials Concrete Lightweight Translucent Foam Aggregate Insulate Digital Geometrical The jQuery $('#materialsMain li').on('click', function () { mClicks++; $(this).children().css("display","block"); if(mClicks == 3){ var subIdClicked = ($(this).val()); makeSearch('mat',subIdClicked,'parent'); matCompanies = intersect_safe(globalMat, matCompanies); filterColumn('#processesMain li > ul'); filterColumn('#servicesMain li > ul'); filterColumn('#materialsMain li > ul'); } }); $('#materialsMain li > ul > li').has('li').on('click', function () { var subIdClicked = ($(this).val()); matCompanies = subIdClicked; makeSearch('mat',subIdClicked,'child'); matCompanies = intersect_safe(globalMat, matCompanies); filterColumn('#processesMain li > ul'); filterColumn('#servicesMain li > ul'); filterColumn('#materialsMain li > ul'); }); In the last part of the jquery code I also tried using $('.subMaterialsMain').has('li').on('click', function () { instead of $('#materialsMain li > ul > li').has('li').on('click', function () { but the results were the same. How can i solve the problem? Thanks in advance
has title: How to select a child without having to go through the parent in jquery
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/2364629
possible better answer: http://stackoverflow.com/a/26705743
tagged with: jquery
has answer: http://stackoverflow.com/a/26705743
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26702719
tagged with: css
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41998812
accepted answer: http://stackoverflow.com/a/26702719
has comment: http://stackoverflow.com/comment/41998823

http://stackoverflow.com/comment/42183616
has text: let me know if I got this wrong I'll delete my answer :)
comment on: http://stackoverflow.com/a/26805216
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/26752094
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26751902
score: 3
answers question: http://stackoverflow.com/q/26751902
has body: http://jsfiddle.net/wajeurj1/ I think is enough trim the whitespace with: if($.trim(blur)==="0px"){
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42068350
has text: can i get the id of the clicked button without using this.id i try to remove it and it work is there other methode to get the id other than this.id
comment on: http://stackoverflow.com/a/26740011
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26760704
possible better answer: http://stackoverflow.com/a/70669763
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26762401
tagged with: datatables
has answer: http://stackoverflow.com/a/26762401
favorite count: 0
downvote count: 0
has answer: http://stackoverflow.com/a/70669763
has comment: http://stackoverflow.com/comment/42107254
type: AnsweredQuestion
score: 2
has title: DataTable - Pagination and Filter don't work for JavaScript generated table
has body: I have JavaScript generated table in DataTables, but pagination and filter don't show (work). When I tried to use bFilter or bPaginate, it didn't help me. JSFiddle var keywords = [["dog", 2],["table", 3],["chair", 4],["dog", 2],["table", 3],["chair", 4], ["dog", 2],["table", 3],["chair", 4],["dog", 2],["table", 3],["chair", 4],["dog", 2],["table", 3],["chair", 4]]; function buildKeywordTableString(keywords){ var dataSet = new Array(); for (var i = 0; i < keywords.length; i++){ dataSet.push([keywords[i][0],keywords[i][1]]); } var table = $(' ') .dataTable({ "data": dataSet, "bFilter":true, "paging": true, "bPaginate":true, "columns": [ {"title": "Keyword"}, {"title": "F"} ] })[0].outerHTML; return table; } $("body").append(buildKeywordTableString(keywords)); $("body").append(buildKeywordTableString(keywords));
type: Question
upvote count: 2
answer count: 2

http://stackoverflow.com/a/26748516
has body: multipleArguments.apply(this,Object.keys(objectofObjects).map(function(key){return objectofObjects[key]}))
accepted answer of: http://stackoverflow.com/q/26748256
answers question: http://stackoverflow.com/q/26748256
has comment: http://stackoverflow.com/comment/42116501
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/42241481
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26798399
has text: I've added only comments, no change in code, I'm glad that you understand now and it helped you.
score: 0

http://stackoverflow.com/a/26779922
downvote count: 0
has comment: http://stackoverflow.com/comment/42138271
upvote count: 2
type: Answer
has body: Simple use: $("#select_element").val(); If you want the text of it, then: $('#select_element option:selected').text(); JSFIDDLE
has comment: http://stackoverflow.com/comment/42138333
has comment: http://stackoverflow.com/comment/42138401
answers question: http://stackoverflow.com/q/26779863
has comment: http://stackoverflow.com/comment/42138370
score: 2

http://stackoverflow.com/q/26794598
tagged with: javascript
has body: when i uses position:fixed the div's onclick event is not working. and this event is working with other values like static,relative etc. My code is like below: css: #dialog_window_minimized_container { position: fixed; bottom: 0px; left: 0px; } JavaScript: jsp:
accepted answer: http://stackoverflow.com/a/26794781
answer count: 3
has title: onclick event not working with position:fixed
downvote count: 0
has answer: http://stackoverflow.com/a/48874267
favorite count: 0
has answer: http://stackoverflow.com/a/26794836
tagged with: css
has answer: http://stackoverflow.com/a/26794781
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26794836
upvote count: 10
type: Question
score: 10
tagged with: jsp

http://stackoverflow.com/comment/42072859
has text: not positive, but you may also need to add Access-Control-Allow-Methods GET to the response
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26743401

http://stackoverflow.com/q/26771633
answer count: 2
upvote count: 0
tagged with: button
has comment: http://stackoverflow.com/comment/42123343
tagged with: javascript
favorite count: 0
has body: I have this simple button set up on my page, which I'm going to put a different function into it as I work. But I can't get it to bring up the alert. It was working before, and not sure what's wrong now. Can someone help please? function sortbutton() { var button = document.createElement("BUTTON"); var text = document.createTextNode("Click To Sort"); button.appendChild(text); document.body.appendChild(button); button.onclick = function selection() { alert("test"); } }
has answer: http://stackoverflow.com/a/26771680
has comment: http://stackoverflow.com/comment/42123342
has comment: http://stackoverflow.com/comment/42123458
downvote count: 1
has title: My button used to work -- but now it doesn't
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42123382
has comment: http://stackoverflow.com/comment/42123497
possible better answer: http://stackoverflow.com/a/26772747
score: -1
has answer: http://stackoverflow.com/a/26772747
accepted answer: http://stackoverflow.com/a/26771680
has comment: http://stackoverflow.com/comment/42123338
type: Question

http://stackoverflow.com/a/27286203
answers question: http://stackoverflow.com/q/26760830
downvote count: 0
upvote count: 2
type: Answer
score: 2
has body: When you call this.setState({children: term.children}); this equals the function it was defined in, not the react component. Probably an exception occurs, but your promise does not call .error to trap and log it.

http://stackoverflow.com/comment/42108616
comment on: http://stackoverflow.com/q/26763699
score: 0
type: Comment
type: QuestionComment
has text: what are you getting on category (categorie)? is the same as each element in result?

http://stackoverflow.com/q/26818003
has comment: http://stackoverflow.com/comment/42243516
upvote count: 2
has comment: http://stackoverflow.com/comment/42206656
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: First, here's the link to JSFIDDLE: http://jsfiddle.net/chani987/uu693a0v/ Upon a click on choice 1 or choice 2 link, .hiddenbox div pops out. The slideToggle javascript is working fine. The problem is that I was expecting the footer div to be pushed down when .hiddenbox div is toggled, but the footer stays where it was and .hiddenbox div overlaps with the footer. I've tried changing position: absolute to position: none; for .hiddenBox, but it would cause the div to position on the top of the page instead. Is there a way to make the footer div to slide down as a hiddenBox pops while the hiddenBox comes right after the previous divs? It's my first time posting on stackoverflow. If I haven't provided needed or enough resources, please let me know! Thanks
score: 2
type: AnsweredQuestion
downvote count: 0
has title: slideToggle wont push down a div below
accepted answer: http://stackoverflow.com/a/26818350
type: Question
tagged with: slidetoggle
tagged with: javascript
has comment: http://stackoverflow.com/comment/42207086
has answer: http://stackoverflow.com/a/26818350

http://stackoverflow.com/comment/42174088
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26800168
type: Comment
has text: yes, executing my JavaScript AFTER the element is rendered

http://stackoverflow.com/q/26752862
favorite count: 0
has body: Take a look at my source code. I want to add 3 `divs' selector into a variable and then put into another selector. My current code isn't working: $(aoData).each(function(iKey, oValue){ htmlContent.add($('&lt;div/&gt;', { class: 'col-sm-4', html: $('&lt;a/&gt;', { class: 'app-block', href: oValue.Link, html: "&lt;h1&gt;" + oValue.Name + "&lt;/h1&gt;&lt;h2&gt;" + oValue.Description + "&lt;/h2&gt;" }) })); i++; if(i &gt; 2 || iKey+1 &gt;= aoData.length){ $('&lt;row/&gt;', { html: htmlContent }).appendTo('#apps'); i = 0; htmlContent = {}; } });
has answer: http://stackoverflow.com/a/26753189
type: Question
has comment: http://stackoverflow.com/comment/42089460
has title: Add multiple selectors which contain html
answer count: 1
has comment: http://stackoverflow.com/comment/42089406
upvote count: 1
accepted answer: http://stackoverflow.com/a/26753189
downvote count: 0
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
score: 1

http://stackoverflow.com/a/26743343
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26743083
has body: Put like a name and an id and you should be able to use something like this. $('iframe[name=select_frame]').contents().find('#select_name').val();
type: Answer
accepted answer of: http://stackoverflow.com/q/26743083

http://stackoverflow.com/q/26721054
tagged with: javascript
type: Question
tagged with: google-maps
answer count: 1
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/20490851
has answer: http://stackoverflow.com/a/43163540
has title: Google Map : how to get the city + zipcode + state + country in a multiselect input
has body: I use the following example from Google map documentation, but I would like to get the zipcode when I search for a city. For instance, if I type New York, NY, United States I get all the needed info except the zip code, is there a chance to get this information too? The aim is to have a multiselect input and have the possibility to create a list of cities with Google Autosuggest API.
type: UnansweredQuestion
upvote count: 1
score: 1

http://stackoverflow.com/comment/42161871
has text: @Cheery—that's soooo HTML 4! IDs can now start with [*any character that is valid in an ID*](http://www.w3.org/html/wg/drafts/html/master/dom.html#the-id-attribute). In practice it was always that way—though of course I strictly followed the standard. :-)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26793272

http://stackoverflow.com/q/26683986
downvote count: 0
type: Question
upvote count: 2
tagged with: cors
has body: In one environment we have a x-domain jquery ajax request with method GET. Nothing fancy. jQuery.ajax({ type: 'GET', url: url, contentType:'text/plain', xhrFields: { withCredentials: true }, success: function(data){ //stuffff } }); Works fine when served from tomcat or apache. The GET stays a GET, it does not get preflighted to OPTIONS GET https://qa.example.com HTTP/1.1 Host: somehost.example.com Connection: keep-alive Cache-Control: no-cache Pragma: no-cache Accept: */* Origin: http://example.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36 Content-Type: text/plain DNT: 1 Referer: http://example.com Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8,sr;q=0.6 Cookie: JSESSIONID=xxx But then when the static files are hosted on Akamai (in a different environment), the request gets preflighted to OPTIONS using the same exact JS. OPTIONS https://stage.example.com HTTP/1.1 Accept: */* Origin: https://someorigin.example.com Access-Control-Request-Method: GET Access-Control-Request-Headers: content-type, accept Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3) Host: test-me.example.com Content-Length: 0 Connection: Keep-Alive Cache-Control: no-cache What on earth would make the browser treat this x-domain request's security differently just because it is hosted on a CDN? (we do custom DNS to the Akamai files, so they look as if coming from our domain). Also, note that the server in this situation is not allowing OPTIONS and we don't have access, but it should not matter for simple GETS without data, per these rules: Simple requests are requests that meet the following criteria: • HTTP Method matches (case-sensitive) one of:  HEAD  GET  POST • HTTP Headers matches (case-insensitive):  Accept  Acc…
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: xmlhttprequest
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/64160522
tagged with: google-chrome
has title: why would akamai change browser security behavior?
has comment: http://stackoverflow.com/comment/73974867
score: 2

http://stackoverflow.com/q/26800605
answer count: 1
tagged with: highcharts
has title: How to create combo chart with Highcharts
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26801903
type: Question
has body: Need to create a chart similar to the one you see here: http://imgbin.org/index.php?page=image&amp;id=20802. So far managed to put together a jsfiddle that displays both charts but its far from complete. How would you correctly place the bottom chart (column) over the first to achieve the effect you see in example? http://jsfiddle.net/e106L47h/6/ $(function () { $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=aapl-ohlcv.json&amp;callback=?', function (data) { // split the data set into ohlc and volume var ohlc = [], volume = [], dataLength = data.length, // set the allowed units for data grouping groupingUnits = [[ 'week', // unit name [1] // allowed multiples ], [ 'month', [1, 2, 3, 4, 6] ]], i = 0; for (i; i &lt; dataLength; i += 1) { ohlc.push([ data[i][0], // the date data[i][1], // open data[i][2], // high data[i][3], // low data[i][4] // close ]); volume.push([ data[i][0], // the date data[i][5] // the volume ]); } // create the chart $('#container').highcharts('StockChart', { navigator: { enabled: false }, rangeSelector: { selected: 1, inputEnabled: false }, credits: { enabled: false }, yAxis: [{ height: '60%', lineWidth: 0 }, { top: '65%', height: '35%', offset: 0, lineWidth: 0, // gridLineWidth: 0, labels: { //enabled: false } }], series: [{ type: 'candlestick', name: 'AAPL', data: ohlc, dataGrouping: { units: groupingUnits } }, { type: 'column', name: 'Volume', data: volume, yAxis: 1, dataGrouping: { units: groupingUnits } }] }); }); });
tagged with: javascript
score: 0

http://stackoverflow.com/q/26792637
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26792760
downvote count: 0
score: 1
favorite count: 0
tagged with: download
has body: I am using angularjs and am trying to create a system of downloading a vcard created in javascript. In order for the vcard to work on mobile, the data needs to be downloaded through an a tag. The problem is everytime I set the href="data:text/vcard, "+ string it saves the vCard but removes the newlines. vCards only work with newlines Is there any way to keep the newline characters while saving data? $scope.saveVcard = function(){ var user = $scope.member; var out_string = 'BEGIN:VCARD\nVERSION:2.1\n\rN:' + user.last_name + ';' + user.first_name + ';;;\n\r'; //name out_string += 'FN:' + user.first_name + ' ' + user.last_name + '\n\r';//FN if (user.phone){ out_string += 'TEL;CELL:' + user.phone + '\n\r';} //Phone if (user.email){ out_string += 'EMAIL;PREF;INTERNET:' + user.email + '\n\r';}//Email if (user.prof_pic){ out_string += 'PHOTO;PNG:'+user.prof_pic + '\n\r';}//picture out_string += 'END:VCARD'; var a = document.createElement('a'); a.href = 'data:text/vcard,' + out_string; a.target = '_blank'; a.download = 'contact.vcf'; console.log(a.href); document.body.appendChild(a); a.click(); document.body.removeChild(a);
type: Question
upvote count: 1
has answer: http://stackoverflow.com/a/26792760
answer count: 1
tagged with: newline
tagged with: javascript
tagged with: vcf-vcard
has title: a tag href data with newlines
has comment: http://stackoverflow.com/comment/42179588

http://stackoverflow.com/comment/42233863
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26832838
has text: Thanks. Changing the loop to `for (var i = 0; i <6; i++) {` to account for the non-generated path problem now starts the path at the second row.
type: AnswerComment

http://stackoverflow.com/q/26789087
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/26789301
tagged with: jquery
has body: I have the following $('.left_arrow').hover(function() { $('.chart').stop().animate({ left: "+=10" }); }, function() { $('.chart').stop(); }); And I want to have it when you mouse over the arrow it smoothly moves the .chart to the left, and the right arrow it moves it to the right. I am doing this by applying a - left (-7500px is the max) to move it to the left and a 0 is the farthest it can go right. The above moves it over 10, but it doesn't keep on moving it. How can I get it so it keeps on moving it. I was using something like $('.left_arrow').hover(function() { $('.chart').stop().animate({ left: "-7500px" }, 20000); }, function() { $('.chart').stop(); }); But the problem is if I am say -6500px over it takes 20 seconds to go the rest of the 1000, vs 20 seconds to go the full distance. So the speed is skewed, I want a standard increment.
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26789259
has answer: http://stackoverflow.com/a/26789259
has answer: http://stackoverflow.com/a/26789301
type: Question
has comment: http://stackoverflow.com/comment/42154654
has comment: http://stackoverflow.com/comment/42154528
tagged with: javascript
has title: How to animate slide left smoothly?
has comment: http://stackoverflow.com/comment/42154578

http://stackoverflow.com/comment/42001834
score: 0
comment on: http://stackoverflow.com/q/26704194
type: QuestionComment
has text: You should consider using `if (i % 7 == 0) { … } else { … }` instead of that `skip` variable. Which should be a boolean anyway instead of a number, shouldn't it?
type: Comment

http://stackoverflow.com/comment/42042470
score: 1
has text: Shall I assume you're using `BridgeTalk.bringToFront('illustrator')`? I've seen that this is broken for some CC apps. I'm looking for a workaround.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26715746

http://stackoverflow.com/a/26802222
has body: Can you make use of session/locals storage or $rootScope where you can store the users authorization object with given routes, permission info once user logged in. Now is route resolve or run() block you can retrieve the user auth object perform authorization action. e.g. .run(['sessionService', '$rootScope', '$location', function(sessionService, $rootScope, $location) { $rootScope.$on( "$routeChangeStart", function(event, next, current) { var currentUser = sessionService.get('user_details'); if(next.taskAccess &amp;&amp; next.taskAccess != ""){ var hasPerm = $rootScope.getPermission(next.taskAccess); if(!hasPerm){ $location.path('/unauthorized'); } } }); }]);
score: 0
has comment: http://stackoverflow.com/comment/42178812
answers question: http://stackoverflow.com/q/26801965
type: Answer

http://stackoverflow.com/q/26784611
type: UnansweredQuestion
tagged with: arrays
answer count: 1
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
type: Question
upvote count: 2
has body: I'm trying to take a JSON url and process all of the information into two separate arrays. The first array on the data begins with "output_no_match", and the second array is identically formatted and begins with "avalanche_with_match". I'm stuck on how exactly to get the data into two separate arrays to then process (and put into a graph). Thanks for any help! [{"date":"2014-12-01T00:00:00-06:00" "id":null "balance":915047.12 "interest":710669475.15 "interest_paid":10199.29 "ending_principal_balance":915047.12 "ending_interest_balance":710659275.86 "payment_due":10199.29}
downvote count: 1
has title: Splitting JSON data into two separate arrays
has answer: http://stackoverflow.com/a/26789545
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/26683460
accepted answer: http://stackoverflow.com/a/26683613
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41965666
has answer: http://stackoverflow.com/a/26683519
has title: Posting Div Content in Php
possible better answer: http://stackoverflow.com/a/26683519
tagged with: php
type: AnsweredQuestion
has body: I have two php pages. In the first.php page user choose orders and a div is filling with this content, no problem. And there is a confirm button to confirm these list. When the user click this button, second.php page should be opened and the contents of the div should be displayed on that page. This is my html code for the first.php div and confirm button. Order List Confirm This is the javascript code to post the contents to second.php. First alert is working fine but second alert is not. $("#firstConfirmButton").click(function() { var content = $('#orderList').html(); alert(content); $.post("second.php", { html: content}) .done(function(data) { alert(data); $('#confirmForm').empty().append(data); }); }); Second.php page has the confirForm div and I want to display the contents in this. Where is the problem?
has answer: http://stackoverflow.com/a/26683613
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41965547
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/42017502
comment on: http://stackoverflow.com/q/26713270
score: 2
has text: What are your intentions? The form is submitting on PayPal and you are trying to modify location when submit is clicked (**race condition**). Also changing the location would generate GET request, but your servlet is handling POST... so there are multiple issues with the code you presented.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26819710
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/400212
has comment: http://stackoverflow.com/comment/42212613
has comment: http://stackoverflow.com/comment/42211223
type: Question
has title: Placing text in Clipboard javascript, jusing zeroclipboard or zclip?
has body: I don't know much about java script, but I'm trying to figure out how to do a function on my webpage were a user presses a key and set text will load to the windows clipboard, from what I have researched you have to do it with on of these zeroclip or zclip so that it will work in all browsers. the closest i could come up with is this... &lt;script type="text/javascript"&gt; $(document).ready(function() { $(window).keyup(function(e) { if(e.keyCode == 17) { // Load text here... } }); }); &lt;/script&gt;
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42213374
has comment: http://stackoverflow.com/comment/42209149
has comment: http://stackoverflow.com/comment/42214765
answer count: 0

http://stackoverflow.com/a/26691425
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41979105
type: Answer
has body: Your problem in ItemFormSet = inlineformset_factory(Packet, Item, form=CreatePacketForm, formset=CreateItemForm, extra=1, max_num=20, can_delete=False) form kwarg here is to customise formset forms So it should be: ItemFormSet = inlineformset_factory(Packet, Item, form=CreateItemForm, extra=1, max_num=20, can_delete=False)
upvote count: 1
has comment: http://stackoverflow.com/comment/41979510
accepted answer of: http://stackoverflow.com/q/26690969
score: 1
answers question: http://stackoverflow.com/q/26690969

http://stackoverflow.com/comment/42083700
type: Comment
score: 0
type: AnswerComment
has text: Just want to thank you. This has opened my eyes a ton! I wish I could give you more points.
comment on: http://stackoverflow.com/a/26749701

http://stackoverflow.com/q/26766226
tagged with: symfony
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/60107886
has comment: http://stackoverflow.com/comment/81927478
type: UnansweredQuestion
has title: Symfony2 upload javascript blob
tagged with: php
has answer: http://stackoverflow.com/a/49735700
has body: I'm trying to upload an image created with canvas to symfony using a blob. The javascript code is working and is sending a blob. But in the controller I can't pass the validation. When I try to read the validation, it doesn't contain any errors. Is there a problem in my Foto.php? Or is it in my controller? Javascript to send POST: var dataURL = canvas.toDataURL("image/png", 0.5); var blob = dataURItoBlob(dataURL); var formData = new FormData(); formData.append('file', blob); var xhr = new XMLHttpRequest(); // Add any event handlers here... xhr.open('POST', '{{ path("foto_uploadwebcam" ) }}', true); xhr.send(formData); function dataURItoBlob(dataURI) { // convert base64/URLEncoded data component to raw binary data held in a string var byteString; if (dataURI.split(',')[0].indexOf('base64') &gt;= 0) byteString = atob(dataURI.split(',')[1]); else byteString = unescape(dataURI.split(',')[1]); // separate out the mime component var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]; // write the bytes of the string to a typed array var ia = new Uint8Array(byteString.length); for (var i = 0; i &lt; byteString.length; i++) { ia[i] = byteString.charCodeAt(i); } return new Blob([ia], {type:mimeString}); } Foto.php (partially) /** * Foto * * @ORM\Table() * @ORM\Entity(repositoryClass="Yeouuu\FotoBundle\Entity\FotoRepository") * @ORM\HasLifecycleCallbacks */ class Foto { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @Assert\File(maxSize="6000000") */ private $file; private $temp; /** * Sets file. * * @param UploadedFile $file */ public function setFile(UploadedFile $file = null) { $this-&gt;file = $file; // check if we have an old image path if (isset($this-&gt;path)) { // store the old name to delete after the update $this-&gt;temp = $this-&gt;path; $this-&gt;path = null; } else { $this-&gt;path = 'initial'; } } /** * @ORM\PrePersist() * @ORM\PreUpdate() */ public function preUp…
has comment: http://stackoverflow.com/comment/84158697
score: 7
upvote count: 7
has comment: http://stackoverflow.com/comment/79888899
type: Question
tagged with: blob
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/79872027
has comment: http://stackoverflow.com/comment/60149982

http://stackoverflow.com/comment/42049117
type: QuestionComment
has text: @SanKrish yes i am getting 404 error and the css folder is outside the web-inf
comment on: http://stackoverflow.com/q/26730663
score: 0
type: Comment

http://stackoverflow.com/comment/42178999
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26802147
has text: http://puu.sh/cGO0H/1bc2823e97.png it works now i had to add : num = parseInt(window.prompt("enter score")); in the loop

http://stackoverflow.com/a/26828125
has comment: http://stackoverflow.com/comment/42224086
answers question: http://stackoverflow.com/q/26828111
upvote count: 2
has comment: http://stackoverflow.com/comment/42223938
type: Answer
score: 2
has body: You'll have to call the function. function XXX() { abc = function() { return 'Message'; } return abc; } function Alerttt() { var AlertText = XXX(); alert(AlertText()); // call it } Alerttt(); You can also do var AlertText = XXX()(); so that AlertText gets the return value from the called function so you can just do alert(AlertText);
downvote count: 0

http://stackoverflow.com/comment/41975865
type: Comment
has text: it does - check jsbin example
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26689455

http://stackoverflow.com/q/26831272
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: scroll
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26831383
has title: How to smooth scroll on click jquery
score: 0
has body: I want to be able to smooth scroll to a specific div using its id but my current script isn't correct. Can anyone see where my error is? Here is my fiddle for reference here. &lt;script&gt; $(document).ready(function() { $('a').click(function(){ $('html, body').animate({ scrollTop: $( $.attr(this, 'href') ).offset().top }, 5000); return false; }); }); &lt;/script&gt; Thanks.
answer count: 1
has answer: http://stackoverflow.com/a/26831383
tagged with: jquery

http://stackoverflow.com/q/26770320
has answer: http://stackoverflow.com/a/26770365
linked to: http://stackoverflow.com/q/111102
upvote count: 0
tagged with: javascript
tagged with: event-handling
tagged with: dom-events
has body: In the following code, copied from ch 15 of Eloquent Javascript, how does pressed[codes[event.keyCode]] end up as a boolean value? I just can't figure out why you need the 'keyup' event listener. The idea is to make sure that 'keydown' gets registered only once when it is being held down. I thought maybe the keyup event gets fired when you are holding the key down, as this MDN reference on the keydown event suggests, but that resource says that functionality is discontinued. var arrowCodes = {37: "left", 38: "up", 39: "right"}; function trackKeys(codes) { var pressed = Object.create(null); function handler(event) { if (codes.hasOwnProperty(event.keyCode)) { var down = event.type == "keydown"; pressed[codes[event.keyCode]] = down; event.preventDefault(); } } addEventListener("keydown", handler); addEventListener("keyup", handler); return pressed; } Here is the text explaining this block of code. I don't get it at all--where do true and false come from? Note how the same handler function is used for both event types. It looks at the event object’s type property to determine whether the key state should be updated to true ("keydown") or false ("keyup").
answer count: 3
tagged with: events
has answer: http://stackoverflow.com/a/26770371
favorite count: 0
score: -1
accepted answer: http://stackoverflow.com/a/26770371
has answer: http://stackoverflow.com/a/26770695
type: AnsweredQuestion
has title: In this code, copied from ch 15 of eloquent javascript, what does the keyup event listener do?
possible better answer: http://stackoverflow.com/a/26770365
downvote count: 1
type: Question

http://stackoverflow.com/q/26821797
favorite count: 0
has comment: http://stackoverflow.com/comment/42213028
has body: Please advise me why I can't create this example in my home html file? Here is an example from the site and my html file: what am I doing wrong?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has title: problems with jQuery from documentation
downvote count: 0
has answer: http://stackoverflow.com/a/26821844
score: 1
has comment: http://stackoverflow.com/comment/42213033
type: Question
has answer: http://stackoverflow.com/a/26821838
accepted answer: http://stackoverflow.com/a/26821838
tagged with: javascript
has answer: http://stackoverflow.com/a/26821841
answer count: 3
upvote count: 1
possible better answer: http://stackoverflow.com/a/26821844
tagged with: jquery

http://stackoverflow.com/comment/42092421
score: 0
type: Comment
has text: I understand, what you are saying. But the only way I could get chosen to work is by adding the ids between the curly braces. I'll ask another question, regarding what is the correct way to make chosen work
comment on: http://stackoverflow.com/a/26753779
type: AnswerComment

http://stackoverflow.com/q/26674283
tagged with: jquery
favorite count: 0
has body: I am implementing tool tip through directive in AngularJS but not able to get the element coordinate. When my tooltip will be visible i want to get the coordinate of that position and want to display it according to the position. 'use strict'; var utility = angular.module("utility", []); utility.directive("tooltip", function () { var directive = {}; directive.restrict = 'A'; directive.transclude = true; directive.link = function ($scope, element, attributes) { element.html("This is the new content: "); element.bind('mouseenter', createDiv); element.bind('mouseleave', destroyDiv); function createDiv() { //need the coordinate of the pointer to display div on hover of attribute. var divTag = document.createElement("div"); var toolTipHtml; divTag.id = "divToolTip"; divTag.setAttribute("align", "center"); //divTag.style.border = "1px solid #ccc"; divTag.style.zIndex = "999"; divTag.style.position = "absolute" divTag.style.width = "200px"; divTag.style.height = "115px"; toolTipHtml = " " toolTipHtml += " "; toolTipHtml += " "; toolTipHtml += " " + $scope.toolTipData.message + " "; toolTipHtml += " "; divTag.innerHTML = toolTipHtml; element.append(divTag); } function destroyDiv() { var divTag = document.getElementById("divToolTip"); divTag.remove(); } } directive.scope = true; return directive; });
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26675238
downvote count: 1
type: Question
tagged with: angularjs-directive
has title: How to get the coordinate of element tag inside link function of angularJs directive
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/26675238
upvote count: 0
answer count: 1

http://stackoverflow.com/q/26715941
has comment: http://stackoverflow.com/comment/42022186
has comment: http://stackoverflow.com/comment/42022264
has body: Theoretically speaking, let's say I have a function that takes 100 parameters and I only want to use 1 of these, and it's the 100th one. Instead of writing 99 empty strings before I can pass the 100th one, is there an easier way of doing this? I know you should never have 100 parameters but I got curious if this is even possible.
has comment: http://stackoverflow.com/comment/42022331
upvote count: 1
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42022165
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26716112
has answer: http://stackoverflow.com/a/26716077
has answer: http://stackoverflow.com/a/26716112
has comment: http://stackoverflow.com/comment/42022234
score: 1
accepted answer: http://stackoverflow.com/a/26716077
favorite count: 0
has title: Skipping arguments/parameters without using empty strings
type: AnsweredQuestion

http://stackoverflow.com/comment/42194062
type: Comment
comment on: http://stackoverflow.com/a/26793040
score: 0
has text: that was a typo in this question... sorry.. in the actual code it was correct
type: AnswerComment

http://stackoverflow.com/a/26808548
has comment: http://stackoverflow.com/comment/42190375
score: 0
answers question: http://stackoverflow.com/q/26808454
has comment: http://stackoverflow.com/comment/42189958
has comment: http://stackoverflow.com/comment/42190242
type: Answer
has body: request is just setting up your endpoint. You need to actually call some method on it, e.g. request.get({id: 1}).$promise; or request.query({term: 'test'}).$promise;
has comment: http://stackoverflow.com/comment/42190482
has comment: http://stackoverflow.com/comment/42190956

http://stackoverflow.com/q/26700266
tagged with: javascript
favorite count: 0
tagged with: tasker
tagged with: android
has answer: http://stackoverflow.com/a/27067616
accepted answer: http://stackoverflow.com/a/27067616
tagged with: webview
type: AnsweredQuestion
has body: I created a scene and webview1 element with: mode: url source: www.google.com created a task to show scene Now, I want to create a JavaScript task to send to the Webview: $("#q").val("Chuck Norris"); $("button#search").click(); PS: I don't want to just execute Javascript, I want to execute it in the opened Webview.
score: 1
type: Question
has title: How send JavaScript or jquery commands on webview tasker elements?
upvote count: 1
downvote count: 0
answer count: 1

http://stackoverflow.com/a/26828123
has comment: http://stackoverflow.com/comment/46786734
has body: You can bind the function's this to the controller: langService.load({ callback: languagesLoaded.bind(this) }); For IE &lt; 9 a polyfill would be needed because bind is available as of ECMAScript 5.
has comment: http://stackoverflow.com/comment/42234128
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/46771315
accepted answer of: http://stackoverflow.com/q/26822784
answers question: http://stackoverflow.com/q/26822784
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/26740966
score: 0
has title: After angular filter on options if only one option is left, select it
tagged with: filter
answer count: 1
has answer: http://stackoverflow.com/a/26741909
tagged with: angularjs
type: UnansweredQuestion
type: Question
has body: I have two select boxes. One of the boxes takes what the other one has selected and uses it as a filter for itself. Sometimes that filter only leaves one option. I am looking for a way to auto select that option only if it is the only one in the list. If this is too vague I can put in an example. Thank you in advance.
tagged with: javascript

http://stackoverflow.com/comment/42122016
comment on: http://stackoverflow.com/a/26770806
type: Comment
has text: I have posted the code with your edit here just to make sure I got it right. https://gist.github.com/spennyf/5fa387ebd3e8aa6d11fc. But this still gave the error.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42000831
comment on: http://stackoverflow.com/q/26702499
has text: The code above takes www and appends it to a domain. Originally used to do something like send canadian visitors to canada.domain.com or mexican visitors to mexico.domain.com. I swapped it out with "www" but it's redundant since I'm sending to only one domain.
score: 0
type: QuestionComment
type: Comment

titanium
type: Tag
tags question: http://stackoverflow.com/q/26726682
tags question: http://stackoverflow.com/q/26739483
tag name: titanium
tags question: http://stackoverflow.com/q/26826820
tags question: http://stackoverflow.com/q/26754997

http://stackoverflow.com/q/26752344
type: UnansweredQuestion
has title: Setting te Value of AjaxFileUpload Control from JavaScript or Code Behind
has answer: http://stackoverflow.com/a/26752425
type: Question
tagged with: c#
has body: I am using AjaxFileUpload Control, and it works perfectly fine. I have separate Button, onClick of which I need to add a File to the AjaxFileUpload Control, so that the FileUploadControl has the Value of the File which is Selected on ButtonClick. I am trying to do this as I want events attached to AjaxFileUpload Control to work with this button as well. Here is the code attached &lt;cc1:AjaxFileUpload ID="AjaxFileUpload3" runat="server" AllowedFileTypes="zip" Enabled="true" MaximumNumberOfFiles="1" OnUploadComplete="File_Upload" OnClientUploadComplete="UploadCompleteArchive" Width="240px" /&gt; &lt;asp:UpdatePanel runat="server"&gt; &lt;ContentTemplate&gt; &lt;asp:HiddenField ID="hfBoxZip_URL" runat="server" /&gt; &lt;asp:HiddenField ID="hfBoxZip_Name" runat="server" /&gt; &lt;asp:Button ID="btnZip" runat="server" Text="Button" OnClick="btnZip_Click" style="display:none;"/&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; I need help with this using JavaScript or CodeBehind (C#). Any help is appreciated.
tagged with: javascript
score: 0
answer count: 1
tagged with: file-upload
tagged with: asp.net

http://stackoverflow.com/comment/42115775
has text: Finally it's working.. I noticed the thing about the keydown as well because when I typed 1 character it would disappear, but then when the input was empty it would come back again which didn't make sense to me. I'll probably look into this more to get a more clear view of it. Thank you so much again.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26767305

http://stackoverflow.com/comment/42158788
type: Comment
comment on: http://stackoverflow.com/a/26791341
score: 0
type: AnswerComment
has text: Thanks JLRishe, that's a little more clear...I was confused that all the parameters were the same. So, by saying `return fn(paramOne, paramTwo);` .. gives `firstNumber` the value of `paramOne` and `secondNumber` the value of `paramTwo`? Otherwise I'm confused as to where `firstNumber` and `secondNumber` are defined. Thanks again!

instantiation
type: Tag
tags question: http://stackoverflow.com/q/26828375
tag name: instantiation

http://stackoverflow.com/q/26830080
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26830189
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/26831284
has body: I have a pretty simple rails app where users can upvote pins. The system I implemented is working well, But I would like the number of votes updated after each votes through an ajax method. Here is my upvote system as how it is now: in app/controllers/pins_controller.rb: def upvote @pin = Pin.friendly.find(params[:id]) @pin.votes.create(user_id: current_user.id) respond_to do |format| format.json { render json: { count: @pin.votes_count } } end end in my app/views/pins/index.html.erb: &lt;%= link_to upvote_pin_path(pin), method: :post, remote: true do %&gt; &lt;% if pin.votes.where(user_id: current_user.id).empty? %&gt; &lt;span class="text-decoration: none;"&gt;&lt;i class="fa fa-star"&gt;&lt;/i&gt; &lt;% else %&gt; &lt;span class="text-decoration: none;"&gt;&lt;i class="fa fa-star" style="color:#c0392b"&gt;&lt;/i&gt; &lt;% end %&gt; &lt;% end %&gt; &lt;span class="votes-count"&gt; &lt;%= pluralize(pin.votes.count, "") %&gt; &lt;/span&gt; So everytime someone upvote a pin, the vote is visible only after refreshing the page. Any ideas? I know I should call the ajax method inside an upvote.js.erb file in my views, but that is where I am lost.
type: Question
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: ajax
has title: Rails: update votes_count after user voted on pins
tagged with: ruby

http://stackoverflow.com/a/26732393
score: 4
upvote count: 4
has body: Try using .filter() along with multiple selector to achieve your need, $('#online,#offline').filter('.selected').length == 2
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26732346
type: Answer
accepted answer of: http://stackoverflow.com/q/26732346

http://stackoverflow.com/comment/42158877
has text: Why can you not use `.splice()` to remove an element from an array? Is this homework? If so, please offer the exact instructions so we know what is actually being asked.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26791539

http://stackoverflow.com/comment/42152151
comment on: http://stackoverflow.com/q/26787517
has text: @A.Wolff thanks for your reply. I will test it now. I asked prior to testing, because, I am new to it, re-writing the code for divs in place of textareas is little bit harder for me than others.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26755692
has answer: http://stackoverflow.com/a/26755743
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
tagged with: drop-down-menu
has body: I want my submenu to slide down over everything else, instead of pushing it all down. I can make this happen with position:fixed;, but then the size of the submenus change. How do I solve this and keep the width of the submenus? Fiddle HTML: Abcde 1 2 3 Fghijklm 1 2 3 Shop 1 2 3 Texting texting CSS: #nav{ width: 956px; margin: 0 auto; } #meny{ display: table; width: 100%; border-collapse: collapse; border: none; } #menu{ display: table-row; list-style: none; font-family: Verdana, Arial, sans-serif; font-size: 0.9em; } .dropmenu{ display: table-cell; } .dropmenu a { display: block; text-decoration: none; text-align: center; background-color: #ff5b2e; color: #303030; } .submenu{ display: none; list-style: none; background: #ff5b2e; padding: 0; width: auto; } .submenu li { width: 100%; display: block; } .submenu li a { width: 100%; background: #ff5b2e; color: #303030; } JavaScript: $(document).ready(function() { $('.dropmenu').hover(function() { $(this).find('.submenu').stop().slideToggle(); }); });
tagged with: jquery
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26755814
has title: My dropdown menu pushes down everything else
upvote count: 2
possible better answer: http://stackoverflow.com/a/26756301
answer count: 3
has answer: http://stackoverflow.com/a/26756301
accepted answer: http://stackoverflow.com/a/26755814

http://stackoverflow.com/comment/41961472
score: 0
has text: @hamism That won't work because it will get an error trying to access the `name` property of `undefined`.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26681259

http://stackoverflow.com/q/26747253
downvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/42079929
score: 3
has comment: http://stackoverflow.com/comment/42080227
has comment: http://stackoverflow.com/comment/42080151
tagged with: javascript
has comment: http://stackoverflow.com/comment/42080122
has body: First of sorry I'am not native english and thanks for interest! I don't know why when I perform some semi-heavy operations on arrays my browser break connection with Socket.io. Browser receives disconnect event, then it reconnects but shouldn't disconnect in the first place. The code contains a couple nested loops, I know it's not the best practice but I did't figure out any other way of doing the task. I started testing on large arrays of users (about 10k) and the problem started occurring, so I guess it's a performance issue. I was trying to find memory leeks but with no success, its almost like for the time of performing operations app freezes and breaks Socket.io. Thank you for trying to help. var pushUsersToCorrectLeagues = function(appConfig, callback, usersArray, newSeason, db) { //determinate which league is the last one var leaguesOrderArray = []; _.each(newSeason.leagues, function(league) { leaguesOrderArray.push(league.key); return false; }); var lastLeagueKey = _.last(leaguesOrderArray.sort(function(a, b) { return a - b; })); _.each(usersArray, function(user) { var keyUserData = {}; keyUserData.userLogin = user.userLogin; keyUserData._id = user._id; keyUserData.avatarUrl = user.avatarUrl; keyUserData.isActive = true; keyUserData.scores = {}; //now put users in correct leagues var userPushed = false; var endedInLeague = null; //if found a user in league _.each(newSeason.leagues, function(league) { _.find(league.users, function(alredyInLeagueUser, i) { if (alredyInLeagueUser.userLogin == user.userLogin) { newSeason.leagues[league.key].users[i] = keyUserData; userPushed = true; endedInLeague = league.key; return true; } }); return false; }); //user wasnt found in any league, has to be pushed to the last one then if (!userPushed) { newSeason.leagues[lastLeagueKey].users.push(keyUserData); endedInLeague = lastLeagueKey; } if (endedInLeague) { process.nextTick(function() { var callback = function(updatedUser) { //console.log('updatedUser', updatedUser); return…
has title: Why does my code disconnects a Socket.io connection in Node?
has comment: http://stackoverflow.com/comment/42080228
has comment: http://stackoverflow.com/comment/42080104
upvote count: 3
has answer: http://stackoverflow.com/a/26747715
accepted answer: http://stackoverflow.com/a/26747715
answer count: 1
favorite count: 0
tagged with: sockets
has comment: http://stackoverflow.com/comment/42079606
tagged with: node.js
linked to: http://stackoverflow.com/q/10344498
has comment: http://stackoverflow.com/comment/42080103
type: AnsweredQuestion

http://stackoverflow.com/comment/42335934
score: 0
has text: I am afraid I still don't see the problem clearly, you should expose more code as of what you are trying to achieve... the progressData variable *is* available for entire $scope. If process the latest value in from the database, then do them inside of a callback. I updated the fiddle now to display consecutive poll data http://jsfiddle.net/5j0kf0eo/2/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26827652

http://stackoverflow.com/comment/42057853
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26735659
type: AnswerComment
has text: @David If you read the example carefully you will see data-toggle="collapse" data-parent="#accordion" properties. So these properties are handled in bootstrap. Just copy paste the sample code in the link and it will work, provided full bootstrap.js is included

http://stackoverflow.com/comment/42159859
score: 0
type: Comment
type: QuestionComment
has text: See here: http://stackoverflow.com/questions/12871740/how-to-detach-spawned-child-process-in-a-node-js-script. `.spawn()` and `child.unref()` and separate stdio streams.
comment on: http://stackoverflow.com/q/26791900

http://stackoverflow.com/q/26727990
has comment: http://stackoverflow.com/comment/42045021
type: Question
has comment: http://stackoverflow.com/comment/42045747
has answer: http://stackoverflow.com/a/26729260
accepted answer: http://stackoverflow.com/a/26729260
answer count: 1
tagged with: javascript
has body: Edit - Added a plunkr http://plnkr.co/edit/euD4FG?p=preview the RouteController is not getting called, please have a look Fiddle: http://jsfiddle.net/smartdev101/tv1p9n4h/ angular.module(this.constructor.NAME, ['ngRoute']) .config(function($routeProvider){ self.config($routeProvider) }) .controller("RouteController", function($scope, $routeParams){ self.routeController($scope, $routeParams)}) angular.bootstrap(document.getElementById("browser"), [this.constructor.NAME]); }); HTML Racu, Cristian Shnider, Brent Suess, Mike
has comment: http://stackoverflow.com/comment/42045086
score: 0
has comment: http://stackoverflow.com/comment/42045738
tagged with: ngroute
tagged with: angularjs
has title: ng-route handling outside the scope
type: AnsweredQuestion

http://stackoverflow.com/q/26716442
score: 0
answer count: 2
has body: I would like to scroll to the first error in my Bootstrap form using jQuery. I used: $('html, body').animate({ scrollTop: ($('.has-error').first().offset().top) },500); and it's working fine but there is one small issue. In JavaScript console I get: TypeError: $(...).first(...).offset(...) is undefined if no elements with class has-error has been found (there are no errors). Of course if there is at least one element with this class, I get no warning. I would like to remove this warning adding extra condition to check if first() returns object (it seems it always does but I would expect it to be empty if no element is found). I tried to do the following: var el = $('.has-error').first(); if (! $.isEmptyObject(el)) { $('html, body').animate({ scrollTop: (el.offset().top) },500); } but it doesn't change anything. In JavaScript console there is still warning. Is there any way to remove this warning? Or maybe using first() method cause that it's not possible to catch when no element with this class exist?
tagged with: twitter-bootstrap
accepted answer: http://stackoverflow.com/a/26716513
type: AnsweredQuestion
tagged with: scroll
has answer: http://stackoverflow.com/a/26716513
possible better answer: http://stackoverflow.com/a/26716531
has answer: http://stackoverflow.com/a/26716531
type: Question
has title: Scroll to first error in jQuery without a warning in JavaScript console
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41947110
score: 0
type: AnswerComment
type: Comment
has text: Thank you very much, it works perfect. Ill use that, since its seems very easy.
comment on: http://stackoverflow.com/a/26673618

http://stackoverflow.com/q/26748543
downvote count: 1
type: Question
tagged with: debugging
has comment: http://stackoverflow.com/comment/42081781
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/42081602
has comment: http://stackoverflow.com/comment/42082177
upvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26748622
has title: What's my bug in this code?
has comment: http://stackoverflow.com/comment/42081583
has answer: http://stackoverflow.com/a/26748782
linked to: http://stackoverflow.com/q/14636536
possible better answer: http://stackoverflow.com/a/26748622
has answer: http://stackoverflow.com/a/26748639
answer count: 4
has body: I have this: if (dTotal % 1 !== 0 || nTotal % 1 !== 0) { //stuff } and the variable nTotal is the number 0.2, but the stuff in the if statement is happening. I know that the two variables are numbers, not strings. I just want the things in the if statement to happen if both nTotal and dTotal are whole numbers.
has comment: http://stackoverflow.com/comment/42081662
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26748621
accepted answer: http://stackoverflow.com/a/26748782

http://stackoverflow.com/comment/42167761
has text: @thomas: The variable doesn't. Say we have `a = b || c`: The expression `b || c` is evaluated and the result is stored in `a`. (The *way* it's evaluated is that `b` is evaluated and, if "truthy," that's the result; if `b` is "falsey," then `c` is evaluated and it's the result.) That's exactly what we have here: `duplicate = newValue === correct || wrong.some(...)` The expression `newValue === correct || wrong.some(...)` is evaluated and the result of it is stored in `duplicate`. So `newValue === correct` is evaluated... *(cont'd)*
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26774503

http://stackoverflow.com/comment/97874430
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26716513
type: Comment
has text: But this has side effect: first it goes to that element and then after 500ms scrolls back down

http://stackoverflow.com/comment/45791719
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26914016
type: AnswerComment
has text: i have the same problem when applying a query such as your {locked: false} case. but i don't believe adding a save is the correct solution. it will remedy the situation if you have records matching the query. if not then the find will fail. and usually localstorage will be empty on first use.

http://stackoverflow.com/q/26787295
has comment: http://stackoverflow.com/comment/42151380
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42152058
downvote count: 0
has title: Why does Bootstrap Collapse keep removing the "collapse" class after expanding?
has body: I am using jQuery Collapse on an element that's inserted via Ajax. When I apply the line below, it removes the collapse class. I need the class to remain so I can call collapse('hide') when the Ajax content needs to be closed. $ajaxContent.html(data).find('.collapse').collapse(); Here's what I have in my .php file: &lt;section class="collapse"&gt; Here's what it ends up with after the jQuery is applied: &lt;section class="in" style="height: auto;"&gt; Why is it doing this and how do I fix it so the collapse class doesn't get removed?
accepted answer: http://stackoverflow.com/a/26787447
type: Question
has comment: http://stackoverflow.com/comment/42151961
has comment: http://stackoverflow.com/comment/42152027
has answer: http://stackoverflow.com/a/26787447
tagged with: javascript
tagged with: jquery
upvote count: 2
has comment: http://stackoverflow.com/comment/42152005
answer count: 1
has comment: http://stackoverflow.com/comment/42152250
favorite count: 0
tagged with: ajax
tagged with: twitter-bootstrap

http://stackoverflow.com/q/26831061
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26831301
score: 0
answer count: 2
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42228823
has comment: http://stackoverflow.com/comment/42228858
has comment: http://stackoverflow.com/comment/42228845
tagged with: checkbox
accepted answer: http://stackoverflow.com/a/26831181
has comment: http://stackoverflow.com/comment/42228834
possible better answer: http://stackoverflow.com/a/26831301
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
tagged with: icheck
has body: I have a problem disabling an input field when a checkbox is checked with a plugin called iCheck (http://fronteed.com/iCheck/). Note: my code is working when the iCheck plugin is not used. Working example without iCheck: http://jsbin.com/gusewu/1/ NOT working example when iCheck is included: http://jsbin.com/ludiqi/1/ Any help on debugging this would be appreciated. I've been on this for 2 days now. :-/
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/26831181
has title: enable/disable input field depending on checkbox status

http://stackoverflow.com/comment/41949620
comment on: http://stackoverflow.com/q/26675182
type: Comment
type: QuestionComment
score: 1
has text: you need to set next timeout when the current one expires, not in a loop like that.

http://stackoverflow.com/q/26725051
score: 0
accepted answer: http://stackoverflow.com/a/26725116
answer count: 1
has title: underscore return objects in primary key array
has body: I'm trying to use underscore to return a list of objects whose primary key is included in a given array of primary keys. list = [object{pk: 1}, object{pk: 2}, object{pk: 3}] primary_key_list = [1,2] The function would return [object{pk:1}, object{pk:2}] I'm having trouble finding a suitable one liner that can compare against a list of primary_keys
tagged with: underscore.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42039473
tagged with: javascript
has answer: http://stackoverflow.com/a/26725116
type: Question

http://stackoverflow.com/q/26784113
tagged with: google-chrome
type: Question
answer count: 2
has body: I've seen plugins like Adblocks which can switch plugin icon to grayscale almost with immediate tab change action. How do I achieve this? Currently I'm doing it with detecting specific URL with content.js and then sending a message to background.js to change the icon. But this is slow and happens after 2-3 seconds after page load. How do I do this? I've a specific list of URL wildcards on which icon has to be changed.
tagged with: javascript
has answer: http://stackoverflow.com/a/26784384
score: 0
has title: How To Immediately Change Chrome Extension Icon?
tagged with: google-chrome-extension
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26786654

http://stackoverflow.com/comment/42170503
has text: is your problem solved or not??
comment on: http://stackoverflow.com/q/26796942
type: Comment
type: QuestionComment
score: 0

infinite-scroll
tag name: infinite-scroll
type: Tag
tags question: http://stackoverflow.com/q/26802548
tags question: http://stackoverflow.com/q/26707070

http://stackoverflow.com/q/26791780
has title: Build ember-cli addon without dependencies
tagged with: node.js
has body: I developed an ember-cli addon that works fine. When I run the command ember build, it basically creates a vendor.js file that contains my addon and all dependencies (ember, jquery etc...) which is about 3MB I'd like to know if it's possible to export the addon as its own (my-addon.js) without any dependencies inside, as a vendor I can use? I'm basically trying to make my ember-cli addon a bower component that I can include in another ember project. My addon and all dependencies are more than 100MB of data (including node modules, broccoli, tests...), so when I install it using npm install my-addon, it's pretty big. I don't really need that in my other project, the addon itself (dist version) is about a couple of KB and that's all I need... Basically, this is the architecture of my projects: Ember project: my-project.git /my-project /app /controllers etc... /node_modules /my-addon //My addon lives here for now and contains everything (all node_modules, bower_components, tests... about 100MB to download!) Brocfile.js etc.. Basic architecture for an ember-cli addon: my-addon.git /my-addon /addon /app /bower_components /node_modules /tests Brocfile.js etc.. package.json: { "name": "my-addon", "version": "0.0.1", "directories": { "doc": "doc", "test": "tests" }, "scripts": { "start": "ember server", "build": "ember build", "test": "ember test" }, "engines": { "node": "&gt;= 0.10.0" }, "devDependencies": { "body-parser": "^1.2.0", "broccoli-sass": "0.3.2", "broccoli-asset-rev": "0.3.1", "broccoli-ember-hbs-template-compiler": "^1.6.1", "ember-cli": "0.1.2", "ember-cli-content-security-policy": "0.3.0", "ember-cli-ic-ajax": "0.1.1", "ember-cli-inject-live-reload": "^1.3.0", "ember-cli-qunit": "0.1.0", "ember-data": "1.0.0-beta.10", "ember-export-application-global": "^1.0.0", "express": "^4.8.5", "glob": "^4.0.5" } "keywords": [ "ember-addon" ], "ember-addon": { "configPath": "tests/dummy/config" } } Thanks
has comment: http://stackoverflow.com/comment/42183346
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/42183411
tagged with: javascript
has comment: http://stackoverflow.com/comment/42182864
score: 4
upvote count: 4
has comment: http://stackoverflow.com/comment/42182517
answer count: 1
downvote count: 0
tagged with: ember-cli
favorite count: 0
has comment: http://stackoverflow.com/comment/42182742
has comment: http://stackoverflow.com/comment/42185283
has answer: http://stackoverflow.com/a/28353364
tagged with: ember.js

http://stackoverflow.com/q/26698454
tagged with: javascript
has body: This is what I have in my Servlet. @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { System.out.println("Initializing..."); ExecutorService executorService = Executors.newFixedThreadPool(1); executorService.execute(new Runnable() { public void run() { System.out.println("Inside Thread!!!"); for(int i=1; i&lt;5; i++){ System.out.println("Date: " + new Date()); try { Thread.sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } } } }); executorService.shutdown(); // Some more piece of code is there } What I am doing here: I have created a separate thread where the date gets printed after 5 sec in the console. What I want to do: When I run this code, I get this output printed in the console: Initializing... Inside Thread!!! Date : Sat Nov 01 15:57:57 GMT 2014 Date : Sat Nov 01 15:58:02 GMT 2014 Date : Sat Nov 01 15:58:07 GMT 2014 Date : Sat Nov 01 15:58:12 GMT 2014 I want the same set of messages to be printed in a jsp page in such a way that the Date gets printed in an interval of 5 sec (by sending multiple response to the browser whenever a Syetem.out.println() method is executed int he above code). Reason for pushing message from server: In the above example, I am printing simple messages in a loop. But in real scenario, there are some calculations, hence the messages will be available at different time frames (i.e. not after every 5 sec, some messages will be available in quick time while the other messages might take some more time). Hence if I push from the server, then I can push the messages whenever it is available. Unable to understand: I am not sure how to send multiple response to the browser from a separate thread (i.e. from ExecutorService in the above code). I was looking into the setInterval method present in javascript but am not sue how to frame this code using it. I am free to use jQuery or javascript to get this work. Please advise.
tagged with: servlets
score: 0
answer count: 1
tagged with: jsp
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26698493
has title: Displaying messages on regular intervals on browser
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26698493
tagged with: java

http://stackoverflow.com/comment/42135742
score: 0
type: AnswerComment
has text: Sorry, I wasn't clear. I actually need to detect whenever document.location is changed, that includes not only element, but also manual javascript. Handler for onbeforeunload event will detect location change, but I don't know how to get URL where it is supposed to go, do you have any idea about that ?
comment on: http://stackoverflow.com/a/26776529
type: Comment

http://stackoverflow.com/a/26789029
type: AcceptedAnswer
has body: If you mean data-amount... var scr=document.getElementsByTagName("script")[0]; // assuming that this &lt;script&gt; is first &lt;script&gt; on this page scr.setAttribute("data-amount", "some new value");
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42154948
answers question: http://stackoverflow.com/q/26788946
accepted answer of: http://stackoverflow.com/q/26788946
upvote count: 1

http://stackoverflow.com/comment/42061330
type: AnswerComment
score: 0
type: Comment
has text: @squint yes, you are right, it seems that it is necessary to use more complex regexp to deal with these cases...
comment on: http://stackoverflow.com/a/26736612

http://stackoverflow.com/q/26718552
has body: I am loading ajax response in my fancybox. But the moment fancybox opens, the scrollbar on the parent window disappears. Not sure if this is the default behavior of the fancybox. Scrollbar is not seen until I close the fancybox. I want to see the scrollbar on the parent window. Please let me know if I am missing something in my fancybox code. Thanks! j.fancybox({ content : fb, autoSize : false, scrolling : 'no', padding : 0, autoResize : false, autoHeight : false, autoWidth : false, closeBtn : false, beforeLoad : function() { this.width = document.getElementById("jqi").offsetWidth; this.height = document.getElementById("jqi").offsetHeight; this.minWidth = document.getElementById("jqi").offsetWidth; this.minHeight = document.getElementById("jqi").offsetHeight; } });
has title: Scrollbar on parent window is missing when fancybox is open
score: 0
tagged with: scrollbar
tagged with: fancybox-2
has comment: http://stackoverflow.com/comment/42038676
answer count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/42027231
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42027937

http://stackoverflow.com/comment/41964342
type: Comment
comment on: http://stackoverflow.com/q/26678260
has text: I remember having seen a similar problem, but never got to the bottom of it. Changing ` <?php wp_title( '|', true, 'right' ); ?> ` to ` <?php wp_title(); ?> ` resolved it, I think. Give it a shot?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41968921
score: 0
comment on: http://stackoverflow.com/q/26685241
type: QuestionComment
type: Comment
has text: @AndrewHotovy Thanks I will check them out!

http://stackoverflow.com/q/26784064
has body: I'm using d3.js 3.4.13, and the docs say the callback function for d3.json(data, callback) should be of the format callback(error, responseData), however, I found that it actually sets the data to the first parameter, and the second parameter is unnecessary, so I use callback(responseData) instead. It works, but I'm confused why it doesn't work the same way I interpreted the docs to describe it. What am I missing?
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26784681
type: AnsweredQuestion
tagged with: callback
type: Question
tagged with: d3.js
accepted answer: http://stackoverflow.com/a/26784681
has title: d3.json callback function
score: 0
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/42038744
has text: 2014/10/28 - [W3C Declares HTML5 Standard Complete](http://techcrunch.com/2014/10/28/w3c-declares-html5-standard-done/).
score: 1
comment on: http://stackoverflow.com/q/26724644
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42156400
type: QuestionComment
has text: your url is incorrect `mydomain.name/hello.php` is going to be a request BACK to the server this page was loaded from, which'd be more like `http://example.com/mydomain.name/hello.php`. If you want to really do a cross-site request, it'd have to be `http://mydomain.name/hello.php`.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26789998

http://stackoverflow.com/q/26798840
has body: I have made an angular app with this js script: /** * Services **/ var app; app = angular.module('example.api', ['ngRoute', 'ngResource', 'controllers']); app.factory('Post', ['$resource', function($resource) { return $resource('/api/posts/:id', {post: '@id'}); }]); app.config(['$routeProvider', function($routeProvider) { $routeProvider.when('/posts/:id', {templateUrl: "static/js/post_detail.html", controller: "PostListController"}) .when('/posts', {template: ' No link selected ', controller: "PostDetailController"}) .otherwise({redirectTo: '/posts'}); }]); /** * Controllers **/ var controllers; controllers = angular.module('controllers', []); controllers.controller('PostListController', ['$scope', 'Post', function($scope, Post) { $scope.posts = Post.query(); }]); controllers.controller('PostDetailController', ['$scope', 'Post', function($scope, Post) { $scope.post = Post.query(); }]); and this html template: {% verbatim %} {% endverbatim %} My problem is in PostDetailController. I don't know how to use $resource correctly. I've just tried $scope.post = Post.query() but I probably need to tell the resource to look at the variable id i think. I've looked through the documentation but could still not figure it out. Besides that I want to know if it's possible to avoid the website to first show my unrendered template before loading the posts in my PostListController. It's not really a problem but it's ugly that the site's flickering before rendering.
tagged with: javascript
tagged with: angularjs-scope
score: 0
has title: DetailController and routing in AngularJS
answer count: 1
has answer: http://stackoverflow.com/a/26798929
tagged with: angularjs
type: UnansweredQuestion
type: Question
tagged with: angularjs-directive

http://stackoverflow.com/a/26756408
has comment: http://stackoverflow.com/comment/42095619
answers question: http://stackoverflow.com/q/26756380
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26756380
has body: You can use .map() to do this var criArray = jQuery('form').find(':input[name=criteria]').map(function () { return jQuery(this).val(); }).get(); The problem is .toArray() returns an array object which does not have the .each() method, you could use .forEach() instead
type: AcceptedAnswer
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/42095573
type: Answer
has comment: http://stackoverflow.com/comment/42096707

http://stackoverflow.com/a/26686077
answers question: http://stackoverflow.com/q/26686012
type: Answer
has body: In Angular when you make controller then it need to assign with a module So here you will made your controller in js like below angular.module('todoApp', []) .controller('MYController', ['$scope', function($scope) { $scope.listItem; $scope.itemArray = []; $scope.addItem = function() { $scope.itemArray.push($scope.listItem); $scope.listItem = ''; } $scope.deleteItem = function(deletedItem) { var idx = $scope.itemArray.indexOf(deletedItem); $scope.itemArray.splice(idx, 1); } }); And in HTML bootstrap angular like below in body tag and use your controller &lt;body ng-app="todoApp"&gt; See here for reference https://angularjs.org/#add-some-control
downvote count: 0
has comment: http://stackoverflow.com/comment/41970073
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41970080

http://stackoverflow.com/q/26822224
type: Question
has title: Refresh jQuery DataTable from DOM - NO AJAX
tagged with: javascript
tagged with: jquery
has body: I have an HTML table that is completely prepopulated by the server; there is no AJAX anywhere on the page. I have javascript code that lets me move rows between this table and another one (which starts out empty). The data set is small enough that there's no need for Ajax pagination, but large enough that the sorting/filtering stuff in DataTable is useful. So I turned the first table into a a DataTable. Problem: rows I move to the second table are still affected by the data table code after I move them; any new searching or sorting or filtering on the first table empties the second table. So what I'd like to be able to do is modify the table underlying the DataTable and then refresh it - have it re-analyze the table as it exists in the DOM and rebuild its state from that. Preferably without losing its current search string, sort order, etc. I tried using the DataTable API to remove and add rows, but it didn't help - even after removing and redrawing, a search for the content of the removed row causes it to reappear. Any help appreciated. Here's the original row-moving code: var top = $('#top'); var bottom = $('#bottom'); $('body').on('click', 'input:checkbox', function(ev) { var box = $(ev.currentTarget); var tr = box.closest('tr'); var table = tr.closest('table'); var to; if (table.attr('id') == 'top' &amp;&amp; checkbox.checked) { to = bottom; } else { to = top; } to.append(tr); }); Ok, I was able to get it working using the DataTable API. Thanks!
tagged with: datatables
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26822870
upvote count: 2
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/26822870

http://stackoverflow.com/a/26744535
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/42076167
has comment: http://stackoverflow.com/comment/42075933
has body: There's nothing special about ... being at the end of the line. What you see here is the difference between a splat parameter and a splat argument. The ... operator is used for both cases because they are related. It may be confusing, though, since these uses are inverses of each other. as.reverse()... is a splat argument passed to f. The compiled JavaScript uses f.apply to break as.reverse() into multiple arguments for the receiver f. as... is a splat parameter. The compiled JavaScript uses __slice to convert the arguments object into an array inside the receiver, to collect the arguments into a single list.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26744457
score: 4
answers question: http://stackoverflow.com/q/26744457
type: Answer

http://stackoverflow.com/q/26804581
tagged with: javascript
has answer: http://stackoverflow.com/a/26805089
answer count: 2
has comment: http://stackoverflow.com/comment/42183294
downvote count: 0
has title: How to make an offline AngularJS/Cordova app?
favorite count: 0
tagged with: offline
has comment: http://stackoverflow.com/comment/42182528
has comment: http://stackoverflow.com/comment/43646136
tagged with: rest
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42183026
has comment: http://stackoverflow.com/comment/42183006
has comment: http://stackoverflow.com/comment/42182609
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26805066
score: 2
has comment: http://stackoverflow.com/comment/42182571
tagged with: cordova
upvote count: 2
has comment: http://stackoverflow.com/comment/42183098
type: Question
has body: I have a AngularJS app (embedded in a Cordova app). To get and set data, it uses a REST API (that runs on a Django backend server). I need that the app keeps working for several features even if the network is down. For example, I'm expecting this kind of behaviour: Online Mode A client does something in the app a POST request (to create data) is sent to the API The client gets a "Thank you for doing xxx" Fallback offline mode A client buys something on the app The client gets a "xxx can't be done right now, but it will be done as soon as possible" Nothing can be sent to the server since we're offline. So how to do? Is there a way to put the API requests in a queue that will be executed when we're back to online mode? How would you technically design this? It seems there is lots of differents technologies for offline mode, and it's a little bit confusing to me. Any guidance would be welcome. Thanks a lot.

http://stackoverflow.com/q/26735854
tagged with: dictionary
has answer: http://stackoverflow.com/a/26736729
type: AnsweredQuestion
score: 3
downvote count: 0
has body: How to return the lowest date value and highest date value from an array? For example for the below array, I'd like to create a function that returns the lowest date, as well as another function that returns the highest date? var data = [ {date: "2011-11-01T16:17:54Z", quantity: 2, total: 190, tip: 100, type: "tab"}, {date: "2011-11-14T16:20:19Z", quantity: 2, total: 190, tip: 100, type: "tab"}, {date: "2011-11-14T16:28:54Z", quantity: 1, total: 300, tip: 200, type: "visa"}, {date: "2011-11-14T16:30:43Z", quantity: 2, total: 90, tip: 0, type: "tab"}, {date: "2011-11-14T16:48:46Z", quantity: 2, total: 90, tip: 0, type: "tab"}, {date: "2011-11-14T16:53:41Z", quantity: 2, total: 90, tip: 0, type: "tab"}, {date: "2011-11-14T16:54:06Z", quantity: 1, total: 100, tip: 0, type: "cash"}, {date: "2011-11-14T16:58:03Z", quantity: 2, total: 90, tip: 0, type: "tab"}, {date: "2011-11-14T17:07:21Z", quantity: 2, total: 90, tip: 0, type: "tab"}, {date: "2011-11-14T17:22:59Z", quantity: 2, total: 90, tip: 0, type: "tab"}, {date: "2011-11-14T17:25:45Z", quantity: 2, total: 200, tip: 0, type: "cash"}, {date: "2011-11-31T17:29:52Z", quantity: 1, total: 200, tip: 100, type: "visa"} ]; I'm not sure if this is relevant, but I am using this array with crossfilter, so I'm not sure if crossfilter has any helpful methods.
has comment: http://stackoverflow.com/comment/46900545
linked to: http://stackoverflow.com/q/10123953
has answer: http://stackoverflow.com/a/26735940
has answer: http://stackoverflow.com/a/26736308
accepted answer: http://stackoverflow.com/a/26735940
type: Question
has comment: http://stackoverflow.com/comment/42058162
has answer: http://stackoverflow.com/a/26736005
tagged with: arrays
tagged with: javascript
answer count: 6
tagged with: date
upvote count: 3
has comment: http://stackoverflow.com/comment/42058069
tagged with: crossfilter
has answer: http://stackoverflow.com/a/26735982
favorite count: 0
possible better answer: http://stackoverflow.com/a/26735989
has title: How to return the lowest date value and highest date value from an array in Javascript?
has answer: http://stackoverflow.com/a/26735989

http://stackoverflow.com/a/26742393
downvote count: 0
has comment: http://stackoverflow.com/comment/42070654
has body: Try this : SUBSCRIPTION = SUBSCRIPTION.replaceAll("PRICING", String.valueOf(PRICE));
answers question: http://stackoverflow.com/q/26742241
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26742241
type: AcceptedAnswer
type: Answer
score: 2

http://stackoverflow.com/comment/42167113
score: 0
comment on: http://stackoverflow.com/a/26796385
type: AnswerComment
has text: @mvermand, thank you for the demo, I see what they have done and it makes sense. But I do not see why mine does not work? Do you see why there's works and mine does not? If so, I'd love to understand what is going wrong on my end without adding the style="height: 1px"
type: Comment

http://stackoverflow.com/comment/42257858
type: Comment
comment on: http://stackoverflow.com/a/26825706
has text: I'm happy that my codes could help you. if your question is a problem and you can not find it's answer so write it here. In stackoverflow sometimes some good question get down-vote or it's state take closed (!!!), i have some question in this case BUT i never afraid of some mistake managements or down-votes here when i know my question is a real problem then i write a new question here (every time i thought i should write...) So don't afraid to write your questions when your question is a real problem in your works. ;)
type: AnswerComment
score: 0

http://stackoverflow.com/q/26806234
tagged with: rounding
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/42185635
duplicate of: http://stackoverflow.com/q/3108986
has title: how to do round half even in javascript unlimited digits after point?
downvote count: 0
linked to: http://stackoverflow.com/q/3108986
favorite count: 0
has answer: http://stackoverflow.com/a/26806276
possible better answer: http://stackoverflow.com/a/26806304
has answer: http://stackoverflow.com/a/26806304
linked to: http://stackoverflow.com/q/11832914
type: AnsweredQuestion
has body: I want to have 26.955 rounded to 26.96 I mean if I have numbers 0-4 I want to round them down and if they are 5-9 I want to round them up I considered parseFloat(number).toFixed(2) however it returns me 26.95, I need 26.96 I used Math.round but this doesn't work either, I saw Math.round10 but it told me this function doesn't exist so I don't know how to solve my problem. UPDATE: I don't have always 3 digits after point I have more than that I would have 26.956736489 your mentioned duplicate talks about .fixed(2) I am saying it is not working for half even it is not a duplicate
accepted answer: http://stackoverflow.com/a/26806276
type: Question
upvote count: 4
answer count: 2

http://stackoverflow.com/comment/42091181
score: 0
type: AnswerComment
has text: It's a little unclear to me if/when `injectBoundHTML` is required. The Polymer manual section on [dynamic imports](https://www.polymer-project.org/docs/polymer/helpers.html#using-dynamic-html-imports) shows a way to inject an element using Javascript, and it doesn't seem to do any special handling to get the elements upgraded. When is and isn't this necessary?
type: Comment
comment on: http://stackoverflow.com/a/26740920

http://stackoverflow.com/comment/42087233
type: Comment
score: 0
has text: Does this work with animations as well? Or do I have to pass the service into the animation and use it there?
type: AnswerComment
comment on: http://stackoverflow.com/a/26736284

http://stackoverflow.com/comment/41957598
comment on: http://stackoverflow.com/q/26678837
score: 0
type: Comment
has text: I have this in the .css file included with the page: .table_body thead tr:nth-child(odd) { background: #b8d1f3; }. So when the table is loaded it is nicely stripped. When I sort the striping changes and is all screwed up. I am rewriting the table rows like I show above and the color follows the row. How do I do it then?
type: QuestionComment

http://stackoverflow.com/a/26697233
answers question: http://stackoverflow.com/q/26697161
score: 3
upvote count: 3
has body: You should use Html.Raw elem.innerHTML = '@Html.Raw(discussionDiv.ToString())'; Since it contains a lot of double quotes &quot; i've opted to use single quotes on the value.
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41989302
type: Answer
accepted answer of: http://stackoverflow.com/q/26697161

http://stackoverflow.com/q/26756815
score: 0
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
answer count: 0
has comment: http://stackoverflow.com/comment/42102979
has title: loading overlay for long javascript runtime on page
type: Question
has comment: http://stackoverflow.com/comment/42103235
tagged with: performance
has comment: http://stackoverflow.com/comment/42095741
tagged with: javascript
tagged with: dom
has body: I have a callback function which is triggered on a button click event. The callback function has to do a lot of DOM manipulation on the page without a submit or an ajax request. The DOM manipulation refer to an data table with a lot of rows. To give a feedback to the user I want to show a loading overlay (jquery plugin mask) on the data table. The result of DOM manipulation is that selected rows from the data table are transmitted to another data table. The problem is what die loading overlay is not showing immediately because the browser stops the javascript execution for a few seconds and then start processing the loading overlay and DOM manipulation within a moment. The result is that the DOM manipulation is correct executed but the user do not see the loading overlay while processing. When I insert an alert() before executing the DOM manipulation I can see the loading overlay. I don't have a glue why the loading overlay is not showing immediately. Here is the code for the callback function: var callback = function(functionGuid, callbackFunctionName, tablename) { FUNCTION_TABLE_UTIL.showLoadingOverlay(tablename); executeCallback(functionGuid, callbackFunctionName, tablename); FUNCTION_TABLE_UTIL.hideLoadingOverlay(tablename); };

http://stackoverflow.com/comment/78973808
has text: Should it be a part of the template?
comment on: http://stackoverflow.com/a/26811990
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26707507
has body: I have this simple code and Im used to organized my class, services etc. now my problem is that why angular $scope always changes all member instances to object? $scope.prepareCreateCustomer = function() { $scope.customer = new Customer({id:'',email:'',firstName:'',lastName:''}); alert($scope.customer instanceof Customer); // this returns true!** } $scope.saveCustomer = function () { alert($scope.customer instanceof Customer); // this return false!** $scope.customer = customerService.createCustomer($scope.customer); if ($scope.customer.errorMsg) { alert($scope.customer.errorMsg);// this gets invoke as in service i have some logic** } else if ($scope.customer == null) { alert(Null); } else { alert($scope.customer.id + " " + $scope.customer.firstName + " " +$scope.customer.lastName); } } it puts me to confusion of what happen under beneath AngularJS and why instances get changes to its supertype? does this has something to do with AngularJS directives invoking the $scope? My aim is to ensure that my argument as i save an object is to check if its the right instance but in my case it always return false as in Angular convert my Customer instance to an object. ADDITIONAL INFO:
answer count: 0
has comment: http://stackoverflow.com/comment/42008773
type: Question
tagged with: javascript
has title: AngularJS $scope always convert member instances to object
score: 0
has comment: http://stackoverflow.com/comment/42007758
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42009682
has comment: http://stackoverflow.com/comment/42009261
has comment: http://stackoverflow.com/comment/42008960

http://stackoverflow.com/a/26746851
answers question: http://stackoverflow.com/q/26746800
score: 0
type: Answer
has body: Just call it when you first assign the handler. $('#fitler-types').on('change', function() { if($(this).attr('value') == 'document' ){ $('#filter-document-type').show( 'slow' ); } }).change(); Stack Snippet Demo $('#fitler-types').on('change', function() { $(this).val("change handler called"); }).change();

http://stackoverflow.com/q/26759024
tagged with: windows
tagged with: php
answer count: 0
score: 1
linked to: http://stackoverflow.com/q/877774
upvote count: 1
has title: Launch a program from the destop using jQuery or PHP
type: Question
duplicate of: http://stackoverflow.com/q/877774
tagged with: javascript
tagged with: desktop
tagged with: launch
downvote count: 0
favorite count: 0
has body: Short: I was wondering if there is a function or script to launch an application from the user's desktop when clicking on a link (jQuery/PHP). Long: I'm writing a Ticketing System for work where we have to document the customer data and the problem and such, and i would like to implement something like opening Teamviewer via a button. Because we have to remotly fix most of the problems. I'm not sure if this is possible due to security reasons and such, but it would be a handy feature to implement. I know there is a function like 'exec' for PHP but that only works with applications on the server (I think) and Teamviewer is a client side application. PS. Languages used: JavaScript &amp; PHP.
type: UnansweredQuestion

http://stackoverflow.com/a/26811620
answers question: http://stackoverflow.com/q/26811572
upvote count: 5
has comment: http://stackoverflow.com/comment/42196101
score: 5
type: AcceptedAnswer
downvote count: 0
has body: The value of this in JavaScript is set based on how a function is called. It's the "context". When you a.privilegedMethod(), you are calling privilegedMethod() in the "context" of a. Inside, that method, this will be a. When you call privateMethod(), there is no "context". Outside of strict mode, this would be window, but in strict mode it's undefined. Try this: privateMethod.call(this);.
has comment: http://stackoverflow.com/comment/42196283
type: Answer
has comment: http://stackoverflow.com/comment/42196027
has comment: http://stackoverflow.com/comment/42196070
has comment: http://stackoverflow.com/comment/42196205
accepted answer of: http://stackoverflow.com/q/26811572

http://stackoverflow.com/comment/42193165
has text: Can you show the resulting Javascript from the script? And try to run my version with the comma, you don't need to remove it.
type: AnswerComment
comment on: http://stackoverflow.com/a/26810255
score: 0
type: Comment

http://stackoverflow.com/comment/42026527
has text: @trouble706 Hmmm there is no reason why one of the solutions on that page wouldn't work for you. I setup a PHP page to test your code with (jsFiddle won't work for this, for a number of reasons) and I did indeed have the same problem but I did not test any of the solutions. I will look into it a little more and see if I figure anything out.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26716530

http://stackoverflow.com/q/26741569
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26741857
score: 2
downvote count: 0
answer count: 1
has title: Arithmetic operations in ember handlebars
favorite count: 0
has body: I am trying to calculate difference between two variables in handlebars - ember js. How can I accomplish this? Is using a script tag a good idea? Following is my handlebars file {{#each data in view.block.infodata.weatherData}} {{data.name}} {{data.currentValue.tempInFarenhiet}} {{data.pastValue.tempInFarenhiet}} {{data.currentValue.tempInFarenhiet - data.pastValue.tempInFarenhiet}} {{/each}} Is there a function to parsefloat in handlebars? Thanks in advance.
tagged with: ember.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26741857
upvote count: 2
tagged with: handlebars.js

http://stackoverflow.com/a/26788941
has comment: http://stackoverflow.com/comment/96224564
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42154545
has body: Underscore's filter method will return the "parent" object but will filter out the ones that don't match the conditional statement. That being the case, if there is only 1 result, then you can just access it similarly to how you would access an array. For instance: var filterObj = _.filter(filtersPath, function(obj) { return _.where(obj.filters, {id: prefilterCat}).length &gt; 0; })[0]; The above example would get the first child that is returned from the filter method.
type: Answer
answers question: http://stackoverflow.com/q/26788823
upvote count: 1

http://stackoverflow.com/comment/41993667
type: Comment
type: QuestionComment
has text: I have added an edit. 1) The effect on y axis moves the numbers a well, I would need those to remain left, but only those small ticks on the right. There was no change on x axis at all when changing `bottom` to `top`. 2) I have already specified `.tickValues()` but the larger ones are not being shown.
score: 0
comment on: http://stackoverflow.com/q/26699515

http://stackoverflow.com/q/26677514
has comment: http://stackoverflow.com/comment/41954231
favorite count: 0
has comment: http://stackoverflow.com/comment/41959358
has comment: http://stackoverflow.com/comment/41954051
has comment: http://stackoverflow.com/comment/41953979
has comment: http://stackoverflow.com/comment/41964008
has comment: http://stackoverflow.com/comment/41955891
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41953970
has comment: http://stackoverflow.com/comment/41957699
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/41956651
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41955844
type: Question
has title: Prevent the XHR response from being stolen
has comment: http://stackoverflow.com/comment/41956578
has comment: http://stackoverflow.com/comment/41955917
has comment: http://stackoverflow.com/comment/41955287
downvote count: 0
has comment: http://stackoverflow.com/comment/41955590
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41956528
tagged with: security
has body: If I have a client side app, for example, jquery mobile or something similar running in a mobile device, that needs to communicate to remove servers. How can i prevent a XHR response from being stolen? A json response from the remote server. I found an article about that, but the solution is server side code, and I am not able to use any server language. Basically the app sends user_id 1 and the remote server returns the client data. HTTPS will not work, because the mobile app is outside of the server. So what is the correct way to handle this situation?
upvote count: 1

http://stackoverflow.com/comment/42143682
has text: This is telling you that 'google' <- the object you are trying to initalize, does not exist in the current context. Undefined is a special term in Javascript meaning "I can't find anything matching the call you are making" As the others have pointed out here, check to make sure you are including all the necessary javascript files from Google in your page BEFORE calling this script to ensure that the class gets defined before you try to initialize it with the call in the tutorial. (Also people will help more if you put the tutorial code here instead of linking to it!)
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26783306
score: 0

http://stackoverflow.com/comment/42108902
has text: Thank you! I'm new to JavaScript and I realized that within a minute of posting this question.
type: Comment
comment on: http://stackoverflow.com/q/26763709
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41950179
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26675183
has text: @Nevnev You should accept the best answer to your question. Click on the tick mark next to the best answer.

http://stackoverflow.com/q/26789572
tagged with: c#
tagged with: .net
tagged with: javascript
score: 2
downvote count: 0
favorite count: 0
has title: Access AppHarbor environment variables from AngularJS
tagged with: angularjs
upvote count: 2
type: UnansweredQuestion
has body: I am using Sendgrid to send emails from an app hosted on AppHarbor with a .NET/AngularJS application. I want to be able to access the keys generated by the Sendgrid add-on from the AngularJS app. How can I do this? Is it injected into the .NET app and passed along to the AngularJS part of the code, do I have to install some add-on module for it, or is there built in support for it that I have not yet found in the docs?
answer count: 0
tagged with: appharbor
type: Question

http://stackoverflow.com/q/26711530
tagged with: google-maps-api-3
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42014587
favorite count: 0
score: -1
tagged with: asp.net-mvc-4
has body: I am using following code to view google map with RouteAlternatives. When I save this in .html page and when I open it. It's works but When in the asp.net mvc 4 view, google map not visible but route Alternatives are view in the left-hand side.In the layout page i am using jquery-1.7.1.min.js and query-ui-1.8.20.min.js, etc. How to visible this within asp.net mvc view. Thanks In Advance.
has title: Google map not visible : Google map DirectionsService in asp.net mvc
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42015348
has comment: http://stackoverflow.com/comment/42017388
has comment: http://stackoverflow.com/comment/42016961
has answer: http://stackoverflow.com/a/26714300
has comment: http://stackoverflow.com/comment/42018664
upvote count: 0
accepted answer: http://stackoverflow.com/a/26714300
tagged with: javascript

http://stackoverflow.com/comment/42168484
has text: Need your error message and your running enviroment
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26797106

http://stackoverflow.com/comment/43922369
type: Comment
has text: This breaks animation for my app. Commenting this decoraator out lets ngMaterial (thus ngAnimate) render correct classes for animation. Any ideas why?
score: 1
comment on: http://stackoverflow.com/a/26919271
type: AnswerComment

http://stackoverflow.com/a/26735350
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26735256
type: Answer
has body: You defining in the animation function where your image should go to. So you just need to set the left and top animation attributes to the one where the image should fly to: var to = $("#img").offset(); var from = $("#fly_img").offset(); $("#fly_img").animate({ opacity: 1, top:to.top, left:to.left }, 1000, function () { // Animation complete. }); Fiddle: http://jsfiddle.net/9s22xhsd/1/

http://stackoverflow.com/a/26754722
type: Answer
has body: Hi please do the following if($(this).val().trim() == "Yes"){
score: 0
answers question: http://stackoverflow.com/q/26754600

http://stackoverflow.com/q/26761236
answer count: 2
tagged with: bookmarklet
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42104831
has answer: http://stackoverflow.com/a/26761882
type: UnansweredQuestion
has body: I am making a bookmarklet in which provides the user with navigation links on any page. I have the code I need, but am having trouble with the document.body.innerHTML. Here's the code document.body.innerHTML = " "; But no matter what I do, i can't seem to find the problem. I also tried running it through one of the "html encoders", thinking that the quotes were the issue, but that didn't seen to work either. What did I did wrong?
has answer: http://stackoverflow.com/a/26761438
type: Question
has comment: http://stackoverflow.com/comment/42104658
has comment: http://stackoverflow.com/comment/42104164
tagged with: javascript
has comment: http://stackoverflow.com/comment/42104005
has comment: http://stackoverflow.com/comment/42104774
has title: Adding code to tag with bookmarklet
score: 0

http://stackoverflow.com/a/26789147
type: Answer
accepted answer of: http://stackoverflow.com/q/26789005
has body: If you're going to define left's position based on right's position, the only value that needs to be changed is x2. var left = svgContainer.append("line") .attr("x1", right.attr("x1")) .attr("y1", right.attr("y1")) .attr("x2", right.attr("x2")-30) .attr("y2", right.attr("y2")) .attr("stroke-width", 2) .attr("stroke", "black"); JSFiddle
score: 0
answers question: http://stackoverflow.com/q/26789005
type: AcceptedAnswer

http://stackoverflow.com/q/26814851
favorite count: 0
has title: JavaScript - Replacing jQuery $ with Angular code
tagged with: angularjs
has body: I've always used jQuery references to make a sticky footer for my sites. Now that im using AngularJS, there has been no need for me to use jQuery too. However, i cant seem to use my normal sticky footer code as $ is undefined. HTML: Basic plunk! If the header above is red, then you know Plunker is working! The header above should slide right, indicating that jQuery is up and running. 1 2 3 4 My footer JS: How can i perform the above but in an Angular friendly way? Here's a plunker: http://plnkr.co/edit/k1EZqwpdXbKhODW4FyeF?p=preview
has answer: http://stackoverflow.com/a/26815199
type: AnsweredQuestion
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/42294
accepted answer: http://stackoverflow.com/a/26815199
tagged with: javascript
has comment: http://stackoverflow.com/comment/42201064
tagged with: angularjs-scope
has comment: http://stackoverflow.com/comment/42200938
has comment: http://stackoverflow.com/comment/42201185
answer count: 1
downvote count: 0
score: 1

http://stackoverflow.com/a/26742353
has comment: http://stackoverflow.com/comment/42070614
upvote count: 1
answers question: http://stackoverflow.com/q/26742241
has comment: http://stackoverflow.com/comment/42070583
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42070533
has body: PRICE need to be STRING not double. You can try this: String price = String.valueOf(PRICE) SUBSCRIPTION = SUBSCRIPTION.replaceAll("PRICING",price);

http://stackoverflow.com/a/26697025
type: Answer
has body: The problem is the padding, but I prefer to use box-sizing:border-box; as this will include borders and padding so you dont have to manually add width or height for padding and borders as it is then included in the box model. http://www.paulirish.com/2012/box-sizing-border-box-ftw/
answers question: http://stackoverflow.com/q/26696296
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/q/26698819
favorite count: 0
type: Question
has body: I've a code like this I want to show 3 articles at time , and the remaining articles with a button, back and next. How can i do this with jQuery or JavaScript? We can work on JSFiddle
has answer: http://stackoverflow.com/a/26698939
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41992182
score: 0
upvote count: 1
answer count: 1
downvote count: 1
type: UnansweredQuestion
has title: Select items and show n article at time
linked to: http://stackoverflow.com/q/6635441
has comment: http://stackoverflow.com/comment/41991693
tagged with: javascript
duplicate of: http://stackoverflow.com/q/6635441
tagged with: jquery

http://stackoverflow.com/q/26823291
type: Question
has answer: http://stackoverflow.com/a/26840127
tagged with: winjs
tagged with: javascript
has title: WP 8.1 WinJS - How to stop Game Loop?
score: 2
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26840127
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 2
has body: Everything is working fine, except I cannot seem to stop my game loop when the Start button is being pressed and the app is moved to the background... app.oncheckpoint = function(args) {}; is not firing any suspend event for Start button. I am able to stop the loop with Back button using: app.onbackclick = function() {}; But how do I stop the loop with Start button?

http://stackoverflow.com/comment/42168570
has text: Please explain the answer a bit. will appreciate it
score: 0
comment on: http://stackoverflow.com/a/26797053
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/42166738
has text: Should `searchkey` not be a string as well?
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26796276
type: QuestionComment

http://stackoverflow.com/q/26763285
answer count: 1
has answer: http://stackoverflow.com/a/26763723
favorite count: 0
has comment: http://stackoverflow.com/comment/42108367
has title: Text Overlay on Flexslider
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
upvote count: 2
has body: I'm using flexslider and I'm trying to add a separate text overlay to each slide, but am not having much luck. CLICK HERE
has comment: http://stackoverflow.com/comment/42107747
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26763723
tagged with: flexslider
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/42083824
has text: Thanks.. unfortunately, I don't have the luxury of relying on external libraries. Need to be pure javascript.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26749839
type: Comment

http://stackoverflow.com/comment/42148086
type: Comment
has text: It's logging the entire Vector object. If you change it to log `b.add(a).arr` it will log just the array part of it.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26785520

http://stackoverflow.com/q/26692814
tagged with: javascript
type: UnansweredQuestion
has title: angular.js auto complete select option does not trigger other models
tagged with: html-select
tagged with: angularjs
type: Question
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26693749
has body: I have an array with data, and an array with settings. I pass the data into an HTML table and I build a select for every row. I need to offer an auto-complete option from the settings array, according to each row's 'lookFor' value. Not quite there yet, but very easy with some array.filter implementation. My problem is that pressing the 'auto' button does not update the span with its model {{row.comment}} text lookfor description actions {{row.text}} {{row.lookfor}} {{row.desc}} {{row.thecomment}} Auto

http://stackoverflow.com/a/26678686
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26678197
answers question: http://stackoverflow.com/q/26678197
has comment: http://stackoverflow.com/comment/41956505
has comment: http://stackoverflow.com/comment/41956745
has body: Simply add a document.getElementById("formList").remove()to the addNewContact function as you can see in http://jsfiddle.net/192ds38a/1/ . Or does this not meet your needs?
has comment: http://stackoverflow.com/comment/41956603
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/a/26827940
type: Answer
has body: If you can use flex and vh this will work. body { display: flex; flex-direction:column; } .top, .bottom{ background-color: grey; flex: 1 1 100px; } .middle{ background-color: white; border: 1px solid red; flex: 1 1 100vh; }
score: 0
answers question: http://stackoverflow.com/q/26781817

http://stackoverflow.com/q/26677567
type: Question
has body: I have two separate page controller then assign the data on service in first controller . That service data i can use from second controller(another page ) But if refresh the page(second controller page) , that service data displaying as undefined // Controller 1 app.controller("pageCtrl",['$scope','pojo' , function( $scope,pojo) { pojo.setpgeCtrlScope($scope); } ]); // Controller 2 app.controller("pageCtrl2",['$scope','pojo' , function( $scope,pojo) { pojo.getpgeCtrlScope(); } ]); // pojo service app.service("pojo",function() { var page1Data; this.setpgeCtrlScope = function(data) { page1Data = data; } this.setpgeCtrlScope = function() { return page1Data; }; }); Please give the suggestion for above problem. any other way to pass the data to 2nd controller . and that one should not remove while refresh the page Thank you !!
score: 1
has comment: http://stackoverflow.com/comment/41954302
upvote count: 1
has answer: http://stackoverflow.com/a/26682939
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: angularjs
has title: service data should not remove , while refresh the page using angularjs
favorite count: 0
downvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/42203457
score: 2
comment on: http://stackoverflow.com/q/26816352
type: Comment
type: QuestionComment
has text: why your are using `timeout:10000` cause if your server will take more time then defenetly it kills your ajax request.

http://stackoverflow.com/q/26783991
accepted answer: http://stackoverflow.com/a/26784891
has comment: http://stackoverflow.com/comment/42144903
has comment: http://stackoverflow.com/comment/42144967
has title: Javascript new effect on prototype
has answer: http://stackoverflow.com/a/26784891
has comment: http://stackoverflow.com/comment/42144834
has comment: http://stackoverflow.com/comment/42145799
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42146467
has body: I'm trying to bind a javascript object to an event listener and this is how I'm going about it: (this is a simplified example, but it uses the pattern I'm interested in) function foo(x){ this.x = x; } foo.prototype = { 'bar': function(){ // do something with this.x }, 'events': function(){ $(document).on('custom_event', function(event, x){ var G = new foo(x); G.bar(); }); } }; (function(){ var G = new foo(); G.events(); })(); So after the self-invoking anonymous function is run, every time custom_event is fired the bar method of my foo object will be called. Questions: When new foo(x) is called from within the event handler of my foo object, does it cause a duplication of the event listener? It is my understanding that prototype methods belonging to an object are only created once and that calling new foo() only effects, in my case, this.x. If I am correct, I'm confused why it's necessary to use new from within the event listener in foo's events method in order to use the prototype methods attached to foo. What am I missing?
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/comment/42217314
has text: thanks! I was able to use this and what jfriend00 said to solve my problem.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26824134

http://stackoverflow.com/comment/42043864
has text: Why the trigger handler?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26682921
type: Comment

http://stackoverflow.com/comment/97766363
type: QuestionComment
comment on: http://stackoverflow.com/q/26771549
has text: This should definitely solve your problem. https://stackoverflow.com/a/55531213/8606018
score: 0
type: Comment

http://stackoverflow.com/a/26795028
type: Answer
upvote count: 4
score: 3
has body: try to run this simple code and see u will notice that first text box will be focused and not the second &lt;input type="text" autofocus value="value text" onfocus="this.value = this.value;"/&gt; &lt;input type="text" autofocus value="value text" onfocus="this.value = this.value;"/&gt;
downvote count: 1
answers question: http://stackoverflow.com/q/26794802

http://stackoverflow.com/comment/42086509
has text: Are you sure that you cannot or do not want to use input `type="text"`?
comment on: http://stackoverflow.com/q/26751359
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26680428
has answer: http://stackoverflow.com/a/26687509
score: 0
accepted answer: http://stackoverflow.com/a/26680494
has body: I want to store some strings and check, if strings from textarea are equal to stored one. I decided to start with arrays. var string = "something like this happens everyday in my life"; var array1 = [ "thing", "something" ]; var array2 = [ "happens", "life" ]; I got it how it works with one word strings: if(string.search(array1) != -1) { console.log("array1"); } if(!!~jQuery.inArray(string.search, array1)) { console.log("array1"); } But what i need is to compare every item of this sentence to my arrays and get every match. Even if there is several matches in one array. Please help.
has title: Check string for an array match item and keep checking
type: Question
type: AnsweredQuestion
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26680494
possible better answer: http://stackoverflow.com/a/26687509

http://stackoverflow.com/comment/42181465
type: AnswerComment
comment on: http://stackoverflow.com/a/26801903
type: Comment
has text: I've had a go at dynamically calculating the maximumm height of the volume bars depending on the ohlc range. It works pretty well apart from the 'All' selection, good luck: http://jsfiddle.net/cvezpup7/1/
score: 0

http://stackoverflow.com/comment/42115967
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26766837
has text: I love the variety of responses this question is getting. I should tuck this away and use it as an interview question.

http://stackoverflow.com/q/26741485
has comment: http://stackoverflow.com/comment/42069267
has body: I need an imageflip to fadeIn() and fadeOut() on a Joomla 2.5.19 site. I animated the fadeIn() and the imageflip with jQuery. Strange things are happening on my Joomla site. The template comes with jQuery, nevertheless I installed jQuery easy jQuery easy since there are several jQuery versions loaded in the template (dont know why). Strangely, the fadeIn() and fadeOut() effect works on two mapped areas in my imagemap (far on the right, the green and the blue one which are highlighted MySite), but not on the others. Testing the imageflip on my computer, offline, it donly works for the same two areas. BUT, testing it in JSFiddle, it works (the working example switch on the left hand side from PureJS to any jQuery version if necessary). I guess, something must be messed up with the jQuery?! But then again, why do two fadeIn() and fadeOut() work on my site and on my computer, but not the others?!
has comment: http://stackoverflow.com/comment/42069043
has comment: http://stackoverflow.com/comment/42069093
tagged with: javascript
tagged with: jquery
has title: jQuery is not working on Joomla site
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/42068998
tagged with: joomla
type: UnansweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26780839
tagged with: dom
type: Question

http://stackoverflow.com/comment/41986705
type: QuestionComment
has text: You should empty the fragment at the beginning or end of the function. Otherwise, every time you click you'll duplicate all the boxes from the previous click.
score: 0
comment on: http://stackoverflow.com/q/26695868
type: Comment

http://stackoverflow.com/comment/42004322
type: Comment
score: 1
type: AnswerComment
has text: Like I said, chrome for android has a "print" option in its menu. This has to be somehow accessible from javascript and as for converting to PDF could you possible elaborate on that.
comment on: http://stackoverflow.com/a/26705473

http://stackoverflow.com/q/26716555
has comment: http://stackoverflow.com/comment/42023894
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42024300
accepted answer: http://stackoverflow.com/a/26717127
type: AnsweredQuestion
has body: I got a design in Full HD resolution, it was planned for a presentation in this solution, now they want that it will be a bit responsive. Now I have to change all these parameters: margin, padding, width, height, top, left on the fly, maybe someone got a solution for me. I tried following and it works for the images with the width and height: // Set Array for Resize (0 =&gt; width of the window, 1 =&gt; resize (yes / no)?, 2 =&gt; how much per cent do I have to put away var resize_pool = new Array(parseInt($(window).width()), false, 0); if(resize_pool[0] &lt; 1920) { resize_pool[1] = true; resize_pool[2] = (100 * resize_pool[0]) / 1920; resize_pool[2] = 100 - Math.floor(resize_pool[2]); } // Do I have to resize? if(resize_pool[1] == true) { $("#content img").each(function(index, element) { $(this).css('width', 'calc(' + $(this).width() + 'px - ' + resize_pool[2] + '%)').css('height', 'calc(' + $(this).height() + 'px - ' + resize_pool[2] + '%)'); }); } This works fine, but is there a better solution, where I can change all my values? margin, padding etc. Thanks for your help in advance
has title: Change margin, width, height, top, left, padding from all elements between a div
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/26717127
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26684807
type: Answer
has body: Don't really understand your question mate... Can you please specify exactly what you did to get that error because it's not happening to me.. (maybe also the browser you're on) Seems to work fine, see below plunkr 'http://plnkr.co/edit/04huDKRSIr2YLtjItZRK?p=preview'
score: 0
answers question: http://stackoverflow.com/q/26684699
has comment: http://stackoverflow.com/comment/41975256

http://stackoverflow.com/q/26723081
has comment: http://stackoverflow.com/comment/42036162
has comment: http://stackoverflow.com/comment/42036427
answer count: 0
score: 1
linked to: http://stackoverflow.com/q/1241947
upvote count: 1
has comment: http://stackoverflow.com/comment/44627028
type: Question
has comment: http://stackoverflow.com/comment/42036213
has comment: http://stackoverflow.com/comment/42036549
has comment: http://stackoverflow.com/comment/42036335
tagged with: javascript
has title: How can I clone a reCAPTCHA?
downvote count: 0
tagged with: recaptcha
tagged with: jquery
favorite count: 0
has body: I am using two forms on a single page on a client's WordPress site. A while back I implemented reCAPTCHAs for each form. If I remember correctly you weren't able to use two on a single page so after doing some research I found that it could be done by cloning the first one with javascript. &lt;div id='ppc-recap'&gt; ...(reCAPTCHA HTML removed for brevity)... &lt;/div&gt; &lt;div id='ppc-recap2'&gt;&lt;/div&gt; jQuery('#ppc-recap2').html(jQuery('#ppc-recap').clone(true,true)); This worked back then however now it is not. I get the following warning in the browser console: Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened. There are two of these warnings. Each appears to caused by the clones of the two scripts reCAPTCHA uses. I'm lost here, guys.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42036067

http://stackoverflow.com/comment/106598737
score: 0
comment on: http://stackoverflow.com/q/26713934
type: Comment
type: QuestionComment
has text: @vimes1984 Please elaborate what you want to do with the data. Say someone fills in the spreadsheet above, what should happen to the data? should it be submitted somewhere? emailed? stored in an database? etc... Do parts numbers need to auto fill data of stocks? are stocks kept somewhere? what data fields do you need? Part number, qty, booking ref and notes only? Also, it would have helped if you had posted your own question.

http://stackoverflow.com/q/26687977
duplicate of: http://stackoverflow.com/q/16736804
linked to: http://stackoverflow.com/q/17039926
answer count: 1
downvote count: 0
tagged with: javascript
has body: So I don't know if this is a problem with AngularJS, or my understanding. In my app, I have an ng-repeat and I need to keep track of the active $index, which can be changed when you click on another item. So I thought I would do something like: But this does not work; I know if I change the ng-click to ng-click="select($index) and apply the change in my controller, this would work. But I'd like to know why the implementation above doesn't work. Interestingly, if you don't have an ng-repeat, this DOES work, i.e: Item 1 Item 2 ... Here is a Plunker of these two scenarios. Why?
accepted answer: http://stackoverflow.com/a/26688039
has title: ng-click doesn't change value in HTML when in ng-repeat
favorite count: 0
tagged with: angularjs
score: 3
has comment: http://stackoverflow.com/comment/41973294
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41973333
linked to: http://stackoverflow.com/q/14049480
upvote count: 3
has comment: http://stackoverflow.com/comment/41973256
type: Question
has answer: http://stackoverflow.com/a/26688039
linked to: http://stackoverflow.com/q/16736804
has comment: http://stackoverflow.com/comment/41973243
has comment: http://stackoverflow.com/comment/41973228

http://stackoverflow.com/a/26816614
type: Answer
has body: No way. HTML5 itself is just a document sturcture and CSS3 provides style. That is, HTML5 as is has no behavior, thus, you won't be able to interact with the document without JavaScript. If JavaScript is disabled and you provide a &lt;noscript&gt; element, you should tell your users that your Web application won't work without JavaScript.
score: 0
answers question: http://stackoverflow.com/q/26816579

http://stackoverflow.com/comment/42156984
has text: BTW, it's perfectly legal. Prices are *factual information* meaning they're not [subject to copyright](http://www.copyright.gov/fls/fl102.html).
comment on: http://stackoverflow.com/q/26790417
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42226458
comment on: http://stackoverflow.com/a/26829425
type: AnswerComment
score: 0
type: Comment
has text: but i don't know why a negative point for that, yeah arrays are objets, so what?, does what he needs

http://stackoverflow.com/comment/42259155
score: 0
type: Comment
has text: Is there a way to make it work on a site like flipkart? Cause there it's a different mechanism.
comment on: http://stackoverflow.com/a/26830670
type: AnswerComment

http://stackoverflow.com/a/26721626
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26721528
has body: var1 - 2; does not do anything. You want to set a new value to var1 like var1 -+ 2; or var1 = var1 - 2;.
type: Answer
downvote count: 0

http://stackoverflow.com/comment/42014842
has text: I have a fairly complex structure with different views for each level i.e. different views for A,B and C. I have many events to handle, morever, I want a sort functionality (on clicking sort button, the DOM should be sorted). how can I do this?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26711806
score: 0

http://stackoverflow.com/a/26760856
upvote count: 0
score: -1
answers question: http://stackoverflow.com/q/26760717
type: Answer
has comment: http://stackoverflow.com/comment/42136657
has body: In your case it would simply repeat endlessly, because you're executing the function instead of passing the reference. You should do it like this: function testTimeout() { alert("testing timeout)"; setTimeout(testTimeout, 5000); } Note the missing braces after testTimeout. This tells setTimeout to execute that function, instead of the result of that function, which is how your original code behaved. " I would like my timeout function to be called right away and every 5 seconds after with my new parameter. But, I don't want the timeout function with the old parameter to continue repeating " In order to achieve what you're trying to do you should remove the timeout: var timeoutId; function testTimeout() { alert("testing timeout)"; clearTimeout(timeoutId ); timeoutId = setTimeout(testTimeout, 5000); } Notes: You can stop the previous timeoutI from firing by catching the id returned from the setTimeout method and passing that to the clearTimeout method
downvote count: 1
has comment: http://stackoverflow.com/comment/42103760

http://stackoverflow.com/comment/46745371
type: QuestionComment
comment on: http://stackoverflow.com/q/26769952
has text: @robs, Are inline styles working for your?
score: 0
type: Comment

http://stackoverflow.com/comment/42209352
comment on: http://stackoverflow.com/a/26817948
type: Comment
has text: I tried that but then the second pop up never opened. I'll try and reproduce on jsfiddle and update question. GREAT plugin by the way, thank you for creating it.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42204832
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26817155
has text: Maybe switch continuous to 1 may help?
score: 0

http://stackoverflow.com/q/26676380
score: 3
tagged with: date
type: Question
has body: I'm using the NVD3 library to generate a linechart, and gave some data: The problem is, the interactive guideline shows up like this (specifically note the tooltips): Note that I only get a tooltip at the start and end of the linechart. Now, I set useInteractiveGuideline(false) This DOES show up correctly, but is very laggy and I'd like to use useInteractiveGuideline(true). Is suspect this is a bug in my code.
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26753342
accepted answer: http://stackoverflow.com/a/26753342
upvote count: 3
tagged with: datetime
favorite count: 0
downvote count: 0
tagged with: nvd3.js
tagged with: d3.js
has title: NVD3 linechart tooltips not following the mouse
type: AnsweredQuestion

http://stackoverflow.com/a/26693654
answers question: http://stackoverflow.com/q/26693580
has comment: http://stackoverflow.com/comment/41982707
score: 0
has comment: http://stackoverflow.com/comment/41982700
type: Answer
has comment: http://stackoverflow.com/comment/41982803
has body: You can't put the code in a separate javascript file. But should be in the html page. You have to use a common include or template to paste the code instead of manually adding it to every page.

http://stackoverflow.com/q/26800321
accepted answer: http://stackoverflow.com/a/26800534
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26800374
tagged with: backbone-events
has answer: http://stackoverflow.com/a/26800374
upvote count: 1
type: Question
has title: Backbone js: Only render when specific attributes have changed?
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/26800534
downvote count: 0
score: 1
favorite count: 0
tagged with: backbone.js
has answer: http://stackoverflow.com/a/26800383
has body: I know that in a backbone view you can bind to the change event to rerender like this: initialize: function() { this.model.bind('change', this.render, this); }, However is there a way to only render when specific attributes change? I.e. specify a whitelist (or blacklist) of attributes that should or shouldn't trigger a re-render?

http://stackoverflow.com/comment/41960958
has text: Welcome to the land of promises.
score: 0
comment on: http://stackoverflow.com/q/26681116
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26827412
has comment: http://stackoverflow.com/comment/42223024
has comment: http://stackoverflow.com/comment/42227357
downvote count: 0
answers question: http://stackoverflow.com/q/26827354
type: Answer
has body: You need to stop search once user is found in the array. To do so you need to break the loop or simply return from the function: for (var i = 0; i &lt; users.length; i++) { if (inputEmail === users[i].email) { if (inputPassword === users[i].password) { output.innerHTML = "Successfully logged in as " + users[i].email; } else { output.innerHTML = "Invaild password."; } break; } else { output.innerHTML = "User not found."; } } Demo: http://jsfiddle.net/5mfaoz9e/1/
upvote count: 3
has comment: http://stackoverflow.com/comment/42222941
has comment: http://stackoverflow.com/comment/42236788
score: 3
has comment: http://stackoverflow.com/comment/42223001

http://stackoverflow.com/comment/55593023
comment on: http://stackoverflow.com/q/26777060
type: Comment
type: QuestionComment
score: 0
has text: You can't change the encoding of JavaScript Strings. You'll need an API that accepts byte arrays.

http://stackoverflow.com/a/26732536
type: Answer
score: 0
has body: This my html body:
answers question: http://stackoverflow.com/q/26732483

http://stackoverflow.com/q/26826425
has comment: http://stackoverflow.com/comment/42226737
answer count: 0
type: Question
tagged with: javascript
score: 0
tagged with: meteor
has comment: http://stackoverflow.com/comment/42232971
has title: MeteorJs RouteController 'HomeController' is not defined
tagged with: iron-router
has body: I am trying eventedmind 'em' tool for creation of project. I used 'em' to create a route. 'em' created a route in '/both/router/routes.js', a '/client/controllers/home.js as HomeController and '/client/views/home' folder with html css and js files. The error can be removed it I place 'controllers' folder at root of project or in 'both' folder But leaving 'controllers' folder at its default location (in client folder), application gives error. Error : RouteController 'HomeController' is not defined. at resolve (packages/iron:router/lib/route.js:91) at Function.Route.findControllerConstructor (packages/iron:router/lib/route.js:113) at Function.Route.createController (packages/iron:router/lib/route.js:131) at Function.Router.createController (packages/iron:router/lib/router.js:185) at Function.Router.dispatch (packages/iron:router/lib/router_server.js:29) at Object.router (packages/iron:router/lib/router.js:15) at next (/home/david/.meteor/packages/webapp/.1.1.4.1hc4z6t++os+web.browser+web.cordova/npm/node_modules/connect/lib/proto.js:190:15) at Function.app.handle (/home/david/.meteor/packages/webapp/.1.1.4.1hc4z6t++os+web.browser+web.cordova/npm/node_modules/connect/lib/proto.js:198:3) at Object.fn [as handle] (/home/david/.meteor/packages/webapp/.1.1.4.1hc4z6t++os+web.browser+web.cordova/npm/node_modules/connect/lib/proto.js:74:14) at next (/home/david/.meteor/packages/webapp/.1.1.4.1hc4z6t++os+web.browser+web.cordova/npm/node_modules/connect/lib/proto.js:190:15) Can someone guide me what is wrong and how it can be rectified without changing folders location.
type: UnansweredQuestion

http://stackoverflow.com/comment/42103235
type: Comment
comment on: http://stackoverflow.com/q/26756815
type: QuestionComment
has text: The loading overlay is invoked by `var showLoadingOverlay = function(selector){ if (typeof selector === 'undefined' || !selector) { selector = '#' + FORM.getMainFormId(); } $(selector).mask(MESSAGES.i18n('gui.loadingOverlay')); };`
score: 0

http://stackoverflow.com/comment/42036586
type: QuestionComment
has text: FYI in Chrome 41 the camera permission UI will change, you can try and see how it looks with `--enable-permissions-bubbles` (there are a few bugs at the moment, in Chrome 38 I had to open a new tab then go back to the original tab to see the UI if I called getUserMedia from the console.)
comment on: http://stackoverflow.com/q/26716605
score: 0
type: Comment

http://stackoverflow.com/a/26754494
upvote count: 0
type: Answer
downvote count: 1
has body: This code snippet should do the trick JQUERY $('#dropdownId').change(function(){ $('#dropdownId').find(":selected").css('color', '#D4D4D4'); $('#dropdownId').find("option:not(:selected)").css('color', '#000000'); }); example: http://jsfiddle.net/Lmda3tfc/
answers question: http://stackoverflow.com/q/26754180
score: -1

http://stackoverflow.com/comment/42020922
score: 1
comment on: http://stackoverflow.com/a/26715226
type: AnswerComment
has text: @sergiureznicencu What does "not working" mean? Does it give you an error? Does it not change the source? Does it not reload the frame?
type: Comment

http://stackoverflow.com/q/26806324
type: Question
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26807036
answer count: 1
has body: I've this service and I want to add another URL to communicate REST endpoints, for example I want to implement an update for changing lastAccessDateTime property of my current course, using server side DateTime. Can I do that using this service or I've to use a different route definition (courses/:courseId/changedate) in another service? //Courses service used to communicate Courses REST endpoints angular.module('courses').factory('Courses', ['$resource', function($resource) { return $resource('courses/:courseId', { courseId: '@_id' }, { update: { method: 'PUT' } } ); } ]); I appreciate any help, thanks
has title: How to add a route to $resource in AgularJS Service
favorite count: 0
tagged with: angularjs
tagged with: angular-services
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26807036
upvote count: 1
downvote count: 1

http://stackoverflow.com/q/26758164
has answer: http://stackoverflow.com/a/34521440
type: Question
score: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42098182
tagged with: jquery
has body: I am facing issues with the Phonegap App when trying to display a progress dialog using navigator.notification.activityStart("", "Loading"); Cordova version used is PLATFORM_VERSION_BUILD_LABEL = '3.6.4'; With the index.html file declared in the following way : When I run this code on the device, Cordova throws the below error and a blank screen is displayed : file:///android_asset/www/index.html: Line 33 : Uncaught TypeError: Cannot call method 'activityStart' of undefined Please suggest me what changes I need to implement with the code.
tagged with: android
has title: Uncaught TypeError: Cannot call method 'activityStart' of undefined
has comment: http://stackoverflow.com/comment/42098001
tagged with: cordova
type: UnansweredQuestion
tagged with: phonegap-build
has comment: http://stackoverflow.com/comment/42098152

http://stackoverflow.com/a/26737661
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42061573
accepted answer of: http://stackoverflow.com/q/26737582
answers question: http://stackoverflow.com/q/26737582
type: Answer
score: 1
upvote count: 1
has body: You shouldn't place your process.then() in the new Promise() block. Instead of: var process = new Promise(function (resolve, reject) { // Code process.then (function(response) { // Code } )} Use: var process = new Promise(function (resolve, reject) { // Code )} process.then (function(response) { // Code } Instead of trying to access a process variable in the promise's scope, this then properly sets a then for your process promise. Also, var response = response; is pretty pointless. It doesn't really add anything to your code.

http://stackoverflow.com/q/26687184
accepted answer: http://stackoverflow.com/a/26687202
upvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/26687599
tagged with: php
type: AnsweredQuestion
has body: I have the following script. &lt;script&gt; $(function() { var date = $('#date').datepicker({ dateFormat: 'yy-mm-dd' }).val(); }); &lt;/script&gt; It displays the datepicker when selected the text box. But I want the current date as default in the text box.Help me
has answer: http://stackoverflow.com/a/26687202
has title: Javascript date function with current date
downvote count: 1
type: Question
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26687599
answer count: 2

http://stackoverflow.com/a/26770935
has comment: http://stackoverflow.com/comment/42122314
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42151470
has body: In file jw-jqm-cal.js add this function: function tConvert (time) { // Check correct time format and split into components time = time.toString ().match (/^([01]\d|2[0-3])(:)([0-5]\d)(:[0-5]\d)?$/) || [time]; if (time.length &gt; 1) { // If time format correct time = time.slice (1); // Remove full string match value time[5] = +time[0] &lt; 12 ? ' AM' : ' PM'; // Set AM/PM time[0] = +time[0] % 12 || 12; // Adjust hours } return time.join (''); // return adjusted time or original string } and insert this 2 lines in function plugin.settings.eventHandler.getEventsOnDay(begin, end, function(list_of_events): beginTime =tConvert(beginTime ); endTime=tConvert(endTime); EDIT insert before: timeString = beginTime + "-" + endTime :** ... beginTime =tConvert(beginTime ); endTime=tConvert(endTime); timeString = beginTime + "-" + endTime, ...
accepted answer of: http://stackoverflow.com/q/26770494
answers question: http://stackoverflow.com/q/26770494
has comment: http://stackoverflow.com/comment/42122651
type: AcceptedAnswer

http://stackoverflow.com/q/26812227
has body: I am trying to get a solution to have less number of characters to be used to access local web pages within the local network. Please suggest what scripting/ programming language would be good? I was thinking to write java script. Thanks, Vinay
score: 1
type: Question
tagged with: browser
downvote count: 0
tagged with: javascript
has title: Java script for web browser to create shortcut name for web URL/ local network page
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/q/26821239
has title: JavaScript: Why can't I chain after my nested reduce function?
has answer: http://stackoverflow.com/a/26821404
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26821404
score: 0
tagged with: functional-programming
answer count: 1
tagged with: javascript
has body: How do I go up a level and return "id and title" pairs to my array? I get an error when trying to use map after my reduce function. Array.prototype.mergeAll = function(){ return [].concat.apply([], this); }; Array.prototype.flatMap = function(func){ return this.map(function(item){ return func(item); }).mergeAll(); }; function test() { var movieLists = [ { name: "New Releases", videos: [ { "id": 70111470, "title": "Die Hard", "boxarts": [ { width: 150, height:200, url:"http://cdn-0.nflximg.com/images/2891/DieHard150.jpg" }, { width: 200, height:200, url:"http://cdn-0.nflximg.com/images/2891/DieHard200.jpg" } ], "url": "http://api.netflix.com/catalog/titles/movies/70111470", "rating": 4.0, "bookmark": [] }, { "id": 654356453, "title": "Bad Boys", "boxarts": [ { width: 200, height:200, url:"http://cdn-0.nflximg.com/images/2891/BadBoys200.jpg" }, { width: 140, height:200, url:"http://cdn-0.nflximg.com/images/2891/BadBoys140.jpg" } ], "url": "http://api.netflix.com/catalog/titles/movies/70111470", "rating": 5.0, "bookmark": [{ id:432534, time:65876586 }] } ] }, { name: "Thrillers", videos: [ { "id": 65432445, "title": "The Chamber", "boxarts": [ { width: 130, height:200, url:"http://cdn-0.nflximg.com/images/2891/TheChamber130.jpg" }, { width: 200, height:200, url:"http://cdn-0.nflximg.com/images/2891/TheChamber200.jpg" } ], "url": "http://api.netflix.com/catalog/titles/movies/70111470", "rating": 4.0, "bookmark": [] }, { "id": 675465, "title": "Fracture", "boxarts": [ { width: 200, height:200, url:"http://cdn-0.nflximg.com/images/2891/Fracture200.jpg" }, { width: 120, height:200, url:"http://cdn-0.nflximg.com/images/2891/Fracture120.jpg" }, { width: 300, height:200, url:"http://cdn-0.nflximg.com/images/2891/Fracture300.jpg" } ], "url": "http://api.netflix.com/catalog/titles/movies/70111470", "rating": 5.0, "bookmark": [{ id:432534, time:65876586 }] } ] } ]; // Use one or more flatMap, map, and reduce calls to create an array with the following items (order doesn't matter…

http://stackoverflow.com/comment/42124250
type: Comment
comment on: http://stackoverflow.com/a/26770684
score: 0
has text: I check to check with if, but I think it iterates the loop because it does not overwrite the value of "j" found in getElementById (pasos + "-products-" + j);
type: AnswerComment

http://stackoverflow.com/comment/42069956
type: Comment
comment on: http://stackoverflow.com/a/26684302
has text: .controller('mainController', ['$rootScope', '$rootScope', function ($scope, $rootScope) {... If you have something like this in your code it would explain such a behavior. But that is just an idea...
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42033823
type: Comment
has text: This solution was exactly what was needed for this application, thank you very much.
comment on: http://stackoverflow.com/a/26721964
score: 1
type: AnswerComment

http://stackoverflow.com/q/26728022
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/26728146
has body: Given an array of objects, what is the best way to find the object with a particular key in JS? Using jQuery and underscoreJS is fine. I'm just looking for the easiest / least code answer. Example: An array of objects, where each object has a "name". Find the object with a particular "name". var people = [{name: "A"}, {name: "B"}, {name: "C"}]; My current solution: Pass in the array, the key (e.g. "name"), and the value (e.g. "C"). function getObject(myArray, searchKey, searchValue) { myArray.forEach(function(element){ if (element[searchKey] == searchValue) { return element; } }); }
tagged with: jquery
has answer: http://stackoverflow.com/a/26728071
score: 0
has comment: http://stackoverflow.com/comment/42044541
has comment: http://stackoverflow.com/comment/42044525
has title: Given an array of objects, find the object with a particular key
answer count: 5
has answer: http://stackoverflow.com/a/26728263
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26728117
type: Question
tagged with: underscore.js
has answer: http://stackoverflow.com/a/58994926
has comment: http://stackoverflow.com/comment/42044454

http://stackoverflow.com/comment/42194855
type: AnswerComment
comment on: http://stackoverflow.com/a/26809480
type: Comment
has text: Just figured out that step: `$("#RootID")[0].value = 'X';`
score: 0

http://stackoverflow.com/q/26726727
has comment: http://stackoverflow.com/comment/42042530
type: AnsweredQuestion
tagged with: string-interpolation
linked to: http://stackoverflow.com/q/17268468
tagged with: coffeescript
accepted answer: http://stackoverflow.com/a/26756004
has comment: http://stackoverflow.com/comment/42043133
type: Question
has comment: http://stackoverflow.com/comment/42042365
has title: Why does CoffeeScript's string interpolation prefix the expression with an empty string?
has comment: http://stackoverflow.com/comment/42078790
has body: In CoffeeScript, the following statement evaluates to a JavaScript statement that is prefixed by an empty string. I feel like there is an edge case with regards to type safety, but I can't think of it off the top of my head. In what case does the prefix make a difference? CoffeeScript: x = "#{foo} bar" JavaScript: x = "" + foo + " bar";
answer count: 1
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42043105
tagged with: string
has answer: http://stackoverflow.com/a/26756004
linked to: http://stackoverflow.com/q/14115902
has comment: http://stackoverflow.com/comment/42069035
has comment: http://stackoverflow.com/comment/42070104

http://stackoverflow.com/q/26807330
has comment: http://stackoverflow.com/comment/42187835
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42188160
has comment: http://stackoverflow.com/comment/42187846
has comment: http://stackoverflow.com/comment/42187712
has comment: http://stackoverflow.com/comment/42199657
downvote count: 3
has comment: http://stackoverflow.com/comment/42187602
has answer: http://stackoverflow.com/a/63342941
has comment: http://stackoverflow.com/comment/42188538
type: Question
possible better answer: http://stackoverflow.com/a/26807399
tagged with: c#
has comment: http://stackoverflow.com/comment/42188336
has comment: http://stackoverflow.com/comment/42188616
has comment: http://stackoverflow.com/comment/42190826
accepted answer: http://stackoverflow.com/a/26807420
has answer: http://stackoverflow.com/a/26807399
has comment: http://stackoverflow.com/comment/42187753
has answer: http://stackoverflow.com/a/26807467
upvote count: 4
has body: I am new in C# and would like to know if it's possible to create an array in C# like following: rates[0]['logic_id'] = 12; rates[0]['line_id'] = "" rates[0]['rate'] = rateVal; rates[0]['changed'] = isChanged; rates[1]['logic_id'] = 13; rates[1]['line_id'] = "" rates[1]['rate'] = secvalue; rates[1]['changed'] = isChanged; Can I create rates array in C# with such values? EDIT: My goal is to send rates array to a specific Web API service that is running with PHP. They accept only array with abovementioned structure. That's why I want to achieve that.
has comment: http://stackoverflow.com/comment/42187645
has title: Creating c# array similar to javascript array
has comment: http://stackoverflow.com/comment/42196180
tagged with: arrays
has comment: http://stackoverflow.com/comment/42188443
has comment: http://stackoverflow.com/comment/42187708
tagged with: javascript
has comment: http://stackoverflow.com/comment/42187819
has comment: http://stackoverflow.com/comment/42187790
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42187931
has comment: http://stackoverflow.com/comment/42188007
has comment: http://stackoverflow.com/comment/42187626
linked to: http://stackoverflow.com/q/5156664
has comment: http://stackoverflow.com/comment/42187691
has answer: http://stackoverflow.com/a/26807420
has comment: http://stackoverflow.com/comment/42187611
has comment: http://stackoverflow.com/comment/42189387
answer count: 4

http://stackoverflow.com/q/26728728
tagged with: webgl
type: Question
has answer: http://stackoverflow.com/a/26731027
accepted answer: http://stackoverflow.com/a/26731027
tagged with: javascript
score: 0
tagged with: texture-mapping
answer count: 1
tagged with: opengl-es
has body: I am trying to add texture to an jsonloaded object, which is not loading for some reason. javascript // Load in the mesh and add it to the scene. var loader = new THREE.JSONLoader(true); loader.load(jsonPath, function (geometry, materials ) { skateboardBase = new THREE.Mesh(geometry, new THREE.MeshFaceMaterial(materials)); scene.add(skateboardBase); }); if I remove the materials part, things work fine without texture json "materials" : [ { "DbgColor" : 15658734, "DbgIndex" : 0, "DbgName" : "SVGMat.001", "colorAmbient" : [0.3294117738218869, 0.6243137452649137, 0.3607843214390325], "colorDiffuse" : [0.3294117738218869, 0.6243137452649137, 0.3607843214390325], "colorSpecular" : [0.5, 0.5, 0.5], "illumination" : 2, "depthTest" : true, "depthWrite" : true, "specularCoef" : 50, "transparency" : 1.0, "transparent" : false, "vertexColors" : false, "mapDiffuse" : "../textures/dash.jpg", "shading" : "Lambert" }], "vertices" : [1.32997,1.125,-0.870963,1.34966,1.125, ... ], "uvs" : [], "faces" : [34,124,126,125,0,...], Error [.WebGLRenderingContext]GL ERROR :GL_INVALID_OPERATION : glDrawElements: attempt to access out of range vertices in attribute 2
type: AnsweredQuestion
has title: Adding texture to json not loading
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/26730562
has comment: http://stackoverflow.com/comment/42050728
type: Answer
has comment: http://stackoverflow.com/comment/42096918
has comment: http://stackoverflow.com/comment/42049248
downvote count: 1
has body: stringFromServer.replace(/(&lt;([^&gt;]+)&gt;|&amp;[^;]+;)/ig, "")
answers question: http://stackoverflow.com/q/26730343
has comment: http://stackoverflow.com/comment/42049280
score: -1
has comment: http://stackoverflow.com/comment/42050173
upvote count: 0
has comment: http://stackoverflow.com/comment/42049550
has comment: http://stackoverflow.com/comment/42049523

http://stackoverflow.com/q/26769593
has answer: http://stackoverflow.com/a/26770869
has title: Is it impossible to tell if a function is a generator function if .bind() has been called on it?
tagged with: node.js
tagged with: generator
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/16754956
has body: Looks like calling .bind(this) on any generator function breaks my ability to see if the function is a generator. Any ideas on how to fix this? var isGenerator = function(fn) { if(!fn) { return false; } var isGenerator = false; // Faster method first // Calling .bind(this) causes fn.constructor.name to be 'Function' if(fn.constructor.name === 'GeneratorFunction') { isGenerator = true; } // Slower method second // Calling .bind(this) causes this test to fail else if(/^function\s*\*/.test(fn.toString())) { isGenerator = true; } return isGenerator; } var myGenerator = function*() { } var myBoundGenerator = myGenerator.bind(this); isGenerator(myBoundGenerator); // false, should be true
has comment: http://stackoverflow.com/comment/42122031
has answer: http://stackoverflow.com/a/26769621
type: Question
accepted answer: http://stackoverflow.com/a/26769621
possible better answer: http://stackoverflow.com/a/36972162
score: 5
has answer: http://stackoverflow.com/a/36972162
upvote count: 5
has comment: http://stackoverflow.com/comment/42120147
tagged with: javascript
has comment: http://stackoverflow.com/comment/42119590
tagged with: ecmascript-harmony
answer count: 3
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/42121531

http://stackoverflow.com/q/26814343
has title: Calculate Duration of Overlapping Time Periods
has answer: http://stackoverflow.com/a/26815498
has answer: http://stackoverflow.com/a/26815638
tagged with: time
score: 0
possible better answer: http://stackoverflow.com/a/26815638
type: AnsweredQuestion
tagged with: algorithm
accepted answer: http://stackoverflow.com/a/26815498
has body: Consider the following examples: Daytime starts (night ends): 07:00 Daytime ends (night starts): 20:00 ------------------------------ Task A start time: 06:00 Task A end time: 08:00 Task B start time: 10:00 Task B end time: 12:00 Task C start time: 19:00 Task C end time: 21:00 Task D start time: 23:00 Task D end time: 01:00 Task E start time: 06:00 Task E end time: 21:00 How do I calculate the amount of time a task was spent during the daytime, and how much of it was spent during the nighttime? The answers to the above would be: A (day): 1 hr A (night): 1 hr B (day): 2 hrs B (night): 0 hrs C (day): 1 hr C (night): 1 hr D (day): 0 hrs D (night): 2 hrs E (day): 13 hrs E (night): 2 hrs
type: Question
tagged with: c#
answer count: 2
tagged with: javascript
tagged with: datetime

http://stackoverflow.com/q/26725100
tagged with: socket.io
has title: Double socketIO event bug
type: Question
accepted answer: http://stackoverflow.com/a/26725346
type: AnsweredQuestion
tagged with: debugging
has body: I am working on a quiz app. I have a bug wich keeps me busy for 4 hours now. I am trying to use socketIO in my app. Players can post their answer to the quiz master. The quiz master can view them on his personal page. The problem is that when I submit an answer as player the socket.on() on the quiz master's side triggers twice. Getting the answers from the database and then from socket (I think this is where the problem is): $http.get('/api/antwoorden/' + $scope.linkHash) .success(function (data) { $scope.answers = data.doc.ingezonden; console.log("****GEZONDEN VAN DATABASE****", $scope.answers) var i = 0; socketIO.on('answerSend', function (object) { i = i + 1; console.log(i); if(object.uitvoering === $scope.myCode) { $scope.answers.push(object.answer); console.log("***", object); } console.log("*****NU IS DIE DIT*****", $scope.answers); }); }); console output
answer count: 1
tagged with: javascript
tagged with: angularjs
has answer: http://stackoverflow.com/a/26725346
tagged with: node.js
score: 0

python
tags question: http://stackoverflow.com/q/26696454
tags question: http://stackoverflow.com/q/26736525
tags question: http://stackoverflow.com/q/26804847
tags question: http://stackoverflow.com/q/26764077
tags question: http://stackoverflow.com/q/26787918
tags question: http://stackoverflow.com/q/26686781
tags question: http://stackoverflow.com/q/26707432
tags question: http://stackoverflow.com/q/26776939
tag name: python
tags question: http://stackoverflow.com/q/26728001
tags question: http://stackoverflow.com/q/26761211
tags question: http://stackoverflow.com/q/26789951
tags question: http://stackoverflow.com/q/26674564
tags question: http://stackoverflow.com/q/26822354
tags question: http://stackoverflow.com/q/26701861
tags question: http://stackoverflow.com/q/26684824
tags question: http://stackoverflow.com/q/26813805
tags question: http://stackoverflow.com/q/26760187
tags question: http://stackoverflow.com/q/26733855
tags question: http://stackoverflow.com/q/26792899
tags question: http://stackoverflow.com/q/26738166
tags question: http://stackoverflow.com/q/26800980
type: Tag
tags question: http://stackoverflow.com/q/26709362
tags question: http://stackoverflow.com/q/26808370
tags question: http://stackoverflow.com/q/26778635
tags question: http://stackoverflow.com/q/26706746
tags question: http://stackoverflow.com/q/26739725
tags question: http://stackoverflow.com/q/26782713
tags question: http://stackoverflow.com/q/26683501
tags question: http://stackoverflow.com/q/26791615
tags question: http://stackoverflow.com/q/26698152
tags question: http://stackoverflow.com/q/26698929
tags question: http://stackoverflow.com/q/26761291
tags question: http://stackoverflow.com/q/26763349

http://stackoverflow.com/q/26764879
has comment: http://stackoverflow.com/comment/42112990
has body: When using ng-click on a div: bla bla ng-click fires even if the user only selects or drags the div. How do I prevent that, while still enabling text selection?
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has title: ng-click firing when selecting text or dragging
favorite count: 0
has comment: http://stackoverflow.com/comment/42113695
has comment: http://stackoverflow.com/comment/42113491
score: 3
has comment: http://stackoverflow.com/comment/42136483
tagged with: angularjs-ng-click
has comment: http://stackoverflow.com/comment/44727452
tagged with: angularjs
upvote count: 3
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/48498513
has answer: http://stackoverflow.com/a/31895622

http://stackoverflow.com/q/26725930
has comment: http://stackoverflow.com/comment/42041026
type: Question
accepted answer: http://stackoverflow.com/a/26727653
has comment: http://stackoverflow.com/comment/42041994
has comment: http://stackoverflow.com/comment/42041056
has body: this is my first time trying to use ajax and javascript and I've come across this problem: Uncaught Error: Route parameter missing: id I'm not sure how to fix it/where to look as I don't understand what the error is telling me. what does 'route parameter missing: id' mean? I'm not sure what code is relevant to this issue so I've had a crack putting up what may be important: My browser shows: I think it has something to do with how the user variable is passing around but I'm not sure if this thought is on the right track or not.. users/controller: def index @users = User.search(params[:search]) end view/users/index: <% @users.each do |user| %> <%= user.name %> <% if logged_in? %> <% if current_user.following.include?(@user) %> <%= link_to "Edit Relationship", edit_relationship_path(followed_id: @user), class: "btn btn-primary" %> <% else %> <%= link_to "Add Relationship", new_relationship_path(followed_id: @user), class: "btn btn-primary", id: 'add-relationship', data: { followed_id: @user.to_param } %> <% end %> <% end %> <% end %> relationship_controller: def create if params[:relationship] && params[:relationship].has_key?(:followed_id) @followed = User.find(params[:relationship][:followed_id]) # @followed = User.where(name: params[:relationship][:followed_id]).first @relationship = Relationship.request(current_user, @followed) respond_to do |format| if @relationship.new_record? format.html do flash[:danger] = "There was a problem creating that relationship request" redirect_to followed_path(@followed) end format.json { render json: @relationship.to_json, status: :precondition_failed } else format.html do flash[:success] = "Friend request sent" redirect_to followed_path(@followed) end format.json { render json: @relationship.to_json } end end else flash[:danger] = "Friend Required" redirect_to users_path end end relationship.js: $(document).ready(function() { $('#add-relationship').click(function(event) { event.preventDefault(); var addRelationshipBtn = $(this); $…
tagged with: javascript
tagged with: routes
tagged with: ajax
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26727653
tagged with: ruby-on-rails
type: AnsweredQuestion
has title: Uncaught Error: Route parameter missing: id - Javascript console

http://stackoverflow.com/q/26700694
accepted answer: http://stackoverflow.com/a/26700764
type: AnsweredQuestion
has body: I have the following code. <?php $location=$_SERVER['REQUEST_URI']; ?> This code causes an infinite amount of browser refreshes. If I remove the second line, everything works fine. I need to know potential causes for this, as I have no idea where to search. No Javascript is utilizing the variable named location currently.
upvote count: 2
score: 0
downvote count: 2
type: Question
tagged with: javascript
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26700764
tagged with: php
has title: Javascript Variable Getting Assigned by PHP Causing Infinite Refreshes

http://stackoverflow.com/comment/42035856
type: Comment
type: QuestionComment
has text: Check out https://stackoverflow.com/questions/20671619/angularjs-options-preflight-call-preceding-a-http-post-request. Angular sends a preflight OPTIONS request to the server.
score: 0
comment on: http://stackoverflow.com/q/26722808

http://stackoverflow.com/q/26712261
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26712411
upvote count: 1
tagged with: php
type: AnsweredQuestion
score: 1
has body: I've a form which contains a div inside which contains a two textboxes one for service type and another for amount and an add more button. When i click on add more button. The div will get duplicated per onclick. Now I want the values in each amount textbox to be summed up and should be shown in another textbox total. I've created a JS function to show the value entered in amount textbox on onkeyup. But I didn't got any answer. Here is the code what I've tried so far.. HTML Service Type: Amount: Total Amount Javascript: Can anyone tell me the way to take the textbox values even from duplicated div to textbox.
accepted answer: http://stackoverflow.com/a/26712411
type: Question
has comment: http://stackoverflow.com/comment/42015701
has title: Adding the values in multiple textboxes to a single textbox in php
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/41966669
has text: You should define the coordinates as data and then use the usual D3 selection/data matching pattern to create them.
comment on: http://stackoverflow.com/q/26683985
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26755969
has body: You are submitting the form: document.getElementById("abc_session").innerHTML=data; document.fm1.submit(); // Here Don't do that. Extract the data from it and make another Ajax request.
has comment: http://stackoverflow.com/comment/42094830
answers question: http://stackoverflow.com/q/26755895
has comment: http://stackoverflow.com/comment/42102185
accepted answer of: http://stackoverflow.com/q/26755895
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42100932
type: Answer

http://stackoverflow.com/comment/42199627
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26807420
type: AnswerComment
has text: I found it: `var json = Newtonsoft.Json.JsonConvert.SerializeObject(rates)`

http://stackoverflow.com/comment/42176833
score: 0
comment on: http://stackoverflow.com/q/26801585
type: Comment
type: QuestionComment
has text: I am not getting what exactly your requirement is

http://stackoverflow.com/q/26821033
has comment: http://stackoverflow.com/comment/42211676
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42211918
has body: 0 1 2 3 Add 1 1 Add 2 1 2 Add function url_qry_add(e) { e.preventDefault(); alert($(this).closest(".url").index()); }); I've been struggling with getting the index of the li.url position. What am I doing wrong? http://jsfiddle.net/defaye/4a52gsj4/
has comment: http://stackoverflow.com/comment/42211881
has answer: http://stackoverflow.com/a/26821156
has title: Cannot get the index of a parent element in jQuery
has comment: http://stackoverflow.com/comment/42211659
answer count: 1
has comment: http://stackoverflow.com/comment/42211803
accepted answer: http://stackoverflow.com/a/26821156
has comment: http://stackoverflow.com/comment/42211720
favorite count: 0
has comment: http://stackoverflow.com/comment/42211911
score: -3
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42211831
downvote count: 3
has comment: http://stackoverflow.com/comment/42211910

http://stackoverflow.com/comment/42190149
score: 1
comment on: http://stackoverflow.com/a/26808702
type: AnswerComment
type: Comment
has text: See the other answer, you've made the same mistake. That will not work.

http://stackoverflow.com/q/26808143
type: Question
has title: Convert an Array to object with javascript
has comment: http://stackoverflow.com/comment/42189616
has comment: http://stackoverflow.com/comment/42190192
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/4215737
score: 2
has body: I want build a structure like in the image below But I need some help, look how far I did (don't worry about the names, the poblem is the Array) I tryied the solution that I saw in this thread to convert an array to object but, without success, like you can see in the image below. MY CODE for (index = 0; index &lt; result.length; index++) { if (result[index].Parent_Id == 0) { // Remove all white spaces from my Text. var nome = result[index].Texto.replace(/ /g, ''); // Add a new component. newMenu[nome] = { name: result[index].Texto, type: "item" }; } } self.tree_data.push(newMenu); self.treeDataSource2 = new DataSourceTree({ data: self.tree_data }); How can I do a structure like the first image ? The _data in first image is a Object. **
answer count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42189151
has comment: http://stackoverflow.com/comment/42189133

http://stackoverflow.com/comment/42107305
type: QuestionComment
has text: Your `places` object is empty - it doesn't have any members defined.
score: 0
comment on: http://stackoverflow.com/q/26763033
type: Comment

http://stackoverflow.com/comment/41949211
comment on: http://stackoverflow.com/q/26674948
type: Comment
has text: Imagining your scenario is very difficult. Please post some code for quicker help and to avoid downvotes
score: 0
type: QuestionComment

http://stackoverflow.com/a/26738529
answers question: http://stackoverflow.com/q/26738154
type: Answer
upvote count: 1
score: 1
has body: There are a few different approaches. One is to have separate /src (for the source files) and /build (for the minified files) folders inside your /js folder. Another approach is to append .min to the minified files and keep them alongside your source files. A potential downside of these approaches is that you will have to update all references to your JavaScript files in your templates. Lukasz's approach is probably the one I'd recommend, since it requires the least work. Ultimately, it's up to you and your personal preference.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/48068860
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26738154

http://stackoverflow.com/comment/57422082
comment on: http://stackoverflow.com/a/30803878
has text: I was successful with the proxy option when using express, but after migrating to koa and using koa-webpack-dev-derver I had no luck. Any ideas?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26825636
answer count: 2
has comment: http://stackoverflow.com/comment/42219826
tagged with: canvas
upvote count: 1
tagged with: raster
favorite count: 0
possible better answer: http://stackoverflow.com/a/26826132
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26838584
accepted answer: http://stackoverflow.com/a/26838584
has body: How do i reconstruct the image from an array of data in javascript. And display it on my page. the data is not hex or binary but a color value [0-255] black and white, so 8 bits image. Could some one give me show direction on how to rebuild the image from such raster data. I refer native javascript image object. here is a simple snippet of the data. IMAGE {"data":[[9,6,7,7,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,10,9,9,10,9,9,10,9,10,10,10,10,9,9,9,9,9,10,9,9,10,9,10,9,9,9,10,9,9,10,9,9,10,9,9,10,9,9,10,10,10,9,10,9,9,10,10,10,10,10,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,10,10,10,11,10,10,11,10,10,10,10,10,11,11,11,11,11,11,11,10,10,10,10,10,11,11,11,11,11,10,11,10,11,11,10,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,12,12,11,12,11,11,11,12,11,11,12,12,12,11,11,12,12,12,11,12,12,12,12,12,12, Each of them represent each pixel. Thanks
has title: reconstruct image from array javascript
has answer: http://stackoverflow.com/a/26826132
type: Question
tagged with: javascript
tagged with: image
has comment: http://stackoverflow.com/comment/42220269
has comment: http://stackoverflow.com/comment/42220999
has comment: http://stackoverflow.com/comment/42219799

http://stackoverflow.com/q/26736464
answer count: 2
favorite count: 0
tagged with: angularjs
has body: I want to change the scope variable tab to "home" every time the window size got changed. The following code does it well, but for some reason, the view doesn't get updated. $scope.changeTab = function (tab) { $scope.tab = tab; }; angular.element($window).bind('resize', function () { $scope.changeTab('home'); }); {{ tab }}
has answer: http://stackoverflow.com/a/26736540
accepted answer: http://stackoverflow.com/a/26736540
upvote count: 4
possible better answer: http://stackoverflow.com/a/27999779
type: AnsweredQuestion
has title: Angular.js - View doesn't update when changing a scope variable in resize event
downvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/42059164
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/27999779

http://stackoverflow.com/q/26764886
tagged with: javascript
favorite count: 0
tagged with: angularjs
tagged with: sinon
accepted answer: http://stackoverflow.com/a/26765548
has body: I'm new to Mocha but I read they support promises now but I can't seem to find any documentation that solves my problem. I have an authenticate method that returns a promise. In my test I need to wait till that gets done in order to pass/fail it. Here is my Authenticate factory: (function() { 'use strict'; angular.module('app.authentication').factory('authentication', authentication); /* @ngInject */ function authentication($window, $q, $location, authenticationData, Session) { var authService = { authenticate: authenticate }; return authService; function authenticate() { var token = authenticationData.getToken(); var deferral = $q.defer(); if (!Session.userId &amp;&amp; token) { authenticationData.getUser(token).then(function(results) { Session.create(results.id, results.userName, results.role); deferral.resolve(); }); } else{ deferral.resolve(); } return deferral.promise; }......... Here is my Test: describe('authentication', function() { beforeEach(function() { module('app', specHelper.fakeLogger); specHelper.injector(function($q, authentication, authenticationData, Session) {}); }); beforeEach(function() { sinon.stub(authenticationData, 'getUser', function(token) { var deferred = $q.defer(); deferred.resolve(mockData.getMockUser()); return deferred.promise; }); }); describe('authenticate', function() { it('should create Session with userName of TestBob', function() { authentication.authenticate().then(function(){ console.log('is this right?'); expect(Session.userName).to.equal('TesaatBob'); }, function(){console.log('asdfasdf');}); }); }); }); When I run this, the test passes because it never makes it inside the promise and never hits the expect. If I put "return authenication.authenticate ...." then it errors with a timeout. Thank you
has comment: http://stackoverflow.com/comment/42111480
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/26765548
has comment: http://stackoverflow.com/comment/42111516
has title: Test method call that returns a promise with mocha
type: Question
score: 1
tagged with: mocha.js
has comment: http://stackoverflow.com/comment/42110959
has comment: http://stackoverflow.com/comment/42112049
upvote count: 1
answer count: 1

http://stackoverflow.com/q/26690021
upvote count: 1
type: Question
tagged with: api
answer count: 1
downvote count: 5
tagged with: javascript
tagged with: photoshop
tagged with: wunderground
favorite count: 0
has answer: http://stackoverflow.com/a/26717860
has title: API integration with Photoshop
has comment: http://stackoverflow.com/comment/41976868
has body: I have a basic idea of Photoshop scripting via Javascript.. I want to use data from http://www.wunderground.com (Api) in my photoshop script. But have no idea how to request(access) these data.
type: UnansweredQuestion
score: -4

http://stackoverflow.com/a/26797020
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/42168943
answers question: http://stackoverflow.com/q/26796873
has comment: http://stackoverflow.com/comment/42168545
has comment: http://stackoverflow.com/comment/42168588
has comment: http://stackoverflow.com/comment/42204423
has body: You could iterate over all items in the global scope like this: var test = 123, someVar = 812; for(key in window){ if(typeof window[key] === 'number' &amp;&amp; window[key] == 123){ console.log(key, window[key]); } } Combine that with some recursion, and you could theoretically iterate over all objects and their children, available in a object: function searchObject(object, search){ for(key in object){ if(typeof object[key] === 'number' || typeof object[key] === 'string'){ if(object[key] === search){ console.log(key, window[key]); } }else if(typeof object[key] === 'object'){ searchObject(object[key], search); } } } This is just a quick and dirty example. It only checks for strict equality (So no "string contains"), and it iterates over arrays with for in, which is evil. But it should give you an idea of how it works. Don't pass window or document to this function, though. That won't work due to circular references. However, you can also place a breakpoint in your code in the chrome dev tools. You can then inspect the current value of your variables in the "Scope Variables" area on the right.
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/42168568
has comment: http://stackoverflow.com/comment/42169213

http://stackoverflow.com/comment/42173226
comment on: http://stackoverflow.com/a/26798167
type: AnswerComment
has text: Then the code shouldn't break, unless you have used same ID in panel and somewhere else ;)
score: 0
type: Comment

http://stackoverflow.com/a/70578560
score: -1
upvote count: 0
answers question: http://stackoverflow.com/q/26749790
type: Answer
downvote count: 1
has comment: http://stackoverflow.com/comment/137774363
has body: Why not usign just class with constructor - you will have required properties then

http://stackoverflow.com/comment/42100541
has text: Excellent answer. For clarification and to ensure this format works even if other types of controls are added to the page, should you add "[input type='checkbox']" to your selector?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26759621
type: Comment

http://stackoverflow.com/comment/42029578
type: Comment
type: QuestionComment
has text: Which chart are you trying to make? Not all support custom tooltips
score: 0
comment on: http://stackoverflow.com/q/26719439

http://stackoverflow.com/q/26807087
downvote count: 0
has comment: http://stackoverflow.com/comment/42187598
favorite count: 0
has answer: http://stackoverflow.com/a/26808930
tagged with: angularjs
linked to: http://stackoverflow.com/q/26809100
has answer: http://stackoverflow.com/a/26807376
accepted answer: http://stackoverflow.com/a/26808930
has comment: http://stackoverflow.com/comment/42187305
type: AnsweredQuestion
has body: I'm trying to format addresses that have components missing, like {{name}}&lt;br/&gt; {{street}}&lt;br/&gt; {{cityStateZip}}&lt;br/&gt; Edit - my "street" expression might actually look like this: {{address.number}} {{address.street}} {{address.apartment}}&lt;br ng-show="address.number &amp;&amp; address.number.trim().length&gt;0 &amp;&amp; address.street &amp;&amp; address.street.trim().length &gt; 0" and so on. Some of the address components are optional, like some addresses won't have a street. For those, I don't want a line break. I think I can do this: {{street}}&lt;br ng-show="street.length == 0"/&gt; but, the expression for street might be more complex (like number and street) and it might be undefined or it might be an empty string. As a result, all those ng-show expressions will become long and redundant. So what I'd really like is a show expression that refers to the tag's contents, like: &lt;span ng-show="thisTagsContents.length&gt;0"&gt;{{some expression}}&lt;br/&gt;&lt;span&gt; ...where, if it existed, "thisTagsContents" is equivalent to the rendered output of "some expression". Do I have to make my own directive for this, or is there something already in angular to help? Or maybe I'm thinking about it the wrong way altogether? Thanks.
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42187233
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26807186
has comment: http://stackoverflow.com/comment/42187407
has title: Angular ng-show expression refers to html content
answer count: 3
has answer: http://stackoverflow.com/a/26807186

http://stackoverflow.com/comment/42183418
comment on: http://stackoverflow.com/q/26805167
score: 0
type: Comment
type: QuestionComment
has text: try `var outputString = projectYears(inputInvestment, inputInterest, inputYears); `

http://stackoverflow.com/comment/42081088
type: QuestionComment
has text: So you have a component that you are including in another project. This component contains templates that use a relative URL?
comment on: http://stackoverflow.com/q/26748209
score: 0
type: Comment

http://stackoverflow.com/comment/42036914
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26723324
score: 0
has text: you are right!! you should have posted this as an answer! here is a fiddle with this great work they have done http://jsfiddle.net/6mohu2vk/ Thanks!

http://stackoverflow.com/comment/42159207
type: AnswerComment
comment on: http://stackoverflow.com/a/26791518
type: Comment
has text: Equivalently, you could use `var lonRegex = /^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/;`.
score: 0

http://stackoverflow.com/a/26817555
answers question: http://stackoverflow.com/q/26817472
has comment: http://stackoverflow.com/comment/42206441
has comment: http://stackoverflow.com/comment/42206415
score: 0
type: Answer
has body: Try like this
has comment: http://stackoverflow.com/comment/42206390

http://stackoverflow.com/q/26818671
has answer: http://stackoverflow.com/a/26820920
downvote count: 3
has answer: http://stackoverflow.com/a/26818762
has body: I want to perform merging and comparing objects inside in the JSON. StudentJson:[ { name : "harish", empid: "323234", exams: "central" }, { name : "harish", empid: "323234", week41: "30", week42: "20", }, { name : "harish", empid: "323234", week47: "47", week50: "86", }, { name : "harish", empid: "323234", week51: "67", week52: "90", }, { name : "kishore", empid: "783433", exams: "state" }, { name : "kishore", empid: "783433", week20: "23", week23: "56", }, { name : "kishore", empid: "323234", week30: "75", week38: "73", }, { name : "kishore", empid: "323234", week40: "23", week41: "86", },... ] Expected Json output: StudentJson:[ { name : "harish", empid: "323234", exams: "central", week41: "30", week42: "20", week47: "47", week50: "86", week51: "67", week52: "90" }, { name : "kishore", empid: "783433", exams: "state", week20: "23", week23: "56", week30: "75", week38: "73", week40: "23", week41: "86" } ] Kindly help me to implement in basic JavaScript program.
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26818762
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42207334
has title: Merge and compare with in JSON objects
accepted answer: http://stackoverflow.com/a/26820920
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
score: -3
type: AnsweredQuestion
tagged with: object
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/26746482
has answer: http://stackoverflow.com/a/26747117
has body: I have a view for my app-header and view for body content ng-view. Basically I have a ng-model input in the profile body and when that is loaded up, I want to bind it to something in the header. If the ng-model and the binding are in the same view I have no problem, but not sure how to get the binding to go across scopes: &lt;!-- Main Nav --&gt; &lt;app-header&gt;&lt;/app-header&gt; &lt;div class="content_container"&gt; &lt;!-- angular templating content will be injected here --&gt; &lt;div ng-view&gt;&lt;/div&gt; &lt;/div&gt; Input in profile component &lt;input ng-model="profile_name" type="text" id="profile_first_name" name="profile_first_name"/&gt; Header &lt;div class="user_badge"&gt;{{profile_name}}&lt;/div&gt; Header Directive // Directive for Header app.directive('appHeader', function () { // Type of Directive, E for element, A for Attribute // url of a template return { restrict: 'E', templateUrl: 'shared/navigation/header.html' }; }); ProfileController // Controller for Profile app.controller('ProfileController', function() { }); // Controller for Complete Registration app.controller('CompleteRegistrationController', function() { }); // configure our routes app.config(['$routeProvider', function($routeProvider) { $routeProvider // route : Edit Profile .when('/profile', { title : 'Edit Profile', templateUrl : 'components/profile/edit-profile.html', controller : 'ProfileController' }); }]);
type: AnsweredQuestion
score: 1
favorite count: 0
tagged with: angularjs
type: Question
has title: How to use ng-model / bind in different views?
has comment: http://stackoverflow.com/comment/42078333
answer count: 1
accepted answer: http://stackoverflow.com/a/26747117
tagged with: angular-ngmodel
upvote count: 1
has comment: http://stackoverflow.com/comment/42079224
downvote count: 0
has comment: http://stackoverflow.com/comment/42080905
tagged with: javascript

http://stackoverflow.com/comment/42174353
has text: I suspect you're calling `add()` from a function defined prior to the variable declaration. Please show us where you call `add()`.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26800418

http://stackoverflow.com/a/26734819
has comment: http://stackoverflow.com/comment/42168546
has comment: http://stackoverflow.com/comment/42082441
has comment: http://stackoverflow.com/comment/42099446
upvote count: 1
type: AcceptedAnswer
has body: There is nothing to be gained by hiding "how" the data is encrypted, that is the method, encryption type, key size or iv. One does not improve encryption by hiding how it is done. The security is in a good encryption key, securing the key and using the encryption primitives in a secure manner. For starters choose AES in CBC mode with a good iv. Do not use a password as the key, either use a random bit-string or run a password through PBKDF2 to generate the key. One challenge with encryption in javascript is protecting the key, in a native app it can be kept in the Keychain. If you are serious about the security get a cryptographic domain expert to create the secure portion of the code or at a minimum to review the methods and code.
has comment: http://stackoverflow.com/comment/42099306
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26731728
answers question: http://stackoverflow.com/q/26731728

http://stackoverflow.com/q/26728671
has title: Javascript - .innerHTML changes auto close tags
score: 11
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
upvote count: 11
favorite count: 0
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/26728777
has body: I'm trying to put elements inside other elements dynamically using Javascript without refreshing the page, the AJAX part of it works and is functional. However for some unknown reason my code closes automatically. Here is a snippet of the code, and you can see that it's no actually closed. But after running the code in a browser it is closed HTML Javascript Get = document.getElementById("Events"); Get.innerHTML = " "; Get.innerHTML = Get.innerHTML + " "; The results on the page source are: As you can see, this is a problem as I am trying to put elements inside elements. However I can't due to the closing tags. I've search for a few hours and can't find a solution or even a cause to this. There is NO closing tags, yet it is closed automatically. Is there a way to override this? Or bypass it?
has comment: http://stackoverflow.com/comment/42045592
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26728777

http://stackoverflow.com/comment/42022756
type: QuestionComment
has text: Check the network tab of your browser's dev tools to see what the response looks like.
comment on: http://stackoverflow.com/q/26716274
score: 0
type: Comment

http://stackoverflow.com/comment/42034418
has text: Made the typo changes to no avail. Still fails.
score: 0
comment on: http://stackoverflow.com/q/26722232
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26750597
answer count: 2
accepted answer: http://stackoverflow.com/a/26755985
tagged with: highcharts
downvote count: 0
has answer: http://stackoverflow.com/a/26753141
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26753141
has body: I am using highcharts and I want to fix the scale to 0-100 instead of auto scaling. Here is my JSfiddle and in this scenario I am using two text fields to justify my requirement. Any help!! My HTML: change! Script Code: $(function () { $('#container').highcharts({ xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, yAxis: { title: { text: 'Temperature' }, id: 'my_y', lineWidth: 2, lineColor: '#F33' }, plotOptions: { line: { dataLabels: { enabled: true, formatter:function() { var pcnt = (this.y); return Highcharts.numberFormat(pcnt,1) + '%'; } }, enableMouseTracking: false } }, series: [{ name: 'Temperature', data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6], color: '#F33' }] }); // the button handlera var chart = $('#container').highcharts(); var yAxis = chart.get('my_y'); var extremes = yAxis.getExtremes(); $('#min').attr('value', extremes.min); $('#max').attr('value', extremes.max); $('#change').click(function() { yAxis.setExtremes($('#min').val(),$('#max').val()); console.info(yAxis) }); }); And Here is My JSFiddle: http://jsfiddle.net/Wm7ft/
favorite count: 0
upvote count: 1
type: AnsweredQuestion
has title: stop auto adjusting scale in highcharts
score: 1
has answer: http://stackoverflow.com/a/26755985
type: Question

http://stackoverflow.com/comment/42229023
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26830389
type: AnswerComment
has text: I don't catch this $($(this).data('target')).fadeIn(); it says that somethings fades in, but i dont know how to point on this

http://stackoverflow.com/q/26772493
has answer: http://stackoverflow.com/a/26773028
type: Question
tagged with: javascript
has title: Webapp clientside architecture in Javascript
tagged with: jquery
score: 0
answer count: 1
has body: I am looking for some sample client side structure. Do professional web developers follow some client side architecture design ? Are there function diagrams , class diagrams , flow diagrams ? These all are not required for building a small website but required when building a HUGE webapp where many modules are communicating with each other. I am building a webapp where client side would use Angularjs/RequireJs/Bootstrap/some Jquery plugins which has 5-7 independent modules. I am not able to figure out how all should be designed well to work together. Any ideas what methodologies do large software companies like Google or Apple follow for the same ? Can someone give a direction that i should be following when architecting/designing a webapp
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: architecture

http://stackoverflow.com/a/26746594
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26721818
has body: Here's my suggestion: Don't replace # (i.e. do replace(/[^0-9#]/g, '')), because otherwise you couldn't detect if the 11th character is the country code or an extension. You can then use the position of the # to determine the length of the actual number (without extension), i.e., telephone_user.search("#") You can then conditionally format the phone number based on #2, e.g. if it's the 12th digit, format telephone_user with the country code. Also, with the switch-case, I would just do the 3-4 valid cases, and default on everything else.

http://stackoverflow.com/q/26762033
has body: I have nested arrays that contain objects, and I am experiencing a really strange problem. The object value I am trying to retrieve is returning "undefined" even though I can see it in the Firefox debugger. This is my code: angular.forEach(pages, function(page, pageIndex){ angular.forEach(page, function(controlObject,controlObjectIndex){ /* GET THE KEY OF THE OBJECT */ var keys = []; for(var k in controlObject) keys.push(k); console.log("CONTROL: "+keys+" VALUE: "+controlObject.value); // THIS OUTPUTS: CONTROL: 01 VALUE: undefined }); }); I have search for other people experiencing this problem, and all the quesiton I could found were caused by an AJAX request not completing before trying to access the object, but I do not have any AJAX requests in my code. I would really appreciate any suggestions! TIA!
has comment: http://stackoverflow.com/comment/42105600
score: 0
has comment: http://stackoverflow.com/comment/42105628
duplicate of: http://stackoverflow.com/q/11922383
tagged with: arrays
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42110467
answer count: 0
has title: Object parameter undefined even though shows in console
has comment: http://stackoverflow.com/comment/42105725
type: Question
has comment: http://stackoverflow.com/comment/42105986
tagged with: javascript-objects

http://stackoverflow.com/comment/42081070
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26747852
has text: Turns out, I downloaded the complete source by going to the share => export as .zip, and what do you know aside from a css issue, the javascript is functioning just as wanted without any modifications. I guess it may not be my code causing this?
score: 0

http://stackoverflow.com/a/26717353
answers question: http://stackoverflow.com/q/26717228
downvote count: 2
type: Answer
score: 6
has body: You can do this var url = ""; array.forEach(function(e){ url += e.name + "=" + e.value + "&amp;"; }); url = url.trim("&amp;");
accepted answer of: http://stackoverflow.com/q/26717228
type: AcceptedAnswer
upvote count: 8

http://stackoverflow.com/comment/42176432
score: 0
comment on: http://stackoverflow.com/q/26800626
type: Comment
type: QuestionComment
has text: @user1835565 On Firefox 33.0.2

http://stackoverflow.com/q/26721893
tagged with: javascript
tagged with: base64
has answer: http://stackoverflow.com/a/26767858
answer count: 2
has body: My app imports all the messages from the Notes folder of GMail. I use imap npm module for that. Using the example from their github page I get all the contents of a message into a buffer: stream.on('data', function(chunk) { count += chunk.length; buffer += chunk.toString('utf8'); }); However, what I get are sentences like 0KHQvdCw0YfQsNC70LAg0YHQvtC30LTQsNC10YLRgdGPINGA0LXRiNC10YLQutCwINC/0YDQvtGB 0YLRgNCw0L3RgdGC0LLQsCDQstC+0L7QsdGA0LDQttC10L3QuNGPLiZuYnNwOzxkaXY+PGJyPjwv ZGl2PjxkaXY+0JfQsNGC0LXQvCDQvdCwI (wrong conversion from Russian) I found out that these are the snippets of text encoded in base64 and in order to read them I need to convert it from base64 to utf8. There is also sometimes an annoying = character that appears from nowhere... letting them f= all on her shoulders Do you know how I could get rid of those two problems? Thank you!
downvote count: 0
tagged with: utf-8
possible better answer: http://stackoverflow.com/a/40929309
favorite count: 0
has comment: http://stackoverflow.com/comment/42074738
upvote count: 16
tagged with: node.js
has comment: http://stackoverflow.com/comment/42034704
type: AnsweredQuestion
score: 16
has answer: http://stackoverflow.com/a/40929309
type: Question
has comment: http://stackoverflow.com/comment/42035011
has title: Convert buffer base64 -> utf8 encoding node.js
accepted answer: http://stackoverflow.com/a/26767858
tagged with: encoding
has comment: http://stackoverflow.com/comment/42034984

http://stackoverflow.com/q/26807899
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26808014
tagged with: javascript
has comment: http://stackoverflow.com/comment/42188881
score: 0
has answer: http://stackoverflow.com/a/26809046
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42189114
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42188734
has title: Calling same function on both mouse click and key press using html and javascript
has body: I want to call the same function in javascript either on mouse click or keypress(enter).This is my code in html but it is not working..how can i do it.? <p >C and this is my js code: function Cfunc() { var audio = document.getElementById("Caudio") audio.play(); }

http://stackoverflow.com/q/26815602
answer count: 2
tagged with: ruby-on-rails
score: 0
has title: jQuery Ajax Post in development Get in production
has body: I have a huge annoyance that I can't figure out . My Rails app issues a jQuery post request that works great in development , but turns into a Get in production . The assets seem to precompile correctly , I can actually beautify the production js code and find the exact ajax code (the same code I have in development..) //my js $(document).on("click", ".create-candidate-submit", function (e, data) { urlToPost = DOMAIN_NAME + "stories/" + e.currentTarget.id + "/" + "candidates/"; console.log("urlToPost", urlToPost); $.ajax({ type: "POST", url: urlToPost, data: {"candidate": { "text": $("#createNewCandidate").val(), "story_id": e.currentTarget.id } }, dataType: "script", success: function (res) { console.log("success called..", res); // eval(res); } }); }); //erb <%= form_for [@story,@candidate],remote: true, html: {:role=>"form"} do |f|%> create story <%=f.text_field :text,{:class=>"form-control",:id=>"createNewCandidate",:size=>30}%> <%=f.hidden_field :story_id%> <%=f.hidden_field :user_id %> <div class="btn btn-primary create-candidate-submit" id="<%=@story.id%>">שלח <%end%> applicaiton.js.erb //= require jquery //= require jquery_ujs //= require twitter/bootstrap //= require turbolinks //= require css_settings.js.erb //= require_tree . Something is going wrong on production and I can't for my life of me figure it out .. please help!
has answer: http://stackoverflow.com/a/26815909
has answer: http://stackoverflow.com/a/26821523
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: ruby
type: Question

http://stackoverflow.com/comment/42151057
score: 0
comment on: http://stackoverflow.com/q/26787048
has text: ?? JQuery is supposed to take care of that. When you declare $(id).autocomplete{}, it takes care of calling the optional functions contained in autocomplete for you...
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41981650
type: AnswerComment
score: 0
type: Comment
has text: Hi Tens, Cheers for the reply. Looking in the console shows "http://nightline.co.uk/procedures/DF_Bristol/ClientCalls/DF_Bristol-Bookings.php?branchGet=DF_Bristol" If I use that address and load the page directly everything works. If I do it through my site it fails. I have added, to the main question, the only other piece of code that interacts with the div in question. Hope this helps.
comment on: http://stackoverflow.com/a/26692408

http://stackoverflow.com/comment/42184279
has text: I'm having trouble with what to put inside of those functions
comment on: http://stackoverflow.com/q/26805378
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26739354
has comment: http://stackoverflow.com/comment/42065057
has comment: http://stackoverflow.com/comment/42066805
tagged with: django
upvote count: 1
tagged with: tastypie
linked to: http://stackoverflow.com/q/12623284
type: AnsweredQuestion
tagged with: underscore.js
score: 1
has answer: http://stackoverflow.com/a/26740009
type: Question
has title: cannot populate backbone collection from backbone.js tutorial
answer count: 1
downvote count: 0
tagged with: javascript
has body: I am working my way through the backbone tutorial here: http://backbonetutorials.com/ I am using django + tastypie for the restful api and backbone + underscore as the tutorial suggests for the frontend. However, I am unable to loop through the collection of users that I fetch. Here is my code (in a django template): {% extends "my_app/base_template.html" %} {% block scripts %} {% endblock %} {# /scripts #} {% block content %} {% endblock %} {# /content #} And I can confirm that going to "my_domain/api/q/user/" returns the correct content (2 users: the admin and another user "bob"): { "meta": { "limit": 20, "next": null, "offset": 0, "previous": null, "total_count": 2 }, "objects": [ { "date_joined": "2014-11-04T04:28:17", "email": "bob@bob.com", "first_name": "Bob", "id": 2, "is_active": true, "is_staff": false, "is_superuser": false, "last_login": "2014-11-04T05:13:46.908539", "last_name": "Bobbington", "password" : "some hash", "resource_uri": "/api/q/user/2/", "username": "bob" }, { "date_joined": "2014-11-03T13:44:04.356967", "email": "admin@domain.com", "first_name": "", "id": 1, "is_active": true, "is_staff": true, "is_superuser": true, "last_login": "2014-11-04T06:06:51.336317", "last_name": "", "password": "some_hash", "resource_uri": "/api/q/user/1/", "username": "admin" }] } So, what am I doing wrong? Should I be passing something other than {{{users.models}} to the template? Am I looping through that stucture incorrectly? Thanks.
favorite count: 0
has comment: http://stackoverflow.com/comment/42065565
accepted answer: http://stackoverflow.com/a/26740009
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/42065463

http://stackoverflow.com/a/26717807
answers question: http://stackoverflow.com/q/26717537
has comment: http://stackoverflow.com/comment/42075398
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42060702
has comment: http://stackoverflow.com/comment/42047207
has comment: http://stackoverflow.com/comment/42075423
has body: How do you want to submit the form, using ajax? If you want to use ajax, you should cancel the default action like you do with your links using e.preventDefault();. Post the javascript that handles the form submit if you need help with that. If you want to post to page-one.php without using ajax, you could add a header() redirect after the php code that processes the form to redirect to the page that you would like to show after the form gets submitted.
has comment: http://stackoverflow.com/comment/42075373
has comment: http://stackoverflow.com/comment/42047627

http://stackoverflow.com/q/26738493
has comment: http://stackoverflow.com/comment/42091568
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jasmine
has comment: http://stackoverflow.com/comment/42091709
has answer: http://stackoverflow.com/a/27293519
has comment: http://stackoverflow.com/comment/42091436
favorite count: 0
tagged with: karma-runner
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42097528
score: 3
upvote count: 3
has body: So this one is driving me crazy, whenever i try to inject $location to one of my tests i get the following error: TypeError: undefined is not a function at $LocationProvider.$get (bower_components/angular/angular.js:11053:34) at Object.invoke (bower_components/angular/angular.js:4118:17) at bower_components/angular/angular.js:3936:37 at getService (bower_components/angular/angular.js:4077:39) at Object.invoke (bower_components/angular/angular.js:4109:13) at Object.workFn (bower_components/angular-mocks/angular-mocks.js:2159:20) Error: Declaration Location at window.inject.angular.mock.inject (bower_components/angular-mocks/angular-mocks.js:2144:25) at Suite.&lt;anonymous&gt; (test/unit/controllers/DashboardCtrlSpec.js:8:16) at jasmineInterface.describe (/usr/local/lib/node_modules/karma-jasmine/lib/boot.js:59:18) at test/unit/controllers/DashboardCtrlSpec.js:1:1 karma.conf.js: module.exports = function (config) { config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) basePath: '../', // frameworks to use // available frameworks: https://npmjs.org/browse/keyword/karma-adapter frameworks: ['jasmine'], // list of files / patterns to load in the browser files: [ 'bower_components/angular/angular.js', 'bower_components/angular-mocks/angular-mocks.js', 'bower_components/angular-bootstrap/ui-bootstrap.js', 'bower_components/angular-sanitize/angular-sanitize.js', 'bower_components/angular-translate/angular-translate.js', 'bower_components/angular-translate-loader-static-files/angular-translate-loader-static-files.js', 'bower_components/dist/assets.angular.max.js', 'scripts/**/*.js', 'test/**/*.js' ], // list of files to exclude exclude: [ '**/*.swp' ], // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: {}, // test results reporter to use // possible values: 'dots', 'progress' // available reporters: https://npmjs.org/browse/keyword/ka…
has title: AngularJS test - inject $location causes error

http://stackoverflow.com/q/26737287
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42064376
has answer: http://stackoverflow.com/a/26739525
tagged with: yeoman
has body: I'm new to Yeoman, Grunt and Bower and of course I have some trouble when building a distribution. I used Yeoman to scaffold a webapp, built the code, added an external plugin (not through bower, there was no package for that plugin, so I just copied the plugin folder and added the references in my index.html) When running grunt serve everything works fine, the first time I built the distribution with grunt I had back a lot of jshint errors about that external plugin (missing semicolons etc...small things), so I just had to run grunt --force to have my dist built. In the dist folder, the external plugin folder and files were missing, so in the build process that folder was removed (but the index.html file had all the references to the files). So with grunt serve:dist I had my dist on the browser, but without the plugin. At this point I copied the plugin folder in the correct spot of the dist folder, reloaded the page, and the plugin was working. Then killed the process, and I run again grunt serve:dist After this command, the plugin folder (that I manually copied) just disappeared, so I realize that the copy and paste is not the right way to make things working. How can I tell grunt (or bower) to leave that folder (inside the js folder) in the same spot, not try to compress the files inside, ignore js validation with jshint, and not to remove it? What if I want to add a new folder (called for example jsons) in the root folder? When building a distribution will be removed too? Is there a spot where I can tell grunt what folder to include/ignore? Thanks ---- EDIT ---- This is my "copy" task in Gruntfile.js copy: { dist: { files: [{ expand: true, dot: true, cwd: '&lt;%= config.app %&gt;', dest: '&lt;%= config.dist %&gt;', src: [ '*.{ico,png,txt}', 'images/{,*/}*.webp', '{,*/}*.html', 'styles/fonts/{,*/}*.*' ] }, { src: 'node_modules/apache-server-configs/dist/.htaccess', dest: '&lt;%= config.dist %&gt;/.htaccess' }] }, styles: { expand: true, dot: true, cwd: '&lt;%= co…
accepted answer: http://stackoverflow.com/a/26739525
has comment: http://stackoverflow.com/comment/42064926
tagged with: bower
type: AnsweredQuestion
tagged with: gruntjs
has title: Grunt - plugin folder disapper after build dist
type: Question
has comment: http://stackoverflow.com/comment/42064543
answer count: 1

http://stackoverflow.com/a/26813340
has comment: http://stackoverflow.com/comment/42206167
downvote count: 0
type: Answer
has body: &lt;script&gt; function alertTooMany() { var row = document.getElementById('row'); // Get Row var cols = row.getElementsByTagName('td'); // Get Columns in row // Iterating through columns for (var i = 0; i &lt; cols.length; i++) { var col = cols[i]; var divs = col.getElementsByTagName('div'); // Get Div in column var num = divs.length; // count DIV tags // prepare and display message if (num &lt; 2) { // If number of divs is less than 2 msg = "Column Open"; } else if (num &gt; 2){ // If number of divs is greater than 2 msg = "Warn: Column overfull!"; // Finding header with same index as overfull column var headers = document.querySelectorAll('th'); var matchingHeader = headers[i]; if (matchingHeader) { matchingHeader.style['color'] = 'red'; } col.style['color'] = 'red'; } else { // If number of divs is 2 msg = "Column Full"; } document.getElementById('message').innerHTML = msg; } } alertTooMany(); &lt;/script&gt;
upvote count: 1
answers question: http://stackoverflow.com/q/26813197
score: 1

http://stackoverflow.com/q/26828800
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26829185
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42225410
favorite count: 0
has title: Getting data that is stored in several HTML elements
has comment: http://stackoverflow.com/comment/42225713
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42225352
score: 2
upvote count: 2
tagged with: php
has answer: http://stackoverflow.com/a/26829185
type: Question
type: AnsweredQuestion
has body: Let's say I have like 10 spans at the beginning of page's body with a structure like this: (Just to reach it easier with Jquery, didn't know how to pass an array with JSON) &lt;span class="nike" data-img="logos/nike_logo.png" data-id="10"&gt;&lt;/span&gt; EDIT!: The spans can be changed into anything else, inputs etc. and the structure can be changed, only need to reach the img url and the id Now, there's a Javascript function that goes through an array of words, and prints them out (search/suggestion/typeahead kind of thing). Example of the function: function suggestionTemplate(context) { switch(displayFn(context)) { case "nike": return "&lt;p style='background-image:url(logos/nike_logo.png);'&gt;" + displayFn(context) + "&lt;/p&gt;"; break; case "spalding": return "&lt;p style='background-image:url(logos/spalding_logo.png);'&gt;" + displayFn(context) + "&lt;/p&gt;"; break; default: return "&lt;p&gt;" + displayFn(context) + "&lt;/p&gt;"; } } So the question, how can I make this function get all the span class names (or it can be data-name etc.), and then when displayFn(context) == one of the span's class names return the &lt;p&gt; element with that span's data-img ? Please tell me if it's too hard to understand. I'm just making kind of an experiment and would like to know if this is possible to do.
tagged with: typeahead.js

http://stackoverflow.com/q/26792881
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/26793062
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42161149
has body: I'm trying to show/hide tabs on click using just Javascript but I'm getting errors ("Uncaught TypeError: Cannot set property 'className' of undefined tabs.(anonymous function).onclick"). Can someone give me an idea of what the issue might be? One Two Three This is panel one. This is panel two. This is panel three.
answer count: 3
possible better answer: http://stackoverflow.com/a/26793099
downvote count: 0
has answer: http://stackoverflow.com/a/26793099
has title: Showing/Hiding Divs with Javascript on click
favorite count: 0
has answer: http://stackoverflow.com/a/26793062
has answer: http://stackoverflow.com/a/26793149
type: AnsweredQuestion

http://stackoverflow.com/a/26721101
has comment: http://stackoverflow.com/comment/42033809
has comment: http://stackoverflow.com/comment/42032212
has body: You're calling getSomething() on the constructor, not the object. It doesn't look like you ever actually instantiate InnerObject, actually. If InnerObject is supposed to point to whatever this function returns (instead of to the actual function), then you need to make InnerObject into an immediately-invoked function expression (IIFE), like so: function MainObject() { var id; ... var InnerObject = (function() { this.getSomething = function() { ... } }()); this.testFunc = function() { id = setTimeout(InnerObject.getSomething(), 1000); } } Now InnerObject points to the result of calling the function you wrote, which will have a this.getSomething member that you can see in the constructor (but nowhere else, since InnerObject is still just a variable inside the constructor). The catch here is that because I used an IIFE, InnerObject only gets instantiated once. If you need to instantiate several of them from the same constructor, then you need to keep a handle around. You can still do this while being private, however. One possibility might look like: function MainObject() { var id; ... function InnerObject() { this.getSomething = function() { ... } }; var inner1 = new InnerObject(), inner2 = new InnerObject(), inner3 = new InnerObject(); this.testFunc = function() { id = setTimeout(inner1.getSomething(), 1000); } } inner1, inner2, and inner3 are all still private, as is the InnerObject constructor. I just picked one for this.testFunc to work on.
score: 0
answers question: http://stackoverflow.com/q/26720531
type: Answer

http://stackoverflow.com/a/26763540
score: 2
upvote count: 2
has body: You can use a recursive function that iterates through your tree and any sort of sorting algorithm to sort them. recursiveSortByLabel(arr); //arr = the array with your tree data function recursiveSortByLabel(obj){ if(obj.length &gt; 0){ for(var i in obj){ if(obj[i].children.length &gt; 0) recursiveSortByLabel(obj[i].children); sortAlgorithm(obj); //any sorting algorithm } } } In this fiddle i did it with the rather unefficient but easy to implement bubblesort algorithm. It logs the result to the console for inspectation.
answers question: http://stackoverflow.com/q/26763111
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26763111
type: Answer

http://stackoverflow.com/comment/42071492
type: Comment
has text: what isn't working? The ID assignment or the selector? Try (inside your for loop) $("#summaryBody").rows[i].cells[6].prop("id", "test" + i.toString());
comment on: http://stackoverflow.com/a/26742411
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42075511
type: QuestionComment
has text: If it's resolving then it's not Angular. Check the response from the server by hitting the API endpoint directly in the browser.
comment on: http://stackoverflow.com/q/26744979
score: 0
type: Comment

http://stackoverflow.com/a/26788254
downvote count: 0
score: 1
upvote count: 1
has body: You need to access the Template Instance to get the parent name. &lt;template name="parent"&gt; {{&gt; child }} &lt;/template&gt; &lt;template name="child"&gt; &lt;p&gt; My father is &lt;b&gt;{{ fatherTemplate abc=23 }}&lt;/b&gt; &lt;/p&gt; &lt;/template&gt; Template.child.helpers({ 'fatherTemplate' : function(){ return UI._templateInstance().view.parentView.name; } }); Template.child.rendered = function(){ console.log("Father Template name: ", this.view.parentView.name); }
type: Answer
has comment: http://stackoverflow.com/comment/42153200
answers question: http://stackoverflow.com/q/26787217
has comment: http://stackoverflow.com/comment/42157742

http://stackoverflow.com/a/26690199
answers question: http://stackoverflow.com/q/26690052
upvote count: 1
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41977838
has comment: http://stackoverflow.com/comment/41977213
score: 1
has body: Try this. Ajax Example Contenu du fichier PHP <?php $passeword = trim($_POST["passeword1"]); $verif_passeword =trim($_POST["passeword2"]); if ($passeword==$verif_passeword) { $nbre = strlen($passeword); if ($nbre>=1 && $nbre<=7) echo "Mot de passe faible"; else if ($nbre>7 && $nbre<=12) echo "Mot de passe moyen"; else if ($nbre > 12) echo "Mot de passe complexe"; } else { echo "Passowrds didn't match!"; } ?> Note : I recommend you to use JavaScript library jQuery to take advantage of built-in ajax functionalities than writing lengthy JavaScript Native Code.
has comment: http://stackoverflow.com/comment/41978332
has comment: http://stackoverflow.com/comment/41977536
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41977383
has comment: http://stackoverflow.com/comment/41977704
accepted answer of: http://stackoverflow.com/q/26690052
has comment: http://stackoverflow.com/comment/41977732
has comment: http://stackoverflow.com/comment/41977597

http://stackoverflow.com/a/26723202
type: Answer
answers question: http://stackoverflow.com/q/26722774
has comment: http://stackoverflow.com/comment/42036235
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26722774
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42036173
has body: fiddle In order to make this work I did a couple of things:- 1 CSS .child { width: 40px; height: 40px; display: block; //inline block results in jerkiness when inserting items margin:2px; //added margin to compensate for inline-block becoming block. border: 1px solid #AAAAAA; } 2 JS setTimeout(function(){ var newbox = "&lt;div class='child animated bounceInDown'&gt;&lt;/div&gt;" $(newbox).prependTo('.container').hide().slideDown(500);//notice that I prepend to the container, then hide the 'newbox' and then slide it down -&gt; this gives the desired effect. }, 2000); Hopefully that helps.

readonly
tag name: readonly
tags question: http://stackoverflow.com/q/26706586
type: Tag
tags question: http://stackoverflow.com/q/26814434

http://stackoverflow.com/comment/42163146
has text: the lines of axis are not shown in this code. I need that solid line axis. The text is shown in it which I already know.
score: 0
comment on: http://stackoverflow.com/q/26793215
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42138197
type: Comment
score: 1
type: AnswerComment
has text: Yes its work.thanks var id = $('#ilce option:selected').attr("id");
comment on: http://stackoverflow.com/a/26779952

http://stackoverflow.com/a/26802119
answers question: http://stackoverflow.com/q/26801799
downvote count: 0
has body: This is very generic, but you can adapt it to suit... http://jsfiddle.net/dv9a0ubw/1/ html add a row something 1 something 2 something 3 javascript $("#my-table").on("DOMSubtreeModified", function() { $(this).find("tr:last").hide().fadeIn(2000); }); $("#add-row").on("click", function() { var $row = $(" new 1 new 2 new 3 "); $("#my-table").append($row); }); As you can see, the button simply adds a row and that's it. The animation is applied by the event handler detecting a change in the table. You can retro-fit this to any table by modifying the table selector, using a class if you mean to use it in multiple instances.
score: 1
accepted answer of: http://stackoverflow.com/q/26801799
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/42035659
type: AnswerComment
comment on: http://stackoverflow.com/a/26722582
has text: @Disha document.getElementById('i2').innerHTML in validateUname() will throw an exception and thus form will be submitted. I updated my post, also I think I made an error when returning form alls(). It should work now, try it out!
type: Comment
score: 0

http://stackoverflow.com/comment/42179856
score: 0
comment on: http://stackoverflow.com/q/26803224
type: Comment
type: QuestionComment
has text: @j08691 My question isn't asking how to prevent the user from accessing my javascript. They can easily just use something like Firebug--and I'm fine with this. I'm asking, quite specifically, how to make the file accessible via my tag, and inaccessible directly.

http://stackoverflow.com/a/26788184
has body: You could implement some kind of scheduler : below i use a most simple stack that contains either a function or a time to wait before next task execution. Code below is untested, but might give you ideas : var tasks = []; // list of all tasks / wait time var currTaskIndex = 0; var looping = true; function runTask() { if (currTaskIndex==-1) return; var currTask = tasks[currTaskIndex]; // iterate currTaskIndex++; if (currTaskIndex==tasks.length) { if(looping ) { currTaskIndex=0; } else { currTaskIndex=-1; } } // run task / wait if (typeof currTask == "function") { currTask.call(null); runTask(); } else { // currTask is a time -&gt; wait setTimeout(runTask, currTask); } } Use with tasks.push(a); tasks.push(s1); tasks.push(b); tasks.push(s2); runTask();
type: Answer
answers question: http://stackoverflow.com/q/26787815
score: 0

http://stackoverflow.com/comment/42177601
type: QuestionComment
has text: yes, but all those solution using table2CSV, that has a bug that I mention on the first line @ankit.jbp
comment on: http://stackoverflow.com/q/26801861
score: 0
type: Comment

http://stackoverflow.com/q/26810586
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42193902
has title: Validating one div and allowing to move to another div
has comment: http://stackoverflow.com/comment/42194045
type: Question
has body: I have a web page which has multiple divs. I am showing each div once at a time and showing by providing next and previous traversing buttons. Whenever I click next, I want the elements in that div to get validated. I had included oninvalid function inside every input; But I am not sure how to map them to next and previous buttons. User Details ID Email Add Rooms Select Room Add Building No. Select Building The script to traverse between next and previous button is as follows: I would appreciate if someone could help me. Thanks!!
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/26675508
has comment: http://stackoverflow.com/comment/42084847
score: 1
answers question: http://stackoverflow.com/q/26675277
has body: I don't think you will need to have JavaScript deal with the XSLT transform at all. XSLT capable browsers should apply the transformation for you. See W3schools page on xsl transformation for a more detailed example. The general idea is this: Given a raw XML document, one writes an XSL Style Sheet to define a transformation template. This defines for the various elements in your XML file, what they should be transformed into. The example from the W3schools article transforms XML to XHTML. For every node or type of node (For-each is a keyword to note here) in the XML, a (XHTML) code scrap is defined, which will replace such nodes in the translated output. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> My CD Collection Title Artist <xsl:for-each select="catalog/cd"> <xsl:value-of select="title"/> <xsl:value-of select="artist"/> </xsl:for-each> </xsl:template> </xsl:stylesheet> What happens here, is that the root is replaced with and tags. Other nodes are replaced with table entries, etc. Your transform depends on the layout of your XML file, and in your case should adhere to proper structuring of XLS files. Finally, include in your XML document a reference to the XSL file. <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="cdcatalog.xsl"?> ... If you have an XSLT compliant browser it will nicely transform your XML into the desired format. Some discussion elsewhere on stackoverflow.com, which includes examples on how to transform an XML file to proper XLS format.
downvote count: 0
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42129128

http://stackoverflow.com/comment/42093845
comment on: http://stackoverflow.com/a/26755722
has text: This actually makes lot of sence and easily understandable. Thank you!
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42240581
type: Comment
comment on: http://stackoverflow.com/a/26797451
has text: @Antoan: Have you any idea related change Browser Configuration for mailto: functions
score: 0
type: AnswerComment

http://stackoverflow.com/a/26805618
score: 15
upvote count: 15
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42184856
has comment: http://stackoverflow.com/comment/42185013
answers question: http://stackoverflow.com/q/26805471
type: Answer
has comment: http://stackoverflow.com/comment/42184814
has body: If you want to pass the current scope of a part of your view to a function, the way to do it would be: ng-click="clickFunction(this)" But then in your function you should be treating that scope like this: $scope.clickFunction = function(passedScope){ passedScope.somePropertyOfTheScope = false;//&lt;---Notice the difference with the code that you are suggesting. You can't set the scope to false, you can set one of its properties to false, but not the scope itself. That wouldn't make any sense because scope is an object that holds a set of properties, events and functions. Some of them inherited from its scope ancestors up to $rootScope, and some of them are custom. Maybe what you are trying to do is to pass one of the properties of the scope as a parameter of a function, so that you can change it in that function. However, in javascript the only way to pass a parameter by reference is to pass the object and update one of its properties, if you pass a boolean property to the function, then you will be passing the value of that boolean property, not the reference. Please have a look at this: Pass Variables by Reference in Javascript.
has comment: http://stackoverflow.com/comment/42184257
accepted answer of: http://stackoverflow.com/q/26805471

http://stackoverflow.com/comment/42164513
type: QuestionComment
comment on: http://stackoverflow.com/q/26794802
has text: http://jsfiddle.net/fuhhxcrk/ Do you want some thing like this.
score: 0
type: Comment

http://stackoverflow.com/q/26828554
tagged with: angularjs
type: Question
has title: angularjs - ui.router sibling states
answer count: 1
tagged with: angular-ui-router
has body: I'm using bootstrap with angularjs (and ui-router for routing). I have a navbar where each tab click need to view another nested navbar in it. The nested navbar is a ui-view (should I do it differently?). The problem is that when I click one li in the main navbar, all of the four nested navbar views are shown. div(ng-controller='MyCtrl') h1 Header ul.nav.nav-tabs(role="tablist") li.active(role="presentation") a(ui-sref='first_nested_state') General div(ui-view) li.active.navbar-padding-left(role="presentation") a(ui-sref='second_nested_state') User div(ui-view) li.active.navbar-padding-left(role="presentation") a(ui-sref='third_nested_state') User div(ui-view) li.active.navbar-padding-left(role="presentation") a(ui-sref='fourth_nested_state') User div(ui-view) And here is one nested navbar (they all look the same, except for the names): div(ui-view) ul.nav.nav-tabs(role="tablist", color="red") li.active(role="presentation") a(ng-href='#') A li.active(role="presentation") a(ng-href='#') B li.active(role="presentation") a(ng-href='#') C And my state configuration: $stateProvider .state('main_nav_bar', { url: '/main_nav_bar', templateUrl: 'main_nav_bar.html' }) .state('first_nested_navbar', { parent: 'main_nav_bar', url: '/first_nested_navbar', templateUrl: 'first_nested_navbar.html' }) .state('second_nested_navbar', { parent: 'mainNavBar', url: '/second_nested_navbar', templateUrl: 'second_nested_navbar.html' }) I'm using coffeescript and jade as well.
upvote count: 3
has comment: http://stackoverflow.com/comment/42224827
downvote count: 0
has answer: http://stackoverflow.com/a/26829643
tagged with: javascript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26829643
score: 3
favorite count: 0

http://stackoverflow.com/q/26819028
has title: how to pass data to php via post method from iframe
has comment: http://stackoverflow.com/comment/42209378
has body: I need to pass data from a hidden iframe to php . I have seen many tutorials for sending data from iframe . But all of those are via get method. I am using one of them (via get method) , below is the code. function downloadURL(url) { var hiddenIFrameID = 'hiddenDownloader', iframe = document.getElementById(hiddenIFrameID); if (iframe === null) { iframe = document.createElement('iframe'); iframe.id = hiddenIFrameID; iframe.style.display = 'visible'; document.body.appendChild(iframe); } iframe.src = url; } But recently I have tried to pass some big amount of data . Then all are not are passing . So I am wanting to pass data via post method using iframe. Please suggest me how to do that .
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42209593
tagged with: jquery
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/42209344
has comment: http://stackoverflow.com/comment/42210044
type: Question
has comment: http://stackoverflow.com/comment/42208400

http://stackoverflow.com/q/26727677
answer count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42043784
tagged with: css
has answer: http://stackoverflow.com/a/26727747
has body: I have one container with two children elements inside of it. I want to place one child at the top and other child at the bottom of the container . The middle part (the content) should scroll between the top and bottom child elements. I want both children elements inside the container to have a fixed position and the content should scroll without scrolling both top and bottom div. I'd like a solution using CSS or jQuery, please. For a JSFiddle example, see my comment below.
has answer: http://stackoverflow.com/a/26727726
type: Question
has answer: http://stackoverflow.com/a/26728266
has title: How can I have a scrollable body with fixed header and footer inside a container div? using jQuery
score: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26754790
tagged with: http://stackoverflow.com/tag/html
has title: jQuery .text() for a dynamic content
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26755029
has body: When my page loaded It start function to load some data via ajax. When content loaded I want to check text in this content. But jQuery can't find needed element cause if loaded dinamic. Content loaded via ajax: Some text Jquery code to check text if ( $('.loaded_item').text() == $("#some_iput_with_val").val() ){ $('.loaded_item').addClass("some_Class"); } I read about .delegate() and .on() but they using event listener. In my exemple code must run without any actions.
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/42092215
upvote count: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/42092424
favorite count: 0
tagged with: ajax
type: UnansweredQuestion

http://stackoverflow.com/q/26673854
has answer: http://stackoverflow.com/a/26674848
has body: I've got a problem trying to get an image width and save it into a global var Im doing this at the momment var imgWidth; var imgLoad = $("&lt;img /&gt;"); imgLoad.attr("src", "Images/animals.jpg"); imgLoad.off("load"); imgLoad.on("load", function () { imgWidth = this.width; console.log(imgWidth); // It works! Inside function scope }); console.log(imgWidth); // It doesn't work! Outside function scope I know it's not working because Im trying to show the value outside the scope where the var was set. The image wont be displayed, I just need the width and height using only a src. I will need the image width and image height in future functions so that's why I need to save it at least into global vars. How can I solve it? Thank you very much
tagged with: size
has comment: http://stackoverflow.com/comment/41947627
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26674293
possible better answer: http://stackoverflow.com/a/26674848
accepted answer: http://stackoverflow.com/a/26674293
type: Question
has title: Get image size into a global variable before load and ready events
tagged with: javascript
tagged with: jquery
tagged with: image
score: 0
answer count: 2

http://stackoverflow.com/comment/91577728
comment on: http://stackoverflow.com/a/29978621
has text: Why do you need to check `isValid()` as well? Doesn't status==0 already mean that the client is offline? I actually seem to have the problem of not catching all offline statuses with just that check.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42167860
score: 1
comment on: http://stackoverflow.com/q/26796504
type: Comment
type: QuestionComment
has text: You can install [Firediff](https://addons.mozilla.org/en-US/firefox/addon/firediff/) and check what actually changes in document.

http://stackoverflow.com/comment/42219326
score: 0
type: Comment
has text: did u add the `flow.js` below to the `angular.js` and top to the `app.js`
type: QuestionComment
comment on: http://stackoverflow.com/q/26825372

http://stackoverflow.com/a/26764841
has body: Try put it in the document ready function. - Always keep javascript at the bottom - i think you should clean up your javascript Else try this: api.player.postMessage( '{ "method": "setVolume", "value": "0" }', 'http://player.vimeo.com' );
downvote count: 0
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/42132592
upvote count: 1
answers question: http://stackoverflow.com/q/26761560
has comment: http://stackoverflow.com/comment/42363380

http://stackoverflow.com/comment/42047131
comment on: http://stackoverflow.com/q/26717000
score: 0
has text: @SwapnilKadam, ok! Learnt something new :)
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42114835
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26766947
has text: Ah... From time to time I've wondered what the difference in ID and Classes where. That worked thanks!

http://stackoverflow.com/a/26793939
type: Answer
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26793905
answers question: http://stackoverflow.com/q/26793905
upvote count: 3
type: AcceptedAnswer
has body: When you say document.getElementById("firstname"), your html tag should be like: input type="text" id="firstname" name="firstname" You forgot to give "id" attribute to the element. "name"attribute will be used to get the values on server side when you post/submit the form.

http://stackoverflow.com/a/26694085
accepted answer of: http://stackoverflow.com/q/26693978
answers question: http://stackoverflow.com/q/26693978
type: AcceptedAnswer
downvote count: 0
has body: I would use the $interval and $http functions since you're using angular. It would look something like this: // Set the time (in milliseconds) var time = 1000; // Call this in your controller function($scope, $interval, $http) { // Start the interval $interval(function() { // Send a GET request to your URL $http.get('/my/url', { params: {} }).success(function(data) { // Add the new JSON data to current scope $scope.json_content = data.json_content; }); }, time); };
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/26698356
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26698420
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: hy users I try to get the path of a file via html5 js I try: jQuery("#pfad").change(function(evt){ var files = evt.target.files; // FileList object // files is a FileList of File objects. List some properties. for (var i = 0; i &lt; files.length; i++) { alert(files[i].path); } but path isn't a attribute of this file object.... what can i do?
has title: how can I get path of file from input api
score: 1
has answer: http://stackoverflow.com/a/26698428
linked to: http://stackoverflow.com/q/3717793
upvote count: 1
type: Question

http://stackoverflow.com/a/26723335
has comment: http://stackoverflow.com/comment/42036400
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42036338
has body: I think what you need is appendTo which will append html onto the specified tag. In this case you want to append a div onto your row. http://api.jquery.com/appendto/
answers question: http://stackoverflow.com/q/26723258

http://stackoverflow.com/a/55548465
downvote count: 0
has body: The solution by James looks good but it's a bit old-fashioned in my opinion. Here is a way to solve the problem in modern ES6 Javascript Classes. class Vector { constructor(arr) { this.arr = arr; } add(otherVector) { const oa = otherVector.arr; if (this.arr.length === oa.length) { let res = [] for(let key in this.arr) { res[key] = this.arr[key] + oa[key] } return new Vector(res) } } }
answers question: http://stackoverflow.com/q/26785458
has comment: http://stackoverflow.com/comment/119846072
has comment: http://stackoverflow.com/comment/97920094
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/a/26800168
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26800064
has body: You want to select by id. Add a '#' before your selector: if (document.getElementById("#&lt;%=HiddenField1.ClientID%&gt;").value == "yespost")
has comment: http://stackoverflow.com/comment/42173982
has comment: http://stackoverflow.com/comment/42175327
has comment: http://stackoverflow.com/comment/42174128
has comment: http://stackoverflow.com/comment/42174004
has comment: http://stackoverflow.com/comment/42174088
has comment: http://stackoverflow.com/comment/42174309

http://stackoverflow.com/a/39723486
has body: I've just managed to solve this by just adding an extra &lt;tr&gt; element with display: none; set (via CSS in my case but could use a style attribute) when a block of hidden rows has an odd number of elements. This won't meet every use case, but for cases where you're using multiple rows to create expanding tables it works quite well.
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26791925
type: Answer

http://stackoverflow.com/comment/41979978
score: 0
type: Comment
type: QuestionComment
has text: Currently the Submit button is sending the form data via email using PHP, but I don't know how to make a form re-post automatically.
comment on: http://stackoverflow.com/q/26691815

http://stackoverflow.com/comment/42039391
type: QuestionComment
comment on: http://stackoverflow.com/q/26724993
has text: you can probably [sic] create a random number with javascript, i'd google it. you can also name each of your pictures. recovering the name of an element with javascript is trivial. all of this can pretty much be run on the **client side**, without jquery
score: 0
type: Comment

http://stackoverflow.com/comment/52919975
comment on: http://stackoverflow.com/a/32530055
type: Comment
type: AnswerComment
has text: Using "literal" can be really confusing to a beginning developer. Why not just say, "It evaluates a string such as '{{fruits}}' to 'banana apples pears' when scope.fruits = 'bananas apples pears'".
score: 0

http://stackoverflow.com/comment/42123527
has text: It still stops at the url that is broken here is the broken url if that helps, http://64.182.231.116/~spencerf/binghamton_university/binghamton_university_hinman_menu.xml
type: Comment
comment on: http://stackoverflow.com/a/26770806
type: AnswerComment
score: 0

http://stackoverflow.com/q/26773788
upvote count: 1
has comment: http://stackoverflow.com/comment/42129002
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42126758
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42128549
tagged with: css
has body: I am trying to play some contents like a news ticker (from right to left). The code below works with Firefox but fails with Chrome (ref: [https://jsfiddle.net/jonathansampson/XxUXD/) Untitled Document Windows 8 and Windows RT are focused on your life—your friends and family, your apps, and your stuff. With new things like the Start screen, charms, and a Microsoft account, you can spend less time searching and more time doing. I have also tried this but it didn't work with chrome. @-webkit-keyframes{ 0% { transform: translate(0, 0); } 100% { transform: translate(-100%, 0); } }
has comment: http://stackoverflow.com/comment/42126795
score: 1
type: Question
has title: News Ticker using CSS
has comment: http://stackoverflow.com/comment/42126871
has comment: http://stackoverflow.com/comment/42127042
tagged with: javascript
has answer: http://stackoverflow.com/a/26775307
tagged with: css-animations
has comment: http://stackoverflow.com/comment/42128614

http://stackoverflow.com/a/26785037
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26782482
type: Answer
has body: It looks like you are setting the charts columns to an array inside an array columns: [ [ ['name', 'score'] ] ] Change the columns: [ char_data ] to columns: char_data $.ajax({ type: 'POST', url: '/AcademyStat/academy_module_user_report', dataType: 'json', data: { request: 'ajax', team_id: team_id, module_id: module_id }, success: function (data) { if (data != null) { for (var i = 0; i &lt; data.length; i++) { var add_data = [data[i]['name'], data[i]['score']] char_data.push(add_data); } var chart = c3.generate({ bindto: '#score_chart', data: { columns: char_data, type: 'bar' } }); } } });
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26782482

http://stackoverflow.com/comment/42229131
score: 0
type: Comment
type: QuestionComment
has text: Thank you. That worked for most. The only questions it didn't work for are the radio buttons. Do I need to do something different for those?
comment on: http://stackoverflow.com/q/26831135

http://stackoverflow.com/comment/42058162
type: QuestionComment
type: Comment
score: 2
has text: That last date doesn't convert to a date properly.
comment on: http://stackoverflow.com/q/26735854

http://stackoverflow.com/a/26766819
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26766750
answers question: http://stackoverflow.com/q/26766750
has comment: http://stackoverflow.com/comment/42149899
has body: Some code would be helpful, but I imagine you'll want something close to this: var laptime_val = '2:23'; var laptime_el = document.createElement('p'); document.body.appendChild(laptime_el); laptime_el.innerHTML = laptime_val;

http://stackoverflow.com/comment/42192330
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26809716
has text: No, just id doesn't dupe

http://stackoverflow.com/comment/42153098
has text: Don't edit your title with "SOLVED". If you've fixed the problem, add an answer and, in a couple of days, you'll be able to accept it.
score: 1
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26787634

http://stackoverflow.com/q/26744312
has answer: http://stackoverflow.com/a/41055861
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/45678695
has title: pdf417 Javascript Reading / Decoding
favorite count: 0
has answer: http://stackoverflow.com/a/26748288
type: UnansweredQuestion
tagged with: decoder
tagged with: pdf417
upvote count: 7
score: 7
has body: I have been tasked with adding in pdf417 (Driving License) decoding / reading for a web based application. Input: Image of driving licenses. (400-600 dpi) Processing: Detecting/Parsing of pdf417 data. Output: Parse pdf417 data. Limitations: Its a web based app running via: IE, Chrome, Safari. I cant install anything on the local machine. So I have been investigating for a few days now and I have not figured out a good way to make this work. Ideally the whole decoding would take place on the clients machine using Javascript/Jquery. However I have found no scripts / libraries that can do this. The only other options I have found was perhaps a java servlet or a php extension; both of which are not ideal because the upload time is going to push me over my time allot. Does anyone know of any javascript or JQuery library that can handle this? Or perhaps a better way to incorporate this functionality that I am not seeing?
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41981214
type: Comment
comment on: http://stackoverflow.com/q/26692777
has text: Can you say what you've tried already, and what difficulties you've had that have prevented you from solving it yourself?
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41987983
type: QuestionComment
has text: @Bamar - Thanks. The reason I asked is because I earlier posted a question but didn't mention that I was looking for a solution that uses some of the new browser features. http://stackoverflow.com/questions/26693070/is-there-a-way-i-can-emulate-the-lodash-chain-with-javascript-in-modern-browse I am sorry but I am not so familiar with JavaScript. Can you put your comment in as an answer and I will be happy to accept that.
type: Comment
comment on: http://stackoverflow.com/q/26696627
score: 0

http://stackoverflow.com/comment/42170591
comment on: http://stackoverflow.com/q/26798306
score: 0
type: Comment
type: QuestionComment
has text: How about setting width and height of the positioned fixed element?

flux
tag name: flux
tags question: http://stackoverflow.com/q/26809494
type: Tag

http://stackoverflow.com/a/26779194
has comment: http://stackoverflow.com/comment/42136597
score: 0
has comment: http://stackoverflow.com/comment/42136821
type: Answer
has body: You could try to load the Page via iframe to see if it's faster. Just set the innerHTML of your container to when he clicked the Button.
answers question: http://stackoverflow.com/q/26778952

http://stackoverflow.com/comment/42205404
comment on: http://stackoverflow.com/a/26817501
type: AnswerComment
score: 0
type: Comment
has text: Ok thanks, thats better. But if the data changes how can i make update it the $scope automatically?

http://stackoverflow.com/q/26693227
has comment: http://stackoverflow.com/comment/41982373
tagged with: chat
score: 0
has comment: http://stackoverflow.com/comment/41981980
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41982318
has comment: http://stackoverflow.com/comment/41982208
has comment: http://stackoverflow.com/comment/41982107
tagged with: data-integrity
has comment: http://stackoverflow.com/comment/41982018
has title: How to protect chat messages from man in the middle (PHP, JavaScript)
has comment: http://stackoverflow.com/comment/41982352
tagged with: encryption
has comment: http://stackoverflow.com/comment/41982094
has body: I'm currently working on a chat system for my website. I'm no wondering how to protect the integrity of a message. I'm currently doing this via chat.class.php class Chat{ private $config; private $randomJSONrpc; private $MySQL; function __construct($config = 'chat.config.json') { $this->config = $config; unset($config); if(file_exists($this->config)) { $config = json_decode(file_get_contents($this->config), false); $config->configfile = $this->config; $this->config = $config; unset($config); } else { $this->error('Configtest'); } require_once 'jsonrpc.class.php'; $jsonrpc = new JsonRpcClient('https://api.random.org/json-rpc/1/invoke'); $this->randomJSONrpc = $jsonrpc; unset($jsonrpc); $this->MySQL = $this->database(); } private function database() { if($this->config->salt == 'random') { $random = $this->random(8, 'string'); $this->config->salt = $random; $file = $this->config->configfile; unset($this->config->configfile); file_put_contents($file, json_encode($this->config)); } $mysql_function = $this->config->drivers->mysql; if($mysql_function == 'mysqli') { $connection = new MySqLi($this->config->mysql->host, $this->config->mysql->user, $this->config->mysql->password, $this->config->mysql->database)or $this->error('MySQL connection', mysqli_error()); return $connection; } else { error('MySQLi connection driver'); } } public function hash($input, $algo = 'blowfish') { if($algo == 'blowfish') { $hash_algo = '$2a'; $cost = '$10'; } elseif($algo == 'md5') { $hash_algo = '$1'; $cost = ''; } else { $this->error('Algo availibility check', 'chat.class.php#class:Chat->hash('.$input.', '.$algo.')'); } $salt = substr(sha1($this->config->salt),0,22); return crypt($input, $hash_algo.$cost.'$'.$salt); } public function random($length, $address = 'string') { $jsonrpc = $this->randomJSONrpc; if($address == 'string') { $params = new stdClass; $params->apiKey = $this->config->RANDOMapiKey; $params->n = 1; $params->length = $length; $params->characters = 'abcdefghijklmnopqrstuvwxyz12…
tagged with: php
type: Question
has answer: http://stackoverflow.com/a/26693919
accepted answer: http://stackoverflow.com/a/26693919
type: AnsweredQuestion

http://stackoverflow.com/comment/42162113
score: 0
comment on: http://stackoverflow.com/q/26793177
type: Comment
type: QuestionComment
has text: why are you using jQuery to inject angular code?

http://stackoverflow.com/q/26778081
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26778202
type: Question
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26778202
has title: jqueryvalidation plugin isn't properly aligning errors
score: 0
answer count: 1
has body: I am using jQuery validator plugin with Bootstrap 3 to validate my form inputs. It works great but when user enters any wrong input the alignment gets messed up. Screenshots Before: http://oi58.tinypic.com/23sta4p.jpg After: http://oi59.tinypic.com/2pq17a8.jpg How can I fix it?
tagged with: twitter-bootstrap

http://stackoverflow.com/q/26711697
has body: Hi I am making a ajax call $(function () { $('.pagination a').click(function () { $.get(this.href, null, null, "script"); return false; }); }); I thought that the last argument of $get would ensure that response is rendered as Javascript but it is being processed as HTML. I don't understand why. My controller index action: def index @accounts = Account.paginate(:page =&gt; params[:page], :per_page =&gt; 10) end My in index.js.erb alert("This is an AJAX request."); the log: Started GET "/admin/accounts?page=2&amp;_=1415008178615" for 127.0.0.1 at 2014-11-03 09:50:01 +0000 Processing by Admin::AccountsController#index as HTML Parameters: {"page"=&gt;"2", "_"=&gt;"1415008178615"} and then ends with Rendered admin/accounts/_accounts.haml (207.1ms) Rendered admin/shared/_content_card.html.haml (210.7ms) Rendered admin/accounts/index.haml within layouts/admin (364.1ms)
tagged with: ruby-on-rails
type: Question
has comment: http://stackoverflow.com/comment/42016400
has answer: http://stackoverflow.com/a/26711940
has comment: http://stackoverflow.com/comment/42014962
has comment: http://stackoverflow.com/comment/42014657
has answer: http://stackoverflow.com/a/26777770
has title: Jquery ajax response rendered as HTML instead of JS
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/42014570
answer count: 3
has comment: http://stackoverflow.com/comment/42014755
possible better answer: http://stackoverflow.com/a/26713317
accepted answer: http://stackoverflow.com/a/26777770
score: 2
has answer: http://stackoverflow.com/a/26713317
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42014713
upvote count: 2

http://stackoverflow.com/q/26821592
has comment: http://stackoverflow.com/comment/42212703
score: 0
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
has body: I'm making a MEAN reddit clone and currently working on authentication using Passport I'm using ui-router as my angular routing module and the inline templating is giving me problems. Specifically, when I pass the {failureRedirect: "/signup" } object to the passport authentication route (included below, along with the angular module) it looks up and fails to find a view called "signup" How can i successfully redirect it to another inline template (or, failing that, abstract the view into seperate files? // Login form authentication app.post("/login" ,passport.authenticate('local',{ successRedirect : "/", failureRedirect : "/signup", }) ); //Angular app.config([ '$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) { $stateProvider .state('home', { url: '/home', templateUrl: '/home.html', controller: 'MainCtrl', resolve: { postPromise: ['postFactory', function (postFactory) { return postFactory.getAll(); }] } }) .state('login', { url: '/login', templateUrl: '/login.html', controller: 'MainCtrl' }) .state('signup', { url: '/signup', templateUrl: '/signup.html', controller: 'MainCtrl' }) .state('profile', { url: '/profile', templateUrl: '/profile.html', controller: 'MainCtrl' }) .state('new', { url: '/new', templateUrl: '/new.html', controller: 'MainCtrl' }) .state('posts', { url: '/posts/{id}', templateUrl: '/posts.html', controller: 'PostsCtrl', resolve: { post: ['$stateParams', 'postFactory', function ($stateParams, postFactory) { return postFactory.get($stateParams.id); }] } }); $urlRouterProvider.otherwise('home'); }]);
has title: How to make passport.js failureRedirect work with inline angular templates?
has comment: http://stackoverflow.com/comment/42217267
has comment: http://stackoverflow.com/comment/42213008
type: Question
tagged with: mean-stack
tagged with: javascript

http://stackoverflow.com/q/26735117
tagged with: javascript
has body: when i drag drop object from both end it gets stucked somewhere where as when i click somewhere on screen it starts working i think it may be due to mouse event and touch event conflict . i am using "jquery.ui.touch-punch.min.js" js for mobile event some time it works and sometime i get stuck problem. this problem occurs only in chromium works fine in chrome browser. how can i solve this , any event to update mouse and touch event form whole dom or i might be missing something see link below :http://liveweave.com/JckSgC
has title: Jquery drag drop hangs or stuck in android browser due to touch event
type: Question
score: 0
tagged with: jquery
tagged with: android
tagged with: http://stackoverflow.com/tag/html
answer count: 0
has comment: http://stackoverflow.com/comment/42111363
type: UnansweredQuestion
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/42127488

http://stackoverflow.com/comment/42234689
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26830315
has text: Thanks a lot Rob. Then, do you mean that, even importing polymer.js, it is imposible to create shadow DOMS with template binding without using the custom tags standard?

http://stackoverflow.com/a/26754987
answers question: http://stackoverflow.com/q/26754651
score: 6
type: Answer
accepted answer of: http://stackoverflow.com/q/26754651
has comment: http://stackoverflow.com/comment/42095941
has comment: http://stackoverflow.com/comment/42093581
has comment: http://stackoverflow.com/comment/42092944
upvote count: 6
downvote count: 0
has comment: http://stackoverflow.com/comment/42093245
has comment: http://stackoverflow.com/comment/42093425
type: AcceptedAnswer
has body: First of all you shouldn't use angular like jQuery. One of ideas in angular - that you could build some components or mixins (directives) that could be managed by contollers and services that contain some logic. In your case you are trying to change DOM in controller, but you really don't want to do it. I would suggest to build some mixin directive that would apply to element you want to measure (or change) and write something like this. var yourModule = angular.module('yourModule',[]); yourModule.directive('fixHeight',function(){ return { link: function(scope,element,attr){ //here you should be aware of possibility to //use jqLite to set or get your height like in jquery var getHeight = element.css('height'); element.css('height',100500); // set height } } }); So you could apply this directive to some element and than it will change your height. &lt;div class="someClass" fix-height&gt; &lt;/div&gt; You can actually pass data to directive by scope, or isolated scope. But for these topic I would advice to look some tutorials for deep understanding.
has comment: http://stackoverflow.com/comment/42094044

http://stackoverflow.com/a/26701837
score: 1
accepted answer of: http://stackoverflow.com/q/26701036
has comment: http://stackoverflow.com/comment/41997912
has comment: http://stackoverflow.com/comment/41997340
answers question: http://stackoverflow.com/q/26701036
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: I think it could be that you set the el of FilmView to an id, which should always be unique, however then you loop over the collection and continually reset that el/id with the current model since each FilmView is going to have the same el
type: Answer
has comment: http://stackoverflow.com/comment/41997474

http://stackoverflow.com/comment/42133380
score: 0
type: Comment
type: QuestionComment
has text: I'm no parser-expert, but this implementation seems very hacky, relying on regexes like Gruber's perl version. Maybe take a look at a (possible cleaner) js-markdown-parser implementation as well? https://github.com/jgm/CommonMark/blob/master/js/lib/blocks.js
comment on: http://stackoverflow.com/q/26771436

http://stackoverflow.com/q/26683442
tagged with: php
score: 0
has comment: http://stackoverflow.com/comment/41966616
has answer: http://stackoverflow.com/a/26684261
type: Question
tagged with: database
has body: I have been reading and trying different things, but I just can't seem to get the hang of Jquery. Here's the context: with PHP, I get ten random items from my database. I hit the start button, one of the items shows. Users can then rate the item (like or dislike), that result gets updated in the DB and the next one shows. After rating ten items, the app resets and you can start again by hitting the start button again. Now I also need to get this working with jQuery or javaScript so the user doesn't have to refresh all the time. I have no idea how to get started. I know you all say 'read the documentation', but honestly I have and I just need some pointers so I can figure it out. hit the start button variable in php file fills this <?php echo $_SESSION['videos'][$_GET['id']]['title'].' - '. $first.'.'?> Originally by <?php echo $_SESSION['videos'][$_GET['id']]['artist'] ?> ... <source src="assets/videos/<?php echo $_SESSION['videos'][$_GET['id']]['video'] ?>"type="video/mp4"> rate with these buttons + redirected to next random item in array of ten This all works fine, but how do I get it working with jQ/Js? What I am thinking: Link a click event to the start button, prevent the default. But then what? I need to load ten random items from the database, append the first one to the body, then add a click event to the like/dislike buttons, prevent the default and update the database without resfreshing. Anyone has some pointers? Struggling here... Thanks
tagged with: javascript
has comment: http://stackoverflow.com/comment/41966038
has title: Loop through + update DB with jQuery
answer count: 1
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/comment/42043986
type: Comment
comment on: http://stackoverflow.com/a/26727653
score: 0
type: AnswerComment
has text: I think you're right there! .. in fact yup checked it all and that seems to have done the trick! Thanks so much for your help @papirtiger!

http://stackoverflow.com/a/26742511
has comment: http://stackoverflow.com/comment/42070879
answers question: http://stackoverflow.com/q/26739661
has comment: http://stackoverflow.com/comment/42071601
accepted answer of: http://stackoverflow.com/q/26739661
type: Answer
score: 0
has body: I found out the problem was the runat"server" property Execute SQL When you remove that the button's text updates fine.
type: AcceptedAnswer

http://stackoverflow.com/a/26707255
answers question: http://stackoverflow.com/q/26707042
downvote count: 1
score: -1
upvote count: 0
has comment: http://stackoverflow.com/comment/42007156
has body: $(".movr") returns an array NOT an object, mate.
type: Answer

wkwebview
tags question: http://stackoverflow.com/q/26801934
tags question: http://stackoverflow.com/q/26778955
type: Tag
tag name: wkwebview

http://stackoverflow.com/q/26694570
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26695469
type: Question
score: 12
answer count: 2
possible better answer: http://stackoverflow.com/a/26695469
has title: When, where and how to add class to the document.body when using React.js
has comment: http://stackoverflow.com/comment/71383708
has body: Currently I am doing this, but this is not the react.js way, right? Is render() the right place? What is the alternative? var App = React.createClass({ render: function() { if (this.state.touchMode === 2) { $('body').addClass('touchMode'); } return (&lt;div&gt; etc /div&gt;) } )}
tagged with: reactjs
upvote count: 12
has answer: http://stackoverflow.com/a/26695637
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26695637
type: AnsweredQuestion

http://stackoverflow.com/comment/42054388
type: AnswerComment
score: 0
type: Comment
has text: +1 Good one Daniel. In fact you could use the `title` as well if required. http://jsfiddle.net/abhitalks/47g8dnLx/2/
comment on: http://stackoverflow.com/a/26733605

http://stackoverflow.com/a/26710618
upvote count: 2
has comment: http://stackoverflow.com/comment/42013506
has comment: http://stackoverflow.com/comment/42013161
has comment: http://stackoverflow.com/comment/42013571
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26710546
has body: Why does this happen? Presumably because IE doesn't actually give the element focus until the JavaScript thread has yielded back to the browser. and how can I solve it without a setTimeout(fn,0); hack. Using setTimeout seems like the right thing in this situation, not a hack. But not if it doesn't work. :-) I hate to say it, but it sounds like you probably need a flag and to intentionally ensure the first focus fires your handler: (function() { var flag = false; var t = document.getElementById('focusable'); t.blur(); t.addEventListener('focus', function() { if (!flag) { flag = true; } else { console.log('This should only happen after the second focus.'); } }, false); t.focus(); })(); &lt;input id="focusable"&gt;
type: Answer
accepted answer of: http://stackoverflow.com/q/26710546
score: 2

http://stackoverflow.com/comment/41995790
comment on: http://stackoverflow.com/q/26701018
type: Comment
has text: [documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse) on allowed js date formats for new Date()
score: 0
type: QuestionComment

http://stackoverflow.com/comment/64018765
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/38298492
has text: If you use src like "../../js/bootstrap-min.js". It's only used in static html in localhost. When deployed in server, we should get js and css according to the url, like : 'http://localhost:8080/projectName/resource/js/bootstrap-min.js'. After change to "@{/resources/js/bootstrap-min.js", the thymeleaf would explain the url to the right url. You can see it in http://www.thymeleaf.org/doc/tutorials/2.1/usingthymeleaf.html#link-urls
score: 0

http://stackoverflow.com/q/26830256
type: AnsweredQuestion
tagged with: underscore.js
has answer: http://stackoverflow.com/a/26831528
type: Question
has comment: http://stackoverflow.com/comment/42228344
has comment: http://stackoverflow.com/comment/42229347
tagged with: arrays
answer count: 1
tagged with: javascript
has title: deleting a object while iterating over array
has comment: http://stackoverflow.com/comment/42229393
has body: I've been trying different methods but none of them work but this one seems to be the most simple to do the task that is to find the entries that are within a group ( idGroup ) wrap them into another array ( inside entries ) and delete the entry that is outside the array it belongs for(entry in entries) { if (entries[entry].idGroup) { var found = _.find(entries, function (num) { if(num.group == entries[entry].idGroup) { return num; } }); if(found) { entries[_.indexOf(entries, found)].entries.push(entries[entry]); delete entries[entry]; console.log('pushed'); }else{ entries.splice(entry,0, { group: entries[entry].idGroup, entries: [entries[entry]] }); delete entries[entry]; console.log('created'); } } } This scripting seems to be the most simple of all i've tried but it stills dosen't work; after deleting the current entry it seems to cause a error with the underscore library function _.find "TypeError: Cannot read property 'group' of undefined" at the line which _.find is, if i remove the delete operator it works fine. This is how entries STRUCTURE looks like before [ { id: 0, idGroup: 1, data: "example" }, { id: 1, idGroup: null, data: "example" }, { id: 2, idGroup: 1, data: "example" } ] and after ( as it should ) [ { id: 0, group: 1, entries: [ { id: 0, idGroup: 1, data: "example" }, { id: 2, idGroup: 1, data: "example" } ] }, { id: 1, idGroup: null, data: "example" } ]
score: 0
accepted answer: http://stackoverflow.com/a/26831528
has comment: http://stackoverflow.com/comment/42228819
has comment: http://stackoverflow.com/comment/42229275
tagged with: object

http://stackoverflow.com/comment/42150909
comment on: http://stackoverflow.com/a/26787158
type: Comment
score: 0
type: AnswerComment
has text: you either need to use a webserver, or you need to add http: or https: in front of the url...but you can´t just use the like button without even localhost, i guess.

http://stackoverflow.com/a/26850772
upvote count: 3
has body: This is the solution to the above problem Untitled Document Select Country: Select Country Select State: Please select Country first Select District: Please select State first
downvote count: 1
accepted answer of: http://stackoverflow.com/q/26825630
score: 2
has comment: http://stackoverflow.com/comment/88932485
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/88933474
answers question: http://stackoverflow.com/q/26825630

http://stackoverflow.com/a/26780798
answers question: http://stackoverflow.com/q/26768947
type: Answer
score: 2
upvote count: 2
has body: I'll accept your invitation for new ideas and put on the table my methodology of approaching similar cases. Clearly the problem is mostly about the communication between back-end and javascript data. The data that the javascript function needs as an argument in this case. Since html5's introduction of data attributes and the improved jQuery's efficiency with them in late versions, you may expose whatever back end data you want as attributes starting with "data-". This is valid according to html5. In jQuery you can access them as if they were jQuery data by translating the html naming convention to camelCase after reducing the initial "data-" pefix. (e.g. data-my-attribute = myAttribute). You can either access them in the original html convention (e.g. my-attribute). Its a matter of preference. Then your html can be much cleaner: &lt;td th:each="optionValue,iterStat : ${someObject.optionValues}"&gt; &lt;button class="btn btn-default" th:id="${'optionBtn_' + (iterStat.count - 1)}" th:text="${optionValue.toString()}" th:attr="data-my-func-attr=${optionValue}"/&gt; &lt;/td&gt; You can bind your event handlers then as: $("button.btn").on("click", function() { buttonPressed($(this).data("my-func-attr")) } or similar. This way you also keep your code cleaner and separate from the markup which is one principle of Unobtrusive JS
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26768947

http://stackoverflow.com/comment/41959945
comment on: http://stackoverflow.com/q/26677920
type: Comment
score: 0
has text: Can you show us saveMeals_async?
type: QuestionComment

http://stackoverflow.com/q/26737902
has answer: http://stackoverflow.com/a/26738485
type: Question
has comment: http://stackoverflow.com/comment/42061785
has body: I want to use a hyperlink to show an image instead of using text in the below starred text but I am not sure how to do it. Is it even possible to do this within JavaScript?? I have tried looking at other questions around these same parameters but I am not sure how to translate tose answers to my question. Thanks! var user; var choose = function(choice) { user = choice; } var computerChoice = Math.random(); if (computerChoice &lt; 0.34) { computerChoice = "rock"; } else if (computerChoice &lt; 0.67) { computerChoice = "paper"; } else { computerChoice = "scissors"; } var compare = function(choice1, choice2) { if (choice1 === choice2) { document.getElementById("result").innerHTML = "Tie!"; } else if (choice1 === "rock") { if (choice2 === "scissors") { document.getElementById("result").innerHTML = "You Win!"; } else { document.getElementById("result").innerHTML = "You Lose!"; } } else if (choice1 === "paper") { if (choice2 === "rock") { document.getElementById("result").innerHTML = "You Win!"; } else if (choice2 ==="scissors") { document.getElementById("result").innerHTML = "You Lose!"; } } else if (choice1 === "scissors") { if (choice2 === "rock") { document.getElementById("result").innerHTML = "You Lose!"; } else if (choice2 === "paper") { document.getElementById("result").innerHTML = "You Win!"; } } else { document.getElementById("result").innerHTML = "ERROR!"; } }
tagged with: javascript
has comment: http://stackoverflow.com/comment/42063014
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42061840
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26738063
has title: How do I insert an image instead of using text in Javascript?

http://stackoverflow.com/comment/42119590
score: 2
has text: bind() returns a new function. a plain function, with no ties to the past
comment on: http://stackoverflow.com/q/26769593
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42241167
comment on: http://stackoverflow.com/a/26798246
score: 0
type: AnswerComment
type: Comment
has text: do not add this else with single if make if(entry == 'busno'){}else if(entry == 'Comp Id')else {// your part here}

http://stackoverflow.com/a/26678227
accepted answer of: http://stackoverflow.com/q/26672966
answers question: http://stackoverflow.com/q/26672966
score: 0
has body: Given an input field like: &lt;input type='text' id='domain'/&gt; i ended up with this solution in which i first validate it as a url and then get the string without 'http://', 'https://' , 'www.' $(document).ready(function(){ function ValidUrl(str) { var pattern = new RegExp('^(https?:\\/\\/)?'+ // protocol '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // domain name '((\\d{1,3}\\.){3}\\d{1,3}))'+ // OR ip (v4) address '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // port and path '(\\?[;&amp;a-z\\d%_.~+=-]*)?'+ // query string '(\\#[-a-z\\d_]*)?$','i'); // fragment locator if(!pattern.test(str)) { return false; } else { return true; } } $('#domain').change(function(){ var str = $.trim($(this).val()); if(ValidUrl(str)){ var pat = /^(https?:\/\/)?(?:www\.)?([^\/]+)/; var match = str.match(pat); console.log(match); //$(this).val(str); } else{ $(this).val('Validation failed'); } }); }); See also this jsfiddle:http://jsfiddle.net/6mrbbq9x/5/
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/26766837
upvote count: 1
downvote count: 1
answer count: 6
tagged with: object
has answer: http://stackoverflow.com/a/26767228
has answer: http://stackoverflow.com/a/26767170
has answer: http://stackoverflow.com/a/26767001
has answer: http://stackoverflow.com/a/26766957
has answer: http://stackoverflow.com/a/26766959
has comment: http://stackoverflow.com/comment/42114704
tagged with: javascript
has comment: http://stackoverflow.com/comment/42114537
possible better answer: http://stackoverflow.com/a/26767001
type: AnsweredQuestion
has body: Is there a better way to write this rather than write four functions that do essentially the same thing? How could I call the same function but display different properties of the same object using that function. In the following example, a is a "paragraph" element. The event listeners are tied to "input" elements the type is button. function $(id){ return document.querySelector(id); }; function Person(name, age, weight, favoriteActivity) { this.name = name; this.age = age; this.weight = weight; this.favoriteActivity = favoriteActivity; } var Jack = new Person("Jack Crish", 29, 200, "coding"); var a = document.querySelector("#person"); function showAge(){ a.innerHTML = Jack.age; } function showName(){ a.innerHTML = Jack.name; } function showWeight(){ a.innerHTML = Jack.weight; } function showActivity(){ a.innerHTML = Jack.favoriteActivity; } $("#age").addEventListener("click", showAge); $("#name").addEventListener("click", showName); $("#weight").addEventListener("click", showWeight); $("#enjoys").addEventListener("click", showActivity); JSFiddle found here: http://jsfiddle.net/metkjnyn/
has comment: http://stackoverflow.com/comment/42115967
has answer: http://stackoverflow.com/a/26767045
favorite count: 0
has title: Instead of many event listeners and functions referring to one object what is a better way?
type: Question
score: 0
accepted answer: http://stackoverflow.com/a/26766959
has comment: http://stackoverflow.com/comment/42275677

http://stackoverflow.com/q/26676116
has comment: http://stackoverflow.com/comment/41951544
has title: How to dynamically access object's property?
accepted answer: http://stackoverflow.com/a/26676219
has body: I have trouble accessing object' property in the example below. On the third line I'd like to have the number 42 replaced with the value of the variable devNumTemp, but so far I'm not successfull. What is the proper way to do this? I've tried several options, but never getting any further than getting undefined. function getTempDev(devNumTemp, devNumHum, id, description){ $.getJSON("http://someurl.com/DeviceNum=" + devNumTemp,function(result){ var array = result.Device_Num_42.states; function objectFindByKey(array, key, value) { for (var i = 0; i &lt; array.length; i++) { if (array[i][key] === value) { $("#id").html(description + "&lt;div class='right'&gt;" + array[i].value + "&amp;deg;C" + "&amp;nbsp;&amp;nbsp;&amp;nbsp;(" + someVariable + "%" + ")" + "&lt;br&gt;&lt;/div&gt;"); } } }; objectFindByKey(array, 'service', 'something'); }); };
tagged with: object
type: AnsweredQuestion
tagged with: dynamic
type: Question
tagged with: javascript
tagged with: variables
score: 0
answer count: 1
tagged with: undefined
has answer: http://stackoverflow.com/a/26676219

http://stackoverflow.com/comment/42328635
comment on: http://stackoverflow.com/q/26747705
score: 0
type: Comment
has text: How is this related to "fabricjs"?
type: QuestionComment

http://stackoverflow.com/comment/42329195
score: 0
type: Comment
has text: This is interesting. The attribute is copied but the property is "lost" when removing/appending? I need to read more about the difference between attribute and properties and how they work
type: AnswerComment
comment on: http://stackoverflow.com/a/26815099

http://stackoverflow.com/comment/42047244
type: AnswerComment
comment on: http://stackoverflow.com/a/26728927
score: 0
has text: it return true, but it display in textarea not true. It display new character. One more things, i run this code in another computer it display true. Can you explain reason why this?
type: Comment

http://stackoverflow.com/comment/42009022
has text: Did you copy and paste that string from somewhere? That space might not be what you think it is.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26708420

http://stackoverflow.com/q/26738175
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42062534
downvote count: 5
possible better answer: http://stackoverflow.com/a/26738222
has comment: http://stackoverflow.com/comment/42062705
has body: I have this code: var w; if (window.eventListener) w.addEventListener('load', startSlideShow, false); else w.addEventListener('onload', startSlideShow); First there was no var w; So when i browsed to the page and did inspect elemnt i saw in red a message say: Uncaught ReferenceError: w is not defined on line 181 Now after i added the line var w; I did inspect elemnt again and now i see in red: Uncaught TypeError: Cannot read property 'addEventListener' of undefined So i guess just doing var w; is not the right way. So how do i define the variable w ?
has comment: http://stackoverflow.com/comment/42062206
answer count: 3
upvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42062581
favorite count: 0
has comment: http://stackoverflow.com/comment/42062688
has answer: http://stackoverflow.com/a/26738365
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26738222
has answer: http://stackoverflow.com/a/26738202
accepted answer: http://stackoverflow.com/a/26738202
has comment: http://stackoverflow.com/comment/42062254
has comment: http://stackoverflow.com/comment/42062494
score: -4
type: Question
has title: How can i define the variable w inside the javascript code?

http://stackoverflow.com/comment/41979105
comment on: http://stackoverflow.com/a/26691425
score: 0
type: Comment
has text: Can you tell me then what is the use of `kwarg form`??
type: AnswerComment

http://stackoverflow.com/a/26675504
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41951599
type: Answer
has comment: http://stackoverflow.com/comment/41950318
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26675029
has comment: http://stackoverflow.com/comment/41950609
has comment: http://stackoverflow.com/comment/41950706
has comment: http://stackoverflow.com/comment/41952274
answers question: http://stackoverflow.com/q/26675029
has body: I think you should use PHP for sorting them. It's very complicated with javascript because you couldn't move the element to another position in the DOM. &lt;div id="events"&gt; //elements are positioned here &lt;/div&gt; &lt;div id="new-events"&gt; //you can't simply move the elements to here &lt;/div&gt; &lt;div id="new events"&gt; //or to here &lt;/div&gt; But you can use PHP with an array of events with their time. &lt;?php $events = array('2014-11-1' =&gt; array('title' =&gt; 'Haloween Party', 'date' =&gt; '2014-11-1'), '2014-10-10' =&gt; array('title' =&gt; 'Table dance party', 'date' =&gt; '2014-10-10')); function only_new($name) { $date = strtotime($name['date']); return $date &gt; time() ? $name : false; } $newEvents = array_filter($events, "only_new"); $oldEvents = array_filter($events, "only_old"); function only_old($name) { $date = strtotime($name['date']); return $date &lt; time() ? $name : false; } echo '&lt;hr&gt;'; echo 'Old events:&lt;br /&gt;'; var_dump($oldEvents); echo '&lt;br /&gt;'; echo '&lt;hr&gt;New events:&lt;br /&gt;'; var_dump($newEvents); echo '&lt;hr&gt;'; ?&gt; Hope it helps ;)
has comment: http://stackoverflow.com/comment/41952707
has comment: http://stackoverflow.com/comment/41951831
upvote count: 1

http://stackoverflow.com/a/26788845
type: Answer
answers question: http://stackoverflow.com/q/26788778
has comment: http://stackoverflow.com/comment/42154050
has comment: http://stackoverflow.com/comment/42154115
has comment: http://stackoverflow.com/comment/42154243
accepted answer of: http://stackoverflow.com/q/26788778
has body: jQuery's closest method does not accept an anonymous function as the 2nd argument, and therefore this never fires in your code. $(this).addClass('is-active').closest('.accordion-content', function () { I don't see you doing anything with the .accordion-content selector anyway, so just omit it. $(this).addClass('is-active'); $.getJSON(.... You will also need to cache a reference to your element that fired the click event in order to reference in within the result of your ajax callback: var self = $(this); We need to natively wrap it as a jQuery object because the 2nd argument we pass in as context needs to apply .parent() in order to actually get the .js-accordion-content element. $('.js-accordion-content', self.parent()).html(' Name: ' + jd.name + ' '); $('.js-accordion-content', self.parent()).append(' Age : ' + jd.age + ' '); $('.js-accordion-content', self.parent()).append(' Sex: ' + jd.sex + ' '); jsFiddle
has comment: http://stackoverflow.com/comment/42154450
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/42211400
score: 0
type: Comment
type: QuestionComment
has text: oh I see, let me rewrite something in my edits for your comments
comment on: http://stackoverflow.com/q/26820907

http://stackoverflow.com/q/26781221
accepted answer: http://stackoverflow.com/a/26782541
type: AnsweredQuestion
score: 1
has title: SVG images doesn't appear on IE 11
type: Question
tagged with: internet-explorer
tagged with: javascript
upvote count: 1
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
has body: What I'm trying to do is simple load SVG inside img source to later draw it on my canvas. This works fine in all modern browsers and even in IE 9, 10 but not in IE 11. As i look closer it would still call "onload", but loads nothing with zero width and height. Here is very simple example that loads some SVG image from wiki and print it's size inside div: var imgObj = new Image(); imgObj.onload = function(){ $("#output").html(imgObj.width); }; imgObj.src = 'https://upload.wikimedia.org/wikipedia/commons/1/15/Svg.svg'; https://jsfiddle.net/zmLtrbr9/ Now if I draw this image on canvas it won't display.
has answer: http://stackoverflow.com/a/26782541

http://stackoverflow.com/comment/42089198
type: QuestionComment
comment on: http://stackoverflow.com/q/26752625
has text: @huanfeng, here it is: http://jsfiddle.net/ythv11to/
score: 0
type: Comment

http://stackoverflow.com/comment/42045522
has text: Pick the one you're most comfortable with, or throw it all out and just use [Require](http://requirejs.org/). This is gonna get closed as "primarily opinion-based."
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26728635

http://stackoverflow.com/q/26678572
has comment: http://stackoverflow.com/comment/41956935
has body: I'm having trouble with some dumb architecture because I'm dumb. I'm trying to loop over YouTube videos posted to Reddit, extract URLs and process them into an .m3u playlist. Full code at Subreddit to YouTube Source Bookmarklet - Play YouTube music from subreddits in Foobar with foo_youtube At some point I get the idea that I could check each URL to see if the video is dead or not, and offer an alternative if they're removed. So I do AJAX requests to YouTube API and if there's an error I'm supposed to react to it and change that item's URL. But the problem is it only works if the AJAX is NOT async - this takes many seconds, during which the page is jammed. I'd like to let the AJAX be async but I don't know how I should structure my code. Here is PSEUDOCODE of how it is now: var listing = // data from reddit API $.each(listing, function(key, value) { var url = // post URL from reddit posts listing // ( "http://youtu.be/XmQR4_hDtpY&amp;amp;hd=1" ) var aRegex = // to parse YouTube URLs // ( (?:youtube(?:-nocookie)?.com/....bla...bla ) var videoID = // YouTube video ID, extracted with regex // ( "XmQR4_hDtpY" ) var itemArtist = // parsed from reddit posts listing // ( "Awesome Artist" ) var itemTitle = // parsed from reddit posts listing // ( "Cool Song (Original Mix)" ) var itemURL = // url, further processed // ( "3dydfy://www.youtube.com/watch?v=XmQR4_hDtpY&amp;hd=1" ) $.ajax({ type: "HEAD", url: "https://gdata.youtube.com/feeds/api/videos/" + videoID, error: function() { // If it's no longer available // (removed, deleted account, made private) deadVid++; // chalk up another dead one, for showing progress itemURL = // dead videos should get a different URL // ( "3dydfy-search://q=Awesome%20Artist%20Cool%20Song....." ) } }); // further process itemURL! // at this point I want itemURL changed by the .ajax()'s error callback // but I'm trying to keep the requests async // to not jam the page while a hundred HTTP requests happen! if (condition){ itemURL += // append var…
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41957029
linked to: http://stackoverflow.com/q/133310
favorite count: 0
accepted answer: http://stackoverflow.com/a/26679054
has comment: http://stackoverflow.com/comment/41957001
has title: How to keep $.ajax() async inside $.each() loop but react to result on each iteration
score: 6
tagged with: youtube
upvote count: 6
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41956876
has comment: http://stackoverflow.com/comment/41956611
has answer: http://stackoverflow.com/a/26679054
tagged with: javascript
tagged with: jquery
tagged with: ajax
tagged with: bookmarklet

concurrency
tag name: concurrency
tags question: http://stackoverflow.com/q/26800300
type: Tag
tags question: http://stackoverflow.com/q/26826958

http://stackoverflow.com/comment/42109354
score: 0
comment on: http://stackoverflow.com/a/26764047
type: Comment
has text: Hi @TJ it still does not work. I was getting the Alerts myself too (see my comment for @PeterKA). It seems the code that generates the checkboxes is just out of sync with the HTML being created by the dialog. I will create a fiddle and place here. I need sleep now, 5AM in Sydney... Thanks for the help!!
type: AnswerComment

http://stackoverflow.com/a/26674324
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26673980
has comment: http://stackoverflow.com/comment/41949742
has body: Switch to Universal Analytics. Write a script that pipes your server log file (the lines relevant to you) to Analytics via the measurement protocol. Include a queue time parameter (which allows to to record the correct time of the time even if you send it up to four hours after the hit occured). Run the script every few hours. Alternatively at least the Apache webserver allows to reroute writes to the log file through external processes (via the CustomLog Directive), so you could pipe the hits to GA as they occur in real time. While this is still a serverside solution it will not generate huge loads in the way calling a redirect script will do.

http://stackoverflow.com/q/26830399
tagged with: server
linked to: http://stackoverflow.com/q/21097711
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26830492
answer count: 2
linked to: http://stackoverflow.com/q/17952436
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26830492
tagged with: node.js
type: AnsweredQuestion
has title: Node.js print console output two times
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/75206719
has answer: http://stackoverflow.com/a/26830539
tagged with: http
accepted answer: http://stackoverflow.com/a/26830539
type: Question
has body: I am trying to create a simple node js server that print 'new client' when any one open the server URL. This is my code var http = require('http'); var server = http.createServer(); server.on('request', function(req, res){ res.end('hello world'); console.log('new client'); }); server.listen(8080); but when i open the http://localhost:8080 the console output 'new client' two times, it should be one line, is this normal?

http://stackoverflow.com/comment/42054242
has text: +1: This very cleverly uses an ancestor-descendant selector applied to descendants (which I did not realise would even work). Thanks for teaching me something new :)
score: 0
comment on: http://stackoverflow.com/a/26732439
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26682558
tagged with: range
has comment: http://stackoverflow.com/comment/41963890
has comment: http://stackoverflow.com/comment/41963808
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41963830
possible better answer: http://stackoverflow.com/a/26682732
has comment: http://stackoverflow.com/comment/41963788
downvote count: 3
has answer: http://stackoverflow.com/a/26682758
has body: How I should approach the JavaScript (can't use jQuery) to change a price using these range calculations: I found this js fiddle but it uses jQuery . It is very similar to what I want to achieve although I didn't see a range code in it, just values . ie: your price : 200 so multiple by 0.23 refer to chart. So if I have the price 200 I want to get the value 0.23. Is there an easier way, then doing the following code below? if (maxValue &lt;= 100) { minvalue = 250 } if (maxValue &lt;= 250) { chartMaxY = 500 ... Or declaring values? var pricerange = [100, 250,, 1000, 2500, 50000, ]; if (maxValue &lt;= pricerange[i]) { minvalue = pricerange[i];
type: Question
has comment: http://stackoverflow.com/comment/41963771
answer count: 2
upvote count: 0
tagged with: javascript
score: -3
has comment: http://stackoverflow.com/comment/41963899
tagged with: http://stackoverflow.com/tag/html
has title: Calculate Price Range in Javascript
accepted answer: http://stackoverflow.com/a/26682758
has comment: http://stackoverflow.com/comment/41963752
tagged with: calculator
favorite count: 0
has answer: http://stackoverflow.com/a/26682732

http://stackoverflow.com/comment/42084469
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26750252
has text: try `{{(.+?)}}` . Could you remove all the `>` symbols at the start?
score: 0

jquery-templates
type: Tag
tag name: jquery-templates
tags question: http://stackoverflow.com/q/26796008

http://stackoverflow.com/q/26808382
has answer: http://stackoverflow.com/a/26808471
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26809252
accepted answer: http://stackoverflow.com/a/26809252
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/42189579
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26808471
answer count: 3
has comment: http://stackoverflow.com/comment/42191198
downvote count: 1
has answer: http://stackoverflow.com/a/26808748
favorite count: 0
has title: Using two of the same javascripts
has body: I've been trying to create a page with several before and after images (Using a slider to swap between the two). However when I add the second piece of JavaScript code, it breaks the page. Even if I try to amend the (var) code to be unique from the previous script In all honesty I don't quite understand what the JavaScript is doing which is why I'm probably unable to Google the solution. Any help would be appreciated, if you could try to explain in as much detail what I need to do and explain any specific terms that would help me develop further. You can see all my code on the link (and below): http://codepen.io/sn0wm0nkey/pen/DakbA var inkbox = document.getElementById("inked-painted"); var colorbox = document.getElementById("colored"); var fillerImage = document.getElementById("inked"); inkbox.addEventListener("mousemove",trackLocation,false); inkbox.addEventListener("touchstart",trackLocation,false); inkbox.addEventListener("touchmove",trackLocation,false); function trackLocation(e) { var rect = inked.getBoundingClientRect(); var position = ((e.pageX - rect.left) / inked.offsetWidth)*100; if (position <= 100) { colorbox.style.width = position+"%"; } } /* -----second JavaScript code---- */ var inkbox1 = document.getElementById("inked1-painted"); var colorbox1 = document.getElementById("colored1"); var fillerImage1 = document.getElementById("inked1"); inkbox1.addEventListener("mousemove",trackLocation,false); inkbox1.addEventListener("touchstart",trackLocation,false); inkbox1.addEventListener("touchmove",trackLocation,false); function trackLocation(e1) { var rect1 = inked.getBoundingClientRect(); var position1 = ((e1.pageX - rect1.left) / inked1.offsetWidth)*100; if (position1 <= 100) { colorbox1.style.width = position1+"%"; } } body { background: #113; } div#inked-painted { position: relative; font-size: 0; -ms-touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; } div#inked-painted img { width: 100%; height: auto; } div#colored { background-…

http://stackoverflow.com/comment/42211558
score: 0
type: AnswerComment
has text: Thanks jimi. Don't want to be a dick, but I get: "Uncaught ReferenceError: popup is not defined".
type: Comment
comment on: http://stackoverflow.com/a/26820245

http://stackoverflow.com/comment/42226855
comment on: http://stackoverflow.com/q/26829842
has text: It would be a major security issue
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26783002
type: Question
has body: I have a some problems with my JQ Code. Default I must show only 4 elements from my UL list. But if I click on "Show more" element I must display +4 more (+4) elements from UL list. Anybody know how I can do this? Sorry for my bad English :( This is my code: $(document).ready(function() { $('ul#Galeria &gt; li:gt(3)').css( "display", "none" ); $( ".readmore &gt; a" ).click(function() { $("ul#Galeria &gt; li:gt(3)").fadeIn("slow").show(); $(".readmore").css('display', 'none'); return false; }); }); http://jsfiddle.net/6w2nm7z1/
has comment: http://stackoverflow.com/comment/42143257
has answer: http://stackoverflow.com/a/26784097
accepted answer: http://stackoverflow.com/a/26784097
tagged with: javascript
has comment: http://stackoverflow.com/comment/42143111
answer count: 2
upvote count: 1
has title: jQuery- Increase displayed elements
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/26783382
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26783382
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/17736786
downvote count: 0
score: 1

http://stackoverflow.com/q/26813805
tagged with: python
upvote count: 3
type: UnansweredQuestion
tagged with: odoo
type: Question
has body: I'm following the documentation and there is the following snippet how to make a query in Odoo v 8.0 var Users = new openerp.Model('res.users'); Users.query(['name', 'login', 'user_email', 'signature']) .filter([['active', '=', true], ['company_id', '=', main_company]]) .limit(15) .all().then(function (users) { // do work with users records }); But when i execute that code (with a sample company id), I got everytime the error: TypeError: Users.query is not a function Could someone explain me why and how to make a query in js with odoo?
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/34082854
favorite count: 0
has title: High-level API: calling into Odoo models HowTo
score: 3
answer count: 1

http://stackoverflow.com/comment/41976386
score: 0
comment on: http://stackoverflow.com/q/26689301
type: QuestionComment
type: Comment
has text: Assume you hit grandchildren @i=1, i-- sets i=0, makes recursive call, and when you come back to the loop loop will continue from i=1 again. Do you absolutely need to use i--. To achieve your goal though, you need to find your target node and just return the node, that will give you what you want.

http://stackoverflow.com/a/26832706
upvote count: 3
has comment: http://stackoverflow.com/comment/42233061
type: Answer
has comment: http://stackoverflow.com/comment/85880921
downvote count: 0
answers question: http://stackoverflow.com/q/26831105
has comment: http://stackoverflow.com/comment/42233165
score: 3
has body: This is possible, but there will be some drawbacks to using a pure regex solution. The easiest to call out is nested HTML. The solution I'm about to show uses some back referencing to try get around this, but if you get some complicated nested HTML it will probably start failing in weird ways. /(?:<(\w+)[^>]*>(?:[\w+]+(?:(?!<).*?)<\/\1>?)[^\s\w]?|[^\s]+)/g Regex Demo The regex uses back referencing and negative look behinds to get the work. You could potentially remove the back reference depending on your requirements. The back referencing helps with supporting nested tags. JSFiddler Example - Check your console output for the example. Here's the output from JS Fiddler (I formatted the output a bit) [ "A", "word,", "words within tags should remain intact,", "so", "here's", "even more", "words" ] Depending on you're use case you'll need to modify it to work for you. I considered a word anything that wasn't a space, but you may have different criteria. One negative to this method is if the start HTML tag is at the end of a word, it won't be picked up properly. ie. testsomething else.
has comment: http://stackoverflow.com/comment/42232694
has comment: http://stackoverflow.com/comment/42233065

http://stackoverflow.com/comment/42157073
score: 0
type: Comment
type: QuestionComment
has text: `.outerHeight()` is a good suggestion; this includes the height + border + margin + padding
comment on: http://stackoverflow.com/q/26790396

http://stackoverflow.com/q/26792299
favorite count: 0
has title: Access children DIVs in jQuery
tagged with: css
downvote count: 0
has answer: http://stackoverflow.com/a/26792556
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42160115
score: 1
type: Question
upvote count: 1
answer count: 1
has body: I have a structure, such as some text goes here... how do I show all the nonmatched-sentence elements if they were made invisible before? I now use this: $(this).('entry-text').children('.nonmatched-sentence').show(); But it's not working... Thanks!
has comment: http://stackoverflow.com/comment/42160114
tagged with: javascript
tagged with: show
tagged with: jquery

http://stackoverflow.com/q/26743220
has body: I'm currently working on displaying some arrays using PHP and MySQL. Simplified code looks like this: $sql = "SELECT * FROM workorder"; $result = mysqli_query($dbc3,$sql); $tryout_reports = array(); while ( $row = mysqli_fetch_assoc($result) ) { $tryout_reports[] = $row['file_name'] . " "; } $detail_report['tryout_reports'] = $tryout_reports; I took a lot out of the SQL here, so if there's something wrong in there please don't mind. The SQL statement works fine. The problem is it's being outputted with commas separating each value, and it's looking real bad. The HTML on the page when run looks something like this: File1.pdf "," File2.pdf "," etc.. Now, I've looked around quite a bit and i've tried the following: ltrim() rtrim() explode() str_replace() I know rtrim works, but it doesn't remove the commas. I tried something like: $tryout_reports[] = rtrim($row['file_name'],"pdf"); And it took the pdf out of the end of each one, but when I replace "pdf" with "," it does nothing. Feeling really stuck, any help would be really appreciated! Thanks EDIT: Forgot to add, the page that uses this data and displays it on the page has this: table.append(" Tryout Reports " + data[0].tryout_reports + " "); That is inside of a jQuery function which runs when a job number is clicked to display additional information.
tagged with: javascript
has comment: http://stackoverflow.com/comment/42073181
has title: Remove commas from php array
tagged with: arrays
answer count: 1
has answer: http://stackoverflow.com/a/26766134
has comment: http://stackoverflow.com/comment/42072406
has comment: http://stackoverflow.com/comment/42072204
has comment: http://stackoverflow.com/comment/42073203
has comment: http://stackoverflow.com/comment/42072551
linked to: http://stackoverflow.com/q/19572738
has comment: http://stackoverflow.com/comment/42072999
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42073457
score: 0
accepted answer: http://stackoverflow.com/a/26766134
tagged with: mysql
type: Question
has comment: http://stackoverflow.com/comment/42072706
has comment: http://stackoverflow.com/comment/42072268

http://stackoverflow.com/comment/42405263
comment on: http://stackoverflow.com/a/26802109
score: 0
type: Comment
has text: Thanks for the answer. I'm using `<h:body>` instead of ` `. When I inspect my `<h:head>` element on browser, my `js/pf.js` doesn't even appear in the code.
type: AnswerComment

http://stackoverflow.com/comment/41965774
score: 0
type: AnswerComment
has text: @lordterrin, Its hard to understand your issue by your description, but it just dawned on me you're probably trying to describe a caching issue. To make the browser stop caching the ajax response you would add `cache: false,` to the ajax call. I've updated the answer to include it.
type: Comment
comment on: http://stackoverflow.com/a/26683263

http://stackoverflow.com/comment/42121662
type: Comment
has text: Thanks @lloiser. I think I will need a JSFiddle to help you help me! I will do one next. Your suggestion makes sense in terms of sequence but it now has a strange behavior. On first and second dialog open (without page refresh) it does not work, but it works on the third dialog open?! Madness! I will do a JSFiddle to see what I learn in the process.
comment on: http://stackoverflow.com/a/26767137
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41964324
type: Comment
comment on: http://stackoverflow.com/a/26679909
type: AnswerComment
score: 0
has text: yes, that is the problem, results are shown correctly, but 1 image needs 1 result, not all of them. At this point is all about matching 1 result with 1 image.

http://stackoverflow.com/a/26790314
has comment: http://stackoverflow.com/comment/42157873
accepted answer of: http://stackoverflow.com/q/26790277
score: 3
answers question: http://stackoverflow.com/q/26790277
has comment: http://stackoverflow.com/comment/42157703
has comment: http://stackoverflow.com/comment/42157967
has comment: http://stackoverflow.com/comment/42157853
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42157836
has comment: http://stackoverflow.com/comment/42158169
type: Answer
has comment: http://stackoverflow.com/comment/42157647
has comment: http://stackoverflow.com/comment/42157854
has comment: http://stackoverflow.com/comment/42157777
has comment: http://stackoverflow.com/comment/42156926
upvote count: 3
has body: There's Rhino and SpiderMonkey which are both related to the Mozilla JS engine. A list of other JS shells is here which include things like Node (based on the Chrome V8 engine). I'm personally using Node just because the level of 3rd party support for Node modules seems to have really taken off in the last couple years and you can also use it for web server development if you so choose and it all runs on many platforms.

http://stackoverflow.com/q/26802809
tagged with: syntax
linked to: http://stackoverflow.com/q/1771786
downvote count: 1
type: Question
upvote count: 0
tagged with: javascript
score: -1
answer count: 2
has answer: http://stackoverflow.com/a/26802872
favorite count: 0
has answer: http://stackoverflow.com/a/26802893
has body: I have been tasked with re-writing some code for a client reservation form and I was hoping someone could explain the following syntax. I know its basically like an if statement but the way it is set up is a little obscure to me since I am somewhat new to JavaScript: testDate.setHours ( ampm.value=="AM"? (timestr[0]==12?0:timestr[0]=timestr[0]): (timestr[0]==12?12:timestr[0]=timestr[0]+12) ); The whole reasoning behind this problem that I am working on is to take a value in for the reservation time. It parses the string into an array where timestr[0] is the hour value. Based on AM/PM and the value the user inputs, it will do its conversion to set the hours to military time. I am not sure that this is even working correctly. If someone could analyze this code, explain the syntax to me (?,:, etc.) and tell me if this is the appropriate way to convert the hours I would greatly appreciate it. Thank you! Dave EDIT : Also, would this be an identical way of writing it, just easier to understand: if(ampm.value=="AM") { if(timestr[0]==12) { timestr[0] = 0; testDate.setHours(timestr[0]); } else { testDate.setHours(timestr[0]); } } else { if(timestr[0]==12) { testDate.setHours(timestr[0]); } else { timestr[0] = timestr[0] + 12; testDate.setHours(timestr[0]); } }
has comment: http://stackoverflow.com/comment/42179622
has comment: http://stackoverflow.com/comment/42178853
possible better answer: http://stackoverflow.com/a/26802893
has comment: http://stackoverflow.com/comment/42179882
has comment: http://stackoverflow.com/comment/42178966
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26802872
has title: Understanding JavaScript Syntax

http://stackoverflow.com/comment/42013807
type: Comment
type: QuestionComment
has text: You're right, functions will be global inside the module (or actually, just the current file from my own experience), they won't affect any other modules. So Python and JS work very differently here, and it makes sense to avoid the global namespace in JS.
comment on: http://stackoverflow.com/q/26702562
score: 0

http://stackoverflow.com/comment/42148066
type: QuestionComment
has text: [See this answer](http://stackoverflow.com/a/9329476/1072176) for iteration options.
comment on: http://stackoverflow.com/q/26785480
score: 0
type: Comment

http://stackoverflow.com/a/26807114
upvote count: 6
score: 6
has comment: http://stackoverflow.com/comment/42187330
answers question: http://stackoverflow.com/q/26807063
downvote count: 0
has body: Because those aren't the same thing. This is a function definition: function( data ) { doStuff( data ) } This is a function invocation: doStuff( data ) It's telling the code to execute doStuff(data) now and use its result as the callback function. Since data doesn't exist yet, that won't work. (And if doStuff doesn't return a function, that won't work.) The analogous version is simply this: $.ajax({ url: urlIn, dataType: 'json', cache: false }) .done( doStuff ); data will be passed in automatically.
type: Answer

http://stackoverflow.com/q/26825409
tagged with: css
has answer: http://stackoverflow.com/a/26834656
accepted answer: http://stackoverflow.com/a/26834656
upvote count: 0
type: AnsweredQuestion
has body: On first load images and blocks overlap but after that it works fine Getting Data from Json and rendering at above divs $(function (){ function Bill(id, billNo, votes, description, category, categoryimage, name, itemType) { var self = this; self.id = ko.observable(id); self.billNo = ko.observable(billNo); self.description = ko.observable(description); self.votes = ko.observable(votes); self.category = ko.observable(category); self.categoryimage = ko.observable(categoryimage); self.name = ko.observable(name); self.itemType = ko.observable(itemType); self.RandomHeight = ko.observable(Math.floor(Math.random() * 200) + 150); self.voteFor = function () { console.log("voting for: %s", self.billNo()); forUs.vote(self.id(), 'for').done(function (data, textStatus, jqXHR) { console.log("you have voted for %s", self.billNo()); }); }; // values for isTracked and isShared is dynamic self.isTracked = ko.observable(true); self.isShared = ko.observable(true); self.trackClass = ko.computed(function () { if (self.isTracked()) { return 'active'; } else { return 'inactive'; } }); self.shareClass = ko.computed(function () { if (self.isShared()) { return 'active'; } else { return 'inactive'; } }); self.voteAgainst = function () { console.log("vote against: %s", self.billNo()); forUs.vote(self.id(), 'against').done(function (data, textStatus, jqXHR) { console.log('you have voted against %s', self.billNo()); }); }; self.track = function () { var identity = (self.billNo() || self.name()); forUs.track(self.id()).done(function (data, textStatus, jqXHR) { self.isTracked(!self.isTracked()); console.log('you %s tracking %s', self.isTracked() ? 'are now' : 'stopped', identity); }); }; self.share = function () { var identity = (self.billNo() || self.name()); forUs.share(self.id()).done(function (data, textStatus, jqXHR) { self.isShared(!self.isShared()); console.log('you %s sharing %s', self.isShared() ? 'are now' : 'stopped', identity); }); }; self.billUrl = ko.computed(function () { return "../B…
has title: images overlap at initial page loading using isotope and knockout.js
tagged with: knockout.js
type: Question
tagged with: jquery-masonry
downvote count: 2
score: -2
answer count: 1
tagged with: javascript
tagged with: jquery-isotope
favorite count: 0

http://stackoverflow.com/comment/42066656
type: Comment
type: AnswerComment
has text: I wish I could, but it's more complex than the example and I cannot change this crazy requirement...
comment on: http://stackoverflow.com/a/26740319
score: 0

http://stackoverflow.com/comment/42163593
has text: for (var a = 0; a < emailsLength; a++) { emailAddr[a]['emails'].push(emailAddresses.emails[a]); }
type: Comment
comment on: http://stackoverflow.com/a/26794150
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42344109
type: QuestionComment
type: Comment
score: 2
has text: Can you show a demo? I just can't visualize what the issue is.
comment on: http://stackoverflow.com/q/26817742

http://stackoverflow.com/comment/42182830
score: 0
has text: I'd love the downvoter to explain how I could make the question clearer!
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26804663

http://stackoverflow.com/q/26711599
favorite count: 0
has answer: http://stackoverflow.com/a/26711743
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26711743
tagged with: css
score: -6
downvote count: 6
has comment: http://stackoverflow.com/comment/42014567
has body: I am working on a site .As you can see there's a menu item called Digital Marketing. The item has a submenu called Digital Marketing Consultancy.i want the submenus like in any other websites with the dropdown effect like when we hover the menu item the submenus dropsdown. eg : like the menu here. I have tried giving .sub-menu{display:none;} .sub-menu:hover{display:block;} here is the fiddle .how can i make it like the menu effects in other sites.Please help.Thanks!! updated fiddle
has answer: http://stackoverflow.com/a/26711746
type: AnsweredQuestion
has title: Dropdown menu effect
has answer: http://stackoverflow.com/a/26711777
type: Question
answer count: 3
upvote count: 0
possible better answer: http://stackoverflow.com/a/26711746
has comment: http://stackoverflow.com/comment/42014566
tagged with: javascript
tagged with: drop-down-menu
tagged with: jquery

http://stackoverflow.com/a/26780030
accepted answer of: http://stackoverflow.com/q/26779846
type: Answer
answers question: http://stackoverflow.com/q/26779846
has comment: http://stackoverflow.com/comment/42138672
has comment: http://stackoverflow.com/comment/51879600
has comment: http://stackoverflow.com/comment/42138089
downvote count: 3
has body: You need to specify your view folder and parse the engine to HTML. var express = require('express'); var bodyParser = require('body-parser'); var app = express(); app.set('port', (process.env.PORT || 5000)); app.use(express.static(__dirname + '/public')); app.set('views', __dirname + '/public/views'); app.engine('html', require('ejs').renderFile); app.set('view engine', 'html'); app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json()); app.get('*', function(req, res){ res.render('index.html'); }); app.listen(app.get('port'), function() { });
type: AcceptedAnswer
score: 38
has comment: http://stackoverflow.com/comment/50106718
upvote count: 41

http://stackoverflow.com/comment/42216203
comment on: http://stackoverflow.com/q/26823270
type: QuestionComment
has text: I'm confused, are you asking what happens if I move `app-spec.js` from the current directory into the parent directory? If so, I'm not sure what the goal of that would be, can you explain your reasoning behind that suggestion? As per your other suggestion, I removed all files from the `files` array except for `app-spec.js`, but the output was still `Executed 256 of 256`.
type: Comment
score: 0

http://stackoverflow.com/q/26688850
has title: Sticky Nav flickering like flashing lights
answer count: 4
has answer: http://stackoverflow.com/a/62516179
has body: I wrote the code to make the nav to be a sticky nav, but the code that I wrote to make it a sticky nav is causing the sticky nav to blink, why? Where is the fault? Here is my code : ;(function($) { $.fn.tosticky = function(o) { o = $.extend({ tofixedClass: 'classtofixed', fixedClass: 'fixedclass', top: 0, bottom: 0 }, o); return this.each(function() { var $window = $(window), $this = $(this); $window.on("scroll", function() { var fence = $(o.tofixedClass).offset().top; var scrollTop = $(this).scrollTop(); if(scrollTop &gt; fence) { $(o.tofixedClass).addClass(o.fixedClass).css({"margin-top":o.top,"margin-bottom":o.bottom}); } else { $(o.tofixedClass).removeClass(o.fixedClass); } }); }); }; })(jQuery); $(function () { $(".pagar").tosticky({ // use this to run code in above tofixedClass: '.pagar', fixedClass: 'fixed', top: 0, bottom: 0 }); }); And here is my code in jsfiddle : Click Here
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26688978
has comment: http://stackoverflow.com/comment/41974833
possible better answer: http://stackoverflow.com/a/26689008
type: Question
has answer: http://stackoverflow.com/a/26689008
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26688978
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/51422350

http://stackoverflow.com/a/26787533
answers question: http://stackoverflow.com/q/26787400
score: 2
has body: Note that nothing happens because you're using return false in event handler. That will prevent (un)checking the checkbox. If you're trying to implement Select All option, just do: $(".category:first").on("click", function() { $(".category").prop("checked", this.checked); }); Select all
downvote count: 0
upvote count: 2
type: Answer

http://stackoverflow.com/comment/42125531
type: Comment
has text: Check updated code for the same. Link for this : http://jsfiddle.net/a09bshb7/44/
comment on: http://stackoverflow.com/a/26772940
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42086671
type: QuestionComment
type: Comment
has text: A web server serves out web pages. A file server serves out files. A TCP server serves out....uhh TCP? This post needs to be clearer.
comment on: http://stackoverflow.com/q/26751432
score: 0

invisible
tags question: http://stackoverflow.com/q/26732823
type: Tag
tag name: invisible

http://stackoverflow.com/q/26692299
answer count: 3
possible better answer: http://stackoverflow.com/a/26692656
has title: On-Disk Text Processing With Javascript
accepted answer: http://stackoverflow.com/a/26692600
has body: I have some html files that I need to do automated processing on, basically regex replaces, but also some more complex actions like copying select blocks of text from one file to another. I want to create a series of scripts that will let me do this processing (it will need to be done more than once on different batches of files). It would be trivial to use Go for this (read the file into memory, regex, save to disk) but I am the only member of the project that's familiar with Go. Javascript is a tad more ubiquitous, and I do have project members who are familiar with the language, so it's a better fit in that respect. If I'm not around later, someone else could edit the scripts. Is there a simple way to write some JS scripts to do on-disk text processing? I'm looking for a cross-platform solution (OSX, Windows). Ideally, once the scripts are written, they can be executed by double-clicking an icon--there will be "not computer people" involved at some point. Also, I'd like to be able to do some kind of alert/message box to inform the user of the success/failure of the script. (This may be a tall order, and is of secondary importance.) What I've looked at: Node.js was the first thing that popped into my head, because I know that it has file system access tools, and obviously regex capacity. But I've never used Node before, and based on the tutorials I've read, it seems like overkill for something this simple. There's a whole slew of "javascript compiling" tools that you can find by googling around. Some are not cross-platform, some seem old or not actively maintained, etc. None of them caught my eye as easy to pick up and just write some JS scripts with. Any thoughts?
tagged with: javascript
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26692600
tagged with: regex
tagged with: node.js
has answer: http://stackoverflow.com/a/26692656
has answer: http://stackoverflow.com/a/26693147
score: 0

http://stackoverflow.com/q/26761826
upvote count: 0
has answer: http://stackoverflow.com/a/26765235
has comment: http://stackoverflow.com/comment/42106192
type: Question
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/42106034
tagged with: javascript
tagged with: jquery
score: -1
has body: If you have seen the jQuery UI page before, you will notice the widgets they have. I have been using their datepicker widget and have got it working successfully. However it loads up blank as i have not made the CSS for it yet. In their source, you can see that they link to a css file. Is there anyway I can obtain the CSS that is use? Here is a link for the widget for more information: http://jqueryui.com/datepicker/#icon-trigger
has title: jQuery UI | datepicker problems
linked to: http://stackoverflow.com/q/820412
has comment: http://stackoverflow.com/comment/42105968
answer count: 1
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42106822
accepted answer: http://stackoverflow.com/a/26765235
tagged with: datepicker
type: AnsweredQuestion

http://stackoverflow.com/q/26720548
tagged with: javascript
score: 0
answer count: 3
has title: new Date converting invalid date, can't validate dates properly
accepted answer: http://stackoverflow.com/a/26720681
possible better answer: http://stackoverflow.com/a/26720693
has answer: http://stackoverflow.com/a/26720693
type: AnsweredQuestion
has body: Here's my problem: new Date('02/30/2000') Javascript converts to: Wed Mar 01 2000 00:00:00 GMT-0300 (Local Standard Time) I can't validate dates that way, if javascript keeps 'correcting' dates automatically. I was using isNaN to check if date is valid, but I guess it will never work as I want. How do I solve this problem?
has answer: http://stackoverflow.com/a/26720820
type: Question
has answer: http://stackoverflow.com/a/26720681

http://stackoverflow.com/comment/42075342
type: Comment
score: 1
has text: It's more clear in reading through his examples. He creates a `function Dog() { this.name = ... }` and a `function Cat() { this.name = ... }`, rather than just using the inherited Animal constructor: `function Animal() { this.name = ... }`. He states above that he does this explicitly because he doesn't feel the `Animal` constructor should initiate any properties, even if they are shared.
type: AnswerComment
comment on: http://stackoverflow.com/a/26741761

http://stackoverflow.com/comment/41985913
type: AnswerComment
has text: It would be nice if the question had said this was an assignment, and the object was about learning how to write Javascript classes. But didn't the class teach this? If not, how were you expected to do the assignment?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26695343

http://stackoverflow.com/comment/51723895
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26737844
has text: What does make a specific map (tile) provider 'external' to you?
type: Comment

http://stackoverflow.com/q/26730531
has body: Below is HTML: tab 1 document tab 2 tab 3 Following is click event code: //On Click Event $("ul.tabs li").click(function () { $("ul.tabs li").removeClass("active"); //Remove any "active" class $(this).addClass("active"); //Add "active" class to selected tab $(".tab_content").hide(); //Hide all tab content var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content alert(activeTab); $(activeTab).fadeIn(); //Fade in the active content return false; }); On click of any HREF, it works fine and execute above jquery stuff. Now, I need to execute above jquery stuff manually using jquery example, call the click event for HREF[#TAB1/2/3]. Please guide me on this how can i call jquery event manually. Meaning - when need to select tab1 then, it click event should call for tab1 same as for tab 2 and tab 3 accordinlgy.
type: Question
has answer: http://stackoverflow.com/a/26730584
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/26730554
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
upvote count: 2
has title: how to call jquery click event manually
answer count: 5
downvote count: 2
has answer: http://stackoverflow.com/a/26730611
linked to: http://stackoverflow.com/q/19786107
possible better answer: http://stackoverflow.com/a/26730580
has answer: http://stackoverflow.com/a/26730626
has answer: http://stackoverflow.com/a/26730580
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26730554
duplicate of: http://stackoverflow.com/q/19786107
tagged with: jquery-ui

http://stackoverflow.com/a/26799778
has body: You can use an Iframe :
answers question: http://stackoverflow.com/q/26799529
accepted answer of: http://stackoverflow.com/q/26799529
score: 4
type: AcceptedAnswer
type: Answer
upvote count: 4
downvote count: 0

http://stackoverflow.com/comment/42134577
has text: I have tried. But i get this error istead:
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26778018

forms
tags question: http://stackoverflow.com/q/26721563
tags question: http://stackoverflow.com/q/26701240
tags question: http://stackoverflow.com/q/26747177
tags question: http://stackoverflow.com/q/26758549
tags question: http://stackoverflow.com/q/26812542
tags question: http://stackoverflow.com/q/26813003
tags question: http://stackoverflow.com/q/26796308
tags question: http://stackoverflow.com/q/26807566
tags question: http://stackoverflow.com/q/26757963
tags question: http://stackoverflow.com/q/26758144
type: Tag
tags question: http://stackoverflow.com/q/26707788
tags question: http://stackoverflow.com/q/26696017
tags question: http://stackoverflow.com/q/26723886
tags question: http://stackoverflow.com/q/26804563
tags question: http://stackoverflow.com/q/26751247
tags question: http://stackoverflow.com/q/26825169
tags question: http://stackoverflow.com/q/26794214
tags question: http://stackoverflow.com/q/26691815
tags question: http://stackoverflow.com/q/26709522
tags question: http://stackoverflow.com/q/26831135
tags question: http://stackoverflow.com/q/26807257
tags question: http://stackoverflow.com/q/26778987
tags question: http://stackoverflow.com/q/26813919
tags question: http://stackoverflow.com/q/26751400
tags question: http://stackoverflow.com/q/26698141
tags question: http://stackoverflow.com/q/26737010
tags question: http://stackoverflow.com/q/26675433
tags question: http://stackoverflow.com/q/26678197
tags question: http://stackoverflow.com/q/26689681
tags question: http://stackoverflow.com/q/26811231
tags question: http://stackoverflow.com/q/26735319
tags question: http://stackoverflow.com/q/26745568
tags question: http://stackoverflow.com/q/26767111
tags question: http://stackoverflow.com/q/26711810
tags question: http://stackoverflow.com/q/26789873
tags question: http://stackoverflow.com/q/26827354
tags question: http://stackoverflow.com/q/26713934
tags question: http://stackoverflow.com/q/26804792
tags question: http://stackoverflow.com/q/26747272
tags question: http://stackoverflow.com/q/26673470
tags question: http://stackoverflow.com/q/26804130
tags question: http://stackoverflow.com/q/26747801
tags question: http://stackoverflow.com/q/26829108
tags question: http://stackoverflow.com/q/26755266
tags question: http://stackoverflow.com/q/26699628
tags question: http://stackoverflow.com/q/26763908
tags question: http://stackoverflow.com/q/26787742
tags question: http://stackoverflow.com/q/26696786
tags question: http://stackoverflow.com/q/26695276
tags question: http://stackoverflow.com/q/26749344
tags question: http://stackoverflow.com/q/26778887
tags question: http://stackoverflow.com/q/26831412
tags question: http://stackoverflow.com/q/26803973
tags question: http://stackoverflow.com/q/26754734
tags question: http://stackoverflow.com/q/26716347
tags question: http://stackoverflow.com/q/26719710
tags question: http://stackoverflow.com/q/26725833
tags question: http://stackoverflow.com/q/26743088
tags question: http://stackoverflow.com/q/26816593
tags question: http://stackoverflow.com/q/26779406
tags question: http://stackoverflow.com/q/26781007
tag name: forms
tags question: http://stackoverflow.com/q/26812315
tags question: http://stackoverflow.com/q/26724216
tags question: http://stackoverflow.com/q/26786774
tags question: http://stackoverflow.com/q/26691881
tags question: http://stackoverflow.com/q/26694987
tags question: http://stackoverflow.com/q/26786918
tags question: http://stackoverflow.com/q/26695361
tags question: http://stackoverflow.com/q/26789299
tags question: http://stackoverflow.com/q/26746982
tags question: http://stackoverflow.com/q/26757949
tags question: http://stackoverflow.com/q/26716124
tags question: http://stackoverflow.com/q/26704598
tags question: http://stackoverflow.com/q/26737527
tags question: http://stackoverflow.com/q/26768584
tags question: http://stackoverflow.com/q/26807688
tags question: http://stackoverflow.com/q/26715791
tags question: http://stackoverflow.com/q/26707369

http://stackoverflow.com/comment/42118819
type: QuestionComment
has text: Not necessary. `less.js` provides same `render`/`parse` functions that you can use to compile Less code w/o any window, document etc. See [for example](http://codepen.io/seven-phases-max/pen/yobdJ?editors=101) (exact code may differ depending on used version though).
comment on: http://stackoverflow.com/q/26767450
score: 0
type: Comment

http://stackoverflow.com/a/26781156
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26780934
answers question: http://stackoverflow.com/q/26780934
type: AcceptedAnswer
downvote count: 0
has body: Your problem seems to be the 'data' You should use 'scope.data'. So it will look like scope.$watch('scope.data', function (newVals)
type: Answer

http://stackoverflow.com/a/26823248
has body: You should just iterate in item.array2, as you did in the first ng-repeat, something like: {{item.var1}} {{item.var2}} {{item_}} I have not tried, but it should work.
type: Answer
answers question: http://stackoverflow.com/q/26822194
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/26680495
answer count: 4
downvote count: 1
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
has title: How can I add a query string to a button
has comment: http://stackoverflow.com/comment/41959832
has answer: http://stackoverflow.com/a/26680588
has answer: http://stackoverflow.com/a/26680570
has answer: http://stackoverflow.com/a/26680564
has comment: http://stackoverflow.com/comment/41959821
has body: I've got a fairly basic question for everyone concerning a query string. I need to add a query string to a button and am not sure how to go about it. I'm not very strong with either JavaScript nor jQuery, so and ALL advice will be tested and greatly appreciated. This is the button code ... Lorem Ipsum I need to add this query string (btw the string is URL encoded) to that button ... http://responsetoday.com/jointventure-ecomm/purl54pki3r.aspx?rid=TST1232544
tagged with: button
has comment: http://stackoverflow.com/comment/41959868
tagged with: string
has comment: http://stackoverflow.com/comment/41959889
favorite count: 0
has answer: http://stackoverflow.com/a/26680649
type: UnansweredQuestion

http://stackoverflow.com/comment/42046961
has text: window.innerHeight is a standard propery, you don't need jQuery for that, and besides, it's still not enough info since the browser can be resized at will...
type: Comment
comment on: http://stackoverflow.com/a/26728956
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42066056
type: AnswerComment
comment on: http://stackoverflow.com/a/26727533
score: 0
type: Comment
has text: @RobG: Thanks for the feedback. Can you please provide better wording to concisely describe what `this` is?

http://stackoverflow.com/comment/42190355
comment on: http://stackoverflow.com/q/26808597
type: Comment
type: QuestionComment
has text: I want obtain this list as array list and then add this data to make a googlemaps marker like: `$.each(NodeListPostosSaude ,function(index, value){ var marker = new google.maps.Marker({ position: new google.maps.LatLng(value.latitude, value.longitude), title:value.nome_posto_saude, }); markers.push(marker); latlngbounds.extend(marker.position); });`
score: 0

http://stackoverflow.com/q/26684685
has comment: http://stackoverflow.com/comment/41967530
tagged with: javascript
tagged with: gruntjs
tagged with: grunt-contrib-uglify
downvote count: 0
has title: Uglify to .js.liquid
has comment: http://stackoverflow.com/comment/41967519
favorite count: 0
type: UnansweredQuestion
tagged with: liquid
answer count: 0
upvote count: 3
has body: So I've used grunt-contrib-uglify in my workflow up to now with no issues, but now I'd like to be able to output my minified code to a '.js.liquid' file (it's for a Shopify project), which I haven't done before. I figured it'd be straightforward, but when I run the uglify job I get unexpected token errors for any instance of liquid tags in my source js files. Is there an argument that I need to pass to uglify in order to get the task to complete?
type: Question
score: 3

http://stackoverflow.com/a/26745151
upvote count: 1
answers question: http://stackoverflow.com/q/26745117
type: Answer
has body: U can use $("div.parent &gt; div.child").remove(); This will select all div's with class child that are direct children of div's with class parent and remove them.
downvote count: 0
score: 1

http://stackoverflow.com/a/26736990
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26736845
type: Answer
has body: you miss creating new th var familyNameTxt = document.createTextNode("Family Name"); th = document.createElement('th'); // this line missed th.appendChild(familyNameTxt);
score: 1

http://stackoverflow.com/comment/42085480
has text: You can define your javascript files as Play templates. Just like you do for html templates. You only need to add your template and render it from a controller and add a route. But always there are better ways than creating a dynamic javascript. As for caching, what if you create a normal javascript file and serve it with play? You think it won't be cached? Why?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26747536

http://stackoverflow.com/q/26727261
has body: I bet this is really simple and im gonna try to explain it the best I can: I am trying to build a gallery to show different transitions and reveals ( making an overlayed div transition out of sight, for instance ), and I want there to be a button that the user can click to experience the same transition with hover and with clicks. To achieve this I simply created a new variable that I called toggleButton, initialized it at 0, and made a conditional statement saying that should the variable be 0, the transition should be working on hover, and, should toggleButton be 1, the transition would work with clicks. I am logging the variable changes on the console everytime the button to change them is pressed, and it works fine, no errors, but I can't achieve what i wanted to, the transition never changes, it always stays the way i initialize it ( if i init it at 1 then the transition works with clicks ). I made a fiddle with a little example of what I'm talking about, I hope you can understand what I want by looking at it in case i failed at explaining it with words: http://jsfiddle.net/mcczrbgg/1/ Thanks in advance!
type: Question
has comment: http://stackoverflow.com/comment/42043240
tagged with: javascript
has title: Changing mouse events depending on a variable
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42043844
possible better answer: http://stackoverflow.com/a/26727309
tagged with: jquery
has answer: http://stackoverflow.com/a/26727309
has comment: http://stackoverflow.com/comment/42043424
accepted answer: http://stackoverflow.com/a/26727320
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26727320

http://stackoverflow.com/comment/41970559
has text: @Paul - I guess it's asking too much for people to put an actual question in a question and perhaps even make it easier to find by ending it with a question mark.
comment on: http://stackoverflow.com/q/26686206
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26749767
type: Question
answer count: 2
tagged with: node.js
score: 0
accepted answer: http://stackoverflow.com/a/26750847
has body: I have following simple node.js app which creates cursor from query which sorts collectoin by City and then temperature. After that, I iterate through cursor and update every document with highest temperatures for every city by adding highest : true. var MongoClient = require('mongodb').MongoClient; MongoClient.connect('mongodb://localhost:27017/temp', function(err, db) { if(err) throw err; var cursor = db.collection('data').find().sort( { City : 1, Temperature : -1 } ); var previous = ''; cursor.each(function(err, doc) { if(err) throw err; if(doc == null) { console.dir("Closing database connection"); return db.close(); } if (previous != doc.City) { previous = doc.City; var query = { _id : doc._id }; var operator = { '$set' : { highest : true } }; console.dir(doc.City + " is " + doc.Temperature + "; "); db.collection('data').update(query, operator, function(err, updated) { if(err) { console.error('Error:', err); throw err; } console.dir("Successfully updated: " + JSON.stringify(updated)); }); } }); }); The problem here is that only first city gets updated properly, here is the output: 'Berlin is 81; ' 'Successfully updated: 1' 'Paris Florida is 83; ' 'Warsaw New Mexico is 57; ' 'Barcelona Vermont is 57; ' 'Closing database connection' Error: { [MongoError: Connection Closed By Application] name: 'MongoError' } Error: { [MongoError: Connection Closed By Application] name: 'MongoError' } Error: { [MongoError: Connection Closed By Application] name: 'MongoError' } My guess on what is happening is: the cursor goes through all documents calls update on those with highest temperatures: db.collection('data').update(query, operator, function(err, updated) but before the callback returns, cursor finishes iterating and this fragment of code is called which closes connection: if(doc == null) { console.dir("Closing database connection"); return db.close(); } after that, all updates which didn't finish processing will error out since no db connection is available. What's the pro…
tagged with: mongodb
possible better answer: http://stackoverflow.com/a/26749888
has answer: http://stackoverflow.com/a/26749888
tagged with: javascript
type: AnsweredQuestion
has title: Connection closed by application error when iterating through cursor and updating documents
tagged with: mongodb-query
has answer: http://stackoverflow.com/a/26750847

http://stackoverflow.com/a/26742341
answers question: http://stackoverflow.com/q/26742310
score: 6
downvote count: 0
has body: Should be vertices[x]=vertices[x].replace('v ', ''); Because replace returns value, and doesn't change initial string.
type: Answer
upvote count: 6

http://stackoverflow.com/a/26719908
accepted answer of: http://stackoverflow.com/q/26719186
has comment: http://stackoverflow.com/comment/53638666
answers question: http://stackoverflow.com/q/26719186
has comment: http://stackoverflow.com/comment/42033034
has body: Hmm... in a full-fledged application what I'd do is probably use something like Sinon to check that the method that should throw an error has been called and is throwing. In code where you cannot do this, then the following method would trap the exception: var expect = require("chai").expect; var domain = require("domain"); it('should throw an error', function(done) { var d = domain.create(); d.on('error', function (err) { // Exit the current domain. d.exit(); // We must execute this code at the next tick. process.nextTick(function () { console.log(err); // Just to show something on the console. expect(err instanceof Error).to.be.true; done(); }); }); d.run(function () { process.nextTick(function() { throw new Error('This is my error'); }); }); }); This code creates a "domain" stored in d. A domain will emit error events on uncaught exceptions that happen in it so we run the test inside the domain (d.run(...)) we've created and wait for an exception to happen (d.on('error', ...). We check that it is an Error object. (In a real test, I'd also check the error message.) When we are finished we call done() to tell Mocha that the asynchronous test is over. The handler for error events calls d.exit(). This is to make it so that Mocha can catch the error normally if the assertion (expect(err instanceof Error)...) turns out to fail. If we do not exit the domain, then the domain will trap the error. Also, the check itself must be performed on the next tick to be outside the d domain. Is Using domain A Problem? NO! The documentation for domain comes with some warnings about shutting down operations once an uncaught exception is caught when running an ongoing process, like a server. Then the thing to do is to clean what can be cleaned and exit as soon as possible. However, using domain in a test does not differ from what Mocha is already doing. The way Mocha catches unhandled exceptions in asynchronous code is by using process.on('uncaughtException'. Upon catching an unhandled…
upvote count: 6
score: 4
has comment: http://stackoverflow.com/comment/53640062
downvote count: 2
has comment: http://stackoverflow.com/comment/42032957
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/53640244
type: Answer
has comment: http://stackoverflow.com/comment/53638298

http://stackoverflow.com/q/26708149
linked to: http://stackoverflow.com/q/26609400
tagged with: adobe-analytics
type: UnansweredQuestion
tagged with: adobe
has body: https://i.sstatic.net/elGJz.jpg Hi, I'm using Direct call rule inside DTM. I'm clicking on a href link (opens in a new window). I want to remove/clear the eVars and events associated with the click. I've used custom page code to clear the values. Direct call rule 1> Adobe analytics Tracking setting : s.tl(); - does NOT increment a pageview; Direct call rule 1 > Adobe analytics> Inside custompagecode: s.eVar12 = dataLayer.testString; s.events="event2,event16,event19,event22"; s.tl(this,'o','testClick'); s.events=""; s.eVar12=""; return true; The problem: I have used s.tl() function inside custom page code, which triggers (pe=lnk_o), and by default the direct call rule again triggers(pe=lnk_o). I'm seeing "pe=lnk_o" being triggered twice. How do I clear sticky variables in Direct call rule and without duplicating the request?
has comment: http://stackoverflow.com/comment/42009081
linked to: http://stackoverflow.com/q/25063665
has answer: http://stackoverflow.com/a/27391587
type: Question
has comment: http://stackoverflow.com/comment/42009069
answer count: 1
tagged with: javascript
has title: Sitecatalyst - DTM - Direct call rules - clear sticky variables
score: 0
tagged with: sticky
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42009152

http://stackoverflow.com/a/26744039
accepted answer of: http://stackoverflow.com/q/26742546
has body: You could use the JQUERY scroll function and move the column you want to "freeze" in the opposite way. You also need to set the z-index so the column stays on top of the others. In your css: .frezedCell { z-index: 1000; position:relative; } In your page : $(document).ready(function () { $(".divTableParts").scroll(function () { var divTable = $(".divTableParts"); $(".frezedCell").css("left", 0 + divTable.scrollLeft()); }); });
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42074761
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26742546

http://stackoverflow.com/q/26708541
tagged with: datetime
tagged with: css
has comment: http://stackoverflow.com/comment/42009227
answer count: 0
has body: I want to check that whether the date is changed or not. When I am writing onchange event it is not getting fired. I have made a calendar using js. Below is the code: &lt;form:input path="date" autocomplete="off" htmlEscape="true" id="date" onchange="getDate()"&gt;&lt;/form:input&gt; &lt;A href="javascript:CssCalculator(date,'ddmmyyyy','arrow','true','24','true')" on`&gt; &lt;IMG align="top" height=18 alt="Pick a date" src="images/calendar_button.gif" width=18&gt;&lt;/A&gt;&lt;/TD&gt; Onchange method is not called. It might be because its in different js. If I write onclcik event in then it does not fetches the new date. It gives me the old date only. Can anyone help me with this as I wanted to check that whether the date is changed or not.
has comment: http://stackoverflow.com/comment/42009457
has comment: http://stackoverflow.com/comment/42010040
type: Question
has title: Onchange Event not fired
has comment: http://stackoverflow.com/comment/42009383
has comment: http://stackoverflow.com/comment/42009253
tagged with: javascript
score: 0
tagged with: onchange
has comment: http://stackoverflow.com/comment/42010208
has comment: http://stackoverflow.com/comment/42009208
type: UnansweredQuestion

http://stackoverflow.com/comment/42099464
score: 1
type: AnswerComment
has text: I want to **convert data base64 string to a file and save it** in the mobile device.
type: Comment
comment on: http://stackoverflow.com/a/26758987

http://stackoverflow.com/q/26717937
has title: Instrument code to track each JavaScript invocations
has comment: http://stackoverflow.com/comment/42027310
has comment: http://stackoverflow.com/comment/42027075
has body: With a tool like karma-coverage, we can modify dynamically the javascript AST to get code coverage. Would it be possible to use the same strategy (alter code dynamically) to track each JavaScript invocation and return. Is anybody has an idea how to do that ? I found tools like istanbul or esprima but they are used only for coverage. Update 1 : For each function invocation i want to have : the timestamp of invocation of the function and the timestamp of the end of invocation of the function
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42026160
has answer: http://stackoverflow.com/a/26719038
score: 0
tagged with: instrumentation
answer count: 1
tagged with: trace
has comment: http://stackoverflow.com/comment/42027166
type: UnansweredQuestion

http://stackoverflow.com/q/26825975
favorite count: 0
has answer: http://stackoverflow.com/a/26826104
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26826112
score: 1
accepted answer: http://stackoverflow.com/a/26826113
upvote count: 1
possible better answer: http://stackoverflow.com/a/26826017
type: Question
has answer: http://stackoverflow.com/a/26826017
has title: How to access the asp control using $(this) within the setTimeout() function
tagged with: javascript
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/26826113
has body: I have a list of HTML controls and I need to bind a listener for the keyup event to each of these. Once that is triggered, some other actions should subsequently be kicked off after a time delay. I'm using setTimeout for that. $(".TextBoxClass").each(function () { $(this).keyup(function () { alert("Id = " + $(this)); setTimeout(function () { alert("current Id = " + $(this)) }, 50); }) }) The first alert message shows the correct id of the control which triggers the keyup event. The second alert within the setTimeout says current id = [object][object]. How can I access the control within the setTimeout callback function?
tagged with: asp.net

http://stackoverflow.com/a/26764348
has comment: http://stackoverflow.com/comment/42113635
has body: The value of any floating point value greater than 1 (or less than -1) divided by Number.EPSILON must be an integer. (This is not necessarily true of values exclusively inside the range 1 to -1.) Recall that floating points are a 2-tuple of bit strings (m,e) (mantissa and exponent) where the value of the number they represent is m * 2^e. The mantissa sets the value as a bitstring, and the exponent shifts the bits to a certain power In the current ECMAScript 6 draft, the definition of Number.EPSILON is: the difference between 1 and the smallest value greater than 1 that is representable as a Number value We derive epsilon by taking a mantissa of 1000...0001 (1 in the largest and smallest digits in the mantissa bitstring) and a negative exponent that shifts the mantissa down to the binary value 1.000...0001. Substract the 1, and you have epsilon. Note that this is not the smallest possible floating-point value, but it is the smallest level of precision available to a floating-point value greater than 1 (or less than -1).* As for why you always produce an integer, that easy to explain: epsilon is the smallest possible precision value for numbers greater than 1. It is not possible for epsilon to divide a value greater than 1 unevenly, because that would suggest the number had some fractional part that is smaller than epsilon, which is definitionally impossible (since epsillon is the smallest level of precision for &gt;1 numbers). Feel free to drum on your number pad and divide that number by Number.EPSILON -- you'll see the result is an integer. As for why the results are always powers of 2, this appears to be because all your maximumError results so far have a mantissa that is also a power of 2 (possibly they all have a mantissa of 1), so it's just division between powers of 2 (therefore the result must also be a power of 2). Notice that all of the a values that produce this case are those that have a 1 in the lowest bit, so they are of the form (2^n) + 1 (and 1 itself…
score: 5
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26763595
has comment: http://stackoverflow.com/comment/42111414
answers question: http://stackoverflow.com/q/26763595
has comment: http://stackoverflow.com/comment/42115975
has comment: http://stackoverflow.com/comment/42641364
has comment: http://stackoverflow.com/comment/42643255
has comment: http://stackoverflow.com/comment/42640247
has comment: http://stackoverflow.com/comment/42641561
type: Answer
has comment: http://stackoverflow.com/comment/42640340
upvote count: 5

http://stackoverflow.com/comment/42043722
score: 0
type: Comment
type: QuestionComment
has text: I tried your way. But, `Error: [$ compile: tpload] http:? //errors.angularjs.org/1.3.1/$compile/tpload P0 = header.html` occurs.
comment on: http://stackoverflow.com/q/26726633

http://stackoverflow.com/q/26813914
has answer: http://stackoverflow.com/a/26814125
accepted answer: http://stackoverflow.com/a/26814125
tagged with: node.js
has comment: http://stackoverflow.com/comment/42199602
has body: I am very new to Angular JS and mongod. I want to be able to push a new ingredient field into this page to the specific drink the the + button is on. This is my view My UI This is my .jade file block content div.container-fluid(ng-controller="DrinkController", ng-init="setDrinks( #{JSON.stringify(drinks)} )") div.row div.col-md-2 div.col-md-8 h1.title Edit Drinks div.row div.col-md-3 b Name div.col-md-3 b Filename div.col-md-1 div.col-md-5 b Ingredients div.row.editRow(ng-repeat="drink in drinks | orderBy: 'name'") form(ng-submit="editDrink(drink)") div.col-md-3 input(value="{{drink.name}}", ng-model="drink.name") div.col-md-3 input(value="{{drink.image}}", ng-model="drink.image") div.col-md-1.text-right a(ng-click="addNewIngredientEd()") + div.col-md-4 div.row(ng-repeat="ingredient in drink.ingredients") div.col-md-7 select.mixers(value="{{ingredient.name}}", ng-model="ingredient.name", ng-options="i for i in ingredientsList") div.col-md-4 input.addForm.ingredient(value="{{ingredient.amount}}", ng-model="ingredient.amount", style="width: 100px;") div.col-md-1 a(ng-click="removeIngredientEdit($index)") - div.col-md-1 button.btn Save This is my Related JS $scope.addNewIngredientEd = function () { $scope.newDrink.ingredients.push({ name: '', amount: 0 }); //alert("Hello! I am an alert box!!"); console.log('Added new ingredient Test '); };
has comment: http://stackoverflow.com/comment/42199894
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42199536
type: Question
score: 0
tagged with: mongodb
has title: How to add an Item to scope AngularJS
answer count: 1
tagged with: javascript
tagged with: angularjs

http://stackoverflow.com/comment/42117302
comment on: http://stackoverflow.com/a/26767989
type: Comment
score: 0
type: AnswerComment
has text: it shouldn't be. you should have `{testName: [{log: "log", screenshot: ""},{log: "log", screenshot: ""},{log: "log", screenshot: ""}]}` showing three logs for test `testName`

http://stackoverflow.com/comment/41966291
has text: Exactly that is my problem. I get the results and in javascript $('#confirmForm').empty().append(data); I have a div with id=confirmForm in my second.php. I need when button clicked, open second php with this content
type: Comment
comment on: http://stackoverflow.com/a/26683613
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42090006
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26753266
has text: Thanks! It certainly is a good start for me!
type: AnswerComment

http://stackoverflow.com/comment/98761160
comment on: http://stackoverflow.com/a/44509757
score: 0
type: AnswerComment
type: Comment
has text: You saved my day :)

http://stackoverflow.com/a/26739431
score: 0
has body: You should use document.createElement() example : var para = document.createElement('p'); para.innerText = 'just a random text'; and if you want my advice please use jquery (excellent and simple JavaScript library for document traversal and manipulation and much more )
type: Answer
answers question: http://stackoverflow.com/q/26738715

http://stackoverflow.com/q/26697851
accepted answer: http://stackoverflow.com/a/26697965
favorite count: 0
has answer: http://stackoverflow.com/a/26698042
has title: bootstrap modal not working in dropdown menu
possible better answer: http://stackoverflow.com/a/26698042
answer count: 4
has answer: http://stackoverflow.com/a/65575795
tagged with: twitter-bootstrap
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26697965
upvote count: 5
has body: Bootstrap 3.3 not working moodal link in dropdown menu. JSFiddle Add New Link If I remove this line from js modal works perfect, but dropdown menu collapses after click. Dropdown menu must be opened. $('.dropdown-menu').click(function(e) { e.stopPropagation(); });
type: Question
has answer: http://stackoverflow.com/a/71676706
score: 5
tagged with: modal-dialog
downvote count: 0
tagged with: javascript
tagged with: drop-down-menu
tagged with: jquery

http://stackoverflow.com/a/26746171
upvote count: 4
has body: Real recursion involves functions that call themselves directly or indirectly. This is a recursive function: function factorial(n) { if (n &lt;= 1) return 1; return n * factorial(n - 1); } Your code, however, merely arranges for the system to (sometimes) call your function again some time in the future. By the time that function call happens, the original function call will have finished. (It finishes basically immediately after setting up the timeout.) Thus, at any given time, there's only one call to the function in progress, so there won't be any issues with running out of stack space.
score: 4
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26746021

http://stackoverflow.com/comment/42119285
has text: Here is the image stuff you are looking for: [FIDDLE](http://jsfiddle.net/tomanow/x4afd4zm/3/)
type: Comment
comment on: http://stackoverflow.com/a/26768664
type: AnswerComment
score: 0

http://stackoverflow.com/q/26694332
tagged with: angularjs
tagged with: lodash
downvote count: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41984143
has answer: http://stackoverflow.com/a/26694388
has body: I have a weird plunker here... If I delete the 3rd item in original, total_expenses calculates correctly as 23196. But with the third object, total_expenses is null. Can anyone see something I am missing? total_expenses() uses _.reduce to total the value of an attribute throughout the collection. $scope.loan.total_expenses = _.reduce(original, function(obj){ var grand = 0; grand += obj.cost; return grand; });
score: 1
accepted answer: http://stackoverflow.com/a/26694388
type: Question
has comment: http://stackoverflow.com/comment/41984048
possible better answer: http://stackoverflow.com/a/26694414
answer count: 2
upvote count: 1
tagged with: javascript
favorite count: 0
has title: Lodash works on two objects but returns null if with three objects
has answer: http://stackoverflow.com/a/26694414

http://stackoverflow.com/q/26725196
tagged with: rest
tagged with: angularjs
type: UnansweredQuestion
tagged with: ngresource
upvote count: 0
has title: How to change request method in ngResource?
type: Question
score: -2
tagged with: javascript
downvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/26727782
has comment: http://stackoverflow.com/comment/42044014
favorite count: 0
has body: How modify save method for put, if id specified and post if not? I mean: Posts.save({id: 1, content: "..."}) // PUT /posts/1 Posts.save({content: "..."}) // POST /posts

http://stackoverflow.com/q/26697148
answer count: 1
has answer: http://stackoverflow.com/a/26697351
type: UnansweredQuestion
has title: how to add number to onclick url with javascript
tagged with: numbers
tagged with: onclick
type: Question
has comment: http://stackoverflow.com/comment/41989143
has body: I need your help I'm trying to add number to the onclick url number format of code is like this spox I have in source var group_id = 1; which is defend on what status has user admin, moder, publisher, user or guest each of them has individual number 1, 2, 3, 4, 5 so I need to add by javascript number of group_id in here onclick="ShowProfile('spox', '/user/spox/', '1'); so format of adding number should be after '/user/some user name/' , 'group_id number' I was trying to do this by code $(function(){ attrUserA = $('.info a').attr('onclick'); attrUserA = attrUserA.split(';'); sliceUser = attrUserA[0].slice(0, -1); attrUserA[0] = sliceUser + ", '" + group_id + "')"; attrUserA = attrUserA.join('; '); $('.info a').attr('onclick', attrUserA); }); it works, the script adds number from var group_id = 1; but I have problem with this, because script changes the individual urls in onclick to one so after this if some user had link like this onclick="ShowProfile('spox', '/user/spox/', 'number from group id'); and last message was written by user: blablabla the individual personal urls of other users changed to onclick="ShowProfile('blablabla', '/user/blablabla/', 'number from group id'); how can I just add number and don't touch urls?
tagged with: javascript
score: 0

file
type: Tag
tags question: http://stackoverflow.com/q/26702816
tags question: http://stackoverflow.com/q/26692670
tag name: file
tags question: http://stackoverflow.com/q/26805093
tags question: http://stackoverflow.com/q/26830487
tags question: http://stackoverflow.com/q/26806717
tags question: http://stackoverflow.com/q/26777550

liquid
tags question: http://stackoverflow.com/q/26684685
type: Tag
tag name: liquid
tags question: http://stackoverflow.com/q/26707032

http://stackoverflow.com/q/26735431
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26735534
has answer: http://stackoverflow.com/a/26735754
type: Question
has title: Getting a php variable into javascript
has comment: http://stackoverflow.com/comment/42057270
has comment: http://stackoverflow.com/comment/42057313
score: 2
has answer: http://stackoverflow.com/a/26735672
linked to: http://stackoverflow.com/q/8200620
downvote count: 0
has comment: http://stackoverflow.com/comment/42057888
tagged with: javascript
has comment: http://stackoverflow.com/comment/42057779
has body: Following situation: I have a txt file which contains some text. I read it with PHP via "file_get_contents". Now i want to submit multiple forms with some ajax request. To do this i need to get the variable into JS. var results = "&lt;?php echo htmlspecialchars($results); ?&gt;"; doesnt work. It returns "Unexpected token ILLEGAL" The string itself contains only characters, and maybe a few specials. An example of the content is something like this: Email: MyName@mail.net - Pass: ^s2p3r(s3cr3t&amp; - City: aCity Email: OtherName@mail.net - Pass: ^s2p3r(s3cr3t&amp; - City: anotherCity So why JS cant read that? Thanks EDIT: in the html output it totally got correctly displayed. even with all special charaqcters like ^ , ( or &amp; (i edited the above string to what exactly would allready give me that error)
answer count: 3
has comment: http://stackoverflow.com/comment/42057231
favorite count: 0
accepted answer: http://stackoverflow.com/a/26735672
upvote count: 2
tagged with: php
possible better answer: http://stackoverflow.com/a/26735534
has comment: http://stackoverflow.com/comment/42057570

http://stackoverflow.com/comment/128841636
has text: typeof still returns 'object'
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/40242405

http://stackoverflow.com/q/26783824
tagged with: ajax
tagged with: accordion
has title: Why does jQueryUI accordion not work with divs drawn after ajax call?
has body: I've got a simple jQueryUI Accordion working, which I populate afther the page has loaded. The following code works fine: The html that gets inserted if the page is loaded is this: First Event The first content Second Event The second content The json with which I populate the accordion should however first be taken from an api. So I rewrote the js as can be seen below. Please note that I don't even use the results of the API call. I still use the json which I write in the js.: $(document).ready(function(){ $(function(){ $("#ticket-event-list").accordion({ header: '.event', collapsible: true, active: false, animate: {duration: 150} }); }); document.tickets = { "event1": {"title": "First Event", "content": "The first content"}, "event2": {"title": "Second Event", "content": "The second content"} } function requestTicketsByEvent(){ var requestUrl = "{{ url_for('ajax_ticketsByEvent') }}"; var request = $.ajax({ dataType: "json", url: requestUrl, type: "GET" }); return request; } function ticketsByEventCallback(request){ request.done(function(data){ // Note I don't even use the data returned by the call $.each(document.tickets, function(eventId, eventObj){ var eventHtml = ' '+eventObj.title+' '+eventObj.content+' '; $("#ticket-event-list").append(eventHtml); }); }); } var request = requestTicketsByEvent(); ticketsByEventCallback(request); }); But the resulting html is only as follows: First Event The first content Second Event The second content I also tried using the .accordion() method after I draw the html to the DOM, but that doesn't help either. Moreover, in the first piece of code (which worked fine) the .accordion() method is also used before the html gets drawn to the DOM. Does anybody know why an API call prevents the accordion to work? All tips are welcome!
accepted answer: http://stackoverflow.com/a/26784394
type: AnsweredQuestion
type: Question
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/42144933
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26784394
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/42145039

http://stackoverflow.com/a/26675794
score: 2
has comment: http://stackoverflow.com/comment/41950853
upvote count: 2
has body: Once embedded code is loaded on the site (either hardcodded to source html code or added dynamically by other javascript code) (whether the embedded script originates from the same server as the page, different server or even CDN-etwork doesn't matter) it will be run as a component of the page. The script may collect needed data from page content, cookies, javascript variables defined in page outside said script, it may contact it's own server for additional information using AJAX request. Using said information it will generate html code of wanted form and add it to the page using DOM access. This form may submit filled data to whatever server needed through this window, new blank window, inserted IFRAME window, or using AJAX request. No limitations. But to propose optimal solution, you would need to describe your project vision better.
answers question: http://stackoverflow.com/q/26675206
downvote count: 0
has comment: http://stackoverflow.com/comment/41951531
type: Answer

http://stackoverflow.com/q/26673911
accepted answer: http://stackoverflow.com/a/27326094
type: Question
answer count: 2
has body: I want to know if it is possible create trigger on indexedDB? I searched something about that on "uncle" google but no luck. Someone knows? Thanks in advance.
downvote count: 0
has title: Is it possible create trigger on indexedDB?
favorite count: 0
possible better answer: http://stackoverflow.com/a/26684137
has answer: http://stackoverflow.com/a/26684137
score: 1
upvote count: 1
tagged with: triggers
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27326094
tagged with: indexeddb
tagged with: javascript

http://stackoverflow.com/comment/42062671
has text: Only very few numbers in JS have a leading `+`. You can omit it, and a number will still be positive.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26738172
type: QuestionComment

http://stackoverflow.com/comment/42051304
comment on: http://stackoverflow.com/q/26731903
type: Comment
score: 0
has text: You asked the same question before. Please remove it 1st. I suggest you also ask this question on Ionic Developer forum: http://forum.ionicframework.com/
type: QuestionComment

http://stackoverflow.com/q/26808285
tagged with: css
favorite count: 0
type: AnsweredQuestion
has title: Unable to clear float:left
upvote count: 5
has answer: http://stackoverflow.com/a/26808345
type: Question
score: 5
accepted answer: http://stackoverflow.com/a/26808345
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I have the problem in this JS Fiddle. Main problem is with the float: left property. I have the code which allows to drag and drop the elements which have the float: left property. They are creating the problem when I want to placing the controls parallel in the next div area. The problem is more clear, if you look into the JS Fiddle. Following are the steps to go through Fiddle click on the add div button it divides the red div into the two boxes now drag at least two or three upper controls(e.g firstname, last name) into the left side red box now drag the another control to the right side box Here is the problem, the control in the right side div is placed left to the last control of the left side div. Myhtml.html FirstName : LastName : Web : Mobile : jot : Myjquery.js function makeDraggable() { $(".selectorField") .draggable({ containment: $('body'), helper: "clone", stack: "div", cursor: "move", cancel: null }); } $(function () { var _ctrl_index = 1001; // function docReady() { $(".Resizable").resizable({ handles: 'e' }); makeDraggable(); $(".droppedFields").droppable({ accept: ":not(.ui-sortable-helper)", drop: function (event, ui) { var draggable = ui.draggable; draggable = draggable.clone(); draggable.appendTo(this); // $(ui.draggable).hide(); makeDraggable(); } }); var count = 0; $('.Mybutton').click(function () { count++; if (count < 5) { // alert("aa"); var a = $(" ").appendTo("#Section1"); a.droppable(); a.resizable({ handles: 'e' }); a.droppable({ accept: ":not(.ui-sortable-helper)", drop: function (event, ui) { var draggable = ui.draggable; draggable = draggable.clone(); draggable.appendTo(this); // $(ui.draggable).hide(); makeDraggable(); } }); } else { alert('No more divs to add'); } }); });
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/42221476
type: Comment
comment on: http://stackoverflow.com/a/26825310
has text: Oh, I forgot to empty this.views! Thanks You, mu, very much (-: P. S. `this.collection = options.collection;` is just for clarity, thanks anyway (-:
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42018001
has text: Sadly, we are not allowed to touch AJAX as of yet. jQuery and JS is allowed (but minimal).
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26713484

http://stackoverflow.com/a/26747158
upvote count: 27
has comment: http://stackoverflow.com/comment/105571093
downvote count: 0
has comment: http://stackoverflow.com/comment/79037542
type: Answer
has comment: http://stackoverflow.com/comment/79028396
answers question: http://stackoverflow.com/q/26746982
has comment: http://stackoverflow.com/comment/85729641
has comment: http://stackoverflow.com/comment/134816945
score: 27
has comment: http://stackoverflow.com/comment/85712265
has body: When working with forms, it's always advisable to let the submit button do it's job: TRIGGER THE FORM'S SUBMIT EVENT ... that's what it's meant for. Then you would listen for the submit event on the form rather than the click event on the submit button. You can use event.preventDefault() to prevent default submission of the form so that you can do some house keeping then you can submit the form. $("#submitId").closest('form').on('submit', function(event) { event.preventDefault(); $('#hiddenInput').val(someVariable); //perform some operations this.submit(); //now submit the form }); Or simply, $('form').on('submit', function(event) { event.preventDefault(); $('#hiddenInput').val(someVariable); //perform some operations this.submit(); //now submit the form });

http://stackoverflow.com/q/26710705
favorite count: 0
tagged with: android
score: 2
tagged with: cordova
downvote count: 0
type: UnansweredQuestion
has title: Set Silent Mode programmatically in Android by Phonegap
type: Question
has answer: http://stackoverflow.com/a/26711554
has body: how to set the phone (Android OS) programmatically in silent mode by using Phonegap (JavaScript) is there any plugin or should I create my own plugin if yes How?
upvote count: 2
tagged with: jquery-mobile
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/42033671
score: 0
type: QuestionComment
has text: I'll add it as an answer, thanks. The way to fix the initial draw would be to set `d` to an empty path to begin with (e.g. `pathTween(0)`) before the transition. Oh and I wouldn't have space for a pony ;)
type: Comment
comment on: http://stackoverflow.com/q/26720288

http://stackoverflow.com/comment/41949694
type: AnswerComment
comment on: http://stackoverflow.com/a/26675127
type: Comment
score: 2
has text: This isn't a safe assumption. As soon as you add `{ first_nom: 'greg', value: '-0.000000009' },` you start to see the problem with going down this path.

http://stackoverflow.com/a/27221258
has body: Try my Cuckoo Cycle proof-of-work at https://github.com/tromp/cuckoo Quoting from the README: "Cuckoo Cycle represents a breakthrough in three important ways: 1) it performs only one very cheap siphash computation for each random access to memory, 2) (intended) memory usage grows linearly with graph size, which can be set arbitrarily. there may be very limited opportunity to reduce memory usage without undue slowdown. 3) verification of the proof of work is instant, requiring 2 sha256 and 42x2 siphash computations. Runtime in Cuckoo Cycle is dominated by memory latency (67%)."
downvote count: 0
has comment: http://stackoverflow.com/comment/43097534
has comment: http://stackoverflow.com/comment/74390524
answers question: http://stackoverflow.com/q/26821310
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/43098516
has comment: http://stackoverflow.com/comment/73694354

http://stackoverflow.com/q/26784951
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42161220
tagged with: php
has comment: http://stackoverflow.com/comment/42146762
has answer: http://stackoverflow.com/a/26785048
has body: This is the jQuery code: function Pages(className, contant){ $(className).click(function(){ var x = $(this).attr('rel'); $.post('ajax/pages.php', {'namePage':x}, function(page){ $(contant).html(page); }); return false; }); } Pages('.pageName' , '#contant'); and this is the PHP code: if(isset($_POST['namePage'])){ $page = strip_tags(addslashes($_POST['namePage'])); $url ='contorls/'.$page . ".php"; if($page == 'homepage'){ include_once '../view_pages/homepage.php'; }else{ if(is_file($url)) include_once $url ; else header ('Location: view_design/notfound.php'); } } this is the HTML code: dashbord قسم الموظفين Why does this function work only with the first link?
has title: I don't know what's wrong with this jQuery function
type: Question
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/42148070
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
downvote count: 2

http://stackoverflow.com/comment/64146978
type: AnswerComment
comment on: http://stackoverflow.com/a/38291164
type: Comment
has text: Thanks. [TextDecoder](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder) is very good but is only supported by firefox and chrome. A big shim is required for IE and Safari.
score: 0

http://stackoverflow.com/comment/41969121
has text: @GregBurghardt Ah, I see what you mean now. Doh! I've updated my answer to reflect what you have said here in the comments. Thats something new I've learnt today anyway :) Hope whoever downvoted me sees my change :(
score: 0
comment on: http://stackoverflow.com/a/26685249
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26734191
score: -1
has comment: http://stackoverflow.com/comment/42059847
has comment: http://stackoverflow.com/comment/42063121
type: Question
has comment: http://stackoverflow.com/comment/42061768
answer count: 1
has comment: http://stackoverflow.com/comment/42097948
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/3275816
has title: CrossRider extension not working properly. Is it a bug?
linked to: http://stackoverflow.com/q/10081898
downvote count: 1
has comment: http://stackoverflow.com/comment/42062728
tagged with: browser-extension
has comment: http://stackoverflow.com/comment/42089717
upvote count: 0
type: UnansweredQuestion
has body: We are using CrossRider to develop an extension for Internet Explorer. I'm using debug mode with the following code in extension.js: /************************************************************************************ This is your Page Code. The appAPI.ready() code block will be executed on every page load. For more information please visit our docs site: http://docs.crossrider.com *************************************************************************************/ appAPI.ready(function($) { if (appAPI.isMatchPages("mail.google.com/*")) { alert('mail.google.com'); } else if (appAPI.isMatchPages("*.mail.yahoo.com/*")) { alert('mail.yahoo.com'); } else if (appAPI.isMatchPages("*.mail.live.com/*")) { alert('mail.live.com'); } else if (appAPI.isMatchPages("*.webmail.aol.com/*", "*.mail.aol.com/*", "mail.aol.com/*")) { alert('mail.aol.com'); } else if (appAPI.isMatchPages("http://mail.rambler.ru/mail/compose.cgi*")) { alert('mail.rambler.ru'); } }); I receive the alerts when I open new tabs or refresh pages at https://mail.google.com/mail/?pli=1#inbox, https://us-mg6.mail.yahoo.com/neo/launch?.rand=ch8u1egr4gthf and https://mail.aol.com/38815-816/aol-6/en-us/suite.aspx, but when I open a tab at https://bay180.mail.live.com/default.aspx - I receive the alert only when I open a new tab, not when I refresh the page (I didn't check http://mail.rambler.ru/mail/compose.cgi). What is the problem? Is it a bug in CrossRider or is it a feature? I don't understand why there is no alert when refreshing the page.
tagged with: crossrider
has comment: http://stackoverflow.com/comment/42090572
has comment: http://stackoverflow.com/comment/42057335
has answer: http://stackoverflow.com/a/26935046
has comment: http://stackoverflow.com/comment/42062661

http://stackoverflow.com/comment/42102192
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26759981
has text: It doesn't do what? Seems like it plays the video, and all the controls work. It's not a drop-in; you'll have to fiddle with it (pun intended).
type: Comment

http://stackoverflow.com/comment/81028857
has text: This appears to be the best solution for all browser support.
type: Comment
comment on: http://stackoverflow.com/a/46269007
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42248740
has text: If I am understanding you correctly then yes, the function you suggest would be suitable... and greatly appreciated :)
type: Comment
comment on: http://stackoverflow.com/a/26840418
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42138770
type: QuestionComment
comment on: http://stackoverflow.com/q/26765819
score: 0
has text: It is very easy to get the dates of previous, current and next day. By the way in which format do you want the date's? I'm asking because I am not able to understand the format mentioned in [cerovaro](http://cerovaro.com). Should the format be like, "Thursday 6 Nov, 2014" or something like that?
type: Comment

http://stackoverflow.com/a/34512427
type: Answer
has body: // npm i --save-dev gulp-tape // npm i --save-dev faucet (just an example of using a TAP reporter) import gulp from 'gulp'; import tape from 'gulp-tape'; import faucet from 'faucet'; gulp.task('test:js', () =&gt; { return gulp.src('src/**/*test.js') .pipe(tape({ reporter: faucet() })); });
answers question: http://stackoverflow.com/q/26818795
score: 0

http://stackoverflow.com/comment/42087381
has text: I think that will work, however, I am beginning to think that the most robust option would be to have a StudentReadOnlyViewModel and StudentEditViewModel. That (your suggestion) will work if we always have the collection of country on the View Model or in an InitViewModel.
type: Comment
comment on: http://stackoverflow.com/q/26751679
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42093430
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26754974
has text: its showing this div for every items condition is not working
score: 0

http://stackoverflow.com/comment/42055676
comment on: http://stackoverflow.com/a/26733340
type: AnswerComment
score: 0
type: Comment
has text: Oh oops. Sorry, I didn't notice the button! My mistake. Did try it now, though. But there's still lag. Does it work for you?

http://stackoverflow.com/a/26788642
score: 0
accepted answer of: http://stackoverflow.com/q/26782543
type: AcceptedAnswer
has body: I found out that all I had to do was add a $timeout surrounding my directive, and it would wait until the view was rendered! here is the result and it works: var myApp = angular.module("mainModule"); myApp.directive("cndPaginateTable", function ($timeout) { return { restrict: 'A', templateUrl: 'Templates/Directives/paginatedTable.html', scope: { cndDefaultPageLength: '@', cndShowEnds: '@' }, transclude: true, link: function (scope, element, attrs) { $timeout( function () { scope.cndDefaultPageLength = scope.cndDefaultPageLength === undefined ? 5 : scope.cndDefaultPageLength; var rowCount = $(element).children('div').children('tbody').children('tr').length; //how many rows are in main table (excluding any rows in nested tables) var numberOfPages = Math.ceil(rowCount / scope.cndDefaultPageLength); scope.cndShowEnds; scope.cndPageNumbers = []; scope.max = 0; $(element).find('*').children('tr').each(function () { //find the number of columns in the main table var count = $(this).children('td').length; if (count &gt; scope.max) { scope.max = count; } }); for (var i = 1; i &lt;= numberOfPages; i++) { scope.cndPageNumbers.push(i); } }, 0); console.log(scope.cndPageNumbers); } } });
type: Answer
answers question: http://stackoverflow.com/q/26782543

http://stackoverflow.com/q/26721454
has comment: http://stackoverflow.com/comment/42032834
has title: Get data as response from php script on server
type: AnsweredQuestion
upvote count: 0
has body: I'm sending some data(options) via POST with javascript to a php script that's on my server, which does a mysql query and should return data back to the current page. This is the jquery code I'm using - $.post( "contact.php", {min_age:"25"}) .done(function(data) { console.log(data); }); Now I've got the required data extracted from mysql and encoded it to json, and stored it in a variable in my php script in server. How do I post it back to the current page?
has comment: http://stackoverflow.com/comment/42032979
has comment: http://stackoverflow.com/comment/42032960
tagged with: php
has comment: http://stackoverflow.com/comment/42032897
type: Question
score: -1
tagged with: mysql
has answer: http://stackoverflow.com/a/26721608
accepted answer: http://stackoverflow.com/a/26721608
has comment: http://stackoverflow.com/comment/42033005
has comment: http://stackoverflow.com/comment/42032860
has comment: http://stackoverflow.com/comment/42032945
answer count: 1
downvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/42165947
comment on: http://stackoverflow.com/a/26795784
has text: @jfriend00 Please see [this question](http://stackoverflow.com/q/12735778/1841194)
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41964904
score: 0
type: AnswerComment
type: Comment
has text: Thanks... silly mistakes from my side... now i am understanding the concept. thank you very very much. god bless. Is there a way to accept two answers as jacob has also put in lot of efforts...
comment on: http://stackoverflow.com/a/26681907

http://stackoverflow.com/q/26804228
tagged with: css
has comment: http://stackoverflow.com/comment/42181914
has answer: http://stackoverflow.com/a/26804301
upvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42182037
downvote count: 3
has body: I have mobile optimised several sites in the same way using media queries - most are working fine on phones but two insist on always detecting a screen.width of 800px, no matter how small the actual device is. Working correctly: www.accountex.co.uk, www.legalex.co.uk, www.takeawayexpo.co.uk, www.streetfoodlive.co.uk Detecting wrong screen size but only on mobile devices: www.greatbritishbusinessshow.co.uk, www.bstartup.com Even though the methods used are almost identical. The above two show correctly on all online mobile simulators, BUT use the media query for a screen width of 800px when loaded on actual mobile devices even when the device is 320x480 or otherwise very small. Using console.log or alert these two sites always return 800px as the when alert(screen.width) is invoked - no idea how this can happen on a tiny device! Thanks for your help!
has title: Web site causing browser to find the "wrong" screen width
type: Question
tagged with: media-queries
tagged with: javascript
tagged with: mobile
answer count: 1
favorite count: 0
score: -3

http://stackoverflow.com/a/26838518
type: Answer
upvote count: 3
has body: Your code uses the "promise" library which to be fair is very memory hoggy and was not really built for raw performance. If you switch to Bluebird promises you can get considerably more items in RAM as it will drastically reduce your memory usage. Here are benchmark results for doxbee-sequential: results for 10000 parallel executions, 1 ms per I/O op file time(ms) memory(MB) promises-bluebird.js 280 26.64 promises-then-promise.js 1775 134.73 And under bench parallel (--p 25): file time(ms) memory(MB) promises-bluebird.js 483 63.32 promises-then-promise.js 2553 338.36 You can see the full benchmark here.
score: 3
answers question: http://stackoverflow.com/q/26747508
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26747508

http://stackoverflow.com/comment/42043095
type: QuestionComment
has text: Assuming the issue is caused by saving templates from within wordpress admin either put the code in an external file, or update it by ftp
comment on: http://stackoverflow.com/q/26726676
score: 0
type: Comment

http://stackoverflow.com/a/26770371
score: 1
has body: var down = event.type == "keydown"; is exactly the same as var down; if ( event.type == "keydown" ) { down = true; } else { down = false; } If your question is about something else, then please indicate so.
answers question: http://stackoverflow.com/q/26770320
type: Answer
accepted answer of: http://stackoverflow.com/q/26770320
upvote count: 1
has comment: http://stackoverflow.com/comment/42122552
has comment: http://stackoverflow.com/comment/42142245
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26824653
tagged with: header
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: css
score: 1
tagged with: fixed
has title: Trying to create an offset using javascript and a fixed headbar
type: Question
has answer: http://stackoverflow.com/a/26824851
tagged with: javascript
has body: I was trying to calculate the size of a fixed header with an ID "headbar" so that I could use the value to create an offset for the main page. The javascript code seems to be working- at least the console.log seems to be okay. However, the css doesn't update and I don't know why. Can someone help me out? Here's the javascript. headresize(); window.addEventListener('resize', headresize); function headresize(){ var h = document.getElementById("headbar").clientHeight; document.getElementById("logo").style.paddingtop = h+"px"; var c = document.getElementById("logo").style.paddingtop; console.log(h+"px"); console.log(c); }
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/42197167
type: Comment
comment on: http://stackoverflow.com/a/26812448
type: AnswerComment
has text: @Jessie: Look at the code. It says, "For each customer, loop. If the status is equal to this status type, add that status to the end of the message." Think about what you want. You want to say "Bill, John, Jane"? You need to create a message that has the names of the customers and not the status.
score: 0

textarea
tags question: http://stackoverflow.com/q/26797043
tags question: http://stackoverflow.com/q/26793606
tags question: http://stackoverflow.com/q/26766286
tag name: textarea
tags question: http://stackoverflow.com/q/26812968
tags question: http://stackoverflow.com/q/26743083
tags question: http://stackoverflow.com/q/26741736
tags question: http://stackoverflow.com/q/26805253
type: Tag
tags question: http://stackoverflow.com/q/26764508
tags question: http://stackoverflow.com/q/26706586

http://stackoverflow.com/a/26818718
has comment: http://stackoverflow.com/comment/42207782
has comment: http://stackoverflow.com/comment/42207998
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42208571
has comment: http://stackoverflow.com/comment/42207964
has comment: http://stackoverflow.com/comment/42207640
type: Answer
accepted answer of: http://stackoverflow.com/q/26818642
answers question: http://stackoverflow.com/q/26818642
has comment: http://stackoverflow.com/comment/42207910
score: 0
upvote count: 1
downvote count: 1
has body: It looks like you need to set the selected color to the text box in the Javascript section, change this: if(val=='pick a color'||val=='others'){ //Always use curly brackets element.style.display=''; element.value = ''; } else { element.style.display='none'; element.value = val; }
has comment: http://stackoverflow.com/comment/42208031

http://stackoverflow.com/comment/42154515
comment on: http://stackoverflow.com/a/26789139
type: Comment
has text: Wow, I never knew that `nth-last-child` existed.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26706898
has body: I think the trouble is with you controller try using this and also can you please elaborate the trouble.Does your APIcontroller is never found by your controller ? public class Oders : ApiController // in your controller class { public HttpResponseMessage Post(PurchaseOrderDetails newOrder) { //your code } }
type: Answer
has comment: http://stackoverflow.com/comment/42007251
answers question: http://stackoverflow.com/q/26705110
has comment: http://stackoverflow.com/comment/42007855
has comment: http://stackoverflow.com/comment/42007329
has comment: http://stackoverflow.com/comment/42007797
score: 0
has comment: http://stackoverflow.com/comment/42022791
has comment: http://stackoverflow.com/comment/42007878

http://stackoverflow.com/comment/42057618
type: Comment
has text: Yes sure but in this case the value expected is an array so there is few chances for having a 0 or NaN but you are right
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26735478

http://stackoverflow.com/a/26711965
answers question: http://stackoverflow.com/q/26711878
type: AcceptedAnswer
score: 0
type: Answer
has body: ^[a-zA-Z0-9_@]+$ or ^[\w@]+$ Here this will enable you to put in @ symbol as it is inside the charracter class.
accepted answer of: http://stackoverflow.com/q/26711878

http://stackoverflow.com/comment/42002796
has text: I think his problem is that there is only one textarea he doesn't want to serialize, and he doesn't want to put a class on all the others.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26704923

http://stackoverflow.com/q/26687193
score: 1
has body: I want to retain submitted values in input fields after form submission. When I open again it shows nothing and I know reason is that it generates a new one everytime. Is there way to do it? Code I tried given below: function openEditSummaryPoPup(clickHandle,contentHandle,width,height) { width = typeof a !== 'undefined' ? a : 600; height = typeof b !== 'undefined' ? b : 300; $.fancybox( $(contentHandle).html(), { 'width' : width, 'height' : height, 'minWidth' : width, 'minHeight' : height, 'autoScale' : true, 'transitionIn' : 'none', 'transitionOut' : 'none', 'hideOnContentClick': false, 'beforeLoad': function () { console.log("Content of globalvar = "+globalvar) $(".fancybox-wrap .content #txtEditSummary").val('Goodbye Folks!!') //doesnt work $(" #txtEditSummary").val('Goodbye Folks in Edit!!') //doesnt work }, 'beforeClose': function() { globalvar = 'Goodbye Folks in Edit!!'; $(".fancybox-wrap .content #txtEditSummary").val('Goodbye Folks!!') //doesnt work $(" #txtEditSummary").val('Goodbye Folks in Edit!!') }, afterLoad: function () { console.log("Loading..."+$("#txtEditSummary").val()); console.log($(".fancybox-wrap .content #txtEditSummary").val()); $(".fancybox-inner").on("click", "#btnClose", function () { parent.$.fancybox.close(); }); $(".fancybox-inner").on("click", "#btnEdit", function () { var inputSummary = $(".fancybox-wrap .content #txtEditSummary").val(); var event_id = $(".fancybox-wrap .content #event_id").val(); $.post( "/event/update/", { summary: inputSummary, id: event_id },function( data ) { $("#summary").html(inputSummary); updatePOPUPFields({field:'txtEditSummary',value:inputSummary}); } ); parent.$.fancybox.close(); }); } } ); }
type: Question
accepted answer: http://stackoverflow.com/a/26698125
tagged with: javascript
has answer: http://stackoverflow.com/a/26698125
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: fancybox
type: AnsweredQuestion
has title: How to persist values in input fields after closing Fancybox Popup?
downvote count: 0

http://stackoverflow.com/comment/62726450
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26827427
type: AnswerComment
has text: Great idea, I was able to pass an IWebElement method to my javascript using this method.

http://stackoverflow.com/comment/42031845
type: Comment
has text: If it's jQuery, this won't help much because ALL the actual event listeners will just point to jQuery internals.
type: AnswerComment
score: 4
comment on: http://stackoverflow.com/a/26720983

http://stackoverflow.com/q/26786774
tagged with: forms
has body: I have a link and when the user clicks the link, I need to submit a form which will call a controller in my servlet. Here is the jQuery code: HTML: Vehicle Availability Report jQuery: $("#vehreport").click(function(e) { alert('Hi') $("#vehiclereportform").submit(); e.preventDefault(); }); The form gets submitted but the controller is not called. There is no action once it displays "Hi".
tagged with: servlets
score: 0
answer count: 1
tagged with: jsp
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26786860
has comment: http://stackoverflow.com/comment/42151462
type: UnansweredQuestion
has title: Submit a form through Jquery to servlet
type: Question

http://stackoverflow.com/q/26791289
has title: Node.js connecting to a mongodb
downvote count: 0
tagged with: javascript
tagged with: express
has answer: http://stackoverflow.com/a/26791657
answer count: 1
has body: I have been following this tutorial to try and get mongodb node.js, express, and jade to work together, but I can not for the life of me get the program to access any information from the database. here is the code in app.js that is supposed to access the database. var mongo = require('mongodb'); var monk = require('monk'); var db = monk('localhost:27017/nodetest1'); ....a few lines down.... app.use(function(req,res,next){ req.db = db; next(); }); here is the code handling the routes: /* GET Userlist page. */ router.get('/userlist', function(req, res) { var db = req.db; var collection = db.get('usercollection'); collection.find({},{},function(e,docs){ res.render('userlist', { "userlist" : docs }); }); }); And here is the code in userlist.jade: it is designed to purely figure out what the contents of userlist are. It is supposed to contain the information in the database (which has 3 entries with 2 pieces of data for each). I have other jade code from an example online that runs and is essentially just a 'Hello World' program. doctype html html(lang="en") head title= pageTitle body #{userlist} the page outputs to this: &lt;[object Object],[object Object],[object Object]&gt; This explains why I was getting errors looping through the data, but what I need help with is getting the program to actually get the proper information from the database. Extra information: I can access the database through command prompt and view the data I put it. I am using Windows 8.1 Update: code that makes it work! index.js (route handler): /* GET Userlist page. */ router.get('/userlist', function(req, res) { var db = req.db; var collection = db.get('usercollection'); collection.find({},{},function(e,docs){ res.render('userlist', { "userlist" : docs }); }); }); userlist.jade extends layout block content h1. User List ul each user, i in userlist li a(href="mailto:#{user.email}")= user.username I'm not sure exactly why this is working now because I did a lot of testing to make sure I was send…
favorite count: 0
has comment: http://stackoverflow.com/comment/42158823
has comment: http://stackoverflow.com/comment/42158663
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26791657
score: 1
upvote count: 1
type: Question
tagged with: mongodb

http://stackoverflow.com/comment/42227995
type: QuestionComment
comment on: http://stackoverflow.com/q/26830535
has text: @Teemu Its a search box where user enters product name and click on search button. Then table need to be displayed which is not working. Would be great if you share your knowledge with me to fix this
score: 0
type: Comment

http://stackoverflow.com/comment/42039747
type: Comment
comment on: http://stackoverflow.com/a/26725219
score: 0
has text: understood, personally I prefer less crap in the html and also easier to test with variables
type: AnswerComment

http://stackoverflow.com/comment/42110953
type: Comment
has text: yes, but you said "loop through all the values, ... not the key". that's completely backwards
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26764998

http://stackoverflow.com/comment/41984941
score: 0
type: Comment
has text: It's still not loading and when I run it in the console I get this error message Uncaught SyntaxError: Unexpected token < count.json?source=6&url=http%3A%2F%2Flocalhost%3A3000%2F&callback=jQuery110206636320280376822_14148…:1 Uncaught SyntaxError: Unexpected token <
type: AnswerComment
comment on: http://stackoverflow.com/a/26694823

http://stackoverflow.com/a/26744334
answers question: http://stackoverflow.com/q/26744212
downvote count: 2
type: Answer
has body: You are grabbing every single element on the page that has the class payment. This might give you inputs, or divs, etc. You want that exact &lt;input&gt;, place a id on it. You are attempting to alert the event-object as @Quentin has pointed out, read his comment If you want to get the value of a input like this, you're going to have to write: $(*get input*).val() If you wanted to test the printing out of an object, alert() is not the function to use. Try console.log( *object* )
has comment: http://stackoverflow.com/comment/42074469
upvote count: 0
score: -2

http://stackoverflow.com/a/63754211
upvote count: 0
has body: The destination will have the same directory structure as the source.
type: Answer
downvote count: 1
score: -1
answers question: http://stackoverflow.com/q/26784094

http://stackoverflow.com/q/26702255
has comment: http://stackoverflow.com/comment/41999187
accepted answer: http://stackoverflow.com/a/26741314
tagged with: facebook
has body: I get the feeling this should be easy but I can't get anything to work. I've created an app on Facebook for my website. I've set my site URL and made my app public. According to the instructions I should add this code near the top of my body &lt;script&gt; window.fbAsyncInit = function() { FB.init({ appId : 'MY_APP_ID', 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; Then I can embed plugins like this: &lt;div class="fb-like" data-share="true" data-width="450" data-show-faces="true"&gt; &lt;/div&gt; When I do this I don't see any content inside the fb-like div. I dug a little deeper and it seems that the sdk.js file that should be pulled in by the first bit of code is not. Instead the //connect.facebook.net/en_US/sdk.js URL returns a 307 Internal Redirect to about:blank. I've cleared my cache and I've tried this code on localhost as well as on my actual domain and I changed the site URL to match. What am I doing wrong?
has comment: http://stackoverflow.com/comment/41999171
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42002197
has comment: http://stackoverflow.com/comment/42017897
type: Question
has title: How can I embed a Facebook Like Box in my website?
has comment: http://stackoverflow.com/comment/41997951
tagged with: javascript
tagged with: facebook-like
has answer: http://stackoverflow.com/a/26741314
has answer: http://stackoverflow.com/a/65932805
score: 0
has comment: http://stackoverflow.com/comment/41999594
answer count: 2
possible better answer: http://stackoverflow.com/a/65932805
has comment: http://stackoverflow.com/comment/41999346

http://stackoverflow.com/q/26808137
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/42189077
tagged with: regex
type: UnansweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26808278
has body: I think this is easier explained with some examples so... "*X*helXlo** my \\X world" => "*X*helXlo** my \\X world" "**helXlo** my \\X world" => "hello my \\X world" That is I sort of want something like str.replace(/(X)?\*(X)?\*(.*)\*(X)?\*(X)?/g, "$1*$2*$3*$4*$5"); but ideally less ugly (looking more like the natural replace(/(\*\*.*\*\*)/g, "$1")). Is this possible?
has title: Run a regex replace while ignoring (but preserving) a certain character
tagged with: javascript

http://stackoverflow.com/q/26689302
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41975567
has comment: http://stackoverflow.com/comment/41975528
has comment: http://stackoverflow.com/comment/41975617
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26689456
favorite count: 0
has comment: http://stackoverflow.com/comment/41975638
has comment: http://stackoverflow.com/comment/41975864
has comment: http://stackoverflow.com/comment/41975526
linked to: http://stackoverflow.com/q/244777
type: AnsweredQuestion
has title: Are comments allowed in a javascript variable declared in JSON like notation?
upvote count: 2
accepted answer: http://stackoverflow.com/a/26689456
downvote count: 1
type: Question
has body: Comments aren't allowed in JSON files (as seen in this answer). So, my question is if comments are allowed in javascript object declaration (in JSON like notation). Example: var myObject = { prop1: 'value1', // prop1 description prop2: 'value2' /* prop2 description */ } Is this guaranteed to work or its browser dependent?
score: 1

http://stackoverflow.com/comment/42166627
type: Comment
comment on: http://stackoverflow.com/q/26795460
type: QuestionComment
has text: @Kartikeya Its not working combobox not able to add it again
score: 0

http://stackoverflow.com/comment/41995626
score: 0
has text: It is and I am under the impression that this is how it's supposed to be in order to get a proper result.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26698440

http://stackoverflow.com/q/26694987
tagged with: forms
has comment: http://stackoverflow.com/comment/41985287
answer count: 2
has answer: http://stackoverflow.com/a/26695114
upvote count: 0
favorite count: 0
tagged with: ajax
tagged with: angularjs
type: UnansweredQuestion
tagged with: xmlhttprequest
has comment: http://stackoverflow.com/comment/41985302
has body: Search form xmlhttprequest works fine. is there any option to use this function while typing instead of submit form ? function customersController($scope, $http) { $scope.search = function() { $scope.url = 'http://www.vanmaram.com/json_result.php?en=' + $scope.keywords; $http.get($scope.url). success(function(data, status) { $scope.status = status; $scope.data = data; $scope.result = data; // Show result from server in element }). error(function(data, status) { $scope.data = data || "Request failed"; $scope.status = status; }); }; } {{ word }}
has answer: http://stackoverflow.com/a/26715064
has title: xmlhttprequest function while typing instead of form submit
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41985189
tagged with: javascript
score: -1

http://stackoverflow.com/q/26694364
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26722927
tagged with: http://stackoverflow.com/tag/json
type: Question
linked to: http://stackoverflow.com/q/4925760
has title: How to use jsawk to extract value from property of json object with non alpha numeric characters
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jsawk
favorite count: 0
has answer: http://stackoverflow.com/a/26722927
linked to: http://stackoverflow.com/q/9644605
has body: Example json file content in file /tmp/t [ { "name:first" : "trevor", "last" : "wellington", "from" : "england", "age" : 52, "sports" : [ "rugby", "badmitton", "snooker" ] }, { "name:first" : "yoni", "last" : "halevi", "from" : "israel", "age" : 26, "sports" : [ "soccer", "windsurfing" ] }, { "name:first" : "cory", "last" : "parker", "from" : "united states", "age" : 31, "sports" : [ "windsurfing", "baseball", "extreeeeme kayaking" ] } ] This works fine cat /tmp/t | jsawk -n 'out(this.last)' But this does not cat test.json | jsawk -n 'out(this.name:first)' Likely related to: Selecting a JSON object with a colon in the key and How do I access these weird JSON items with jQuery? But cat test.json | jsawk -n 'out(this.name[':first'])' does not work either
upvote count: 2

http://stackoverflow.com/a/26753208
has comment: http://stackoverflow.com/comment/42090348
type: Answer
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/42090322
has body: var statements are hoisted. function declarations are hoisted. Assignments are not hoisted (to the extent that if you combine a var statement with an assignment (var foo = 1) then the declaration part is hoisted but the assignment is not).
score: 4
answers question: http://stackoverflow.com/q/26753166

http://stackoverflow.com/a/26831923
has comment: http://stackoverflow.com/comment/42230433
has body: Just have different images in different class, based on the selection you can show the class. .red { background-image:"img1.png"; } .green { background-image:"img2.png"; } .blue { background-image:"img3.png"; } NOw the script will be as you expected $("select").change(function() { $("select option:selected").each(function() { if ($(this).attr("value") == "Oone") { $(".box").hide(); $(".red").show(); } if ($(this).attr("value") == "Otwo") { $(".box").hide(); $(".green").show(); } if ($(this).attr("value") == "Othree") { $(".box").hide(); $(".blue").show(); } });
has comment: http://stackoverflow.com/comment/42230480
score: 0
answers question: http://stackoverflow.com/q/26831696
type: Answer

http://stackoverflow.com/q/26726846
tagged with: css
has title: Javascript show hide dropdown doesn't work well
has answer: http://stackoverflow.com/a/26727163
downvote count: 3
score: -1
type: Question
tagged with: javascript
tagged with: jquery
has body: i have custom show hide dropdown menu, what i want is if i click the button, the list of options is showed, and when i click outside div or click the button again, list is hidden. My problem is when i click the button to show the list then click outside the div to close it, the list will only show again if you click it twice (rather than the usual which is to click it once) $(document).ready(function (e) { $('.option_down').hide(); var state = ""; $('.select_down').click(function (e) { // hide all span var $this = $('#options' + $(this).attr('target')); $(".option_down").not($this).hide(); // here is what I want to do if (state === '#options' + $(this).attr('target')) { $this.hide(); state = ""; } else { $this.show(); state = '#options' + $(this).attr('target'); } e.preventDefault(); }); //ini aku pindah di document.ready $('.option_item_gender').on('click', function () { textGender = $('#gender' + $(this).attr('optionGender')).text(); $("#select_gender").val(textGender); $('.option_down').hide(); //trus aku tambahi koding dibawah biar tau kalau nutup semua state = ""; }); $('.option_item_city').on('click', function () { textCity = $('#city' + $(this).attr('optionCity')).text(); $("#select_city").val(textCity); $('.option_down').hide(); state = ""; }); }); $(document).mouseup(function (e) { var container = new Array(); container.push($('.option_down')); $.each(container, function (key, value) { if (!$(value).is(e.target) &amp;&amp; $(value).has(e.target).length === 0) { $(value).hide(); } }); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div class="row"&gt; &lt;div class="large-8 medium-8 columns padding0" style="padding:0px;"&gt; &lt;input type="text" id="select_gender" name="select_gender" class="search-box" placeholder="SELECT YOUR GENDER"&gt; &lt;/div&gt; &lt;div class="large-4 medium-4 columns padding0" style="float: left;"&gt; &lt;a href="#"&gt;&lt;img src="webroot/images/select_down.png" target="…
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/42042658
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/42042679
type: UnansweredQuestion

http://stackoverflow.com/comment/42212704
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26821606
has text: What browsers are you intending to support?
score: 0

http://stackoverflow.com/comment/42174240
type: QuestionComment
comment on: http://stackoverflow.com/q/26800119
score: 0
has text: http://i.imgur.com/QwIdTab.png This seems the right way to do it, but I'm using SOAP not OArth
type: Comment

http://stackoverflow.com/comment/42115774
has text: Durp, you're at rootScope u can't emit higher
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26766824

http://stackoverflow.com/q/26683570
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Why does not my javascript file apply to my HTML in Visual Studio?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41965763
tagged with: visual-studio
has comment: http://stackoverflow.com/comment/41966498
answer count: 0
has body: I am working on a very simple ASP.NET project in Visual Studio 2013. I added an HTML, a CSS and JS file(each empty). I created the links in between the the pages, and I put them into the same folder. Analog Clock I figured out, that I didn't mispelt anything, but my js doesn't apply on the HTML. My HTML body: <circle id="clock-face" cx="70" cy="70" r="65" /> <line id="h-hand" x1="70" y1="70" x2="70" y2="38" /> <line id="m-hand" x1="70" y1="70" x2="70" y2="20" /> <line id="s-hand" x1="70" y1="70" x2="70" y2="12" /> <line id="s-tail" x1="70" y1="70" x2="70" y2="56" /> 12 3 6 9 And my javascript is: function setAttr(id, value) { var v = 'rotate(' + val + ',200,200);'; document.getElementById(id).setAttribute('transform', v); }; setAttr('s-hand', 30); I tried to drag it on my HTML page, but it doesn't make any difference(besides it puts it to the code:) Any idea? Thanks in advance. Apologies for the dumb question, but I don't know what I am doing wrong.
has comment: http://stackoverflow.com/comment/41965913
has comment: http://stackoverflow.com/comment/41965881
type: Question
has comment: http://stackoverflow.com/comment/41966088
tagged with: hyperlink

http://stackoverflow.com/comment/42236700
has text: Who ever are looking at this answer. There is some pretty good explanation given below by @salman. Please check it out
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26749781
type: Comment

http://stackoverflow.com/a/26682743
has comment: http://stackoverflow.com/comment/41964619
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26682196
accepted answer of: http://stackoverflow.com/q/26682196
upvote count: 1
has body: You have provided the message for required error, but you haven't marked the input as required. That's why it is evaluated as valid on first load. After adding required attribute, you won't need using ng-if for ng-messages. The final solution should look like this: Title This is required Should be longer than 5 characters Should be shorter than 140 characters Submit Plunker for this.
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/42022367
comment on: http://stackoverflow.com/q/26716000
type: Comment
type: QuestionComment
has text: Check your JS console (e.g. shift-ctrl-J in FF/Chrome). Look for syntax errors. And you should switch to using a [HEREDOC](http://php.net/heredoc) for this. Better to use a heredoc and NOT have to escape all those quotes.
score: 2

http://stackoverflow.com/comment/42113793
type: QuestionComment
comment on: http://stackoverflow.com/q/26759490
has text: Why are you json encoding your arrays before your comparison loop?
score: 0
type: Comment

http://stackoverflow.com/a/26805130
has comment: http://stackoverflow.com/comment/42183400
has body: Why not to validate before submission using some jQuery or JS? Check this for checkBox validation check here and if you want to do that using PHP(not a good move) then this Thread will be helpful. but I prefer to do this using JS
answers question: http://stackoverflow.com/q/26804792
score: 0
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42183600
type: Answer

http://stackoverflow.com/comment/42142166
type: Comment
comment on: http://stackoverflow.com/a/26781986
has text: For such a general question you cannot get a better answer. It is not strange when something does not work in all browsers, it happens often. I am sure `mmenu` works fine in IE, so the problem is on your side. For details you would have to provide info, would be glad to help.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26696024
tagged with: wordpress
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42008181
type: Question
has answer: http://stackoverflow.com/a/26748019
tagged with: javascript
has comment: http://stackoverflow.com/comment/42027124
has comment: http://stackoverflow.com/comment/42006064
score: 0
has comment: http://stackoverflow.com/comment/42062172
answer count: 1
has comment: http://stackoverflow.com/comment/42080695
tagged with: jquery
has comment: http://stackoverflow.com/comment/41987078
favorite count: 0
has comment: http://stackoverflow.com/comment/42032233
accepted answer: http://stackoverflow.com/a/26748019
has comment: http://stackoverflow.com/comment/42047148
has body: I'm trying to debug an error on this site: www.naijastories.com. When I click on the 'Donate' link on this page, nothing happens, even though a pop-up is supposed to appear. Digging deeper and using the IE developer function, I see that the following error is reported: "Object doesn't support property or method 'prompt'" The object in this case is the jQuery object, and the error occurs in the /wp-content/plugins/cubepoints/modules/donate/donate.js file. The line with the error is var $imp = jQuery.prompt(donatePrompt); prompt is the missing property. This is strange, because the prompt property is set in the first line of another js file - /wp-content/plugins/cubepoints/modules/donate/jquery.impromptu.4.0.min.js - which is loaded just before the donate.js file is loaded. Is the problem that the donate.js file is not seeing what has been done in the jquery.impromptu.4.0.min.js file? How do I find out why the jQuery global is not being properly populated with the prompt property?
has comment: http://stackoverflow.com/comment/42076951
has comment: http://stackoverflow.com/comment/42026789
type: AnsweredQuestion
has title: jQuery error with script referencing another script

http://stackoverflow.com/comment/42177900
has text: doesn´t work, i tried this right now. It says "Uncaught ReferenceError: removeElements is not defined" (1) "onclick" (2)
comment on: http://stackoverflow.com/q/26802224
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26674298
tagged with: quicktime
downvote count: 1
type: Question
tagged with: mobile
tagged with: ios
tagged with: javascript
has answer: http://stackoverflow.com/a/26675267
score: -1
has body: Apple used to limit our ideas on its platform. My concern here is how we could addEventListener which trigger on "click" event within QuickTime player using JavaScript. Suppose we open the video from HTML5 video tag.
answer count: 2
tagged with: iphone
has answer: http://stackoverflow.com/a/26674553
upvote count: 0
has title: Hacking QuickTime player on iPhone's safari with JavaScript
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/42123140
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26771204
score: 0
has text: If you can create a plunker reproducing the issue, I'll take a look. At this point, based on your post, I'm not sure you have a problem, assuming I've interpreted your post correctly. Have you consider making the change that @NewDev suggested with changing `ng-model="email"` to `ng-model="email.email"`

http://stackoverflow.com/q/26766286
tagged with: textarea
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42121842
has comment: http://stackoverflow.com/comment/42113543
has comment: http://stackoverflow.com/comment/42144285
has comment: http://stackoverflow.com/comment/42148594
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42113618
linked to: http://stackoverflow.com/q/7781099
tagged with: php
has comment: http://stackoverflow.com/comment/42113394
has comment: http://stackoverflow.com/comment/42113449
has body: I have a textarea that retrieves the text from a file using php &lt;textarea id="txtArea" rows="26"&gt;&lt;?php include_once( $theFile ); ?&gt;&lt;/textarea&gt; and I have found a java code that allows me to search and replace text over the retrieved file: https://stackoverflow.com/a/7781395/443381 But what this code does not include is the saving function to save the changes I've done to the same file, I have tried to add the function myself with no success, so is anybody that could help me to achieve this, thanks in advance
has answer: http://stackoverflow.com/a/26766636
type: Question
score: 0
has title: java function to save textarea content retrieved from a file

http://stackoverflow.com/comment/42241211
has text: Ok, that'll do. Thanks for your help!
comment on: http://stackoverflow.com/a/26820643
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42080355
score: 0
type: Comment
has text: I can't reproduce the problem in Firefox (the only browser I have on my work computer). I wonder if Chrome and Firefox implement the same origin policy slightly differently? I will play around with it tonight from a computer running Chrome.
comment on: http://stackoverflow.com/a/26743678
type: AnswerComment

http://stackoverflow.com/comment/42152704
type: Comment
score: 0
type: AnswerComment
has text: Does't work for me ... Uncaught SyntaxError: Unexpected end of input
comment on: http://stackoverflow.com/a/26788144

http://stackoverflow.com/a/39402919
type: Answer
downvote count: 0
score: 1
has body: I used this package and it works great: https://www.npmjs.com/package/gulp-ng-config As long as you have a task that runs before your minify/browserify/etc, you can have it included into your single compiled JS file.
answers question: http://stackoverflow.com/q/26802189
upvote count: 1

http://stackoverflow.com/comment/41987504
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26690494
has text: thank you very much but one modification require is that make a folder in root (named views) and place dashboard.js there

http://stackoverflow.com/q/26756773
has title: Why call void on an unknown argument before returning another function call?
has answer: http://stackoverflow.com/a/26941932
type: AnsweredQuestion
has body: What's the significance of calling void before returning in ramda's arity function?
tagged with: ramda.js
has comment: http://stackoverflow.com/comment/42095585
type: Question
possible better answer: http://stackoverflow.com/a/26756868
answer count: 2
has answer: http://stackoverflow.com/a/26756868
accepted answer: http://stackoverflow.com/a/26941932
tagged with: javascript
tagged with: arity
score: 0

http://stackoverflow.com/comment/42153727
type: Comment
type: QuestionComment
has text: [Nothing wrong with the code](http://jsfiddle.net/q92vtbp8/). There are extenuating circumstances not being shown here, such as: javascript errors, a lack of the jquery library, other libraries conflicting with jQuery requiring `$` to be namespaced with `jQuery(function($){`..etc
comment on: http://stackoverflow.com/q/26788706
score: 0

ember-data
tags question: http://stackoverflow.com/q/26709925
tags question: http://stackoverflow.com/q/26710635
tags question: http://stackoverflow.com/q/26807318
type: Tag
tags question: http://stackoverflow.com/q/26812630
tags question: http://stackoverflow.com/q/26830327
tags question: http://stackoverflow.com/q/26764769
tags question: http://stackoverflow.com/q/26752133
tags question: http://stackoverflow.com/q/26697956
tag name: ember-data
tags question: http://stackoverflow.com/q/26699954

http://stackoverflow.com/comment/41954165
type: Comment
comment on: http://stackoverflow.com/a/26677619
has text: You don't need to use `document.getElementById` if the id is declared and unique.
type: AnswerComment
score: 0

http://stackoverflow.com/a/30222764
score: 7
has body: For anyone who might stumble across this: using a slightly larger test set shows that order is not guaranteed (since jasmine 2.3.0): it('a', function (done) { console.log('a'); setTimeout(done, 100); }); it('b', function (done) { console.log('b'); setTimeout(done, 100); }); it('c', function (done) { console.log('c'); setTimeout(done, 100); }); it('d', function (done) { console.log('d'); setTimeout(done, 100); }); it('e', function (done) { console.log('e'); setTimeout(done, 100); }); it('f', function (done) { console.log('f'); setTimeout(done, 100); }); it('g', function (done) { console.log('g'); setTimeout(done, 100); }); it('h', function (done) { console.log('h'); setTimeout(done, 100); }); it('i', function (done) { console.log('i'); setTimeout(done, 100); }); it('j', function (done) { console.log('j'); setTimeout(done, 100); }); it('k', function (done) { console.log('k'); setTimeout(done, 100); }); it('l', function (done) { console.log('l'); setTimeout(done, 100); }); it('m', function (done) { console.log('m'); setTimeout(done, 100); }); it('n', function (done) { console.log('n'); setTimeout(done, 100); }); it('o', function (done) { console.log('o'); setTimeout(done, 100); }); it('p', function (done) { console.log('p'); setTimeout(done, 100); }); it('q', function (done) { console.log('q'); setTimeout(done, 100); }); it('r', function (done) { console.log('r'); setTimeout(done, 100); }); it('s', function (done) { console.log('s'); setTimeout(done, 100); }); it('t', function (done) { console.log('t'); setTimeout(done, 100); }); it('u', function (done) { console.log('u'); setTimeout(done, 100); }); it('v', function (done) { console.log('v'); setTimeout(done, 100); }); it('w', function (done) { console.log('w'); setTimeout(done, 100); }); it('x', function (done) { console.log('x'); setTimeout(done, 100); }); it('y', function (done) { console.log('y'); setTimeout(done, 100); }); it('z', function (done) { console.log('z'); setTimeout(done, 100); }); // 2.1.0: a b c d e f…
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26764548
upvote count: 7

http://stackoverflow.com/comment/42061249
type: Comment
comment on: http://stackoverflow.com/a/26736646
has text: Was worth a try - thought you were using an odl refrence (fn) for the new datatables.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42079132
type: Comment
has text: Yes, I haven't tried to verify the css/animations, just to provide a pattern that will sequence them. You may just need to play around with those percentage values.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26744927

http://stackoverflow.com/comment/42155696
has text: i am trying this at my end,
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26789539
type: AnswerComment

http://stackoverflow.com/q/26773904
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42127391
has title: jQuery ajax is calling infinily , showing too much recursion error in console
type: Question
has comment: http://stackoverflow.com/comment/42127066
has comment: http://stackoverflow.com/comment/42129971
tagged with: validation
has comment: http://stackoverflow.com/comment/42127285
tagged with: javascript
tagged with: jquery
has body: I am using jQuery.validationEngine plugin .I have a below ajax function to check duplicate unique value for a field. function _is_unique(caller) { var value = jQuery(caller).val(); var field_id = jQuery(caller).attr('id'); var field_name = jQuery(caller).attr('placeholder'); if (value != '') { var uniqueObject = new Object(); uniqueObject.field_id = field_id; uniqueObject.value = value; var uniqueString = JSON.stringify(uniqueObject); var getUrl = window.location; //console.log(getUrl); var baseUrl = getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1]; jQuery.ajax({ type: "POST", url: baseUrl + "/dashboard/check_unique", data: uniqueObject, async: false, cache: false, dataType: "text", success: function(msg) { if (msg == "exist") { isError = true; promptText += " This " + field_name + settings.allrules["is_unique"].alertText + "&lt;br /&gt;"; } } }); } } if the field value is present in server then from server I am returnning "exist" else I am returning "notexist". Now while running my ajax script is calling infinitely . Can any please tell me what should I do to stop infinite loop of my ajax call. Edited This is the form Submit function . its also showing too much recursion error in console. By any chance am I having problem here ? $('#searchform').on('submit', function(e){ var validateError =''; var id=''; var fieldError = []; $('#searchform :input:text').each(function(){ id = $(this).attr('id'); validateError = jQuery.fn.validationEngine.loadValidation(document.getElementById(id)); if(validateError) { fieldError.push(id); } }); if(fieldError.length!=0) { return false; } else{ $("form#searchform" ).submit(); return true; } }); });
tagged with: ajax
score: 0
answer count: 0

http://stackoverflow.com/q/26776876
type: Question
upvote count: 6
tagged with: javascript
has body: Not a problem, because I found out what causes it, but a huge quirk nevertheless: Apparently when you create a closure, the JavaScript engine does not save all of its scope variables. It saves only the ones that are really used by the inner function. This causes incorrect results in the debugger if you halt your program. Here is how you can reproduce this 1.Run the following snippet in Chrome: function foo (){ var id = 0 var id2 = 1 return function foo2(){ //console.log(id) console.log(id2) debugger } } foo()() Notice that only id2 is defined in the closure scope: 2.Uncomment the console.log statement. There are now two variables in the closure scope Does someone know why this happens (I presume it is to save memory) and are there any other aspects of this that we should be aware of.
has comment: http://stackoverflow.com/comment/42133411
has title: Chrome Debugger: Unused variables not loaded in a JavaScript Closure
has comment: http://stackoverflow.com/comment/42148638
has comment: http://stackoverflow.com/comment/42132089
linked to: http://stackoverflow.com/q/28388530
has comment: http://stackoverflow.com/comment/46396504
favorite count: 0
type: UnansweredQuestion
score: 6
answer count: 0
downvote count: 0
tagged with: google-chrome-devtools
tagged with: google-chrome

http://stackoverflow.com/q/26756752
type: AnsweredQuestion
upvote count: 14
possible better answer: http://stackoverflow.com/a/29978621
has answer: http://stackoverflow.com/a/26756841
has comment: http://stackoverflow.com/comment/42095538
has title: How to catch errors involving XmlHttpRequest?
has answer: http://stackoverflow.com/a/29978621
type: Question
score: 14
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26756841
has comment: http://stackoverflow.com/comment/42095867
answer count: 3
downvote count: 0
favorite count: 0
has body: I want to catch all errors with the help of TRY {} CATCH(){} when I send data to a server via XMLHttpRequest. How can I receive all errors, such as net::ERR_INTERNET_DISCONNECTED, etc. ?
tagged with: ajax
has answer: http://stackoverflow.com/a/26756910

http://stackoverflow.com/a/26731916
answers question: http://stackoverflow.com/q/26731474
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26731474
upvote count: 1
has comment: http://stackoverflow.com/comment/42052610
has body: you need to change template to templateUrl if you need to get the external html like as shown below. templateUrl can also be a function which returns the URL of an HTML template to be loaded and used for the directive. Angular will call the templateUrl function with two parameters: the element that the directive was called on, and an attr object associated with that element. Working Demo fbModule.directive('fbLogin', function() { return { template: 'template.html' }; }); to fbModule.directive('fbLogin', function() { return { templateUrl: 'template.html' }; });
score: 1

http://stackoverflow.com/comment/44821365
type: AnswerComment
has text: hi @abbas how to get the drop down value inside the kendo template
type: Comment
comment on: http://stackoverflow.com/a/26795013
score: 0

http://stackoverflow.com/comment/42022688
has text: do a `console.log` just on the object itself. developer tools will then show more info about the object, instead of just the `.toString()` value which returns `[object Object]`. so, do a `console.log(table.row(this).index())` and see what that object really is.
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26716242
type: QuestionComment

http://stackoverflow.com/q/26825914
score: 0
has answer: http://stackoverflow.com/a/26826045
type: AnsweredQuestion
tagged with: javascript
type: Question
accepted answer: http://stackoverflow.com/a/26826045
tagged with: datepicker
has body: i need guide on how to apply this restriction for back dates for the date picker as i am new to this javascript. i do saw some people post about solution like this code, but i don't know how to apply in my code $(function() { $( "#datepicker" ).datepicker({ minDate: 0});}); i have tried this as well, still not working, and it is more worst as the date picker can't be show
has comment: http://stackoverflow.com/comment/42220208
answer count: 1
has comment: http://stackoverflow.com/comment/42220192
has title: datepicker no past dates

http://stackoverflow.com/comment/42029569
type: Comment
has text: Thanks for your help. This does seem to be the only way to go. What a hassle, though. I think you also need to run `scope.$on('$destroy')` to cleanly remove the event listener and not have any leaks. I think this means you can't run the `scope.$apply()` inside an anonymous function, but instead you need an intermediate function, which 1) you bind `keyup` to, 2) you can bind `scope.$on('$destroy')` to, and 3) runs `scope.$apply()`. It really seems like something Angular should integrate natively because they are already doing all this in their own native directives already. But this does work!
comment on: http://stackoverflow.com/a/26718281
score: 0
type: AnswerComment

http://stackoverflow.com/a/26814125
has body: You want $index, it's part of ng-repeat addNewIngredientEd($index) and $scope.addNewIngredientEd = function ($index) { $scope.drinks[$index].ingredients.push(...
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26813914
has comment: http://stackoverflow.com/comment/42210661
type: Answer
accepted answer of: http://stackoverflow.com/q/26813914
score: 0

http://stackoverflow.com/comment/42090557
score: 1
has text: From [the docs](http://api.jquery.com/click/): *This method is a shortcut for `.on( "click", handler )`*
comment on: http://stackoverflow.com/a/26753585
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26769557
answers question: http://stackoverflow.com/q/26769178
type: Answer
has body: This cannot be done, by policy. In Web pages, JavaScript (and client-side scripts in general) aren't allowed to access raw external resources from a different domain, in general. The closest you're going to get is using AJAX (jQuery helps) to access a resource, but you (in general) need to be requesting a URL under the same domain.
score: 0

http://stackoverflow.com/q/26785799
has body: I'm trying to create a form that is valid if a radio button is selected. The radio button is part of a group from which the user can choose one. I'm assigning the required attribute to the radio buttons using a function in my controller, and this seems to be causing issues with the validation. I think it's some sort of scope problem but I can't figure it out. Here's a jsfiddle showing the problem: http://jsfiddle.net/flyingL123/x27nv8fq/5/ You can see that the radio inputs correctly have the required attribute assigned to them, but even if the user doesn't select an option, the form still validates and submits. Here's the HTML: {{ option.value }} Submit Form is invalid {{ selectedOption }} And the JS: var test = angular.module('test', []); test.controller('TestController', ['$scope', function($scope){ $scope.options = [{id: '0', value: 'blue'}, {id: 1, value: 'green'}] $scope.selectedOption = {}; $scope.submitForm = function(){ alert('Form valid and submitted'); } $scope.required = function(){ if(!$scope.selectedOption.id){ return true; } return false; } }]); Why is the form considered valid even though a required radio input is not selected?
has answer: http://stackoverflow.com/a/26786885
score: 0
answer count: 2
tagged with: validation
tagged with: javascript
tagged with: angularjs
has title: Angular radio validation in ng-repeat
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26786744
type: Question

http://stackoverflow.com/q/26695604
tagged with: javascript
tagged with: fullcalendar
tagged with: jquery
score: 0
has title: FullCalendar adjusts timezone when set to local but not on Europe/Athens
tagged with: datetime
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26696065
accepted answer: http://stackoverflow.com/a/26696065
type: Question
has body: Hi i m using FullCalendar 2.1.1 and i face an issue with timezone. The application is being developed with Yii framework and when i set the timezone to Europe/Athens 'timezone' =&gt; 'Europe/Athens' timezone is set to GMT 0000 it neglects the setting while if i set 'timezone' =&gt; 'local' timezone is set to GMT 0200 as expected. The problem is that the dates that are used in the appare based on Europe/Athens zone, so i don't think it is safe to rely on local time.
answer count: 1

http://stackoverflow.com/comment/42074893
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26744614
has text: Use the condition `if (wst >= wh*0.1) {`

http://stackoverflow.com/comment/42108831
score: 0
type: Comment
has text: @pelicanorojo sure, it depends on the browser, you can see that firefox 14 or Safari 7 show a difference for that test in the results graph. BTW you should upvote useful answers, and accept a correct answer by clicking the tick.
comment on: http://stackoverflow.com/a/26760019
type: AnswerComment

http://stackoverflow.com/a/26802109
has comment: http://stackoverflow.com/comment/42405263
type: Answer
answers question: http://stackoverflow.com/q/26801025
score: 0
has body: This code : &lt;h:outputScript name="js/pf.js" target="body"/&gt; only works if you have a &lt;h:body&gt; and not just a &lt;body&gt; element in your view. The other reason why your code may not work is the resource path. See : Include javascript with resources via h:outputScript

http://stackoverflow.com/comment/42216106
score: 0
type: Comment
has text: Does it still run 256 tests if you move you `spec` file to a directory above?
type: QuestionComment
comment on: http://stackoverflow.com/q/26823270

http://stackoverflow.com/q/26756938
upvote count: 2
has title: ASP.NET/JavaScript - “Return False” Not Preventing Postback
answer count: 1
tagged with: asp.net
favorite count: 0
type: UnansweredQuestion
has body: I have a problem in my web application, even the validation is false the button click event will be fired. here my design page: <asp:TextBox ID="txtAddJournal" runat="server" /> <asp:Button ID="btnUpload" runat="server" Text="Upload" OnClientClick="Validate();" OnClick="btnUpload_click"/> here my validation function: function Validate() { var Journal = document.getElementById('<%= txtAddJournal.ClientID %>').value.trim(); // alert(Journal); if (Journal == "" || Journal == null) { alert("Enter the Journal name"); return false; } } and my code behind protected void btnUpload_click(object sender, EventArgs e) { check.Value = "1"; Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "Load_functions()", true); //txtAddJournal.Attributes.Add("Style", "display:block"); //btnUpload.Attributes.Add("Style", "display:block"); if (fileuploader.HasFile) { try { string Filename = Path.GetFileName(fileuploader.FileName); //fileuploader.SaveAs(Server.MapPath("~/") + Filename); // fileuploader.SaveAs(Server.MapPath("D:\\Req Sep16\\") + Filename); OleDbConnection myconnectionini = default(OleDbConnection); OleDbDataAdapter mycommandini = default(OleDbDataAdapter); if (fileuploader.PostedFile.FileName.EndsWith(".xls") == false & fileuploader.PostedFile.FileName.EndsWith(".xlsx") == false) { // lbl_Error.Text = "Upload only excel format"; Response.Write(@" "); return; } else { gvDetails.DataSource = null; string pathToSave = HttpContext.Current.Server.MapPath("~/UploadFiles/") + fileuploader.FileName; fileuploader.PostedFile.SaveAs(pathToSave); //strFilePath = "D:\\Files\\" + fileuploader.FileName; string constrini = "provider=Microsoft.Jet.OLEDB.4.0;data source=" + pathToSave + ";Extended Properties=Excel 8.0;"; DataSet ds = new DataSet(); // DataTable dt = new DataTable(); myconnectionini = new OleDbConnection(constrini); mycommandini = new OleDbDataAdapter("select * from [Sheet1$]", myconnectionini); ds = new DataSet(); mycommandini.Fill(ds); gvDetails.DataSourc…
score: 2
has answer: http://stackoverflow.com/a/26756957
downvote count: 0
type: Question
tagged with: c#
tagged with: javascript

http://stackoverflow.com/a/26758502
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26756800
answers question: http://stackoverflow.com/q/26756800
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: huh, forgot to include the scope, wl.offline_access, also request must b POST with ContentType = "application/x-www-form-urlencoded"

http://stackoverflow.com/comment/42036228
type: Comment
type: QuestionComment
has text: ... Aaaand to parse CSV in JS, check this nicely written function: http://www.bennadel.com/blog/1504-ask-ben-parsing-csv-strings-with-javascript-exec-regular-expression-command.htm
score: 0
comment on: http://stackoverflow.com/q/26723201

http://stackoverflow.com/a/26809849
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26809762
score: 1
has body: The problem here is in your HTML code: Image 1 Image 2 Image 3 Image 4 You are using the same image "http://css3.bradshawenterprises.com/images/Birdman.jpg", which does not make sense, and you wont see a change, just change the other images path. Image 1 Image 2 Image 3 Image 4 You will have to include this line in the HTML head section. See it LIVE.
downvote count: 0

http://stackoverflow.com/q/26753119
has answer: http://stackoverflow.com/a/26757075
accepted answer: http://stackoverflow.com/a/26757075
type: AnsweredQuestion
score: 1
type: Question
has body: Is it possible to slow down the speed of a draggable element? I have build a simple slider with jQuery drag and drop. When the slider element (the draggable element) moves to certain positions a picture fades in. So if you move the draggable element not too fast it looks like you can handle a "picture animation" with the slider. Now, I want to slow down the draggable element. So the user never can drag the element too fast. This is an example of my code. $('.slider').mousemove(function(){ if($(this).position().left &gt;= 0 &amp;&amp; $(this).position().left &lt;= 2 ) { $('.slider_1').fadeIn(); $('.slider_2').fadeOut(); } ... I hope someone can help me :)
tagged with: jquery-ui
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: slider
upvote count: 1
favorite count: 0
has title: jQuery Drag and Drop slow down
tagged with: drag-and-drop

http://stackoverflow.com/a/30110711
upvote count: 0
has body: Try this : var getParameterByName = (function(a) { if (a == "") return {}; var b = {}; for (var i = 0; i &lt; a.length; ++i) { var p=a[i].split('=', 2); if (p.length == 1) b[p[0]] = ""; else b[p[0]] = decodeURIComponent(p[1].replace(/\+/g, " ")); } return b; })(window.location.search.substr(1).split('&amp;')) var id = getParameterByName["id"];
score: -1
downvote count: 1
answers question: http://stackoverflow.com/q/26823667
type: Answer

http://stackoverflow.com/comment/42136658
score: 0
type: Comment
has text: @Ben Fortune: The jQuery `css()` function does not need it. It assumes `px`
type: QuestionComment
comment on: http://stackoverflow.com/q/26779466

http://stackoverflow.com/q/26727175
favorite count: 0
has title: How to render Emoji on HTML?
has comment: http://stackoverflow.com/comment/42043053
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42043497
downvote count: 5
has answer: http://stackoverflow.com/a/26734510
answer count: 1
has body: I have the following string: 👑 CODE :: davon top 👑 MATERIAL :: spandek rayon 👑 PRICE :: 70.000 FIX ORDER langsung hubungi contact : 👉 LINE : hijabroom 👉 PIN BB : 28EFA80B Read mekanisme before order! And I wanted to render it like the following: How can I do so?
tagged with: javascript
score: -4

http://stackoverflow.com/q/26689865
tagged with: debugging
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41976542
score: 0
has comment: http://stackoverflow.com/comment/42058586
type: UnansweredQuestion
has body: I have developed a web application which uses lots of JavaScript plugin. Consist of history.js, requirejs, jquery, bootstrap, and etc. Most of the time the application is functioning properly. But it is also frequently run into errors. I have tried my best to track the bug. But the problem is it is very hard to reproduce the bug. It just happen randomly with different kind of problem and all the errors that I caught are report pointing to the plugin like jquery.js, history.js and etc. Not on the part of code done by me. There is no way I can get the clue to fix it. So, what are the good method I can better tracking &amp; fixing the bugs in JavaScript? Thank you.
has comment: http://stackoverflow.com/comment/41976554
answer count: 0
has title: Advanced Debugging & Bug Tracking Method in Javascript
type: Question

http://stackoverflow.com/comment/42134404
type: AnswerComment
type: Comment
has text: skobaljic - maybe i can , can you just help me little on code? i am newbie with JS , so some help will be very great from ya
comment on: http://stackoverflow.com/a/26778171
score: 0

http://stackoverflow.com/comment/42151990
type: AnswerComment
has text: @WeatherVane, I think, the question is about this specific example http://jsfiddle.net/emedrs9n/. Read the question again.
type: Comment
comment on: http://stackoverflow.com/a/26786669
score: 0

http://stackoverflow.com/a/26809369
type: Answer
downvote count: 0
score: 1
has body: The error message you get is due to the way Jsfiddle.net works. Tested in isolation, the code runs without errors. However, the alerted text is the empty string. The reason is that the variable text is assigned only once, at the start of execution, and then the input field is empty. One way to fix this is to make the text variable local to the function, so that it will be assigned a value whenever the function is invoked: function process() { var text = document.getElementById("name").value; alert(text); return true; }
upvote count: 1
has comment: http://stackoverflow.com/comment/42191490
answers question: http://stackoverflow.com/q/26808999
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26808999

http://stackoverflow.com/q/26730377
answer count: 0
has comment: http://stackoverflow.com/comment/42048513
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42048788
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/42048412
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42048683
has title: Ajax Function not collecting data from URL
has body: I am using this ajax function to call a html page but it showing the following error: OPTIONS file:///D:/My%20Web%20Sites/bbbb/flair/demos/url net::ERR_FILE_NOT_FOUND singlePageCallback: function (url, element) { var t = this; $.ajax({ url: 'url', type: 'GET', dataType: 'html', timeout: 5000 }) .done(function (result) { t.updateSinglePage(result); }) .fail(function () { t.updateSinglePage("Error! Please refresh the page!"); }); } });
has comment: http://stackoverflow.com/comment/42048453
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42048816
has comment: http://stackoverflow.com/comment/42048448

http://stackoverflow.com/comment/42004953
comment on: http://stackoverflow.com/q/26706049
has text: Sometimes links to scripts are *still* put in the ` `.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/42164847
type: QuestionComment
comment on: http://stackoverflow.com/q/26794779
score: 0
has text: @TylerDean can you share a sample section from the xml file which fails for the scenario?
type: Comment

http://stackoverflow.com/q/26753824
score: 0
has body: Currently I have this code that allows me to change the special christmas delivery date. This year we are offering 3 delivery dates - 21, 22 and 23. How do I manipulate this code to allow a range such as this? Current code : setValidDaysForNationwideDelivery: function(date) { if ((date.getMonth() == 11) &amp;&amp; (date.getDate() == 21)) { return [true, ""]; } }
type: UnansweredQuestion
tagged with: range
tagged with: date
type: Question
answer count: 2
has title: How do i create a delivery date range in Js
has answer: http://stackoverflow.com/a/26753906
tagged with: javascript
has answer: http://stackoverflow.com/a/26753891

http://stackoverflow.com/comment/42082091
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26747508
has text: You might want to also see if your assumptions about the memory usage of your large array is accurate. It wouldn't surprise me if there was some "type" information stored along with the actual number since JS isn't hard typed, the interpreter somewhere has to be able to see what type of value is in every array slot. Also, keep in mind that converting a very large data structure to JSON could temporarily use 2x-4x the amount of memory compared to just the JS array.

http://stackoverflow.com/q/26790757
type: Question
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26790853
accepted answer: http://stackoverflow.com/a/26790853
has body: I'm using jQuery Mobile, and I need to remove undefined word that comes above the label. the data is json which return sucessfuly and build the html almost correctly. except the undefined I have this dynamic code HTML Javascript function corAnimal(data){ var html html += ' Cor ' html += ' ' $.each(data, function (i, x) { html+=' '+ x.descricao +' '; }); html += ' ' $('#selectNovoCorAnimal').html(html).enhanceWithin(); } Which build like this: undefined <<< need remove this Cor [Amarelo] << select Why is giving me undefined?
type: AnsweredQuestion
has title: jquery undefined data return in ajax
tagged with: grails

http://stackoverflow.com/q/26690842
has body: I actually asked a very similar question yesterday, but am sure I did not ask properly. The suggestions I received were all very helpful, but unfortunately, JavaScript is VERY foreign to me and I have a terrible time understanding how to write JavaScript. I have what is no doubt a very easy basic JavaScript problem that somebody in the know could probably answer in minutes. It has taken me about 2 days so far, and counting ... I have a client that will be using a HTML email to send out to their clients, within that email there will be a CTA to send them to a financial investments calculator. Once on that page the end user will have the option to either fill out the calculator, or to click another CTA sending them to contact an advisor. It is this button that is causing me grief. The client would like me to use a GET 'function' to fill in the URL encoded query string. I do not know how to write this out. I've been Googling this issue and when I find solutions, as were also suggested yesterday by other users, I do not know how to write out the snippet. I know this may seem like I am trying to get other people to d my work for me, but trust me I've been searching long and hard for this solution. So if anybody can help, I really need your answer/suggestion "dumbed" down. This is what my client sent me ... This is the URL that the maximizer calculator calls when the CTA button is clicked passing back the RID to us. http://responsetoday.com/jointventure-ecomm/purl54pki3r.aspx?rid=TST1232544 This is what I had come up with ... Talk to a sales rep Unfortunately, the way I have written it "hard codes" the response after 'rid=', this is not good and is not working. I'm sorry for the long winded post for what is probably a very easy fix, but I wanted to share as much detail as possible. Thanks to everybody for your help in advance.
has comment: http://stackoverflow.com/comment/41978300
has answer: http://stackoverflow.com/a/26691231
has comment: http://stackoverflow.com/comment/41978468
has comment: http://stackoverflow.com/comment/41978192
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41978383
has comment: http://stackoverflow.com/comment/41978201
has comment: http://stackoverflow.com/comment/41978433
has comment: http://stackoverflow.com/comment/41978486
has comment: http://stackoverflow.com/comment/41978247
type: Question
has comment: http://stackoverflow.com/comment/41978307
has comment: http://stackoverflow.com/comment/41978221
has comment: http://stackoverflow.com/comment/41978202
answer count: 1
tagged with: button
tagged with: javascript
has comment: http://stackoverflow.com/comment/41978234
has comment: http://stackoverflow.com/comment/41978537
score: 0
has title: I do not know how to write out a URL encoded query string
has comment: http://stackoverflow.com/comment/41978210
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/42085327
has text: You're using a terribly slow promise implementation. Consider bluebird for performance sensitive promise work.
comment on: http://stackoverflow.com/q/26747508
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/28052213
has body: You could either set the filename on the client side or the server side. Client-side: In events-create.ejs, pass this parameter to S3Upload: s3_object_name: $('input[type=file]').val().match(/[^\/\\]+$/)[0] Server-side (Preferred method): In routes.js, replace all instances of req.query.s3_object_name with a unique filename. You can use req.query.s3_object_type to determine the extension you should put on the end of the filename. You want to use a unique filename here because everything is being stored in the same bucket and AWS automatically overwrites files with the same filename.
answers question: http://stackoverflow.com/q/26786681
downvote count: 0
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/41996113
has text: Cant you use the button click to append a new item or append appropriate items to the form using Jquery?
type: Comment
comment on: http://stackoverflow.com/a/26701208
type: AnswerComment
score: 0

http://stackoverflow.com/a/26696494
type: Answer
score: -1
answers question: http://stackoverflow.com/q/26694030
has comment: http://stackoverflow.com/comment/52227150
downvote count: 1
has body: In your data function, you're accessing this.params.section. However, this is refers to your current scope, which is not the route, therefore this.params will be undefined. Try doing something like this: //galleryRoute.js Router.route('/:section', function() { var route = this; this.layout('Gallery', { data: function() { var data = { photos: photos.find({ path: { $regex: '/'+route.params.section +'/' } }) }; return data; } }); });
upvote count: 0
has comment: http://stackoverflow.com/comment/51862943

http://stackoverflow.com/comment/42024770
score: 0
type: Comment
has text: Thanks Thrax for ur reply,can we use a4j library with IE-8 and chrome-version 28?
type: AnswerComment
comment on: http://stackoverflow.com/a/26716988

http://stackoverflow.com/q/26681724
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has comment: http://stackoverflow.com/comment/41962187
favorite count: 0
has answer: http://stackoverflow.com/a/26681907
possible better answer: http://stackoverflow.com/a/26681836
has title: Replace a php variable with textbox input
has comment: http://stackoverflow.com/comment/41964841
tagged with: php
type: AnsweredQuestion
has body: Ok I am confused with php, javascript and html and dont know what to do. On researching on the internet, i found js is client side and php is server side. when a php file is run on the browser, it converts everything into html and the page is loaded. Now let me tell you guys what i am doing. I have a php file that give me some stats from a particular url (in the sample i am just showing url) &lt;? $url="www.example.com"; echo "URL = " .$url; ?&gt; Result URL = www.example.com The above code echoes the url which is www.example.com. I added a textbox to this code which i believe is javascript+html &lt;script&gt; function myFunction() { $url=myurl.value; } &lt;/script&gt; &lt;input type="text" name="myurl" id="myurl"&gt; &lt;input onclick="myFunction()" type="submit" name="btnurl" id="btnurl" value="Submit"&gt; &lt;br&gt;&lt;br&gt; &lt;? $url="www.example.com"; echo "URL = " .$url; ?&gt; Here the result is same. only difference is that it has a textbox and button above the result. When I enter another url in the textbox and press submit, it does nothing probably because the page is already loaded. I want to replace the result of www.example.com to the one which is entered in the textbox without changing the .php file. There will always be a default url in the .php file. whenever the file is opened in the browser, the default statistics will be shown... only when the user enters new url and clicks submit, the stats should change. How can I achieve this? I am behind this since more than a couple of hours now and not sure how to get this done. Please help me.... Thank you. EDIT Can I have two .php files? one for the user to enter url and submit and another one to get the entered url and echo it? If yes, how? If I understand this logic, i can get a start for what I am doing.
tagged with: onclick
type: Question
answer count: 2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26681907
has comment: http://stackoverflow.com/comment/41962255
score: 0
has answer: http://stackoverflow.com/a/26681836

http://stackoverflow.com/q/26800112
upvote count: 1
has comment: http://stackoverflow.com/comment/42175019
type: AnsweredQuestion
has body: I have a series of custom Chevron elements that I'm going to use as buttons on my site. I've managed to set up the jQuery so that the clicked chevron/button is given a class="selected" which I then use to add custom styles. If I click any other chevron then the selected class is removed from the first chevron and added to the last chevron that was clicked. All of this works fine. I have another link that can be clicked to remove the class from all of the chevrons. What I'm trying to do now is to enable the .toggle(Class) function on jQuery so that I can also remove the class="selected" by clicking the same element twice. My jQuery code: $(function () { $('#chevrons &gt; ul &gt; li &gt; a').click( function(){ $('#chevrons .selected').removeClass('selected'); $('#show-all').removeAttr("style"); $(this).toggleClass('selected'); }); }); $(function () { $('#show-all').click( function(){ $('#chevrons .selected').removeClass('selected'); $(this).css('color', '#FECF2A'); }); }); I've tried the toggle without the rows: $('#chevrons .selected').removeClass('selected'); $('#show-all').removeAttr("style"); And it works fine. I assumed (perhaps incorrectly) that the jQuery would execute line-by-line and therefore the last thing to execute. But perhaps the first line above is removing the "selected" attribute from all of the chevrons and then the last line will only ever add the class. What am I doing wrong here?
has comment: http://stackoverflow.com/comment/42179282
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/42174262
answer count: 2
accepted answer: http://stackoverflow.com/a/26800658
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/42173938
favorite count: 0
has title: Why is my jQuery not allowing me to toggle classes?
has answer: http://stackoverflow.com/a/26800709
has comment: http://stackoverflow.com/comment/42173876
has comment: http://stackoverflow.com/comment/42174390
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26800709
has comment: http://stackoverflow.com/comment/42174286
has comment: http://stackoverflow.com/comment/42173883
score: 1
has answer: http://stackoverflow.com/a/26800658

http://stackoverflow.com/comment/42181032
score: 0
type: QuestionComment
has text: Added the intern.js to the original question. (the pasted JS formating is a bit messed up. It starts right after the "Here's the content of the intern.js file" line and ends after the "return returnValue;" line).
type: Comment
comment on: http://stackoverflow.com/q/26802851

http://stackoverflow.com/comment/42024427
has text: Hey, first thanks for ur answer. I know I can use media queries, but then I have to write for every subpage these changes, many pages are dynamic with new image sizes etc. and I hope there is another solution, which will do the work for me dynamic.
comment on: http://stackoverflow.com/a/26717127
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42141229
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26749635
has text: The design of the page is based on xml configuration, so the page will be dynamical page based on which element the user asked. For one user, the page may have two dropdown lists. And for another user, the page will have more dropdown and other fields like Data entry and Text Box. In this way, all elements in the page will not have a fixed name, that means the id can only setup like id=<%=user.configue()..%>. I need to pass the id to jquery functions.

http://stackoverflow.com/comment/42229154
comment on: http://stackoverflow.com/a/26830963
type: Comment
has text: Look at the codepen. I just only changed the toogleColor function so I added the old function to the codepen with the name toggleColorOld. You can compare there. There better solutions to implement but as you are new in JS I think that this is the easiest to understand. When you are ready let me know and I can show you a better way.
type: AnswerComment
score: 0

http://stackoverflow.com/q/26764139
has title: can't open src file in html because path doesn't exist
answer count: 1
favorite count: 0
has body: I have a html file in a folder called views, and i run my project using node. node index.js which makes a server using total.js. The server starts running on http://127.0.0.1:8000/ . This all works fine, except when I try to include a script in the html: &lt;script type="text/javascript" src="/path/to/js.js"&gt; I get the following message in the console: GET http://127.0.0.1:8000/path/to/js.js" 404 not found
has comment: http://stackoverflow.com/comment/42110055
has comment: http://stackoverflow.com/comment/42109423
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27128401
downvote count: 3
type: Question
accepted answer: http://stackoverflow.com/a/27128401
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42109241
tagged with: total.js
score: -3

http://stackoverflow.com/q/26767803
score: -2
has answer: http://stackoverflow.com/a/26767938
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/26785316
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26785316
favorite count: 0
has title: How to do a Select All checkbox in html?
possible better answer: http://stackoverflow.com/a/26767938
upvote count: 1
tagged with: checkbox
tagged with: selectall
has comment: http://stackoverflow.com/comment/42116768
type: AnsweredQuestion
has body: I have a html form, which has lots of checkboxes, and there is a Select All box on top, how to make the Select All box auto select all the checkboxes below according to the Select All box choice ? I didn't want to show the code, because it's nasty looking, I'm debugging an old app, but since you asked, here it is : &lt;script language="javascript"&gt; function selectAll2(value) { var elem = document.forms[1].getElementsByTagName("select"); var count = ${questionCount}; for(var i = 1; i &lt;= count; i++) { if(i != 23 || (i==23 &amp;&amp; ${w.carrier.stateOfDomicile ne 'FL'})) { elem[i].value = value; showNoShowQuestionaire(i,'Y','N',value); } } } &lt;/script&gt; &lt;!-- Question # ${n} --&gt; &lt;tr&gt; &lt;td class="${labelClass}" align="right" valign="top" width=26%&gt; ${n}.&amp;nbsp;&amp;nbsp; &lt;/td&gt; &lt;td class="${labelClass}" align="left"&gt; ${q} &lt;/td&gt; &lt;c:choose&gt; &lt;c:when test="${not_applicable eq 'Y'}"&gt; &lt;td valign="top"&gt; &lt;div id="QT_${n}"&gt; &lt;html:select disabled="${disabled}" property="answers" styleClass="display: none;" value="${s}"&gt; &lt;html:option value="Y"&gt;Yes&lt;/html:option&gt; &lt;/html:select&gt; &lt;/div&gt; &lt;script language="javascript"&gt; document.getElementById("QT_${n}").style.display = 'none'; &lt;/script&gt; &lt;/td&gt; &lt;/c:when&gt; &lt;c:otherwise&gt; &lt;td valign="top"&gt; &lt;html:select disabled="${disabled}" property="answers" styleClass="processSelect" value="${s}" onchange="showNoShowQuestionaire('${n}','${yes_exp}','${no_exp}',this.value);"&gt; &lt;html:option value=""&gt;--&lt;/html:option&gt; &lt;html:option value="N"&gt;No&lt;/html:option&gt; &lt;html:option value="Y"&gt;Yes&lt;/html:option&gt; &lt;/html:select&gt; &lt;/td&gt; &lt;/c:otherwise&gt; &lt;/c:choose&gt; &lt;/tr&gt; From the above code, I got an error message for firefox and Chrome, it says : elem[i] undefined. It works fine in IE. Since my app needs to work in all browsers, is there a solution that works for all browsers…
has comment: http://stackoverflow.com/comment/42132275
downvote count: 3
type: Question

http://stackoverflow.com/a/26809200
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42264442
type: Answer
has comment: http://stackoverflow.com/comment/42191515
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26809128
answers question: http://stackoverflow.com/q/26809128
has comment: http://stackoverflow.com/comment/42197096
score: 1
has body: Every time you do $(folderDiv), you are re-creating the DOM element and making a new jQuery object. You need to call $(folderDiv) once, and save it into a variable. var folderDiv = '&lt;div class=openclosed_folder_icon&gt;' + '&lt;img class="folder_icon" src="images/folder_closed.png" alt="closed folder" /&gt;' + '&lt;div class="folder_name"&gt;'+name'+&lt;/div&gt;' + '&lt;/div&gt;'; var $folderDiv = $(folderDiv); // Convert this into a DOM element, and save the jQuery object // Do actions on the saved jQuery object, so that you are editing the *same* DOM element // You can chain together these calls $folderDiv.find('.folder_name').text(name).attr({'id' : name}); $folderDiv.draggable(folder_icon_dragOps).css({ 'cursor':'pointer', 'position': 'absolute', 'top': posTop, 'left': posLeft }).appendTo('#galleryHeader');
has comment: http://stackoverflow.com/comment/42191782
has comment: http://stackoverflow.com/comment/42191546
has comment: http://stackoverflow.com/comment/42191745

http://stackoverflow.com/q/26681160
tagged with: javascript
has answer: http://stackoverflow.com/a/26740308
answer count: 3
score: 8
favorite count: 0
has title: Using ocLazyLoad to lazy load a controller with $stateProvider
tagged with: angularjs
upvote count: 8
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43510556
has comment: http://stackoverflow.com/comment/43635289
has body: I'm having issues using oclazyload with $stateProvider. I have specified that the controller .js should be loaded in the router config, and it does,' but it's not available to use as an ng-controller attribute in the file loaded in templateURL. ui-route config: core .run( [ '$rootScope', '$state', '$stateParams', function ($rootScope, $state, $stateParams) { $rootScope.$state = $state; $rootScope.$stateParams = $stateParams; } ] ) .config( [ '$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) { console.info('Routing ...'); $urlRouterProvider .otherwise('/app/dashboard'); $stateProvider .state('app', { abstract: true, url: '/app', templateUrl: 'templates/app.html', }) .state('app.orders', { abstract: true, url: '/orders', templateUrl: 'templates/orders/orders.html', }) .state('app.orders.index', { url: '/index', templateUrl: 'templates/orders/index.html', resolve: { deps: ['$ocLazyLoad', function( $ocLazyLoad ){ console.info('Path ot order controller in route config',Momento.paths.js + 'controllers/orders/index.js'); return $ocLazyLoad.load([ Momento.paths.js + 'controllers/orders/index.js' ]) } ] } }) } ] ) ; And my templateURL file starts: &lt;div class="" id="" ng-controller="OrdersIndexController"&gt;...&lt;/div&gt; But when it loads, console throws the error: &lt;info&gt;orders/index controller loaded controllers/orders/index.js:3 &lt;info&gt;Now I've finished loading the controller/order/index.js config/ui-router.js:69 &lt;info&gt;orders template loaded VM30437:1 (&lt;-- this is the app.orders abstract template with ui-view directive ready for app.orders.index view) &lt;error&gt;Error: [ng:areq] Argument 'OrdersIndexController' is not a function, got undefined ... &lt;trace&gt; So the file is loaded correctly by lazyload, confirmed by console output above and network tab in developer tools, but it's not available in the templateURL to use as controller? Does it need to be aliased either in router config using controller:'' key …
has answer: http://stackoverflow.com/a/35893086
type: Question
tagged with: angular-ui-router
has answer: http://stackoverflow.com/a/33439192
downvote count: 0

http://stackoverflow.com/comment/42191742
comment on: http://stackoverflow.com/a/26809457
type: AnswerComment
has text: Good call - I use that all the time and forgot. Friday afternoon. I edited my answer. Thank you.
type: Comment
score: 0

http://stackoverflow.com/comment/42210077
type: Comment
type: QuestionComment
has text: Maybe you can try the opposite ? onmouseon ?
comment on: http://stackoverflow.com/q/26820224
score: 0

http://stackoverflow.com/q/26702472
tagged with: javascript
has body: The script below applies a CSS class to the html title attribute. The original page in which the script appears is here: How to change the style of Title attribute inside the anchor tag? Works great, but has a minor bug. If the title attribute is empty (&lt;input type="text" title=""&gt;), it still shows an empty popup box on screen. Can anyone please help with fixing this? Something like "if title attribute has no value, do not apply css, do not show popup box. Thank you! Script below: // Use a closure to keep vars out of global scope (function () { var ID = "tooltip", CLS_ON = "tooltip_ON", FOLLOW = true, DATA = "_tooltip", OFFSET_X = 20, OFFSET_Y = 10, showAt = function (e) { var ntop = e.pageY + OFFSET_Y, nleft = e.pageX + OFFSET_X; $("#" + ID).html($(e.target).data(DATA)).css({ position: "absolute", top: ntop, left: nleft }).show(); }; $(document).on("mouseenter", "*[title]", function (e) { $(this).data(DATA, $(this).attr("title")); $(this).removeAttr("title").addClass(CLS_ON); $("&lt;div id='" + ID + "' /&gt;").appendTo("body"); showAt(e); }); $(document).on("mouseleave", "." + CLS_ON, function (e) { $(this).attr("title", $(this).data(DATA)).removeClass(CLS_ON); $("#" + ID).remove(); }); if (FOLLOW) { $(document).on("mousemove", "." + CLS_ON, showAt); } }());
score: 0
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/26702513
has title: Bug fix for a script that applies CSS to the title attribute
possible better answer: http://stackoverflow.com/a/26702517
has answer: http://stackoverflow.com/a/26702517
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26702513
linked to: http://stackoverflow.com/q/2011142
type: Question

http://stackoverflow.com/comment/42229835
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26831455
has text: This code works, you must have other error in javascript.

http://stackoverflow.com/a/26793932
downvote count: 1
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26793905
has body: You have not given the ID to your element Input either give an ID or change the method to getElementsByTagName("firstName");
upvote count: 1

http://stackoverflow.com/comment/42093872
type: Comment
has text: This would have been better with an explanation of your use of `removeProp` and `addProp`, *which fixed the actual problem*, rather than just focus on `window.onload` (which, in a jQuery question, is not as good/flexible as using a DOM ready handler). :)
comment on: http://stackoverflow.com/a/26755783
score: 0
type: AnswerComment

http://stackoverflow.com/a/26700459
has comment: http://stackoverflow.com/comment/41995154
has comment: http://stackoverflow.com/comment/41994813
upvote count: 4
answers question: http://stackoverflow.com/q/26700310
has comment: http://stackoverflow.com/comment/41995169
has comment: http://stackoverflow.com/comment/91771350
has comment: http://stackoverflow.com/comment/41996301
has comment: http://stackoverflow.com/comment/41994954
type: Answer
has comment: http://stackoverflow.com/comment/41995228
has body: Why not use an associate array for persons['data'], because .push() just uses index arrays var persons = { data: {} }; ... persons['data'][john.name] = john; ... var updatedJohn = {name: 'John', age: 100}; // if statement isn't neccesary no more bc // if the index is there it will override it and if not // it will create a new index persons['data'][updatedJohn.name] = updatedJohn; The line didn't work for you because the person array was indexed by integers persons['data'].push() instead of strings persons['data'][stringIndex]
score: 3
downvote count: 1

http://stackoverflow.com/comment/41949037
type: QuestionComment
comment on: http://stackoverflow.com/q/26674874
has text: You've to make sure response is in `json` format
score: 0
type: Comment

variables
tag name: variables
tags question: http://stackoverflow.com/q/26777077
tags question: http://stackoverflow.com/q/26828111
tags question: http://stackoverflow.com/q/26774515
tags question: http://stackoverflow.com/q/26768908
tags question: http://stackoverflow.com/q/26780803
tags question: http://stackoverflow.com/q/26800687
tags question: http://stackoverflow.com/q/26676116
tags question: http://stackoverflow.com/q/26696786
tags question: http://stackoverflow.com/q/26736952
tags question: http://stackoverflow.com/q/26816843
tags question: http://stackoverflow.com/q/26679607
type: Tag
tags question: http://stackoverflow.com/q/26726154
tags question: http://stackoverflow.com/q/26793399
tags question: http://stackoverflow.com/q/26774328
tags question: http://stackoverflow.com/q/26681933
tags question: http://stackoverflow.com/q/26718142
tags question: http://stackoverflow.com/q/26793139
tags question: http://stackoverflow.com/q/26675008
tags question: http://stackoverflow.com/q/26790827
tags question: http://stackoverflow.com/q/26686484
tags question: http://stackoverflow.com/q/26767480
tags question: http://stackoverflow.com/q/26695019
tags question: http://stackoverflow.com/q/26769195

http://stackoverflow.com/a/26808644
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/26808511
has body: Get rid of the # in your select tag: &lt;select id="uselect"&gt; As a side note, you should not use global variables if possible, so change: inputData = $.trim(elem.val()); to var inputData = $.trim(elem.val());
score: 0
type: Answer

http://stackoverflow.com/comment/42226516
score: 0
type: AnswerComment
has text: @squint That's a good point... But that'll leave the handler function in global scope... I don't know whether that makes a difference or not, but currently it looks like OP wants some functions inside `ready()` and some outside... not sure why, otherwise I would've changed the named handler to an anonymous function... :)
type: Comment
comment on: http://stackoverflow.com/a/26829585

http://stackoverflow.com/q/26832174
type: Question
has body: I have created a simple landing page for my upcoming site. I am pretty inexperienced with JavaScript and this fix could be simple. I am using Instagram's API to get data from my Instagram account. I am displaying various account statistics such as the total number of likes and total number of comments made to my account. I have approached this by looping through each post and getting the like and comment count, and simply adding it together. I am using Middleman, the static site generator to create the site. I have used it before and am somewhat happy with it as I am also learning Ruby. The stats show up correctly on desktop, but on mobile (tested on Apple iPhone 5S), it doesn't seem to loop through the media, I think it is just getting the like count from the latest post? I would really appreciate the help with this! Everything else apart from the stats are working fine (Displaying profile picture, feed, etc). The site is www.gymspotter.info (please scale down the browser window as you will get the message "Sorry, the site is not currently optimised for your screen size.") - It's mobile only at the moment. Thanks again, I hope I have included everything necessary
tagged with: javascript
tagged with: instagram
tagged with: api
upvote count: 1
downvote count: 0
tagged with: middleman
favorite count: 0
answer count: 0
type: UnansweredQuestion
has title: Instagram API Javascript not working on mobile
has comment: http://stackoverflow.com/comment/42749128
score: 1

http://stackoverflow.com/comment/42203760
type: Comment
type: QuestionComment
has text: post the complete php code. and just check `console.log(data)` first so that you'll know what to access
comment on: http://stackoverflow.com/q/26816589
score: 0

http://stackoverflow.com/a/26815472
score: 1
upvote count: 1
has body: Use colspan attribute properly and remove display:table; rule for table tr, it's messing with table layout: table{ width:500px; border:1px solid #000; table-layout:fixed; } table td{ width:33%; border:1px solid #777; background:#eaeaea; } Item1 Item2 Item3 Item4 Item5asfasfasf Item6
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26815450
accepted answer of: http://stackoverflow.com/q/26815450
type: Answer

http://stackoverflow.com/a/26748895
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42101125
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42082413
has body: Instead using that content inside your SPAN TAG, you can use this: I hope thats what you are looking for
has comment: http://stackoverflow.com/comment/42082389
has comment: http://stackoverflow.com/comment/42082919
answers question: http://stackoverflow.com/q/26748781
accepted answer of: http://stackoverflow.com/q/26748781
has comment: http://stackoverflow.com/comment/42082355

performance
tags question: http://stackoverflow.com/q/26827200
tags question: http://stackoverflow.com/q/26759412
tags question: http://stackoverflow.com/q/26675670
tags question: http://stackoverflow.com/q/26701616
tags question: http://stackoverflow.com/q/26749543
tags question: http://stackoverflow.com/q/26811628
tags question: http://stackoverflow.com/q/26716875
tags question: http://stackoverflow.com/q/26796578
tags question: http://stackoverflow.com/q/26709956
tags question: http://stackoverflow.com/q/26781732
tags question: http://stackoverflow.com/q/26715036
tag name: performance
tags question: http://stackoverflow.com/q/26756815
tags question: http://stackoverflow.com/q/26705170
tags question: http://stackoverflow.com/q/26689470
type: Tag
tags question: http://stackoverflow.com/q/26736974
tags question: http://stackoverflow.com/q/26804143
tags question: http://stackoverflow.com/q/26763273

http://stackoverflow.com/q/26770672
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42132406
tagged with: mysql
has comment: http://stackoverflow.com/comment/42132338
type: Question
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42129095
has comment: http://stackoverflow.com/comment/42124612
has comment: http://stackoverflow.com/comment/42124651
score: 0
linked to: http://stackoverflow.com/q/16512218
has comment: http://stackoverflow.com/comment/42129488
has comment: http://stackoverflow.com/comment/42131303
has comment: http://stackoverflow.com/comment/42132443
tagged with: javascript
has title: Reading d3js interactive graph data from mysql
has comment: http://stackoverflow.com/comment/42128135
tagged with: php
answer count: 0
tagged with: d3.js
has body: Im trying to create an interactive network in d3js for which ive used php to fetch the data in json format inside the d3js. This is what Ive written :- MY_CODE TEST The problem is that its not displaying anything. I want the above page to display the data which its fetching from the mysql (in form of json using php) like this :- SAMPLE_CODE Stores_Network_Demo MY_CODE is fetching data from mysql-databse in json, via data.php . I.E where/in_which variable is the data being stored by this call :- d3.json("data.php.php", function(error, links) Whereas SAMPLE_CODE has hardcoded root{} data. ANd this is what exactly my question is related to, i.e. how do I do the same operations as done on root{} (in the SAMPLE_CODE) on my json_data fetched via data.php in MY_CODE ? In order to make MY_CODE work like SAMPLE_CODE , I need to replace the root{} data in SAMPLE_CODE with the data that is being fetched from the data.php page in a proper format in MY_CODE for it to work. But I dont know where and what line to change so as to make the page of MY_CODE appear like SAMPLE_CODE. SAMPLE json_array being read data.php : [{"source":"2","target":"211","value":"1"},{"source":"21","target":"24","value":"1"},{"source":"2","target":"214","value":"1"},{"source":"3","target":"202","value":"1"},{"source":"2","target":"214","value":"1"},{"source":"2","target":"214","value":"1"},.........]

http://stackoverflow.com/a/26761062
has comment: http://stackoverflow.com/comment/42129558
accepted answer of: http://stackoverflow.com/q/26760940
upvote count: 1
answers question: http://stackoverflow.com/q/26760940
type: AcceptedAnswer
has body: Looks like it is a bug in Chrome: https://code.google.com/p/chromium/issues/detail?id=409467 The workaround seems to be to attach to the window: Workaround: use window to attach the event to. This seems non-standard.
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/42020808
type: QuestionComment
score: 0
has text: Java != JavaScript!!
comment on: http://stackoverflow.com/q/26715095
type: Comment

http://stackoverflow.com/q/26761996
type: UnansweredQuestion
tagged with: css
has body: I'm using Refills by Bourbon modals, and are great. But, now that I need to trigger by JS the modal, I don't know how to do it, since it's pure CSS and doesn't have any docs or JS methods. The modal is only CSS3: Click for Modal Modal Title Intro text lorem ipsum dolor sit ametm, quas, eaque facilis aliquid cupiditate tempora cumque ipsum accusantium illo modi commodi minima. Body text lorem ipsum dolor ipsum dolor sit sit possimus amet, consectetur adipisicing elit. Itaque, placeat, explicabo, veniam quos aperiam molestias eriam molestias molestiae suscipit ipsum enim quasi sit possimus quod atque nobis voluptas earum odit accusamus quibusdam. The CSS .modal { $modal-padding: 3em; $modal-background: $base-background-color; $modal-close-color: $light-gray; $modal-image-height: 135px; $modal-image-width: $modal-image-height; label { cursor: pointer; margin-bottom: 0; } label img { $img-width: 300px; border-radius: $img-width/2; display: block; max-width: $img-width; } input[type="checkbox"] { display: none; } .btn { @include button(simple, $base-background-color); font-size: $base-font-size; margin-bottom: $base-line-height; } .modal-open { overflow: hidden; } .modal-window { // overlay @include transition(opacity .25s ease); @include position(fixed, 0px 0px 0px 0px); background: rgba(0,0,0, .85); opacity: 0; text-align: left; visibility: hidden; z-index: 99999999999; .modal-bg { @include position(absolute, 0px 0px 0px 0px); cursor: pointer; } } .modal-close { @include position(absolute, ($modal-padding /2) ($modal-padding /2) 0 0); @include size(1.5em); cursor: pointer; background: $modal-background; &:after, &:before { @include position(absolute, 3px 3px 0 50%); @include transform(rotate(45deg)); @include size(.15em 1.5em); background: $modal-close-color; content: ''; display: block; margin: -3px 0 0 -1px; } &:hover:after, &:hover:before { background: darken($modal-close-color, 10); } &:before { @include transform(rotate(-45deg)); } } .modal-inner { @include transi…
has title: How to trigger a only-css modal with js
tagged with: ruby-on-rails
type: Question
tagged with: bourbon
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26778430
has answer: http://stackoverflow.com/a/26763373

http://stackoverflow.com/q/26708473
has comment: http://stackoverflow.com/comment/42009323
answer count: 1
has body: I have implemented an online quiz using jQuery. I have this specific requirement I want to implement at the end of the quiz. if (number_of_answered_questions == total_questions) { save the score to the database; redirect to redirect_url; } This redirect_url depends on the score. (for ex: if the score &lt; 10, redirect to page1.html and if 10 &lt; score &lt; 15, redirect to page2.html) I tried using jQuery.post, but I'm not sure how to implement both in the same 'post'. How can I implement these two tasks in jQuery? I can't write the logic to "save to database" in the redirect pages because they keep changing. (I mean admin can change the redirect pages).
has comment: http://stackoverflow.com/comment/42009499
has comment: http://stackoverflow.com/comment/42009186
has answer: http://stackoverflow.com/a/26708627
has comment: http://stackoverflow.com/comment/42009360
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/503093
type: Question
linked to: http://stackoverflow.com/q/768431
has comment: http://stackoverflow.com/comment/42009248
accepted answer: http://stackoverflow.com/a/26708627
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42009569
score: 0
has title: Save to database and redirect to new url

http://stackoverflow.com/a/26713726
downvote count: 0
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26713641
answers question: http://stackoverflow.com/q/26713641
has body: You can use $(this).parent().text() to get the text. Or $(this).closest('h3').text() if there could be more to the hierarchy than shown. E.g.: $(".attEditCategory").button().on("click", function (event) { alert($(this).parent().text()); }); Mobile If there could be text inside the buttons (e.g., button or a elements rather than img), $(this).parent().text() would include that text. So in that hypothetical case, it's more difficult (but still quite simple) to get just the text of the element itself and not the text of its children: alert($(this).parent().contents().map(function() { return this.nodeType === 3 ? this.nodeValue : ""; // 3 = text node }).get().join("")); $(".attEditCategory").button().on("click", function (event) { alert($(this).parent().contents().map(function() { return this.nodeType === 3 ? this.nodeValue : ""; // 3 = text node }).get().join("")); }); Mobile edit delete
type: AcceptedAnswer

sencha-touch-2.1
tag name: sencha-touch-2.1
tags question: http://stackoverflow.com/q/26724942
type: Tag

http://stackoverflow.com/q/26707697
tagged with: angularjs
upvote count: 2
tagged with: url-routing
has title: Angular routing html5mode ASP.NET
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/26707728
type: Question
accepted answer: http://stackoverflow.com/a/26707728
tagged with: angular-routing
downvote count: 0
tagged with: javascript
has body: I have an angularjs app which based on ASP.NET project, it uses html5mode and works perfectly fine unless I want pass route parameter(s). Angular routing: $locationProvider.html5Mode(true); $routeProvider.when('/accounts', { templateUrl: 'templates/accounts.html', controller: 'accountsCtrl', title: 'Accounts', resolve: { accounts: function (accountData) { return accountData.getAll(); } } }); $routeProvider.when('/account/:accId', { templateUrl: 'templates/editAccount.html', controller: 'editAccountCtrl', title: 'Account', resolve: { account: function ($route, accountData) { return accountData.get($route.current.pathParams.accId); } } }); web.config: <system.webServer> <match url="^index\.html" ignoreCase="false" /> <action type="None" /> <match url="." ignoreCase="false" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> <action type="Rewrite" url="/index.html" /> </system.webServer> Rout localhost:3849/accounts - works, but localhost:3849/account/1 breaks the system, it looks like it fail to load *.js libraries or any other resources. console shows Uncaught SyntaxError: Unexpected token < for every single library. What wrong? Thanks UPDATE The problem was how scripts referenced in the index.html. Original was: Has to be: so when I asked server to go to localhost:3849/account/1 it started to look all files at localhost:3849/account, didn't find them and returned index.html. The same problem in routing, instead of templateUrl: 'templates/editAccount.html', must be: templateUrl: '/templates/editAccount.html',
answer count: 1
tagged with: asp.net
favorite count: 0

http://stackoverflow.com/a/26759124
has body: onclick="(function(){if(ValidateJS()) ValidateVB();})()"
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26758971
has comment: http://stackoverflow.com/comment/42102417
downvote count: 0
answers question: http://stackoverflow.com/q/26758971
type: Answer
has comment: http://stackoverflow.com/comment/42102907

http://stackoverflow.com/comment/42088018
type: Comment
type: QuestionComment
has text: Do you want run the `then` callback only on failure then? Why won't you use the `error` callback?
score: 0
comment on: http://stackoverflow.com/q/26752351

http://stackoverflow.com/q/26814819
answer count: 1
score: -6
favorite count: 0
has comment: http://stackoverflow.com/comment/42200827
has answer: http://stackoverflow.com/a/26814891
duplicate of: http://stackoverflow.com/q/498970
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: Remove space from string and write text in separated line
upvote count: 1
downvote count: 7
type: Question
accepted answer: http://stackoverflow.com/a/26814891
has body: i Want to Remove unnecessary space and write content in separated line in textarea. Ex. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;abc &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;abcde &nbsp;&nbsp;&nbsp;abd Convert it to: abc abcde abd
tagged with: javascript
linked to: http://stackoverflow.com/q/498970

http://stackoverflow.com/q/26688298
has title: Displaying data points from server side txt file on google graph
type: AnsweredQuestion
has body: I would like to display my retrieved data points from my server side text file on a google graph. During research i can now retrieve the data from my temps.txt file using $.get(). I just started learning javascript , so this may be something obvious that i missed. I can also display a sample google graph with some example datapoints. How can i put the two together? , below i have both source files from my attempts so far. Getting the Datapoints: load demo Showing the GRAPH: Temps.txt file is a simple text file with one measured value every hour the first line is 00:00 hrs the 2nd line 01:00 hrs and so on see below: 15.3 16.4 16.7 18.8 ... etc
score: 1
has comment: http://stackoverflow.com/comment/42031321
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26721508
tagged with: google-visualization
tagged with: javascript
has comment: http://stackoverflow.com/comment/42029303
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26721508

http://stackoverflow.com/a/26682465
has body: It looks like there are a few different ways you can approach the problem. Here are a couple of links that look relevant: Handling HTML element events (MSDN) Web browser control: How to capture document events? (SO) Hope this helps... -- Lance
answers question: http://stackoverflow.com/q/26674855
downvote count: 1
upvote count: 0
score: -1
type: Answer

http://stackoverflow.com/q/26791481
favorite count: 0
has title: Add differing CSS rules to a set of generated elements
has body: I want to loop and add several multicolored spans to a div container. To do this efficiently, I simply alter the css, instead of adding a new color class to the element: var colorEn = ["RoyalBlue", "LawnGreen", "red", "orange", "yellow", "black", "white", "MediumOrchid"]; for ( i = 0; i &lt; colorEn.length; i++ ) { var $span = $('&lt;span /&gt;').attr('class', 'coloratorSquare'); $span.css({background : colorEn[i]}); $("#colorator").append($span); } Generating, for example: &lt;span class="coloratorSquare active" style="background: rgb(65, 105, 225);"&gt;&lt;/span&gt; Then, when I select (click) a certain span, it will change color to Silver show it has been selected, and set all other sibling spans back to their original colors. Here's a snippet: $(this).addClass("active").siblings().removeClass("active"); The problem is, if I alter the css of the span elements ($span.css(...)), it doesn't apply the CSS changes on add/remove class. But if I comment out changing the css of the span, the multiple colors aren't added, but the active class add/removal of selected/deselected span changes colors as expected: // $span.css({background : colorEn[i]}); CSS: .active { background-color: Silver; color: black; } I would simply not alter .css of a span at all, but don't think it makes sense to add classes to each span during generation, and have to add CSS class rules for each color to replicate that .css functionality. My question: How can I add multiple different css rules (ex: multicolors) to randomly generated elements without a) having to generate all those rules manually in the CSS file, and b) altering the .css with jQuery such that it causes problems with adding/removing CSS class rules. Sorry if this is unclear. Thanks!
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/26791619
score: 1
has comment: http://stackoverflow.com/comment/42158830
upvote count: 1
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42158714
has answer: http://stackoverflow.com/a/26791619
has comment: http://stackoverflow.com/comment/42158832
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41950545
type: Comment
type: QuestionComment
score: 2
has text: Work fine : http://jsfiddle.net/g5rbxncs/ . Are you waiting the DOM to be ready?
comment on: http://stackoverflow.com/q/26675622

http://stackoverflow.com/comment/42116112
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26767077
has text: the var_dump($memo_data) gives me **[0]=> string(12) "ACKIS 692.33" [1]=> string(6) "ACMAN "** so it contains 1 or 2 values.. I took out the time value to see the difference but theres none

http://stackoverflow.com/comment/42036846
type: Comment
score: 0
type: AnswerComment
has text: @Winchestro thanks for your answer, I've used a slightly different version of this pattern before, but I'm not sure how a private/public method will be called inside a jQuery event. Would you simply use `mySingleton.methodName()` or `instance.methodName()`?
comment on: http://stackoverflow.com/a/26723001

http://stackoverflow.com/q/26817359
has comment: http://stackoverflow.com/comment/42205117
type: AnsweredQuestion
tagged with: jsf
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/42205098
tagged with: javascript
has comment: http://stackoverflow.com/comment/42205182
has title: Set and get a HTML created in javascript to session local storage
score: 0
answer count: 2
has body: I need that the below code persist to exist in page reload, Ok. some text here more text here I need to add dynamically in javascript some more elements, but you can consider it as example. I put the elements of code above in a parent div, the div parent id is 'chatUsuario' and the javascript var name is 'mensagem', anyway, var mensagem = document.getElementById('chatUsuario'); if (mensagem != null) { $(mensagem) .append( ' ' + args.dataHora + ' ' + ' ' + ' ' + ' ' + args.mensagemRetorno + ' ' + ' '); } I try many things, but nothing with success, for example: localStorage.setItem('mensagensBackup',JSON.stringify(mensagem)); $(window).load(function() { var mensagensBackup = localStorage.getItem('mensagensBackup'); if(mensagensBackup!=null) { var retrievedObject = JSON.parse(mensagensBackup); document.getElementById('chatUsuarioContainer').innerHTML=retrievedObject; } }); I try too jStorage.js, without success again. Both cases I have the same error: "converting circular structure to json" I really try, but I can't solve this error Any another solution? have a workaround solution? something that I can do? Thanks so much ;) PS: I using JSF 2.2 and Prime 5
has answer: http://stackoverflow.com/a/26817527
tagged with: jquery
has answer: http://stackoverflow.com/a/26817493
accepted answer: http://stackoverflow.com/a/26817493
possible better answer: http://stackoverflow.com/a/26817527
has comment: http://stackoverflow.com/comment/42205054
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26827444
type: Question
possible better answer: http://stackoverflow.com/a/26827531
upvote count: 0
tagged with: javascript
tagged with: jquery
has title: Get values from Key/Value variable in javascript
answer count: 3
has body: Please consider this scenario: I have a Key/Value variable like this: var dict = {"78": "X", "12": "G", "18": "R", "67": "U", "68": "O", "30": "P"} I have a string that I want to check if there is a letter of my variable exist in my string. How I can do this?
favorite count: 0
has answer: http://stackoverflow.com/a/26827602
has answer: http://stackoverflow.com/a/26827531
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26827496
accepted answer: http://stackoverflow.com/a/26827496
score: -1

http://stackoverflow.com/q/26787198
score: 6
tagged with: css
upvote count: 6
type: AnsweredQuestion
tagged with: dialog
type: Question
tagged with: reactjs
has answer: http://stackoverflow.com/a/26789089
has body: How to append reactjs modal window with body end tag to set the modal positioning absolute with body tag. Here is example added inside the another component. &lt;div className="modal"&gt; &lt;p&gt;Model Pop-up &lt;button onClick={this.handleClick}&gt;here&lt;/button&gt;&lt;/p&gt; &lt;div id="js-modal-inner" className="modal"&gt; &lt;div className="modal__content js-dialog"&gt; &lt;a className="modal__close" onClick={this.handleClose}&gt;&amp;times;&lt;/a&gt; &lt;header className="modal__header"&gt; &lt;h2 className="modal__title"&gt;Split Ticket:&lt;/h2&gt; &lt;/header&gt; &lt;div className="modal__content--inner"&gt; {this.props.children} &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div className="modal__overlay js-fade"&gt;&lt;/div&gt; &lt;/div&gt;
tagged with: javascript
tagged with: modal-dialog
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26789089
has title: ReactJs Modal Using Javascript and CSS

http://stackoverflow.com/q/26759310
tagged with: cross-domain
has comment: http://stackoverflow.com/comment/42176064
tagged with: jquery
type: UnansweredQuestion
has body: We have one issue in displaying other domain page in our application. Here is the Issue: Consider applications NS and TPT, I need to display application TPT page in application NS and I need to pass sensitive data to From NS to TPT. When I tried to get complete page from TPT and display in NS, I don't see data in browser though i see complete page through view-source (Because of Same Origin Policy). Is there anyway I can get this done by overcoming 'Same Origin Policy'? Here is the code I used from NS: $.ajax({ url : "http://localhost:8090/tpt-web/jas/dashboard/home.action", type : "POST", cache : false, data : "USER:raj", dataType : "text", success : function(result) { var newWindow = window.open("http://localhost:8090/tpt-web/jas/dashboard/home.action", "", "height=815,width=680,top=0,right=250,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizeable=no"); newWindow.document.write(result) }, error : function(XMLHttpRequest, textStatus, errorThrown) { alert('Error occured while connecting to TPT application'); } });
answer count: 0
has comment: http://stackoverflow.com/comment/42131689
has comment: http://stackoverflow.com/comment/42211502
has comment: http://stackoverflow.com/comment/42100237
type: Question
has comment: http://stackoverflow.com/comment/42221222
has comment: http://stackoverflow.com/comment/42223824
has title: Cross Domain application Page display via post call
tagged with: javascript
score: 0
tagged with: same-origin-policy

http://stackoverflow.com/q/26831333
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26831379
type: Question
has title: Get data back after AJAX request
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
accepted answer: http://stackoverflow.com/a/26831379
answer count: 1
linked to: http://stackoverflow.com/q/4064444
tagged with: twitter-bootstrap
tagged with: php
has body: I am using AJAX to run a php file and send data with it. Currently I use complete: function() { location.reload(); } To reload the page after the php file is done. What I want is that when there is an error in the external php file, an alert is displayed (Bootstrap). Displaying an alert is not the problem, I have a function for that that accepts the string and type of alert but that is in PHP. That leads me to two questions; How do I get data back from the AJAX call? How do I use that data to display an alert with a PHP function (after a reload possibly)? Thanks! EDIT: In my external php file I have: header('Content-Type: application/json'); $error = 1; echo json_encode($error);

http://stackoverflow.com/q/26718637
accepted answer: http://stackoverflow.com/a/26718821
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/26718742
has title: populate array with UNIQUE random numbers javascript
tagged with: random
has answer: http://stackoverflow.com/a/26718739
downvote count: 0
linked to: http://stackoverflow.com/q/6274339
has answer: http://stackoverflow.com/a/26718769
favorite count: 0
possible better answer: http://stackoverflow.com/a/26718739
upvote count: 2
has comment: http://stackoverflow.com/comment/42027402
answer count: 4
has body: I have an array : var array = new Array(); Here is the random function, which gives a random number between min and max (seen in a previous Stackoverflow topic) : function randomIntFromInterval(min,max) { return Math.floor(Math.random()*(max-min+1)+min); } This array is meant to have 9 cells. I would like to populate it with random number, with the important condition that each of those number are unique, which means a number in this array cannot be found twice or more.So finally, here is where I am stuck (whole code) : var array = new Array(); function randomIntFromInterval(min,max) { return Math.floor(Math.random()*(max-min+1)+min); } // populate the variable "array" with 9 different // random numbers function randomlyInitializeArray() { var random = 0; // For each cell (9 cells) in my "array" for (var i = 0; i &lt; maxLength; i++) { // Return a number between 1 &amp; 9 random = randomIntFromInterval(1, maxLength); /* Verifying if this random number is already in the "array" /!\ stuck here /!\ */ } } So, what is the logic for populate an array with 9 unique (different) number ?
score: 2
type: AnsweredQuestion
type: Question
linked to: http://stackoverflow.com/q/2450954
has answer: http://stackoverflow.com/a/26718821

http://stackoverflow.com/comment/41951955
type: Comment
type: QuestionComment
has text: Enable the button only after load complete
comment on: http://stackoverflow.com/q/26674919
score: 0

http://stackoverflow.com/q/26719238
has body: i have two arrays of objects like shown below : var b = [{"from":2,"to":7,"id":1},{"from":3,"to":9,"id":2},{"from":2,"to":7,"id":3}] var c = [{"from":3,"to":9,"id":2,"style":""},{"from":2,"to":7,"id":3,"style":"dash-line"},{"from":4,"to":2,"id":4,"style":"dash-line"},{"from":2,"to":4,"id":5,"style":""},{"from":4,"to":2,"id":6,"style":"dash-line"}]; what i want is an array of objects from above two , which has unique "from" ,"to" and "style" should be either ""(blank) or undefined.With unique ids. i.e output = [{"from":2,"to":7,"id":0},{"from":3,"to":9,"id":1},{"from":2,"to":4,"id":6,"style":""}] am able to get it as shown in below code, but i feel code can be optimized or there can be a better way to do it. Please help....Thanks. var b = [{"from":2,"to":7,"id":1},{"from":3,"to":9,"id":2},{"from":2,"to":7,"id":3}] var c = [{"from":3,"to":9,"id":2,"style":""},{"from":2,"to":7,"id":3,"style":"dash-line"},{"from":4,"to":2,"id":4,"style":"dash-line"},{"from":2,"to":4,"id":5,"style":""},{"from":4,"to":2,"id":6,"style":"dash-line"}]; var a = b.concat(c); findUniQue(a); function findUniQue(a){ var tempArr =[]; for(var i =0;i&lt;a.length;i++){ if(a[i].style == undefined || a[i].style != 'dash-line' ){ var count = 0; if(tempArr.length&gt;0){ for(var j =0;j&lt;tempArr.length;j++){ if((a[i].from == tempArr[j].from)&amp;&amp;(a[i].to == tempArr[j].to)){ count--; break; } else{ count++; } if(count == tempArr.length){ a[i].id = i; tempArr.push(a[i]); } } } else{ a[i].id = i; tempArr.push(a[i]); } } } console.dir(tempArr); }
accepted answer: http://stackoverflow.com/a/26737677
upvote count: 2
downvote count: 1
type: AnsweredQuestion
has title: finding unique values from two arrays of objects based on two keys i.e from and to in javascript
has comment: http://stackoverflow.com/comment/42028726
score: 1
type: Question
has answer: http://stackoverflow.com/a/26737677
tagged with: arrays
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42028891
favorite count: 0

http://stackoverflow.com/q/26796964
tagged with: javascript
tagged with: jquery
has body: I've got the following _underscore / html line of code. It displays a button correctly. wrapper.append(' ' + 'Accept' + ' '); I then have this line for another button, I want to combine the two lines of code, so that I can have both buttons in the same div and style with css display-inline so they appear side by side and not above/below each other. No matter what I do I can't combine the two lines of code, can some one show me how to do this? wrapper.append(' ' + 'Decline' + ' '+ ' ');
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Display buttons in-line to above/ below each other using?
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42196202
has comment: http://stackoverflow.com/comment/42188608
type: Question
has comment: http://stackoverflow.com/comment/42187942

http://stackoverflow.com/comment/41995800
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26701047
has text: BTW.: don't forget the double == in if-condition
score: 0

http://stackoverflow.com/comment/42219799
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26825636
has text: How can you tell `dimensions` of image from that `data`? i think it is only `color` information, but what about `width` and `height`?
score: 0

http://stackoverflow.com/q/26711556
tagged with: javascript
has comment: http://stackoverflow.com/comment/42014645
possible better answer: http://stackoverflow.com/a/26711724
has answer: http://stackoverflow.com/a/26714026
has body: I have seen some code from a Google Chrome extension which calls getElement with this instead of document: var item = this; item.getElement('referrer').onclick = function() { chrome.tabs.create({url: item.referrer}); return false; }; item.getElement('by-ext').onclick = function() { chrome.tabs.create({url: 'chrome://extensions#' + item.byExtensionId}); return false; } When I used a sample script in my browser like this.getElementById('anelement').innerHTML = 'something'; it gives error and it doesn't work. Can anyone tell me why is it like this? Can the above method only be used with Google Chrome extensions?
score: 0
accepted answer: http://stackoverflow.com/a/26714026
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42018606
has comment: http://stackoverflow.com/comment/42017579
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26711724
has title: Using this with getelement

http://stackoverflow.com/q/26768325
has title: Refresh kendo tooltip after chart refresh
answer count: 0
upvote count: 1
tagged with: kendo-tooltip
type: Question
tagged with: kendo-chart
score: 1
has body: I have a Kendo Chart with several data points over time. The default scale is set to months. On hovering each of these points the tooltip is displayed with the value of each point. I have customized an event on the series click in which I detect the current month clicked and update the x axis to show the information for the month selected. The event code is as follows: function onSeriesClick(e) { var selectedDate = e.category; var categoryAxis = $('#chart').data('kendoChart').options.categoryAxis; var startDate = categoryAxis.min; var endDate = categoryAxis.max; categoryAxis.min = new Date(selectedDate.getFullYear(), selectedDate.getMonth()); categoryAxis.max = new Date(selectedDate.getFullYear(), selectedDate.getMonth() + 1); categoryAxis.baseUnit = "days"; categoryAxis.labels.rotation = -90; $('#chart').data('kendoChart').refresh(); } As you see, the above mentioned function just obtains the date of the selected point and updates the category axis to show only a month span. The chart is then refreshed to show this changes. As a result of the range change, some of the data points disappear from the chart which is an expected behaviour. However, even tough the points have disappeared from the chart, moving the cursor over the chart where the other points used to be, results in the tooltip for them to still show. I have to either click somewhere on the chart or move the cursor completely away from the chart area to make the tooltips for the points that are not there anymore to disappear. My question is, is there anything that I can do to "refresh" the tooltip when the range for the chart is refreshed? I was thinking in something like $('#chart').data('kendoChart').options.tooltip.refresh(); But this method does not exist. What can I do? Greetings! EDIT: I have provided a jsfiddle which illustrates my problem. Just click on any of the data points and then move the cursor inside the chart area and you will see the problem. http://jsfiddle.net/pagasnc1/
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: kendo-asp.net-mvc
has comment: http://stackoverflow.com/comment/42118059

http://stackoverflow.com/comment/42161930
type: Comment
type: QuestionComment
has text: @Yousef Wow thanks this is exactly what I needed you should probably post an answer. I ended up figuring it out myself but our code is very much the same.
score: 0
comment on: http://stackoverflow.com/q/26781577

http://stackoverflow.com/comment/42000199
type: Comment
comment on: http://stackoverflow.com/q/26694334
score: 0
has text: Hi webeno. I have created a gridster element with 30 columns and I want to be able to comfortably drag a .box element from column 1 to column 30. Naturally, not all of the columns fit in the view so a scrollbar is necessary. When I drag a .box element to the right bound, I want the offset to change (autoscroll) even when the mouse isn't being moved. If it's still unclear, have a look at the answer in this thread: [CLICK](http://stackoverflow.com/questions/14263676/implementing-auto-scroll-with-jquery-ui-draggable-widget). I want to be able to do the same using gridster.
type: QuestionComment

http://stackoverflow.com/a/26708499
type: Answer
downvote count: 1
has comment: http://stackoverflow.com/comment/42009449
score: -1
has comment: http://stackoverflow.com/comment/42009348
upvote count: 0
answers question: http://stackoverflow.com/q/26708331
has comment: http://stackoverflow.com/comment/42009405
has comment: http://stackoverflow.com/comment/42009678
has body: I have added 'hasClass' to check if the a particular element belongs to a class or not. I have also added 'addClass' and 'removeClass' methods to add and remove a class from the specified elements class list. Following is the implementation: var link1 = document.getElementById("changeFont1"); var link2 = document.getElementById("changeFont2"); link1.onclick = function() { changeFont(2); }; link2.onclick = function() { changeFont(1); }; function changeFont(num) { var fromFont = 'unicode ieUnicode'; var toFont = 'zawgyi'; if ( num==2 ) { fromFont = 'zawgyi'; toFont = 'unicode ieUnicode'; }; /* Change classes */ var elems = document.getElementsByClassName( fromFont ); var i = elems.length; while(i--) { var item = elems[i]; if (hasClass(item, fromFont)) { removeClass(item, fromFont); addClass(item, toFont); } }; return false; }; function hasClass(ele,cls) { return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)')); } function addClass(ele,cls) { if (!hasClass(ele,cls)) ele.className += " "+cls; } function removeClass(ele,cls) { if (hasClass(ele,cls)) { var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)'); ele.className=ele.className.replace(reg,' '); } } .unicode{ border: 2px solid blue; } .zawgyi { border: 2px solid red; } .pull-right { float: right; } .pull-left { float: left; } .clearfix { clear: both; } Unicode Zawgyi Unicode Unicode
has comment: http://stackoverflow.com/comment/42549431

http://stackoverflow.com/comment/41983679
type: AnswerComment
type: Comment
has text: Nice use of setting the value as the opposite of the current, very concise. i would recommend caching the jQuery lookup though so you don't have to get it twice
comment on: http://stackoverflow.com/a/26694185
score: 0

http://stackoverflow.com/q/26701240
tagged with: http://stackoverflow.com/tag/html
has body: I am working on a simple ASP.NET project. I have HTML and a JS file. I am trying to send the values of the form inputs to the JS file, but it seems to be broken for some reason. My form looks like: Hours: Minutes: Seconds: and my JS is: var setHour = document.getElementById("fhours").value; var setMinute = document.getElementById("fminutes").value; var setSecond = document.getElementById("fseconds").value; and the function that meant to use it: function setTheClockByButton() { setTheClock(setHour, setMinute, setSecond); alert(setHour); } If I put a number to the value in the HTML form it works fine(like this) Hours: but it not accepting any data from the keyboard. And of course I have the onclick function associated to the form: document.getElementById("send").onclick = setTheClockByButton; (otherwise it'd make no sense).
has answer: http://stackoverflow.com/a/26701270
favorite count: 0
possible better answer: http://stackoverflow.com/a/26701365
has comment: http://stackoverflow.com/comment/41996055
upvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26701270
tagged with: forms
downvote count: 1
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41996516
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41996069
has title: Why is not my HTML form sending the data to my JS file?
has answer: http://stackoverflow.com/a/26701365

http://stackoverflow.com/comment/42079704
type: AnswerComment
has text: thank you nbrooks! I was able to easily understand this and modify to fit what I need.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26708418

http://stackoverflow.com/a/26787071
has body: I don't think you can use moment inside the interpolation {{ }}. Angular only runs a very cut down version of JavaScript inside. So, your best bet is to make a method that will return you the csv file name. Example below. var app = angular.module('myApp', []); app.controller('Ctrl', function($scope) { $scope.dates = { startDate: new Date(), endDate: new Date() }; $scope.createCsvFilename = function(dates) { var startMoment = moment(dates.startDate); var endMoment = moment(dates.endDate); return startMoment.format('DD-MM-YYYY') + ' - ' + endMoment.format('DD-MM-YYYY') + '.csv'; } }); {{ createCsvFilename(dates) }} Download results as CSV
type: Answer
has comment: http://stackoverflow.com/comment/42151492
accepted answer of: http://stackoverflow.com/q/26783090
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/26783090
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26713629
accepted answer: http://stackoverflow.com/a/26762687
score: 0
has body: I want to be able to write a few mysql queries with the returned value(s) of my radio button(s). Here is the code I have <?php include 'db_connector.php'; $result = mysqli_query($con,"SELECT * FROM os_scope"); while($row = mysqli_fetch_array($result)) { $row['name']; echo " ".$row['name']." "; } ?> Person info will be listed here. Here is my php file getuser.php <?php $q = intval($_GET['q']); $con = mysqli_connect('localhost','root','abc123','mydb'); if (!$con) { die('Could not connect: ' . mysqli_error($con)); } mysqli_select_db($con,"ajax_demo"); $sql="SELECT * FROM os "; $result = mysqli_query($con,$sql); echo " ID Name Scope Client Supplier "; while($row = mysqli_fetch_array($result)) { echo " "; echo " " . $row['id'] . " "; echo " " . $row['name'] . " "; echo " " . $row['scope'] . " "; echo " " . $row['client'] . " "; echo " " . $row['supplier'] . " "; echo " "; } echo " "; mysqli_close($con); ?> However, when I run the code I keep getting this error: Notice: Undefined index: q Which means q is not been sent to the php file, any ideas how I can fix this? I would really appreciate all the help I can get. Sorry if this is a dumb question but am really new at this, so I would really appreciate the help. Thanks.
tagged with: php
type: AnsweredQuestion
has title: Sending radio button value using AJAX to get PHP file to retrieve data from MySQL
tagged with: mysql
linked to: http://stackoverflow.com/q/26605969
type: Question
tagged with: radio-button
answer count: 1
has answer: http://stackoverflow.com/a/26762687
tagged with: javascript
tagged with: ajax

http://stackoverflow.com/comment/42424451
comment on: http://stackoverflow.com/a/26704135
type: AnswerComment
score: 0
type: Comment
has text: Wish I could provide more details, commenting is limited... I have experience with Google Apps Script; my javascript is limited to what I've learned playing with GAS. I cannot get a user interface to display. I decided to try the UIApp instead of HTMLService just as a learning tool. I have copied/pasted the code in from the documentation, and still nothing. I suspect the problem is where I'm calling the function from. The code builds a UI App, and at the end returns "myApp". Should it automatically display when the function is called, just by returning the UI? The doc implies so, but...

http://stackoverflow.com/a/26788215
has comment: http://stackoverflow.com/comment/42153165
accepted answer of: http://stackoverflow.com/q/26787952
type: Answer
upvote count: 1
has body: You can use the new History API method pushState: &lt;input type="button" value="Post #2" onclick="history.pushState(null, 'MyWebsite Post #2', 'http://mywebsite.com/?postNumber=2');" /&gt; When you click this button, the location will change to http://mywebsite.com/?postNumber=2 and then you can call your getQueryParams function as follows: getQueryParams(location.search); The pushState will NOT work if you open the page as a file, in another words, it must come from a webserver (it works with localhost)
score: 1
answers question: http://stackoverflow.com/q/26787952
downvote count: 0
has comment: http://stackoverflow.com/comment/42155161
has comment: http://stackoverflow.com/comment/42155720
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42152873

http://stackoverflow.com/q/26691046
has comment: http://stackoverflow.com/comment/41978765
type: AnsweredQuestion
type: Question
tagged with: rotation
has body: Is there a simple way to gather the mouse pointer on the screen without using jquery to rotate something. I have a figure on screen with arms and want them to rotate in the direction of the muse pointer. For Example how would I do something like shown below if (mosue_moved_up) { digit = 1; } else if (mouse_moved_down) { digit = 2; } else if (mouse_moved_right) { digit =3; } else if (mouse_moved_left) { digit = 4; }
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41978807
has answer: http://stackoverflow.com/a/26691273
tagged with: canvas
has title: Gather mouse position on canvas using Javascript
answer count: 1
accepted answer: http://stackoverflow.com/a/26691273

http://stackoverflow.com/comment/42094995
score: 0
comment on: http://stackoverflow.com/q/26756395
type: Comment
type: QuestionComment
has text: And I do not see any text with "5562089" in it. In your code. I see a link with it in it.

http://stackoverflow.com/comment/42062314
score: 0
has text: "brackets" , or parenthesis ? If possible can post actual array literal ? Is requirements to sum `-1 + +1` , etc. ?
comment on: http://stackoverflow.com/q/26738172
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26731389
has comment: http://stackoverflow.com/comment/42060744
has comment: http://stackoverflow.com/comment/42059575
has comment: http://stackoverflow.com/comment/42050732
has comment: http://stackoverflow.com/comment/42050647
has comment: http://stackoverflow.com/comment/42056235
has comment: http://stackoverflow.com/comment/42059473
has comment: http://stackoverflow.com/comment/42050773
has comment: http://stackoverflow.com/comment/42050574
answers question: http://stackoverflow.com/q/26731220
type: Answer
has comment: http://stackoverflow.com/comment/42054980
score: 1
upvote count: 3
downvote count: 2
has body: That Ë isn't necessarily in the cyrillic alphabet, and as such, not caught in the А-Яа-я range you're using. Is your Ë Cyrillic: U+0401 or just Latin: U+00CB? If you also want to catch non-cyrillic Ë's , you may want to add this range to your regex: À-ÿ: alert(JSON.stringify("Ëë".match(/^[À-ÿ]+$/))) If you just want to catch Ë's in the Cyrillic alphabet, try this: Instead of starting your range at U+0410 (А), start it at U+0400 (Ѐ) and end it at U+045F (џ): alert(JSON.stringify("Ёё".match(/^[Ѐ-џ]+$/))) (This last range should include the full Cyrillic alphabet.) Source: Unicode character codes. You can use this page to check what range(s) you need to add to your regex.
has comment: http://stackoverflow.com/comment/42059537
has comment: http://stackoverflow.com/comment/42055650

http://stackoverflow.com/q/26719750
has body: I am using ng-flow library to load images to server and after user dragged and dropped image, I can get HTML 5 file image to my controller and I need to download it to server together with the ohter parameters, like currency, subject etc. I googled and find that the best way is to convert to json form data and send with POST method. When I got the response from server, I see that form data contains subject but does not contains the image. What could be wrong? In following code url is real, you can try to get your own response. Angular code: var file = $flow.files[0]; $http({ method: 'POST', url: "http://yuppi.com.ua/server/rest/add.php?key=453sdfg3t&amp;action=add", headers: { 'Content-Type': false }, transformRequest: function (data) { var formData = new FormData(); formData.append("subject", angular.toJson(data.subject)); formData.append("file", data.file); return formData; }, data: { subject: subject, file: file} }). success(function (data, status, headers, config) { alert(data); }). error(function (data, status, headers, config) { alert(data); }); PHP code: $form = file_get_contents("php://input"); echo "Form: "; print_r($form); var_dump of $_FILES "array(1) { ["photo"]=&gt; array(5) { ["name"]=&gt; string(14) "gradient-2.png" ["type"]=&gt; string(9) "image/png" ["tmp_name"]=&gt; string(14) "/tmp/phpY8nqji" ["error"]=&gt; int(0) ["size"]=&gt; int(442567) } }
type: AnsweredQuestion
tagged with: javascript
has title: Angular submit form data
type: Question
accepted answer: http://stackoverflow.com/a/26722180
has comment: http://stackoverflow.com/comment/42029935
has comment: http://stackoverflow.com/comment/42029768
tagged with: angularjs
score: 0
tagged with: php
answer count: 1
has comment: http://stackoverflow.com/comment/42029807
has answer: http://stackoverflow.com/a/26722180

http://stackoverflow.com/a/26824096
has body: I suspect another issue you might be seeing is that the form is submitted which means the page gets refreshed after you've set the yes/no value. You might could suppress the form submission by returning false after you call your method (or return false from your method). Like so: Is it prime? This tool was designed to determine if a number is prime Alternatively, you could run the isitprime function on page load which could take the value from the query string.
type: Answer
answers question: http://stackoverflow.com/q/26823955
score: 0

http://stackoverflow.com/comment/42220700
type: AnswerComment
has text: For anyone viewing this page and thinking about using the code then you probably want to change the onmouseover="" to a onclick="" event, works better, the onmouseover="" can be a little glitchy. For human computer interaction purposes the onmouseover="" is a little irritating in my opinion, the onclick="" gives it a better feel...
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26821569

http://stackoverflow.com/comment/42081865
type: QuestionComment
has text: Of course yes, but I don't think you well interpreted the issue. Bob's comment is not re-sent to Bob... => so Bob will still see his comment to the top (until he refreshes the whole page), because the `create_date` at client side will always been anterior to Alice's one; even if Alice's one was computed before.
score: 0
comment on: http://stackoverflow.com/q/26748500
type: Comment

http://stackoverflow.com/a/26771802
answers question: http://stackoverflow.com/q/26771764
score: 0
has body: u can add property like this divElement.className = 'foo';
type: Answer

http://stackoverflow.com/a/27125124
answers question: http://stackoverflow.com/q/26716508
type: AcceptedAnswer
has body: Ended up just using the following javascript to toggle visibility of divs instead as well as putting onclick="toggle_visibility('Detector_Type');" in my pick-list field &lt;script type="text/javascript"&gt; function toggle_visibility() { var detector = document.getElementById('Detector_Type').value; var roic = document.getElementById('ROIC'); var dcr = document.getElementById('DCR'); var sub = document.getElementById('Substrate_Material'); var range = document.getElementById('Optical_Range'); var register = document.getElementById('Register_Size'); if(detector === 'GMAPD'){ roic.style.display = 'block'; dcr.style.display = 'block'; sub.style.display = 'block'; range.style.display = 'none'; register.style.display = 'none'; } else if(detector === "DFPA"){ roic.style.display = 'none'; dcr.style.display = 'none'; sub.style.display = 'none'; range.style.display = 'block'; register.style.display = 'block'; } else{ roic.style.display = 'none'; dcr.style.display = 'none'; sub.style.display = 'none'; range.style.display = 'none'; register.style.display = 'none'; } } &lt;/script&gt; Similar to this
accepted answer of: http://stackoverflow.com/q/26716508
score: 0
type: Answer

http://stackoverflow.com/comment/42047732
has text: @user2727195 [Get the same issue in angular github.](https://github.com/angular/angular.js/issues/1580) Seems you cannot use the $routeProvider without ng-view. So I think you can write your own route provider if you don't like angular-route. : )
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26729260

http://stackoverflow.com/q/26722774
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26723202
favorite count: 0
score: -3
tagged with: animation
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: elegantly animate a stack of divs
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/42035624
type: Question
has comment: http://stackoverflow.com/comment/42035859
tagged with: javascript
has body: I am trying to achieve a nice animation, however I am a bit stuck using CSS only to achieve the effect that I want. Currently I am using animate.css to animate new elements in, but the old element dont move gracefully, since I have no further animation. Here is a http://jsfiddle.net/tcq8kuy6/1/ illustrating the current state of my animation. setInterval(function(){ var newbox = "&lt;div class='child animated bounceInDown'&gt;&lt;/div&gt;" $('.container').prepend(newbox); }, 2000);
downvote count: 3
answer count: 1
has answer: http://stackoverflow.com/a/26723202

http://stackoverflow.com/a/26792959
answers question: http://stackoverflow.com/q/26791843
has comment: http://stackoverflow.com/comment/42187520
score: 0
type: AcceptedAnswer
type: Answer
has body: ng-if, when evaluated to false, indeed removes that element and all of its children elements, handlers, etc from the DOM. Your concern that the element will still be there in DOM if the expression is false, happens with ng-show/ng-hide. (not with ng-if). You can have a simple test for this. Create a webpage containing ng-if="false", and try using getElementById or jQuery's $("#someId"), you will not get the desired element from these selectors. For further explanations, When to favor ng-if vs. ng-show/ng-hide?
accepted answer of: http://stackoverflow.com/q/26791843

http://stackoverflow.com/comment/42094409
has text: No, because it wouldn't meet the definition of a CSRF attack since it wouldn't involve an HTTP request that had side effects. The argument "CSRF attacks might be defined differently if browsers hasn't implemented certain security restrictions back when JS was first introduced" isn't a very useful area of discussion.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26752381

http://stackoverflow.com/comment/42171827
type: Comment
comment on: http://stackoverflow.com/a/26798357
type: AnswerComment
score: 0
has text: Done :) http://jsfiddle.net/2mdmz3bq/1/ It was needed a different regex and parseFloat instead of parseInt

http://stackoverflow.com/q/26692776
has comment: http://stackoverflow.com/comment/41981879
has answer: http://stackoverflow.com/a/26693440
has comment: http://stackoverflow.com/comment/41982027
has comment: http://stackoverflow.com/comment/41981217
type: Question
has comment: http://stackoverflow.com/comment/41981908
has answer: http://stackoverflow.com/a/26693536
has comment: http://stackoverflow.com/comment/41981201
has comment: http://stackoverflow.com/comment/41981220
has comment: http://stackoverflow.com/comment/41981777
tagged with: javascript
tagged with: jquery
score: -1
answer count: 3
has comment: http://stackoverflow.com/comment/41981290
has comment: http://stackoverflow.com/comment/41982079
has comment: http://stackoverflow.com/comment/41981795
downvote count: 1
has answer: http://stackoverflow.com/a/26698262
has body: I have a problem in my project. To describe this issue I have wrote simplified code snippet: function waitFor(fnReady, fnCallback) { var check = function() { if (fnReady()) { fnCallback(); } else { setTimeout(check, 100); // wait another 100ms, and try again } }; check(); } var result = 0; var flag = true; function ajaxRequest() { setTimeout( function() { flag = false; console.log('ping'); },3000 ); } function ajaxRequestHandler() { setTimeout( function() { flag = true; console.log('pong'); }, 200 ); } for(var i =0;i&lt;10; i++){ waitFor(function() { return flag; }, ajaxRequest); waitFor(function() { return !flag; }, ajaxRequestHandler); } it returns: ping - 10 times pong - 10 times desired result: ping 3 second timeout ping --------------------- ping 3 second timeout pong -------------------- ..... Can you help correct my code? UPDATE Actual problem: I have a google map. I have a lot of places when I should to redraw it. For application logic very important that If I send request1 request2 request3 request4 I should handle responses in the this order handle response of request1 handle response of request2 handle response of request3 handle response of request4 Problem that I don't know order of requests. In different places of file I see following code rows: google.maps.event.addListener(searchBox, 'bounds_changed', renderTerminalsOnMapAndFitBounds); ... $.getJSON('getAllTerminals.json', renderTerminalsOnMapAndFitBounds); ..... $.getJSON('getAllTerminalsInsideRectangle.json', renderTerminalsOnMapAndFitBounds); ... $.getJSON('getAllTerminalsInsideCircle.json', renderTerminalsOnMapAndFitBounds); ... $.getJSON('getBigTerminals.json', renderTerminalsOnMapAndFitBounds); ........ renderTerminalsOnMapAndFitBounds method sends request to server and in succes alternative render result on map. But this event happens very often
tagged with: synchronization
favorite count: 0
has comment: http://stackoverflow.com/comment/41981728
upvote count: 0
has comment: http://stackoverflow.com/comment/41981329
type: UnansweredQuestion
has title: How to set callback order invocation same as target function invocation
linked to: http://stackoverflow.com/q/26691226
has comment: http://stackoverflow.com/comment/41981711
has comment: http://stackoverflow.com/comment/41981144

http://stackoverflow.com/comment/42025178
type: Comment
has text: I like this answer but do both apps have to be run at the same time for this to work?
comment on: http://stackoverflow.com/a/26717471
type: AnswerComment
score: 0

http://stackoverflow.com/a/26740613
upvote count: 2
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42067374
type: Answer
answers question: http://stackoverflow.com/q/26740583
has body: You need to use a string( "..." ): window.location.href = "http://www.youtube.com";

http://stackoverflow.com/comment/42212438
type: Comment
type: QuestionComment
has text: Thank you, @Brian, can you possibly show this in a Fiddle, if possible? :-)
score: 0
comment on: http://stackoverflow.com/q/26821321

http://stackoverflow.com/comment/42097651
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26752702
has text: It seems like it's supposed to not show GUI if `registered` is set. You don't show what's happening in `index.html`.

angularjs-resource
tags question: http://stackoverflow.com/q/26790638
type: Tag
tag name: angularjs-resource

http://stackoverflow.com/comment/42113687
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26765871
type: QuestionComment
has text: I would try to lose the updatepanel. I've had a lot of problems in the past when using UpdatePanels and mixing jQuery in there. If you're using .Net, you can either call your code-behind functions from the script, by making them public webmethods or you can make an AJAX call to a webservice - and then manipulate the DOM accordingly. You won't have any of these issues if you do that. Otherwise, you need to rebind your events and refire your functions when the update panel is completely loaded, but as far as I know, there is no "event" to listen for indicating such. Good luck.

http://stackoverflow.com/comment/42208299
type: QuestionComment
comment on: http://stackoverflow.com/q/26819043
has text: @ThomasBormans I've added what I've tried above. It's a script I found online somewhere, which I've tried to edit to suit me. I'm not the best at javascript as I've only recently started learning it.
score: 0
type: Comment

http://stackoverflow.com/comment/57846665
comment on: http://stackoverflow.com/a/26711782
score: 0
type: AnswerComment
type: Comment
has text: "Promise returning functions should generally have the guarantee that they should not throw synchronously since they might throw asynchronously". Could you expand on why functions should be either synchronous or asynchronous but not both? Currently I enjoy Promise.resolve(), Would you go so far as to say using `Promise.resolve()` is an anti-pattern?

http://stackoverflow.com/a/26707274
score: 0
answers question: http://stackoverflow.com/q/26706768
type: Answer
has body: Interesting idea, my thoughts so far (not tried in combination) are listed below. Sorry for not providing many links, but I think every part is small enough to look up on demand. Box itself It's possible to build such a suggestion box by an unorder list,ul. Just format it for a maximum size, and it's ready to use. Positioning You want to place it under the cursor, I guess you're using a textarea. From a quick search, there's a plugin on GitHub, which gives you the window coordinates of the text cursor. So we have a position now which can be used to position the box, great. Hint: It's a fixed positioning, just update it for each new character. Interaction So far we hopefully have a styled and positioned suggestion box. I would grab the textarea value and trim it down to the last word in front of the cursor. This string can bee looked up via AJAX, local or whatever you like to use. Once you have a set of suggestions and filled the suggestions box, at least I would like to have keyboard support. To do this, just add keyboard listeners for up/down arrow, enter and tab key. For all four you also need to prevent the textarea to react by default on this keys. A click listener on suggestion elements could be useful as well. After click or tab/enter you just want to modify the textarea value at the cursor position.

http://stackoverflow.com/comment/42001060
type: AnswerComment
has text: Definitely easier than mine. Thank you.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26692701

http://stackoverflow.com/a/26832059
has comment: http://stackoverflow.com/comment/42230997
has comment: http://stackoverflow.com/comment/42232647
has comment: http://stackoverflow.com/comment/42232955
has comment: http://stackoverflow.com/comment/42231412
upvote count: 4
has comment: http://stackoverflow.com/comment/42231109
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42231390
has comment: http://stackoverflow.com/comment/42231596
score: 4
has comment: http://stackoverflow.com/comment/42232342
has comment: http://stackoverflow.com/comment/42231839
has comment: http://stackoverflow.com/comment/42231873
has body: As you can see in the headers, the Content-Type header is set to application/x-www-form-urlencoded: 'content-type': 'application/x-www-form-urlencoded' However it is not in the list of allowed content types: allow: ['application/json', 'image/jpeg', 'multipart/form-data','application/pdf'] That's why hapi responds with 415. Instead of validating the type of the request, validate the type of the file in the payload: validate: { payload: { fileUpload: Joi.object({ headers: Joi.object({ 'content-type': Joi.string().valid(['application/pdf']).required(), }).unknown().required() }).unknown() } }
downvote count: 0
has comment: http://stackoverflow.com/comment/42232304
has comment: http://stackoverflow.com/comment/42233127
accepted answer of: http://stackoverflow.com/q/26824850
answers question: http://stackoverflow.com/q/26824850
type: Answer
has comment: http://stackoverflow.com/comment/42244144

http://stackoverflow.com/q/26721877
answer count: 0
has comment: http://stackoverflow.com/comment/42034156
type: Question
has body: Simple version, I'm creating a basic test script since we are using an API to a third party server that keeps customer details and in one of my forms I need to send this data to this server before submit for my own site. This third party side just check the information provided and return if the new password selected by the customer is strongest enough based on personal information, etc. The thing is, I can't make a request to this third party page and I tested on different says, basically I tested the following test This works if I replace param with a static name on my server, for example, mytestscript.cgi - however I can't request the script from another server. How to do it? I don't matter if it's Ajax, JQuery, etc as soon as it work against all major browsers and preferable small. :) A full sample / example is very welcome. Thanks.
has comment: http://stackoverflow.com/comment/42033747
tagged with: javascript
score: 0
has title: How to query another side during onSubmit()?
tagged with: jquery
tagged with: ajax
linked to: http://stackoverflow.com/q/298745
has comment: http://stackoverflow.com/comment/42034088
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42034405
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42035112

http://stackoverflow.com/q/26721317
accepted answer: http://stackoverflow.com/a/26722567
linked to: http://stackoverflow.com/q/4909167
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: Been closely reading this: How to add a custom right-click menu to a webpage? And so I have 2 HTML files, and 1 JS script. I don't use JQuery at all. popup.html Datajuggler popup.js var xhr = new XMLHttpRequest(); xhr.open("GET", "contextmenu.html"); xhr.send(); document.addEventListener("contextmenu", function(e) { // how do I draw the context menu here? e.preventDefault(); }); contextmenu.html Google Youtube So it's very simple. I pull the context menu HTML from contextmenu.html, and I want this div to display whenever I right-click with the mouse (contextmenu event listener). But how do I show this div in place of the default context menu? Thanks.
type: Question
has title: Creating a context menu
has comment: http://stackoverflow.com/comment/97325500
tagged with: javascript
linked to: http://stackoverflow.com/q/18023714
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26722567

wamp
tag name: wamp
tags question: http://stackoverflow.com/q/26690265
type: Tag

http://stackoverflow.com/comment/42077878
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26745170
has text: @jfriend00: Yeah, I know. I just wanted to provide one that was specifically trying to make a copy via assignment. Doesn't matter. Like you said, there are many.

http://stackoverflow.com/comment/42226390
score: 0
type: AnswerComment
has text: Thanks you. You were right: the js-script was executed before the element was build. Putting the script at the end of the page solved the problem, but:
type: Comment
comment on: http://stackoverflow.com/a/26829194

http://stackoverflow.com/q/26829216
has answer: http://stackoverflow.com/a/26829277
type: Question
has body: I encountered some problems in the use of PhantomJS. I refer to this article. I tried to nest open() functions, but I did not get the results I want namely opening all 4 urls and printing all 4 console.logs. code : var page = require('webpage').create(); //新建一个页面 url1 = "-----"; url2 = "-----"; url3 = "-----"; url4 = "http://-----/"; page.open(url1, function(status) { //导航到第一个URL console.log('111111111111'); if (status == "fail") phantom.exit(); //如果发生错误,退出程序 page.open(url2, function(status) { //否则在页面加载完成的回调函数中继续导航到第二个URL,依次类推 console.log('22222222222222'); if (status == "fail") phantom.exit(); page.open(url3, function(status) { console.log('3333333333333333'); if (status == "fail") phantom.exit(); page.open(url4, function(status) { console.log('444444444444444'); if (status == "fail") phantom.exit(); }); }); }); console.log('close'); phantom.exit(); }); result: $ phantomjs test.js 111111111111 close
has comment: http://stackoverflow.com/comment/42225924
tagged with: javascript
upvote count: 2
has title: When to exit when using nested open() functions?
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42225962
accepted answer: http://stackoverflow.com/a/26829277
score: 2
tagged with: phantomjs
type: AnsweredQuestion
downvote count: 0

load-testing
tags question: http://stackoverflow.com/q/26715653
type: Tag
tag name: load-testing
tags question: http://stackoverflow.com/q/26733729

http://stackoverflow.com/q/26828596
has comment: http://stackoverflow.com/comment/42224673
tagged with: time
type: UnansweredQuestion
tagged with: multithreading
has answer: http://stackoverflow.com/a/26828650
has body: I have an array of picture URLs and I need to show each picture for an exact amount of time (750 ms). I have implemented the page using setTimeout function and it works fine except that the time i want to display each picture grows to 752ms or even more... According to this post and many others, I have created a new function: function getTimestamp() { return window.performance.now(); } function waitFor( time, nextFunction ) { var t1 = getTimestamp(); console.log("Start Time: " + t1); var t2 = getTimestamp(); while ( t2 - t1 &lt;= time) { t2 = getTimestamp(); } console.log("End Time: " + t2); nextFunction(); } I know that javascript is excuted in a single thread and that if i run a wait function implemented using a while statement, the main thread of the page will be frozen. In other words, my function is executed synchronous. In my case, that "frosen" time is used to present the pictures, so it's fine by me. I am changing the image source as following: var url = "images/Practice" + imagesArr[randomNum] +".png"; console.log("image path: " + url); imagesArr.splice(randomNum, 1); pictureImg.src = url; pictureImg.style.display="block"; Despite the fact that my code changes the image source perfectly, sometimes the browser won't change the image. It displays only the first picture that was displayed and sometimes it mixes up the order. My page is here. Importantly, my website will be running only in Chrome. I am really puzzled here and i would appreciate any help!!! Thank you, Max.
score: 0
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26828673
has title: Custom timer in JavaScript
tagged with: javascript
tagged with: preferences
has comment: http://stackoverflow.com/comment/42224656
tagged with: timer
linked to: http://stackoverflow.com/q/6875625

http://stackoverflow.com/a/26767999
has body: You can easily use some opensource JS chart library for this. Good options: http://www.chartjs.org/ or http://www.flotcharts.org/ or http://dygraphs.com/ You get the data from your server in i.e. JSON format with AJAX request (5 s period?) and feed it to the chart library. You could use websockets to have updates triggered from server but that is slightly more difficult.
upvote count: 1
has comment: http://stackoverflow.com/comment/42116845
has comment: http://stackoverflow.com/comment/42117288
has comment: http://stackoverflow.com/comment/42117027
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42117074
answers question: http://stackoverflow.com/q/26767683
score: 1

http://stackoverflow.com/comment/42215659
type: AnswerComment
has text: That will do absolutely nothing (the code is wrapped in a load event handler!). It certainly won't deal with the error message quoted.
type: Comment
comment on: http://stackoverflow.com/a/26823263
score: 0

http://stackoverflow.com/a/26747777
score: 0
answers question: http://stackoverflow.com/q/26747339
has body: You want to find .galitem relative to the item clicked, the way you can find that is to use $.closest(). Closest will travel up the DOM tree (starting with the current node) until it finds a matching selector, which is much better than using parent because you're not dependent on the DOM structure making your code less brittle and easier to read. So your code would look like this instead: $(".product").each(function(){ $(this).find(".galcolor2").click(function(){ $(".galitem").hide(); $(this).closest(".product").find(".galitem2").show(); }); });
type: Answer

http://stackoverflow.com/comment/42188114
has text: The same caveats apply to bbcode. Changing the brackets from angled to square doesn't change the syntactic complexity.
comment on: http://stackoverflow.com/q/26807458
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/a/26781703
downvote count: 1
has body: Add this to your css ul { padding-left:0; } http://jsfiddle.net/fey0dcap/
type: Answer
has comment: http://stackoverflow.com/comment/42141041
score: 1
has comment: http://stackoverflow.com/comment/42140690
upvote count: 2
answers question: http://stackoverflow.com/q/26781617

http://stackoverflow.com/q/26749760
answer count: 1
has answer: http://stackoverflow.com/a/26861731
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42185691
tagged with: google-dfp
downvote count: 0
type: UnansweredQuestion
has title: Collapse Empty Div in DFP — Problems
has body: There's something I'm missing when it comes to collapsing empty divs in DFP. I've put both the code in the header and in the individual ad I'm looking to collapse (the poster ad at the top of the right sidebar), and have disabled serving of any ad when no premium ad runs (so technically nothing should serve). However, the div does not seem to collapse, and leaves an empty space. The site is gearhungry.com Thanks for any insight you can provide!
score: 1
type: Question
upvote count: 1

http://stackoverflow.com/tag/csv
type: Tag
tags question: http://stackoverflow.com/q/26732123
tags question: http://stackoverflow.com/q/26783090
tag name: csv
tags question: http://stackoverflow.com/q/26699515
tags question: http://stackoverflow.com/q/26760187
tags question: http://stackoverflow.com/q/26737883
tags question: http://stackoverflow.com/q/26710692
tags question: http://stackoverflow.com/q/26693360
tags question: http://stackoverflow.com/q/26723201
tags question: http://stackoverflow.com/q/26779758
tags question: http://stackoverflow.com/q/26702497
tags question: http://stackoverflow.com/q/26799738
tags question: http://stackoverflow.com/q/26737896

http://stackoverflow.com/a/27363579
type: Answer
answers question: http://stackoverflow.com/q/26724715
has body: Using @WestLangley's advice above I've shifted the organization of my code. Originally I'd been using Object3Ds to hold different sets of objects in the scene (through v68) - this way I could easily access them and iterate though a subset of the contents of the scene in the update phase of my animation. Now as of v69, I've now placed all these objects directly into the scene and named them instead.
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26724715

http://stackoverflow.com/a/26744784
downvote count: 0
has comment: http://stackoverflow.com/comment/42076576
type: Answer
answers question: http://stackoverflow.com/q/26744474
upvote count: 1
has body: This is untested, but you can try the following: remove the clear:left; from ul.products li.first { clear: left; } and add instead ul.products li:nth-of-type(3n+4) { clear: left; } This should result in having clear:left; set to every third li starting by li 4 (= 3n+4 for n = 0). For reference: https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-of-type
score: 1

http://stackoverflow.com/a/26792531
has body: Solution //maximum customer on the trampoline is 5 const MAX_CUSTOMERS = 5; //create new Array var customerList = new Array(); //add customer function addCustomer() { //check max customers if (customerList.length &gt;= MAX_CUSTOMERS) { alert('Sorry, no more than ' + String(MAX_CUSTOMERS) + ' customers are allowed on the trampoline.'); } else { //add new user var newIndex = customerList.length; customerList[newIndex] = new Object; //ask user enter their name customerList[newIndex].name = prompt('What is the customer\'s name?'); //ask user enter their status customerList[newIndex].status = prompt('Are you a Child or an Adult?'); //check user is child or adult while (!(customerList[newIndex].status == 'child' || customerList[newIndex].status == 'adult')) { customerList[newIndex].status = ( prompt('Error Please Enter \'child\' or \'adult\':')); } } } //display customers function displayAllCustomers() { //create message var message = ''; //loop customers for (var i = 0; i &lt; customerList.length; i++) { //add customer to message message += customerList[i].name + ', Status: ' + String(customerList[i].status) + '. \n'; } //check message if (message == '') { message = 'There are no customer to display!'; } //output message alert(message); } //delete last customer function deleteLastCustomer() { //check customer list if (customerList.length &gt; 0) { //delete last customer customerList.length--; alert('The last customer has been deleted.'); } else { alert('There are no customer to delete!'); } } //identify then delete customer function identifyThenDeleteCustomer() { //get customer name var customerName = prompt('Enter the name of the customer to delete:'); //get customer status var customerStatus = prompt('Enter \'child\' or \'adult\':'); //check customer status while (!(customerStatus == 'child' || customerStatus == 'adult')) { customerStatus = prompt('Error - enter \'child\' or \'adult\':'); } //delete customer deleteCustomer(customerName, customerStatus); } //delete cust…
accepted answer of: http://stackoverflow.com/q/26791539
score: 0
answers question: http://stackoverflow.com/q/26791539
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/26733688
has title: inserting iFrame to EmberJS templet gives "Metamorph that is not in the DOM" error
tagged with: iframe
has comment: http://stackoverflow.com/comment/42054965
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28622752
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42055884
score: 0
tagged with: ember.js
accepted answer: http://stackoverflow.com/a/28622752
answer count: 1
has body: after inserting an iFrame to the templet: &lt;iframe id="ytplayer" type="text/html" width="450" height="275" {{bind-attr src="videoUrl"}} frameborder="0" allowfullscreen&gt; I got this error: Uncaught Error: Cannot perform operations on a Metamorph that is not in the DOM. from what I understand this error comes from having Handlebar expression enclosed within HTML, but changing it to: &lt;iframe id="ytplayer" type="text/html" width="450" height="275" src="someurl" frameborder="0" allowfullscreen&gt; didnt solve the problem. the only thing that does solve the problem is deleting the entire iFrame from the templet, which is not a desires solution of course. any help please?

http://stackoverflow.com/a/26822205
answers question: http://stackoverflow.com/q/26820348
has body: The problem when implementing event system is to fire listeners right. Altering listener list while invoking callbacks may result in unexpected behavior. For example, let's say there is 2 listeners listening to event x. Event x is triggered and system begins to loop listeners from index 0 to index 1. Listener at index 0 is fired first. Callback is invoked and that callback happens to remove listener at index 1. Loop will proceed and it tries to fire callback at index 1. Listener does not exist anymore and exception occurs. This is really simplified example of what could go wrong when altering listener list while looping. Addments to list can be handled easily by calculating count of listeners before loop. Handling remove actions while looping is much more complicated. In d3 every remove action from listener list will result in creating new array of listeners and giving that array as value for variable listeners. listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1)); The original array of listeners is not changed so the loop will work, but a reference to the original array is lost. That's why event function creates local reference to it. By defensive reference author probably means creating temporary reference to current (before loop) value of listeners which holds even if value of listeners is changed in some point of the loop.
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26820348

http://stackoverflow.com/comment/42006215
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26706724
score: 0
has text: Are the decimals, when present, always only to the hundredths?

http://stackoverflow.com/comment/42208077
comment on: http://stackoverflow.com/q/26799375
type: Comment
has text: @K, I see the highlight effect but nothing else - no movement, no overlap. (Opera under Win 7).
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42211939
type: Comment
has text: alternatively with your old method you can use $(e.target) to get the source button
type: AnswerComment
comment on: http://stackoverflow.com/a/26821156
score: 0

http://stackoverflow.com/comment/42129122
type: QuestionComment
has text: why not make the content element a min-height: of xx % so that the footer will be at the bottom of the page without setting a position attr. Then when this content element has to much data in it, and the page scrolls, the footer will be still at the bottom of the page
comment on: http://stackoverflow.com/q/26774765
score: 0
type: Comment

http://stackoverflow.com/a/26689716
score: 0
answers question: http://stackoverflow.com/q/26689690
has body: In general, you want to avoid globals. If you absolutely need to create a global, though, you can do it by assigning to a property on window: window.foo = "bar"; That creates a global called foo (which can be used without the window.), because all global variables are really properties of the global object, and on browsers the global object is the Window object, which is accessible through the window global.
type: Answer
has comment: http://stackoverflow.com/comment/41976335

http://stackoverflow.com/comment/42157793
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26790991
type: Comment
has text: Oh OK. Wow I feel uneducated now. I don't know why I didn't think of that. Thanks, works now! :D

http://stackoverflow.com/comment/42034004
has text: @user3323647 I have some 2y experience but not doing that currently :) thanks for the heads-up and happy coding!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26721834
type: AnswerComment

http://stackoverflow.com/q/26790025
score: 2
has title: Extending polymer paper-slider element to use an enumerated list of values
answer count: 0
downvote count: 0
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 2
has body: I'm trying to extend the polymer paper-slider element to accept an enumerated list of values. Right now I'm having trouble positioning the pin text in a way that works no matter what the width of the slider is. This example hard-codes the horizontal position of the text for the particular width of these sliders, so that you can see what I'm trying to accomplish. Any ideas on how I can somehow retrieve the width of the text div and the slider so that I can assign the position programmatically? Extra credit if you can fix the inconsistent/jerky transitions on the pin. <div id="sliderContainer" class="{{ {disabled: disabled, pin: pin, snaps: snaps, ring: immediateValue <= min, expand: expand, dragging: dragging, transiting: transiting, editable: editable} | tokenList }}"> GOOD BAD HONEST LIKEABLE PURPLE
tagged with: polymer
tagged with: javascript
type: UnansweredQuestion
tagged with: web-component

http://stackoverflow.com/a/33263517
accepted answer of: http://stackoverflow.com/q/26816447
answers question: http://stackoverflow.com/q/26816447
type: AcceptedAnswer
score: 0
type: Answer
has body: http://makandracards.com/makandra/29415-resolving-angular-not-updating-an-image-src-when-ng-src-is-empty &lt;img class="media-object" ng-src=""&gt;&lt;/div&gt;

http://stackoverflow.com/comment/42037573
type: Comment
has text: I don't have full answers for your questions here, but for #2 I noticed this thread today - https://groups.google.com/forum/#!msg/polymer-dev/ioVhx4Ynv4M/5iiEnPVBrIMJ & thought it might be of interest to you.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26715055

http://stackoverflow.com/comment/41994434
comment on: http://stackoverflow.com/q/26700310
has text: What happens if two persons have the same name?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42157449
type: AnswerComment
type: Comment
has text: I'm new to d3 to I'll take a deeper look to the code and try to understand a little bit more, thanks! that's definitely a quite nice approach!
comment on: http://stackoverflow.com/a/26788753
score: 0

http://stackoverflow.com/q/26711116
answer count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42052215
has title: Classic ASP + Javascript - trying to avoid sessions
has comment: http://stackoverflow.com/comment/42055264
type: Question
tagged with: asp-classic
has comment: http://stackoverflow.com/comment/42092528
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: session-variables
has comment: http://stackoverflow.com/comment/42055121
has comment: http://stackoverflow.com/comment/42082120
score: 2
has body: please be patient with my poor english... I started working on a classic ASP application developed by others. Lots and lots of pages, not well organized : the typical situation you have to face when you come to an existing website. We now have a big problem : lots of log outs due to losts of session variables. So I am trying to write a script to avoid sessions. Luckily, there is a common page which is included in every page of the application. My first step will be the transition from now to the future : the application is already in production so first I will leave the session variables as is and add my script at the top of the included page. The ASP script defines the names of the session variables which are critical, retrieves their values on the request.form collection and add the values in the session.contents collection. Then the Javascript script create hidden inputs containing the values on the page load, in order to post them to the next page (it will fill existing forms and create new form when the user clicks on a link). To be sure there are no conflicts, a specific word is used for every name : name="specific_myName" Please can somebody tell me if this is a good approach ? If so the script will have to be improved... Thank you Below the script : &lt;% Class ConnexionState ' #### Connexion Private m_dict Private m_keys Private m_Javascript Private m_specific Private m_deconnection Public Property Get GetDict() Set GetDict = m_dict End Property Public Sub Class_Initialize() ' Test if connexion is allowed TestConnexion ' Initilize datas + retrieve "session" variables m_specific = "Connexion_" Init End Sub Public Sub Class_Terminate() Set m_dict = Nothing End Sub Private Sub TestConnexion() ' One test may be : do we come from a page of the same application ? If Instr(1,Request.ServerVariables("HTTP_REFERER"),Request.ServerVariables("HTTP_HOST"),1) = 0 And Request.ServerVariables("HTTP_REFERER") &lt;&gt; "" Then EndConnexion End If End Sub Private Sub Validat…

http://stackoverflow.com/comment/42158608
score: 0
type: AnswerComment
type: Comment
has text: YES!! That works beautifully (and is a whole lot less code than the lumbering beast I had come up with). Much appreciated! ^_^
comment on: http://stackoverflow.com/a/26784957

http://stackoverflow.com/comment/42131969
comment on: http://stackoverflow.com/a/26774956
type: Comment
has text: @user2897328n no problem, just next time please clarify your issue in hand, it was very difficult to understand your problem.
type: AnswerComment
score: 0

http://stackoverflow.com/a/26724688
has body: Try this: email == null || email == ""
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26724628
answers question: http://stackoverflow.com/q/26724628
upvote count: 1
score: 1

http://stackoverflow.com/q/26829686
score: -2
has comment: http://stackoverflow.com/comment/42226602
tagged with: javascript
has comment: http://stackoverflow.com/comment/42226664
has answer: http://stackoverflow.com/a/26829817
has comment: http://stackoverflow.com/comment/42226728
answer count: 2
has answer: http://stackoverflow.com/a/26829826
downvote count: 3
upvote count: 1
has title: Access class property from a function defined in its prototype
has comment: http://stackoverflow.com/comment/42226775
favorite count: 0
has comment: http://stackoverflow.com/comment/42226753
has comment: http://stackoverflow.com/comment/42226763
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26829826
has comment: http://stackoverflow.com/comment/42226550
has body: I am trying to learn OOP JavaScript concepts. Below is the code of my class: var Dialog = function(selector, properties) { this.dialog = $(selector); this.isVisible = false; this.build(selector, settings); }; Dialog.prototype.build = function(selector, settings) { var dialogContent = this.dialog.html(); dialog.empty(); }; This is how I initialize the class: var dialog1 = new Dialog(".dialog", { title: "Confirm", modal: false, buttons: [ ["cancel", "cancelButton", "No"], ["accept", "acceptButton", "Yes"] ] }); The console reports that dialog is undefined. How can I access the dialog variable? See my entire file dialog.js here P.S. I am currently reading the MDN Documentation, but I don't realize where I am wrong in my code. I have also tried replacing this.build() with this.build.call(this, /*..*/), but no result.
has comment: http://stackoverflow.com/comment/42226574
type: Question
has comment: http://stackoverflow.com/comment/42226928
accepted answer: http://stackoverflow.com/a/26829817

http://stackoverflow.com/q/26680251
tagged with: jquery-jtable
type: Question
has answer: http://stackoverflow.com/a/26689270
tagged with: javascript
has title: Asp.net jTable time field type
accepted answer: http://stackoverflow.com/a/26689270
score: 0
has body: I'm going to build an ASP.net webforms and I want to consume jTable. I have a time(7) datatype in sqlserver, and I have to map this relation in jTable. So, does jTable support time data type and I how can I implement it, and how can I validate it.
answer count: 1
tagged with: jquery
tagged with: asp.net
tagged with: ajax
type: AnsweredQuestion

http://stackoverflow.com/q/26822391
has answer: http://stackoverflow.com/a/26823174
type: Question
score: 0
answer count: 1
has body: I am using the Async utility module to return items from a Mongodb database. I want to do it asynchronously. I am having problems when trying to return those items. I want to fire the callback once ALL of the User.find()'s have been finished, right now the async.each() is terminating early, and only giving me one item from the database when it should be returning them all. The code is below: async.each(lessons, function(lesson, next) { // For each item in lesson array if (_.isEmpty(lesson.lesson_grades) == true) { // Check if the grades array is empty return; } else { async.each(lesson.lesson_grades, function(grade, next) { // For each grade in grade array User.find({ // Find user from grade user_id _id: grade.user_id, }, '-salt -hashedPassword', function(err, user) { grade["name"] = user[0].name; // Add name grade["email"] = user[0].email; // Add email next(); // !! I think this is where the problem lies, it fires next() once the first item has been returned - so it doesn't get to the other items !! }); }, function(err) { next(lessons); }); } }, function(lessons, err) { return res.json(200, lessons); // Return modified lessons (with name and email) to browser, currently only returns one but returns them all if a setTimeout() is added, making it a premature callback problem }); Can someone point me in the right direction on how to do this correctly? Should I be keeping track of the iterations? Any help would be appreciated.
tagged with: node.js
has title: Async mongodb find within loop finishing early before returning all data
tagged with: mongodb
tagged with: javascript
type: UnansweredQuestion
tagged with: asynchronous

http://stackoverflow.com/q/26796230
has answer: http://stackoverflow.com/a/26796838
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/42167433
type: Question
has comment: http://stackoverflow.com/comment/42257659
has answer: http://stackoverflow.com/a/26903381
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/2324782
has comment: http://stackoverflow.com/comment/42478969
has answer: http://stackoverflow.com/a/26848618
upvote count: 0
score: -2
linked to: http://stackoverflow.com/q/446594
answer count: 7
tagged with: javascript
has comment: http://stackoverflow.com/comment/42259694
has comment: http://stackoverflow.com/comment/42166655
tagged with: jquery
has title: Using jquery datatable for the json response
has answer: http://stackoverflow.com/a/26933659
has answer: http://stackoverflow.com/a/26798539
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/42487394
has body: The json output that I have is below [{"param1":"value1","param2":"value2","param3":"value3"},{"param1":"value1","param2":"value2","param3":"value3"}] My ajax request is coded in a function so that it can called based on button click: function callAjaxRequest() { ajaxRequest = $.get('getdata',{ 'parameter1': paramValue1,'parameter2':paramValue2 },function(responseinjson) { if(responseinjson!=null){ $("#table1").find("tr:gt(0)").remove(); var tablevar = $("#table1"); $.each(responseinjson, function(key,value) { var rowNew = $("&lt;tr&gt;&lt;td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;"); rowNew.children().eq(0).text(value['param1']); rowNew.children().eq(1).text(value['param2']); rowNew.appendTo(tablevar); }); var numberofrecords = responseinjson.length; } } } I initialized ajax request to variable because I can abort it later in some cases. Now my problem is I can see lot of delay in the for each loop based on the huge number of records. So, can someone please suggest me how to implement pagination according to the responseinjson value using datatable in jquery. I have seen lot of examples on the internet but I can't get my head around it on how to use according to the response that I get. Please go easy on my question if it sounds noob as I am new to web development. P.S: I don't want to add to datatable using for each loop because it results in same delay that I am getting now. Reiterating my point for bounty: I am getting entire json response in the ajax call as per my code snippet. But I found that it is taking considerable delay to show up the data, so the for each jquery loop to show data is taking too much time. So, is there anyway that I can paginate this without lopping through the entire json response.
has answer: http://stackoverflow.com/a/26933215
has answer: http://stackoverflow.com/a/26972523

http://stackoverflow.com/a/26790495
accepted answer of: http://stackoverflow.com/q/26790374
answers question: http://stackoverflow.com/q/26790374
score: 7
upvote count: 8
type: AcceptedAnswer
downvote count: 1
has body: You are running straight javascript onclick instead of ng-click. move confirmDialog into your controller and ng-click can attach to it. Cancel $scope.ConfirmDialog = function (subID) { console.log('Succesfully submitted id: ', subID); });
has comment: http://stackoverflow.com/comment/42157068
type: Answer

http://stackoverflow.com/a/26798278
answers question: http://stackoverflow.com/q/26797954
type: Answer
has body: Its a bit tricky. But it works var array = [1, 2, 3, 4, 5]; array = JSON.parse(JSON.stringify(array).replace(/(\d+)/g,0)); // Returns [0,0,0,0,0]
score: 1
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42171135

http://stackoverflow.com/comment/42130628
type: QuestionComment
has text: yeap :) i'm supposed to be able to click on one of the elements and none of them is clickable.
comment on: http://stackoverflow.com/q/26775407
score: 0
type: Comment

http://stackoverflow.com/comment/42212209
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26821330
score: 1
has text: I'm sorry, but what? Can I (strongly) suggest you take a few moments to read "[How do I ask a good question?](http://stackoverflow.com/help/how-to-ask)"

http://stackoverflow.com/comment/42112907
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26765993
has text: You already answered the question in your title: AJAX, e.g: http://api.jquery.com/jquery.ajax/

http://stackoverflow.com/a/31895622
has body: In requiring something similar, where the usual text selection behavior is required on an element which should otherwise respond to ngClick, I wrote the following directive, which may be of use: .directive('selectableText', function($window, $timeout) { var i = 0; return { restrict: 'A', priority: 1, compile: function (tElem, tAttrs) { var fn = '$$clickOnNoSelect' + i++, _ngClick = tAttrs.ngClick; tAttrs.ngClick = fn + '($event)'; return function(scope) { var lastAnchorOffset, lastFocusOffset, timer; scope[fn] = function(event) { var selection = $window.getSelection(), anchorOffset = selection.anchorOffset, focusOffset = selection.focusOffset; if(focusOffset - anchorOffset !== 0) { if(!(lastAnchorOffset === anchorOffset &amp;&amp; lastFocusOffset === focusOffset)) { lastAnchorOffset = anchorOffset; lastFocusOffset = focusOffset; if(timer) { $timeout.cancel(timer); timer = null; } return; } } lastAnchorOffset = null; lastFocusOffset = null; // delay invoking click so as to watch for user double-clicking // to select words timer = $timeout(function() { scope.$eval(_ngClick, {$event: event}); timer = null; }, 250); }; }; } }; }); Plunker: http://plnkr.co/edit/kkfXfiLvGXqNYs3N6fTz?p=preview
answers question: http://stackoverflow.com/q/26764879
upvote count: 2
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/q/26717720
has title: Detecting NON-mobile devices with JavaScript
answer count: 1
downvote count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: windows
has comment: http://stackoverflow.com/comment/42028589
has comment: http://stackoverflow.com/comment/42027984
has answer: http://stackoverflow.com/a/26718598
linked to: http://stackoverflow.com/q/3514784
type: Question
score: 1
tagged with: javascript
has body: Before voting for duplicate: Please read the full question below. I explained there why any of "how to detect mobile device?" is not a case here. Question (and why it's not a simple negation of mobile dev. detection): There are plenty of questions about "How to detect an mobile device with JavaScript?" (one of the best, if you are looking for it: What is the best way to detect a mobile device in jQuery?), but I want to ask for something a bit different: "How to detect non-mobile device with JavaScript?". You might think that when I can make an mobile detection like this: if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile |Opera Mini/i.test(navigator.userAgent)){ alert('mobile'); } I can just put negation before the statement inside if and that would be check for non-mobile device. Not really. The code above detects several versions of mobile devices. For all not recognized devices, we cannot be 100% sure that they are not mobile. If userAgent contains one of the typed literals (webOS, iPone etc.) it's surely a mobile device. If not, it can goes two ways: It's not a mobile device It's a mobile device that we did not listed (mistake, exotic device, device released after we wrote the code etc.) So instead of negating the test for mobile device, I want to write a test for non-mobile (Linux/Windows PC, Mac etc.). That way, if the result will be true, I will be 100% sure that I deal with non-mobile device. In the other case - it's rather mobile, but it's only an strong assumption. So basically, I want to react only when I'm 100% sure it's non-mobile device, and when I do not know it for sure, I don't want to take any steps (or I will assume it's a mobile device). How would that formula look? It's safe to test against Windows (Windows Phone or something like that could also use that literal?)? What about Mac, Linux PC and others?
has comment: http://stackoverflow.com/comment/42025757
has comment: http://stackoverflow.com/comment/42025696
upvote count: 2
tagged with: mobile
tagged with: user-agent

http://stackoverflow.com/a/26719924
has body: What I thought you meant The event object holds what was clicked. So you can handle the data that way. function clicked(event) { console.log(event.target); console.log(event.target.getAttribute("data-item")); } document.getElementById("tab").addEventListener("click", clicked); var tds = document.getElementsByTagName("td"); tds[0].click(); tds[1].click(); 1 2 What you actually wanted function clicked(event) { console.log(event.target.getAttribute("data-action")); event.target.removeAttribute("data-action"); } document.getElementById("tab").addEventListener("click", clicked); var tds = document.getElementsByTagName("td"); tds[0].setAttribute("data-action", "A"); tds[0].click(); tds[0].setAttribute("data-action", "B"); tds[0].click(); 1
accepted answer of: http://stackoverflow.com/q/26719527
downvote count: 0
answers question: http://stackoverflow.com/q/26719527
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/26702350
score: 3
downvote count: 0
has body: here is your answer:demo $(".item_id").on('focus', function () { // Store the current value on focus and on change previous = this.value; }).change(function() { // Do something with the previous value after the change //alert(previous); var previoues_val=previous;//alert(p); var selected=$(this).val(); var opts = $(this)[0].options; var array = $.map(opts, function(elem) { return (elem.value || elem.text); }); //alert(array); $('.item_id').each(function() { var v=$(this).val(); if(previoues_val != '' ) { //alert(p); $('option[value="' + previoues_val + '"]').removeAttr('disabled'); } $('option[value="' + selected + '"]').attr('disabled','disabled'); $('option[value=""]').removeAttr('disabled'); }); // Make sure the previous value is updated previous = this.value; }); -- Select a Menu item -- value0 value1 value2 value3 value4 value5 value6 value7 value8 value9 -- Select a Menu item -- value0 value1 value2 value3 value4 value5 value6 value7 value8 value9 -- Select a Menu item -- value0 value1 value2 value3 value4 value5 value6 value7 value8 value9 -- Select a Menu item -- value0 value1 value2 value3 value4 value5 value6 value7 value8 value9
upvote count: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26699990
answers question: http://stackoverflow.com/q/26699990
type: Answer

http://stackoverflow.com/comment/42174472
comment on: http://stackoverflow.com/q/26800401
type: Comment
has text: What do you mean by "no luck"? What happened? What didn't happen? Be scientific.
score: 1
type: QuestionComment

http://stackoverflow.com/comment/42082849
type: QuestionComment
comment on: http://stackoverflow.com/q/26749157
score: 5
has text: http://stackoverflow.com/questions/262427/javascript-arraymap-and-parseint
type: Comment

http://stackoverflow.com/comment/42186544
type: Comment
score: 0
has text: Are these the actual functions that you are using?
type: QuestionComment
comment on: http://stackoverflow.com/q/26806771

http://stackoverflow.com/comment/42093786
score: 0
type: AnswerComment
type: Comment
has text: Sorry, my bad, forgot to refresh my browser. Yup!!! It's working now. Thanks a lot TrueBlueAussie and Vinita. :)
comment on: http://stackoverflow.com/a/26755364

http://stackoverflow.com/q/26774328
tagged with: javascript
tagged with: variables
has comment: http://stackoverflow.com/comment/110651512
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26774408
tagged with: while-loop
has comment: http://stackoverflow.com/comment/42127664
has comment: http://stackoverflow.com/comment/42127955
has comment: http://stackoverflow.com/comment/110651732
has comment: http://stackoverflow.com/comment/42129761
has comment: http://stackoverflow.com/comment/110651723
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26774408
has title: While Loop to check multiple variables are equal
has comment: http://stackoverflow.com/comment/42127721
has comment: http://stackoverflow.com/comment/42127785
has body: I'm using javascript. I'm trying set random numbers to 5 variables and they can't be equal to each other. //set correct, dbcount is at 20ish now, will end up in the thousands later correct = Math.floor(Math.random()*dbcount); //intially set wrong variables wrong1 = correct; wrong2 = correct; wrong3 = correct; wrong4 = correct; //set wrong ID not equal to each other or correct while(wrong1 === correct &amp;&amp; wrong2 === correct &amp;&amp; wrong3 === correct &amp;&amp; wrong4 === correct &amp;&amp; wrong1 === wrong2 &amp;&amp; wrong1 === wrong3 &amp;&amp; wrong1 === wrong4 &amp;&amp; wrong2 === wrong3 &amp;&amp; wrong2 === wrong4 &amp;&amp; wrong3 === wrong4){ wrong1 = Math.floor(Math.random()*dbcount); wrong2 = Math.floor(Math.random()*dbcount); wrong3 = Math.floor(Math.random()*dbcount); wrong4 = Math.floor(Math.random()*dbcount); } Every once in a while, there will be some that equal each other. Am I doing it wrong? Should I use nested if statements instead? Need something that will pretty much do something like this: while(a == b == c == x == y){ //then do stuff until a, b, c, x, y don't equal each other. } Thank you
type: Question
has comment: http://stackoverflow.com/comment/110632242
has comment: http://stackoverflow.com/comment/42127982
has comment: http://stackoverflow.com/comment/42129709
has answer: http://stackoverflow.com/a/26774503
has comment: http://stackoverflow.com/comment/42127830
accepted answer: http://stackoverflow.com/a/26774503

http://stackoverflow.com/q/26701263
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/26711100
type: Question
tagged with: algolia
tagged with: javascript
has answer: http://stackoverflow.com/a/26711100
has title: Rails: Click on results in Algolia search auto-completion
tagged with: search
downvote count: 0
answer count: 1
favorite count: 0
has body: I installed Algolia to implement an efficient for my rails app: The algolia search bar is well configured because I can find what I am looking for in my db. Users can find pins using the search bar with auto-completion in the bar. But I would like to allow them on the results to go on the pin page. I want the user to be redirected onto the pin show view when clicking on a result. So I don't know how to render this link into the Hogan link as the adress for my pin is for example: myapp.com/pins/2 for pin 2 SOLUTION: add the link into the hoogan template, where slug is for me the modified URL with friendly_id gem. // Mustache templating by Hogan.js (http://mustache.github.io/) var template = Hogan.compile(' ' + '' + '{{{ _highlightResult.description.value }}} ' + '({{{ _highlightResult.details.value }}})' + '' + ' ');
tagged with: ruby-on-rails
type: AnsweredQuestion

http://stackoverflow.com/a/26728108
has comment: http://stackoverflow.com/comment/42045550
has comment: http://stackoverflow.com/comment/42044938
has comment: http://stackoverflow.com/comment/42045013
answers question: http://stackoverflow.com/q/26727989
score: -1
downvote count: 2
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/42044659
has comment: http://stackoverflow.com/comment/42045296
has comment: http://stackoverflow.com/comment/42045136
has comment: http://stackoverflow.com/comment/42044984
has comment: http://stackoverflow.com/comment/42044688
has body: The shortest way to achieve that is probably with the null-coalescing operator : string userLocation = @((string)HttpContext.Current.Session["UserLocation"] ?? "ALL"); The behavior is pretty simple; when the left side is null, it returns what you specify on the right side. If the left side is non-null, it returns the left side. You also need a cast to string since Session returns the base type object.

openlayers-3
type: Tag
tags question: http://stackoverflow.com/q/26680958
tags question: http://stackoverflow.com/q/26674096
tags question: http://stackoverflow.com/q/26730622
tag name: openlayers-3
tags question: http://stackoverflow.com/q/26734512

http://stackoverflow.com/a/26718258
has body: First and foremost, you shouldn't be manipulating CSS directly. Change the border color by adding/removing class names, and styling those classes in your external CSS. If you really want to change the CSS with JavaScript, you need to give it a property and value, not a single string: $(this).css('border-color', 'red');
score: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26718228
upvote count: 1

http://stackoverflow.com/a/26725533
upvote count: 1
has comment: http://stackoverflow.com/comment/42056611
answers question: http://stackoverflow.com/q/26723575
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42051114
score: 1
accepted answer of: http://stackoverflow.com/q/26723575
type: Answer
has body: I hope posting this as an answer is okay... I've bumped the particle engine up a minor version to 0.7.7, having implemented a fix for your issue of "not-very-smooth-looking" emitters. What was happening before was this: SPE.Emitter.tick() called with a dt value This tick function determines how many particles should be marked alive based on the dt argument passed to it. For larger dt values, more particles are marked as alive, for smaller values fewer are marked as alice. The emitter then resets these particles and waits for the next call. Assuming more than one particle is going to be marked as alive per frame, and they all originate at the same position in space, then all the particles will be at the same place when they're activated. This is why you saw some "clumping" happening. What happens now is this: SPE.Emitter.tick() called with a dt value, just as before. The tick function now determines how many particles should be marked as alive, and whilst marking them so, sets each particles age to be a fraction of the dt value passed in. So (!), assuming 100 particles are emitted per frame, and a dt value of 0.016 is passed to the emitter's tick function, each of those 100 particles that will be marked as alive is assigned an age value of (0.016 / 100) * i where i is the particle index (in this case, a value of 0 to 100). I hope that makes sense. You can see the changes here: https://github.com/squarefeet/ShaderParticleEngine/blob/master/src/ShaderParticleEmitter.js#L240-L246 Master branch has been updated.

http://stackoverflow.com/comment/42057955
comment on: http://stackoverflow.com/q/26735319
score: 0
has text: Please reduce the size of the code posted by 5x-10x.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41956408
comment on: http://stackoverflow.com/a/26677997
has text: @JoeLewis This is a script, the external website is of the developers that made it. Check: https://github.com/MrRio/jsPDF for the source code. (/dist/jspdf.min.js)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42087518
score: 0
has text: You need a web client application, and a web client means a web page. My brain hurts.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26751432

http://stackoverflow.com/q/26807319
has comment: http://stackoverflow.com/comment/42188092
has body: I'm doing this: var regex = /^.*brainshark.*\/(?:vu\?pi=(.*)|.*-(\d*))/; string.match(regex).exec() Assuming the string matches the regex at all, I get back an array of three. The first element contains the entire string. The second element may or may not contain a match, and my third element may or may not contain a match. Assuming my string is "http://my.brainshark.com/Public-Speaking-For-Executives-409829042" my match will be on index 2. If the string is "http://www.brainshark.com/cvi/vu?pi=zF0z1327H2zC5iGz0" , then the match will be on index 1 How can I get it so that my matches are always in element 1, or possibly, that I just get back my match without any array at all?
tagged with: regex
has title: How do I get my regex to return just my match?
score: 2
type: AnsweredQuestion
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26807685
has answer: http://stackoverflow.com/a/26807660
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26807660
accepted answer: http://stackoverflow.com/a/26807685
favorite count: 0
upvote count: 2

http://stackoverflow.com/q/26774737
score: 1
tagged with: fabricjs
type: Question
has body: While checking fabric js example at http://fabricjs.com/customization/ I could se this.__canvases.push(canvas); being called, I just could not figure out why it is called and what if do not call it. var canvas = new fabric.Canvas('c2'); canvas.add(new fabric.Circle({ radius: 30, fill: '#f55', top: 100, left: 100 })); canvas.selection = false; this.__canvases.push(canvas);
tagged with: canvas
downvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26774848
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: Meaning of this.__canvases.push(canvas);
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26774848

http://stackoverflow.com/a/26751101
type: Answer
has body: var transformedFood = _.transform(foods, function(result, item, name){ result[item.type] = result[item.type] || {}; result[item.type][name] = item; }); http://jsbin.com/purenogija/1/edit?js,console
downvote count: 1
accepted answer of: http://stackoverflow.com/q/26749704
upvote count: 9
answers question: http://stackoverflow.com/q/26749704
type: AcceptedAnswer
score: 8

http://stackoverflow.com/a/26791657
score: 1
answers question: http://stackoverflow.com/q/26791289
has body: I believe you are getting this output because docs in the callback is an array. Can you loop through docs and simply print individual documents to the console? This will verify that the data access part is working, and you can figure out HTML output afterwards.
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26791289
downvote count: 0

http://stackoverflow.com/a/26774930
type: Answer
answers question: http://stackoverflow.com/q/26689470
downvote count: 0
score: 1
has body: I don't know what major improvement you can do here except switching to a technology that uses hardware acceleration. I hope this helps a bit, though as stated in question's comments WebGL would be really faster. If you don't know where to start, here is a good one: webglacademy Still I saw some little thingies: radialWave : function(particle, pIndex, particles){ // As you don't use distance here remove this line // it's a really greedy calculus that involves square root // always avoid if you don't have to use it // var distance = getDistance(particle, this.center); if (particle.radius &gt;= (this.dim * 0.0085)) { particle.radiusOper = -0.02; } else if (particle.radius &lt;= 1) { particle.radiusOper = 0.02; } particle.radius += particle.radiusOper * particle.radius; }, Another little thingy: Jarvis.prototype.backgroundDraw = function() { // particles var that = this; // Declare callbacks outside of forEach calls // it will save you a function declaration each time you loop // Do this for logo particles var logoMotionCallback = function(motionType, motionIndex){ // Another improvement may be to use a direct function that does not use 'this' // and instead pass this with a parameter called currentParticle for example // call and apply are known to be pretty heavy -&gt; see if you can avoid this that.motion[motionType].call(that, particle, i, that.logoParticles, "foregroundParticles"); }; var logoFxCallback = function(fxType, fxIndex){ that.fx[fxType].call(that, particle, i, that.logoParticles, "foregroundParticles"); }; var logoCollisionCallback = function(collisionType, collisionIndex){ that.collision[collisionType].call(that, particle, i, that.logoParticles, "foregroundParticles"); }; this.logoParticles.forEach(function(particle, i){ particle.draw(that.backgroundCtx); that.logoParticles.motion.forEach(motionCallback); that.logoParticles.fx.forEach(fxCallback); that.logoParticles.collision.forEach(collisionCallback); }); // Now do the same for background particles v…
upvote count: 1

http://stackoverflow.com/q/26705215
tagged with: gsap
accepted answer: http://stackoverflow.com/a/26706460
possible better answer: http://stackoverflow.com/a/26706402
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26706460
has answer: http://stackoverflow.com/a/26706402
has title: Too many Callbacks in Tweenmax js
has body: Is there any better way to write this type of code in Tweenmax? TweenMax.to("#second-scene .layer-one", 0.5, {delay:0.2, top:0, onComplete: function() { TweenMax.to("#second-scene .layer-two", 0.5, {top:0, onComplete: function() { TweenMax.to("#second-scene .layer-three", 0.5, {left:0, onComplete: function() { TweenMax.to("#second-scene .layer-four", 0.5, {left:0, onComplete: function() { TweenMax.to("#second-scene .layer-five", 0.5, {left:0, onComplete: function() { TweenMax.to("#second-scene .layer-six", 0.5, {top:0} ); }} ); }} ); }} ); }} ); }} ); And I would like to know if writing this way would affect performance. Thanks in advance
type: Question
score: 0
answer count: 2
tagged with: javascript

http://stackoverflow.com/comment/42072749
type: Comment
comment on: http://stackoverflow.com/a/26743535
score: 1
has text: This. The browser will call your function as needed, that's the point of an event handler. You only need to pass in the reference. You were passing in the return value of your handler, which I suspect is undefined, because there isn't much reason to put a return statement in an event handler.
type: AnswerComment

http://stackoverflow.com/comment/42148518
comment on: http://stackoverflow.com/q/26785849
score: 0
has text: There should be a menu option to open the Safari console.
type: QuestionComment
type: Comment

android-notifications
tags question: http://stackoverflow.com/q/26677865
tag name: android-notifications
type: Tag

http://stackoverflow.com/q/26728694
tagged with: windows
tagged with: windows-store-apps
has comment: http://stackoverflow.com/comment/42096780
score: 0
has title: How to add back button in maps app for windows store apps (Javascript)
has comment: http://stackoverflow.com/comment/42090309
tagged with: winjs
tagged with: javascript
type: UnansweredQuestion
tagged with: windows-runtime
has body: In my maps app i want add a back button in my which goes back in the navigation stack. I tried creating a button element and adding to map using map.entities.push and adding a click event to it, but it dint work. Should i add a map overlay or something. What am i doing wrong.
answer count: 0
has comment: http://stackoverflow.com/comment/42083798
type: Question

http://stackoverflow.com/comment/42164901
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26795267
has text: I wish I could do that but we are required to use JavaScript for all validations.
score: 0

http://stackoverflow.com/comment/41981503
type: Comment
has text: This answer is fairly confusing. Why are you using a namespace? Why have you changed `data` to `somevariable`? Why haven't you written `Some code` out fully? And what's the point of the `|| {}` at the end?
comment on: http://stackoverflow.com/a/26692433
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42077384
comment on: http://stackoverflow.com/a/26743678
score: 0
type: AnswerComment
type: Comment
has text: Tried this. Couldn't access it cause of same origin policy. That's weird.

http://stackoverflow.com/q/26778987
tagged with: php
upvote count: 3
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26779168
has comment: http://stackoverflow.com/comment/42135974
type: Question
score: 3
has body: I have a form in php with dynamically added rows (after clicking button the row is added). I want to fill the field with value "xx" and i want to do it in jquery. This loop create the dynamically added rows in jquery. I want to fill added fields with value "xx": while($personsArrayLength>2){ echo ' '; Here is html for that: function addRows2(){ global $personsError_css; $personsArray = $_POST['persons']; JB_var_dump($_POST['whichRow']); $html = ' '; return $html; } This is properly filled form In this epty fields I want to add values "xx" Sorry for my english. How can i set values in added rows? What i should change in my code? Thanks for help.
has title: How to set value in dynamically added rows form using jquery?
tagged with: javascript
tagged with: forms
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0

encryption
tags question: http://stackoverflow.com/q/26734033
tag name: encryption
tags question: http://stackoverflow.com/q/26693227
tags question: http://stackoverflow.com/q/26731728
tags question: http://stackoverflow.com/q/26765488
tags question: http://stackoverflow.com/q/26822354
type: Tag

http://stackoverflow.com/comment/42167412
has text: Alright thanks. I think you helped me on pros vs cons in using vhosts vs a redirect for mobile...They still want to use a redirect sadly. I wish I have concrete evidence on why its bad.
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26796221

http://stackoverflow.com/q/26804173
has answer: http://stackoverflow.com/a/38064934
has answer: http://stackoverflow.com/a/26837186
accepted answer: http://stackoverflow.com/a/26837186
possible better answer: http://stackoverflow.com/a/26804587
has answer: http://stackoverflow.com/a/26804587
has comment: http://stackoverflow.com/comment/42239315
type: AnsweredQuestion
type: Question
tagged with: google-maps
has title: Google Maps Javascript API v3 Error Message "Key is Disabled"
tagged with: javascript
tagged with: google-maps-api-3
score: 0
answer count: 3
has body: I have generated a Google Maps Javascript API v3 key for my website treblecode.com, and have added www.treblecode.com to the list of referrers on my developer account. I've also tried .treblecode.com/ to no avail. However, in attempting to create a test HTML page according to the Hello World guidelines at developers.google.com/maps/documentation/javascript/tutorial#api_key, I receive the following error: "Google has disabled use of the Maps API for this application. The provided key is not a valid Google API Key, or it is not authorized for the Google Maps Javascript API v3 on this site. If you are the owner of this application, you can learn about obtaining a valid key here: https://developers.google.com/maps/documentation/javascript/tutorial#api_key" Below is the code I currently have on my test page at http://www.treblecode.com/apis/quickmap.html: If it helps, my hosting provider is GoDaddy. Any help would be appreciated here, as I'm not sure what else I need to do to properly work with that API.
tagged with: api

http://stackoverflow.com/comment/42206097
type: AnswerComment
score: 0
type: Comment
has text: function recuperaConversa() { var mensagensBackup = localStorage.getItem('mensagensBackup'); if(mensagensBackup!=null) { var mensagem = document.getElementById('chatUsuario'); if (mensagem != null) { $(mensagem).append(mensagensBackup); } } }
comment on: http://stackoverflow.com/a/26817493

http://stackoverflow.com/a/27592443
has body: The poster has already solved the problem, but I'm adding this for the benefit of future users. The problem was that OP was using jQuery 2.x; switching to jQuery 1.x solved the problem. Here's the reason: jQuery 2.x doesn't support older versions of Internet Explorer. According to the jQuery website: jQuery 2.x has the same API as jQuery 1.x, but does not support Internet Explorer 6, 7, or 8. All the notes in the jQuery 1.9 Upgrade Guide apply here as well. Since IE 8 is still relatively common, we recommend using the 1.x version unless you are certain no IE 6/7/8 users are visiting the site. Please read the 2.0 release notes carefully. This lack of support is the reason your site was breaking in older versions of IE.
has comment: http://stackoverflow.com/comment/43680606
type: Answer
answers question: http://stackoverflow.com/q/26682546
has comment: http://stackoverflow.com/comment/43611213
has comment: http://stackoverflow.com/comment/43636968
has comment: http://stackoverflow.com/comment/43683485
has comment: http://stackoverflow.com/comment/43644439
has comment: http://stackoverflow.com/comment/43612587
score: 0

http://stackoverflow.com/comment/42990682
score: 0
type: AnswerComment
has text: no text error, but when i use laptop touchpad mouse and when i scrolling down to end of page then 30 or 40 second i must wait to it again receive my command( scroll up or down). i set amd=30 and speed=5, it work well ;D,but another problem, very slow when i use real mouse wheel :( you know well that people use different mouse wheel speed. as i think, we need a function that return user mouse wheel speed. i never use your js only in my localhost, it must act in users browsers.
comment on: http://stackoverflow.com/a/26701622
type: Comment

http://stackoverflow.com/comment/42080801
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26684630
type: Comment
has text: So I put it in there and it sets everything fine, but now it is no longer sliding and it doesn't like the "var intervalId" for some reason, edited the code in original post for visual

http://stackoverflow.com/q/26720242
has title: Automate file upload in AngularJS via Selenium
tagged with: selenium-webdriver
accepted answer: http://stackoverflow.com/a/26720545
upvote count: 3
answer count: 2
tagged with: selenium
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I am using Powershell to drive .NET Selenium and a FirefoxDriver to automate some stuff. Part of that is file uploads and the website happens to written (at least partly) with AngularJS. Now I have figured out how to do automate the file upload with a normal input element. Just send the file path via SendKeys. But I can't figure it out for this situation. The HTML for the file drop area with optional manual file selector is as follows: Select file I hope I haven't simplified this too much. And there surely is more to the whole AngularJS setup than that. But maybe it is enough for you to give me some pointers as to where to look next or how to approach this. If not, just let me know and I'll add more info. I have found that Protractor seems to be the way to go when doing AngularJS testing, but it would alter my setup considerably (with a NodeJS server etc.) and all I need right now is this file upload. Thanks! Sandro
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/26720545
score: 3
possible better answer: http://stackoverflow.com/a/38981449
has answer: http://stackoverflow.com/a/38981449

http://stackoverflow.com/a/26913701
has body: It seems that imagesloaded is officially supported by IE8+. See the answer from David DeSandro (the creator of the library) on https://github.com/desandro/imagesloaded/issues/168 Officially, imagesLoaded v3 does not support IE7 and below. And also: In my testing, it was successful in IE8, IE9, IE10, Chrome, Safari, and Firefox on desktop, and Mobile Safari for iOS. Note: I will do some further testing &amp; update this answer accordingly
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26732085
answers question: http://stackoverflow.com/q/26732085
type: AcceptedAnswer

objective-c
tags question: http://stackoverflow.com/q/26825594
type: Tag
tag name: objective-c
tags question: http://stackoverflow.com/q/26799493
tags question: http://stackoverflow.com/q/26778955

http://stackoverflow.com/comment/42113470
type: Comment
type: QuestionComment
has text: Could this be related https://github.com/Polymer/polymer/issues/882?
score: 1
comment on: http://stackoverflow.com/q/26766181

http://stackoverflow.com/comment/42142883
comment on: http://stackoverflow.com/a/26777568
type: AnswerComment
score: 0
type: Comment
has text: @oneday, so show how you create this variable and what you can change. If you cannot modify anything or change how you create this variable, you won't be able to pass any paramters

http://stackoverflow.com/q/26792585
tagged with: javascript
has answer: http://stackoverflow.com/a/26792674
has answer: http://stackoverflow.com/a/26792650
has answer: http://stackoverflow.com/a/26803810
favorite count: 0
has comment: http://stackoverflow.com/comment/42160548
accepted answer: http://stackoverflow.com/a/26793040
has title: change value of input field onclick
has body: I am trying to change the value of an input value with the innerHtml of the button that is clicked ... I have tried a couple of ways but none have worked Technician I also tried neither seems to be working
answer count: 5
tagged with: input
type: AnsweredQuestion
score: 3
upvote count: 3
possible better answer: http://stackoverflow.com/a/26792630
has answer: http://stackoverflow.com/a/26792630
has answer: http://stackoverflow.com/a/26793040
type: Question
downvote count: 0

http://stackoverflow.com/q/26790511
tagged with: backbone.js
type: Question
has comment: http://stackoverflow.com/comment/42163899
has comment: http://stackoverflow.com/comment/42157996
has answer: http://stackoverflow.com/a/26803437
score: 0
has comment: http://stackoverflow.com/comment/42161077
answer count: 1
has comment: http://stackoverflow.com/comment/42180132
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26803437
has body: I have some routes set up in a Backbone app with forward slashes: app.Router = Backbone.Router.extend({ routes: { 'dashboard/:locationId/:product/:year': 'dashboard', 'bargraph': 'bargraph' }, .... On document ready, I start the Backbone history plugin and after that, my routes work correctly and the functions are run as I would expect. $(function () { Backbone.history.start(); }); However, if I reload the page with the routes already in the URL, I get an error (in Chrome but probably other browsers too): Uncaught Error: Syntax error, unrecognized expression: #dashboard/3/productA/2009 I only get this error for the routes with the forward slashes in there. My bargraph route seems to work fine on page load without the forward slashes. I'm guessing that this has something to do with the timing of the call to the Backbone.history.start function. The easiest solution is to get rid of the forward slashes in the URL and use some other URL safe delimiter. But it even breaks on page load with URL encoded versions of the /. And it looks less good. Uncaught Error: Syntax error, unrecognized expression: #dashboard%2F3%2FInVigor 8440%2F2009 Unfortunately the error is coming from a minified version of jQuery so I don't know if this is a common issue or something specific happening in some obscure location on the site. Does anyone have any suggestions as to the likely culprit? Possible workarounds? Edit: Adding Stacktrace Uncaught Error: Syntax error, unrecognized expression: #dashboard/3/productA/2009 VM142 standard.js:2$.error VM142 standard.js:2bc VM142 standard.js:2 bk VM142 standard.js:2 q.querySelectorAll.bk VM142 standard.js:2 $ VM142 standard.js:2p.fn.extend.find VM142 standard.js:2 p.fn.p.init VM142 standard.js:2p VM142 standard.js:2c VM149 BCSUS_scopeScripts_B020D85856E4B758EB7D71EC4F5B7E5F.js:1 (anonymous function) VM149 BCSUS_scopeScripts_B020D85856E4B758EB7D71EC4F5B7E5F.js:1 p.Callbacks.k VM142 standard.js:2 p.Callbacks.l.fireWith VM142 standard.js:2 p.extend.ready V…
type: AnsweredQuestion
tagged with: jquery
has title: Backbone routing error on page load with forward slash

http://stackoverflow.com/comment/42091573
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26754233
has text: I don't understand what you're asking
score: 0

http://stackoverflow.com/q/26768598
has comment: http://stackoverflow.com/comment/42118174
answer count: 0
has comment: http://stackoverflow.com/comment/42117889
type: Question
has comment: http://stackoverflow.com/comment/42139490
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42118088
has comment: http://stackoverflow.com/comment/42118214
score: 0
type: UnansweredQuestion
has title: remove nested span class
has body: I have several different sections on a side bar, on a js page: $('#side_bar1,#side_bar2,#side_bar3,#side_bar4,#side_bar5').css({'background-color':'#d3d5a9'}); $('#side_bar1,#side_bar2,#side_bar3,#side_bar4,#side_bar5').find("p[class=certstatus]").html('Required Update Due'); On one of the sections, I need to remove the "Update Due" span and append other tags. But for some reason I can't get the tag to remove, (but I'm able to append): if($('#content').data("isCertified")){ $('#side_bar3').css({'background-color':'#758d56'}); $('#side_bar3').find("p[class=certstatus]").find('span.updateDueSection').remove(); if($('#side_bar3').find("p[class=certstatus]").find('span.requiredSection').length > 0) $('#side_bar3').find("p[class=certstatus]").append(' '); $('#side_bar3').find("p[class=certstatus]>.requiredSection").css({'color':'#D3D5A9'}); $('#side_bar3').find("p[class=certstatus]").append('Certified on '); $('#side_bar3').find("p[class=certstatus]").append('' + $('#content').data("certDate") + ''); } The css looks like this in the developer tools: Required Update Due Certified And just to be complete in my description, my css: .updateDueSection { font-weight:bold; color:#73100b; padding-left: 20px; float: left; } .requiredSection { font-weight:bold; color:#73100b; padding-left: 20px; } .certified { background-image: url(../img/tickCertified.png); background-position: left; background-repeat: no-repeat; padding-left: 20px; color: #D3D5A9; } .certstatus { font-weight:normal; font-style:italic; font-size:9px; margin:6px 0 0 16px; } How can I get the nested "updateDueSection" span removed?

http://stackoverflow.com/a/26680791
score: 0
has comment: http://stackoverflow.com/comment/41962886
has body: You have a JavaScript error on your page which is preventing it from working. It looks like the issue is that you have JavaScript embedded in your post content, and the wpautop filter is inserting &lt;br&gt; tags into it, breaking it - see the &lt;br/&gt; at the end of each line: &lt;script type="text/javascript"&gt;/*&lt;![CDATA[*/if(typeof cart=="undefined") document.write("&lt;scr"+"ipt src="/manage-test/application/cart/views/public/js/cart.js?d98720"&gt;&lt;/scr"+"ipt&gt;");/*]]&gt;*/&lt;/script&gt;&lt;br /&gt; &lt;input type="button" onclick="cart.addBasketExternal(this,2); return false;" value="Enroll Now"&gt;&lt;br /&gt;&lt; It is recommended to host JavaScript in external *.js files.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41961878
accepted answer of: http://stackoverflow.com/q/26680485
has comment: http://stackoverflow.com/comment/41961955
answers question: http://stackoverflow.com/q/26680485
type: Answer
has comment: http://stackoverflow.com/comment/41960530
has comment: http://stackoverflow.com/comment/41960778
has comment: http://stackoverflow.com/comment/41960813
has comment: http://stackoverflow.com/comment/41962230
has comment: http://stackoverflow.com/comment/41961789
has comment: http://stackoverflow.com/comment/41962868

http://stackoverflow.com/comment/41954118
has text: Still have an error TypeError: Cannot read property 'category_name' of undefined
comment on: http://stackoverflow.com/a/26677551
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26804634
has comment: http://stackoverflow.com/comment/42184237
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42184031
has title: return word containing regexp @ sign
has comment: http://stackoverflow.com/comment/42561002
tagged with: regex
has comment: http://stackoverflow.com/comment/42577549
score: -1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42183051
has comment: http://stackoverflow.com/comment/42183449
has comment: http://stackoverflow.com/comment/42183565
accepted answer: http://stackoverflow.com/a/27088031
downvote count: 1
has body: I have a function which autocompletes a username when they start typing with @ (kind of like instagram) When you type an @ a list of users appears and the user can click on an item/user "ex: @User1" in the list and the script autocompletes the @ with the username in the textarea "ex: @User1". The first replacement goes wel "ex: @User1". But when the user types the second @ (and not a first letter yet) and the list appears again and then clicks on a different item/user in the list, the chosen item/user "ex: @User2" gets added within the first @ in front of the first suggestion "ex: @User2User1". But on the otherhand if the user types the second @ WITH a first letter and THEN clicks on the item/user in the list the replacement goes well. Link to codepen sample this is my current function : var string = $scope.searchParam; var pattern = /@\b.+?\b/g; $scope.match = string.match(pattern) if($scope.match){ value = $scope.match.pop(); console.log('match') }else{ console.log('was undefined'); var pattern = /@/g; var found = string.match(pattern) console.log(found +' is value'); if(found.length &gt; 0){ value = found.pop(); } } string = string.replace(value, '@'+suggestion); console.log('oke'); $scope.searchParam = string; $scope.searchFilter = string; i also tried to check if it was present allready to only trigger when a character is typed after the @sign with this: if(watching &amp;&amp; typeof $scope.searchParam !== 'undefined' &amp;&amp; $scope.searchParam !== null) { var string = $scope.searchParam; var pattern = /@\b.+?\b/g; $scope.match = string.match(pattern) if($scope.match){ console.log($scope.match.length + 'match aantal' + $scope.i + ' i aantal'); $scope.matches.push($scope.match); console.log($scope.matches); var found = $filter('filter')($scope.matches,$scope.match,true) if (!found.length) { $scope.i++; } } $scope.completing = true; $scope.searchFilter = $scope.searchParam; $scope.selectedIndex = -1; } but the matches are only a couple of letters so this array…
type: Question
has comment: http://stackoverflow.com/comment/42183800
has comment: http://stackoverflow.com/comment/42590393
upvote count: 0
tagged with: autocomplete
tagged with: javascript
has comment: http://stackoverflow.com/comment/42183843
has comment: http://stackoverflow.com/comment/42183897
tagged with: replace
has comment: http://stackoverflow.com/comment/42182961
has comment: http://stackoverflow.com/comment/42184446
answer count: 1
has comment: http://stackoverflow.com/comment/42586021
favorite count: 0
has answer: http://stackoverflow.com/a/27088031

http://stackoverflow.com/comment/42193107
type: Comment
type: QuestionComment
has text: @JonathanKuhn This is not allowed in JSON but it is in JS
comment on: http://stackoverflow.com/q/26810164
score: 0

http://stackoverflow.com/q/26686753
has title: I'm trying to use google's translate_tts, but getting 404
upvote count: 4
linked to: http://stackoverflow.com/q/26486678
favorite count: 0
answer count: 0
type: UnansweredQuestion
has body: I'm trying to make my website speaking some words, and I found that people often use google's translate_tts. I've tried several ways to make the whole thing work, but still I can't make other's code work on my website (http://jsfiddle.net/n0e011t7/). 1) code from Text to speech using javascript and translate_tts var sound = new Audio("http://translate.google.com/translate_tts?tl=sv&amp;q=Testar"); sound.play(); That doesn't work for me - google returns 404. But if I open the same link from my code in the browser tab it loads (after page reload) the sound file and plays it. Another three options I've tried but with the same reuslt: 2) var nodeHTML = '&lt;audio src="http://translate.google.com/translate_tts?ie=UTF-8&amp;q=hello&amp;tl=en" autoplay="autoplay"&gt;&lt;/audio&gt;'; $("#sound").html(nodeHTML); 3) var audioElement = document.createElement('audio'); audioElement.setAttribute('src', 'http://translate.google.com/translate_tts?tl=en&amp;q=hello%20all'); audioElement.play(); 4) var audioElement = document.createElement('audio'); audioElement.setAttribute('src', 'http://translate.google.com/translate_tts?tl=en&amp;q=hello%20all'); audioElement.load() audioElement.addEventListener("load", function() { audioElement.play(); }, true); Why does it work so strange, I mean, URL opens from a browser tab, but returns 404 if accessed from javascript?
has comment: http://stackoverflow.com/comment/108776370
tagged with: google-translate
type: Question
downvote count: 0
tagged with: javascript
score: 4

http://stackoverflow.com/comment/41950853
has text: Maybe Krunal's confusion is just that he thinks there are some limitations for embedded code. Surprise, there are none! That is also why one should be extra cautions before adding foreign script to his page, as it may contain malicious code, either now or in the future.
score: 0
comment on: http://stackoverflow.com/a/26675794
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42103087
type: Comment
has text: Is this just for images or is there going to be a content below the images ? For any kind of animation, I would recommend [wowjs](http://mynameismatthieu.com/WOW/) which helps you with using the animations in [animate css](http://daneden.github.io/animate.css/)
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26760796

http://stackoverflow.com/comment/42106468
has text: Search "checking for empty inputs with javascript" or "validating inputs html5". You dont need to apologize for being bad at coding, just post the code you are working on and make a valiant effort and the community will help.
comment on: http://stackoverflow.com/q/26762474
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26763353
has comment: http://stackoverflow.com/comment/42117354
score: 1
has body: Here is the easy way to get image's natural size in Vanilla-js (no jQuery, I mean). What it does: Allocate new variable for new image. Set onload scenario. Important to do it before setting image's src-attribute, because once it is set the load starts. Finally we set src which initiates image load. var cont = document.getElementById('output'); var img = new Image(); img.onerror = function() { cont.innerHTML = 'Error occured'; } img.onload = function() { cont.innerHTML = 'Image natural height = ' + this.naturalHeight + '&lt;br&gt;' + 'Image natural width = ' + this.naturalWidth; } img.src = 'http://brand.jquery.org/resources/jquery-dev-summit-mark.gif'; &lt;div id="output"&gt;&lt;/div&gt;
accepted answer of: http://stackoverflow.com/q/26763002
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26763002
has comment: http://stackoverflow.com/comment/42109001
has comment: http://stackoverflow.com/comment/42108436
has comment: http://stackoverflow.com/comment/42109014
has comment: http://stackoverflow.com/comment/42109212
type: Answer
downvote count: 0

http://stackoverflow.com/comment/42131617
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26776383
has text: It is onepagecheckout.phtml - thank you

http://stackoverflow.com/a/28698727
upvote count: 0
answers question: http://stackoverflow.com/q/26749501
score: -1
type: Answer
downvote count: 1
has body: we've verified through several performance tests that the traffic of HTTP requests generated by different users in the peak hour to update the server upon single checkbox selections, could impact the CPU of the application server. Managing the single checkbox selection client-side would probably improve performance by preventing the generation of those HTTP requests.

http://stackoverflow.com/q/26806412
tagged with: socket.io
type: Question
tagged with: javascript
score: 0
answer count: 1
tagged with: asynchronous
type: UnansweredQuestion
has title: How to handle asynchronous users data in JS socket.io chat?
tagged with: sockets
has answer: http://stackoverflow.com/a/26806465
has body: I have a chat application that adds/removes users. These are events driven by socket.io I then acces users by usernames like displayData(users[username]); Problem is.. that users[username] can be removed on asynchronous call that socket.io calls on my script. This will raise an error and will stop all script. How can I handle that: Even if I test it like if (users[username]) displayData(users[username]); it may happen than user is deleted just after test. This happens on browser JS side.

http://stackoverflow.com/comment/42059142
type: QuestionComment
comment on: http://stackoverflow.com/q/26736240
has text: Hi Andy, I have updated my post to be a bit more detailed. Basically when I click my option it just hides the menu again rather than run the code within the change function. I hope this makes sense. Its also worth noting I am only experiencing this issue on IOS and not android.
score: 0
type: Comment

http://stackoverflow.com/comment/58415509
score: 0
type: AnswerComment
has text: Does `Promise.resolve()` create a new instance of `Promise` in the same way as using `new`? If not, `return Promise.resolve(yourCode)` would be faster and avoid synchronous throws.
type: Comment
comment on: http://stackoverflow.com/a/26711782

http://stackoverflow.com/comment/42001347
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26703689
has text: You can't add a link to a pseudo-element...it's not a **real** div. As I said, it's **styling**...not content. If you want to add content, you should use Javascript.

http://stackoverflow.com/comment/42142027
has text: what plugin do you use? maybe the plugin is know, it's a float, and parse it.
comment on: http://stackoverflow.com/a/26781956
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41964462
comment on: http://stackoverflow.com/a/26681836
type: AnswerComment
score: 0
type: Comment
has text: Thanks jacob.. yes... i wanted a solution where the page will post to itself however, it looks like i am still unable to understand the concept. i am still struggling :( Thanks for your time...

http://stackoverflow.com/comment/42168921
score: 0
type: Comment
has text: Oh, I missed labels :D
comment on: http://stackoverflow.com/a/26797450
type: AnswerComment

http://stackoverflow.com/q/26806067
tagged with: handlebars.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26808166
type: Question
has body: I want to use ember properties to toggle the visibility of a div by calling it's dynamic id, however even though I can do something similar by calling classes, I cannot do the same for id's. For example: {{bind-attr class=":class1 controller.controllerProperty:class2"}} works fine. I can toggle the controllerProperty from an action in my controller. You would think the same concept would apply to id's. However {{bind-attr id=":staticId controllerProperty:id{{dynamicIdNumber}}"}} makes the id's disappear all together! Why is this happening and what is the correct method to be doing this sort of this? I would like to avoid work-around solutions as much as possible.
has title: Emberjs how to bind-attr an id
tagged with: javascript
tagged with: jquery
score: 0
tagged with: ember.js
answer count: 1
has answer: http://stackoverflow.com/a/26808166

http://stackoverflow.com/comment/41991902
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26698938
has text: this function can be invoke a lot of times. I think at this way I will get fresh value
score: 0

http://stackoverflow.com/comment/127233409
comment on: http://stackoverflow.com/a/47624886
type: AnswerComment
score: 0
type: Comment
has text: I had `.Vue` instead of `.vue`... Wish I could 10x upvote this

http://stackoverflow.com/a/26695469
answers question: http://stackoverflow.com/q/26694570
type: Answer
has body: Well ideally adding a class to the body would break the encapsulation that React components provide and fiddling with the DOM outside React could cause trouble if the body gets re-rendered. If possible, rather than adding the class to the document body, I would just add it to a component root element that React manages. But to answer your question, you could do that way, but how often is your this.state.touchMode would change? If it's something that only changes during mount/unmount of the component, you can do it in componentWillMount (so that it only runs once when component mount, rather than every single time during render): componentWillMount: function(){ document.body.classList.add('touchMode'); }, componentWillUnmount: function(){ document.body.classList.remove('touchMode'); }
upvote count: 22
downvote count: 0
score: 22

http://stackoverflow.com/comment/42208433
type: AnswerComment
comment on: http://stackoverflow.com/a/26816967
score: 0
type: Comment
has text: Hi, I developed a solution to do that without too many code. I will put the solution in the answer. Thanks you gave-me the idea.

http://stackoverflow.com/comment/42031628
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26720857
type: Comment
has text: http://stackoverflow.com/questions/2008592/can-i-find-events-bound-on-an-element-with-jquery

postback
tag name: postback
type: Tag
tags question: http://stackoverflow.com/q/26751790

http://stackoverflow.com/q/26784634
has comment: http://stackoverflow.com/comment/42147923
has answer: http://stackoverflow.com/a/26784908
has comment: http://stackoverflow.com/comment/42147796
answer count: 4
tagged with: asp.net-mvc-4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42147734
score: 0
has answer: http://stackoverflow.com/a/26784885
has comment: http://stackoverflow.com/comment/42147447
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/27104934
has title: Run Controller Method when Button is clicked MVC4 C#
possible better answer: http://stackoverflow.com/a/26784885
has comment: http://stackoverflow.com/comment/42149025
tagged with: javascript
has comment: http://stackoverflow.com/comment/42146463
has body: I am making a simple application using visual studio 2013, MVC4 and C#. This web app has a table with multiple checkboxes and an Update button disbaled by default. When one or more checkboxes are clicked I activate the button. The idea here, is to send all the information of the checkboxes (which ones are on or off) to the server when the UPdate button is clicked and then to save those changes in the DB. To achieve this I am trying to use ajax via jquery, but unfortunatly I am not succeding, because when I click the button nothing happens. This is the cshtml file that I use to generate the view for the client: @Html.DisplayNameFor(model => model.RequiresSetup) @Html.DisplayNameFor(model => model.Disabled) @{ foreach (var item in Model) { @Html.EditorFor(modelItem => item.RequiresSetup) @Html.EditorFor(modelItem => item.Disabled) } } The javascript code that I have for the button SaveCheckboxChanges is the following: $("#SaveCheckboxChanges").click(function (event) { if (!$("#SaveCheckboxChanges").hasClass("disabled")) { $.ajax({ url: '/Material/UpdateCheckBoxes', type: 'POST', data: {bla: "bdsjdnjsdnsnd" }, contentType: 'application/json; charset=utf-8', success: function (data) { alert(data.success); }, error: function () { alert("error"); } }); } }); And in my materials controller, I have the following: [HttpPost] public ActionResult UpdateCheckBoxes(string bla) { return Content("Working!" + bla); } What I expect, is that after clicking the button, the page shows the "Working" string, meaning that the function in the controller was executed correctly. However, this is not happening, and all I see is the javascript alert saying "error". How can I make this ajax request work? What am I missing?
linked to: http://stackoverflow.com/q/13019778
has answer: http://stackoverflow.com/a/26784930
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27104934
tagged with: ajax

http://stackoverflow.com/q/26748076
has comment: http://stackoverflow.com/comment/42080983
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42080828
has answer: http://stackoverflow.com/a/26748212
favorite count: 0
possible better answer: http://stackoverflow.com/a/26748212
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42080788
has answer: http://stackoverflow.com/a/26748135
score: 1
has answer: http://stackoverflow.com/a/26748688
linked to: http://stackoverflow.com/q/2090551
has body: I have this html page, that gathers the movie name and stores it in a JavaScript variable. Then it opens up this html page.. Where is says 'VARIABLE' is where I would like to have the previously defined JavaScript variable. I would apreciate any help on this, thank you.
type: Question
has title: Pass JavaScript variable between two HTML pages
linked to: http://stackoverflow.com/q/901115
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26748135

http://stackoverflow.com/comment/42034226
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26722198
has text: what about the frame issue that was mentioned earlier and removed, is this not valid?

http://stackoverflow.com/q/26827361
has answer: http://stackoverflow.com/a/26827419
tagged with: javascript
has comment: http://stackoverflow.com/comment/42222630
tagged with: jquery
has comment: http://stackoverflow.com/comment/42222613
has comment: http://stackoverflow.com/comment/42222626
accepted answer: http://stackoverflow.com/a/26827642
possible better answer: http://stackoverflow.com/a/26827446
has title: How to .animate() a background-image size
has answer: http://stackoverflow.com/a/26827446
has comment: http://stackoverflow.com/comment/42222645
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/26827637
has comment: http://stackoverflow.com/comment/42223008
downvote count: 1
has comment: http://stackoverflow.com/comment/42222961
score: 2
type: AnsweredQuestion
has body: Can I .animate a background-image size with javascript/jquery? The code where wt_r and ht_r are the screen size. Can I make that dynamic with .animate()? $('#outer').css('background-size',wt_r+' '+ht_r); jsfiddle- http://jsfiddle.net/m7zmzkpz/1/
upvote count: 3
has answer: http://stackoverflow.com/a/26827642
has comment: http://stackoverflow.com/comment/42222913
type: Question

http://stackoverflow.com/q/26724916
has comment: http://stackoverflow.com/comment/42041450
has comment: http://stackoverflow.com/comment/42044870
has comment: http://stackoverflow.com/comment/42041109
has title: Live-reload on JavaScript file changes
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42041428
favorite count: 0
has comment: http://stackoverflow.com/comment/42041249
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/23319680
score: 2
answer count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/42041091
has comment: http://stackoverflow.com/comment/42041163
has comment: http://stackoverflow.com/comment/42041443
type: Question
has body: I've used Yeoman to create an Angular JS project following the Thinkster.io tutorial and I'm noticing that live-reload works for HTML and CSS, but not for JavaScript files. After about 20 seconds or so, it'll catch the change and reload, but that's a little too long for my taste. It seems to log that the file has changed fairly quickly, but the reload doesn't occur until about 25 seconds later: Here's my Gruntfile.js, auto-created by yo angular: // Generated on 2014-10-30 using generator-angular 0.9.8 'use strict'; // # Globbing // for performance reasons we're only matching one level down: // 'test/spec/{,*/}*.js' // use this if you want to recursively match all subfolders: // 'test/spec/**/*.js' module.exports = function (grunt) { // Load grunt tasks automatically require('load-grunt-tasks')(grunt); // Time how long tasks take. Can help when optimizing build times require('time-grunt')(grunt); // Configurable paths for the application var appConfig = { app: require('./bower.json').appPath || 'app', dist: 'dist' }; // Define the configuration for all the tasks grunt.initConfig({ // Project settings yeoman: appConfig, // Watches files for changes and runs tasks based on the changed files watch: { bower: { files: ['bower.json'], tasks: ['wiredep'] }, js: { files: [ '&lt;%= yeoman.app %&gt;/scripts/{,*/}*.js' ], tasks: ['newer:jshint:all'], options: { livereload: '&lt;%= connect.options.livereload %&gt;' } }, jsTest: { files: ['test/spec/{,*/}*.js'], tasks: ['newer:jshint:test', 'karma'] }, styles: { files: ['&lt;%= yeoman.app %&gt;/styles/{,*/}*.css'], tasks: ['newer:copy:styles', 'autoprefixer'] }, gruntfile: { files: ['Gruntfile.js'] }, livereload: { options: { livereload: '&lt;%= connect.options.livereload %&gt;' }, files: [ '&lt;%= yeoman.app %&gt;/{,*/}*.html', '.tmp/styles/{,*/}*.css', '&lt;%= yeoman.app %&gt;/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}' ] } }, // The actual grunt server settings connect: { options: { port: 9000, // Change this to '0.0.0.0' to ac…
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/42044845
has comment: http://stackoverflow.com/comment/42042027

http://stackoverflow.com/comment/42058438
type: Comment
type: QuestionComment
score: 0
has text: I am not quite sure that I understand your question, but if you are just wanting to use tabs on your page you can use JQuery - http://jqueryui.com/tabs/. If you want something to happen when those tabs are clicked you can simply hook up a clicked event in JQuery for that as well. If you are looking for another effect, please create a mock-up so we can see the intended action.
comment on: http://stackoverflow.com/q/26734479

http://stackoverflow.com/a/26812843
downvote count: 1
type: AcceptedAnswer
upvote count: 45
answers question: http://stackoverflow.com/q/26812833
score: 44
accepted answer of: http://stackoverflow.com/q/26812833
type: Answer
has body: You can do: | limitTo: -5 &lt;li ng-repeat="name in nameLog | limitTo:-5 | orderBy:'time':true"&gt;...&lt;/li&gt; From documentation: limit: The length of the returned array or string. If the limit number is positive, limit number of items from the beginning of the source array/string are copied. If the number is negative, limit number of items from the end of the source array/string are copied. The limit will be trimmed if it exceeds array.length

http://stackoverflow.com/q/26686748
score: 0
has answer: http://stackoverflow.com/a/26686938
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26686821
has title: Disable buttons only when there is min value of Textbox using Jquery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26686996
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26686985
has answer: http://stackoverflow.com/a/26686985
type: Question
accepted answer: http://stackoverflow.com/a/26686996
has comment: http://stackoverflow.com/comment/41971254
has body: I have 10 Button with different values in html .. 2 3 5 8 3 2 7 4 6 4 and one Input box , Whenever i change ( using OnChange Event) value in input box of given_tblno i want to disable all buttons with a condition given as, $a=$('#given_tblno').val(); $b=$('#tblidno').val(); // Need to check Each and every Button values using any loop if($a<$b) { //....Here i want Disable buttons when condition is true.... } So here in my example when this condition true buttons will be disabled where the values are occurred in buttons 2,3,5,3,2,4,4 .. Only 8,7,6 values has buttons it should be enabled for click actions. Using Jquery i wanted to do .

http://stackoverflow.com/comment/42047255
comment on: http://stackoverflow.com/a/26715926
has text: thankyou. problem solved with your solution too. Simple and compact.
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/a/26685245
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42012317
accepted answer of: http://stackoverflow.com/q/26682698
type: Answer
answers question: http://stackoverflow.com/q/26682698
downvote count: 0
score: 1
has body: Two-factor authentication provides unambiguous identification of users by means of the combination of two different components. Your solution is not related to two factor authentication. Because two factor can secure your client when username/password stolen. For example one of your client's computer infected by malware and this malware have ability to sniff keyboard actions ( which is feature almost all malwares). In your solution anyone can easily login even if you asking password again and again. Using mobile phones as second factor authentication is against scenario that I described above. Also storing sensitive information on client side is always bad idea even if you have a chance to encrypt it. (Further info : https://www.owasp.org/index.php/HTML5_Security_Cheat_Sheet) Another thing is your encryption algorithms is developed without any issue. I suggest you to use Google Authenticator without paying single dollar. I think almost all of your client have smart phone and they can easily use google authenticator app for two factor.

http://stackoverflow.com/comment/41975825
has text: @MarvinSmit in the above example `this` should be refer to the instance of `graphLUT`, this snippet clearly isn't the full story, include an example whereby this issue is occurring.
comment on: http://stackoverflow.com/q/26689376
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42188336
comment on: http://stackoverflow.com/q/26807330
type: Comment
type: QuestionComment
has text: @MatíasFidemraizer the comparison is an Strongly-Typed Object `Person.Name` vs an `IDictionary<TKey, TValue>` when deserializing it from JSON it would most likely be a string or int, both of which are *Magic Strings/Number*.
score: 0

http://stackoverflow.com/a/26691200
score: 4
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26686857
has comment: http://stackoverflow.com/comment/42026873
has comment: http://stackoverflow.com/comment/43632254
type: AcceptedAnswer
downvote count: 0
has body: The issue is with the ownership of this. The value of this within any given function call is determined by how the function is called not where the function is defined. In your case above this was referring to the global this object. You can read more on that here: What does "this" mean? In short the solution to the problem is to change routes.js to the following: var Home = require('../controllers/home'); module.exports = function(config) { var home = new Home(config); var routes = [{ method: 'GET', path: '/', handler: function(request, reply){ home.index(request, reply); } }]; return routes; } I've tested this and it works as expected. On a side note, you're missing out on a lot of hapi functionality by structuring your code in this way, I generally use plugins to register routes instead of requiring all routes as modules and using server.route(). See this project, feel free to open an issue if you have further questions on this: https://github.com/johnbrett/hapi-level-sample
type: Answer
answers question: http://stackoverflow.com/q/26686857

http://stackoverflow.com/a/37562151
answers question: http://stackoverflow.com/q/26819725
has comment: http://stackoverflow.com/comment/85606946
type: Answer
score: 7
upvote count: 7
has body: Simple Fix .modal-open { position: fixed; overflow: scroll; width: 100%; padding-right: 0!important; }
downvote count: 0

http://stackoverflow.com/a/26743728
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26742456
has body: What you want to approach is similar to event-driven programming. Don't just call the function right away, register it as an event handler instead. The following pseudo-code only shows my idea. It's not complete //register the function here, instead of calling it immediately event = document.createEvent("HTMLEvents"); event.initEvent("myEvent", true, true); document.addEventListener("myEvent", function(e) { e.scope.doSomenthin = function() { if (this.onfinish) { // If exists, run onfinish, should return 'fin' return this.onfinish(); } } }); ...... //call the handler to handle the below event window.scope = window.scope || (window.scope = {}); scope.doSomenthin().onfinish = function(){return 'fin'} event.scope = scope; document.body.dispatchEvent(event); The above code is kind of silly. You have to design where to put and trigger the events.

http://stackoverflow.com/comment/42113534
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26766367
score: 4
has text: Have you read the MDN for getters and setters? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get

http://stackoverflow.com/comment/42078935
comment on: http://stackoverflow.com/a/26746201
type: AnswerComment
score: 0
type: Comment
has text: I think it should be `var maplace = new Maplace({...}); maplace.Load(); ... maplace.ViewOnMap(2)`. See updated answer.

http://stackoverflow.com/q/26741174
tagged with: design-patterns
has comment: http://stackoverflow.com/comment/42068485
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26741592
has answer: http://stackoverflow.com/a/26741761
has comment: http://stackoverflow.com/comment/42080040
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26741592
has comment: http://stackoverflow.com/comment/42075206
has comment: http://stackoverflow.com/comment/42068182
has title: Placing instance properties in prototype constructors, good or bad?
tagged with: javascript
tagged with: inheritance
has body: I just finished reading this very good article on prototypal inheritance in JavaScript, but was surprised to see how vehemently the author was against having properties defined in prototypes. A common mistake when creating objects for the prototype chain, from programmers that come from classical OOP anyway, is to define common properties high up in the chain because they exist for all instances. We feel the need to define the property as if the abstract object described an interface. Yet there is no point in defining in a prototype a property that will be present in objects that descend from it. Javascript is not like Java : you don't declare in the base objects variables that will be different to all instances of the descendants. You declare a variable only on the level where it will be defined. Take the name property of our animals. Since every animal has a name, it's natural to consider this property as common to all, and define it in the common denominator which is the Animal prototype. The thing is, Animal has no name. A Dog instance has a name. In Javascript, you cannot say an Animal has a name. Animal is an object, not a definition, even if we use it like so. And that object has no name property. Why then is name referred to in Animal's methods if Animal has no name? Because Animal is abstract : it is not intended to be used by itself. this, in Animal, will never refer to Animal. It will refer to whatever object descends from Animal, dino for example. And dino has a name. If I have a very complex set of classes that have, dozens of properties in common. I don't see how it's better to duplicate those properties and the work that goes into setting them up on each instantiable derived class when the work can be done once in the base class, even if that base class was meant to be 'abstract'. For instance: function Analysis(args){ args = args || {}; // Extract supported init properties from args this.description = args.description; this.host = args.host; this.sou…
tagged with: prototype
score: 0
has comment: http://stackoverflow.com/comment/42068391
possible better answer: http://stackoverflow.com/a/26741761

http://stackoverflow.com/comment/98748294
comment on: http://stackoverflow.com/a/26799004
type: AnswerComment
score: 0
has text: Sadly the problem is unfixed even in PF 7.0.1 - and the fix on github does not work with ajax updated elements.
type: Comment

http://stackoverflow.com/q/26807598
answer count: 2
tagged with: function
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26807713
has title: Simple Parameter Javascript Function
favorite count: 0
score: 2
downvote count: 0
tagged with: parameters
type: AnsweredQuestion
has body: I haven't played with Javascript for awhile and I'm scratching my head here... I have an object I've defined: var attrs = { "charStats": { "hp": 500000, "speed": 1, "juice": 0, "nova": 0, "special": 1, "experience": 0, "level": 1 } }; And the HTML to back it up and display the data: Character Statistics HP: Speed: Juice: Special: Nova: Experience: Level: Add Experience Update So the issue I'm experiencing is one of my functions works, like so: function addToStats(amount){ attrs.charStats.experience += amount; } $('.addExp').on('click', function(){ addToStats(15); }); But for some reason trying to make it more expandable, setting 2 parameters doesn't seem to work at all... function addToStats(stat, amount){ stat += amount; } $('.addExp').on('click', function(){ addToStats(attrs.charStats.experience, 15); }); What exactly am I missing here? Working: http://jsfiddle.net/wu61owt6/ Not Working: http://jsfiddle.net/wu61owt6/1/
possible better answer: http://stackoverflow.com/a/26807713
tagged with: dom
has answer: http://stackoverflow.com/a/26807752
accepted answer: http://stackoverflow.com/a/26807752
type: Question
upvote count: 2

http://stackoverflow.com/a/26785828
has body: something like this $(".panel-title , .panel_button").click(function () { if ($(this).hasClass("panel-title")) { var href = $(this).children("a").attr("href") } else { var href = $(this).attr("href") } $(href).toggle() if ($(href + ":visible").length) { $(href).prev().find(".open_link_content").show() $(href).prev().find(".close_link_content").hide() } else { $(href).prev().find(".open_link_content").hide() $(href).prev().find(".close_link_content").show() } }); but pay attention: second element in html may be &lt;a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo" class="panel_button"&gt;
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26784496

http://stackoverflow.com/a/26820743
has body: Your trying to convert from unsigned to signed but your code isn't doing anything that could change a sign. First, shift your unsigned 16 bit (0-65536) to signed (-32767 to 32767) by subtracting 32767. Then divide by 32767 to scale to -1.0 to 1.0. Also, make sure your division is a floating point division. channelBuffer[i] = (pcm16Buffer[i]-32767) / 32767.0;
has comment: http://stackoverflow.com/comment/42211376
type: Answer
has comment: http://stackoverflow.com/comment/42217537
answers question: http://stackoverflow.com/q/26819525
score: 0

internet-explorer
tags question: http://stackoverflow.com/q/26787899
tags question: http://stackoverflow.com/q/26775955
tags question: http://stackoverflow.com/q/26745717
tags question: http://stackoverflow.com/q/26762780
tags question: http://stackoverflow.com/q/26795839
tags question: http://stackoverflow.com/q/26826989
tags question: http://stackoverflow.com/q/26720077
tag name: internet-explorer
tags question: http://stackoverflow.com/q/26724165
tags question: http://stackoverflow.com/q/26674987
tags question: http://stackoverflow.com/q/26792731
tags question: http://stackoverflow.com/q/26781779
tags question: http://stackoverflow.com/q/26820847
tags question: http://stackoverflow.com/q/26784311
tags question: http://stackoverflow.com/q/26768342
tags question: http://stackoverflow.com/q/26710546
tags question: http://stackoverflow.com/q/26805797
tags question: http://stackoverflow.com/q/26718341
tags question: http://stackoverflow.com/q/26747395
tags question: http://stackoverflow.com/q/26690621
tags question: http://stackoverflow.com/q/26677547
tags question: http://stackoverflow.com/q/26743283
tags question: http://stackoverflow.com/q/26725064
tags question: http://stackoverflow.com/q/26746007
tags question: http://stackoverflow.com/q/26757562
tags question: http://stackoverflow.com/q/26678025
tags question: http://stackoverflow.com/q/26781221
tags question: http://stackoverflow.com/q/26775868
tags question: http://stackoverflow.com/q/26762693
tags question: http://stackoverflow.com/q/26717295
tags question: http://stackoverflow.com/q/26795218
tags question: http://stackoverflow.com/q/26716875
tags question: http://stackoverflow.com/q/26682581
type: Tag
tags question: http://stackoverflow.com/q/26677674
tags question: http://stackoverflow.com/q/26769265
tags question: http://stackoverflow.com/q/26674855
tags question: http://stackoverflow.com/q/26822535
tags question: http://stackoverflow.com/q/26683910
tags question: http://stackoverflow.com/q/26802430
tags question: http://stackoverflow.com/q/26803624
tags question: http://stackoverflow.com/q/26743210
tags question: http://stackoverflow.com/q/26794439
tags question: http://stackoverflow.com/q/26757978
tags question: http://stackoverflow.com/q/26740697

http://stackoverflow.com/a/26752511
score: 1
has comment: http://stackoverflow.com/comment/42118113
has comment: http://stackoverflow.com/comment/42100543
has body: Edit from comments: As I didn't found how to apply css "background-image" to circle elements, I added a way using js. Or you can achieve this using gradients and here particularly radial-gradients : var svg = document.querySelectorAll('svg')[0], r = 30, cy = 60, nr = r - (r * 0.7), c1 = document.querySelectorAll('circle')[0], //Assuming you already have those ones //first make a copy of the circle you just made c2 = c1.cloneNode(); //then apply new styles to the first circle c1.setAttributeNS(null, "fill", "transparent"); c1.style.stroke = "#8cc63f"; c1.style.strokeWidth = "2px"; c1.parentNode.appendChild(c2); //and to the new one c2.setAttributeNS(null, "fill", "red"); c2.style.strokeWidth = "0"; c2.r.baseVal.value = r - nr; //change its radius //Wrap thoe elements into a single g that will act as one element var g = document.createElementNS("http://www.w3.org/2000/svg", 'g'); g.appendChild(c2); g.appendChild(c1); svg.appendChild(g) <stop offset="0%" stop-color="red" /> <stop offset="70%" stop-color="red" /> <stop offset="71%" stop-color="transparent" />
upvote count: 1
has comment: http://stackoverflow.com/comment/42088353
type: Answer
answers question: http://stackoverflow.com/q/26751782
has comment: http://stackoverflow.com/comment/42088438
downvote count: 0

http://stackoverflow.com/q/26724715
score: 1
has body: I'm porting a project from Three.js v68 to v69 and am getting an error that says Uncaught TypeError: Cannot read property 'boundingSphere' of undefinedon line 6077 of Three.js v69: It's a function in the THREE.Frustrum.prototype: intersectsObject: function () { var sphere = new THREE.Sphere(); return function ( object ) { var geometry = object.geometry; if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); sphere.copy( geometry.boundingSphere ); sphere.applyMatrix4( object.matrixWorld ); return this.intersectsSphere( sphere ); }; }(), What has migrated here that I should pay attention to in my code? I'm switching from 68 to 69 in order to use several THREE scripts to do some postprocessing (THREE.EffectsComposer and others here). The scripts require the use of PlaneBufferGeometry now in 69 (perhaps among other things). UPDATE: Here's the stack trace: Uncaught TypeError: Cannot read property 'boundingSphere' of undefined Three_69_max.js:6077 (anonymous function) Three_69_max.js:6077 projectObject Three_69_max.js:21161 projectObject Three_69_max.js:21200 render Three_69_max.js:21035 animLoop.render AnimationLoop.js:161 animate MainBreederProgram.js:14 init MainBreederProgram.js:32 ... UPDATE: Looking deeper into the call stack it appears that it's crashing when asking for the geometry of an Object3D in my scene. The Object3D is holding a set of other Object3Ds and has no inherent geometry of its own - it's simply there as a matter of convenience so I can easily access the set of objects it contains.
favorite count: 0
has comment: http://stackoverflow.com/comment/42993322
has answer: http://stackoverflow.com/a/27363579
type: Question
has comment: http://stackoverflow.com/comment/42995001
answer count: 2
tagged with: three.js
possible better answer: http://stackoverflow.com/a/31281858
has title: In a port from Three.js 68 to 69: Cannot read property 'boundingSphere' of undefined
has answer: http://stackoverflow.com/a/31281858
upvote count: 1
accepted answer: http://stackoverflow.com/a/27363579
tagged with: javascript
has comment: http://stackoverflow.com/comment/42994858
type: AnsweredQuestion
tagged with: migration
downvote count: 0

http://stackoverflow.com/q/26819566
accepted answer: http://stackoverflow.com/a/26832838
has title: Random path generation algorithm
has comment: http://stackoverflow.com/comment/42208851
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42209005
has answer: http://stackoverflow.com/a/26820937
has answer: http://stackoverflow.com/a/26820772
tagged with: random
has body: I would like to generate a random path from the top to bottom of a matrix. FIDDLE Requirements: The path can wind around, but it must connect from row 1 to the last row. Eventually, I'd like the colors to be random for each path piece, but for now it can be uniform (I've tested below with just red) Paths connecting from top to bottom are randomly generated The path pieces obviously must connect, and shouldn't fork (aka, give player 2 options to choose to go, shown here) The path can only go from top to bottom (cannot move back up), but it can wind left and right What I've considered: I can't simply check if the above row's column is part of the path, because then it will continuously generate path pieces when it finds the first true value. I'm not interested in generating paths manually, as that would require a new matrix specifying 1's and 0's where I want the path to go. And then for each "random" path option, I would have to build a new matrix. More importantly, manually generating path in matrices would make scaling the matrix size far more tedious... For example If I changed my 6x6 matrix to a 100x100. So yeah, the easy way would be to just make this and iterate through it: var matrixPaths = [ [0,1,0,0,0,0], [0,1,1,1,0,0], [0,0,0,1,0,0], [0,0,0,1,1,1], [0,0,0,0,0,1], [0,0,0,0,0,1] ]; On the left, empty grid, on the right, what it should generate My thought was to first create the grid and add the spans in each matrix entry: function createMyGrid() { //create 6x6 matrix for(var i=1; i&lt;=6; i++) { matrix[i] = []; for(var j=1; j&lt;=6; j++) { var colorIndex = Math.floor(Math.random() * (color.length - 0) + 0); var $span = $('&lt;span /&gt;').attr('class', 'colorSquare').html("[" + i + "][" + j + "]"); $("#grid").append($span); matrix[i][j] = $span; } } } Then, generate the first path piece at random in row 1. Then for each subsequent row, check for a path piece above it to connect... then from that piece, start generated the next set: function createPath() { var…
possible better answer: http://stackoverflow.com/a/26820937
has comment: http://stackoverflow.com/comment/42209353
has answer: http://stackoverflow.com/a/26821008
upvote count: 11
favorite count: 0
score: 9
answer count: 5
downvote count: 2
has answer: http://stackoverflow.com/a/26832838
has comment: http://stackoverflow.com/comment/42209170
tagged with: css
has comment: http://stackoverflow.com/comment/42209103
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42209291
tagged with: algorithm
has answer: http://stackoverflow.com/a/26827383
type: Question

http://stackoverflow.com/q/26795735
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/3806680
linked to: http://stackoverflow.com/q/242608
linked to: http://stackoverflow.com/q/8701754
tagged with: css
has title: Disable scrollbar instead of hiding in IE
has comment: http://stackoverflow.com/comment/42165880
answer count: 0
has body: My requirement is to disable scrollbar instead of hiding. I followed the below post: Just disable scroll not hide it? It is working fine with Chrome &amp; FF. But it is not working in IE. Still am able to scroll in IE. Can anyone suggest me a workaround for IE browser.
has comment: http://stackoverflow.com/comment/42167305
type: Question
has comment: http://stackoverflow.com/comment/42165723
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/20241387

http://stackoverflow.com/q/26817742
downvote count: 1
has title: Prevent Chrome from force scrolling cursor into view
has answer: http://stackoverflow.com/a/27918401
score: 1
has comment: http://stackoverflow.com/comment/42206004
has comment: http://stackoverflow.com/comment/42344109
type: Question
has body: We're working on a text editor (based on a textarea) that moves the 'canvas' to the right to reveal a menu on the left. Pretty much the standard slide-to-show-menu. The menu is a list of documents, and when you click on one, the textarea is filled with the selected document text and the cursor is set to the last saved position via selectionRange/Range. Here it gets funky: Part of the textarea is off the right side of the screen, and if the cursor is placed there (or even near there), Chrome scrolls the canvas div into the the left despite position:relative. Is there any way to prevent this? HTML: &lt;body&gt; &lt;div id="wrapper"&gt; &lt;div id="canvas&gt; &lt;textarea&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; CSS: #wrapper { position: absolute; left: 300px; /* set via js, to show the menu */ right: 0; overflow: hidden; } #canvas { position: relative; width: 1440px; /* viewport width set via js */ } textarea { width: 100%; /* this properly relates to the fixed width canvas parent */ }
has comment: http://stackoverflow.com/comment/42205755
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42206104
has comment: http://stackoverflow.com/comment/44234921
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42880226
tagged with: css
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: google-chrome

http://stackoverflow.com/comment/42202477
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26814812
has text: I don't know which would be faster. As with all performance questions, you'd have to devise a meaningful test for your particular situation and measure the performance in several different browsers.

http://stackoverflow.com/comment/42241359
comment on: http://stackoverflow.com/a/26798399
type: Comment
has text: You need to look into the response data that you've received from server. I think you didn't understand my solution to your issue. Here I'm explaining: In done function, if you see this line `$("span.error").empty();//All previous error messages cleared here.`, it will do the job to clear all error messages at very first. Then if response error data obj exists, it will process each field error message in the `$.each(obj,function(entry){...});`. in the function if it found the field id as entry key then the error message will be added to next span tag of field.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26835871
has body: As I see it, you have two options: Option A) go with the interceptors. However, to eliminate the compile you need to return success status code inside response error (BAD) OR redirect to the login page inside the interceptor (Good): app.factory('authInterceptorService', function () { var interceptor = {}; interceptor.responseError = function (rejection) { if (rejection.status === 401 && rejection.config.url === "home template url") { //BAD IDEA //console.log("faking home template"); //rejection.status = 200; //rejection.data = " should log in to the application first "; //GOOD IDEA window.location = "/login.html"; } return rejection; } return interceptor; }); and on app config: app.config(['$httpProvider', function ($httpProvider) { $httpProvider.interceptors.push('authInterceptorService'); } Option b) make the home template public. After all it should be just html mark-up, without any sensible information. this solution is clean...and perhaps is also possible.
has comment: http://stackoverflow.com/comment/42294858
type: Answer
answers question: http://stackoverflow.com/q/26811211
has comment: http://stackoverflow.com/comment/42294426
score: 0

http://stackoverflow.com/comment/42012930
has text: What is the use case for this application, is the user supossed to have the csv on his machine is this supposed to be a offline app writen in html/css/js ? Or is the csv supposed to be on a server, I'm thinking this should be the case then the csv reading should not be handled by javascript.
comment on: http://stackoverflow.com/q/26710692
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/70991030
has text: @Md Abu Ahsan Basir, if you need clarification or if something isn't working, please post it as a comment rather than editing my post. Thanks.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26701622

http://stackoverflow.com/a/56399976
answers question: http://stackoverflow.com/q/26787794
type: Answer
has body: check your cors configuration sometimes breeze will fail silently if cors is not configured correctly
score: 0
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/42102962
score: 0
comment on: http://stackoverflow.com/a/26760801
type: Comment
has text: This script is a recursive nightmare D:
type: AnswerComment

http://stackoverflow.com/q/26751795
tagged with: object
type: AnsweredQuestion
has body: I know there is a small problem staring right at my face by can't figure it out. Consider {{view Ember.Select content=baseList optionLabelPath="content.desc" optionValuePath="content.id" selectionBinding="selectedItem" }} baseList = [{"id":"item1","desc":"item number is 1"},{"id":"item2","desc":"item number is 2"}] Below does not work selectedItem = {"id":"item1","desc":"item number is 1"}; The select drop down does not show any selected item Below works selectedItem = baseList.filterBy('id','item1')[0]; Now the select drop down shows the selected item. What is the problem? I even checked if the order of the properties(id and desc) are proper. Is it because two objects cant be compared directly unless certain algorithm is employed or rather use JSON.stringify?
has title: Ember select is not showing the selected item
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26752494
score: 0
tagged with: ember.js
answer count: 1
has answer: http://stackoverflow.com/a/26752494
tagged with: ember-select

http://stackoverflow.com/comment/42017755
comment on: http://stackoverflow.com/q/26712593
score: 0
type: Comment
type: QuestionComment
has text: Just one think to add :-) mosaic is just first step, after I do mosaic skeleton, I have to add a lot of different code around ( CMS + my custom Javascript photo editor etc. )

http://stackoverflow.com/q/26787921
tagged with: authentication
type: Question
has title: Login with Facebook doesn't work in Facebook App but it works in browser
tagged with: javascript
score: 0
tagged with: canvas
type: UnansweredQuestion
tagged with: android
tagged with: facebook
has comment: http://stackoverflow.com/comment/42944617
has comment: http://stackoverflow.com/comment/42156264
answer count: 0
has body: I've made a website which allow you to login with Facebook using the Javascript SDK, than I show it in a Facebook App with a Facebook Canvas. It works fine on PC, both in website and Facebook Canvas App. I tried it on Android Browser and it works fine, but if I post the url on Facebook, and I click it, Facebook loads it inside the Facebook Android App, and when I click on the Login Button nothing happens. What could be wrong? (I use JQuery)

cassandra
tags question: http://stackoverflow.com/q/26732120
tags question: http://stackoverflow.com/q/26795766
type: Tag
tags question: http://stackoverflow.com/q/26815048
tag name: cassandra

http://stackoverflow.com/comment/42126020
has text: Are you allowed to use jquery library?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26771793

http://stackoverflow.com/comment/42111489
comment on: http://stackoverflow.com/q/26765251
has text: Why `foo` leads to `sample.png`?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42084748
has text: ...or `Promise.reject(error)` with [ECMA6 Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/reject)
comment on: http://stackoverflow.com/a/26750396
type: AnswerComment
type: Comment
score: 3

http://stackoverflow.com/q/26720766
tagged with: javascript
has body: I have to redirect from www.example.com to xyz.example.com only when Header doesn't contain any referrer. I have wrote this code: chrome.webRequest.onHeadersReceived.addListener( function(details) { var match = details.url.match(/^(http|https):\/\/www.example.com\/([\S\s]*)/); console.log(details); return {redirectUrl: match[1] + "://xyz.example.com/" + match[2]}; }, {urls: ["*://www.example.com/*"]}, ["responseHeaders", "blocking"] ); But "onHeadersReceived" doesn't contain any referrer information. So I can not write my logic further based on referrer information. There is one API "onBeforeSendHeaders" which contain referrer information But it's not able to redirect. Can you suggest any solution which can give referrer information and redirect as well. Here is the link of all API's available : Chrome API's link
favorite count: 0
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/42031740
tagged with: http-redirect
has comment: http://stackoverflow.com/comment/42031539
upvote count: 1
has comment: http://stackoverflow.com/comment/42032006
has title: redirecting those urls which are not having any referrer urls
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42031928
score: 1
has comment: http://stackoverflow.com/comment/42031861
has answer: http://stackoverflow.com/a/26721405
has comment: http://stackoverflow.com/comment/42031656
accepted answer: http://stackoverflow.com/a/26721405
answer count: 1
downvote count: 0

http://stackoverflow.com/q/26746538
has answer: http://stackoverflow.com/a/36439304
tagged with: javascript
tagged with: callback
has comment: http://stackoverflow.com/comment/42078539
score: 0
tagged with: asynchronous
tagged with: node.js
has comment: http://stackoverflow.com/comment/42102375
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26746685
type: Question
has title: How can we know that all asynchronous operations, all callback are done, and wait for them
has body: The following code, read a file with documents sorted by categories, and values desc, and modify the documents with the highest value for each categories. following, the code : var MongoClient = require('mongodb').MongoClient; MongoClient.connect('mongodb://WRKHAL02:27017/test', function(err, db) { if(err) throw err; function (cbUpdate(err,updated) { if(err) throw " \n cbUpdate \n" + err; console.log(" Successfully updated " + updated + " Document"); } var theFile = db.collection("theFile"); var cursor = theFile.find({}); cursor.sort([["State",1],["Temperature",-1]]); currentState = "empty"; cursor.each(function(err,doc) { if(err) throw " \n -*- cursor.each error -*- \n" + err; if (doc == null) { console.log(" \n doc == null ; End Of File \n "); here use to be the db.close(); } else { if (currentState != doc.State) { console.log(doc._id); console.log(doc.State); console.log(doc.Temperature); var myquery = {}; myquery['_id'] = doc['_id']; var myupdate = {$set:{"month_high":true}}; theFile.update(myquery, myupdate, cbUpdate); currentState = doc.State; } } }); setTimeout(function() { console.log(" TimeOut "); db.close(); }, 3000); }); The problem is I don't know when all asynchronous operations are ended. The read process can finish first or the update process can finish first (if there is many documents to read after the last update). So I don't know when to close the DB. How can I know that all asynchronous operation and all callback are done, and wait for them. I read about "promise" but it look like the hell to write something efficient and clean with that. The only but no realistic way I found to test this small piece of code is to add a wait loop at the end. The asynchronous feature seem to change a very simple algorithm into some deep perplexity. Thanks.
tagged with: mongodb
answer count: 2

http://stackoverflow.com/a/26758712
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26751972
has body: The code in the question does not "add one more event inbetween". A better summary would be that it "temporarily adds a click handler". The point being that a hander is not an event, but something that responds to an event. Going one step further, the "temporary" click handler is only removed if the container is clicked. If it is not clicked, then it will remain in place and the next toggle cycle will add another identical click handler to the container. If you are to stick with this approach, then you should ensure that the "temporary" click handler is unbound before adding a new one. That said, an accumulation of click handlers is not particularly harmful in this case, but undesirable. All will be unbound if/when the container is eventually clicked. In many applications, an accumulation of click handlers would be highly undesirable. Several other points : Your clickToggle plugin is an over-elaboration. There are simpler ways, using standard jQuery methods, to toggle between two actions on successive clicks. A standard trick is to .toggleClass() then immediately test state with .hasClass() and branch accordingly. Sometimes, you might need to introduce a dummy class just to register state but in your case, you already toggle the container's 'overlay-disable' class. jQuery's maintains a built-in toggle state for tracking 'toggle' actions. This state will remain unaware of .hide(). By using .animate({width:'toggle'} again, but with zero duration, you can achieve the hide effect and maintain the built-in toggle state. If you want to bind/unbind an event handler, then it's more efficient to do so with a named function, but here it is simpler and clearer to permanently attach a click handler to the container and, as before, use hasClass() to test state and branch accordingly. To give a better user experience, it is often a good idea to issue stop(true) on a repeatedly animated element. Without stopping, (particularly with longer animations) the effects queue can build up…
has comment: http://stackoverflow.com/comment/42100222
answers question: http://stackoverflow.com/q/26751972
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42101380

http://stackoverflow.com/comment/42204044
has text: here is the plunker http://plnkr.co/edit/71Nudes4eTbz1RBX9gsb
type: Comment
comment on: http://stackoverflow.com/q/26805279
score: 0
type: QuestionComment

http://stackoverflow.com/q/26744001
has body: Hey all I have the following code: var items = []; $(xml).find("Placemark").each(function () { var tmp_latLng = $(this).find("coordinates").text(); tmp_latLng = tmp_latLng.split(","); items.push({ name: $(this).find("name").text(), snippet: $(this).find("Snippet").text(), description: $(this).find("description").text(), lat: tmp_latLng[0], lng: tmp_latLng[1], distance: $(this).find("distance").text() }); }); var markerNodes = items; if (markerNodes.length &gt; 0) { howManyMarkers = markerNodes.length; for (var i = 0; i &lt; markerNodes.length; i++) { console.log(markerNodes[i].Snippet); var name = markerNodes[i].getAttribute("Snippet"); var address = markerNodes[i].getAttribute("Snippet"); var description = markerNodes[i].getAttribute("description"); var distance = parseFloat(markerNodes[i].getAttribute("distance")); var latlng = new google.maps.LatLng(parseFloat(markerNodes[i].getAttribute("lat")), parseFloat(markerNodes[i].getAttribute("lng"))); createOption(name, distance, i); createMarker(latlng, name, address); bounds.extend(latlng); } map.fitBounds(bounds); } else { alert('Sorry, there are no stores that close to your location. Try expanding your search radius.'); } The error is on console.log(markerNodes[i].Snippet);. The error is Uncaught TypeError: undefined is not a function Also the markerNodes[i].getAttribute("Snippet") has an error of Uncaught TypeError: undefined is not a function What would I be missing?
has answer: http://stackoverflow.com/a/26744087
has answer: http://stackoverflow.com/a/26744078
tagged with: arrays
tagged with: javascript
tagged with: jquery
has title: jQuery array object getting value
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26744224
tagged with: parsing
tagged with: http://stackoverflow.com/tag/xml
accepted answer: http://stackoverflow.com/a/26744087
type: AnsweredQuestion
type: Question
possible better answer: http://stackoverflow.com/a/26744078

http://stackoverflow.com/a/26728032
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26727343
has body: You need to understand how node.js and the whole idea of asynchronous requests and callbacks work. Quite simply you are trying to access the argument bookmark_id inside the callback for diffbot.article. However, the function parseArticle is already executed and doesn't wait for the callback function for diffbot.article to get finished as it not synchronous by design. Therefore all the arguments passed to parseArticle are out of scope in the callbacks for functions used inside it and thus you get a lexical scope issue. I suggest reading about Asynchronous requests and the idea of closures in this pretty well written blog post. Hope it gets you started in the right direction.

http://stackoverflow.com/comment/42116867
type: Comment
has text: How would you apply that to multiple? I.e what element in the actual modal display code could you relate that to?
comment on: http://stackoverflow.com/a/26768041
score: 0
type: AnswerComment

real-time
tags question: http://stackoverflow.com/q/26748500
tags question: http://stackoverflow.com/q/26818892
type: Tag
tag name: real-time
tags question: http://stackoverflow.com/q/26693978

http://stackoverflow.com/comment/42152128
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26784451
has text: You might be looking for http://fancyapps.com/fancybox/#useful ==No. 13 (just set `aspectRatio : true`) http://jsfiddle.net/tg7h0pfy/

http://stackoverflow.com/q/26721563
type: Question
has body: I have a webpage where people enter information (name, job title, address, etc.) and it auto creates a business card for them. I currently have some jQuery that uses .change and looks at a field when a user changes it. It looks for issues with what they enter, because some things must be in a certain format (ex- They enter the word "Avenue" and it won't let them add the item to their cart until they change it to Ave.) I am trying to find some way to do this on the fly automatically with JS/jQuery, but I'm not sure what to do. What I would like is for the field to update itself, so if the user puts in "Avenue" it would auto update to "Ave." after the user tabs / exits the field. Any idea on what JS and/or jQuery can be used to do this? Here is my current code: var x = "Clean"; var xD = "&amp;nbsp;"; $('#cartText4046').change(function () { if ($(this).val().indexOf("Avenue") &gt; -1) { x = "Please use Ave. instead of Avenue."; } else if ($(this).val().indexOf("avenue") &gt; -1) { x = "Please use Ave. instead of Avenue."; ... Additional rules here, omitted for space. } else { x = "Clean"; } if (x != "Clean") { $('#cartText4046').addClass("invalid"); xD = x; } else if (x == "Clean") { $('#cartText4046').removeClass("invalid"); xD = "&amp;nbsp;"; } if (x != "Clean") { $('.betabutton').html('&lt;span id="addToBaskettext"&gt;To add this to the Basket, please fix the following issue(s):&lt;br&gt;&lt;br&gt;&amp;nbsp;' +xD'&lt;/span&gt;'); $('.betabutton').addClass("invalidBtn"); } else if (x == "Clean") { $('.betabutton').html('&lt;a id="addToBasket" href="#" onclick="actionPageSubmit();return false;"&gt;&lt;span id="addToBaskettext"&gt;Add to Basket&lt;/span&gt;&lt;/a&gt;'); $('.betabutton').removeClass("invalidBtn"); }
has title: Automatically change a value in a form field
has comment: http://stackoverflow.com/comment/42033118
has comment: http://stackoverflow.com/comment/42033728
has answer: http://stackoverflow.com/a/26721703
has comment: http://stackoverflow.com/comment/42033016
tagged with: javascript
has comment: http://stackoverflow.com/comment/42033969
has comment: http://stackoverflow.com/comment/42033549
accepted answer: http://stackoverflow.com/a/26721703
answer count: 3
downvote count: 0
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/42033515
favorite count: 0
has answer: http://stackoverflow.com/a/26722269
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26740201
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26740201
has comment: http://stackoverflow.com/comment/42033168
has comment: http://stackoverflow.com/comment/42033630
upvote count: 1
tagged with: forms

http://stackoverflow.com/comment/42147502
comment on: http://stackoverflow.com/q/26784949
score: 0
has text: Whoops, sorry TrueBlueAussie i didn't notice, I put it directly
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26683397
downvote count: 0
has comment: http://stackoverflow.com/comment/41965454
type: Answer
has body: You're almost there. Literally, your requirement would be: (?:^|\.)google\.com$ But depending on your needs, this could be better (or not, you tell me): \bgoogle\.com$ The \b means word boundary.
answers question: http://stackoverflow.com/q/26683343
has comment: http://stackoverflow.com/comment/41965484
accepted answer of: http://stackoverflow.com/q/26683343
upvote count: 5
has comment: http://stackoverflow.com/comment/41965465
score: 5
type: AcceptedAnswer

http://stackoverflow.com/a/30087773
has body: You would have to rewrite to the following: $('#ReportsTable').dataTable({ //"data": Reportdata, "bLengthChange": false, "columns": [ { "data": "name", "sTitle": "Name", "sWidth": "300px"}, { "data": "type", "sTitle": "Report Type" }, { "data": "timestamp", "sTitle": "Purchase Date" } ] }); var ReportTable = $('#ReportsTable').dataTable(); ReportTable.row.add("{name:'Test', type:'test', timestamp:'test'}").draw();
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26801873

http://stackoverflow.com/q/26801082
accepted answer: http://stackoverflow.com/a/26801101
has comment: http://stackoverflow.com/comment/42175560
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42175644
score: 0
type: Question
has body: I am creating a new element like this: var cell3=row.insertCell(2); var t3=document.createElement("input"); t3.id = "txtEstStartDt"+index; cell3.appendChild(t3); As I have given an id to the element, I want to give a class. t3.class = "abc"; Will this work?
has answer: http://stackoverflow.com/a/26801101
answer count: 1
tagged with: javascript
has title: How to give class name to a newly created element?
linked to: http://stackoverflow.com/q/195951
has comment: http://stackoverflow.com/comment/42175608
favorite count: 0
has comment: http://stackoverflow.com/comment/42175656

http://stackoverflow.com/comment/42152419
has text: you already used jQuery as soon as you used the `$("")` selector. if you would like to append it without jQuery, you will need to extract the html object from the jQuery object and add it to the inner Html of the details div, i will update my answer.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26787874
type: Comment

http://stackoverflow.com/a/26758410
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26727414
has body: I can tell you briefly how to do it, but I don't have time to write the code this very minute - maybe over the next couple of days if you are lucky. So, hopefully your Extendscript skills are reasonable.... :-) The issue is that the Color Sampler doesn't pass back transparency, just RGB values. So, the technique will be to force the transparency into the RGB values so you can use them. Here are the steps: Duplicate the document - because we are going to be a bit destructive Select all &amp; copy merged (Cmd-A,Shift+Cmd+C) Flatten (Layer-&gt;Flatten Image) Fill with black (Edit-&gt;Fill-&gt;Black) Paste (the layer we copy merged) Lock transparent pixels on pasted layer (top of layers palette - first checkerboard icon on left) Fill with white (Edit-&gt;Fill-&gt;White) Add a color sampler at the pixel position you want Read sampler's red value (or green, or blue - they are all the same) and that is the transparency Most of the Extendscript for the above is fairly simple, the only two harder bits are setting the transparent pixels to locked, which you do like this: docLay[l].transparentPixelsLocked = true; and the samplers - where you might be well advised to clear all existing samplers (as only max 4 are permitted) var sampler = doc.colorSamplers.add([64, 64]); I have made a little animated GIF here that shows you the process. I start with a red-&gt;transparent gradient image. Note at the end when I have the color dropper tool running, you will see the greyscale values in the Color Info window change as I move up and down the image with the mouse, these reflect the original transparency.
has comment: http://stackoverflow.com/comment/42100911

http://stackoverflow.com/comment/44727452
comment on: http://stackoverflow.com/q/26764879
score: 2
has text: I need an answer to this too. In my case, when the user pans (mousedown, drag, mouseup), we will handle that outside of angular. It seems to me that ng-click should have a distance threshold such that if the mousedown location and the mouseup location are farther apart than the threshold, then it should not trigger the ng-click.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42204676
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26817110
type: Comment
has text: Dont need. This implementation takes the radio value and show in the . If you want to work with that values. You can use this.value inside de change event. I ll edit.

http://stackoverflow.com/q/26807823
favorite count: 0
type: Question
upvote count: 2
has title: i dont understand this code from javascript
has answer: http://stackoverflow.com/a/26807926
has answer: http://stackoverflow.com/a/26807886
downvote count: 5
tagged with: javascript
type: UnansweredQuestion
score: -3
answer count: 4
has answer: http://stackoverflow.com/a/26807874
has answer: http://stackoverflow.com/a/26808121
has body: I am a newbie to JavaScript and I am wondering what this means in plain English. Please input a number between 5 and 10: Test Input I don't understand the part between the ***'s. why are they tacking messaging and putting it in messaging? please help and define any programing words an extremely knew person would not understand. than you very much.

http://stackoverflow.com/a/26738897
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26738835
answers question: http://stackoverflow.com/q/26738835
score: 1
has body: replace method doesn't modify string in place, but returns a new string. So your code should be: name = name.replace('['+(indice-1)+']', '['+indice+']'); Also maybe you don't really need to have such index names. You can simply go with name="fecha_inicio[]" and don't worry about index. Later you would get form data with say serialize method.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42064040
type: Answer
has comment: http://stackoverflow.com/comment/42063809

http://stackoverflow.com/comment/42226081
score: 0
type: AnswerComment
has text: I dont quite understand what you want to do, can you explain to me what is the functionality you are aiming for?
comment on: http://stackoverflow.com/a/26828428
type: Comment

task
tags question: http://stackoverflow.com/q/26763826
type: Tag
tag name: task

http://stackoverflow.com/q/26827840
accepted answer: http://stackoverflow.com/a/26827891
type: AnsweredQuestion
downvote count: 0
score: 1
has body: http://codepen.io/rcidaleassumpo/pen/ogvoQy Hello, the code is on the site above. Thats the HTML &lt;div ng-app="testApp" ng-controller="myController"&gt; &lt;select name="current" id="current" ng-model="currentliga"&gt; &lt;option ng-repeat="liga in ligas"&gt;{{ liga }}&lt;/option&gt; &lt;/select&gt; &lt;/div&gt; Thats the JS: var app = angular.module('testApp', []); app.controller('myController', function($scope){ $scope.ligas = ['Bronze', 'Prata', 'Ouro', 'Platina', 'Diamante']; var preco = $scope.currentliga; switch(preco){ case 'Bronze': $scope.valor = 24; break; } }); So basically my idea is to get the value from $scope.currentLiga, which is linked with the what the person will set as an option, and then return a value for the "preco" that will change the "valor" So, if its 'Bronze" that the people selects, the $scope.valor should change to 24. What am I missing? Thank you
type: Question
tagged with: javascript
upvote count: 1
answer count: 1
has title: AngularJS small test, help me find the error please
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26827891

http://stackoverflow.com/q/26776093
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26776732
tagged with: node.js
has title: Node JS Route Behavior makes no sense
type: Question
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26776732
tagged with: express
has body: I'm trying to make a simple authentication page using Node with Express framework. At this moment, I'm not particularly worried about the weak protection. However, my route file is displaying weird behavior. Here is the code: var express = require('express'); var router = express.Router(); var admin = require("../controllers/admin"); router.get('/', function(req, res) { console.log('Entered top route.'); if(req.body.isAuthenticated) { res.redirect('admin/index'); } else { res.redirect('admin/login'); } }); router.post('/authenticate', function(req,res) { if(req.body.pword == "key") { console.log("Resetting body.isAuth'ed"); req.body.isAuthenticated = true; console.log("New val: " + req.body.isAuthenticated); res.redirect('admin/index'); } else { console.log("Failed login attempt: " + req.body.pword); res.redirect('admin/login'); } }); router.get('/login', admin.login); router.get('/index', admin.index); module.exports = router; The idea is that the route is entered, upon which we hit the top route (properly logged by console). This redirects based on whether a req variable is set. This all works properly, and the login (I'm using jade templating) is properly rendered. The login file has a form which calls back to this routing file with 'admin/authenticate'. This also works properly; I'm able to properly retrieve the input (confirmed via console logs). However, the actions I take in the /authenticate/ function, even though they are the exact same thing I do in the '/' route right above, fail. I get 404's and Express Not Found printouts which are entirely useless. My console properly logs 'Failed login attempt' or 'Resetting body...New val: true", but then doing the exact same res.redirect that is initially done in the router.get('/') method above fails, whereas the res.redirects in that function properly redirect and render the correct values. Any ideas what could be wrong? I could post the admin.login/admin.index methods in the controllers/admin file. However, they'…

http://stackoverflow.com/a/26749365
answers question: http://stackoverflow.com/q/26748251
has body: Use this: use .attr('data-country') instead of data('country')
score: 0
type: Answer

http://stackoverflow.com/a/47903088
answers question: http://stackoverflow.com/q/26689922
has body: {//var recIndex = grid.getStore().indexOf(record); //console.log(recIndex); //the solution var indexRecord = item.attributes[1].nodeValue; var recIndex = grid.store.data.indexMap[indexRecord]; //recIndex is the true index of the record //if you need the record of that Index, add this code record = grid.getStore().getAt(recIndex ); }
type: Answer
downvote count: 1
score: -1
upvote count: 0

currency
tag name: currency
type: Tag
tags question: http://stackoverflow.com/q/26688106

http://stackoverflow.com/comment/41986651
score: 1
type: AnswerComment
has text: Are both these functions work on Windows? I mean, there's a mention of a `junction` type for Windows, but does a `file` or `dir` also work? I am not on Windows so I have little experience with Node.js under that environment. Do these functions just throw an error, then?
type: Comment
comment on: http://stackoverflow.com/a/26695796

http://stackoverflow.com/q/26819496
has body: I am trying to design an html textarea for programmers where 2 plugins work on. It seems for some reasons they exclude each other. These plugins are: autosize behave This is my code: Until here, it seems everything is included and everythis is written correctly. When I try to use the textarea, behave works (try to write a bracked ( and it completes the other one )), but autosize isn't active. When I comment behave out, autosize starts to work permitting the area to be resized when cursor reaches bottom limit. where is the conflict? thank you!
has title: How to make -autosize- and -behave- work togheter
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42212760
has comment: http://stackoverflow.com/comment/42224517
tagged with: jquery
type: UnansweredQuestion
tagged with: autosize
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0

http://stackoverflow.com/comment/41971078
comment on: http://stackoverflow.com/q/26686597
score: 0
type: Comment
type: QuestionComment
has text: You have shared incomplete HTML. Share full html.

http://stackoverflow.com/comment/42179125
comment on: http://stackoverflow.com/q/26745645
score: 0
type: Comment
type: QuestionComment
has text: @Rhumborl Sure it is! Like I said - it displays intellisense in my index.html (that references _references.js) but not in the .js files which obviously don't reference it.

http://stackoverflow.com/comment/42168136
has text: Yes! `storage` and `sanboxed file system` can storage data persistent! :-)
comment on: http://stackoverflow.com/a/26766275
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41954330
type: AnswerComment
type: Comment
has text: `pathIndex` is either a global variable, or OP's functions are inside another function. It's fine to leave `pathIndex` in the `setTimeout` – it just doesn't do anything. It's the equivalent of writing `setTimeout(ConcatenateFunctions, 1000)`.
comment on: http://stackoverflow.com/a/26677009
score: 1

http://stackoverflow.com/comment/42227316
type: Comment
has text: URL's without a protocol are assumed to be in the same domain as the page. So `cdn.jsdelivr.net` is just part of the path.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26825478

http://stackoverflow.com/comment/42222630
score: 0
comment on: http://stackoverflow.com/q/26827361
type: Comment
type: QuestionComment
has text: @RokoC.Buljan to dynamically increase the background image size as the browser window is size is changed.setting 100% in css is not something I am looking for.

http://stackoverflow.com/q/26734305
tagged with: delphi
linked to: http://stackoverflow.com/q/12087040
has comment: http://stackoverflow.com/comment/42086364
has comment: http://stackoverflow.com/comment/42067031
answer count: 1
linked to: http://stackoverflow.com/q/10912164
has comment: http://stackoverflow.com/comment/42056184
tagged with: asp.net
favorite count: 0
tagged with: download
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42057610
has answer: http://stackoverflow.com/a/26752115
score: 0
has title: How to programatically download csv data via ashx on a web page?
upvote count: 1
downvote count: 1
type: Question
has body: I've looked at the links suggested by SO but none seem relevant so here goes.. (In the following the actual url and header data has been obfuscated) I would really appreciate some help to automate the download of data from a https web page, using Delphi and (preferably) Twebbrowser as I'm not having a lot of success with Indy. In Firefox I navigate to the url: https://www.thedomain.com/folder1/Showdata.aspx?code=111 that shows some data, there I can click an image that will download the data as csv. I am trying to automate that process using Twebbrowser in Delphi by navigating to the url and then clicking that image, or by programatically calling the same function that the image does.. The web page shows the image with the anchor text... Download It looks like clicking this causes a POST to https://www.thedomain.com/folder1/AnotherFolder/Sendcsv.ashx (with a load of headers) that actually does the download. I first tried using TWebbrowser to navigate to https://www.thedomain.com/folder1/Showdata.aspx?code=111 and then clicked the button manually in the Twebbrowser window. That downloaded an empty file called Sendcsv.ashx. Then I tried programatically clicking the image using code found here: http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_27493399.html. That didn't seem to do anything. It found the image and called its click method but nothing was downloaded and no error message was shown. Can anyone help me with the code needed to download this data using Delphi? Additional info that might be useful. Using the network tab in the debugger in Firefox I managed to find out that clicking the image caused a POST to https://www.thedomain.com/folder1/AnotherFolder/Sendcsv.ashx and there were loads of headers shown as follows. However I don't know how I write the code that will send these headers to Sendcsv.ashx (if that's what I need to do!) . Response headers Cache-Control:"max-age=0" Content-Disposition:"attachment; filename=thedata.csv" Content-En…
tagged with: javascript
has comment: http://stackoverflow.com/comment/42072223

http://stackoverflow.com/comment/42208400
has text: When you say "pass data from iframe to php", you mean from iframe to it's parent frame or another php script ?
comment on: http://stackoverflow.com/q/26819028
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26748995
has body: I have html with 2 ... elements inside a span with class spanClass. Now i am trying to select those selects with jQuery with this code: jQuery(document).ready(function() { spans = jQuery('.spanClass'); spans.each(function() { var inputs = jQuery(this).find('select'); console.log(inputs);// This is working inputs.each(function() { alert('test'); //This not }); }); }); HTML: test test However, this is not working, can anybody tell me why?
has answer: http://stackoverflow.com/a/26749309
type: Question
has comment: http://stackoverflow.com/comment/42082468
has comment: http://stackoverflow.com/comment/42082400
tagged with: javascript
has title: jquery find function not working
score: 0
answer count: 2
tagged with: find
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26749309
has comment: http://stackoverflow.com/comment/42082694
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26749184
has answer: http://stackoverflow.com/a/26749184

http://stackoverflow.com/comment/42091345
score: 0
comment on: http://stackoverflow.com/q/26753768
has text: You need to install parser module like body-parser(https://github.com/expressjs/body-parser). Also to make your development easier please install node-inspector to debug the node server.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26813919
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: https
has body: I'm trying to eliminate non-secure content errors on a site when it's using HTTPS. I have one link that is actually a hidden form POSTing a specific search to a different HTTP website - they don't have HTTPS enabled. This form submission does not contain any sensitive data, it's just a static search query, but it's causing the insecure content error when loading my site in HTTPS. Switching the form to HTTPS breaks it. Any ideas how I can work around this? The best I can come up with a standard on-site link to a page that forces HTTP and putting the hidden form on there, but I'd rather not put the user through the extra click if it can be helped.
type: AnsweredQuestion
tagged with: forms
type: Question
has title: POST a cross domain HTTP form from HTTPS page
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26814510
accepted answer: http://stackoverflow.com/a/26814510
tagged with: security

http://stackoverflow.com/comment/42050641
type: Comment
type: QuestionComment
has text: @ShreerajKarki Your header and footer are working fine only prob is with the JS and CSS, try giving `../` before passing the string in `href`
score: 0
comment on: http://stackoverflow.com/q/26730663

http://stackoverflow.com/comment/41981796
type: AnswerComment
score: 0
type: Comment
has text: Hi Scott, what I need is for the script to work with that has an Iframe Src and not a Data-src. I could explain better? With the modification that you say, well read the Iframe, but read the entire contents of the tabs to load the page, I read only the active tab and the other one by clicking. Thank you very much for your help.
comment on: http://stackoverflow.com/a/26691621

http://stackoverflow.com/comment/42091506
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26754262
has text: Isn't the error message descriptive enough by itself?
type: Comment

http://stackoverflow.com/q/26817882
type: Question
score: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26819023
tagged with: angularjs
has body: I've created 2 directive one for displaying box(confirmedBox directive) and one for showing that box (confirmingBox). Inside link function of confirmingBox, I've created confirmedBox by compiling with parent scope is confirmingBox. However, when click on "Show box" button, it log isDisplay undefined, which means I can't do 2 way binding for variable isDisplay from the parent to child directives. I don't know why it've not worked? Code live: http://plnkr.co/edit/SHH1JEtGJxibyem25kfd?p=preview Code javascript: angular.module('AppA2_Task',[]) .directive('confirmedClick', function ($compile, $rootScope) { return { restrict: 'A', link: function (scope, element, attrs) { scope.displayBox = true; element.on('click', function () { element.attr('disabled', 'disabled'); var boxScope = $rootScope.$new(true, scope); var boxElem = $compile(' ')(boxScope); element.append(boxElem); scope.$apply(function () { scope.displayBox = true; }); }); } } }) .directive('confirmingBox', function () { return { //require: '^confirmedClick', restrict: 'A', template: " I am a box ", scope: { isDisplayed: '=' }, link : function(scope){ console.log('isDisplayed',scope.isDisplayed); } } }) .controller('MainController', function () { }); Code html Show box
type: AnsweredQuestion
has title: Compiled child directive is appended to parent but can't access parent scope?
has answer: http://stackoverflow.com/a/26819023

http://stackoverflow.com/comment/42064752
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26738256
has text: No, I change it, and now My server listens to 443. Still it gives me this error..

http://stackoverflow.com/a/26734576
answers question: http://stackoverflow.com/q/26733199
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/42059703
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26733199
has body: Twitter bootstrap uses modal for different media sizes with 600px width check that images fit in 600px width also you can add twitter-bootstrap slideshow "carousel" in each cearosal.

http://stackoverflow.com/comment/42098498
has text: With this in mind, I put a breakpoint in requirejs on the load fonction to try to understand what require do when loadind as url. The load function is the place where it add the script node to the document header. When I look this script node, in the first case, the textContent, text, innerHTML or outerHTML are empty and I can't see my script. In the second example when I look to this node, I can see my script in the src attribute... I think for this case it's because require try tu use the var containing the script like an url or a source path...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26754411

http://stackoverflow.com/q/26722662
answer count: 1
favorite count: 0
has title: How do I use innerHTML Property in function?
has comment: http://stackoverflow.com/comment/42035446
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26723146
has comment: http://stackoverflow.com/comment/42034999
has body: I am trying to use innerHTML Property as value. I have created a shopping cart , but I having trouble using the innerHTML Property (which is the total value ) in another function. I am using a range calcuator to multiply the total value to get a monthly rate. Check the CodePen I am using this property (which is my price total) (creating the var rangecalculator seems to be the problem. How do you use innerhtml in functions ? var rangecalculator = document.getElementById('grandtotal').innerHTML = (((salesTotal-discount12) * (0.13)) + (salesTotal-discount12)).toFixed(2); In this range calculator. var priceRange = [ 100, 250, 1000, 2500, 5000 ]; var priceValue = [ 0.23, 0.12, 0.20, 0.19, 0.19 ]; for(range in priceRange) if (rangecalculator &gt;= priceRange[range]) rateValue = priceValue[range]; document.getElementById("monthlyrate").innerHTML= rateValue * rangecalulator; I get NAN and undefined. It only works when I set(a number) var rangecalculator = 100. Thanks for any help
has comment: http://stackoverflow.com/comment/42035079
type: UnansweredQuestion
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42035081
has comment: http://stackoverflow.com/comment/42035409
has comment: http://stackoverflow.com/comment/42035472
tagged with: javascript
score: -1
tagged with: dom
upvote count: 0

http://stackoverflow.com/comment/116562002
type: AnswerComment
has text: false, there are two event listeners 'ontransitionend' and 'onanimationend' you can add an event for and then fire your focus() function.
type: Comment
comment on: http://stackoverflow.com/a/40933621
score: 3

http://stackoverflow.com/a/26766150
upvote count: 125
has comment: http://stackoverflow.com/comment/81405734
type: Answer
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26691543
has body: I'm not completely clear on what you mean by "returning a field", but you can use a lean() query so that you can freely modify the output, then populate both fields and post-process the result to only keep the field you want: .lean().populate('user', 'email.address facebook.address') .exec(function (err, subscription){ if (subscription.user.email.address) { delete subscription.user.facebook; } else { delete subscription.user.email; } });
accepted answer of: http://stackoverflow.com/q/26691543
has comment: http://stackoverflow.com/comment/104130122
score: 125

http://stackoverflow.com/q/26739795
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
type: Question
score: 3
has body: This is the code: $.ajax({ type: "POST", url: url, xhr: function(e) { //Download progress xhr.addEventListener("progress", function(evt){ console.log(evt.lengthComputable); if (evt.lengthComputable) { var percentComplete = evt.loaded / evt.total; //Do something with download progress console.log(percentComplete); } }); return xhr; }, dataType: "json", success: function(data){ } }); This is the function I use to retrieve my view from Codeigniter. I want to show a progress bar in the meantime while the page is loading. However when I put the XHR in the AJAX funtion everything stops working. Does anyone have an idea how can I make it run with a progress bar. Thanks in Advance.
has answer: http://stackoverflow.com/a/26740085
upvote count: 3
tagged with: codeigniter
answer count: 1
has title: Progress Bar on PushState
accepted answer: http://stackoverflow.com/a/26740085
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/26792948
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/42161209
tagged with: javascript
has title: Javascript, Finding largest number sequence in a String
has comment: http://stackoverflow.com/comment/42161284
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26793129
downvote count: 0
score: 1
favorite count: 0
tagged with: parsefloat
type: Question
has body: In Javascript, I'm trying to make a function which will find the longest number in a string and convert it to a floating point value. However, when I input something like ff333sds22442, it will output "333" as the longest number when it should output 22442. &lt;input type="text" id="numberInput"&gt;&lt;/input&gt; &lt;button onclick="findNumber()"&gt; Find Number &lt;/button&gt; &lt;button onclick="makeSubstring()"&gt; Make Substring &lt;/button&gt; &lt;p id="number"&gt;&lt;/p&gt; &lt;script&gt; function findNumber() { var input = document.getElementById("numberInput").value; var longest = ""; var result = ""; var inputSub = ""; for (var i = 0; i &lt; input.length; i++) { for (var j = i + 1; j &lt; input.length; j++) { inputSub = input.substring(i, j + 1); if (!isNaN(parseFloat(inputSub)) &amp;&amp; inputSub.length &gt; longest.length){ longest = inputSub; result = inputSub; } } } result = parseFloat(result); document.getElementById("number").innerHTML = result; } I'm not sure why it's doing this, I was hoping someone could explain it to me.
has answer: http://stackoverflow.com/a/26793129

http://stackoverflow.com/q/26801781
upvote count: 2
tagged with: security
accepted answer: http://stackoverflow.com/a/26802114
has comment: http://stackoverflow.com/comment/42210635
tagged with: swig-template
has title: Protecting raw JSON data from being copied
has comment: http://stackoverflow.com/comment/42177675
possible better answer: http://stackoverflow.com/a/26802082
has answer: http://stackoverflow.com/a/26802228
has comment: http://stackoverflow.com/comment/42281994
favorite count: 0
has answer: http://stackoverflow.com/a/26802114
has comment: http://stackoverflow.com/comment/42291919
has comment: http://stackoverflow.com/comment/42177606
has body: I'm creating an application with Node.js and Mongo DB, rendering the views with Swig. I have a database of business names, addresses and geo location data that is being plotted onto a Google map with pins. I'd like to stop users from easily copying the raw JSON data using view source, Firebug, Chrome Dev tools etc. I'm not after bank grade security, just want to make it hard enough for most users to give up. I have two routes of delivering the JSON package to the browser: 1) Using Swig, passing the JSON package directly to the view. Problem is that a simple view source will show the JSON. 2) Requesting the data with an AJAX call. In this scenario the data is easily accessible with Chrome Dev tools. What are my options?
linked to: http://stackoverflow.com/q/15029238
has comment: http://stackoverflow.com/comment/42282023
tagged with: node.js
answer count: 4
score: 2
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/42178255
has answer: http://stackoverflow.com/a/26802082
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42181694
has comment: http://stackoverflow.com/comment/42177218
type: Question
has answer: http://stackoverflow.com/a/48424008
tagged with: javascript
linked to: http://stackoverflow.com/q/228038

http://stackoverflow.com/comment/42023407
type: QuestionComment
comment on: http://stackoverflow.com/q/26712593
has text: Anyone else thought someone was trying to make a webpage work in the Mosiac browser? :-)
score: 1
type: Comment

http://stackoverflow.com/a/26708083
has body: For Content-Type: multipart/form-data we should use FileItem methods getFieldName() getString() to get regular form fields data. Here I'm providing more details from docs with the snippets, to read all form fields data in Servelet using ServletFileUpload Give a look into apache-docs for Processing the uploaded items See below code-snip for understanding on this processing: Handling uploaded Form elements content both regular fields and files // Process the uploaded items Iterator&lt;FileItem&gt; iter = items.iterator(); while (iter.hasNext()) { FileItem item = iter.next(); if (item.isFormField()) { processFormField(item); } else { processUploadedFile(item); } } Process a regular form field // processFormField if (item.isFormField()) { String name = item.getFieldName(); String value = item.getString(); ... } Process a file upload // processUploadedFile if (!item.isFormField()) { String fieldName = item.getFieldName(); String fileName = item.getName(); String contentType = item.getContentType(); boolean isInMemory = item.isInMemory(); long sizeInBytes = item.getSize(); ... } Please proceed rest of the code in http://commons.apache.org/proper/commons-fileupload/using.html
accepted answer of: http://stackoverflow.com/q/26707222
type: Answer
answers question: http://stackoverflow.com/q/26707222
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26810564
has comment: http://stackoverflow.com/comment/42196543
has body: Try something like this. (I know it's not exactly right, but might give you an idea. I will try to edit later.) function processXML(data) { var xml = data.responseXML; var markers = xml.documentElement.getElementsByTagName("marker"); //clear markers before you start drawing new ones resetMarkers(markersArray); for (var i = 0; i &lt; markers.length; i++) { var idp = markers[i].getAttribute("idp"); var polys = markers[i].getAttribute("polys"); var genpolys = []; var json = JSON.parse('{"polys":['+polys+']}'); for(var coord in json.polys){ genpolys[coord] = new google.maps.LatLng(json.polys[coord][0],json.polys[coord][1]); } var flightPath = new google.maps.Polyline({ path: genpolys, geodesic: true, strokeColor: '#FF0000', strokeOpacity: 1.0, strokeWeight: 2, map: map }); markersArray.push(marker); } setTimeout(function() { downloadUrl("echo.php", processXML); }, 19000); } I hope this helps you figure it out. I adapted the answer from this page: how to draw polylines on google maps dynamically
has comment: http://stackoverflow.com/comment/42196141
has comment: http://stackoverflow.com/comment/42194517
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26808424
answers question: http://stackoverflow.com/q/26808424
type: Answer
has comment: http://stackoverflow.com/comment/42194760
has comment: http://stackoverflow.com/comment/42195738
upvote count: 3
has comment: http://stackoverflow.com/comment/42197268
score: 3

http://stackoverflow.com/comment/42032222
type: Comment
has text: I see, thanks! The reason I'm asking is because I intend to use a jquery.backstretch.min.js file in my rails app, so I would have to add //= require jquery.backstretch.min.js to my application.js right?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26721013

http://stackoverflow.com/a/26707529
has comment: http://stackoverflow.com/comment/42007656
score: 0
has body: You can do it in the browser with Javascript. You can catch the change event with a listener on the upload button, then use in the callback the FileReader api (https://developer.mozilla.org/en-US/docs/Web/API/FileReader). No need to send the file to your python server. HTML: &lt;input type="file" id="upload" /&gt; Javascript: var readCSV = function (event) { var reader = new FileReader(); reader.onload = (function(theFile) { var lines = theFile.target.result.split(/\n|\r/); //code here } } document.getElementById("upload").addEventListener('change', readCSV);
accepted answer of: http://stackoverflow.com/q/26707432
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42080080
answers question: http://stackoverflow.com/q/26707432
has comment: http://stackoverflow.com/comment/42007952
type: Answer

http://stackoverflow.com/q/26744061
type: Question
answer count: 2
tagged with: ios8
has body: How can I change the permissions for my PhoneGap application? I want the app to access the user's GPS. But do not really know how I do it when I use the build.phonegap.com me to retrieve the app. The app never asks for permission to use my location. Instead, I put on it manually but still I get the error code "Permission denied". iPhone 5s IOS8, org.apache.cordova.geolocation 0.3.10, Phonegap 3.5 document.addEventListener("deviceready", onDeviceReadyGeo, false); function onDeviceReadyGeo() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(success, onError, {timeout:10000}); } else { error('Geo Location is not supported'); } }
has answer: http://stackoverflow.com/a/27272076
tagged with: javascript
score: 0
tagged with: cordova
has title: Phonegap GPS permissions
has answer: http://stackoverflow.com/a/29502373
type: UnansweredQuestion
tagged with: geolocation

http://stackoverflow.com/q/26794979
type: Question
has answer: http://stackoverflow.com/a/26797860
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26797860
tagged with: ckeditor
upvote count: 2
answer count: 1
favorite count: 0
has title: Where is the ckeditor toolbar configurator?
has body: I have a newly installed current instance of ckeditor. The docs say, "The new toolbar utility, which you can find in your CKEditor distribution package, makes configuring an accessible toolbar a breeze. It is the most recommended way to set up the editor toolbar." Where can I find this new toolbar utility? I don't see it anywhere. Barring that, is there some more detailed documentation on what all the toolbar button settings are? I downloaded the "standard" set. In the config.js file in the toolbar settings it says there should be a "colors" item, but I don't see it. Thanks, doug
score: 2
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/a/33808913
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26781535
has body: Internet Explorer 8 and 9 use the XDomainRequest API to perform cross-domain requests. According to IE9 jQuery AJAX with CORS returns "Access is denied", which links to this jQuery feature request, the jQuery development team has affirmatively refused to support XDomainRequest, because it has too many shortcomings and inconsistencies when compared to XMLHttpRequest. That answer also links to a plugin that allows the use of XDR in jQuery. Note that it will still be subject to the built-in limitations of XDR, so it may not solve your problem even if you can use the plugin to get jQuery to use the XDR API.
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/41971268
type: QuestionComment
has text: Try this tool instead:http://phantomjs.org/screen-capture.html
comment on: http://stackoverflow.com/q/26686435
score: 0
type: Comment

http://stackoverflow.com/q/26721936
has comment: http://stackoverflow.com/comment/42034295
has comment: http://stackoverflow.com/comment/42034411
score: 1
tagged with: java
has comment: http://stackoverflow.com/comment/42033813
has comment: http://stackoverflow.com/comment/42043835
has title: Am trying to get chartin web page according to the graph value. but
has comment: http://stackoverflow.com/comment/42034105
type: Question
has comment: http://stackoverflow.com/comment/42034612
tagged with: javascript
has comment: http://stackoverflow.com/comment/42034913
has answer: http://stackoverflow.com/a/27699432
accepted answer: http://stackoverflow.com/a/27699432
has comment: http://stackoverflow.com/comment/42033714
upvote count: 1
has comment: http://stackoverflow.com/comment/42034531
answer count: 1
has comment: http://stackoverflow.com/comment/42033977
downvote count: 0
tagged with: jsp
favorite count: 0
has comment: http://stackoverflow.com/comment/42035110
has comment: http://stackoverflow.com/comment/42034695
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42034390
tagged with: spring-mvc
type: AnsweredQuestion
has body: &lt;script type="text/javascript"&gt; $(document).ready(function (){ myFunc(); }); function myFunc(){ if (document.getElementById('graph').value=10){ var chartData = [{"category":"Payment Details", "value1":10, "value2":90}]; var chart = AmCharts.makeChart("chartdiv", { "theme": "light", "type": "serial", "depth3D":100, "angle":30, "autoMargins":false, "marginBottom":100, "marginLeft":350, "marginRight":300, "pathToImages": "images/", "dataProvider": chartData, "valueAxes": [{ "stackType": "100%", "gridAlpha": 0 }], "graphs": [{ "type":"column", "topRadius":1, "columnWidth":1, "showOnAxis":true, "lineThickness": 2, "lineAlpha": 0.5, "lineColor": "#FFFFFF", "fillColors": "#8d003b", "fillAlphas": 0.8, "valueField": "value1" },{ "type":"column", "topRadius":1, "columnWidth":1, "showOnAxis":true, "lineThickness": 2, "lineAlpha": 0.5, "lineColor": "#cdcdcd", "fillColors": "#cdcdcd", "fillAlphas": 0.5, "valueField": "value2" }], "categoryField": "category", "categoryAxis": { "axisAlpha": 0, "labelOffset":40, "gridAlpha":0 } });} else if (document.getElementById('graph').value=20){ var chartData = [{"category":"Payment Details", "value1":20, "value2":80}]; var chart = AmCharts.makeChart("chartdiv", { "theme": "light", "type": "serial", "depth3D":100, "angle":30, "autoMargins":false, "marginBottom":100, "marginLeft":350, "marginRight":300, "pathToImages": "images/", "dataProvider": chartData, "valueAxes": [{ "stackType": "100%", "gridAlpha": 0 }], "graphs": [{ "type":"column", "topRadius":1, "columnWidth":1, "showOnAxis":true, "lineThickness": 2, "lineAlpha": 0.5, "lineColor": "#FFFFFF", "fillColors": "#8d003b", "fillAlphas": 0.8, "valueField": "value1" },{ "type":"column", "topRadius":1, "columnWidth":1, "showOnAxis":true, "lineThickness": 2, "lineAlpha": 0.5, "lineColor": "#cdcdcd", "fillColors": "#cdcdcd", "fillAlphas": 0.5, "valueField": "value2" }], "categoryField": "category", "categoryAxis": { "axisAlpha": 0, "labelOffset":40, "gridAlpha":0 } }); } &lt;/script&gt; &l…

http://stackoverflow.com/a/26727826
has body: You have to pass a variable from views.py a = True when you need to display the form, and do the if condition in template, {% if a %} ................ {% endif %}
score: 1
has comment: http://stackoverflow.com/comment/42044783
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26727770
answers question: http://stackoverflow.com/q/26727770
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42047879
comment on: http://stackoverflow.com/a/26729599
has text: @nightin_gale What I was suggesting was to use `HtmlUtils.htmlEscape` to escape the string before using it as in your question
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/42132510
type: Comment
comment on: http://stackoverflow.com/a/26755330
has text: Thank you :). That solved my problem. I know how to yse $promise and resolve but I can't understand the concept of $q and defer(). etc. Could you suggest a tutorial. Official documentation doesn't help.
type: AnswerComment
score: 0

http://stackoverflow.com/q/26735050
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Cannot destroy() using "Yet Another DataTables Column Filter" plugin
favorite count: 0
has body: I'm using DataTables and YADCF to filter a table. At some point, I need to temporarily unbind both plugins from my table and later bind them again. If I don't use YADCF, I can destroy the datatable and initialise it again. However, when I use YADCF, the filter part of the table isn't destroyed. HTML: Create | Destroy Head 1 Head 2 Head 3 12 13 14 12 13 14 152 13 154 1762 1873 1874 124 1343 1124 JS without YADCF JSFIDDLE: var oTable = $('table'); $('#create').click(function (e) { e.preventDefault(); oTable.dataTable({ "bJQueryUI": true, "bStateSave": true, "bPaginate": false, "bAutoWidth": false, }); }); $('#destroy').click(function (e) { e.preventDefault(); oTable.fnDestroy(); oTable.attr('class', ''); }); JS with YADCF JSFIDDLE: var oTable = $('table'); $('#create').click(function (e) { e.preventDefault(); oTable.dataTable({ "bJQueryUI": true, "bStateSave": true, "bPaginate": false, "bAutoWidth": false, }); // Add YADCF oTable.yadcf([{ column_number: 1, filter_type: 'range_number', ignore_char: 'm' }, { column_number: 2, filter_type: 'text', filter_default_label: ' ' }, ]); }); $('#destroy').click(function (e) { e.preventDefault(); oTable.fnDestroy(); oTable.attr('class', ''); }); Can anyone suggest how to destroy the YADCF filter too?
tagged with: yadcf
tagged with: datatables
type: AnsweredQuestion
upvote count: 3
possible better answer: http://stackoverflow.com/a/26736646
type: Question
has answer: http://stackoverflow.com/a/29763559
score: 3
has answer: http://stackoverflow.com/a/26736646
accepted answer: http://stackoverflow.com/a/29763559

http://stackoverflow.com/q/26805160
has comment: http://stackoverflow.com/comment/42183925
tagged with: aspxgridview
has comment: http://stackoverflow.com/comment/42184350
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26806112
has body: I need to click a button that is inside a gridview from the codebehind. I think the best approach will be to create a javascript function in codebehind, something like the second solution i tried below. I will appreciate any help protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Accepted") { int index = Convert.ToInt32(e.CommandArgument); GridViewRow row = GridView1.Rows[index]; //find button Button btnEsc = (Button)row.FindControl("btnEsc"); //here I would like to simulate a click on this button, so far no luck btnEsc.Click(); // this is wrong } } I also try this but it doesn't find the button: I dont know how to find the button inside the gridview System.Text.StringBuilder sbScript = new System.Text.StringBuilder(""); sbScript.Append("document.getElementById('btnEsc').click();"); ScriptManager.RegisterStartupScript(this, GetType(), "ClientScript", sbScript.ToString(), true);
has answer: http://stackoverflow.com/a/26806090
accepted answer: http://stackoverflow.com/a/26806090
has comment: http://stackoverflow.com/comment/42184699
tagged with: asp.net
has comment: http://stackoverflow.com/comment/42184642
has comment: http://stackoverflow.com/comment/42185891
has comment: http://stackoverflow.com/comment/42184543
has comment: http://stackoverflow.com/comment/42183977
has comment: http://stackoverflow.com/comment/42184775
has comment: http://stackoverflow.com/comment/42184106
has title: Find Button inside a Gridview and click it from codebehind(c#)
possible better answer: http://stackoverflow.com/a/26806112
has comment: http://stackoverflow.com/comment/42185583
type: Question
type: AnsweredQuestion
tagged with: c#
has comment: http://stackoverflow.com/comment/42188175
has comment: http://stackoverflow.com/comment/42185029
has comment: http://stackoverflow.com/comment/42185676
linked to: http://stackoverflow.com/q/5731224
tagged with: javascript

http://stackoverflow.com/a/26799815
has body: change $scope.vendor_dtls = $firebase(ref); to $scope.vendor_dtls = $firebase(ref).$asArray(); and ref.on("child_added", function(snapshot) { $scope.vendor_dtls = snapshot.val(); console.log($scope.vendor_dtls); }); to ref.on("child_added", function(snapshot) { var vendor_dtl = snapshot.val(); console.log(vendor_dtl); $scope.vendor_dtls.push(vendor_dtl); });
has comment: http://stackoverflow.com/comment/42177259
type: Answer
has comment: http://stackoverflow.com/comment/42177116
has comment: http://stackoverflow.com/comment/42173614
answers question: http://stackoverflow.com/q/26796799
has comment: http://stackoverflow.com/comment/42174023
score: 0

http://stackoverflow.com/q/26740806
has title: .load page within linked javascript and css files
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42087003
tagged with: load
type: UnansweredQuestion
tagged with: css
answer count: 0
has comment: http://stackoverflow.com/comment/42067631
type: Question
has body: Description: I have a main page with header, footer, etc. The content (a div within body) of this page is changing depending on where you click(menu items). The content loaded are different pages within javascript and css files. Problem: javascript and css files of the pages loaded don't work. I have to include ALL the page in order to make it works. For example in the next code, javascript included in status.jsp don't work: $(document).ready(initialize); function initialize(){ // status.jsp has javascript and css linked $("#content").load("pages/status.jsp #information"); } However, this works, but it is not what i want: $(document).ready(initialize); function initialize(){ // status.jsp has javascript and css linked $("#content").load("pages/status.jsp"); } The result of the last code is a page similar to this: MainPage Status information
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/42097675
score: 0
type: AnswerComment
type: Comment
has text: Sorry, needs to go up two paths, one to `Comments`, the n to `Posts`. See http://jsfiddle.net/pj6myzch/4/. Fixed example.
comment on: http://stackoverflow.com/a/26735080

http://stackoverflow.com/a/26787020
answers question: http://stackoverflow.com/q/26786820
has body: Try this $(function(){ $('td').on('click', function(){ var a = $(this).html(); var b = a.split(" "); $.post('url.php', { a1 : b[0], a2 : b[1] }, function(data) { //do something }); }); });
has comment: http://stackoverflow.com/comment/42151141
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42151376

http://stackoverflow.com/a/26846146
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42265809
has comment: http://stackoverflow.com/comment/42259188
has comment: http://stackoverflow.com/comment/42369565
upvote count: 8
type: Answer
accepted answer of: http://stackoverflow.com/q/26764045
has comment: http://stackoverflow.com/comment/42367372
has body: I encountered the same problem on a little web application : it which was a scratch game, where the player had to swipe the finger all over the "scratchable" zone to discover what he had won. The game was supposed to run on Windows 8.1 tablets, with IE10 on it. We put in the css this snippet : *{ touch-action: none; } The result is to completely deactivate any touch events on the app (including the swipe backward / forward). But we had to reactivate the touch event only on the scratch zone, to allow the player to play :) For this we had to add this : #playzone{ touch-action: chained; } The app still works perfectly, both on IE10 on tablets but also on Windows Phone 8.1. (please forgive my English, it's not my mother tongue) EDIT : After having tested more on IE, it seems that adding the touch-action:none; on the html element is enough to achieve what the OP wanted.
has comment: http://stackoverflow.com/comment/42369744
score: 7
has comment: http://stackoverflow.com/comment/42256802
downvote count: 1
has comment: http://stackoverflow.com/comment/42264327
has comment: http://stackoverflow.com/comment/57625376
answers question: http://stackoverflow.com/q/26764045
has comment: http://stackoverflow.com/comment/42255752

http://stackoverflow.com/a/26796355
downvote count: 0
answers question: http://stackoverflow.com/q/26796084
upvote count: 3
has body: If you just need to replace specific substring urlpart2 you can go with simple replace method: var urlPath = window.location.href; var newUrlPath = urlPath.replace('urlpart2', 'urlpart3');
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26796084
score: 3

http://stackoverflow.com/q/26794518
tagged with: internet-explorer-11
has answer: http://stackoverflow.com/a/26810364
has title: ActiveX not working in IE 11
has body: I'm currently developing a web based scanning application. I am using twainDotNet to get and fire scanner events. The process is done through an ActiveX control. My ActiveX control works well in IE 10 for Windows 8, but it is not working for IE 11 on Windows 8.1, but it shows on the ManageAddOn section of IE Please help me to solve this problem, if anything is not clear in my description please add a comment.
type: Question
tagged with: c#
tagged with: activexobject
answer count: 1
tagged with: javascript
score: 0
tagged with: asp.net
type: UnansweredQuestion

http://stackoverflow.com/comment/42163463
type: QuestionComment
has text: I don't understand. They appear to both filter for me. JS Bin quibbled about some semi-colons, here is DIFOT http://jsbin.com/reyecutaqi/1/edit and Savings http://jsbin.com/nodibaraji/1/edit
comment on: http://stackoverflow.com/q/26747667
score: 0
type: Comment

http://stackoverflow.com/a/39073551
accepted answer of: http://stackoverflow.com/q/26820134
upvote count: 1
type: AcceptedAnswer
has body: You need to use the body-parser middleware in Express. If you use the express-generator, the code to include body-parser will be automatically generated. Example var bodyParser = require('body-parser'); and app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); Having the above ready in your "app.js" file, you need to specify route handling for your routes folder. You have to make sure that the routes "register" and "registeration_complete" are available at the local server. For this make sure you have these lines in "app.js" to set them up: var register = require('./routes/register'); var registeration_complete = require('./routes/registeration_complete'); app.use('/register', register); app.use('/registeration_complete', registeration_complete); Consider that there is a form in a view called "register.ejs". The "register.ejs" has an input text box with name='tb_email'. Example is as shown below: Contact Contact Welcome, enter your email address. Note: In the above input tag, you should have "name". Having "id" will not show the POSTed data. The action of the form is set to "registeration_complete" so you now need to define a route handling in file named "registeration_complete.js" in your routes folder. The content of the "registeration_complete.js" should be as below: var express = require('express'); var router = express.Router(); /* GET home page. */ router.post('/', function(req, res, next) { var tb_email=req.body.tb_email; res.send('Your email address is: '+ tb_email ); }); module.exports = router; If you now access "register" url of your application and enter an email address, it should show you the entered email address using the above "res.send" method in "registeration_complete.js" file. Now that you are sure that the post value is available in the route, use "res.render" in the ""registeration_complete.js" file instead of the above "res.send" which was setup for testing purpose. You need to pass the variables in the render funct…
has comment: http://stackoverflow.com/comment/65497915
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/65550774
answers question: http://stackoverflow.com/q/26820134
score: 1

http://stackoverflow.com/q/26799376
possible better answer: http://stackoverflow.com/a/26799440
has answer: http://stackoverflow.com/a/26799440
has body: I have this custom Jquery Plugin just to append text in input Say what? and this is from my plugin $.fn.AppendMe = function(strToAppnd) { var newTxt = this.val() + strToAppnd; this.val(newTxt); function GetData() { return newTxt; } } $(document).ready(function(){ var finalForm = $('#txtName').AppendMe('Enteng'); $('#btnGetData').click(function(e) { e.preventDefault(); var result = finalForm.GetData(); alert(result); }); }); and i want to get the result. How to put public method from instantiated plugin? i want to alert the result when i click a button Click here for fiddle
has answer: http://stackoverflow.com/a/26799600
accepted answer: http://stackoverflow.com/a/26799600
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26799459
tagged with: javascript
tagged with: jquery
has title: Get data in custom Jquery Plugin
has answer: http://stackoverflow.com/a/26799552
tagged with: jquery-plugins
score: 0
answer count: 4

http://stackoverflow.com/comment/42106335
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26762355
type: QuestionComment
has text: You could use css `::before/::after`, so you don't have to clutter the view.

http://stackoverflow.com/q/26755149
type: Question
has title: JSON Output Converting to String Without the Knowledge
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/26755301
has body: I have the following AJAX function that use to generate a JSON out put. Because of an error in the JSON WebService it generates some unnecessary XML and to remove that I have used JavaScript Regular Expressions. AJAX Function function setJsonSer() { var strWsUrl = 'https://www.googleapis.com/analytics/v3/data/ga? ids=ga%3A76546294&amp;dimensions='+ 'ga%3Asource&amp;metrics=ga%3Ausers&amp;sort=-ga%3Ausers&amp;start- date='+retStartDate()+'&amp;end-date='+retEndDate()+'&amp;max-results=10'; formData = { 'Email': 'clientlink@client.com', 'Password': 'password', 'URL': strWsUrl }; $.ajax({ url: "/APIWebService.asmx/AnalyticsDataShowWithPost", type: 'POST', data: formData, complete: function(data) { var responseText = data.responseText; var responseJson = JSON.parse(responseText.match(/[{].*.[}]/)); /*01*/ console.log("'responseJson' is " + typeof responseJson ); alert(JSON.stringify(responseJson)); //or just `responseJson` if you skip `JSON.parse`*/ /*04*/ Load(JSON.stringify(responseJson)); } }); } After removing the unnecessary characters the variable parse as a "object". It should be "object" so I haven't any doubt about that. You can see that in the line /01/. So after that responseJson has to parse to the follwoing JavaScript Function. Java Script Function function Load(responseJson){ setJsonSer(); //----------------------------------------------- Rohan var labels = new Array(); var values = new Array(); var catogories = new Array(); var arrayOfArray = new Array(); var rowData = responseJson; /*02*/console.log("'RowData' is " + typeof rowData ); var inData = responseJson; /*03*/console.log("'inData' is " + typeof rowData ); var count = 0; var headers = new Array(); /*for (var i = 0; i &lt; inData.columnHeaders.length; i++) { headers[i] = inData.columnHeaders[i].name; }*/ var dates = new Array(); var pageViews = new Array(); var uniqueViews = new Array(); /* for (var key in inData.rows) { pageViews[key] = parseInt(inData.rows[key][1]); uniqueViews[key] = parseInt(in…
has answer: http://stackoverflow.com/a/26755301
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/26755480
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/26755480

http://stackoverflow.com/comment/42082358
has text: I really wonder how some great chat systems handle this ordering issue. MSN, Whatsapp etc
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26748500

http://stackoverflow.com/q/26794446
has title: PUT and POST Request of .save() of Backbonejs model
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26814256
possible better answer: http://stackoverflow.com/a/26800413
has comment: http://stackoverflow.com/comment/42163952
type: Question
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/42180193
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42180778
score: 0
has comment: http://stackoverflow.com/comment/42181077
downvote count: 1
has answer: http://stackoverflow.com/a/26800413
tagged with: backbone.js
tagged with: model
accepted answer: http://stackoverflow.com/a/26814256
has comment: http://stackoverflow.com/comment/42180982
has comment: http://stackoverflow.com/comment/42179813
has comment: http://stackoverflow.com/comment/42173465
has body: How to be confirmed whether a backbonejs .save() is sending PUT request ?? I checked my server side, which is working good, there is no problem in server side. But my .save() is not working. Here is my model of backbone define(['underscore','backbone'],function(_,Backbone) { var my_model = Backbone.Model.extend( { urlRoot: "http://localhost/back/server_file.php/number" }); return my_model; }); Here is how I am using .save() var my_data = { id: data.id, code: data.code }; var My_model = new my_model(); My_model.save(my_data, { success: function(response) { alert('Yes'); }, error: function(response) { alert('No'); } }); I think my .save() is sending POST request to server. UPDATE I think I could find out my problem. I am describing that here. What I would like to do I would like to send 2 parameters from backbonejs model to server side script (I am using PHP SLIM Framework). Based on those 2 parameters server side script update a record's(2 field of this record match with those 2 parameters ) another field with a static parameter at database. What backbonejs provide (As I think ) Backbonejs has a model with id as JSON format. Backbonejs sends PUT request to server side script. Server side script just dump (update) the data(which was as JSON format,like a bundle) to the database with matching id. Serer side script would not like to look inside the data. I am getting (from network tab of firebug) my PUT request URL is like http://localhost/back/server_file.php/number/1 (This is the id) . On the other hand I would like to get URL is like http://localhost/back/server_file.php/number/1 (id the first parameter)/456 (Second parameter). If I am right, anyone could say how can I implement my plan??

http://stackoverflow.com/comment/42022007
type: AnswerComment
score: 0
has text: @user2690527 In what I described above, public methods would need direct access to *private* variables, without exposing a public getter and in that case I would prefer relying on a naming convention for privates rather than polluting the public interface of my object with getters I don't need.
type: Comment
comment on: http://stackoverflow.com/a/26699360

http://stackoverflow.com/comment/42035788
score: 0
type: Comment
type: QuestionComment
has text: @EdHeal if you follow the link you'll see I was joking
comment on: http://stackoverflow.com/q/26722492

http://stackoverflow.com/q/26773694
type: Question
has comment: http://stackoverflow.com/comment/42127098
has answer: http://stackoverflow.com/a/26773808
tagged with: c#
has comment: http://stackoverflow.com/comment/42127356
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42126629
has comment: http://stackoverflow.com/comment/42127144
tagged with: ajax
has answer: http://stackoverflow.com/a/26774002
has comment: http://stackoverflow.com/comment/42127188
has comment: http://stackoverflow.com/comment/42127634
has body: Before 3 days the code was working fine. But now its not. please point out my mistake as i am new to JQuery. I debugged it, and found out that debugger is not entering inside success method of ajax. and not even going to CS file. Code of Jquery- &lt;script type="text/javascript"&gt; $(document).ready(function () { $('#btnSubmit').click(function () { alert('b'); $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "admin.aspx/LogIn", dataType: "json", data: "{'name':'" + $('#txtfn').val() + "','password':'" +$('#txtln').val() + "'}", success: function (data) { alert(data); var obj = data.d; alert(obj); alert(data.d); if (obj == 'true') { $('#txtfn').val(''); $('#txtln').val(''); alert("dasdsad"); window.location = "home.aspx"; alert("success"); } else if (obj == 'false') { alert("errorrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr"); } }, error: function (result) { alert(data); alert("aaaaaaafgdgfdfgsfgfhffghgfhgfhfghfghfhfghfhfghgfhgfhgfhgfhfghfghgfhgfhgf"); alert(result); } }); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &amp;nbsp;&lt;div id="login"&gt; &lt;div id="triangle"&gt;&lt;/div&gt; &lt;h1&gt;Log in&lt;/h1&gt; &lt;form id="f1" runat="server"&gt; &lt;input type="text" id="txtfn" placeholder="name" /&gt; &lt;input type="text" id="txtln" placeholder="Password" /&gt; &lt;input type="submit" id="btnSubmit" value="Log in" /&gt; &lt;/form&gt; &lt;/div&gt; &lt;/body&gt; Code- [WebMethod] public static string LogIn(string name, string password) { string retMessage = string.Empty; string constr = ConfigurationManager.ConnectionStrings["oltest_conString"].ConnectionString; using (SqlConnection con = new SqlConnection(constr)) { string Query = "select * from profile where name=@pname and password=@pwd"; using (SqlCommand cmd = new SqlCommand(Query, con)) { cmd.Parameters.AddWithValue("@pname", name); cmd.Parameters.AddWithValue("@pwd", password); con.Open(); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { //retMessage = "home.aspx"; retMessage = …
downvote count: 0
has comment: http://stackoverflow.com/comment/42131167
score: 1
has answer: http://stackoverflow.com/a/26773980
has answer: http://stackoverflow.com/a/26775136
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/42128801
has comment: http://stackoverflow.com/comment/42126587
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26774240
has title: LogIn Page Using JQuery
upvote count: 1
has comment: http://stackoverflow.com/comment/42128648

http://stackoverflow.com/comment/42029807
score: 1
has text: @progsource you mean `$_FILES` right? because `$_POST` doesn't populate with uploaded files.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26719750

http://stackoverflow.com/comment/42065344
type: AnswerComment
type: Comment
has text: if you want to get the whole div's html, try: var calendar = $('#calendar').get(0);
comment on: http://stackoverflow.com/a/26739539
score: 0

http://stackoverflow.com/comment/42074136
type: QuestionComment
has text: `setTimeout` doesn't pause the current execution flow. It only sets up a new execution flow to run when the JS engine is free again. If you want a delayed continuation, the continuation must go *in* the `setTimeout` callback.
score: 3
comment on: http://stackoverflow.com/q/26744175
type: Comment

http://stackoverflow.com/comment/42185034
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26805955
has text: Hi you already got solution ,before asking question??
score: 0

http://stackoverflow.com/a/26795052
has body: Because your return statements aren't turned as the result of your is_checker_true. When you're within a closure ( i.e, $.when(object).done(function(me) { ), what you return there is not directly returned within the outter-scope method (is_checker_true()). try putting your alerts within the if (!me.check) { check instead and it should work as expected. function checker() { return $.ajax({ type: 'POST', url: '/test/check' }); } function is_checker_true(object) { $.when(object).done(function(me) { if (!me.check) { alert( '!me.check' ); } else { alert('Boing!'); } }); } var checker_var = checker(); is_checker_true( checker_var ); alert('Hello!');
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26794983
downvote count: 0
type: Answer

http://stackoverflow.com/a/48495487
score: 4
answers question: http://stackoverflow.com/q/26733653
type: Answer
has body: You can use the AddThis service to embed a range of share buttons, including WeChat. It doesn't seem to support opening the WeChat app with a pre-populated message (like when sharing to Twitter/Facebook) - probably because the WeChat app doesn't support this - but works around it in two ways: On Desktop: clicking the share button displays a QR code which the user can scan using their mobile device On Mobile: tapping the share button displays a share URL, a button to easily copy the URL, and another button to open the WeChat app. The user needs to still perform a couple of steps manually, but it's about the easiest it's gonna get. Hope that helps.
upvote count: 4
downvote count: 0

http://stackoverflow.com/q/26730923
type: Question
tagged with: underscore.js
score: 0
has answer: http://stackoverflow.com/a/26731461
has title: Create a safe reference object technique used in Underscore
answer count: 1
tagged with: javascript
has body: When I go through the code in Underscore : http://underscorejs.org/docs/underscore.html I came across var _ = function(obj) { if (obj instanceof _) return obj; if (!(this instanceof _)) return new _(obj); this._wrapped = obj; }; with comment Create a safe reference to the Underscore object for use below. I don't really understand the purpose. Instead of having (function() { var _ = function(obj) { if (obj instanceof _) return obj; if (!(this instanceof _)) return new _(obj); this._wrapped = obj; }; _.VERSION = '1.7.0'; })(); Why can't we just simply have (function() { var _ = {}; _.VERSION = '1.7.0'; })(); May I know why idea behind technique used by Underscore project?
accepted answer: http://stackoverflow.com/a/26731461
type: AnsweredQuestion

http://stackoverflow.com/a/27069765
answers question: http://stackoverflow.com/q/26781747
type: AcceptedAnswer
has body: I realized that my solution is not so flexible. And after all I decided to use Marionette. What really helped me to solve my problem is this question. p.s: Marionette has now a hasView method in Region class.
accepted answer of: http://stackoverflow.com/q/26781747
type: Answer
score: 0

http://stackoverflow.com/comment/42033709
type: Comment
score: 0
type: AnswerComment
has text: @user3323647 you should check **my** jsFiddle example and the options I've used in the left panel.
comment on: http://stackoverflow.com/a/26721834

http://stackoverflow.com/comment/42080220
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26747504
type: AnswerComment
has text: It was supposed to say 'friends'. I renamed the variable and missed that one. My bad.

http://stackoverflow.com/comment/42175801
comment on: http://stackoverflow.com/q/26796538
type: QuestionComment
score: 0
has text: Yes,There is Javascript function declared in my jsp. Is this scope available in anywhere in the jsp page?
type: Comment

http://stackoverflow.com/a/26725219
has body: You could disable them and use ng-change to monitor that all 3 of the text inputs have value. Sample html: &lt;input type="text" ng-model="data.item3" ng-change="update()"/&gt; &lt;input type="checkbox" ng-model="data.model1" ng-disabled="checksDisabled"/&gt; Example Controller .controller('MainCtrl',function($scope){ $scope.checksDisabled=true; var data = $scope.data ={ }; $scope.update=function(){ $scope.checksDisabled = !(data.item1 &amp;&amp; data.item2 &amp;&amp; data.item3); } }); DEMO
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42039747
answers question: http://stackoverflow.com/q/26724890
score: 1
has comment: http://stackoverflow.com/comment/42039735
accepted answer of: http://stackoverflow.com/q/26724890
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42039890
has comment: http://stackoverflow.com/comment/42039805

http://stackoverflow.com/comment/42285774
comment on: http://stackoverflow.com/q/26796459
score: 0
has text: Thanks, but I just forgot to add the callback in the question, that was not the problem. It got solved but I don't know how (!!), [here is the code](https://github.com/doup/doup.illarra.com/blob/master/gulpfile.js).
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26733303
type: UnansweredQuestion
tagged with: dialog
type: Question
tagged with: jquery-ui
has title: JQuery pop up dialog can not open
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42053696
has answer: http://stackoverflow.com/a/26733627
score: 0
linked to: http://stackoverflow.com/q/21677799
answer count: 1
has body: I am using jqueryui/1.9.2/jquery-ui.min.js for pop up dialog. This is my code $("#button_id").on("click", function(){ $("#dialog").dialog("open"); }) When i click on button in first time it's pup up dialog as normal but after dialog close. Than I click on it again, It's show message like this Error: cannot call methods on dialog prior to initialization; attempted to call method 'open' like in image. How to resolve it.
has comment: http://stackoverflow.com/comment/42238508

http://stackoverflow.com/q/26755459
tagged with: javascript
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26755555
has comment: http://stackoverflow.com/comment/42094244
downvote count: 2
has body: I can't work out the logic to detect if it is past a certain hour yet... var now = new Date(); if(now.getHours() &lt;= 15 &amp;&amp; now.getMinutes() &lt; 1) console.log("It's before 3pm");
type: Question
score: -2
has title: Detect if it is past a certain hour (e.g. 3pm)
tagged with: date
has answer: http://stackoverflow.com/a/26755555
upvote count: 0
answer count: 1

web-services
type: Tag
tags question: http://stackoverflow.com/q/26753016
tags question: http://stackoverflow.com/q/26732973
tags question: http://stackoverflow.com/q/26741072
tags question: http://stackoverflow.com/q/26826668
tags question: http://stackoverflow.com/q/26822535
tags question: http://stackoverflow.com/q/26754411
tags question: http://stackoverflow.com/q/26685063
tags question: http://stackoverflow.com/q/26692738
tag name: web-services

http://stackoverflow.com/comment/42082468
has text: You are having incorrect DOM. you have not wrapped second select correctly in tr and td elements. also fiddle works fine for dom you have mentioned. http://jsfiddle.net/ca8st4oz/
score: 3
comment on: http://stackoverflow.com/q/26748995
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26682163
type: AnsweredQuestion
has body: My Webapp is running with a https connection / ssl certificate. I need to show pictures to the user. I get the links to the picture by an API request and link them afterwards. Sadly, the pictures address is http, so the browser shows that there are unsecure parts on the site, which mustn't be... I could download the pictures and link to the proper picture afterwards, but I think this might be a little timeconsuming and not the best way to handle this. Does somebody know a better solution for this? I'm using php, jquery and javascript.
has comment: http://stackoverflow.com/comment/41963022
has comment: http://stackoverflow.com/comment/41963052
tagged with: image
has comment: http://stackoverflow.com/comment/41963237
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41963138
tagged with: ssl
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26682520
has answer: http://stackoverflow.com/a/26682520
score: 0
accepted answer: http://stackoverflow.com/a/26682517
has title: Http content loaded in https connection
has answer: http://stackoverflow.com/a/26682517
has comment: http://stackoverflow.com/comment/41963149
tagged with: php

http://stackoverflow.com/comment/42200546
type: QuestionComment
has text: same and different domains
comment on: http://stackoverflow.com/q/26807982
score: 0
type: Comment

http://stackoverflow.com/comment/42019838
has text: I am trying to use it right now but it is used for php and asp.net,and I am using none of them
comment on: http://stackoverflow.com/a/26714676
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42135667
has text: if its the root should the each not be {{#each user}}
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26778519

http://stackoverflow.com/comment/42010223
type: QuestionComment
comment on: http://stackoverflow.com/q/26707946
type: Comment
score: 0
has text: Do you have any idea why the graphs display when I put them in the head then? and not in the body?

http://stackoverflow.com/q/26742122
score: -2
tagged with: jquery-mobile
tagged with: javascript
tagged with: listview
accepted answer: http://stackoverflow.com/a/26742670
has title: Add buttons inside li in dynamically created listview in phonegap JQM
upvote count: 0
answer count: 1
has body: I am ought to create an attendance application in phonegap... I want that the list of students name have 2,3 buttons below their name in the listview... there would be a ul in which there will be the li where the name will be shown... i just can't figure how can that buttons be added in li ...! There should be a listview in which the name is shown in li &amp; just below the name there should be a tick button, cross button, and 2-3 more.. after thAT another name below this li with same thing... Please help me that how can i make this thing by phonegap using html,css,javascript,jquery,mobile jquery... if anyone can just write the code initially , it would be very helpful... Thank you,..
tagged with: jquery
favorite count: 0
tagged with: cordova
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26742670
downvote count: 2
type: Question

http://stackoverflow.com/a/26683075
has body: One odd thing is that you are setting these 2 things equal to each other document.getElementsByName("redirect").value = document.referrer; and then immediately testing if they're equal to each other. if (document.getElementsByName("redirect").value == document.referrer) I can't say that this is your issue, but it's bad coding and should be fixed.
has comment: http://stackoverflow.com/comment/41964761
score: 0
answers question: http://stackoverflow.com/q/26682930
type: Answer
has comment: http://stackoverflow.com/comment/41964718

http://stackoverflow.com/comment/42170515
type: Comment
score: 0
has text: As you are getting `window` from parent(), there is *something else* going on. please provide the rest of your code.
type: QuestionComment
comment on: http://stackoverflow.com/q/26798014

http://stackoverflow.com/a/26701489
score: -1
upvote count: 0
has comment: http://stackoverflow.com/comment/42037761
has body: Found it after getting a little sleep! this._currentElement.ref Im using it for backbone model integration!
type: Answer
has comment: http://stackoverflow.com/comment/42001362
answers question: http://stackoverflow.com/q/26696174
downvote count: 1

http://stackoverflow.com/a/26722198
score: 1
has body: Underscore uses a method that is consistent so as to avoid micro-optimization and improve readability and compressibility. Treating _.isFunction differently for the sake of a couple microseconds doesn't make sense unless _.isFunction is an actual bottleneck in actual code.
has comment: http://stackoverflow.com/comment/42034465
upvote count: 1
answers question: http://stackoverflow.com/q/26721925
has comment: http://stackoverflow.com/comment/42034226
downvote count: 0
has comment: http://stackoverflow.com/comment/42034336
type: Answer

http://stackoverflow.com/q/26682829
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/26892246
accepted answer: http://stackoverflow.com/a/26892246
has title: Webgrid needs to update with new content in MVC
type: AnsweredQuestion
type: Question
tagged with: asp.net-mvc-5
has body: I am still very new to MVC, JavaScript, and jQuery so please bear with me. I have a webgrid that contains different terms and their translations. The list of terms is dependent on the 'VMID' chosen from the drop down list above the grid. (Or at least it would be, if it were working correctly.) The left-most column has an edit link for each term that leads to a Boostrap modal, which is populated with all the values assigned to the ID chosen in that drop down list. I need the terms in the grid to also depend on the value chosen from that list. The approach I am currently trying goes like this (only pasting the bits relevant to the question) - Main view (strongly typed with model reference, not included): &lt;div class="container-fluid"&gt; &lt;div style=" margin-bottom: 1.4%;"&gt; &lt;table&gt; &lt;tr&gt; &lt;td style="font-size: medium; margin-bottom: 5px"&gt; @Model.lblVMID: &amp;nbsp; &amp;nbsp; &lt;/td&gt; &lt;td&gt; @Html.DropDownListFor(model =&gt; model.VMID, new System.Web.Mvc.SelectList(Model.locations, "Key", "Value"), new { @class = "form-control", id = "ddlVMID", onchange = "RepopGrid()" }) &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;div class="table-scrollable well" id="termGrid"&gt; @{Html.RenderPartial("_TermGrid", Model);} &lt;/div&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; function RepopGrid() { VMID = $("#ddlVMID").val(); ShowLoadingDialog(); $.ajax({ url: URLPrefix() + "/Terminology/RepopGrid/" + VMID, type: "POST", success: function () { HideLoadingDialog(); }, error: function (jqXHR, textStatus, errorThrown) { HideLoadingDialog(); ShowAlert(false, 'Failed to change location\r\n' + errorThrown); } }) } &lt;/script&gt; Partial view (strongly typed with model reference, not included. Same model that the main view uses): @Model.grid.GetHtml(columns: Model.columns, alternatingRowStyle: "info", nextText: "Next", previousText: "Previous", tableStyle: "table") Controller: public ActionResult Index() { TerminologyModel model = new T…
answer count: 1
tagged with: webgrid

http://stackoverflow.com/q/26779976
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: Adding Object in JSON dictionary in AngularJS
has body: How can I add a new object which be read from input form in AngularJS ? my JSON : { "1": { "name": "Audi", "year": "1993", }, "2": { "name": "BMW", "year": "2012", } } my Add.html: name: year: my AddCtrl : angular.module('motoApp') .controller('AddCtrl', ['$scope','$http', '$routeParams', function($scope, $http, $routeParams) { $http.get('scripts/controllers/cars.json').success (function(data){ }); this.newcar = {}; this.addCar = function(car) { car.name.push(this.name); this.newcar ={}; }; }] ); I want to have page that after filling all inputs and cliking submit button new car will be added in JSON with next id. Where and what should I add to have achieve this ?
has answer: http://stackoverflow.com/a/26780235
accepted answer: http://stackoverflow.com/a/26780235
type: Question
tagged with: http://stackoverflow.com/tag/json
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26700670
has comment: http://stackoverflow.com/comment/41995418
possible better answer: http://stackoverflow.com/a/26700732
type: Question
has title: Loop through a local database with a value from an array, function inside a loop
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26700712
accepted answer: http://stackoverflow.com/a/26700712
has body: I'm trying to iterate through an array using the "TimeStamp" value from each object in that array to return the associated values from a local DB. This below works perfectly for a single iteration if I simply use myArray[0] but as soon as I try and turn it into a loop it doesn't work. I know there's some peculiarity about functions inside loops but don't know what the work around/fix is. for(var x = 0; x &lt; myArray.length; x++) { tx.executeSql("SELECT * FROM table WHERE entryreference = '"+myArray[x].TimeStamp+"' ", [], function(tx,results){ var tempArray = []; var len = results.rows.length; for (var i = 0; i &lt; len; i++){ var tempObject = { "Value": results.rows.item(i).value } tempArray.push(tempObject); } myArray[x].embeddedArray = tempArray; }); };
has answer: http://stackoverflow.com/a/26700732
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26700730

http://stackoverflow.com/q/26801983
upvote count: 0
tagged with: javascript
has body: How can mouse event be generated on selecting multiple rows? I need to catch this event and pass this to somewhere. Thanks in advance. Regards
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26802103
downvote count: 2
type: Question
score: -2
has answer: http://stackoverflow.com/a/26802083
has comment: http://stackoverflow.com/comment/42177258
has title: How to generate mouse event on selecting table rows?
answer count: 2

header
type: Tag
tags question: http://stackoverflow.com/q/26811360
tags question: http://stackoverflow.com/q/26824653
tag name: header
tags question: http://stackoverflow.com/q/26748692
tags question: http://stackoverflow.com/q/26709305

http://stackoverflow.com/a/26799062
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26775074
accepted answer of: http://stackoverflow.com/q/26775074
type: Answer
has body: OK fixed my own problem! I had to use the datatable iniatie for this table-id, witouht using the $(document).ready( function() $('#test').DataTable(); I'm just wondering why this actually works if i don't use the load statement. In the Datatables.net - website, this is the only initiate you have to do!
has comment: http://stackoverflow.com/comment/49790187
score: 0

http://stackoverflow.com/q/26811689
has comment: http://stackoverflow.com/comment/42196115
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26812411
tagged with: css
score: 2
downvote count: 0
tagged with: google-chrome-devtools
favorite count: 0
type: Question
tagged with: javascript
has body: I have a div which is hidden when the page is displayed and I am trying to find out what script is hiding it. I see that it has style="display:none". The page comes from the web server without this style. I have used Chrome Dev Tools and added a DOM breakpoint on attribute change in the Sources panel and a similar one in the Elements panel on the div. The Sources panel doesn't show the "display:none". When I refresh the page, none of the breakpoints fire. However when I hide/display the div manually in the console using jQuery, a breakpoint inside jQuery code fires. This tells me the breakpoint is set up correctly. I tried manually to find in the script and couldn't locate where the hiding is done. There are many ways to reference the div. Any ideas how the div could have been hidden?
upvote count: 2
has comment: http://stackoverflow.com/comment/42196352
answer count: 1
has title: How to know how a div got display:none (hidden) added? DOM breakpoint not firing

http://stackoverflow.com/q/26682167
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/26682213
has body: I have a jquery code that I've indicated below. These codes run, When I start scrolling (I mean when the height of scroll is more than 100) But I want to run just for once, immediately after height of 100, and not to be run more than once. $(window).scroll(function(){ if ($(window).scrollTop() &gt; 100 ){ //some codes... } }); How can I do this? Thank you :)
has answer: http://stackoverflow.com/a/26682305
has answer: http://stackoverflow.com/a/26682795
tagged with: scroll
upvote count: 1
possible better answer: http://stackoverflow.com/a/26682233
has answer: http://stackoverflow.com/a/26682233
tagged with: javascript
answer count: 5
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26682213
has answer: http://stackoverflow.com/a/26682655
type: AnsweredQuestion
downvote count: 0
score: 1
has title: How to run a jquery code by scrolling for once

http://stackoverflow.com/q/26715734
tagged with: javascript
tagged with: jquery
tagged with: ajax
tagged with: jquery-select2
answer count: 1
favorite count: 0
has title: How to append params to ajax request in Select2?
has answer: http://stackoverflow.com/a/26716317
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26716317
has body: i'm building a web app using Laravel, and i have to implement tag selection, like this one used by stackoverflow, loading options via ajax and if is not exist create it, i did choose Select2 jquery plugin, the problem i have with it, is cant get it to append parameters to the ajax url, Route : /tags/{tag} how can i append the term of select to my url ?
type: Question
score: 5
upvote count: 5
downvote count: 0

http://stackoverflow.com/q/26765818
favorite count: 0
type: Question
upvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/26766160
has title: Extending prototype within anonymous function - strange effects
tagged with: closures
accepted answer: http://stackoverflow.com/a/26766160
has comment: http://stackoverflow.com/comment/42112902
score: 2
tagged with: anonymous-function
downvote count: 0
tagged with: javascript
type: AnsweredQuestion
has body: When experimenting with a method to make private static methods, I came across this very strange behavior. In the following code, the public method getData is overwritten by it's own return data, though it is never explicitly called! This is very strange to me and wondered what is going on here. I suppose it serves me right for not just encompassing the entire page in the anonymous function as per the module pattern, but I would still like to understand this bug. function MyClass() { this._prop = true; } MyClass.prototype.getData = function () { this._prop = false; return { a: 2344, b: 765, c: 234 }; } (function () { var privateStatic = 0; MyClass.prototype.getCount = function () { return privateStatic++; } } ()); var m = new MyClass(); console.log(m.getData()); //Error (object is not a function) console.log(m.getData); //prints {a:2344,b:765,c:234}

http://stackoverflow.com/comment/42101453
score: 4
comment on: http://stackoverflow.com/q/26760033
has text: you forgot the dots on your class selectors in the css (.ok, .dead).
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42194987
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26811058
has text: You both helped me. But i can juts accept one answer. Yes,now i remember why the order of parameter is important ( concerning minification)
score: 0

http://stackoverflow.com/a/26715154
answers question: http://stackoverflow.com/q/26714205
has body: How did you get the token ? Is it a dev token or an oauth one ? In both cases make sure that they were issued by the production server and not the sandbox one (i.e. you can't use a sandbox token in production environment). If it's a prod token, I'd suggest to open a support ticket asking the Evernote team to check your credentials : https://dev.evernote.com/support/ (manage an api key)
score: 0
type: Answer

http://stackoverflow.com/comment/42137567
comment on: http://stackoverflow.com/a/26779796
score: 0
type: AnswerComment
type: Comment
has text: yes,success function in ajax is never calling.I created another method,another form,another input field and tested.But still the same

http://stackoverflow.com/q/26702034
has answer: http://stackoverflow.com/a/26702403
has title: Multiple option selects to create unique shopping cart SKU
type: UnansweredQuestion
tagged with: paypal
has body: Is there a way of inserting a string into a field, whereby the string is predetermined depending on what options are selected from two drop down menus? This is so that a combination of two drop down menus creates a unique SKU for that product, and that string referred to as a SKU is inserted into the input value of the item_number variable and then passed to paypal during checkout. I will use the example of selling tee-shirts. So the combinations will be black/small, black/large, white/small, & white/large. And each will have a unique SKU of TEESHIRT-BS, TEESHIRT-BL, TEESHIRT-WS & TEESHIRT-WL respectively. Here is my HTML for the option selects, however, I think I need some JavaScript to insert the SKU into the value field. select colour</> black white select size</> small large
type: Question
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/a/26776776
score: -1
answers question: http://stackoverflow.com/q/26776665
downvote count: 1
type: Answer
upvote count: 0
has comment: http://stackoverflow.com/comment/42131871
has body: I think your code exists an error. You didn't close the input element. Just modify the html like this: &lt;input id="textField" type="text" placeholder="Type in your name"/&gt;

http://stackoverflow.com/q/26717903
tagged with: javascript
has body: I have a few questions. The first is why can't I display data without putting 'in model' when using the each helper? Also I'm having issues showing products specific to the category I'm in? View an image of my inspect here: Currently when I click on a category, it shows all of my products. I want to show all of my categories, then list my products associated to the category I clicked ( I need these available at all times). Shouldn't I be able to just do the following? Solution Category {{#each category}} {{name}} Back {{#each products}} {{name}} {{/each}} {{/each}} Router.js App.Router.map(function () { this.route('index', { path: '/' }); this.route('line-of-one'); this.route('operating-room'); this.route('sterile-processing'); this.route('solution'); this.route('department'); this.route('category'); this.resource('products'); this.resource('presentations', { path: '/presentations' }, function () { // this one is nested and dynamic, we need it to see one user at a time with its id this.resource('presentation', { path: '/:presentation_id' }, function () { // another nested one for editing the current user this.route('edit'); }); // and a last one to create users this.route('create'); }); // this is our 404 error route - see MissingRoute just bellow this.route('missing', { path: '/*path' }); }); // this handles wrong routes - you could use it to redirect to a 404 route or like here to redirect to the index page App.MissingRoute = Em.Route.extend({ redirect: function () { this.transitionTo('index'); } }); Application Route App.ApplicationRoute = Ember.Route.extend({ model: function () { return this.store.findAll('category') }, setupController: function (controller, model) { this._super(controller, model); controller.set('product', this.store.find('product')); } }) Products Route App.ProductsRoute = Ember.Route.extend({ model: function () { return this.store.find('product') } }) Category Model App.Category = DS.Model.extend({ name: DS.attr('string'), room: DS.attr('stri…
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26721115
tagged with: frontend
has answer: http://stackoverflow.com/a/26737825
accepted answer: http://stackoverflow.com/a/26737825
tagged with: handlebars.js
tagged with: ember.js
tagged with: model-view-controller
type: AnsweredQuestion
has title: Issue displaying data using ember/handlebars
has answer: http://stackoverflow.com/a/26721115
has comment: http://stackoverflow.com/comment/42043558
type: Question

http://stackoverflow.com/q/26807313
upvote count: 7
type: Question
has body: This is my first question to Stack Overflow and Jasmine is fairly new to me, so I hope I'm doing ok here. I have a Jasmine test where I try to set the scroll position of my page to a certain value. The actual code is pretty complex, but I managed to make a more simple example of the failing test: it("should set scrollTop to equal 100", function () { setFixtures(" Page content "); spyOn($.fn, "scrollTop"); $("#page").scrollTop(100); expect($.fn.scrollTop).toHaveBeenCalledWith(100); // this test passes expect($("#page").scrollTop()).toEqual(100); }); The result: Expected 0 to equal 100. I set the scrollTop to 100 and expect it to be just that on the next line. How does this test fail? If it matters, I'm using Jasmine 1.3.1 with requirejs and jasmine-jquery as an extension.
has answer: http://stackoverflow.com/a/41810812
tagged with: javascript
has comment: http://stackoverflow.com/comment/42191363
tagged with: jasmine-jquery
answer count: 1
downvote count: 0
tagged with: jquery
tagged with: jasmine
favorite count: 0
accepted answer: http://stackoverflow.com/a/41810812
has comment: http://stackoverflow.com/comment/42193876
has comment: http://stackoverflow.com/comment/42189149
type: AnsweredQuestion
has title: Failing to get the scrollTop value inside a Jasmine test
score: 7

http://stackoverflow.com/comment/42022595
score: 0
has text: I would prefer not using echo, but ending PHP section and echoing only the dynamic parts directly into JS code.
comment on: http://stackoverflow.com/q/26716000
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26724417
type: Question
has title: Always getting android.database.sqlite.SQLiteException: near "Time" when running SQLite
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26726279
score: 0
tagged with: sqlite
answer count: 1
has answer: http://stackoverflow.com/a/26726279
tagged with: android
has comment: http://stackoverflow.com/comment/42038487
type: AnsweredQuestion
has body: I have tried all the various advice on here regarding the 'android.database.sqlite.SQLiteException'. I still keep getting the error. Every time I try to run the app it just crashes which is caused by that exception. I have read every line about 10 times and still cant find the error. Please help, I would really appreciate it. EventHandler Class package com.team11.healthdb; import java.util.ArrayList; import java.util.List; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; public class EventHandler extends SQLiteOpenHelper { // Database Version private static final int DATABASE_VERSION = 1; // Database Name private static final String DATABASE_NAME = "HealthTracker"; public EventHandler(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } // Creating Tables @Override public void onCreate(SQLiteDatabase db) { //SQL Statement to create TABLE_EVENTS String CREATE_TABLE_EVENTS = "CREATE TABLE TABLE_EVENTS ( " + "KEY_ID INTEGER PRIMARY KEY AUTOINCREMENT, " + "KEY_TITLE TEXT, " + "KEY_DESCRIPTION TEXT, " + "KEY_START INTEGER, " + "KEY_END INTEGER, " + "KEY_LOCATION TEXT )"; // Creates TABLE_EVENTS db.execSQL(CREATE_TABLE_EVENTS); } // Upgrading database @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { // Drop older table if existed db.execSQL("DROP TABLE IF EXISTS TABLE_EVENTS"); // Creates fresh table this.onCreate(db); } //------------------------------------------------------------------------- /** * All CRUD(Create, Read, Update, Delete) Operations */ // Events table name private static final String TABLE_EVENTS = "EVENTS"; // Events Table Columns names private static final String KEY_ID = "ID"; private static final String KEY_TITLE = "Title"; private static final String KEY_DESCRIPTION = "Description"; private static final String KEY_START …

http://stackoverflow.com/a/26766339
has comment: http://stackoverflow.com/comment/42114184
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26766125
has comment: http://stackoverflow.com/comment/42114458
answers question: http://stackoverflow.com/q/26766125
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42114249
has comment: http://stackoverflow.com/comment/42113516
has comment: http://stackoverflow.com/comment/42113780
has comment: http://stackoverflow.com/comment/42113553
downvote count: 1
has body: To be sure it's global assign it to the window obj. window.x = -1; Or post the entire code in a jsfiddle.

http://stackoverflow.com/comment/41953038
type: AnswerComment
score: 0
type: Comment
has text: @SonamBharti that sounds like a new question. If this answer works for your original question then you should consider accepting this answer and opening a new question for your new problem
comment on: http://stackoverflow.com/a/26676810

http://stackoverflow.com/q/26747429
linked to: http://stackoverflow.com/q/27271994
favorite count: 0
type: Question
answer count: 1
has title: Set and drag a Marker on Leaflet-map updates form input-field without sending
has body: including leaflet and jQuery in the head, I have this code: ... ... <input type="text" name="GPSLatitude" onclick="javascript:simply();" value="<?php echo $GPSLatitudeDec; ?>" size="25" maxlength="20" /> ... ... With a click, I set a marker on the map. In this procedure I would like to update the input-field, before submitting. Also, if I drag the marker on the map, the input-field should become updated. And the last marker can become deleted too, so that I've to deal only with one marker. Can someone give me an overview, how to do that? I'm not to exercised in the jQuery- or Leaflet-libaries. Are there any functions workarounds prepared? Thank you, Rob
has answer: http://stackoverflow.com/a/32151505
tagged with: leaflet
upvote count: 1
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
downvote count: 0
score: 1

http://stackoverflow.com/comment/63495288
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/38027365
type: Comment
has text: Could you please add a short explanation?

http://stackoverflow.com/q/26800471
has answer: http://stackoverflow.com/a/26800514
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42174616
has answer: http://stackoverflow.com/a/26800558
has body: I have a form and I want to send a integer from one of the textbox back to the server. I was using $.post() and wrote code as follows: $.post("/getvalue",$("#info1").val, function(data,status){ alert("reached server"); $("#info2").val(data); }); This turned out to be not working or more clearly its sending a zero value to server. I also tried following version of above code: $.post("/getvalue",$("#info1").serialize(), function(data,status){ alert("reached server"); $("#info2").val(data); }); $.post("/getvalue",'$("#info1").serialize()', function(data,status){ alert("reached server"); $("#info2").val(data); }); Then I also tried to store text box value into a variable and send it as follow: var value= $("#info1").val(); $.post("/getvalue",'value', function(data,status){ alert("reached server"); $("#info2").val(data); }); Also I tried: var value= $("#info1").val(); $.post("/getvalue",value, function(data,status){ alert("reached server"); $("#info2").val(data); }); But none of all these code works. So now my Query is that Can we not pass an integer or variable containing integer using $.post(). As the documentation says we can do so. How is it possible to do so... Am I wrong somewhere??? Believe me there are no coding errors (like parenthesis and semicolons etc..) in my full code. I know about the $.ajax() method of doing so, but I just wanted to know the scope for doing it using simple $.post(). Please someone care to lend a hand. Thanx
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42175200
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42175516
has comment: http://stackoverflow.com/comment/42175244
has comment: http://stackoverflow.com/comment/42175013
has title: Can't we send an integer along jQuery .post method?
has comment: http://stackoverflow.com/comment/42175369
score: 1

http://stackoverflow.com/comment/42055365
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26734295
has text: i have seen and we are not able to cut copy or paste items from the textbox. then what is the problem

http://stackoverflow.com/q/26728270
has answer: http://stackoverflow.com/a/26728395
type: Question
answer count: 2
tagged with: javascript
favorite count: 0
downvote count: 3
tagged with: datetime
upvote count: 0
type: UnansweredQuestion
tagged with: utc
score: -3
has title: How can i convert 1415071800000 to utc time in jquery or javascript?
has body: I am working with full calendar and giving JSON data to calendar. It displays right time on my local system but when I see it online it shows me wrong time. I want to add events by converting the time into UTC time but by using following code I get the UtCTime = NaN. Can anyone please explain how can I convert it. v.appoint_starttime.match=/Date(1415071800000)/ ; var newLocalStartDate = new Date(v.appoint_starttime.match(/\d+/)[0] * 1); var UtCTime = Date.UTC(newLocalStartDate);
has answer: http://stackoverflow.com/a/26728355

http://stackoverflow.com/comment/42225816
has text: you say "didn't work as well" but what's mean?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26823890

http://stackoverflow.com/a/26702945
has body: Consider a library like this, _ = (function(){ lib = {}; lib.function1 = function(){ //code }; lib.function2 = function(){ this.function1(); }; //more code return lib; })(); if you use, window.function2 = _.function2; function2(); The library uses "this" operator in function2. Your way changes the scope of the function2 here. The function2() call will give an error saying "function1 is not defined".
has comment: http://stackoverflow.com/comment/42014115
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41999378
has comment: http://stackoverflow.com/comment/41999643
accepted answer of: http://stackoverflow.com/q/26702562
answers question: http://stackoverflow.com/q/26702562
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42195543
type: QuestionComment
has text: You're going to have to describe more about what you're trying to accomplish, because it's not clear at all. Why are you performing a `%` operation in the first place?
comment on: http://stackoverflow.com/q/26811538
score: 0
type: Comment

http://stackoverflow.com/q/26739649
has title: css to give variable numbers of columns of data for responsive website
has comment: http://stackoverflow.com/comment/42065741
answer count: 0
score: 1
has body: This isn’t a ‘normal’ data display. I’m reading records from a database (theatre events) and want to display them in nicely lined up rows and columns. A non-responsive, tables-based example is at http://cotswoldplayhouse.co.uk/jm3/index.php/what-s-on What I want is for the number of columns to go to 2 then 1 as the screen size reduces. I found some hints on how to do that hereabouts such as CSS wrapping different numbers of columns in a responsive layout with two to three columns and that led to the experiment at http://cotswoldplayhouse.co.uk/jm3/index.php/what-s-on-2 It’s going in the right direction but there are a number of problems. The first catch seems to be that I need all the cells in a row to be the same size and there is no way to work out which is biggest (and hence size the others) until we know how many are in the row. The second catch is that the various areas of each event need to line up e.g. the top of each image should be level. … but we don’t know how deep the image – or the text – is going to be. I fixed this in the tables version by building a row of 4 at a time with separate rows for title, picture, etc. That works well but can’t (as far as I know) be made responsive. If I knew the screen size, I could deliver the right number of columns via php but, of course, that won’t work as media queries are client side and php isn’t! (The whole lot gets wrapped up into a Joomla page but I don't think that creates any extra problems.) To sum up, I’m stuck! Any suggestions would be gratefully received. Steve Code snippet: (this is an approximation, because all the code is PHP generated) $(window).load(function(){ var col_height=0; var col_elem; $('.col').each(function () { $this = $(this); if ( $this.outerHeight() > col_height ) { col_elem=this; col_height=$this.outerHeight(); } }); $('.col').height(col_height); }); .clear {clear: both;} .col{ border:1px dashed; min-height:20px; margin-bottom: 30px; width:100%; float:left; box-sizing:border-box; } @media …
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42068860
tagged with: responsive-design
has comment: http://stackoverflow.com/comment/42065783
has comment: http://stackoverflow.com/comment/42068912
tagged with: javascript
has comment: http://stackoverflow.com/comment/42065809
linked to: http://stackoverflow.com/q/19584624
downvote count: 0
tagged with: multiple-columns
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/41992825
type: Comment
comment on: http://stackoverflow.com/a/26699513
has text: Yes it was like a moment ago , I just changed it based on comment below.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26747395
tagged with: internet-explorer
has title: .load causing total page refresh in Internet Explorer?
type: Question
has comment: http://stackoverflow.com/comment/42079896
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/42079878
has comment: http://stackoverflow.com/comment/42079839
accepted answer: http://stackoverflow.com/a/26747615
has body: So I've got a simple site with a menu bar and a content area. When I click one of the buttons in the menu bar, it's supposed to do a quick fadeIn transition on a graphical element of the content area, and load external content into a div. $("#button1").click(function(){ $(".contentdivs").fadeIn(1000); $(".content").load("external.html"); }); This works exactly as intended in Chrome, Safari and Firefox, but not in Internet Explorer. In Explorer, clicking #button1 will trigger the .Fadein and the .load (I can see the transition and the external data render very briefly) but then the entire page refreshes, and the external content gets unloaded. Any ideas why this is happening, and how to fix it?
has answer: http://stackoverflow.com/a/26747615
type: AnsweredQuestion

http://stackoverflow.com/q/26822272
has comment: http://stackoverflow.com/comment/42220226
type: Question
has title: how to use asp.net id in jquery
has comment: http://stackoverflow.com/comment/42218746
has comment: http://stackoverflow.com/comment/42223701
tagged with: javascript
tagged with: jquery
tagged with: asp.net
score: 0
has comment: http://stackoverflow.com/comment/42215743
tagged with: http://stackoverflow.com/tag/html
has body: How to overwrite html code to asp.net code for jquery? HTML is: &lt;textarea id="test"&gt;&lt;/textarea&gt; &lt;span id="showResult"&gt;&lt;/span&gt; Jquery is: $('#test').keyup(function(e){ var s = $(this).val(); var ss = s.slice(-1); var result = ''; if(ss.search(/[^\x00-\x7E]/) != -1) result = 'fa'; else result = 'en'; $('#showResult').html(result); }); Up Code Worked! But Use With Asp.net Don't Work: Aspx is: &lt;asp:TextBox runat="server" ID="txtMessege"&gt;&lt;/asp:TextBox&gt; &lt;span id="showResult"&gt;&lt;/span&gt; Jquery is: $('#&lt;%= txtMessege.ClientID %&gt;').keyup(function () { var s = $(this).val(); var ss = s.slice(-1); var result = ''; if (ss.search(/[^\x00-\x7E]/) != -1) result = 'fa'; else result = 'en'; $('#showResult').html(result); });
has comment: http://stackoverflow.com/comment/42245712
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42214056
has comment: http://stackoverflow.com/comment/42220209

css-transitions
tags question: http://stackoverflow.com/q/26812936
tags question: http://stackoverflow.com/q/26776936
type: Tag
tags question: http://stackoverflow.com/q/26822138
tags question: http://stackoverflow.com/q/26814584
tag name: css-transitions
tags question: http://stackoverflow.com/q/26782998
tags question: http://stackoverflow.com/q/26798245

http://stackoverflow.com/comment/42187753
score: 0
type: Comment
type: QuestionComment
has text: BTW there're some edge cases where dictionaries are prefered over strong types
comment on: http://stackoverflow.com/q/26807330

http://stackoverflow.com/a/29161135
answers question: http://stackoverflow.com/q/26810526
type: Answer
score: 0
has body: May I also suggest gulp-newy in which you can manipulate the path and filename in your own function. Then, just use the function as the callback to the newy(). This gives you complete control of the files you would like to compare. newy(function(projectDir, srcFile, absSrcFile) { // do whatever you want to here. // construct your absolute path, change filename suffix, etc. // then return /foo/bar/filename.suffix as the file to compare against }

http://stackoverflow.com/a/26696162
score: 1
accepted answer of: http://stackoverflow.com/q/26695807
answers question: http://stackoverflow.com/q/26695807
has body: If your requirement is only a web server, then you just need to install apache from a terminal: sudo apt-get install apache2 Then host your static files from apache.
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41987623
type: Answer
downvote count: 0

http://stackoverflow.com/comment/41969356
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26685677
has text: You can take a look at [tinysort](http://tinysort.sjeiti.com/).

http://stackoverflow.com/comment/42059983
type: QuestionComment
comment on: http://stackoverflow.com/q/26736434
has text: Thanks @Igor! I'd forgotten about that handy little property. I updated my answer to include that change too.
score: 0
type: Comment

http://stackoverflow.com/comment/42248552
type: AnswerComment
comment on: http://stackoverflow.com/a/26818350
has text: Sorry Yun, You need to put position:relative;top:0px; in the css for the main footer. Updated answer and added JSfiddle
type: Comment
score: 0

http://stackoverflow.com/q/26828780
type: AnsweredQuestion
has body: I dont understand why the expression updated and the ng model value dont when im calling to $setViewValue function. this is the plunker: http://plnkr.co/edit/2xdsujEsqDVVXaSPNqYE?p=preview the code: &lt;body ng-controller="MainCtrl"&gt; &lt;input type="text" ng-model="user.name" set-value&gt; {{user.name}} &lt;input type="button" value="click" ng-click="change()"&gt; &lt;/body&gt; var app = angular.module('plunker', []); app.controller('MainCtrl', function($scope) { $scope.user = {name:'name'}; }) .directive('setValue', function() { return { restrict:'A', require:'ngModel', link: function(scope,ele, attr, ctrl) { scope.change = function() { ctrl.$setViewValue('text'); } } } })
score: 1
upvote count: 1
type: Question
tagged with: angularjs-directive
has title: Angular js $setViewValue doesnt effect the ngModel
tagged with: javascript
has answer: http://stackoverflow.com/a/27023527
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27023527

http://stackoverflow.com/q/26715429
has comment: http://stackoverflow.com/comment/42021629
tagged with: javascript
has comment: http://stackoverflow.com/comment/42021436
has body: I am working with amCharts and want to put a simple button in the my header that gives the option to refresh the chart chart div when needed. I have looked all over the internet for a solution and all the code I have found is similar to what I am using, it does not want want to reload the div. Being new at JQUERY I am not sure what I doing wrong. your assistance is greatly appreciated. I have attached the JQUERY and HTML code Below: VPM Global Select Opportunities Fund - Dollar Unit Price Weekly: 2012/02/03 to 2014/10/24 Value of $1000 Invested at inception relative to Target Return Weekly: 2012/02/03 to 2014/10/24 Value of R1000 Invested at inception relative to Inflation Benchmarks Weekly: 2012/02/03 to 2014/10/24 * VPM GSO - VPM Global Select Opportunities Fund jQuery: $(document).ready(function() { $("#resetZoom1").bind("click", function() { var url = 'index.html'; $("#chartwrapper").load( url + "div#chartdiv1") }); });
answer count: 1
has comment: http://stackoverflow.com/comment/42021234
tagged with: jquery
has answer: http://stackoverflow.com/a/26715712
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42021390
has comment: http://stackoverflow.com/comment/42021534
has title: Reloading a div without reloading a page using JQUERY
has comment: http://stackoverflow.com/comment/42021479
score: 0
type: Question

http://stackoverflow.com/comment/42228254
score: 0
has text: Modify your `initComparision` function to remove html content before providing new. I do not know what is your placeholder for search, can just guess.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26830535

http://stackoverflow.com/q/26687031
has answer: http://stackoverflow.com/a/26687585
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41972723
has comment: http://stackoverflow.com/comment/41971847
has comment: http://stackoverflow.com/comment/41972624
tagged with: tumblr-themes
has comment: http://stackoverflow.com/comment/41972592
has title: fixing broken html emitted by tumblr's templating system
answer count: 1
has comment: http://stackoverflow.com/comment/41972584
has comment: http://stackoverflow.com/comment/41972196
tagged with: javascript
favorite count: 0
has body: In tumblr's theme templating system you use {ReblogButton} to add a reblog button to the html. It currently is broken; it's using an "a" tag and it has in it class="reblog_button"style="..." In other words, it's missing the space before the word style. Is there some way with javascript or whatever that I could fix that? The reblog button is currently styled as a block element and I'm trying to make it inline. The test tumblr blog is http://rustycwright.tumblr.com/ and my css is inline in the head. I just added some "or" bars around the like heart, which is a div that I changed to inline and it's working. IE's dom explorer does show the html with a space before the style tag. More poking around; IE's dom explorer shows a line through my css for a.reblog_button: inline, as does firefox's Inspector. Can someone explain why? Is it because of the css they've embedded in the tag?
score: 0
has comment: http://stackoverflow.com/comment/41972500
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41972534
type: UnansweredQuestion

http://stackoverflow.com/comment/42097414
type: AnswerComment
type: Comment
has text: for length menu --> lengthMenu: [[50,20,10],[50,20,10]]
comment on: http://stackoverflow.com/a/26756720
score: 0

http://stackoverflow.com/comment/41950310
comment on: http://stackoverflow.com/q/26674984
has text: @Andy The double precision floating point format distinguishes between positive and negative zeros which is why `1 / 0` is `Infinity` whereas `1 / -0` is `-Infinity`. See my answer below.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42183700
score: 0
type: Comment
type: QuestionComment
has text: have you read this https://github.com/wildabeast/BarcodeScanner/issues/172
comment on: http://stackoverflow.com/q/26804717

http://stackoverflow.com/q/26727931
tagged with: javascript
tagged with: express
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42044381
has answer: http://stackoverflow.com/a/26728521
has comment: http://stackoverflow.com/comment/42044514
has body: this is my server side POST code .before my task saving database im find same data in the database using my unique value as service but when i run this code console says ReferenceError: service is not defined what is wrong here?can some one poine me.please app.post('/collections/:collectionName', function(req, res, next) { req.collection.findOne({service: service}, function(e, result){ if(result){ res.send{error: "REQUEST ALREADY EXISTS"}; } else{ req.collection.insert(req.body, {}, function(e, results){ if (e) return next(e) res.send(results) }); } }); }) update---- button.addEventListener('click', function(e) { var service_ = service.value; var amount_ = amount.value; var name_ = name.value; var phone_ = phone.value; var reminder_ = reminder.value; if (start_pick &lt; end_pick) { var jsondata = [{ start_time : new Date(start_pick), end_time : new Date(end_pick), service : service_, amount : amount_, client_phone : phone_, client_name : name_, reminder : reminder_ }]; var xhr = Titanium.Network.createHTTPClient(); xhr.setTimeout(10000); xhr.open("POST", "http://127.0.0.1:3000/collections/appoinments"); xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8"); xhr.send(JSON.stringify(jsondata)); xhr.onerror = function() { Titanium.API.info("Error in connecting to server !!"); alert("Error on connecting to server, Please try again"); }; xhr.onload = function() { windowPayment.close(); }
has comment: http://stackoverflow.com/comment/42044368
answer count: 1
tagged with: node.js
has comment: http://stackoverflow.com/comment/42044666
has comment: http://stackoverflow.com/comment/42044413
has title: Express.js server side error message notworking
score: 0
accepted answer: http://stackoverflow.com/a/26728521
has comment: http://stackoverflow.com/comment/42045089

http://stackoverflow.com/comment/42019044
comment on: http://stackoverflow.com/q/26714266
score: 0
has text: @euvl yup but in that solution they are using JQuery
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42088264
type: Comment
comment on: http://stackoverflow.com/q/26751972
type: QuestionComment
has text: I got stuck at "... so i decided to add one more event inbetween ...", which makes no sense at all.
score: 0

http://stackoverflow.com/q/26783191
answer count: 0
has body: How can I clear dynamically create JavaScript and jQuery from the console / buffer? When I click a reset button, I need to reload the script with out a full page reload. $(document).ready(function () { /* * Some Statements dynamically create JavaScript and jQuery */ } $(document).ready(function () { var startDate, endDate, dateRange = []; //$("#turnoff1, #turnon1").datepicker("setDate", new Date()); $("#turnoff1").datepicker({ changeMonth: true, changeYear: true, beforeShow: function (input) { setTimeout(function () { var buttonPane = $(input) .datepicker("widget") .find(".ui-datepicker-buttonpane"); }, 1); }, minDate: 0, beforeShowDay: $.datepicker.noWeekends, onClose: function (date) { startDate = $(this).datepicker("getDate"); var onday = document.getElementById('turnoff1').value; onday = new Date(onday); onday = (onday.getMonth() + 1) + '/' + (onday.getDate() + 1) + '/' + onday.getFullYear(); $("#turnon1").datepicker({ changeMonth: true, changeYear: true, beforeShow: function (input) { var b = $("#turnoff1").val(); if (b == "") alert("Turn Off date please..!"); setTimeout(function () { var buttonPane = $(input).datepicker("widget").find(".ui-datepicker-buttonpane"); }, 1); }, onSelect: function (date) { endDate = $(this).datepicker("getDate"); for (var d = new Date(startDate); d &lt;= new Date(endDate); d.setDate(d.getDate() + 1)) { dateRange.push($.datepicker.formatDate('mm/dd/yy', d)); } }, beforeShowDay: $.datepicker.noWeekends }); $('#turnon1').datepicker('option', 'minDate', onday); } }); var i = $('#p_scents .DivContent').size() + 2; $('#cmd').click(function () { if (i &lt; 5) { var flag = false; if (i == 2) { var preon = $('#turnon1').val(); } else { var z = "#turnon" + (i - 1); var preon = $(z).val(); } if (preon != "") { $('#DivContent').append('&lt;p&gt; Turn Off &amp;nbsp;&lt;input type="text" id="turnoff' + i + '" align="right" name="turnoff" /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Turn On&amp;nbsp;&lt;input type="text" id="turnon' + i + '" align="right" …
type: Question
has comment: http://stackoverflow.com/comment/42362520
has comment: http://stackoverflow.com/comment/42143489
tagged with: javascript
tagged with: jquery
has title: How to clear dynamically created JavaScript and JQuery from log/buffer
score: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/42022254
comment on: http://stackoverflow.com/a/26714006
type: Comment
has text: My handlebars script imports rows from a spreadsheet and makes them into individual divs on my page. So three rows with data = three text boxes. I want a FB comment box in each of these boxes. After some testing, I found that if I use the parse script in my header file with a two second delay function, the comment box would load in the first box only.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42106060
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26762197
has text: That *last inserted id* code almost deserves a down-vote for massive inefficiency alone :)

http://stackoverflow.com/q/26821855
answer count: 0
has title: How to solve conflict between jquery codes
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42213200
has comment: http://stackoverflow.com/comment/42213120
type: Question
has comment: http://stackoverflow.com/comment/42214055
has comment: http://stackoverflow.com/comment/42213125
has body: I have the flowing jquery code for a dialog $(function () { $("#WebcamPopup").dialog({ autoOpen: false, height: 500, width: '80%', resizable: false, position: "center", show: { effect: "blind", duration: 1000 }, hide: { effect: "blind", duration: 500 } }); $(".ui-dialog-titlebar").hide(); $("#OpenWebcamPopup").click(function () { $("#WebcamPopup").dialog("open"); }); }); and the flowing code for html &lt;input id="OpenWebcamPopup" value="webcam" type="button" /&gt; &lt;div id="WebcamPopup" title="webcam"&gt; .... &lt;/div&gt; I test this in an empty page and its work, but when I include a jquery file to the page the dialog not work correctly, which mean that there are some conflicts between the jquery file and the above jquery code. I try to edit the jquery file, but the codes in this file is very complex to understand How can I solve this problem ?
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/42213178
has comment: http://stackoverflow.com/comment/42213988

http://stackoverflow.com/comment/42112261
comment on: http://stackoverflow.com/q/26747508
has text: @BenjaminGruenbaum I am definitely switching to bluebird, I will update with how that goes.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/42091406
score: 0
comment on: http://stackoverflow.com/q/26754176
type: Comment
type: QuestionComment
has text: If you show these images in a gallery-style like Facebook, crop them on back-end and show that specific cropped image during gallery-style preview and load the hi-res image only when a user clicks on any of those images.

http://stackoverflow.com/comment/42102649
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26760345
has text: Also the issue with stuck "pointer" cursor still remains.. try to drop the green box on another green box an see what happens..
score: 0

http://stackoverflow.com/q/26763953
downvote count: 0
tagged with: knockout-mvc
tagged with: javascript
has comment: http://stackoverflow.com/comment/42109135
favorite count: 0
has body: I'm constantly long polling a list of servers: var servers = ko.observableArray(); $.getJSON('/Home/GetServers', function (data) { servers.removeAll(); $.each(data, function (xxx) { servers.push(new Server(xxx); }); }); function Server(xxx) { var self = this; ko.mapping.fromJS(xxx, {}, self); } and I have a list of objects as an observableArray and I only want to change the values of the objects that have changed, rather than removing all and re-pushing every element.
answer count: 0
has title: Updating only the changed values in an object when long polling entire list of objects in knockout
type: UnansweredQuestion
upvote count: 1
score: 1
tagged with: knockout.js
type: Question

http://stackoverflow.com/a/26820513
upvote count: 3
answers question: http://stackoverflow.com/q/26819245
downvote count: 0
score: 3
has body: The code from this post: openssl using only .NET classes is compatible with CryptoJS AES. Test: JS: var encrypted = CryptoJS.AES.encrypt("abc12345","7e4bac048ef766e83f0ec8c079e1f90c2eb690a9"); encrypted.toString(); //output: "U2FsdGVkX18eGD2hSe9UyGgTk5NGKFmvWq/3c5IYHoQ=" C#: var p = new Protection(); var s = p.OpenSSLDecrypt("U2FsdGVkX18eGD2hSe9UyGgTk5NGKFmvWq/3c5IYHoQ=", "7e4bac048ef766e83f0ec8c079e1f90c2eb690a9"); Console.WriteLine(s);//output: "abc12345"
type: Answer

http://stackoverflow.com/comment/42171026
score: 0
type: Comment
type: QuestionComment
has text: why are yoy manually adding html to an angular application ? You should use a ng-if on the element you wanna add instead. This is the angular way.
comment on: http://stackoverflow.com/q/26798533

http://stackoverflow.com/comment/41974465
type: Comment
comment on: http://stackoverflow.com/q/26688716
type: QuestionComment
has text: Never mind the transliteration part: you are *replacing* the innerHTML with each next new fragment. Add the strings together before writing it into `demo`.
score: 1

http://stackoverflow.com/comment/42019834
comment on: http://stackoverflow.com/q/26714724
has text: are you looking for that? http://stackoverflow.com/questions/1063007/arr-sort-does-not-sort-integers-correctly
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42097780
has text: Yes, that suits me fine. Thank you very much. I´ll accept the answer as soon as I can.
type: AnswerComment
comment on: http://stackoverflow.com/a/26758044
score: 0
type: Comment

http://stackoverflow.com/comment/42015212
type: Comment
comment on: http://stackoverflow.com/a/26711747
has text: Ok....The Problem is I am taking 2000.000000 in one String Variable (bocz its coming somewhere in type String) then I have to convert this whole String in one specific dataType without loosing any of the digits after decimal. So that I can use it in my further calculations. Can u plz give me proper solution ifu have....??
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42100339
has text: How does a desired function work without jquery but with normal javascript? Sorry i am pretty new to ajax
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26759373

http://stackoverflow.com/q/26821200
tagged with: browserify
answer count: 1
tagged with: playframework-2.0
has title: Play Javascript Router - exporting and using the javascript router outside of the play framework
tagged with: playframework-2.3
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26826517
type: Question
has body: I'm currently developing a phonegap app intended to connect to my Play webservice. I would love to be able to use the play javascript router to connect to my webservice but I've got a couple of problems that are prohibiting me. 1) I can't embed the full domain name in the routes, as it appears to be intended only for use when served by the play server, and routes are relative to the server. In phonegap, I need the full domain name. Is there a way to specify the base URL for the call? 2) I'm doing extensive modularization using browserify, which requires export statements on all local files so that the vars/functions can be imported into my javascript code using require('../lib/javascriptRouter.js'). After browserifying the file, it goes through a minification step, which will mangle names if the dependencies aren't managed by browserify. The current javascript router does not generate these exports. Is there a way to generate these? 3) This one is more of an annoyance than anything. I would like the generated javascript router to be made available at some configurable target build path, instead of trying to track it down manually. Is there a way to do this?
tagged with: javascript
score: 0

http://stackoverflow.com/comment/42027778
has text: Thank you, this example is well suited for my application so thumbs up !
comment on: http://stackoverflow.com/a/26718742
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/42085660
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26750724
has text: here, take a look <a class="sharelink-copy-link" data-clipboard-text="<?php echo $sharelink; ?>" href="javascript:void(0);"> alt="Link" /> Copy link
type: AnswerComment

http://stackoverflow.com/a/26731461
accepted answer of: http://stackoverflow.com/q/26730923
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26730923
upvote count: 2
type: Answer
score: 2
has body: This force the creation of object using the constructor pattern: _() would be equivalent to new _() then if you want to extend the behavior of all instance ie objects created with _(obj) (or new _(obj) with a limited memory usage you can extend the prototype of the constructor. function Ctor(){} Ctor.prototype.someFunction=function(){}; var instance1=new Ctor(); var instance2=new Ctor(); would be somehow equivalent to function factory(){ var obj={}; obj.someFunction=function(){} return obj; } var instance1=factory(); var instance2=factory(); but the second version will use more memory as it will add the function to every instance rather to the single common prototype

http://stackoverflow.com/q/26797418
accepted answer: http://stackoverflow.com/a/26797450
downvote count: 0
possible better answer: http://stackoverflow.com/a/26822423
favorite count: 0
has answer: http://stackoverflow.com/a/26797450
has title: Why does JavaScript parser accept JSON as a function body?
type: AnsweredQuestion
has body: The other day, I came across some weird code: var OrderSupplement = function() { oid: null; code: ""; description: ""; startdate: ""; enddate: ""; gender: null; cardowner: null; box: null; divisor: 0; created: null; createdBy: ""; }; The intention of the code was clear to me: It was the try to define a constructor function, in order to create an instance of OrderSupplement. I am baffled by this syntax. The buddy, who wrote the code, said it worked fine - although it obviously does not; at least it does not what it should. He instantiated a new instance of OrderSupplement and set e.g. oid to a nonnull value and retrieved it later. Of course retrieving a value before setting would have unveiled the bug. The effect of the code above is like: var OrderSupplementJson = function() {} My question is: Why is the code above accepted and does not throw an (syntax) error of any kind?
tagged with: http://stackoverflow.com/tag/json
upvote count: 10
has answer: http://stackoverflow.com/a/26822423
type: Question
has comment: http://stackoverflow.com/comment/42168823
score: 10
tagged with: javascript
answer count: 2

http://stackoverflow.com/comment/42210194
comment on: http://stackoverflow.com/q/26820225
has text: removing height for `#personalFilter`: http://jsfiddle.net/b71e7w3k/2/ ??? Or use min-height instead http://jsfiddle.net/b71e7w3k/3/ ???
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/74618543
upvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/26782998
score: 3
has body: As mentioned in another answer, focus() scrolls to the element and visually breaks any transition mid-flow. If you didn't want to rely on listeners, and depending on your requirements, you could use the preventScroll: true flag when calling the focus() method. input.focus({ preventScroll: true }) See the MDN documentation here and also check browser compatibility. Not all browsers support this but many of them do.
downvote count: 0

http://stackoverflow.com/comment/42177491
type: AnswerComment
has text: ok, i did that. still not working. you can check at www.shopmajorbrands.com/ajax/
comment on: http://stackoverflow.com/a/26799233
type: Comment
score: 0

http://stackoverflow.com/comment/41993825
comment on: http://stackoverflow.com/q/26699810
has text: I've updated my answer in case you care about avoiding matching things like "text)" without a `(`.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26813184
answer count: 2
possible better answer: http://stackoverflow.com/a/26813244
linked to: http://stackoverflow.com/q/16310298
has comment: http://stackoverflow.com/comment/42344448
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42338610
downvote count: 1
has answer: http://stackoverflow.com/a/27866692
has comment: http://stackoverflow.com/comment/42199740
favorite count: 0
accepted answer: http://stackoverflow.com/a/27866692
has body: I've built an Angular app that utilizes the Instagram API to pull in images. If a user later deletes an image I end up with broken images (404's). I've attempted to use jQuery to hide the div containing these (broken) images, but they still appear. I've placed the following jQuery in a 'custom.js' file that I reference in my 'index.html' file: $(document).ready(function() { $("img").error(function() { $(this).parent().hide(); }); }); I reference jQuery then 'custom.js' in the head of 'index.html' as follows: &lt;script src="libs/jquery/dist/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="js/custom.js"&gt;&lt;/script&gt; ...and here is the html I'm attempting to apply this jQuery to: &lt;a ng-href="{{image.link}}" target="_blank" title="{{image.text}}"&gt;&lt;img ng-src="{{image.img}}" alt="" class="img-responsive" ng-style="homeColors" id="image"&gt;&lt;/a&gt;
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42367677
upvote count: 4
type: AnsweredQuestion
score: 3
type: Question
has comment: http://stackoverflow.com/comment/42368359
has answer: http://stackoverflow.com/a/26813244
has title: How to hide broken images in Angular app
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42257807

http://stackoverflow.com/a/26797788
score: 0
answers question: http://stackoverflow.com/q/26797668
has body: The output is a local variable of method1, it does not exist in the scope of method2.
type: Answer

http://stackoverflow.com/q/26786042
upvote count: 0
has comment: http://stackoverflow.com/comment/42148762
tagged with: javascript
has body: I have a HTML website which has a very basic HTML structure. Cool Site Bro Which uses JavaScript to draw elements on the page to make a simple graph. With divs or other html objects I know you can take advantage of the css property display and use JavaScript or jQuery to change display from block to none or vice versa. Is there anything similar for script tags to hide the contents of one and show another, I feel a page refresh and JavaScript is required. What would the best way to switch between two scripts on an event like clicking a button?
favorite count: 0
has comment: http://stackoverflow.com/comment/42148840
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
score: -3
has comment: http://stackoverflow.com/comment/42148790
downvote count: 3
has answer: http://stackoverflow.com/a/26786703
has answer: http://stackoverflow.com/a/26786754
type: Question
answer count: 2
has title: How to switch between JavaScript?

http://stackoverflow.com/comment/42088438
type: Comment
has text: Yes you can do the same with css [radial-gradients](https://developer.mozilla.org/en-US/docs/Web/CSS/radial-gradient) as well
comment on: http://stackoverflow.com/a/26752511
type: AnswerComment
score: 0

http://stackoverflow.com/q/26820115
type: Question
tagged with: c#
has title: ASP.NET Page_Load vs. AJAX page refresh code re-use / Redundancy?
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26843547
tagged with: asp.net
has body: Below is a working sample of code however I often find myself writing Page_Load content only to find myself re-writing the same sort of code doing the same sorts of things on the page after loading via ajax (to avoid the postback).... I can't help but think there must be some sort of better (maybe object oriented) way to manipulate and create the dynamic HTML methods we need to maintain after an initial .NET page load without refreshing the entire page. In the code sample below you can assume that the AjaxEnginePage is an existing .NET page that appropriately parses query strings and also that GetRealTimeFavoritesList() returns an appropriate list of objects with all information needed to be parsed in C# or JavaScript, from that point back, we GET code re-usability, but how do we get it in C# / JS? OnlineMemberList.ascx <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OnlineMemberList.ascx.cs" Inherits="OnlineMemberList" %> Favorites --- Online --- --- Offline --- OnlineMemberList.ascx.cs protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { List<FavoriteSummary> summaries = favoritesBLL.GetRealTimeFavoritesList(); foreach (FavoriteSummary summary in summaries) { if (summary.isOnline) { OnlineFavoritesUserNames.InnerHtml += " " + summary.you.UserName + " "; if (summary.isAvailableForIM) FavoritesChatIcon.InnerHtml += " "; else FavoritesChatIcon.InnerHtml += " "; } else { OfflineFavoritesUserNames.InnerHtml += " " + summary.you.UserName + " "; } } } } Favorites.js function UpdateFavoritesList() { var url = AjaxEnginePage + Category + "&Action=GetRealTimeFavoritesList"; $.getJSON(url, null, function (results) { UpdateFavoritesListDisplay(results) }); function UpdateFavoritesListDisplay(favoritesArray) { $(".OnlineFavoritesUserNames")[0].innerHTML = ""; $(".FavoritesChatIcon")[0].innerHTML = ""; $(".OfflineFavoritesUserNames")[0].innerHTML = ""; if (favoritesArray["FavoriteSummary"].length !== 0) { for (var i = 0; i < favoritesArray["Fav…
tagged with: ajax
has answer: http://stackoverflow.com/a/26843547
type: AnsweredQuestion
tagged with: entity-framework

http://stackoverflow.com/comment/42382318
comment on: http://stackoverflow.com/a/26747544
type: AnswerComment
type: Comment
has text: Thanks takinola, the thing is I would like to keep the index as it is without using templates/markup language language.
score: 0

http://stackoverflow.com/comment/41995200
comment on: http://stackoverflow.com/a/26696149
type: AnswerComment
type: Comment
has text: @naomik correct but the second argument cannot be polyfilled in some browsers (ie8). https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FObject%2Fcreate#Browser_compatibility
score: 1

http://stackoverflow.com/comment/42005987
type: QuestionComment
comment on: http://stackoverflow.com/q/26702770
score: 0
has text: @charlietfl I tried, printed {{obj}} on page.It seems it get updated but ng-repeat don't update. I am working on it.Will update as soon a I got an answer.
type: Comment

http://stackoverflow.com/a/26840127
accepted answer of: http://stackoverflow.com/q/26823291
answers question: http://stackoverflow.com/q/26823291
has body: try this document.addEventListener('msvisibilitychange', function () { gameStop(); }); The msvisibilitychange fires when the app is not visible anymore.
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/42224416
type: QuestionComment
comment on: http://stackoverflow.com/q/26828514
score: 3
has text: In html `id` should be unique for every tag instead of that use `class` and pseudo-object `this` to fetch data.
type: Comment

http://stackoverflow.com/comment/42150787
comment on: http://stackoverflow.com/q/26786969
score: 0
type: Comment
type: QuestionComment
has text: It could be a Date manipulation, or pretty much anything smallish, the point is that there's hundreds of possible variations on what the custom function may do.

http://stackoverflow.com/comment/42150995
has text: The code basically creates datasets out of many different company docs, some in html, some in txt, csv, etc. The functions are created by the guys in charge to convert those docs into data we'll use in another component. Think of it as a very hopeful harmonization operation between many different components. Something that up until now was done by a guy and a notepad, reading through each doc to find the relevant info, then inputting it into the next piece of software
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26786969
type: QuestionComment

http://stackoverflow.com/a/26743692
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26742822
type: Answer
answers question: http://stackoverflow.com/q/26742822
has body: There is a slight error in your process row function. You trigger it with one row at a step and pushing all rows into the docs array. When executing it for the 1000 row the docs are written into ArangoDB and you insert the next row. And here is the error, the 1000th row is not stored in docs at any point. One possible fix: db.import.importJSONData( "target_collection", JSON.stringify(docs, function(key, value) { if (value == null || (typeof value === "string" &amp;&amp; !value.trim())) { return undefined; } else { return value; } }), { createCollection: true, waitForSync: false }, function(err, ret) { docs = [row]; // Insert row here connection.resume(); if (row === false) process.exit(); } );

http://stackoverflow.com/comment/41975795
score: 0
type: Comment
type: QuestionComment
has text: or call $scope.apply() to ask angular to check data, and update bindings.
comment on: http://stackoverflow.com/q/26689447

http://stackoverflow.com/comment/42031222
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26720620
has text: AFAIK, anonymous functions pretend to use global context so I can't use it here as I'm trying to acces a private object

http://stackoverflow.com/a/26804227
has comment: http://stackoverflow.com/comment/42197917
upvote count: 2
has comment: http://stackoverflow.com/comment/42185050
has comment: http://stackoverflow.com/comment/42188571
accepted answer of: http://stackoverflow.com/q/26803948
answers question: http://stackoverflow.com/q/26803948
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42188373
has comment: http://stackoverflow.com/comment/42201593
type: Answer
has comment: http://stackoverflow.com/comment/42192923
score: 2
has body: Main issue is that using $ or fancybox when it is not defined will cause an error and cause the script to stop. The next problem is that the script needs time to download and run jQuery and fancybox so i would suggest testing for jQuery and fancyBox and if it is not there adding a timeOut before another test. You could also use a flag so you only try to get the script you are missing. (function () { var requestedJQuery = false; var requestedFancyBox = false; function requestJQuery() { var myScript = document.createElement('script'); myScript.type = 'text/javascript'; myScript.async = false; myScript.src = 'http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body' [0])).appendChild(myScript); requestedJQuery = true; } function requestFancybox() { var myScript = document.createElement('script'); myScript.type = 'text/javascript'; myScript.async = false; myScript.src = 'http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.pack.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body' [0])).appendChild(myScript); requestedFancyBox = true; } function checkDependancies() { if (typeof $ === 'undefined' || typeof $.fancybox === 'undefined') { console.log("no dependanices"); if(!requestedJQuery &amp;&amp; typeof $ === 'undefined') { requestJQuery(); } if(!requestedFancyBox &amp;&amp; (typeof $ === 'undefined' || typeof $.fancybox === 'undefined')) { requestFancybox(); } setTimeout(function () { checkDependancies(); }, 1); } else { displayFancyBox(); } } function displayFancyBox() { console.log("got dependanices"); var link = $('&lt;a&gt;'); link.css('display', 'none'); link.attr('href', 'http://jsfiddle.net/'); link.addClass('fancybox fancybox.iframe'); link.fancybox(); link.trigger('click'); } checkDependancies(); })() http://jsfiddle.net/leighking2/y9Lqtec9/

http://stackoverflow.com/a/26764378
has comment: http://stackoverflow.com/comment/42118818
has comment: http://stackoverflow.com/comment/42119058
has comment: http://stackoverflow.com/comment/42113792
downvote count: 0
has comment: http://stackoverflow.com/comment/42113892
score: 4
has body: Here's a working fiddle (with a visible text field to show): Using: document.querySelector("form").appendChild(input); https://jsfiddle.net/s55snxtn/ Code: html: javascript: var input = document.createElement("input"); input.setAttribute("type", "text"); input.setAttribute("name", "name_you_want"); input.setAttribute("value", "value_you_want"); //append to form element that you want . document.querySelector("form").appendChild(input);
has comment: http://stackoverflow.com/comment/42118361
type: Answer
has comment: http://stackoverflow.com/comment/42118756
has comment: http://stackoverflow.com/comment/42118143
has comment: http://stackoverflow.com/comment/42118324
has comment: http://stackoverflow.com/comment/42118242
has comment: http://stackoverflow.com/comment/42118148
has comment: http://stackoverflow.com/comment/42118192
has comment: http://stackoverflow.com/comment/42118132
has comment: http://stackoverflow.com/comment/42117186
has comment: http://stackoverflow.com/comment/42115205
has comment: http://stackoverflow.com/comment/42118085
has comment: http://stackoverflow.com/comment/42119042
answers question: http://stackoverflow.com/q/26764240
has comment: http://stackoverflow.com/comment/42118914
upvote count: 4
has comment: http://stackoverflow.com/comment/42117522
has comment: http://stackoverflow.com/comment/42118934

http://stackoverflow.com/q/26759261
has body: I'm trying to create a script that displays a price in one box based on the number of employees entered in an adjacent box. The script works fine for a static amount, i.e. the base price is £8 per employee. If 5 is entered the price displayed is correct, £40. The problem I'm having is changing the unit price when a certain threshold is met. The unit price for 1-5 employees is 8, 6-21 is 7 and 22-50 is 6. No matter what is entered in the employee box, the number is always multiplied by 8. I'm very inexperienced when it comes to javascript so any help will be very welcome! Here is my code: Monthly Cost Javascript $(function() { var ccNum; $('#employees').keyup(function(){ ccNum = $(this).val(); }); if((ccNum >= 0) && (ccNum <= 5)){ var unitPrice = 8 } else if((ccNum >= 6) && (ccNum <= 21)){ var unitPrice = 7 } else if((ccNum >= 21) && (ccNum <= 50)){ var unitPrice = 6 } else var unitPrice = 8; $('#employees').keyup(function(){ $('#result').text(ccNum * unitPrice); }); })
tagged with: javascript
tagged with: jquery
score: 2
type: AnsweredQuestion
downvote count: 0
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/26759328
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/26759433
has title: Calculating unit price based on quantity entered
possible better answer: http://stackoverflow.com/a/26759328
accepted answer: http://stackoverflow.com/a/26759433

checkout
type: Tag
tag name: checkout
tags question: http://stackoverflow.com/q/26776383

http://stackoverflow.com/q/26794254
has body: i'm looking to call a function cookiefix() which is located inside main.js and source is linked at the bottom of my html. echo ' '; if(!isset($_COOKIE['clicked'])) { if(!isset($_COOKIE['count'])) { echo ' '; echo ' ' ; } } I was using body onload="" and it worked fine, I know this probably sounds like an uber newby question but i've been searched for the last hour or so and nothing is working. I've also tried linking to the source document, didn't work either.. huge thanks to anyone who has a moment EDIT: If this isn't possible, is there an alternative to 'onload' for anything but ? I was having header issues with cookies and calling it from onload
has answer: http://stackoverflow.com/a/26794270
has comment: http://stackoverflow.com/comment/42163300
has comment: http://stackoverflow.com/comment/42163370
has comment: http://stackoverflow.com/comment/42163437
accepted answer: http://stackoverflow.com/a/26794478
tagged with: php
possible better answer: http://stackoverflow.com/a/26794270
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42163312
has title: (JS) calling external .js function with tag
type: Question
tagged with: function
tagged with: javascript
has comment: http://stackoverflow.com/comment/42163326
has answer: http://stackoverflow.com/a/26794478
has comment: http://stackoverflow.com/comment/42163288
has comment: http://stackoverflow.com/comment/42163350
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26794388

http://stackoverflow.com/q/26730382
answer count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/42142543
has comment: http://stackoverflow.com/comment/42121706
type: Question
tagged with: nodeclipse
tagged with: mean-stack
tagged with: javascript
tagged with: eclipse
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42834123
favorite count: 0
has comment: http://stackoverflow.com/comment/42817790
type: UnansweredQuestion
tagged with: include-path
has body: In Nodeclipse, "Open Declaration" "Open Type Hierarchy" and "Open Call Hierarchy" all seem to always pop up a message saying "The resource is not on a include path of a javascript project". This issue was encountered with an existing MEAN stack project (available at pactvote.com) that I'm just getting started on. This is my first time working with MEAN and Nodeclipse. If you want to try and replicate this with the above-mentioned project, you may have to increase memory usage in eclipse.ini and implement the workaround described at https://github.com/Nodeclipse/nodeclipse-1/issues/159 . I downloaded Enide-Studio-2014-011-20140228-macosx-cocoa-x86_64. The only plugin installed is MercurialEclipse 2.1. I thought of trying to fiddle with the build path, but when I right-clicked on the project and moused over Build Path it said "No actions available." I didn't see anything to change in the project properties either. The project was created with WebStorm. Why is this issue occurring and how do I fix it?
has title: "Open Declaration", etc., pops up "The resource is not on a include path of a javascript project" in a Nodeclipse MEAN project

dialog
tag name: dialog
tags question: http://stackoverflow.com/q/26763764
tags question: http://stackoverflow.com/q/26787198
tags question: http://stackoverflow.com/q/26733303
type: Tag
tags question: http://stackoverflow.com/q/26736936

http://stackoverflow.com/comment/42128448
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26774503
has text: @thomas: `flags` is only needed for the first snippet: We set a flag property on that object for each value we've already seen, so we know if it's a duplicate. I would use the second snippet rather than discrete variables.

http://stackoverflow.com/q/26809858
answer count: 1
has body: Is it possible to return a variable name from an array? I have an array with 5 variables. Each variable is assigned a numeric value. I am trying to find the highest value in the array and then alert its variable name, or possibly use that variable to do things with it. var vara = 0; //resultA var varb= 0; //resultB var varc= 0; //resultC var vard= 0; //resultD var vare= 0; //resultE function showResults() { var buckets = [vara, varb, varc, vard, vare]; var largest = Math.max.apply(Math, buckets); alert(largest); } The above code alerts the value of largest, but I want to find the corresponding variable, for instance vara instead of 3
favorite count: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42192360
has comment: http://stackoverflow.com/comment/42192588
type: Question
tagged with: arrays
has comment: http://stackoverflow.com/comment/42193160
tagged with: javascript
score: -1
has title: Returning variable name from array?
upvote count: 2
downvote count: 3
has answer: http://stackoverflow.com/a/26809881
accepted answer: http://stackoverflow.com/a/26809881

http://stackoverflow.com/a/26675948
upvote count: 2
type: Answer
has body: I think it should be but im not sure, try it please :): pressedKey != "Leertaste" || pressedKey != "Enter" || pressedKey != "StrgR" || pressedKey != "Alt" || pressedKey != "AltGr" || pressedKey != "Tab" || pressedKey != "ShiftL" || pressedKey != "StrgL" || pressedKey != "ShiftR" As many of you say i used the wrong seperator, but this one was in the question, so i guessed he needed this. But indeed, he needs: pressedKey != "Leertaste" &amp;&amp; pressedKey != "Enter" &amp;&amp; pressedKey != "StrgR" &amp;&amp; pressedKey != "Alt" &amp;&amp; pressedKey != "AltGr" &amp;&amp; pressedKey != "Tab" &amp;&amp; pressedKey != "ShiftL" &amp;&amp; pressedKey != "StrgL" &amp;&amp; pressedKey != "ShiftR"
has comment: http://stackoverflow.com/comment/41951477
accepted answer of: http://stackoverflow.com/q/26675931
score: 2
answers question: http://stackoverflow.com/q/26675931
has comment: http://stackoverflow.com/comment/41951086
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42111228
type: QuestionComment
has text: @DanielRoseman What am i doing wrong now with my ajax because it jsut outputs something went wrong.
type: Comment
comment on: http://stackoverflow.com/q/26764077
score: 0

http://stackoverflow.com/a/26807399
has comment: http://stackoverflow.com/comment/42187791
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/42187760
downvote count: 0
has comment: http://stackoverflow.com/comment/42187850
has body: You could solve it using arrays, but it's someway outdated the approach. My suggestion is that you should use a List&lt;Dictionary&lt;string, object&gt;&gt;: var data = new List&lt;Dictionary&lt;string, object&gt;&gt;(); data.Add(new Dictionary&lt;string, object&gt;()); data[0].Add("rate", rateVal); And later you can access it like JavaScript using dictionary's indexer: var rate = data[0]["rate"]; Update OP said: My goal is to send rates array to a specific Web API service that is running with PHP. They accept only array with abovementioned structure. That's why I want to achieve that. No problem. If you serialize that list of dictionaries using JSON.NET, you can produce a JSON which will contain an array of objects: [{ "rate": 2 }, { "rate": 338 }] Actually, .NET List&lt;T&gt; is serialized as a JSON array and a Dictionary&lt;TKey, TValue&gt; is serialized as a JSON object, or in other words, as an associative array.
answers question: http://stackoverflow.com/q/26807330

http://stackoverflow.com/comment/42222942
comment on: http://stackoverflow.com/a/26827446
type: AnswerComment
has text: That will change the width of the image. Height will adapt based on the image proportions
score: 0
type: Comment

http://stackoverflow.com/a/26697259
type: Answer
accepted answer of: http://stackoverflow.com/q/26696717
answers question: http://stackoverflow.com/q/26696717
has body: I was misunderstanding the clearTimeout function. I thought the callback (calback in setTimeout(...)) would be executed immediately after clearTimeout is called. But the callback is not executed after clearTimeout is called... The working JS code is, var array = [1,2,3,4,5,6,7]; var timer; var i=0; function execute(){ timer = setTimeout(function () { alert(array[i]); i++; if (array.length &gt; i){ execute(); } }, 1000); } $('document').ready(function(){ $('#loop_controler').click(function(){ if ($(this).text() == 'pause'){ clearTimeout(timer); $(this).text('resume'); } else { execute(); $(this).text('pause'); } }); execute(array,0); });
score: 2
type: AcceptedAnswer
downvote count: 0
upvote count: 2

http://stackoverflow.com/q/26708205
has answer: http://stackoverflow.com/a/41314603
has answer: http://stackoverflow.com/a/33537743
has answer: http://stackoverflow.com/a/26708434
type: Question
has answer: http://stackoverflow.com/a/48653887
has answer: http://stackoverflow.com/a/43426335
tagged with: webpack
tagged with: javascript
has answer: http://stackoverflow.com/a/47624886
has answer: http://stackoverflow.com/a/51949874
has answer: http://stackoverflow.com/a/49010672
has answer: http://stackoverflow.com/a/43030671
answer count: 31
has answer: http://stackoverflow.com/a/42098602
has answer: http://stackoverflow.com/a/41453430
tagged with: fsevents
has answer: http://stackoverflow.com/a/55155203
has answer: http://stackoverflow.com/a/51950422
has title: webpack --watch isn't compiling changed files
has answer: http://stackoverflow.com/a/55133783
has answer: http://stackoverflow.com/a/28610124
downvote count: 0
upvote count: 126
has answer: http://stackoverflow.com/a/60921162
favorite count: 0
has answer: http://stackoverflow.com/a/28922879
has answer: http://stackoverflow.com/a/63072541
has answer: http://stackoverflow.com/a/35583907
has answer: http://stackoverflow.com/a/36438891
has answer: http://stackoverflow.com/a/35076628
score: 126
has answer: http://stackoverflow.com/a/36204080
has answer: http://stackoverflow.com/a/39822546
has answer: http://stackoverflow.com/a/52065737
has answer: http://stackoverflow.com/a/49290028
has answer: http://stackoverflow.com/a/54562792
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/45655104
accepted answer: http://stackoverflow.com/a/28610124
has answer: http://stackoverflow.com/a/44517957
has answer: http://stackoverflow.com/a/40665711
has answer: http://stackoverflow.com/a/45845661
possible better answer: http://stackoverflow.com/a/33537743
has body: I tried running webpack --watch and after editing my JS files, it doesn't trigger an auto-recompilation. I've tried reinstalling webpack using npm uninstall but it's still not working. Any ideas?
has answer: http://stackoverflow.com/a/58765874

url-routing
tags question: http://stackoverflow.com/q/26698218
tags question: http://stackoverflow.com/q/26758465
tag name: url-routing
type: Tag
tags question: http://stackoverflow.com/q/26754470
tags question: http://stackoverflow.com/q/26761689
tags question: http://stackoverflow.com/q/26707697

http://stackoverflow.com/q/26826668
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26841282
tagged with: web-services
tagged with: gwt
tagged with: java
type: Question
has title: Line 22: No source code is available for type in html libgdx
tagged with: libgdx
tagged with: javascript
has body: i'm trying to run html libgdx project, where i have a splash screen that uses tweenengine [ERROR] Line 22: No source code is available for type aurelienribon.tweenengine.TweenManager any idea how to fix this? thanks
score: 0

http://stackoverflow.com/comment/42142755
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26782688
has text: This is what he want in php :)

http://stackoverflow.com/q/26770297
has comment: http://stackoverflow.com/comment/42139803
has comment: http://stackoverflow.com/comment/42139636
tagged with: javascript
has body: I am having difficulty loading a polygon based SVG image, in snap.svg. Here is my My HTML My JavaScript var s = Snap("#svgThing"); Snap.load("/svgImage.svg", function (f) { g = f.selectAll("polygon"); s.append(g); }); And mysvg image code (part of it anyways it huge) <polygon stroke-linejoin="round" stroke-miterlimit="1" stroke-width="1" points="721,-77 350,-77 679,-76" style="fill:#dcdb.............
score: 0
has comment: http://stackoverflow.com/comment/42137801
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42139763
type: Question
has title: Loading a polygon based image on Snap.js

http://stackoverflow.com/comment/42230560
comment on: http://stackoverflow.com/a/26820912
score: 0
type: AnswerComment
type: Comment
has text: @OneBigEgg can you post your new code so I can review it?

http://stackoverflow.com/comment/41951302
has text: Thank you, its working as i wanted. Will accept awnser within when the time limit expires
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26675992

http://stackoverflow.com/comment/41997913
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26702243
score: 2
has text: Looks like you got `result = document.getElementById('textboxid').valu` backwards

http://stackoverflow.com/comment/42012702
comment on: http://stackoverflow.com/q/26710530
score: 0
type: Comment
type: QuestionComment
has text: Depending on how complex the page will be, you can always use [jQuery.load](http://api.jquery.com/load/) to load in sections of a HTML page into yours. This could cause some issues with scripting not being loaded.

http://stackoverflow.com/comment/42207312
comment on: http://stackoverflow.com/a/26818409
type: AnswerComment
has text: Yes, if you give the link a "display: inline-block". http://jsfiddle.net/19y4qnkx/10/
score: 0
type: Comment

http://stackoverflow.com/q/26685328
type: Question
type: AnsweredQuestion
favorite count: 0
tagged with: melonjs
answer count: 1
has answer: http://stackoverflow.com/a/26818088
upvote count: 3
has body: I am developing a game with Melon.Js, and down the canvas where it is loaded, I create a chat window. The problem is that when I type in the , if I press AWDS keys the character moves. Does anyone know how to temporarily disable (as long as the chat window on focus) character movement? "game.html" {{msj.nick}} : {{msj.mensaje}} Enviar "player.js" me.input.preventDefault; me.input.bindKey(me.input.KEY.LEFT, 'left', false,false); me.input.bindKey(me.input.KEY.A, 'left', false,false); me.input.bindKey(me.input.KEY.RIGHT, 'right', false,false); me.input.bindKey(me.input.KEY.D, 'right', false,false); me.input.bindKey(me.input.KEY.UP, 'up', false,false); me.input.bindKey(me.input.KEY.W, 'up', false,false); me.input.bindKey(me.input.KEY.DOWN, 'down', false,false); me.input.bindKey(me.input.KEY.S, 'down', false,false); I try to use a "focus" in the input, but I cant disabled the movements in MelonJS canvas
downvote count: 1
score: 2
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26818088
has title: How to disable a character movements MelonJS temporarily?
has comment: http://stackoverflow.com/comment/41968769

http://stackoverflow.com/a/26763331
has body: Ah, so the problem is that inside your click handlers your selecting ".ds_select" which is looking globally for all divs with the class .ds_select. It then adds the open class to all of them. I think what you want is this inside your click handler: $('.ds_placeholder').on('click',function(e){ e.preventDefault(); var $dropdown = $(this).parents('.ds_select'); $dropdown.toggleClass('open'); }); By the same token you'll want to update the placeholder like this: $('.ds_list a').on('click',function(e){ e.preventDefault(); var $dropdown = $(this).parents('.ds_select'); var $placeholder = $dropdown.find(".ds_placeholder"); $placeholder.text($(this).text()); $dropdown.removeClass('open'); }); Looks like there's also an issue with the dropdown pushing the other dropdown to the bottom; I think you could fix that by adding vertical-align: top; to your ds_select class, but I'm not so hot with CSS. So maybe somebody else will chime in. Update used toggleClass for simplicity hat-tip Steve Sanders
accepted answer of: http://stackoverflow.com/q/26763269
upvote count: 2
has comment: http://stackoverflow.com/comment/42107768
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26763269

http://stackoverflow.com/q/26766824
has answer: http://stackoverflow.com/a/26766885
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42114511
score: 3
has title: $rootScope.$emit not working
downvote count: 1
has comment: http://stackoverflow.com/comment/42114723
type: Question
upvote count: 4
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26766875
has comment: http://stackoverflow.com/comment/42115774
tagged with: emit
has body: I'm trying to emit event in AngularJS into second controller using: First Controller: $scope.checkThemeContent = function(theme) { console.log("Trying to get cards for theme id: " +theme.id); console.log(theme); $scope.selectedTheme = theme; if(theme.count_of_cards &gt;0) { //$scope.$emit('detailDisplayed', {}); $scope.displayedTemplate = 'detail'; $rootScope.$emit('detailDisplayed', {}); } else { $scope.displayedTemplate = 'empty'; } }; Second controller: $rootScope.$on('detailDisplayed', function(event, args) { alert('Received'); $scope.initDataGrid(); }); But event is not triggered. I tried to used scope in reverse direction and it works. Where can be problem please? I followed this tutorial: http://toddmotto.com/all-about-angulars-emit-broadcast-on-publish-subscribing/ Thanks for any help.
has comment: http://stackoverflow.com/comment/42114533
has comment: http://stackoverflow.com/comment/66240717
favorite count: 0
tagged with: angularjs

html5-video
tags question: http://stackoverflow.com/q/26760188
tags question: http://stackoverflow.com/q/26769112
tags question: http://stackoverflow.com/q/26766336
tags question: http://stackoverflow.com/q/26767578
tags question: http://stackoverflow.com/q/26766424
tag name: html5-video
type: Tag

http://stackoverflow.com/q/26695902
score: 2
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/26695931
has body: I need to get the 'role' attribute of a div with a dynamically generated ID in regards to the below code. HTML: &lt;div id="renable0" role="0"&gt; false &lt;/div&gt; &lt;div id="renable1" role="1"&gt; true &lt;/div&gt; &lt;!-- THE LIST OF DIVS CONTINUES IN INCREASING INCREMENTS OF 1 --&gt; Javascript: $("[id^='renable']").editInPlace({ // editInPlace is a jQuery plugin url: 'save.php', params: 'pos='+$(this).attr('role') // How can I get this role attribute for the clicked div? });
has title: Get attribute of clicked div with dynamic ID
type: Question
has answer: http://stackoverflow.com/a/26695937
accepted answer: http://stackoverflow.com/a/26695937
upvote count: 2
answer count: 2
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: attr
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26695931

http://stackoverflow.com/a/26738222
score: 1
upvote count: 2
downvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26738175
has body: Instead of w, use window: if (window.eventListener) window.addEventListener('load', startSlideShow, false); else window.addEventListener('onload', startSlideShow);

http://stackoverflow.com/q/26729683
tagged with: datepicker
answer count: 0
type: UnansweredQuestion
upvote count: 1
has body: I have forked a daterange picker, then customized (added features) on it as per my requirements. Here is the page: http://shekhardesigner.github.io/daterange/ Click on the second textbox - datepicker appears. You click on date cells - works fine. But if the first click is on next prev (&lt;&lt; or &lt; or &gt;&gt; or &gt;) buttons - it does not function. Method that is executing on those buttons clicks are: clickNext:{}, clickPrev: {} See full code here: https://github.com/shekhardesigner/daterange/blob/master/daterangepicker.js#L766 I am not able to trace what happens on first click. Any advise? FYA, Repo: https://github.com/shekhardesigner/daterange
score: 1
type: Question
has title: First click on my datepicker is untracable
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: date-range
favorite count: 0
tagged with: datetimepicker

http://stackoverflow.com/comment/42188538
has text: @ErikPhilips We could maintain a long discussion about this... My point of view is current state of programming and C# capabilities let us mix the best of many worlds: imperative and functional language, strong and dynamically-typed languages. If we use that advantages based on repeatable patterns that work, we can escape from strict rules of *everything must be a class* even in C#. And it's not lowering the quality of our code.
comment on: http://stackoverflow.com/q/26807330
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26806006
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26806172
score: 0
has comment: http://stackoverflow.com/comment/42185004
has title: Ripple animation doesn't work correctly
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I'm following this tutorial to add a ripple animation to every item of a drop-down menu. The problem is that I can do the animation but it expands across the page (isn't constrained to the menu item) and not how it is show by the tutorial. Here is how I do: Javascript: $(function(){ var ink, d, x, y; $(".sub-menu li a").click(function(e){ if($(this).find(".ink").length === 0){ $(this).prepend(""); } ink = $(this).find(".ink"); ink.removeClass("animate"); if(!ink.height() && !ink.width()){ d = Math.max($(this).outerWidth(), $(this).outerHeight()); ink.css({height: d, width: d}); } x = e.pageX - $(this).offset().left - ink.width()/2; y = e.pageY - $(this).offset().top - ink.height()/2; ink.css({top: y+'px', left: x+'px'}).addClass("animate"); }); }); And my menu: Home Grafixlab Test Grafica Web Video Didattica What am I doing wrong?
accepted answer: http://stackoverflow.com/a/26806172
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/q/26730343
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42049139
has body: In an app I receive some HTML text: since the app can't display (interpret) HTML, I need to remove any HTML tag and entity from the string I receive from the server. I tried the following, but this one removes HTML tags but not entities (eg. &bnsp;): stringFromServer.replace(/(&lt;([^&gt;]+)&gt;)/ig,""); Any help is appreciated. Disclaimer: I need a pure JavaScript solution (no JQuery, Underscore, etc.). [UPDATE] I'm reading all your answers now and I forgot to mention that I'm using JavaScript BUT the environment is not a web page, so I have no DOM.
tagged with: regex
has comment: http://stackoverflow.com/comment/42049339
has comment: http://stackoverflow.com/comment/42048741
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42048363
possible better answer: http://stackoverflow.com/a/26730605
has comment: http://stackoverflow.com/comment/42049312
type: Question
linked to: http://stackoverflow.com/q/24816
has title: Remove HTML tags and entites from string coming from server
tagged with: javascript
has comment: http://stackoverflow.com/comment/42049423
has comment: http://stackoverflow.com/comment/42049266
linked to: http://stackoverflow.com/q/1732348
score: 0
has comment: http://stackoverflow.com/comment/42049197
has answer: http://stackoverflow.com/a/26730639
has answer: http://stackoverflow.com/a/26730605
has comment: http://stackoverflow.com/comment/42049362
tagged with: string
has comment: http://stackoverflow.com/comment/42049405
has answer: http://stackoverflow.com/a/26730562
has answer: http://stackoverflow.com/a/26730430
accepted answer: http://stackoverflow.com/a/26730430
has comment: http://stackoverflow.com/comment/42049127

http://stackoverflow.com/a/26753113
answers question: http://stackoverflow.com/q/26753048
downvote count: 0
score: 1
type: Answer
has body: Below will work. What you have to bare in mind is that everytime you define a new angular.module if you put angular.module('myapp', []) you are defining a new space that has no knowledge of any other module. If you then do angular.module('myapp').controller() that will attach the controller to the original module. Thus is being in its scope. Notice the ommission of [] when defining the controller. The [] is for dependency injection, but in terms of angular.module defines a completely new module space. Below is a way to actually properly modularise angular js. angular.module("myapp.hello", []).controller("HelloController", function($scope) { $scope.helloTo = {}; $scope.helloTo.title = "Test"; } ); angular.module("myapp.my", []).controller("MyController", function($scope) { $scope.myData = {}; $scope.myData.showIt = true; }); angular.module("myapp", [ 'myapp.hello', 'myapp.my']);
upvote count: 1

http://stackoverflow.com/comment/50768014
type: Comment
has text: Becareful when doing things this way as it could be used to do script injections. There is no validation on the source of the images, so potentially it could be used to proxy anything on the internet.
comment on: http://stackoverflow.com/a/26682517
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42220467
has text: how am i going to put this code in my project? please give me some guide? i need something like my code to understand how this jquery things work.
comment on: http://stackoverflow.com/a/26826045
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41981290
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26692776
score: 0
has text: I send a lot of ajax requests to server but server is very slow. Result of request I draw on map. But I send request1, request2, request3, but I can get response 3, response2, response1. Thus results of response2 and response3 will be lost. Is it clear for you?

http://stackoverflow.com/comment/42180501
score: 0
type: Comment
has text: Yes I did. Here's an example : http://jsfiddle.net/o0f7o8q1/10/
type: QuestionComment
comment on: http://stackoverflow.com/q/26802823

http://stackoverflow.com/comment/42063735
type: Comment
type: QuestionComment
has text: Maybe not an exact dup, but [useful reading](http://stackoverflow.com/a/359509/1169519) about equals operators.
comment on: http://stackoverflow.com/q/26738097
score: 0

code-generation
tag name: code-generation
tags question: http://stackoverflow.com/q/26722248
type: Tag

http://stackoverflow.com/a/26790010
has comment: http://stackoverflow.com/comment/42209876
has body: I set up a JSbin here. As you can see, #orderbean1 is recognized, and submits. The error is likely elsewhere is your JS or markup, though if I'm misunderstanding the question please clarify
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26789873

http://stackoverflow.com/q/26784635
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/26784700
favorite count: 0
has answer: http://stackoverflow.com/a/26784694
has title: window.open() add a rel="nofollow" attribute
has answer: http://stackoverflow.com/a/26785029
tagged with: nofollow
possible better answer: http://stackoverflow.com/a/26784694
type: AnsweredQuestion
has body: Is there a way to add a rel="nofollow" attribute to the window.open() Javascript function? Or is that any way to have Google not follow a link created by Javascript or jQuery. Update Also, this will be a product for a client and I will not have access to their files. Any changes the robot.txt or .htaccess are off the table.
type: Question
accepted answer: http://stackoverflow.com/a/26785029
tagged with: javascript
score: 4
upvote count: 4
tagged with: window.open
answer count: 3

http://stackoverflow.com/q/26706201
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42006647
tagged with: javascript
type: UnansweredQuestion
tagged with: google-maps-api-3
tagged with: google-maps
has body: I'm trying to add custom images as the google map icons. Currently my custom images aren't showing but the map is otherwise working. I am trying to follow the example here: http://google-maps-utility-library-v3.googlecode.com/svn-history/r150/trunk/markerwithlabel/docs/examples.html Code: &lt;script src="https://maps.googleapis.com/maps/api/js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/markerwithlabel.js"&gt;&lt;/script&gt; &lt;script&gt; function initialize() { var myLatlng = new google.maps.LatLng(42.350358,-71.0851531); var mapOptions = { zoom: 13, center: myLatlng } var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions); var pictureLabel1 = document.createElement("img"); pictureLabel1.src = "images/cake.png"; var pictureLabel2 = document.createElement("img"); pictureLabel2.src = "images/hotel.png"; var marker1 = new MarkerWithLabel({ position: new google.maps.LatLng(42.341239,-71.111074), map: map, labelContent: pictureLabel1, labelAnchor: new google.maps.Point(50,30), labelClass: "labels", labelInForeground: true }); var marker2 = new MarkerWithLabel({ position: new google.maps.LatLng(42.3416983,-71.0705033), map: map, labelContent: pictureLabel2, labelAnchor: new google.maps.Point(1,30), labelClass: "labels", labelInForeground: true }); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt;
has answer: http://stackoverflow.com/a/26707551
has title: Adding custom marker image with MarkerWithLabel
type: Question
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26811710
answers question: http://stackoverflow.com/q/26811681
score: 1
upvote count: 1
has body: Use the :first selector: $( "img:first" ).attr( "id", "wp_featured_img" ); that selects the first matched img element.
downvote count: 0
type: Answer

http://stackoverflow.com/a/26786669
accepted answer of: http://stackoverflow.com/q/26785880
has comment: http://stackoverflow.com/comment/42151049
has comment: http://stackoverflow.com/comment/42152771
has comment: http://stackoverflow.com/comment/42151727
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42150004
has comment: http://stackoverflow.com/comment/42164924
has comment: http://stackoverflow.com/comment/42151990
has comment: http://stackoverflow.com/comment/42151642
has comment: http://stackoverflow.com/comment/42152416
has comment: http://stackoverflow.com/comment/42152571
type: Answer
has comment: http://stackoverflow.com/comment/42152208
has comment: http://stackoverflow.com/comment/42151888
has body: Try to redefine the original function on click. Example function bocadillaC() { cuentaH = original = bocadillaC; // redefine other functions leftH = function() { document.getElementById('garfio').src = left_with_yellow_cloud.src; }; rightH = function() { document.getElementById('garfio').src = right_with_yellow_cloud.src; }; cuentaH = function() { document.getElementById('garfio').src = cuenta_with_yellow_cloud.src; }; // ... document.getElementById('garfio').src = cuentaBoca.src; } And you need to redefine other functions with images. But, for example, for this state there is no a similar image with yellow cloud. But in fact you need to use power of HTML/CSS, don't draw image on each case and do it simpler without image map.
has comment: http://stackoverflow.com/comment/42151125
score: 1
answers question: http://stackoverflow.com/q/26785880
upvote count: 1
has comment: http://stackoverflow.com/comment/42153376
has comment: http://stackoverflow.com/comment/42179543
has comment: http://stackoverflow.com/comment/42152787

http://stackoverflow.com/a/26756418
answers question: http://stackoverflow.com/q/26754212
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42098202
has comment: http://stackoverflow.com/comment/42095767
upvote count: 1
has comment: http://stackoverflow.com/comment/42095906
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26754212
type: Answer
has body: One way would be to have both div's on your page, and use show/hide to make sure that only one is displayed at a time. The loaded javascript will render both highcharts, and you can simply hide or show the correct one: // Show Basic chart. $('#showBasic').show(); $('#showComplex').hide(); or // Show Complexchart. $('#showBasic').hide(); $('#showComplex').show();

http://stackoverflow.com/comment/42105768
comment on: http://stackoverflow.com/q/26754109
score: 0
has text: You would need to replace the code above with the Universal Analytics tracking code, which should be placed within the tags of your page. For a WP site, I think you would place it in the header.php file of your theme. (Posting event syntax as an Answer to get the formatting.)
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26797293
favorite count: 0
has answer: http://stackoverflow.com/a/26797510
has answer: http://stackoverflow.com/a/26797888
has comment: http://stackoverflow.com/comment/42169007
answer count: 5
has answer: http://stackoverflow.com/a/26797338
has answer: http://stackoverflow.com/a/26797419
type: AnsweredQuestion
has title: jQuery on click event function to be used as a normal function as well
has answer: http://stackoverflow.com/a/26797472
possible better answer: http://stackoverflow.com/a/26797338
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/26797510
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42168851
downvote count: 0
tagged with: jquery
has body: I have a event handler method which executes on the click of a button. I also pass on some data as shown below $( "button" ).on( "click", {name: "Hello"}, greet ); And the method is defined as: function greet(event) { // Use the data as event.data.name // Access the DOM element on whose click this method was invoked as $(this) } But I also want to use this function as a normal js function. How do I pass on the data ({name: "Namaskara"})? How to set the context - For example say I have another button as &lt;button id="kannada" /&gt; and I want to use this button as the context and be sent to the greet() function so that the $(this) used in the function would actually be by button

http://stackoverflow.com/a/26721834
has comment: http://stackoverflow.com/comment/42035134
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42034004
has comment: http://stackoverflow.com/comment/42033863
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/42033665
score: 2
accepted answer of: http://stackoverflow.com/q/26721568
downvote count: 0
has body: Fiddle example First let's remember one thing: name = name . = class # = id you cannot go for #add if you don't have any in your Document. So let's add some: &lt;input id="add" name="add" type="text"&gt; Now, if you want to insert some text String into a &lt;div&gt; (#changeMe) element, what you want is .text() or .html() (not .val() !). $(function() { // d. ready $('#copy').click(function( event ){ event.preventDefault(); // Prevent browser default behavior on form button $('#changeMe').text( $('#add').val() ); }); });
has comment: http://stackoverflow.com/comment/42033709
answers question: http://stackoverflow.com/q/26721568

http://stackoverflow.com/comment/42187664
has text: Also in looking at it, I was ignoring the IIFE part of this exercise, which is a big oversight as it as a scope question.
comment on: http://stackoverflow.com/a/26806840
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26721329
has answer: http://stackoverflow.com/a/26721745
has answer: http://stackoverflow.com/a/26721698
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26721698
tagged with: css
has title: Prevent div from showing after slideUp() - jQuery
type: AnsweredQuestion
score: 1
upvote count: 1
has body: I'm trying to make a small piece of code, so when I click on the question mark, it shows another div. However, when I click on the body, it should hide the just revealed div. The problem I am running into, is that even though I use .slideUp() when the person clicks on the body (note: the body is only clickable on the height of the ?), it also shows after clicking on the body again. How do I make it so clicking on body won't show the .popover again? If I add .hide() after .slideUp(), it just hides it directly and the slideUp effect is gone. CodePen HTML ? Voeg toe aan wensenlijst CSS body { background-color: #e3fbff; } /* Just to center things */ .center { margin: 100px auto; width: 30px; } /* The element to click on */ .qs { background-color: #02bdda; border-radius: 16px; color: #e3fbff; cursor: default; display: inline-block; font-family: 'Helvetica',sans-serif; font-size: 18px; font-weight: bold; height: 30px; line-height: 30px; position: relative; text-align: center; width: 30px; .popover { background-color: rgba(0,0,0,0.85); border-radius: 5px; top: 42px; box-shadow: 0 0 5px rgba(0,0,0,0.4); color: #fff; font-size: 12px; display:none; font-family: 'Helvetica',sans-serif; left: -95px; padding: 7px 10px; position: absolute; width: 200px; z-index: 4; } } jQuery $(".qs").click(function(){ $(".popover ").slideToggle(); }); $('body').click(function() { // Hide all hidden content $('.popover').slideUp(); }); $('.popover').click(function(e) { e.stopPropagation() }); $('.qs').click(function(e) { // this stops the event from then being caught by the body click binding e.stopPropagation(); });
type: Question
has comment: http://stackoverflow.com/comment/42032887
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26721463
has answer: http://stackoverflow.com/a/26721463
answer count: 3
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/26714073
type: Question
has title: App opening in vertical mode, not in horizontal mode
tagged with: javascript
has answer: http://stackoverflow.com/a/26714255
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26714255
has comment: http://stackoverflow.com/comment/42018846
has body: I created an android app by using HTML5, javascript and phonegap. I got the final apk. But when I install the apk in mobile and open it, it opens in vertical mode. But I want it to be opened in horizontal mode. How can I do that?
tagged with: android
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42019248

http://stackoverflow.com/comment/42000072
type: QuestionComment
comment on: http://stackoverflow.com/q/26703167
type: Comment
score: 1
has text: I think your "endpoint" should be a directive and not a controller

http://stackoverflow.com/comment/42126381
comment on: http://stackoverflow.com/a/26771852
score: 0
type: AnswerComment
type: Comment
has text: Thanks for your great answer. This is the answer what I was looking for. Really helpful, plus I want to remove all children media query css, any idea?

http://stackoverflow.com/q/26736974
favorite count: 0
has body: I'm using jasmine and karma for unit tests of my app, with approx. 1000 tests at the moment, it takes around 10 seconds until they're finished. It's not a problem right now, but in a couple of months the number of tests might become much bigger and I'd like to know if there's anything I can do to make them run faster, at least locally. I found out that using: jasmine.any(Object) is much faster than comparing big objects. Changing: expect(some.method).toHaveBeenCalledWith("xyz"); into: expect(some.method.calls.argsFor(0)[0]).toBe("xyz"); also seems to be a little bit faster. Karma is lovely but it doesn't seem to have anything that improves performance yet, it's really useful for debugging though (reportSlowerThan). Any other ideas how can I improve the performance of the tests?
type: UnansweredQuestion
tagged with: unit-testing
tagged with: performance
tagged with: javascript
has title: jasmine tests, how can I improve the performance?
score: 4
type: Question
upvote count: 4
answer count: 1
has answer: http://stackoverflow.com/a/41849482
downvote count: 0
tagged with: jasmine

http://stackoverflow.com/comment/42167260
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26796495
type: AnswerComment
has text: Thanks! So what I am trying to do is store the values when the user hits "next page" and reveal the next hidden div. So I don't want to store it as soon as it changes, only when they hit this button. Also, I don't want values on different "pages." to overlap. Is there another function rather than "onchange"? I guess I can store the values in temporary variables until they hit next page...

http://stackoverflow.com/a/26747527
accepted answer of: http://stackoverflow.com/q/26745674
score: 4
has body: It happens because view is detached from DOM. If you specify {el:"#fooDiv"}, #fooDiv element must be in DOM. I think there should be something like this: &lt;script id="fooTemplate" type="text/template"&gt; &lt;div class="bar"&gt;&lt;/div&gt; &lt;/script&gt; Add #fooDiv in html markup &lt;body&gt; ... &lt;div id="fooDiv"&gt;&lt;/div&gt; ... &lt;/body&gt; and then you can do // "wrap" new Layout around existing div new FooLayout({ el: '#fooDiv' }); // etc. or // create a new DOM element with the id 'fooDiv': var fooLayout = new FooLayout({ id: 'fooDiv' }); fooLayout.render(); document.body.appendChild(fooLayout.el); // or $('body').append(fooLayout.el);
type: AcceptedAnswer
type: Answer
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/26745674

http://stackoverflow.com/q/26740839
tagged with: javascript
tagged with: jquery
score: 0
has body: I would like to update radius for circle elements in force-directed graph, but when I want to select d3.js object I get error undefined is not a function. Here is structure of svg element Click event, which triggers new radius $("#resizeN").on("click",function(){ for (var i = 0; i &lt; nodes.length; i++){ var f = d3.select("svg #n" + (i+1).toString().attr("r", function (n){ return 30 * graph.nodeSizeFactor; })); } }); complete sample
accepted answer: http://stackoverflow.com/a/26741184
has title: Update radius for circle elements in d3.js
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26741184
answer count: 1

windows
tags question: http://stackoverflow.com/q/26759024
tags question: http://stackoverflow.com/q/26750225
tags question: http://stackoverflow.com/q/26728694
type: Tag
tags question: http://stackoverflow.com/q/26717720
tag name: windows

http://stackoverflow.com/q/26703985
type: AnsweredQuestion
type: Question
tagged with: mongodb
tagged with: javascript
has answer: http://stackoverflow.com/a/26704046
accepted answer: http://stackoverflow.com/a/26704046
score: 0
answer count: 1
tagged with: meteor
has body: On startup I add data to meteor from a json file like this: 13 if (Meteor.isServer) { 14 15 //startup 16 Meteor.startup(function () { 17 if(Plugins.find().count() === 0) { 18 var plugins_data = JSON.parse(Assets.getText('plugins_data.json')); 19 _.each(plugins_data, function(){ 20 Plugins.insert( plugins_data ); 21 console.log('created new plugin record'); 22 }); 23 } 24 }); 25 26 } I have a collection called plugins that looks like using db.plugins.find().pretty() in meteor mongo to view the data: "222" : { "plugin-name-one" : { "data" : [ { "id" : 888, "title" : "" } ] } }, "223" : { "plugin-name-two" : { "data" : [ { "id" : 555, "title" : "" } ] } }, Here how I'm trying to display the data: 3 if (Meteor.isClient) { 4 5 Template.list.helpers({ 6 list_all: function() { 7 return Plugins.find(); 8 } 9 }); 10 11 } and html template: 5 6 Welcome to Meteor! 7 {{> list}} 8 9 10 11 12 {{#each list_all}} 13 {{name}} 14 {{/each}} 15 How do I show the data from the field (and the field name) plugin-name-1 and plugin-name-2 as shown from my mongo collection? I can't find any info from the docs. How do I display this data correctly?
has comment: http://stackoverflow.com/comment/42001136
has title: Displaying data from Meteor 1.0
tagged with: node.js

http://stackoverflow.com/q/26741201
linked to: http://stackoverflow.com/q/26660495
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27029769
tagged with: angularjs-directive
type: Question
has body: I have these directive app.directive("myarticle",function($timeout){ return { restrict: "E", replace: true, templateUrl: "templates/article.html", link: function(scope, element, attrs) { element.getVal() } , scope: { cat: "=", mainurl: "=" } } }); here is the directive template link to cat the jquery getVal function (function($) { $.fn.getVal = function() { this.each(function() { var url =$(this).find("a").attr("href"); console.log(url); }); }; })(jQuery); the function is so long , I tried to simplify it as I can what I expected to render is "#/cats/1" but what is rendered is "#cats/{{cat.id}}" so how can I get the value of expression not the expression it self
score: 0
has title: get the value of the child element of directive
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42068656

npm
tags question: http://stackoverflow.com/q/26760328
type: Tag
tags question: http://stackoverflow.com/q/26700413
tags question: http://stackoverflow.com/q/26807128
tags question: http://stackoverflow.com/q/26728194
tags question: http://stackoverflow.com/q/26806606
tags question: http://stackoverflow.com/q/26744807
tag name: npm

http://stackoverflow.com/comment/112342288
type: Comment
comment on: http://stackoverflow.com/a/27107324
has text: If using PHP SDK it can be done like this `$scope = array(VKOAuthUserScope::WALL, VKOAuthUserScope::GROUPS, VKOAuthUserScope::OFFLINE);` this will get the wall scope, group scope and return the long lived access token
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42183009
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26804494
has text: @segFault Yeah, I'm 90% positive you need the ()'s in there because it is an observable. I don't believe if is a reserved word in the html, but I'll give that a try
score: 0

http://stackoverflow.com/q/26818605
tagged with: javascript
favorite count: 0
has title: Intermittent "Looking up elements via selectors is not supported by jqLite!" when loading AngularJS with RequireJS
tagged with: angularjs
type: Question
score: 33
has answer: http://stackoverflow.com/a/37258276
answer count: 3
tagged with: requirejs
has answer: http://stackoverflow.com/a/26818606
possible better answer: http://stackoverflow.com/a/37258276
upvote count: 33
has body: I load AngularJS through RequireJS. Most of the time there is no problem but once in a while I get the error: Uncaught Error: [jqLite:nosel] Looking up elements via selectors is not supported by jqLite! I know that everything is actually loading so the issue is not with RequireJS not finding the files. Here is my RequireJS configuration: require.config({ baseUrl: 'lib/', paths: { jquery: 'external/jquery-2.1.1', angular: 'external/angular', }, shim: { angular: { exports: "angular" }, }, }); Here is how I load RequireJS and kickstart the load: &lt;script type="text/javascript" src="lib/requirejs/require.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="requirejs-config.js"&gt;&lt;/script&gt; &lt;script&gt; require(["start"]); &lt;/script&gt; I'm using AngularJS 1.3.0 and RequireJS 2.1.15.
has answer: http://stackoverflow.com/a/54031900
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26818606
downvote count: 0

http://stackoverflow.com/q/26826989
has comment: http://stackoverflow.com/comment/42221974
type: Question
tagged with: c#
upvote count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42221951
has comment: http://stackoverflow.com/comment/42221873
has comment: http://stackoverflow.com/comment/42221930
has comment: http://stackoverflow.com/comment/42221891
answer count: 0
downvote count: 0
type: UnansweredQuestion
has title: Local Storage does not work in Internet Explorer
has body: I am working on a project in which I need to display new data whenever data in database changes, so I am using the local storage concept. Everything is working fine in Chrome and Firefox, but in Internet Explorer it's not working. I understand that it's a problem with local storage in IE. Can anyone suggest a better way of doing this using ASP.net? if ('localStorage' in window &amp;&amp; window['localStorage'] !== null) { //use localStorage object to store data try { var webmethod = top.GetBaseUrl() + '/GetNewlyGeneratedEvents.aspx'; $.ajax({ type: "GET", url: webmethod, success: function (msg) { var htmlCnt = $.parseHTML(msg); var text = $(htmlCnt).find('#divNewEvents').html(); if (localStorage.length &gt; 0) { localStorage.clear(); } localStorage.setItem('NewEvents', text); UpdateNewEventContent(text); }, error: function (e) { alert("error in bringing newEventData"); }, async: true }); } catch (e) { if (e == QUOTA_EXCEEDED_ERR) { alert('Quota exceeded!'); } } } else { alert('Cannot store user preferences as your browser do not support local storage'); }
has comment: http://stackoverflow.com/comment/42222056
has comment: http://stackoverflow.com/comment/42222009
tagged with: internet-explorer
linked to: http://stackoverflow.com/q/3452816
score: 1
has comment: http://stackoverflow.com/comment/42221968
has comment: http://stackoverflow.com/comment/42222063

http://stackoverflow.com/q/26819363
has title: Single html file for add edit view or multiple files
has answer: http://stackoverflow.com/a/26819483
score: 0
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42208562
has body: Currently I am developing a simple CRUD application and let us say that I have a employye form and user has options to add new employee or edit/view employee from database (simple crud forms). Is it better to have a) one html file with a lot of logic in javascript or b) multiple html files with a lot of duplicated code but less logic in javascript ? In the future forms may become more complicated (business process, some fields visible only for user with specific rights etc.). I am wondering what is the best solution. It is a web applcation with AngularJS.
has comment: http://stackoverflow.com/comment/42208510
tagged with: http://stackoverflow.com/tag/html
type: Question

http://stackoverflow.com/a/26684159
type: Answer
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26684091
has body: Node is an asynchronous server. When you execute a request that is going to block, the node engine continues executing the following code. You're passing the request module a callback, but your console.log is being executed immediately after the request is fired off and before and results have returned. What you want to do is put your code where you use the data inside the callback function. var request = require('request'); request('https://api.forecast.io/forecast/{API KEY}/42.47994,-83.13040', function (error, response, body) { if (!error &amp;&amp; response.statusCode == 200) { //var info = JSON.parse(body); var jsonObject = JSON.parse(body); var summary = jsonObject.currently.summary; var temp = jsonObject.currently.temperature; var realFeel = jsonObject.currently.apparentTemperature; var summary2 = jsonObject.hourly.summary; var max = jsonObject.daily.data[0].temperatureMax; var min = jsonObject.daily.data[0].temperatureMin; console.log('Todays forecast ' + summary2 + ' With a current Tempature of ' + temp + '. But feels like ' +realFeel + ' With a high of '+max+' and a low of '+min); } }) You should also not ignore errors. var request = require('request'); request('https://api.forecast.io/forecast/{API KEY}/42.47994,-83.13040', function (error, response, body) { if (error) throw error; if (response.statusCode != 200) return console.log('Invalid status code: '+response.statusCode) var jsonObject = JSON.parse(body); var summary = jsonObject.currently.summary; var temp = jsonObject.currently.temperature; var realFeel = jsonObject.currently.apparentTemperature; var summary2 = jsonObject.hourly.summary; var max = jsonObject.daily.data[0].temperatureMax; var min = jsonObject.daily.data[0].temperatureMin; console.log('Todays forecast ' + summary2 + ' With a current Tempature of ' + temp + '. But feels like ' +realFeel + ' With a high of '+max+' and a low of '+min); });
upvote count: 3

http://stackoverflow.com/comment/42091621
type: QuestionComment
comment on: http://stackoverflow.com/q/26754396
score: 2
has text: are u getting error in console?
type: Comment

http://stackoverflow.com/comment/52615112
comment on: http://stackoverflow.com/a/26856288
has text: Lodash (in its current version, 3+) does lazy chaining, avoiding to create intermediate arrays when possible. See *“Chain” Methods* in the [Lodash documentation](https://lodash.com/docs).
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42118597
has text: got the if statement to work but not sure how to re instantiate the sortable.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26768664
type: AnswerComment

http://stackoverflow.com/q/26742546
type: AnsweredQuestion
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26744039
has title: Html table with fixed columns
has comment: http://stackoverflow.com/comment/42071226
has comment: http://stackoverflow.com/comment/42071322
possible better answer: http://stackoverflow.com/a/26743845
has answer: http://stackoverflow.com/a/26743845
has comment: http://stackoverflow.com/comment/42071109
has comment: http://stackoverflow.com/comment/42071453
answer count: 2
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26744039
favorite count: 0
has body: I'm trying to make my first 3 columns of my table fixed so that they always show when scrolling horizontally. But they need to move when scrolling vertically I made a excel table with what it needs to do : I have tried http://jsfiddle.net/YMvk9/5294/ .headcol { position:absolute; width:5em; left:0; top:auto; border-right: 0px none black; border-top-width:3px; margin-top:-3px; with scrollTop of jquery of the right scrollbar so I move the top value of the yellow cells. The current problem is that when I fill up the html table with the database the yellow cells are shown even tho my overflow is "scrolled" since they are absolute. See next image : Any way to fix this problem. So that they are hidden? Or any other solution to what I have to do would be appreciated
linked to: http://stackoverflow.com/q/5622716
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42070939

http://stackoverflow.com/q/26781498
has answer: http://stackoverflow.com/a/26781655
accepted answer: http://stackoverflow.com/a/26781655
tagged with: angularjs-ng-repeat
has title: ng-repeat with assocative array
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/26782590
has body: Ok trying to do what I should be a simple thing, I need to use ng-repeat with and assocative array. Totally lost on why this isn't working. It works perfectly with number based array keys, but not text characters. function HelloCntl($scope) { $scope.friends = []; $scope.friends[0] ='John', $scope.friends[1]= 'Mary', $scope.friends['aksnd']= 'Mike', $scope.friends['alncjd']= 'Adam', $scope.friends['skdnc']= 'Julie' } ---- &lt;div ng-controller="HelloCntl"&gt; &lt;ul&gt; &lt;li ng-repeat="friend in friends"&gt; &lt;span&gt;{{friend}}&lt;/span&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; I also put together this is fiddle to show whats happening http://jsfiddle.net/b9g0x7cw/4/ What am I doing wrong here? am I missing something obvious? Thanks guys!
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26782590
tagged with: arrays
tagged with: javascript
score: 0
answer count: 2

http://stackoverflow.com/comment/42088084
score: 0
has text: No. This is the only code i have. what i need to add?
comment on: http://stackoverflow.com/q/26752367
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26765251
has title: directive is not returning an html element
favorite count: 0
accepted answer: http://stackoverflow.com/a/26765408
has body: I'm a bit struggling to get my head around directive where I'm trying to pass in a name and I want the directive to return an into a table. here is how name defined in the controller: $scope.name = 'foo'; here is the html status here is the directive angular.module('myApp') .directive('iconSelector', function ($compile) { return { restrict: 'E', scope:{ filterby:'=' }, link: function(scope,element, attrs) { console.log(scope.filterby); if (scope.filterby === 'foo') { return ' '; }else { return ' invalid '; } } }; }); So ideally, when the directive process the {{name}} it should look like below in the browser: status Can someone tell me what I'm doing wrong, a plunker demo would be appreciated.
tagged with: angularjs
upvote count: 1
has answer: http://stackoverflow.com/a/26765840
has comment: http://stackoverflow.com/comment/42111489
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/26765840
type: Question
tagged with: angularjs-directive
answer count: 2
has answer: http://stackoverflow.com/a/26765408
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/26828495
has comment: http://stackoverflow.com/comment/42224603
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42224882
has comment: http://stackoverflow.com/comment/42225100
type: Answer
score: 1
upvote count: 1
has body: If your inputs are being added dynamically then you should use delegation: $('body').on("change", 'input[name=terminal]', checkRightBarVisibility); (In jQuery, how to attach events to dynamic html elements?)
accepted answer of: http://stackoverflow.com/q/26827577
answers question: http://stackoverflow.com/q/26827577

http://stackoverflow.com/comment/42006854
type: Comment
comment on: http://stackoverflow.com/a/26707051
has text: yeah. that was the mistake in this case. Thanks! However, in the original problem, turned out that content wouldn't copy because of numbers in var. Do you know how come?
score: 0
type: AnswerComment

http://stackoverflow.com/q/26781371
answer count: 4
has comment: http://stackoverflow.com/comment/42175168
possible better answer: http://stackoverflow.com/a/28736038
downvote count: 0
has answer: http://stackoverflow.com/a/28737438
tagged with: javascript
has answer: http://stackoverflow.com/a/28736038
type: AnsweredQuestion
favorite count: 0
has body: In case someone wants to try: https://github.com/codependent/cluster-performance I am testing Node.js (v0.11.13 - Windows 7) request per second limits with a simple application. I have implemented a service with Express 4 that simulates an I/O operation such as a DB query with a setTimeout callback. First I test it with only one node process. For the second test I start as many workers as CPUs the machine has. I am using loadtest to test the service with the following parameters: loadtest -n 50000 -c 220 -k http://localhost:5000/operations/timeout/20 That is to say, 50k total requests, 220 concurrent clients. My service sets the timeout (the duration of the processing time) according to the last url parameter (20 mseg): router.route('/timeout/:time') .get(function(req, res) { setTimeout(function(){ appLog.debug("Timeout completed %d", process.pid); res.json(200,{result:process.pid}); },req.param('time')); }); Only one node process These are the results: INFO Max requests: 50000 INFO Concurrency level: 200 INFO Agent: keepalive INFO INFO Completed requests: 50000 INFO Total errors: 0 INFO Total time: 19.326443741 s INFO Requests per second: 2587 INFO Total time: 19.326443741 s INFO INFO Percentage of the requests served within a certain time INFO 50% 75 ms INFO 90% 92 ms INFO 95% 100 ms INFO 99% 117 ms INFO 100% 238 ms (longest request) 2580 requests per second, not bad. n workers (n = numCPUs) In this case I distribute the load equally among the workers using the round robin scheduling policy. Since now there are 8 cores processing requests I was expecting a significant improvement (8 times faster?) in the requests per second results but it only increased to 2905 rps!!! (318 rps more) How can you explain that? Am I doing something wrong? Results: Max requests: 50000 Concurrency level: 220 Agent: keepalive Completed requests: 50000 Total errors: 0 Total time: 17.209989764000003 s Requests per second: 2905 Total time: 17.209989764000003 s Percentage of the requests se…
score: 15
type: Question
accepted answer: http://stackoverflow.com/a/28737438
has title: Node.js cluster doesn't significantly improve performance
has answer: http://stackoverflow.com/a/41311785
tagged with: node.js
has comment: http://stackoverflow.com/comment/42167420
has answer: http://stackoverflow.com/a/41310957
tagged with: cluster-computing
upvote count: 15

http://stackoverflow.com/comment/42038271
type: QuestionComment
score: 0
has text: @bigal - try to watch it on e.g. Samsung Galaxy Note Edge (only 3'' width and 1600x2560px) - the menu buttons are almost invisible there (due to max-width: 960px which on PC results in nice few cm, but on that Samsung it's end up us like millimeters).
comment on: http://stackoverflow.com/q/26721394
type: Comment

http://stackoverflow.com/q/26784052
tagged with: javascript
has title: How to set a unique ID for each person in a Firebase database so I can choose which to remove if more than one person have the same name?
has comment: http://stackoverflow.com/comment/42187157
answer count: 2
has comment: http://stackoverflow.com/comment/42195250
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/26047958
has comment: http://stackoverflow.com/comment/42186900
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42187102
tagged with: firebase
has answer: http://stackoverflow.com/a/39876513
score: 1
has answer: http://stackoverflow.com/a/26812010
upvote count: 1
has body: I'll try to explain this as good as I can. I'm making a contact book where you can store the following: First name Last name Email Phone number There's nothing that prevents you from adding two persons with an identical first and last name, for example Tom Sawyer. Now, let's say we have two Tom Sawyer added to the Firebase database, under two random and unique keys generated by the Firebase database. Like this: And it's displayed in the HTML like this: When you click on the remove button beside one of the names it should go away both from the HTML and the database. Here's where it gets tricky though, I have no way of telling which Tom Sawyer should be removed from the database, I can't use the unique key names because if I loop through them and search for Tom Sawyer I will get two hits and it will just pick one at random. My first thought would be to add a second unique ID as a property, but this will just fail in the same way as the unique Firebase key IDs. The unique ID has to be tied to the first and last name added without being randomized (at least the way I see it) so that I can tie the HTML Tom Sawyer to the Tom Sawyer in the database. This has to happen independently of how many Tom Sawyer that exists in the database or it will not work. How should I approach this problem?
type: Question
has comment: http://stackoverflow.com/comment/42153609

http://stackoverflow.com/comment/42159339
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26791249
score: 0
has text: When supplying data, give us the very minimum necessary to demonstrate the problem. Anything more wastes space and makes it harder to work with.

http://stackoverflow.com/q/26804847
has title: Convert raw blob back to the file it was?
tagged with: sql-server
score: 0
has comment: http://stackoverflow.com/comment/42185003
type: UnansweredQuestion
has body: the question I have is: How do I convert blob(I think?) back to it's actual filetype? I'm honestly not sure where to ask this so I figured I'd start here. Sorry in advance if it's not. At work we have this older system. I say older because it was put in place before I was got here, not because it's actually old. It stores documents that we process into a mssql database. The file types are pdf, excel, msg, and probably more. An example row from the DB. id 7 docid 7 filename Medical benefits and rates.pdf filesize 50669 filetype pdf path NULL image 2030206F626A0D0A3C3C202F54797065202F50616765202F506172... created 2009-06-02 18:45:15.483 modified NULL isdeleted 0 session NULL isencrypted 0 Obviously I've shortened the image cell for security reasons. It's length is 43436. But given that information, is there anyway I can render this out to a user in it's original format? Be it a 3rd party program, or library. I'm fairly proficient with python, and web development.
tagged with: python
answer count: 0
type: Question
linked to: http://stackoverflow.com/q/5649407
tagged with: javascript
has comment: http://stackoverflow.com/comment/42182985

http://stackoverflow.com/q/26717912
type: Question
has comment: http://stackoverflow.com/comment/42026785
has comment: http://stackoverflow.com/comment/42026605
has comment: http://stackoverflow.com/comment/42026838
has comment: http://stackoverflow.com/comment/42026402
tagged with: javascript
has comment: http://stackoverflow.com/comment/42128496
has comment: http://stackoverflow.com/comment/42026000
score: 0
has body: I've this two line: Consulenza tecnica Arch. Rocco Beretta Consulenza tecnica Arch. Rocco Beretta First is not regular UTF-8 Second line is regular UTF-8 Try with Google Chrome. Now, I do not understand what is the difference between the two lines. Can I remove no UTF-8 char from first line? Can you help me? Carlo
has comment: http://stackoverflow.com/comment/42096458
has comment: http://stackoverflow.com/comment/42027018
tagged with: utf-8
has title: Javascript - remove no UTF-8 from XML
has comment: http://stackoverflow.com/comment/42026852
tagged with: http://stackoverflow.com/tag/xml
has comment: http://stackoverflow.com/comment/42027005
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42034122
has comment: http://stackoverflow.com/comment/42107861
answer count: 0
has comment: http://stackoverflow.com/comment/42026664
has comment: http://stackoverflow.com/comment/42026571

http://stackoverflow.com/q/26755291
accepted answer: http://stackoverflow.com/a/26755364
has answer: http://stackoverflow.com/a/26755552
upvote count: 1
tagged with: checkbox
tagged with: css
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/26755552
type: Question
downvote count: 0
has body: I have the following view: Text Input? Employee ID: Employee ID: --Select-- INCB001 INCB002 INCB003 What I want to do is this: By default, the checkbox is unchecked, the textbox is hidden and disabled and the select element is visible, and I can only post data from the options in the select element, I can not post data from textbox. But if I check the checkbox, then select element becomes hidden and disabled, and the textbox is visible and enabled, and I can only post data from textbox and not from the select element. If I uncheck the checkbox again, the behavior is reversed and so on. Unfortunately, the jQuery code I have below doesn't allow me to disable/enable and show/hide the divs properly on checkbox change. Here's my jQuery code: It seems there's something wrong with my jQuery code, only just I can't figure out myself.
tagged with: javascript
has answer: http://stackoverflow.com/a/26755364
tagged with: jquery
has answer: http://stackoverflow.com/a/26755783
answer count: 3
has title: Simultaneous div show/hide and enable/disable on checkbox check/uncheck using Javascript/jQuery
tagged with: http://stackoverflow.com/tag/html
favorite count: 0

http://stackoverflow.com/q/26809214
accepted answer: http://stackoverflow.com/a/26809313
has body: I'm trying to get the last word that I type into a text area and send it into a function. $('document').ready(function () { $('#my_text').focus(function () { $('#my_text').keydown(function (e) { if (e.keyCode == '32') { console.log("Space"); var lastWord = ""; //Code to get last word that was typed getLastWord(lastWord); //$('DivToScroll').css("keyword"); } }); console.log("Focused"); }); }); I can't seem to find the right code to get the last word typed in the text area, I have looked around and have had no such luck either. Any help would be greatly appreciated, thank you.
answer count: 1
has comment: http://stackoverflow.com/comment/42191236
tagged with: jquery
has comment: http://stackoverflow.com/comment/42191116
favorite count: 0
has comment: http://stackoverflow.com/comment/42191226
has comment: http://stackoverflow.com/comment/42191252
has comment: http://stackoverflow.com/comment/42191235
has comment: http://stackoverflow.com/comment/42191132
type: AnsweredQuestion
upvote count: 2
score: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42191493
has title: Getting last word typed in text area
tagged with: javascript
has answer: http://stackoverflow.com/a/26809313

http://stackoverflow.com/a/27117963
answers question: http://stackoverflow.com/q/26717574
type: Answer
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/42764182
has body: You can group data using the google.visualization.data.group function. This should work for your example: var data = new google.visualization.DataTable(); data.addColumn('date', 'Date'); data.addColumn('number', 'Price'); data.addRows([ [new Date("2011-02-01T15:18:21+00:00"), 21.77], [new Date("2011-03-01T15:18:59+00:00"), 20.96], [new Date("2011-12-01T07:54:15+00:00"), 17.04], [new Date("2012-01-01T10:29:00+00:00"), 20.43], [new Date("2012-02-01T08:03:00+00:00"), 22.51], [new Date("2012-03-01T08:07:00+00:00"), 26.75], [new Date("2013-01-02T16:16:00+00:00"), 20.7], [new Date("2013-02-03T13:51:00+00:00"), 24.41], [new Date("2013-03-01T08:06:00+00:00"), 25.44], [new Date("2014-01-01T10:19:00+00:00"), 16.24], [new Date("2014-02-01T10:16:00+00:00"), 19.13], [new Date("2014-03-01T08:05:00+00:00"), 17.68], [new Date("2014-04-01T08:11:00+00:00"), 10.97] ]); var groupedData = google.visualization.data.group(data, [{column: 0, modifier: getYearForRow, type: 'string', label: 'Year'}], [{column:1, aggregation: google.visualization.data.sum, type: 'number', label: 'Total'}]); function getYearForRow(date){ return date.getFullYear().toString(); } // Set chart options var options = {'title':'Chart Title', 'width':400, 'height':300}; // Instantiate and draw our chart, passing in some options. var chart = new google.visualization.LineChart(document.getElementById('chart_div')); chart.draw(groupedData, options); EDIT I thought I'd leave my old answer, in case it could help anyone. The code for your specific use case is below and a link to jsFiddle. From what I can tell there's no easy way to get the month strings to display in correct order, only the month numbers. If you want the month strings to show up, you'll need to make another copy of the grouped table with a string value for the first column and covert the number to a string (Jan, Feb...). // Load the Visualization API and the piechart package. google.load('visualization', '1.0', {'packages':['corechart']}); // Set a callback…
downvote count: 0
has comment: http://stackoverflow.com/comment/42745897

http://stackoverflow.com/comment/41952495
type: Comment
score: 0
type: QuestionComment
has text: Dosn't matter, for example from -10 to -1
comment on: http://stackoverflow.com/q/26675989

http://stackoverflow.com/q/26805279
upvote count: 1
has answer: http://stackoverflow.com/a/28072636
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26818557
possible better answer: http://stackoverflow.com/a/28072636
tagged with: javascript
type: Question
answer count: 2
has body: Please check this demo plunker to understand my problem better. In my main page I've a table. Each table row is followed by an empty row which is hidden initially. When clicked on first row, I am injecting html within the empty row below it using directive Main Page Index.html: {{student.FirstName}} {{student.LastName}} Directive used for injecting html on click of first row: appRoot.directive('rowDirctive', function ($compile) { return { restrict: 'C', replace: false, link: function (scope, element) { element.bind("click", function () { var rowId = "#"+scope.student.Id; var innerhtml = angular.element($compile('' + '')(scope)); if ($(rowId + " td span").length === 0) { $(rowId + " td").html(innerhtml); } if ($(rowId).is(':hidden')) { $(rowId).slideDown("slow"); } else { $(rowId).slideUp("slow"); } }); } }; }); Now when click on first row, the span is included within the empty row which itself contains ng-include="_StudentDetailsTabs.html". The _StudentDetailsTabs.html partial is included properly, I've no issue with it. But the _StudentDetailsTabs.html partial itself contains another three ng-include attributes which are not working. _StudentDetailsTabs.html: Now when the above partial _StudentDetailsTabs.html is included into the empty row, why the ng-includes within it (_StudentDetailsTabs.html) not working. Why its not including the partials? Edit: Here is the demo plunker. Now I don't know why, when I created this plunker the _StudentDetailsTabs.html is also not being included.
downvote count: 0
tagged with: jquery
has title: Nested ng-include not working when element containing the ng-include attribute is itself added using ng-include attribute in angularjs
favorite count: 0
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42204044
has answer: http://stackoverflow.com/a/26818557
has comment: http://stackoverflow.com/comment/42184119
score: 1

http://stackoverflow.com/a/26729304
has body: When you call a new Date([optional parameter]) you create a new instance of the Date function which stores data specific to this instance (date and time). Math does not need to store any instance specific data, because PIdoes not change and all Math functions, like sin, cos, max etc., they always do the same thing. That's why Math exists as a static object (like a static class in other languages). There is no need to create new instances of this object, you can use the same instance everywhere. BTW Date has static methods too, like Date.parse(). You dont need to create a new Date to use this method. You call it like you would call Math.cos(x), just Date.parse('2014-11-04').
score: 0
answers question: http://stackoverflow.com/q/26728904
type: Answer

http://stackoverflow.com/comment/42020206
score: 1
has text: Yes) this link was as answer to my own question)
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26705748

http://stackoverflow.com/a/26694414
has comment: http://stackoverflow.com/comment/41984432
score: 3
has body: You are not using reduce function properly. Typical usage of reduce for summing values is that you provide an initial value as the third argument and return incremented value on every step of callback. Correct code: $scope.loan.total_expenses = _.reduce(original, function(prev, curr) { prev += curr.cost; return prev; }, 0); In your case you have three objects in array and reduce callback will be called three times: prev = 0, curr = original[0] => prev becomes original[0].cost. prev = original[0].cost. curr = original[1] => prev becomes prev + original[1].cost, i.e. original[0].cost + original[1].cost. etc. Demo: http://plnkr.co/edit/YN35z6kDr7k4DOaQOOcr?p=preview
has comment: http://stackoverflow.com/comment/41984472
has comment: http://stackoverflow.com/comment/41984296
upvote count: 3
has comment: http://stackoverflow.com/comment/41989123
has comment: http://stackoverflow.com/comment/41984393
answers question: http://stackoverflow.com/q/26694332
type: Answer
downvote count: 0

http://stackoverflow.com/comment/42146544
type: Comment
has text: because you just allowed all characters between 106 and 190 to be valid as well.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26783113

http://stackoverflow.com/comment/42025569
has text: yep.. even tried with bounds_cahnged but thats also making multiple server calls....
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26715769

http://stackoverflow.com/a/26678877
has body: Each time you create a new slider you are overwriting the window and document mouse event handlers, so the last one is a bit greedy and gets to call it's function when the mouse leaves the el and the others don't. My advice would be to not place handlers on the window or document and call dragstop when the mouse leaves the sliders div //bind event handlers dragger.onmousedown = dragStart; dragger.onmousemove = dragMove; dragger.onmouseup = dragStop; holder.onmousemove = dragMove; holder.onmouseup = dragStop; line.onmousemove = dragMove; line.onmouseup = dragStop; el.onmousemove = dragMove; el.onmouseup = dragStop; el.onmouseleave = dragStop; I was also seeing some ghosting of the dgragger in chrome but this can easly fixed by adding a transparent outline to the gragger .slider-dragger { position: absolute; width: 26px; height: 11px; border-radius: 3px; background-color: #555; top: -3px; left: 0px; cursor: pointer; z-index: 10; outline: 1px solid transparent; } here is a fiddle showing the end result http://jsfiddle.net/leighking2/bhymxrqr/9/
type: Answer
has comment: http://stackoverflow.com/comment/41956936
answers question: http://stackoverflow.com/q/26678104
score: 0

http://stackoverflow.com/comment/42001747
score: 1
type: AnswerComment
type: Comment
has text: Vote up this question so that I can mark question as complete
comment on: http://stackoverflow.com/a/26703940

http://stackoverflow.com/comment/41959358
comment on: http://stackoverflow.com/q/26677514
has text: @SLaks so, the only option to have a pure client side app is to make a login check to a remote server before each request, since the app can't store anything persistently in a secure way? the question is about this. The possible ways.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26686857
tagged with: node.js
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/26691200
score: 1
accepted answer: http://stackoverflow.com/a/26691200
type: Question
linked to: http://stackoverflow.com/q/4195970
tagged with: javascript
has body: I'm using Hapi.js for a project and a config variable that I'm passing to my handler is coming up as undefined when I call my route. What am I doing wrong? server.js var Hapi = require('hapi'); var server = new Hapi.Server('0.0.0.0', 8080); // passing this all the way to the handler var config = {'number': 1}; var routes = require('./routes')(config); server.route(routes); server.start(); routes.js var Home = require('../controllers/home'); module.exports = function(config) { var home = new Home(config); var routes = [{ method: 'GET', path: '/', handler: home.index }]; return routes; } controllers/home.js var Home = function(config) { this.config = config; } Home.prototype.index = function(request, reply) { // localhost:8080 // I expected this to output {'number':1} but it shows undefined console.log(this.config); reply(); } module.exports = Home;
upvote count: 1
answer count: 1
tagged with: hapi.js
favorite count: 0
has title: Hapi showing undefined variable inside handler

http://stackoverflow.com/comment/41996323
has text: One thing to check: your platform.js script needs to be *above* the polymer html imports. (they are working on fixing that).
comment on: http://stackoverflow.com/q/26695167
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/31464420
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26712524
downvote count: 0
has body: well, if you are using arcgis js api 3.14; in this case map has its own event binder, try that... Below is the working code: var esriMap = new Map(mapId, { basemap:"satellite", center :[-97.031, 37.638], zoom :4, slider :false }); esriMap.on("click", lang.hitch(this, function (evt) { alert("click esrimap"); })); Hope this will help you :) Let me know if any clarifications required.

http://stackoverflow.com/comment/77179855
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26756910
type: Comment
has text: This try catch formulation is non-standard and mozilla (Firefox) only.

http://stackoverflow.com/comment/41959938
type: QuestionComment
has text: Otherwise is could always be a $_SESSION variable stored somewhere... If you use PHP. Just sayin'
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26679607

http://stackoverflow.com/a/26768905
score: 2
has comment: http://stackoverflow.com/comment/43645722
has comment: http://stackoverflow.com/comment/43643381
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26760458
has body: At FVI we have the same issue and solved it as old school as it gets. First we created a rtf document of the label we wanted. In this template we had key words in the file such as @@CUSTOMER@@ and @@ADDRESS01@@. Step one was opening the template into memory, text substitute the key words and save to a web link for opening and printing. By making a new RTF file on the fly we did not have to worry about the software on the other end of the connection. we just presented our factory with a correctly formatted response that fit to the printer definition we had established. Thus on the web page it has a select option for label type and that loads the correct template into memory for final output. Not the best way to do it, but it cost us only 1 day of layout and simple html programming and zero issues with our China Factories.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26760458
has comment: http://stackoverflow.com/comment/42118414
type: Answer
downvote count: 0

http://stackoverflow.com/comment/42007603
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26707548
has text: this is html ng-repeat loop " {{key}} : {{value}} "
score: 0

http://stackoverflow.com/comment/42179622
type: QuestionComment
comment on: http://stackoverflow.com/q/26802809
has text: possible duplicate of [Question mark in JavaScript](http://stackoverflow.com/questions/1771786/question-mark-in-javascript)
score: 0
type: Comment

http://stackoverflow.com/comment/42188102
has text: So would the code $(".tags ul").on("click", "li", function() { ... }); suffice? If not I will withdraw this answer
type: AnswerComment
comment on: http://stackoverflow.com/a/26807374
type: Comment
score: 0

this
tags question: http://stackoverflow.com/q/26805109
type: Tag
tags question: http://stackoverflow.com/q/26740499
tags question: http://stackoverflow.com/q/26722715
tags question: http://stackoverflow.com/q/26816177
tag name: this
tags question: http://stackoverflow.com/q/26741319

http://stackoverflow.com/q/26786900
score: 3
has comment: http://stackoverflow.com/comment/42150618
downvote count: 0
has comment: http://stackoverflow.com/comment/42151316
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42150382
has comment: http://stackoverflow.com/comment/42150645
has comment: http://stackoverflow.com/comment/42151196
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42153603
has comment: http://stackoverflow.com/comment/42150474
answer count: 0
upvote count: 3
has comment: http://stackoverflow.com/comment/42150258
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/5371139
has body: I am currently working on http://www.modsagency.com/home this page and trying animate logo size with scroll down. my jquery code is jQuery('#scrlBdy').scroll(function(e) { var y = jQuery("#scrlBdy").scrollTop(); var x = jQuery(document).scrollTop(); console.log(y); console.log(x); } it working on firefox well but on chrome and safari it return always 0 scrolltop. you can check on chrome console panel. I need it fix shortly for my client, please anyone help me. Thanks
type: Question
has comment: http://stackoverflow.com/comment/42150517
has comment: http://stackoverflow.com/comment/42150347
has title: scrollTop not working on chrome and safari browser
has comment: http://stackoverflow.com/comment/42150506

http://stackoverflow.com/q/26701492
has answer: http://stackoverflow.com/a/41001607
favorite count: 0
downvote count: 0
score: 2
accepted answer: http://stackoverflow.com/a/26741348
type: AnsweredQuestion
has title: Morris Donut chart no data issue
tagged with: raphael
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/26741348
has body: I am trying to plot some data correctly with Morris Charts using Donut shape. Morris.Donut({ element: 'donut-chart-revenue', data: [], }); but since the data variable can sometimes be empty (new user , no enough data) the donut shape breaks and i'm having a void placeholder ! How can i sort the problem or replace the placeholder with some text like "No enough data" ?
answer count: 2
tagged with: morris.js
tagged with: javascript
possible better answer: http://stackoverflow.com/a/41001607

http://stackoverflow.com/comment/42131142
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26762687
has text: Yes, my code sample in this answer will do that when `getuser.php` is requested by AJAX - it will pass the radio button value to `getuser.php` via the query string. But when you run `getuser.php` alone in your browser (just for testing) you will need to provide the value of `q` yourself in the query string, or it will not know what to use for `q`, and you will see this error.

http://stackoverflow.com/comment/41975474
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26689252
has text: Seems like you have a simple typo. You have `cont` should be `count`: `$scope.getPeople($scope.countSelection);`.

http://stackoverflow.com/q/26775569
accepted answer: http://stackoverflow.com/a/26881310
has body: I'm writing a huge javascript file and I need a way not to re-ident the file but also show the file in "Nice" organized way. For example. defaults : { campusTotal : 0, buildingTotal : 0, } I'm currently using emmet and auto-indent on save plugin in sublime. Can anyone point me for some good practices to keep code organized for Javascript developers? Thanks, R
has answer: http://stackoverflow.com/a/26881310
has title: reindenting and organizing Javascript on Sublime
type: Question
type: AnsweredQuestion
tagged with: sublimetext
tagged with: javascript
score: 0
tagged with: indentation
answer count: 1
tagged with: user-interface
tagged with: backbone.js

http://stackoverflow.com/comment/42071070
type: QuestionComment
has text: *Pass* the function to the invocation (a *callback*) instead of assigning the function as a property on the return value. Alternatively, use promises.
comment on: http://stackoverflow.com/q/26742456
score: 0
type: Comment

http://stackoverflow.com/a/26762810
has comment: http://stackoverflow.com/comment/42107628
score: 1
has comment: http://stackoverflow.com/comment/42111504
has comment: http://stackoverflow.com/comment/42113061
has comment: http://stackoverflow.com/comment/42107479
has comment: http://stackoverflow.com/comment/42111759
has comment: http://stackoverflow.com/comment/42112361
downvote count: 0
has comment: http://stackoverflow.com/comment/42112581
type: AcceptedAnswer
has body: You are overcomplicating it with the ret function. Here is a simplified version of your code where I simply return the promise that $http call returns: http://plnkr.co/edit/9VaqIuOVHyMI12Z0r3jm?p=preview To get your version to work, your ret function needs to return something ($http is an async call, so it doesn't matter its success actually callback returns something): var ret = function() { return $http.get('webtest.json').success(function(data) { // this ^^ is the key return data; }); }; Then, when the $http promise is resolved, the actual data content is in response.data, not just response (full response actually contains headers and other server call-related info). Here is your original version with those two fixes: http://plnkr.co/edit/mzsdTFWr3qAXGfizjRRC?p=preview That second example you wrote works because it return a simple $q promise (that's why $scope.data works and $scope.data.data is not needed), but it represents an antipattern, so you should stick with your original approach (or use the simplified version I gave you in the first paragraph).
has comment: http://stackoverflow.com/comment/42112882
answers question: http://stackoverflow.com/q/26761637
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26761637

http://stackoverflow.com/comment/42135834
type: QuestionComment
has text: Loop through all the divs (if you only want the search to apply some divs, apply a class to them and search for divs with the class). Check if the div is empty and if so, set style.display to "none"
type: Comment
comment on: http://stackoverflow.com/q/26779005
score: 0

http://stackoverflow.com/comment/42188988
has text: Is the page change "natural"? Or are you using a AJAXing in content? If so the event handlers could be getting unset. A link to the page or a demo recreating the full scenario would help.
comment on: http://stackoverflow.com/q/26807863
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26724430
has comment: http://stackoverflow.com/comment/42038393
has comment: http://stackoverflow.com/comment/42038363
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I am trying to work out how to take my returned json data and add it to my current view. I have this controller def rehomed respond_to do |format| format.js {render json: @animals } end end view $.ajax({ type: 'POST', url: '/public/rehomed', data: data_send, success: function(data) { $('.all_animals').append(data); } }); view Archibald Yorkshire Terrier Archibald Yorkshire Terrier [ {"id":104,"animal_type":"Dog","name":"Harry","description":"Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum.","age":"Under 1 Year","size":"Large","gender":"Male","spay_neuter":"No","chipped":"No","child_friendly":"No","reference":"AB123456789","dog_breed_id":2,"user_id":12,"created_at":"2014-10-28T22:07:15.311Z","updated_at":"2014-10-28T22:07:15.311Z","cat_breed_id":null,"rehomed":false}, {"id":107,"animal_type":"Cat","name":"Sydney","description":"Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum.","age":"Under 1 Year","size":null,"gender":"Female","spay_neuter":"No","chipped":"Yes","child_friendly":null,"reference":"123456","dog_breed_id":null,"user_id":12,"created_at":"2014-10-28T22:08:06.609Z","updated_at":"2014-10-28T22:08:06.609Z","cat_breed_id":1,"rehomed":false}, {"id":114,"animal_type":"Cat","name":"Tommy","description":"Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum.","age":"4 Years","size":null,"gender":"Female","spay_neuter":"No","chipped":"Yes","child_friendly":null,"reference":"123856473SS","dog_breed_id":null,"user_id":12,"created_at":"2014-10-28T22:09:20.640Z","updated_at":"2014-10-28T22:09…
has answer: http://stackoverflow.com/a/26724514
type: UnansweredQuestion
tagged with: ruby-on-rails
downvote count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
has title: jquery callbacks and json data
type: Question

http://stackoverflow.com/comment/42179595
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26715926
has text: @vithal04 Please post a new question with your specific problem, someone should be able to help you

http://stackoverflow.com/comment/42099175
has text: Maybe it make sense. I'm just thinking the vm should differ from time += 1000 and time += "1000". And that this line of code should tip the type scale to make the vm think that time is a number and not a string. But maybe it just can't change a type midway...?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26757717

http://stackoverflow.com/comment/42065064
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26739539
has text: is it finished because i tried this and no solution

http://stackoverflow.com/a/26743414
type: Answer
has body: Using $(document).ready() is a bad idea: http://view.jquerymobile.com/1.3.1/dist/demos/faq/dom-ready-not-working.html It is recommended to use pageinit === EDIT === You can always use the ghetto way: setTimeout(function(){$.mobile.silentScroll(1000);}, 1000); // scroll after 1 second
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26743011
has comment: http://stackoverflow.com/comment/42074113
answers question: http://stackoverflow.com/q/26743011
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42074395

http://stackoverflow.com/q/26767450
score: 0
tagged with: macos
has comment: http://stackoverflow.com/comment/42116647
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42119255
has comment: http://stackoverflow.com/comment/42119239
has comment: http://stackoverflow.com/comment/42119240
has title: Compiling Less CSS files with JavascriptCore jsc binary on OSX
has comment: http://stackoverflow.com/comment/42118931
linked to: http://stackoverflow.com/q/6928914
has body: The reason I'd like to do this is so that there is no NodeJS dependency and therefore an app can be submitted to the Apple app store that compiles Less files. Any thoughts welcomed.
tagged with: app-store
tagged with: less
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42118524
has comment: http://stackoverflow.com/comment/74427799
has comment: http://stackoverflow.com/comment/42118819

http://stackoverflow.com/comment/42193720
comment on: http://stackoverflow.com/q/26810440
score: 0
type: QuestionComment
type: Comment
has text: This happens because `this` in `window.addEventListener('resize', this.resizeCanvas, false);` refers to the `window` object, and not the `Grid`.

architecture
tags question: http://stackoverflow.com/q/26772493
tags question: http://stackoverflow.com/q/26776265
tags question: http://stackoverflow.com/q/26748500
tags question: http://stackoverflow.com/q/26675206
type: Tag
tags question: http://stackoverflow.com/q/26759931
tag name: architecture
tags question: http://stackoverflow.com/q/26816906

http://stackoverflow.com/comment/42070654
type: Comment
has text: There it is! thanks so much I'm still learning this helped a ton.
comment on: http://stackoverflow.com/a/26742393
score: 0
type: AnswerComment

http://stackoverflow.com/q/26792555
tagged with: arrays
answer count: 1
tagged with: javascript
has body: I have a simple array which i would want to output it on my list. The array of the first dimension of the array works when i called it, But the second one wasn't able to be detect. What have I done wrong here or have I missed anything? Below are my code: Angular.js angular.module( 'theme' , [ ] ).controller('sideController' , function($scope){ $scope.menuName = [ {'name': 'Header' , 'element' : [ {'id' : 'template1' , 'template': 'wp-content/themes/dynamictheme/img/template/template1.png'} ] }]; }) ; HTML {{menus.name}}
score: 0
has answer: http://stackoverflow.com/a/26792658
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs
has title: ng-repeat in AngularJS not working when trying to output a multi-dimension array
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26792658
type: Question

http://stackoverflow.com/q/26752781
upvote count: 2
accepted answer: http://stackoverflow.com/a/26752884
linked to: http://stackoverflow.com/q/133051
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26752927
has title: How do I show and hide certain divs on page?
has body: I am trying to show and hide certain divs within my document. I have put together code using getElementById and want to apply style.display to each element of array. I am not sure if this is possible. Currently my code looks like this: Javascript HTML VPM Global Select Opportunities Fund - Dollar Unit Price Weekly: 2012/02/03 to 2014/10/24 Value of $1000 Invested at inception relative to Target Return Weekly: 2012/02/03 to 2014/10/24 Value of R1000 Invested at inception relative to Inflation Benchmarks Weekly: 2012/02/03 to 2014/10/24 * VPM GSO - VPM Global Select Opportunities Fund Original Javascript that works in IE11, Safari, Opera, FireFox and Chrome This is the orignal code I created it worked in all the browsers except IE8-10, maybe someone can guide me on this. function chart1() { document.getElementById("chartdiv1").style.display = "inline"; document.getElementById("unit-price").style.display = "block"; document.getElementById("chartdiv2").style.display = "none"; document.getElementById("unit-price-value").style.display = "none"; document.getElementById("chartdiv3").style.display = "none"; document.getElementById("unit-price-rand").style.display = "none"; }; You help is greatly appreciated.
has comment: http://stackoverflow.com/comment/42089283
type: Question
has answer: http://stackoverflow.com/a/26752843
score: 2
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26752841
has answer: http://stackoverflow.com/a/26752884
has answer: http://stackoverflow.com/a/26752841
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
favorite count: 0

http://stackoverflow.com/a/26795151
score: 0
type: Answer
has body: As far as moving up the parent chain you can do something like the following example with plain JavaScript. It's just a simple while loop but the same idea can be applied with a recursive function. JSBin example: http://jsbin.com/jerisisagi/1/edit?html,css,js,output var node = document.getElementById('start'); // Make sure to stop at the body while (node &amp;&amp; node.tagName.toLowerCase() !== 'body') { node.className = 'box'; node = node.parentNode; // move to next parent }
answers question: http://stackoverflow.com/q/26794924

http://stackoverflow.com/comment/42216359
score: 1
has text: why would you want to do that? like gates are illegal and it is not cool for a user not to be able to unlike something.
comment on: http://stackoverflow.com/q/26823609
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42180509
has text: This is much more likely to stop Data Scraping then what you (OP) are actually asking for.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26803544
score: 1

http://stackoverflow.com/q/26815541
has answer: http://stackoverflow.com/a/26816937
type: AnsweredQuestion
tagged with: mysql
has title: Docker container nodejs connection to external mysql fail
accepted answer: http://stackoverflow.com/a/26816937
has comment: http://stackoverflow.com/comment/42202587
type: Question
answer count: 1
tagged with: javascript
has body: My nodejs application is connecting to mysql externally, it is all good if i start interactively by docker run -p 49160:8080 -t -i &lt;image&gt;, and run nodejs /src/server.js manually. However, when i start with daemon docker run -p 49160:8080 -d &lt;image&gt;, it will fail to connect to the external mysql. Tried docker start &lt;container&gt; and then docker exec &lt;container&gt; nodejs /src/server.js, same error. Tried docker start &lt;container&gt;,docker attach &lt;container&gt; ,run nodejs /src/server.js, then it works. Dockerfile: FROM ubuntu COPY . /src RUN apt-get install nodejs RUN apt-get install npm RUN cd /src; npm install EXPOSE 8080 CMD ["nodejs","/src/server.js"] /src/server.js: var express = require('express'); var mysql = require('mysql'), myconnection = require('express-myconnection'); ... app.use(myconnection(mysql, { ... },'request')); ... app.get('/',function(req,res) { req.getConnection(function(err,connection) { if(err) // giving out err here, fail to connect UPDATE: i found out that the cause was actually nodejs /src/server.js and cd /src; nodejs server.js where the former will give me the connection error and the latter works ok so docker run -p 49160:8080 -d &lt;image&gt; /bin/sh -c "cd /src; nodejs server.js" actually works Mark ,do you have any idea ?? still need output of ifconfig? thx
tagged with: docker
has comment: http://stackoverflow.com/comment/42204071
score: 0
tagged with: connection
tagged with: node.js

http://stackoverflow.com/a/34779290
score: 0
type: AcceptedAnswer
has body: This issue turned out to be that the data table was created on page load with a certain set of columns; say "A, B, C, and D" columns. However, when the AJAX returned the data, and the data was passed into the $.databtable build function, I would destroy the existing table and rebuild it. However, it still demanded identical columns. I intended the columns to be identical, but made a mistake somewhere. Ultimately, it was rebuilding the table with something like "A, B, C, E" where "E" should have been "D".
type: Answer
accepted answer of: http://stackoverflow.com/q/26810326
answers question: http://stackoverflow.com/q/26810326

http://stackoverflow.com/a/26791823
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42160945
answers question: http://stackoverflow.com/q/26784949
has body: Great! i like more your option, but the two options i discover have one problem and i don't know how to solve, if i generate the selects with one for. for ( var i=0; i < 2; i++ ) { $(' Seleccionar 111111111111111111 222222222222222222 333333333333333333 444444444444444444 555555555555555555 666666666666666666 777777777777777777 888888888888888888 999999999999999999 ').appendTo('#selecs'); } $(function () { function restrict_multiple(selector) { $(selector).each(function () {$(this).attr("alt", $(this).val());}); $(selector).on('change', function () { var ind = $(this).index(); var val = $(this).val(); var alt = $(this).attr('alt'); $(selector).each(function () { $(this).find("option[value="+alt+"]").removeClass("hidden"); if($(this).index() != ind && val != "") { $(this).find("option[value="+val+"]").addClass("hidden"); } }); $(this).attr('alt', val); }); } restrict_multiple(".excluyent-select"); }) .hidden { display: none; } in this case don't run http://jsfiddle.net/hevercking/t3qg45v3/ I try make with onChange but only start to remove when i change one select the second time and if i change don't apear again until remove all options in the other select, i put here the example: http://jsfiddle.net/hevercking/e4scbtre/3/
has comment: http://stackoverflow.com/comment/42160982

http://stackoverflow.com/a/26685249
has comment: http://stackoverflow.com/comment/41969004
has comment: http://stackoverflow.com/comment/41969034
has comment: http://stackoverflow.com/comment/41969038
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26673951
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26673951
has comment: http://stackoverflow.com/comment/41969055
has comment: http://stackoverflow.com/comment/41969121
score: 1
upvote count: 1
has body: I've written a fiddle to demonstrate how to use your JSON (the local, not the remote, example) with typeahead.js: http://jsfiddle.net/Fresh/f9rbeqyc/ In the following answer I chose to use the ProductCode as the suggestion, but you could obviously use the CategoryName if you wanted. The key part of the code I used, along with some comments is here: var json = '{"Product":[ ' + '{"@ProductCode\":\"C1010\",\"@CategoryName\":\"Clips\"},' + '{"@ProductCode\":\"C1012\",\"@CategoryName\":\"Clips\"},' + '{"@ProductCode\":\"C1015\",\"@CategoryName\":\"Clips\", \"EAN\":\"0987654321\"}]}'; // Parse the JSON string to a JSON object var jsonObject = JSON.parse(json); var products = new Bloodhound({ // Use $.map() to create an array of ProductCode key value pairs local: $.map(jsonObject.Product, function (product) { return { value: product["@ProductCode"] }; }), datumTokenizer: function (datum) { // Specify the variable within the datum to use as suggestion data // In this case it's the value return Bloodhound.tokenizers.whitespace(datum.value); }, queryTokenizer: Bloodhound.tokenizers.whitespace }); Also note that the datumTokenizer is specifying which value to use as a suggestion; an array of datums with a key called 'value' was created so we want to use 'value' as the display key. In your example you had "return products.product.code;" which isn't going to work as your datums don't have a field called "code", nor does your JSON(!). You should be able to refer to my example and this answer to get your typeahead which uses remote working.

http://stackoverflow.com/a/26789041
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26789019
answers question: http://stackoverflow.com/q/26789019
type: Answer
has comment: http://stackoverflow.com/comment/42154378
has body: You included angular after your example.js, so angular isn't defined when you try to use it. You need to include all your dependencies in order, and make sure you close your script tags. Move example.js below angular and you should be good to go!
score: 0
has comment: http://stackoverflow.com/comment/42154397

http://stackoverflow.com/q/26753796
downvote count: 3
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42090685
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42090672
has comment: http://stackoverflow.com/comment/42090774
type: AnsweredQuestion
upvote count: 8
type: Question
has answer: http://stackoverflow.com/a/26753845
accepted answer: http://stackoverflow.com/a/26753845
score: 5
has body: I have seen many places where angular js uses triple equals sign === to compare two elements why not 2 equals == . I am just wondering is there any specific reason for that ?
tagged with: javascript
has title: why 3 equals in AngularJS ? Is there any specific reason?
linked to: http://stackoverflow.com/q/359494

http://stackoverflow.com/a/26738579
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26737796
downvote count: 0
score: 1
has body: if document doesn't exists this command will create new one collection.update({file:2112,user:21421}, {hasSeen:true}, {upsert:true});
has comment: http://stackoverflow.com/comment/42086124
answers question: http://stackoverflow.com/q/26737796
has comment: http://stackoverflow.com/comment/42085165

http://stackoverflow.com/q/26830193
tagged with: wordpress
has answer: http://stackoverflow.com/a/26830223
tagged with: javascript
type: UnansweredQuestion
has title: How to Apply Backstretch to body
answer count: 1
tagged with: jquery
tagged with: ajax
type: Question
has body: I know this is a Dumb question, but I don't know where to place this code on Wordpress /* * Here is an example of how to use Backstretch as a slideshow. * Just pass in an array of images, and optionally a duration and fade value. */ // Duration is the amount of time in between slides, // and fade is value that determines how quickly the next image will fade in $.backstretch([ "http://dl.dropbox.com/u/515046/www/outside.jpg" , "http://dl.dropbox.com/u/515046/www/garfield-interior.jpg" , "http://dl.dropbox.com/u/515046/www/cheers.jpg" ], {duration: 3000, fade: 750}); And does this have to be between the script tags? Or in the PHP code? &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; CODE &lt;/script&gt; Thank you
score: 0

http://stackoverflow.com/comment/42100470
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26738058
has text: Can @TroyGizzi you explain why log 'url loaded' is called 4 times please ? explain why log 'url loaded' is called 4 times please in your fidlle http://jsfiddle.net/troygizzi/L0m1udsy/13/ ?

http://stackoverflow.com/comment/42134888
has text: yeah you're right. Didn't thought about that. thanks.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26778132

http://stackoverflow.com/q/26785759
tagged with: types
has answer: http://stackoverflow.com/a/70027247
favorite count: 0
linked to: http://stackoverflow.com/q/8054018
has body: I am experienced in JavaScript, but new to Java. In JavaScript there are "object" data types where a given variable essentially has sub-variables with their own unique values, for example: var car = {type:"Fiat", model:500, color:"white"}; It is almost like an array, but not quite (JavaScript has arrays too). I am wondering if the same type of thing exists in Java? If so, how would I declare the same thing in Java? Based on my searches I can't find an object data type, but thought maybe there was something similar?
has title: JavaScript-like Object data type in Java?
has comment: http://stackoverflow.com/comment/42148238
answer count: 4
has answer: http://stackoverflow.com/a/30436451
upvote count: 34
score: 31
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42148212
tagged with: java
tagged with: http://stackoverflow.com/tag/json
downvote count: 3
has answer: http://stackoverflow.com/a/26785904
type: Question
tagged with: object
has answer: http://stackoverflow.com/a/26785801
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26785801
has comment: http://stackoverflow.com/comment/42148493
accepted answer: http://stackoverflow.com/a/26785904

http://stackoverflow.com/comment/41966646
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26684079
has text: that's an implementation detail to escape helpers with reserved names. The original syntax `Template.allCustomers.helper({...})` should still work according to docs?

http://stackoverflow.com/comment/42215551
type: Comment
has text: This one did it. Thank you.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26822978

http://stackoverflow.com/a/26741102
score: 1
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26740761
has body: You need to wrap your on/off events in a "click" event, and use the ID of the actual element you're using as the button to activate it. So, if you have a button On and Off : $( "#turnOn" ).click(function() { $( "body" ) .on( "click", turnToolOn ) }); $( "#turnOff" ).click(function() { $( "body" ) .off( "click", turnToolOn ) }); Read more at the jQuery API Docs site for the off() event handler!

http://stackoverflow.com/q/26812650
tagged with: javascript
has comment: http://stackoverflow.com/comment/42197513
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/42197544
favorite count: 0
has comment: http://stackoverflow.com/comment/42197516
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26812741
has body: The reason I want to do this is kind of complicated, but long story short, you can do window[myString]=function hello(){}. Is there a way to do var hello=function [myString](){}? The reason I want to do this is because I am creating a class generator in javascript. The problem is, I can only name the variable that I assign the constructor to, I can't actually name the class itself. So if instantiate a bunch of instances of my generated class, chrome dev tools doesn't know what the instance is, so it calls the object (anonymous function) instead of its class name. This really grinds my gears. Here's an example of what I'm trying to do. Copy and paste into Chrome's dev tools: function Person(name){this.name=name;}; Person.initChildClass=function(className,talkMethod){ window[className]=function(){Person.apply(this,arguments)} window[className].prototype.talk=talkMethod; } Person.initChildClass("PoliceMan",function(){alert("I am a police man")}); Person.initChildClass("LittleBoy",function(){alert("googoogaagaa");}); var cop=new PoliceMan("Bob"); cop; Copy and paste my code into the dev tools (Chrome) and you will see that it says window.(anonymous function) rather than "Cop" for the cop. How do I make it say "Cop"?
downvote count: 0
score: 1
has title: Is there a way to dynamically give an anonymous function a name in javascript?
type: Question

http://stackoverflow.com/comment/42077872
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26745556
type: QuestionComment
has text: Bonus points to anyone who can make this happen without changing the source code.

http://stackoverflow.com/q/26710333
answer count: 0
has title: resize and move canvas contents html5
type: Question
has comment: http://stackoverflow.com/comment/42012361
has comment: http://stackoverflow.com/comment/42012507
has comment: http://stackoverflow.com/comment/42013622
has comment: http://stackoverflow.com/comment/42013535
tagged with: javascript
score: 0
tagged with: canvas
has comment: http://stackoverflow.com/comment/42024879
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I already measure line tools in canvas. I already can save it using getImageData() and putImageData(). And now my only and last concern is how to resize the line and even move it. Currently, i have this codes: $("#myCanvas").mousedown(function(event){ event.preventDefault(); $(this).addClass("mouseDown"); if(trigger = "1"){ $('.draggable').draggable( "disable" ); }else{ $('.draggable').draggable("enable"); } var angx=startX; var angy=startY; startX=(event.clientX-$(canvas).offset().left)*(parseInt($(canvas).attr("width"))/parseInt($(canvas).css("width"))); startY=(event.clientY-$(canvas).offset().top)*(parseInt($(canvas).attr("height"))/parseInt($(canvas).css("height"))); //alert(startX + " : " + startY ); tmp = ctx.getImageData(0,0,canvas.width, canvas.height); $("#myCanvas").bind('mousemove', function(e){ endX=(e.clientX-$(canvas).offset().left)*(parseInt($(canvas).attr("width"))/parseInt($(canvas).css("width"))); endY=(e.clientY-$(canvas).offset().top)*(parseInt($(canvas).attr("height"))/parseInt($(canvas).css("height"))); drawLine(startX, startY, endX, endY); }); }).mouseup(function(data){ totalOffsetX = 0, totalOffsetY = 0; $(this).removeClass("mouseDown"); if(trigger = "1"){ $('.draggable').draggable( "disable" ); }else{ $('.draggable').draggable("enable"); } $(this).unbind('mousemove'); tmp = ctx.getImageData(0,0,canvas.width, canvas.height); }); var Calculate={ lineLength:function(x1, y1, x2,y2){ console.log(x1 + ", "+ y1 +", " + x2 + ", " + y2); return Math.sqrt(Math.pow(x2*dry-x1*dry, 2)+Math.pow(y2*drx-y1*drx, 2)); } } function drawLine(startX, startY, endX, endY){ ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.putImageData(tmp, 0, 0); ctx.beginPath(); ctx.moveTo(startX,startY); ctx.lineTo(endX,endY); ctx.fillStyle="#A9F5F2"; ctx.font='12pt Calibri'; //ctx.fillText("Start X: " + startX + " " + " Y: " + startY , startX, startY-10); //ctx.fillText("End X: " + endX + " " + " Y: " + endY, endX, endY+10); var px =Calculate.lineLength(startX, startY, end…
has comment: http://stackoverflow.com/comment/42050955

http://stackoverflow.com/comment/42171343
type: QuestionComment
comment on: http://stackoverflow.com/q/26798473
has text: Next time edit the question, don't add code in comments ;)
score: 0
type: Comment

http://stackoverflow.com/comment/42209198
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26818087
type: Comment
has text: Return value is $chart or $output. $.ajax(.....).done(function(data){}). I just want to know what is inside of the data.

http://stackoverflow.com/q/26819604
upvote count: 7
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/36637707
has title: Access data send by xhr request in node.js
downvote count: 0
score: 7
tagged with: express
favorite count: 0
type: Question
has body: Im sending some text from a textbox to node.js express server by XMLHttpRequest: var text = document.getElementById("textBox").value; console.log(text); var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 || xmlhttp.status==200) { document.getElementById("textBox").value =xmlhttp.responseText; } } xmlhttp.open("POST","http://127.0.0.1:3000/",true); xmlhttp.send(text); My question is how to access it in my server : var http = require("http"); var url = require("url"); var qs = require('querystring'); var path = require('path'); var bodyParser = require('body-parser'); var express = require('express'); var app = express(); // start endle req\res app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.post('/', function(req,res){ console.log("request method :" + req.method); res.end("OK"); }); // listen at local host:3000 var server = app.listen(3000, function() { console.log('Listening on port %d', server.address().port); }); The string appears as request payload and i dont want to use jQuery.
tagged with: http://stackoverflow.com/tag/html
tagged with: xmlhttprequest
tagged with: node.js
has answer: http://stackoverflow.com/a/26819763
answer count: 2

http://stackoverflow.com/a/26832685
answers question: http://stackoverflow.com/q/26831128
has body: ok :) found the answer here in this killer post! This helper is exactly what I was looking for. Here is what I ended up with :) Helper Handlebars.registerHelper('grouped_each', function(every, context, options) { var out = "", subcontext = [], i; if (context &amp;&amp; context.length &gt; 0) { for (i = 0; i &lt; context.length; i++) { if (i &gt; 0 &amp;&amp; i % every === 0) { out += options.fn(subcontext); subcontext = []; } subcontext.push(context[i]); } out += options.fn(subcontext); } return out; }); Template {{#grouped_each 3 employees}} &lt;div class="row"&gt; {{#each this }} &lt;div class="col-sm-4 item"&gt; &lt;strong&gt;{{name}}&lt;/strong&gt;&lt;br&gt; {{title}}&lt;br&gt; {{skills}} &lt;/div&gt; {{/each}} &lt;/div&gt; {{/grouped_each}}
type: Answer
upvote count: 15
downvote count: 0
has comment: http://stackoverflow.com/comment/51744264
score: 15

http://stackoverflow.com/comment/42050472
type: AnswerComment
has text: @YellowandRed UVs are [texture coordinates](https://www.google.com.au/search?q=texture+coordinates), 2D u/v coordinates to map each vertex to a position in the texture.
score: 0
comment on: http://stackoverflow.com/a/26731027
type: Comment

http://stackoverflow.com/comment/41989957
type: AnswerComment
comment on: http://stackoverflow.com/a/26697784
type: Comment
has text: You're only running the function every 2 seconds, and only adding 1 pixel to the width. Run it more often and increase the amount, and it will go faster.
score: 0

http://stackoverflow.com/comment/42117183
comment on: http://stackoverflow.com/a/26767989
score: 0
type: AnswerComment
type: Comment
has text: The problem with this solution is its adding the brackets to all of them now. I dont want those brackets

http://stackoverflow.com/q/26800922
favorite count: 0
has title: threejs raycast click detection not working on loaded 3dObject
score: 1
tagged with: raycasting
tagged with: three.js
upvote count: 1
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26804889
accepted answer: http://stackoverflow.com/a/26804889
has body: I load a .obj file: var loader = new THREE.OBJMTLLoader(); loader.load( "../obj/machine.obj", '../obj/machine.mtl', this.loadObject); And try to detect a click on it: click: function(event){ this.mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1; this.mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1; var vector = new THREE.Vector3( this.mouse.x, this.mouse.y, 1 ).unproject( this.camera ); this.raycaster.set( this.camera.position, vector.sub( this.camera.position ).normalize() ); console.log(this.scene.children); var intersects = this.raycaster.intersectObjects( this.scene.children ); if ( intersects.length &gt; 0 ) { console.log("hitting something"); } }, This works fine on meshes but not on the loaded 3DObject while it is visible in the this.scene.childeren: [THREE.Mesh, THREE.Line, THREE.PointLight, --&gt; THREE.Object3D &lt;-- ]0: THREE.Mesh__webglActive: true__webglInit: true_listeners: Object_modelViewMatrix: THREE.Matrix4_normalMatrix: THREE.Matrix3castShadow: falsechildren: Array[0]eulerOrder: (...)frustumCulled: truegeometry: THREE.IcosahedronGeometryid: 4material: THREE.MeshBasicMaterialmatrix: THREE.Matrix4matrixAutoUpdate: truematrixWorld: THREE.Matrix4matrixWorldNeedsUpdate: falsename: ""parent: THREE.Sceneposition: THREE.Vector3quaternion: THREE.QuaternionreceiveShadow: falserenderDepth: nullrotation: THREE.EulerrotationAutoUpdate: truescale: THREE.Vector3type: "Mesh"up: THREE.Vector3useQuaternion: (...)userData: Objectuuid: "46D85379-A9CE-4221-A599-39D13EE4CB34"visible: true__proto__: Object1: THREE.Line2: THREE.PointLight3: THREE.Object3D So something tells me it needs something else for loaded 3dObjects. But I have no clue at what that could be. My idea is that the raycast looks for vertices for intersection and it wouldn't matter if that's a cube mesh or a 3dObject mesh. Does anybody has an idea?
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/26679996
answers question: http://stackoverflow.com/q/26679685
has comment: http://stackoverflow.com/comment/42018704
has comment: http://stackoverflow.com/comment/42629991
type: Answer
has body: Promises! I personally use Bluebird, and here is an example that uses it too. I hope you understand it, feel free to ask when you do not :-) var Promise = require('bluebird') var exec = require('child_process').exec // Array with input/output pairs var data = [ ['input1', 'output1'], ['input2', 'output2'], ... ] var PROGRAM = 'cat' Promise.some(data.map(function(v) { var input = v[0] var output = v[1] new Promise(function(yell, cry) { // Yes it is ugly, but exec is just saves many lines here exec('echo "' + input + '" | ' + PROGRAM, function(err, stdout) { if(err) return cry(err) yell(stdout) }) }).then(function(out) { if(out !== output) throw new Error('Output did not match!') }) }), data.length) // Require them all to succeed .then(function() { // Send succes to user }).catch(function() { // Send failure to the user })
score: 0
has comment: http://stackoverflow.com/comment/42668638

http://stackoverflow.com/a/26798893
answers question: http://stackoverflow.com/q/26798473
score: 2
downvote count: 0
has body: document.getElementByID().innerHTML definitely works. Make sure: document refers to the same document the element is in (you're not working with an iframe or such). you call the function when the element is attached to the DOM. This doesn't work: This works: your html is valid. It could be that invalid markup doesn't let your browser find the correct element. Anyway, if you're working in chrome, you really should debug with the console and not with "alerts". Press F12 (on Windows / Linux) or Cmd + Opt + I on Mac. If there are any errors, you should see them in red in the console tab. If there are no errors, do this: if(totalItems == 0) { console.log('el: ', document.getElementById('yourCartContains')); document.getElementById('yourCartContains').innerHTML = "Your cart contains no items!"; } and see what your console tells you. (There probably will be an el: undefined)
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/42171724

http://stackoverflow.com/a/26835140
score: 0
type: Answer
has body: I have found a solution with the parameter "name" of the input: If you have 2 different names for your input (example : file1 &amp; file2), you know what is the origin of the selected file with the following test: if (data.paramName=="file1") { ..... }else{ .... } So I did the test for the type and the size as below: var uploadErrors = []; var acceptImgTypes = /^image\/(gif|jpe?g|png)$/i; var acceptDocTypes = /^application\/(pdf|msword|vnd.openxmlformats-officedocument.wordprocessingml.document)$|^text\/plain$/i; if (data.paramName=="file1") { if (data.originalFiles[0]['type'] &amp;&amp; !acceptImgTypes.test(data.originalFiles[0]['type'])) { uploadErrors.push('Not an accepted file type'); } if (data.originalFiles[0]['size'] &amp;&amp; data.originalFiles[0]['size'] &gt; 4000000) { uploadErrors.push('File size is too big'); } } else { if (data.originalFiles[0]['type'] &amp;&amp; !acceptDocTypes.test(data.originalFiles[0]['type'])) { uploadErrors.push('Not an accepted file type'); } if (data.originalFiles[0]['size'] &amp;&amp; data.originalFiles[0]['size'] &gt; 10000000) { uploadErrors.push('File size is too big'); } } Same thing with the inputTxt (with the file name) if (data.paramName=="file1") { $("#txt-file-img").val(data.files[0].name); } else { $("#txt-file-doc").val(data.files[0].name); } The tests are fine but now I have an error during the upload : "error":"File upload aborted" "deleteType":"DELETE" Do you understand why? Thank you very much
answers question: http://stackoverflow.com/q/26822869

http://stackoverflow.com/a/26768781
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42118430
has body: Just hide and show the submit button on submit. $( 'form' ).submit(function(e) { $('#my_button').hide(); $.ajax({ type: 'POST', url: ajax_url, dataType: 'json', data: { 'action': 'my_action', 'str': $( 'form' ).serialize() }, success: function( data ) { // Do something here. }, error: function( data ) { // Do something here. }, complete: function(){ $('#my_button').show(); } }); return false; });
upvote count: 1
answers question: http://stackoverflow.com/q/26768583
has comment: http://stackoverflow.com/comment/42118278

onclicklistener
tag name: onclicklistener
tags question: http://stackoverflow.com/q/26753339
type: Tag
tags question: http://stackoverflow.com/q/26801984

http://stackoverflow.com/a/26811299
has comment: http://stackoverflow.com/comment/42196567
has comment: http://stackoverflow.com/comment/42196452
answers question: http://stackoverflow.com/q/26811231
score: 3
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42202223
has body: Your problem is that you are using ids as it were classes. An id should be unique in a document. So defining multiple objects with the same id is an error. And all functions will apply only the first they encounter. To do what you want, you have to use classes, so change your code in this way: $(".addtobasket").css("background-image", "url('http://restorani.weby.biz/templates/default/img/tick-green.png')"); To look for all elements of that class.
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26811231

http://stackoverflow.com/a/26777042
answers question: http://stackoverflow.com/q/26776936
has body: This can help you : Pure CSS collapse/expand div With that fiddle : http://jsfiddle.net/thurstanh/emtAm/2/ :) HTML : Step by Step Guides Getting Started 1. Signup for a free trial Setting up a backup schedule This step assumes you have already signed up and installed the software Installation/Upgrade Issues After setup the program doesn't start SERVER Step by Step Guides Getting Started 1. Signup for a free trial Setting up a backup schedule This step assumes you have already signed up and installed the software Installation/Upgrade Issues After setup the program doesn't start css : summary::-webkit-details-marker { color: #00ACF3; font-size: 125%; margin-right: 2px; } summary:focus { outline-style: none; } article > details > summary { font-size: 28px; margin-top: 16px; } details > p { margin-left: 24px; } details details { margin-left: 36px; } details details summary { font-size: 16px; } Next time post some of your code and your try, we're not here to code for you.
downvote count: 1
upvote count: 0
has comment: http://stackoverflow.com/comment/42134419
score: -1
type: Answer
has comment: http://stackoverflow.com/comment/42135113

http://stackoverflow.com/comment/42196180
comment on: http://stackoverflow.com/q/26807330
has text: @ErikPhilips No falacy there. I'm talking about the question did by the OP. In fact, I find **offensive** that you compare my thoughts to a falacy. Thanks.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42189292
type: QuestionComment
comment on: http://stackoverflow.com/q/26808210
score: 0
has text: Have you made sure that your ckeditor script is after angular script?
type: Comment

http://stackoverflow.com/q/26728973
answer count: 2
upvote count: 0
score: -2
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26728992
possible better answer: http://stackoverflow.com/a/26729202
has answer: http://stackoverflow.com/a/26729202
downvote count: 2
has comment: http://stackoverflow.com/comment/42046138
type: Question
type: AnsweredQuestion
has title: how to convert ["one","two","three","four "] to [one,two,thee,four] as array in jquery or javascript
has body: I have a scenario. I will get all the data from service in the below shown array format. but I need to convert that to by removing them as strings var array1 = ["one","two","three","four"] var array1 = [one,two,thee,four] array contains strings to variables of the array.
has comment: http://stackoverflow.com/comment/42046089
has comment: http://stackoverflow.com/comment/42046103
has answer: http://stackoverflow.com/a/26728992
linked to: http://stackoverflow.com/q/5613834
has comment: http://stackoverflow.com/comment/42046163

http://stackoverflow.com/comment/41953630
has text: How exactly does that solve an issue? You still cannot access the view view DOM element, right?
comment on: http://stackoverflow.com/a/26677229
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26696211
has answer: http://stackoverflow.com/a/26696236
has title: check if a string has only some specific words
favorite count: 0
tagged with: php
tagged with: regex
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41987396
has body: i'm using a string with brackets, numbers and logical operators (AND, OR, NOT) i want to validate my string by checking if user enters the correct operators. example: (12 AND 13) //correct (12 BAND 13) //incorrect (12 AND 13 OR 14) //correct (12 DNA 13 OR 14) //incorrect I want to validate this string in either javascript or php, so a REGEX or a pregmatch would do the job. EDIT:- there can be any number of operators in a string.. Plus nested brackets can also exist, like (11 AND 12 AND 13 OR 14 NOT 15) //correct ((12 AND 13) NOT 14) //correct
type: Question
score: -2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26696236
upvote count: 2
downvote count: 4
answer count: 1

http://stackoverflow.com/comment/41985558
type: Comment
has text: Title says "... on changing view". From what to what?
comment on: http://stackoverflow.com/q/26694991
score: 0
type: QuestionComment

http://stackoverflow.com/q/26724421
answer count: 1
has body: This should be a very simple question. I think it might be as simple as just being the convention, but I would like to check as I have no idea if there is anything else behind it or what phrases to even search regarding it. var hello = require('./hello'); hello.world(); Imagine the above code. The require path is prefixed by a ./ this is always present for files in the same folder. Why not just the file name? Comparitively the common use var http = require('http'); Is not prefixed by a ./ I am currently assuming this is due to the http file being a "native" module. Therefore would I be right in saying that anything without ./ is looking in the native Node namespace and anything with a ./ is looking for a local file? Also would a file in a higher directory like in PHP it would be ../ In Node would it be .././ or ./../
has comment: http://stackoverflow.com/comment/42039773
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26724468
type: Question
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26724468
has title: Node path prefixes for modules
has comment: http://stackoverflow.com/comment/42038329

http://stackoverflow.com/comment/42177327
comment on: http://stackoverflow.com/a/26801033
type: AnswerComment
has text: Thanks, but I think this is not my case.. I didn't ask to show one option in multiple lines.. I just want to get each options in a separate line...
score: 0
type: Comment

http://stackoverflow.com/comment/42068048
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26741014
has text: this is also a good example of how [crazy and unreadable](http://callbackhell.com/) javascript can get, and how [Promises will make life awesome](http://www.html5rocks.com/en/tutorials/es6/promises/), IMHO.
type: AnswerComment

http://stackoverflow.com/comment/42137982
has text: Thank you sir, for all your effort, the issue has been fixed
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26779490

http://stackoverflow.com/a/26681685
answers question: http://stackoverflow.com/q/26681307
has body: Date.now returns a Unix timestamp (number). If you want to use Date methods such as getMonth(), you have to create a Date object from your timestamp: function dateDisplayed(timestamp) { var date = new Date(timestamp); return (date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear()); }
has comment: http://stackoverflow.com/comment/42061286
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42042507
has comment: http://stackoverflow.com/comment/42072861
has comment: http://stackoverflow.com/comment/42072686
type: Answer
has comment: http://stackoverflow.com/comment/42071144
accepted answer of: http://stackoverflow.com/q/26681307
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42071192
has comment: http://stackoverflow.com/comment/42072165

http://stackoverflow.com/q/26762901
has comment: http://stackoverflow.com/comment/42107123
type: UnansweredQuestion
score: 1
upvote count: 1
has title: Use x-editable for multiple buttons in Meteor
has body: I want to use x-editable inputs for multiple buttons in Meteor. My code looks like this: {{#each player}} {{/each}} How can I add input fields for different buttons?
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42107054
has answer: http://stackoverflow.com/a/26763500
answer count: 1
downvote count: 0
tagged with: x-editable
tagged with: jquery
tagged with: meteor
favorite count: 0

http://stackoverflow.com/comment/42224181
type: QuestionComment
comment on: http://stackoverflow.com/q/26824549
has text: You may be able to achieve this using [`.separation()`](https://github.com/mbostock/d3/wiki/Tree-Layout#separation).
score: 0
type: Comment

http://stackoverflow.com/q/26764548
upvote count: 4
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42110305
tagged with: jasmine
has answer: http://stackoverflow.com/a/30222764
favorite count: 0
has title: Jasmine chaining tests
possible better answer: http://stackoverflow.com/a/30222764
tagged with: node.js
has answer: http://stackoverflow.com/a/26781701
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42113887
tagged with: integration-testing
type: Question
has body: I am using Jasmine to test my project. I use it for integration testing, not for unit testing. describe("admin", function () { var testUser = { name: 'test', pass: 'pass' }; it("should be able to create a new user", function(done) { needle.post(server + "addUser.php", testUser, function (err, res) { expect(res.statusCode).toBe(200); done(); }); }); it("should be able to delete the user", function(done) { needle.post(server + "deletedUser.php", testUser, function (err, res) { expect(res.statusCode).toBe(200); done(); }); }); }); How can I make sure the delete test runs after the add test?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26781701
score: 4

http://stackoverflow.com/comment/42132061
type: QuestionComment
comment on: http://stackoverflow.com/q/26776383
score: 0
has text: http://magento.stackexchange.com/questions/30640/during-checkout-button-continue-doesnt-work?rq=1 http://iamrookie.com/blog/333/magento-checkout-error-undefined-js-alert-place-order.html
type: Comment

http://stackoverflow.com/comment/41949691
comment on: http://stackoverflow.com/a/26675199
type: AnswerComment
score: 0
has text: Right, so how do I then compare that against the time? Should I construct a new date object using the current year/month/day and use the `open` time to compare?
type: Comment

http://stackoverflow.com/comment/41989652
comment on: http://stackoverflow.com/q/26697608
score: 0
type: QuestionComment
has text: Why poll to perform what is essentially a one-off task? It's not as if anything changes from poll to poll - the data is always the same.
type: Comment

http://stackoverflow.com/comment/42089300
has text: You have two, completely different modules here. One called `myapp` and one called `myapp2`. This is why `MyController` can't be found.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26753048

http://stackoverflow.com/q/26744800
has comment: http://stackoverflow.com/comment/42076664
tagged with: http://stackoverflow.com/tag/html
tagged with: meteor
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42077424
has body: Oops, just found another guy's commit, the data was delete by him: Meteor.startup(function () { partner_class.remove({}); partner_class.remove({}); partner_photos.remove({}); Posts.remove({}); I've already deployed my website on meteor, then I need update it. If I simply use meteor deploy travellers.meteor.com, the old data will be reset. How to keep the old data when update meteor website? Forget to say, I'm using GroundDB for offline capability. in main.js(placed in the top directly) Posts = new GroundDB('posts'); Template: Event Handler to submit comment: Template.reply_blackboard_post.events({ "submit .new-reply": function (event) { // This function is called when the new task form is submitted var text = event.target.comment.value; console.log('User information is ' + Meteor.user().username); Posts.update({_id: Session.get("blackboard_post_id")}, {$push:{ replys:{username:Meteor.user().username,comment:text,createdAt:new Date()}}}); event.target.comment.value=""; document.getElementsByTagName("body").scrollTop=100000; return false; } }); The command I deploy application is meteor deploy travellers.meteor.com After modification, I rerun: meteor deploy travellers.meteor.com I verified data through: meteor mongo travellers.meteor.com >db.post.find()
tagged with: node.js
has title: How to upgrade the deployed meteor server with old user data
has comment: http://stackoverflow.com/comment/42075503
has comment: http://stackoverflow.com/comment/42077822
type: Question
has comment: http://stackoverflow.com/comment/42075958
tagged with: javascript
score: 0

http://stackoverflow.com/comment/42221615
score: 0
comment on: http://stackoverflow.com/q/26824473
type: Comment
has text: *"but i'm still not satisfied"* - What..? That means your question doesn't have a clear problem description. "Generalizing my Function" isn't a real question by the way.
type: QuestionComment

aem
tags question: http://stackoverflow.com/q/26717044
type: Tag
tag name: aem
tags question: http://stackoverflow.com/q/26732192

http://stackoverflow.com/q/26683939
has answer: http://stackoverflow.com/a/26684254
type: AnsweredQuestion
upvote count: 0
tagged with: loops
downvote count: 1
has body: I have the following lines of code: $(function(){ $("div").scroll(function() { function hpos(id) { var pos = $("#" + id).position(); return pos.top; } function final(id) { $("#header").html($("#" + id).html()), $("h1").css("visibility","visible"), $("#" + id).css("visibility","hidden"); } if (hpos(5) &lt; 0) { final(5); } else if (hpos(4) &lt; 0) { final(4); } else if (hpos(3) &lt; 0) { final(3); } else if (hpos(2) &lt; 0) { final(2); } else { final(1); } }); }); Shouldn't I be able to shorten it by using a loop instead of the else if statements? I can't find a way to make the loops work with my position().
type: Question
tagged with: if-statement
possible better answer: http://stackoverflow.com/a/26683974
tagged with: javascript
has answer: http://stackoverflow.com/a/26683951
score: -1
has answer: http://stackoverflow.com/a/26684001
accepted answer: http://stackoverflow.com/a/26684001
has title: Shortening if, else if, else if ... else using loops
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26683974
answer count: 4

http://stackoverflow.com/comment/42135468
type: QuestionComment
score: 1
has text: is userList part of another object that is passed to the template or is it the root?
comment on: http://stackoverflow.com/q/26778519
type: Comment

http://stackoverflow.com/comment/42132559
has text: Thanks for your answer . Shall I need to add e.preventDefault(); if validation fail ?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26777127
type: Comment

http://stackoverflow.com/comment/41973768
type: AnswerComment
score: 0
type: Comment
has text: Yes, it removes the original image inside the anchor before wrapping the new images.
comment on: http://stackoverflow.com/a/26688252

http://stackoverflow.com/comment/42000643
has text: My 5 cent, usually I use a controller (in a ng-repeat) to filter the data for better performance and it's best practice. Try to check in Batarang
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26703167
type: Comment

http://stackoverflow.com/comment/42198495
has text: An answer stating showname would be better on Person.prototype and setting Student.prototype equal to Person.prototype is not correctly inheriting may have been better. You now solved the problem by ditching the prototype completely
comment on: http://stackoverflow.com/a/26807191
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42146831
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26766706
score: 0
has text: Sorry, I'm not sure I follow your question. What is the value of `all` when you log it? (use backticks \` for inline code)

http://stackoverflow.com/comment/42140298
score: 0
comment on: http://stackoverflow.com/a/26781433
type: Comment
has text: The .bind methods are rather obsolete and .on should be preferred since version 1.7 as stated in the api: http://api.jquery.com/bind/
type: AnswerComment

http://stackoverflow.com/q/26694715
accepted answer: http://stackoverflow.com/a/26695839
has body: Is it possible to set an objects offset with KineticJS so as it doesn't move? //this moves it img.offsetX(100); //this also moves it img.offset({x:100,y:0}; ive tried; img.setoffset({x:100,y:100}); but that doesnt seem to do anything? i know i can set the offset when i create the image as; var newImg = new Kinetic.Image({ x: x, y: y, image: imgObject, name: 'image', offset: {x:offX, y:offY} })
type: AnsweredQuestion
tagged with: javascript
has title: set a KineticJS image's offset without moving
type: Question
tagged with: kineticjs
has answer: http://stackoverflow.com/a/26695839
score: 0
answer count: 1

http://stackoverflow.com/a/28922879
answers question: http://stackoverflow.com/q/26708205
has body: One issue is that if your path names aren't absolute then things like this will happen. I had accidentally set resolve.root to ./ instead of __dirname and this caused me to waste a lot of time deleting and re-creating files like the guys above me.
score: 13
downvote count: 0
type: Answer
upvote count: 13

http://stackoverflow.com/q/26812049
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26812383
tagged with: tdd
answer count: 2
tagged with: bdd
has body: I've recently started investigating on different unit-testing solutions (in JavaScript, but I guess my question is not language-specific). The main thing I am wondering about is why the syntax is so weird in trying to imitate the human language? What is a reason behind? For instance, an example from the Chai assertion library: expect(obj).to.have.property('foo'); On my opinion it is far much more clear to use native means of the language to express the same thing: assert(typeof obj.foo != 'undefined'); This is more readable for me as a developer, because I already know how != and typeof work, and there is no need to read some additional API docs to investigate what exactly .to.have.property() means. Currently I only have an impression that the syntax probably comes from the best practices like BDD/TDD, and a strange feeling that the idea is somehow close to what was beyond the SQL syntax. On my opinion, instead of providing a set of 10 different functions for doing the same thing in the most preferable syntax, it would be simplier and more convenient to have a minimal set of testing-specifig functions, something like: test a value against being truly; compare two numbers/strings/objects and additionally display the diff, if those do not match; check if a value does not exceed a limit; ... Do I miss something important? Is it implied that the tests are supposed to be partially created / evaluated by a product owner who is probably not so much of a programmer? Is the syntax just some kind of tradition for writing tests?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26812387
has title: Why is the syntax of testing frameworks so weird?
tagged with: syntax
score: 0
tagged with: unit-testing

http://stackoverflow.com/a/26718212
answers question: http://stackoverflow.com/q/26718035
score: 1
downvote count: 0
has body: This is poor readability and you have commas where there should be periods as well as a missing paren: while (($imgPath = readdir($handle)) !== false) { $needle = strtolower(pathinfo($imgPath, PATHINFO_EXTENSION)); // YOU WERE MISSING A CLOSING ( ON YOUR IF if (in_array($needle, $allowed_types)) { // THESE PERIODS WERE COMMAS echo '&lt;img src="' . $imageDir . '/' . $imagePath . '" alt="slide" /&gt;'; } } closedir($handle); Note, i would also use printf in this case instead of echo: printf('&lt;img src="%s/%s" alt="slide" /&gt;', $imgDir, $imgPath);
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42207661
type: QuestionComment
comment on: http://stackoverflow.com/q/26817496
has text: yes the list is generated by a json file using mustache js
score: 0
type: Comment

http://stackoverflow.com/q/26830342
type: Question
has comment: http://stackoverflow.com/comment/42227646
has title: JavaScript While Loop Wheres The Count Variable
has comment: http://stackoverflow.com/comment/42227667
has comment: http://stackoverflow.com/comment/42227696
answer count: 2
upvote count: 1
tagged with: javascript
type: UnansweredQuestion
score: -3
has answer: http://stackoverflow.com/a/26830393
downvote count: 4
favorite count: 0
has body: After comparing the while and for loops, I have a question as to how the while loop keeps track of which count in the sequence it's on. A basic for loop goes like this: for (var i = 0; i &lt; 5; i++) { console.log(i); } So the first time it runs, i equals 0 which fulfills the condition that i is less than 5, so it executes the block of code. It then increments the variable i so in the next sequence i equals 1 which satisfies the condition and so on. The while loop doesn't appear to have a variable that stores that sort of information. Here is a piece of code I found online. function factorial(n) { var result = n; while (n &gt; 1) { result = result * (n-1); n--; } console.log(result); } factorial(3); So, after calling factorial(3), result equals 3 which is greater than 1 so the code executes and result becomes 6. In the next sequence, n equals 2 so 6 multiplied by 2 minus 1 is 6 so the final output is 6. My question is why isn't there an n variable like the i variable in the for loop? When the loop decrements n, why isn't is doing 3 minus 1 over and over again?
has answer: http://stackoverflow.com/a/26830426

http://stackoverflow.com/q/26693504
score: 0
type: UnansweredQuestion
answer count: 0
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/750486
type: Question
has title: Problems with nested for loops
has comment: http://stackoverflow.com/comment/41982900
duplicate of: http://stackoverflow.com/q/750486
tagged with: javascript
has comment: http://stackoverflow.com/comment/41982724
has body: I am having problems adding a property and value to an object based on a value in a for loop. Here's my code. "use strict"; var chirper = {}; chirper.tweetsArray = []; chirper.tweets = []; chirper.friends = []; chirper.friendsByName = []; chirper.masterAjax = function (url, method, success, error, data) { var request = new XMLHttpRequest(); request.open(method, url); request.onload = function () { if (this.status &gt;= 200 &amp;&amp; this.status &lt; 400) { if (success &amp;&amp; typeof (success) == 'function') { success(this.response, this.status); } } else { if (error &amp;&amp; typeof (error) == 'function') { error(this.response, this.status) } } }; request.onerror = function () { if (error &amp;&amp; typeof (error) == 'function') { error(this.response, this.status); } }; if (data) { request.send(JSON.stringify(data)); } else { request.send(); } }; This is a function that I use over and over depending on where I need to get or post info to. chirper.getAllFriends = function () { chirper.masterAjax('https://example-name.example.com/ccchirper/friends/.json', 'GET', function (response) { var data = JSON.parse(response); for (var i in data) { chirper.friends.push(data[i]); chirper.friendsByName.push(data[i].userName)}; }, function (response, status) { alert('Status: ' + status + '. Error message: ' + response); }); }; chirper.getAllTweets = function () { for (var i in chirper.friendsByName){ chirper.masterAjax('https://' + chirper.friendsByName[i] + '.example.com/ccchirper/tweets/.json', 'GET', function (response) { var data = JSON.parse(response); for (var j in data) { data[j].name = chirper.friendsByName[i]; chirper.tweetsArray.push(data[j]); }; }, function (response, status) { alert('Status: ' + status + '. Error message: ' + response); }); }; } I have been calling these functions from the console to test them. I first call chirper.getAllFriends() to populate chirper.friendsByName. An example of what it returns would be ['andy','bob','john','tom'] After it returns …

http://stackoverflow.com/comment/42010600
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26707682
has text: Thanks Sparky, I'll try this once I'm back to the computer.

http://stackoverflow.com/comment/42086481
type: QuestionComment
type: Comment
has text: Hi, I m sorry, what do you mean by Android console? I am developing this using a text editor. I think the media.release() is wrongly placed...
comment on: http://stackoverflow.com/q/26742943
score: 0

http://stackoverflow.com/comment/42218775
comment on: http://stackoverflow.com/q/26823956
score: 0
type: Comment
type: QuestionComment
has text: See https://code.google.com/p/yahoo-finance-managed/wiki/YahooFinanceAPIs

http://stackoverflow.com/a/26682921
has comment: http://stackoverflow.com/comment/42045976
accepted answer of: http://stackoverflow.com/q/26682640
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/42043864
has body: You want to pass a callback to insert like this: Template.agregado.events({ 'click #agregarMenu' : function(event){ event.preventDefault(); var nuevoMenu = document.getElementById('nuevoTipoDeMenu').value; Meteor.call('insertarNuevoMenu', {nuevoTipoMenu: nuevoMenu}, function (error) { if (error) { // there was en error, item not inserted } else { var resetMenu = document.getElementById('nuevoTipoDeMenu').value =""; } }); }
has comment: http://stackoverflow.com/comment/42043824
type: Answer
answers question: http://stackoverflow.com/q/26682640

http://stackoverflow.com/comment/42128312
score: 0
comment on: http://stackoverflow.com/a/26773980
type: AnswerComment
has text: You just try it. and remove the form form the html.
type: Comment

http://stackoverflow.com/comment/42164669
comment on: http://stackoverflow.com/q/26795064
score: 0
type: Comment
type: QuestionComment
has text: http://stackoverflow.com/questions/8198612/node-js-cannot-find-module-tcp does this help?

http://stackoverflow.com/a/26726524
accepted answer of: http://stackoverflow.com/q/26725241
answers question: http://stackoverflow.com/q/26725241
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: There's two main problems with your code: 1) Your select needs a value binding to hold the selected value; you can't do self.numberOfChildren().value, you'll need a viewmodel observable to hold that value. (So your data-bind should be something like &lt;select data-bind="options: numberOfChildren, value: currentNumberOfChildren"&gt; 2) Instead of trying to use a computed to populate an observable array, you should either just have the computed return the array that you want, or have an observable array with a subscription that populates it. Computed that returns the array: self.children = ko.computed(function () { var children = []; for (var i = 0; i &lt; self.currentNumberOfChildren(); i++) { children.push(new Child("")); } return children; }); Observable Array with subscription: self.children = ko.observableArray([]); //Update self.children wehenver currentNumberOfChildren changes self. currentNumberOfChildren.subscribe(function () { var children = []; for (var i = 0; i &lt; self.currentNumberOfChildren(); i++) { children.push(new Child("")); } self.children(children); }); The first is simpler, but it's not an observable array, and thus doesn't have the helper methods like self.children.push (in fact, it's read only), but personally I'd go the first route. (Working JSFiddle)
score: 1

http://stackoverflow.com/comment/42170561
type: Comment
comment on: http://stackoverflow.com/a/26756868
has text: Void doesn't alter the value of a variable, it just "[evaluates the given _expression_ and then returns `undefined`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void)". For example `(function (a) { void a; return a; })(123);` returns `123`, not `undefined`.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42101586
type: AnswerComment
comment on: http://stackoverflow.com/a/26758170
score: 0
type: Comment
has text: Using your code, `myValue` is accessible in the directive's link function. But when I do `{{ myValue }}` in the template, it is not appearing.

http://stackoverflow.com/comment/42047197
comment on: http://stackoverflow.com/a/26729599
has text: do you mean I should rearrange the value of my some_string_param value? I mean, I should parse this value and replcae all apostrophes in it?
type: Comment
score: 0
type: AnswerComment

apache
tag name: apache
tags question: http://stackoverflow.com/q/26706613
tags question: http://stackoverflow.com/q/26685554
tags question: http://stackoverflow.com/q/26830718
tags question: http://stackoverflow.com/q/26695019
tags question: http://stackoverflow.com/q/26830115
tags question: http://stackoverflow.com/q/26787722
type: Tag

http://stackoverflow.com/a/26750189
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26749877
has body: function initialise(){ var canvas=document.getElementById("canvas1"); canvas.addEventListeer("mousehover", fary, false); } function fary(event){ video.pause({left:event.pageX-200,top:event.pageY+100}); }; you'd better canvas.addEventListeer("mouseover", fary, false); or canvas.addEventListeer("mouseenter", fary, false); event type name was wrong.

http://stackoverflow.com/comment/42001636
score: 0
type: AnswerComment
type: Comment
has text: Np but I gotta ask, why do you want different pool names in db? Imo only data should be different, structure should remain the same. After edit - maybe create array named plugin-names, and inside of it create pool named number:"1" for example
comment on: http://stackoverflow.com/a/26704046

http://stackoverflow.com/comment/42161220
has text: When I see a question saying that something "doesn't work" without explaining *in which way* it doesn't work, I'll vote to close as unclear or lacking sufficient information 9 times out of 9. "It doesn't work" doesn't give anyone a starting point for examining the problem. Explain what results you're getting and how they differ from the intended results, and include any error messages you received.
type: QuestionComment
comment on: http://stackoverflow.com/q/26784951
score: 0
type: Comment

http://stackoverflow.com/q/26787963
has comment: http://stackoverflow.com/comment/42154104
has comment: http://stackoverflow.com/comment/42152487
has answer: http://stackoverflow.com/a/26788076
has comment: http://stackoverflow.com/comment/42152276
favorite count: 0
has title: My Jquery datepicker NOT working
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42152375
upvote count: 1
downvote count: 3
type: Question
score: -2
answer count: 1
has body: Date: My code is not working .when i click my input box that time the onclick calender not appear.I think there may be use onclick() function .But i can not . Please help me. :(
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42152522

http://stackoverflow.com/a/26724078
has comment: http://stackoverflow.com/comment/42037955
has comment: http://stackoverflow.com/comment/42037991
has comment: http://stackoverflow.com/comment/42038139
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26723818
score: 1
has comment: http://stackoverflow.com/comment/42037796
has comment: http://stackoverflow.com/comment/42037827
has body: Consider using something like this: "columnDefs": [{ "targets": 3, "createdCell": function(td,data,row,rIndex,cIndex) { // actions for every cell generated on the column you specified. } }] More info: https://datatables.net/reference/option/columns.createdCell
downvote count: 0

http://stackoverflow.com/a/26717934
has body: PHP is a server side language so once the php code is executed there is either no new file uploaded or there is a new file uploaded, it's never executed during a file upload because the file upload is attached to the request to run the php. Unless you handle the execution of the submit form by javascript there is no way to track the uploading of a file because the moment you press submit in a normal html field the javascript on the page stops executing because the browser is working on the new page that is being loaded.
has comment: http://stackoverflow.com/comment/42026338
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26717666
has comment: http://stackoverflow.com/comment/42026652
downvote count: 0
type: Answer

http://stackoverflow.com/q/26741510
has answer: http://stackoverflow.com/a/26742105
has comment: http://stackoverflow.com/comment/42068891
type: Question
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
has body: //this gives me background colour yellow on img, but if i select another img it will not remove the backround colour on the first selected img : $('img').mousedown(function() { var $selectedDiv = $(this).parent(); var divId = $selectedDiv.attr('id'); currentCol = divId [1]; currentRow = divId [3]; $("#r"+currentCol+"c"+currentRow).css("background", "Yellow"); });
has title: Need help on background colour on selected image mouse down. and remove the background to other image that is selected
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26741607
type: UnansweredQuestion

http://stackoverflow.com/a/40925013
answers question: http://stackoverflow.com/q/26679501
score: 0
has body: If not works Properly then At Page load call the autocomplete function with empty array of strings. E.g. $("input").each(function () { $(this).autocomplete({ src: [] }); }); Now this will work at first keypress also. Best of Luck.
type: Answer

http://stackoverflow.com/q/26768299
has answer: http://stackoverflow.com/a/26769114
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has body: I'm making a marquee using inline block elements. My problem, currently, is achieving infinite scrolling in an efficient way. The end of the scroll looks like this: And the start position is: But I need to achieve an infinite effect. I'm not sure how to go about this, either by swapping the elements inside or something else. Can you please help me with what's left of this little project? For reference, this is how the end position shoud look like: The code is simple (See CodePen here): HTML 1 2 3 4 5 6 7 8 9 10 CSS .viewport { position: relative; margin: 0 auto; padding: 20px 0; width: 200px } .wrapper { position: relative; display: inline-block; white-space: nowrap; transition: 0.8s ease-in-out all; } .item { display: inline-block; width: 25px; height: 25px; } JS var scroller = document.getElementById('wrapper'); function start() { for ( var i = 0; i < scroller.children.length; i++ ) { (function(j) { var timeout = 1000*j; setTimeout(function() { var left = -scroller.children[j].offsetWidth * j, leftPx = left + 'px'; scroller.style.left = leftPx; }, timeout) })(i); } } start();
type: UnansweredQuestion
tagged with: css
score: 2
downvote count: 0
has title: Pure javascript horizontal marquee of inline-block elements
type: Question
upvote count: 2
tagged with: javascript

http://stackoverflow.com/q/26819287
has comment: http://stackoverflow.com/comment/42209397
accepted answer: http://stackoverflow.com/a/26819310
has comment: http://stackoverflow.com/comment/42208340
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42208620
has comment: http://stackoverflow.com/comment/42208324
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26819310
has comment: http://stackoverflow.com/comment/42208338
score: 0
has body: I am using jquery and I need to append some text to a variable: $("document").ready(function(){ var i="this is text"; $(i).append("aa"); alert(i); }) DEMO
has title: How can I append some text to a variable?

http://stackoverflow.com/q/26689531
has title: Javascript comparing number get from property of an Object as String
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26689655
has answer: http://stackoverflow.com/a/26689588
favorite count: 0
possible better answer: http://stackoverflow.com/a/26689655
has answer: http://stackoverflow.com/a/26689571
upvote count: 1
has body: I'm stuck for hours in a weird situation where one number property of a JSON that is received from the server fails a simple equality test. var form = {'answer':'','categoryDisplay':'dbAdmin','creationDate':null,'id':0,'question':'','techJobDisplay':null,'techJobId':65}; var selTechJobId = form.techJobId; var thisVal = String(65); var restoreVal = String(selTechJobId); alert("thisVal : " + thisVal + " | typeof thisVal : " + typeof thisVal); alert("restoreVal : " + restoreVal + " | typeof restoreVal : " + typeof restoreVal); alert("thisVal === restoreVal : " + thisVal === restoreVal); When I run this, the third alert display "false". To me it clearly should display "true". I'm obviously missing something. I've been googling about this for hours and I see most of them is about type mismatch issue. As you can see, I explicitly convert them both to String so it shouldn't be the problem here.
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
tagged with: equality
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26689571
tagged with: javascript

http://stackoverflow.com/comment/42205006
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26817233
has text: I thought he wanted to get something like this.
score: 0

http://stackoverflow.com/comment/42222613
comment on: http://stackoverflow.com/q/26827361
has text: Can you explain what's the initial background image size? Why use animate() instead of simply setting the bg image to `100%` in CSS? Have you tried using CSS3's `transition`? What means dynamic? What you want to achieve? Also if `wt_r` returns i.e: `1200` you're missing the `unit`!
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42213827
score: 0
type: Comment
type: QuestionComment
has text: Thank you David Thomas - I think your link is what im looking for
comment on: http://stackoverflow.com/q/26822173

http://stackoverflow.com/comment/42171128
type: Comment
comment on: http://stackoverflow.com/a/26798117
has text: Thanks for the answer, since i cant use this because of browser compatibility
score: 0
type: AnswerComment

http://stackoverflow.com/a/26679909
type: Answer
has comment: http://stackoverflow.com/comment/41960014
has comment: http://stackoverflow.com/comment/41965867
has comment: http://stackoverflow.com/comment/41959313
has body: Your probelm might be that jquerys .html() function replaces. Does it work if you change it to $(".banner-block .title").append(xhr.getResponseHeader('Content-Length') + ' bytes');
has comment: http://stackoverflow.com/comment/41964324
score: 0
has comment: http://stackoverflow.com/comment/41962013
answers question: http://stackoverflow.com/q/26678980
has comment: http://stackoverflow.com/comment/41962490

http://stackoverflow.com/a/26830980
downvote count: 0
has body: The transition property in your CSS is the problem. Replace the all for something more specific. If you want a transition in the text color, then just use color: .panel-styling:hover { cursor: pointer; color: rgba(255,0,0,1); border-bottom: 1px solid rgba(255,0,0,1); -webkit-transition: color 0.25s; -moz-transition: color 0.25s; transition: color 0.25s; }
accepted answer of: http://stackoverflow.com/q/26830922
answers question: http://stackoverflow.com/q/26830922
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/42228873
score: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/41996706
score: 0
has text: most of the relevant code i have shared here : http://www.codeshare.io/UupFC @plbsam
comment on: http://stackoverflow.com/q/26701331
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42066148
score: 0
type: Comment
type: QuestionComment
has text: `return` is neither a function nor an output method. Luckily, `JSON.stringify` isn't either, it only transforms an object to a string, which means you can use it - the output is still done by `alert`.
comment on: http://stackoverflow.com/q/26739694

http://stackoverflow.com/a/26783276
answers question: http://stackoverflow.com/q/26783080
accepted answer of: http://stackoverflow.com/q/26783080
upvote count: 153
downvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/103907514
score: 151
type: Answer
has body: See documentation of moment js parse function JSFiddle var dt = moment("12:15 AM", ["h:mm A"]).format("HH:mm");

http://stackoverflow.com/comment/42227795
type: Comment
has text: yes! That is exactly what I am looking for. Let me try and implement this in my project and see how it works. Will get back to hopefully accept this answer soon.
score: 0
comment on: http://stackoverflow.com/a/26819771
type: AnswerComment

http://stackoverflow.com/comment/43754183
type: AnswerComment
comment on: http://stackoverflow.com/a/26697548
type: Comment
has text: Hello, again. I tried many times to get this to work. I've updated the post to show you all my my sites code. I'm feeling very stupid here. I've been trying to get it on my own when ever I had some time on my hands. it just isn't working for me.
score: 0

http://stackoverflow.com/q/26749822
has body: I have inherited a form that has some existing JavaScript that creates a new date + 3 months from today's date. var monthAway = new Date(new Date); var day =monthAway.getDate(); var month =monthAway.getMonth() + 3; var year =monthAway.getFullYear(); $('#Date_for_Second_Store_Access_to_Expire').val(day + "/" + month + "/" + year); &lt;p&gt;&lt;input id="Date_for_Second_Store_Access_to_Expire" type="hidden" name="Date_for_Second_Store_Access_to_Expire" class="required" /&gt;&lt;/p&gt; Issue is that if today's date is in October, November or December new date month will be 13, 14 or 15 rather than updating the to 1, 2 or 3 and then updating the year, e.g. 5/11/2014 is 05/14/2014 rather than 05/02/2015. Any ideas?
has answer: http://stackoverflow.com/a/26749847
type: AnsweredQuestion
has title: Display date + 3 months using JavaScript?
tagged with: date
possible better answer: http://stackoverflow.com/a/26749865
type: Question
has answer: http://stackoverflow.com/a/26749874
has answer: http://stackoverflow.com/a/26749865
score: 0
has comment: http://stackoverflow.com/comment/42083953
tagged with: javascript
has answer: http://stackoverflow.com/a/26749852
accepted answer: http://stackoverflow.com/a/26749874
answer count: 4

http://stackoverflow.com/comment/42221009
comment on: http://stackoverflow.com/a/26826132
type: AnswerComment
has text: This renders pixel, i am looking for construction of generic object such as a jpeg/png.
type: Comment
score: 0

http://stackoverflow.com/comment/42194639
comment on: http://stackoverflow.com/a/26810756
type: AnswerComment
has text: Is there any way you can host that servlet through the same domain as the originating app?
score: 0
type: Comment

http://stackoverflow.com/q/26695272
has body: So how exactly would i write $('div').addClass('border1'); in Vanilla javascript, like what would my add class method look like. So far what I have is, function addClass(x,y) { x.className += " " + y; } but i know this is wrong, as the parameters are off. Im really lost.
has comment: http://stackoverflow.com/comment/41985684
has comment: http://stackoverflow.com/comment/41985601
type: Question
accepted answer: http://stackoverflow.com/a/26695383
upvote count: 5
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41985658
has comment: http://stackoverflow.com/comment/41985618
downvote count: 0
has comment: http://stackoverflow.com/comment/41985608
has answer: http://stackoverflow.com/a/26695306
favorite count: 0
has answer: http://stackoverflow.com/a/26695343
has comment: http://stackoverflow.com/comment/41985627
has comment: http://stackoverflow.com/comment/41985611
answer count: 5
has answer: http://stackoverflow.com/a/26695383
possible better answer: http://stackoverflow.com/a/26695306
score: 5
has comment: http://stackoverflow.com/comment/41985664
has answer: http://stackoverflow.com/a/26695378
has title: How would I write this JQuery addClass method in vanilla js
has comment: http://stackoverflow.com/comment/41985663
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26695313

http://stackoverflow.com/q/26782363
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
score: 2
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/26782760
accepted answer: http://stackoverflow.com/a/26782766
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26782760
upvote count: 2
answer count: 2
has body: I currently have this type of layout: +---------------+ | hide/show | &lt;-- button +---------------+ +---+ +---+ +---+ | 1 | | 2 | | 3 | &lt;- widgets +---+ +---+ +---+ +---+ +---+ +---+ | 4 | | 5 | | 6 | +---+ +---+ +---+ +---+ +---+ +---+ | 7 | | 8 | | 9 | +---+ +---+ +---+ Within each widget, i have a 'close button': +-------------------------------------------+ | \ /| | HEADING X | &lt;--'close widget' button | / \| +-------------------------------------------+ | _/ | CONTENT ___/ | _______/ | __________/ | / |_________________/ Main Issue I am using Jquery's 'toggle' effect to achieve this. However, the big button (Hide/Show) is used to hide/show all of them. (all hidden, all shown) I can't seem to work out how to do this :( Currently i have this jsfiddle showing if I close a couple of them, and hit the toggle all button, it will close the rest on screen, and show the one's i've just closed (not wanted). I want this button to show all (or hide all) depending on if (a) they are all hidden, then show all or (b) if some are hidden, then show them. (c) if all are shown, then hide all. How can I get this functionality? Side Issue (wanted but not necessarily required) On the 'show', how can I get them to show div1 first, then div2, then div3/etc until all are shown? (i.e. toggle them in sequence)
has answer: http://stackoverflow.com/a/26782766
tagged with: jquery
favorite count: 0
has title: SlideToggle multiple divs in sequence

http://stackoverflow.com/q/26815522
favorite count: 0
has body: I tried OSRM online demo [1] and Front End source codes [2] http://map.project-osrm.org/ https://github.com/Project-OSRM/osrm-frontend There we can set start and set location on text boxes. In order to set route markers between start and end we need to click on the path and drag to required point on the map. Is there anyway to set these intermediate points dynamically using JavaScript?
accepted answer: http://stackoverflow.com/a/26817792
type: AnsweredQuestion
tagged with: leaflet
upvote count: 1
downvote count: 1
tagged with: osrm
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26817792
tagged with: openstreetmap
answer count: 1
has title: How to set OSRM (Open Source Routing Machine) route markers by a javascript?
tagged with: maproute

http://stackoverflow.com/a/26812874
answers question: http://stackoverflow.com/q/26812833
has body: You can create a custom filter for this. I have modified your fiddle a little bit: http://jsfiddle.net/sfqo2fn3/2/ myApp.filter('slice', function() { return function(arr, start, end) { if(!end) { return (arr || []).slice(start); } return (arr || []).slice(start, end); }; }); You now have a "slice" filter that will filter to only show the last 5 items in the array.
upvote count: 3
downvote count: 0
score: 3
type: Answer

http://stackoverflow.com/comment/42178296
comment on: http://stackoverflow.com/q/26802262
has text: variable is bound somewhere on the page and doesn't update
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26675107
tagged with: javascript
has body: Let's say I have a list of recurring events that happen the same day and time of the week, e.g. Wednesday 5:30 - 7:30pm. Obviously I don't want to store a huge number of date strings looking to the future. What is the best way to store this data so I can test against it with the current date/time. I'd like to filter a list of events stored as JSON based on if the event is occurring today. To take it a step further I'd like to test if the event has yet to begin, is currently ongoing, or is complete. Here's an example of the kind of data I'm working with: "schedule": [ "wednesday": { "open": "5:30", "close": "7:30" }, "thursday": { "open": "5:30", "close": "7:30" }, "friday": { "open": "5:30", "close": "7:30" }, "saturday": { "open": "3:30", "close": "4:30" }, "sunday": { "open": "2:30", "close": "4:30" } ] I understand that Date.getDay(); returns an integer representation of the day-of-the-week so perhaps I should be using that rather than a string representation. The current schema would require grabbing the hour and minutes from both a new Date object, and the daily schedule and comparing them together. There has to be a better way.
accepted answer: http://stackoverflow.com/a/26675630
downvote count: 0
has title: JavaScript Dates: How do I compare the current date/time against a recurring event?
favorite count: 0
has comment: http://stackoverflow.com/comment/41950142
has comment: http://stackoverflow.com/comment/41950441
tagged with: datetime
possible better answer: http://stackoverflow.com/a/26675199
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26675199
score: 1
has answer: http://stackoverflow.com/a/26675630
upvote count: 1
type: Question
answer count: 2

http://stackoverflow.com/a/26764885
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26764508
accepted answer of: http://stackoverflow.com/q/26764508
has body: From what I gathered from your question this what I believe you need. Hopefully it will get you going in the right direction. var textAreaID = "user-input"; //turn the text area content into an array var content = document.getElementById(textAreaID).innerHTML.split("\n"); //create array to hold new Content var newContent = []; //loop through and add line numbers for (var i = 0; i &lt; content.length; i++) { //begin for loop //append the line numbers and the new value to the newContent array newContent.push((i + 1) + content[i] + "\n"); } //end for loop //update the content of textArea with line numbers document.getElementById(textAreaID).innerHTML = newContent.join(""); &lt;textarea id="user-input" name="user-input" rows="15" cols="40"&gt; Hello is it working? I think so. &lt;/textarea&gt;
score: 4
has comment: http://stackoverflow.com/comment/42131024
upvote count: 4

http://stackoverflow.com/q/26723440
type: Question
has comment: http://stackoverflow.com/comment/42036573
possible better answer: http://stackoverflow.com/a/26723726
has answer: http://stackoverflow.com/a/26723642
has comment: http://stackoverflow.com/comment/42036566
has title: Is there a way IE 11 can show the inside of a object like chrome ? Maybe a plugin?
has body: In chrome when the Front End people do a Console.Log of an object I can see the whole tree. With IE I only see the word [Object]. Any work around so I can see the tree in IE 11 ?
answer count: 2
upvote count: 1
tagged with: google-chrome
accepted answer: http://stackoverflow.com/a/26723642
type: AnsweredQuestion
tagged with: ie-developer-tools
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26723726
score: 1
favorite count: 0

http://stackoverflow.com/q/26772159
has title: Meteor throwing error when trying to use bootstrap
upvote count: 1
has comment: http://stackoverflow.com/comment/42125221
answer count: 1
downvote count: 0
tagged with: meteor
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
has body: So I am trying to display all the registered users as tabs(that you can close) on top of the home page. For this I am trying to recycle code in this jisfiddle http://jsfiddle.net/4atm5abf/. However, I am running into errors/issues when trying to use bootstrap. Here is what my header.html looks like: SocialStore {{> listUsers}} {{>loginButtons}} <!-- {{>user_tab}} --> {{script}} {{#each Allusers}} × {{username}} {{/each}} Here is what my header.js looks like: Template.listUsers.helpers({ Allusers: function() { return Meteor.users.find().fetch(); }, script: function() { var currentTab; var composeCount = 0; //initilize tabs $(function () { //when ever any tab is clicked this method will be call $("#myTab").on("click", "a", function (e) { e.preventDefault(); $(this).tab('show'); $currentTab = $(this); }); registerCloseEvent(); }); function registerCloseEvent() { $(".closeTab").click(function () { //there are multiple elements which has .closeTab icon so close the tab whose close icon is clicked var tabContentId = $(this).parent().attr("href"); $(this).parent().parent().remove(); //remove li of tab $('#myTab a:last').tab('show'); // Select first tab $(tabContentId).remove(); //remove respective tab content }); } //shows the tab with passed content div id..paramter tabid indicates the div where the content resides function showTab(tabId) { $('#myTab a[href="#' + tabId + '"]').tab('show'); } //return current active tab function getCurrentTab() { return currentTab; } //this will return element from current tab //example : if there are two tabs having textarea with same id or same class name then when $("#someId") whill return both the text area from both tabs //to take care this situation we need get the element from current tab. function getElement(selector) { var tabContentId = $currentTab.attr("href"); return $("" + tabContentId).find("" + selector); } function removeCurrentTab() { var tabContentId = $currentTab.attr("href"); $currentTab.parent().remove(); //remove li o…
score: 1
type: Question
has answer: http://stackoverflow.com/a/26773352
tagged with: javascript
tagged with: meteorite
tagged with: jquery

http://stackoverflow.com/comment/42017792
has text: Let us [continue this discussion in chat.](http://chat.stackoverflow.com/rooms/64166/discussion-between-ravi-and-sameera)
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26712618

http://stackoverflow.com/a/26832274
score: 0
has comment: http://stackoverflow.com/comment/42231582
answers question: http://stackoverflow.com/q/26832084
has body: This is how you can do what you are tried to achieve: I've used setInterval to demonstrate. Fiddle HTML: &lt;img src="http://dummyimage.com/100x100/252799/fff.png&amp;text=one" /&gt; JavaScript: var imgs = ['http://dummyimage.com/100x100/252799/fff.png&amp;text=one', 'http://dummyimage.com/100x100/252799/fff.png&amp;text=two', 'http://dummyimage.com/100x100/252799/fff.png&amp;text=three', 'http://dummyimage.com/100x100/252799/fff.png&amp;text=four', 'http://dummyimage.com/100x100/252799/fff.png&amp;text=five', 'http://dummyimage.com/100x100/252799/fff.png&amp;text=six', 'http://dummyimage.com/100x100/252799/fff.png&amp;text=seven', 'http://dummyimage.com/100x100/252799/fff.png&amp;text=eight', 'http://dummyimage.com/100x100/252799/fff.png&amp;text=nine', 'http://dummyimage.com/100x100/252799/fff.png&amp;text=ten']; setInterval(function() { var im = document.getElementsByTagName('img')[0]; im.src = imgs[Math.round(Math.random() * (imgs.length - 1))]; }, 1000);
type: Answer

http://stackoverflow.com/q/26764929
tagged with: javascript
tagged with: for-in-loop
has comment: http://stackoverflow.com/comment/42111025
score: 0
has comment: http://stackoverflow.com/comment/42110894
has comment: http://stackoverflow.com/comment/42110950
has comment: http://stackoverflow.com/comment/42110759
has title: looping through an object using a for in
has body: Can anyone help me?be stuck for a while, all i need to do is print out the properties of my object,anyone know why this doesnt work? &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; function person(name, dateOfBirth, nationality){ this.name = name; this.dateOfBirth = dateOfBirth; this.nationality = nationality; } var mark = new person("mark oshea",25,"irish"); var text = ""; for(x in mark) { text += mark[x]; } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;
has comment: http://stackoverflow.com/comment/42110897
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26765112
has answer: http://stackoverflow.com/a/26764998
has answer: http://stackoverflow.com/a/26765102
type: Question
answer count: 3
has comment: http://stackoverflow.com/comment/42110844

http://stackoverflow.com/q/26798325
has comment: http://stackoverflow.com/comment/42173904
accepted answer: http://stackoverflow.com/a/26799314
has comment: http://stackoverflow.com/comment/42171315
has comment: http://stackoverflow.com/comment/42170616
tagged with: javascript
answer count: 5
has answer: http://stackoverflow.com/a/26800167
has comment: http://stackoverflow.com/comment/42172186
has comment: http://stackoverflow.com/comment/42170559
has body: I am making an application where a header with some Menus and a footer will stay in all the pages. Now one way to this is write the code for header and footer in every page, which is a bad option. The other option is using iframe,which I am using. here is my code- &lt;div style="height:75%;width:98%;"&gt; &lt;iframe name="someFrame" id="someFrame" frameborder="0" scrolling="yes" width="98%" height="100%"&gt;&lt;/iframe&gt; &lt;/div&gt; In this iframe I am calling the the contents of the other pages. I have one home page with a header and footer, and the middle portion will change using iframe. To achieve the overlapping of iframes perfectly I use a jquery function which is below. &lt;script&gt; $("a").click(function(e) { e.preventDefault(); $("#someFrame").attr("src", $(this).attr("href")); $("a").removeClass("active"); $(this).addClass("active"); }) &lt;/script&gt; Now what I need is - is there any other way to do it?? That I can make 2 different pages for header and footer, and get the contents in every page? using java?? or ajax or whatever.. Any help will be appreciable...
has comment: http://stackoverflow.com/comment/42170721
score: 2
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/8339085
downvote count: 0
tagged with: jquery
linked to: http://stackoverflow.com/q/1088198
favorite count: 0
possible better answer: http://stackoverflow.com/a/26837471
has answer: http://stackoverflow.com/a/26837471
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42170748
has title: How to get the content of a html page from another html page?
has answer: http://stackoverflow.com/a/26799314
tagged with: css
has comment: http://stackoverflow.com/comment/42171081
has answer: http://stackoverflow.com/a/26798783
has comment: http://stackoverflow.com/comment/42171306
upvote count: 2
tagged with: iframe
has answer: http://stackoverflow.com/a/26799468

http://stackoverflow.com/a/26675897
type: Answer
answers question: http://stackoverflow.com/q/26675622
has body: Using pure JavaScript you can do this: Demo on Fiddle var all = document.getElementsByClassName('htx'); for (i = 0; i &lt; all.length; i++) { if (all[i].getElementsByTagName('div')[0].innerHTML == 'otherString') { break } else { all[i].style.backgroundColor = 'sienna'; } }
score: 0

http://stackoverflow.com/q/26775823
has answer: http://stackoverflow.com/a/32571984
has answer: http://stackoverflow.com/a/26775891
downvote count: 0
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26775890
favorite count: 0
has answer: http://stackoverflow.com/a/26775890
has answer: http://stackoverflow.com/a/26775918
has answer: http://stackoverflow.com/a/26775901
has comment: http://stackoverflow.com/comment/42130278
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26775897
accepted answer: http://stackoverflow.com/a/26775891
tagged with: tablesorter
upvote count: 1
type: Question
has title: jQuery's .click() event stopped working
has body: I have a table where the first column of each row contains several icons, each one inside an a element: &lt;a title="aaa@aaa.es" class="delete" href="#" data-toggle="modal" data-target="#dialogDeleteUser"&gt; &lt;img alt="delete" src="/recursos/imagenes/iconPapelera.png"&gt; &lt;/a&gt; And I have a jQuery function that should trigger when that link is clicked: $(document).ready(function(){ $("a.delete").click(function() { var userEmail = $(this).attr("title"); loadUserDelete(userEmail); }); The fact is that it worked for some time, right until I started loading the table content with TableSorter using the Pager widget and through Ajax. The table loads just fine but for some reason the class doesn't get recognized within that function and I don't know why.
score: 1
answer count: 6
has comment: http://stackoverflow.com/comment/42130330

http://stackoverflow.com/comment/42207518
score: 0
has text: I haven't been able to completely solve your problem but one thing I notice is that in your starting formulas for the colors (e.g. Green: 2x - xy + y - 1), the 1 is based on your scale example of 0 to 1. In your live example, 1 is 255, correct? If you switch that to 255, at least you'll get rid of all the strange lines.
comment on: http://stackoverflow.com/q/26818127
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26806506
has body: According to the manual they say: The ngChange expression is only evaluated when a change in the input value causes a new value to be committed to the model. It will not be evaluated: * if the value returned from the $parsers transformation pipeline has not changed * if the input has continued to be invalid since the model will stay null * if the model is changed programmatically and not by a change to the input value So if it were me I would try to verify if change() is firing off (by logging it or something). If it's not firing off then I would see if that third bullet is the case.
has comment: http://stackoverflow.com/comment/42186591
answers question: http://stackoverflow.com/q/26806210
score: 0
type: Answer

http://stackoverflow.com/q/26720338
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26720513
has body: I have a PHP file I called it for the test index1.php In the file I have this code now: change picture <?php $allowed_types = ['png','jpg','jpeg','gif']; $imageDir = 'files/radar-simulation-files'; /* Assumes this .php is being run from the http root on the same domain as the desired image files. */ $handle = opendir($imageDir); while (($imgPath = readdir($handle)) !== false) if ( in_array( strtolower(pathinfo($imgPath, PATHINFO_EXTENSION)), $allowed_types )) echo ' '; closedir($handle); ?> Now I have to use with this code also JavaScript code and I don't know where to add this code ? (function(d) { // user defines var swapHours = 0, swapMinutes = 0, swapSeconds = 5, swapTotal = (swapHours * 60 + swapMinutes) * 60 + swapSeconds, loopSlideShow = true; // some handy helper functions function classExists(e, className) { return RegExp('(\\s|^)' + className + '(\\s|$)').test(e.className); } function classAdd(e, className) { if (classExists(e, className) return false; e.className += (e.className ? ' ' : '') + className; return true; } function classRemove(e, className) { if (!classExists(e, className)) return false; e.className = e.className.replace( new RegExp('(\\s|^)' + n + '(\\s|$)'), ' ' ) . replace(/^\s+|\s+$/g,''); return true; } function textReplace(e, newtext) { if (d.innerText) e.innerText = newText; else e.textContent = newText; } function nodeFirst(e) { e = e.firstChild; while (e && e.nodeType != 1) e = e.nextSibling; return e; } function nodeLast(e) { e = e.lastChild; while (e && e.nodeType != 1) e = e.prevSibling; return e; } function nodeNext(e) { while (e) if ((e = e.nextSibling).nodeType == 1) return e; return null; } function nodePrev(e) { while (e) if ((e = e.prevSibling).nodeType == 1) return e; return null; } // slideShow setup var slideShow = d.getElementById('slideShow'), slideCounter = d.getElementById('slideCounter'), firstSlide = nodeFirst(slideShow), lastSlide = nodeLast(slideShow), currentSlide = firstSlide, swapCounter; classAdd(slideShow, 'ss…
has comment: http://stackoverflow.com/comment/42030667
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26720513
score: 0
has comment: http://stackoverflow.com/comment/42030938
answer count: 1
has comment: http://stackoverflow.com/comment/42030764
has title: Where and how do I add JavaScript code and CSS code in PHP file?
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css

http://stackoverflow.com/comment/41988926
has text: after making id unique (ids have been changed), it's still generating the same error @FrédéricHamidi
score: 0
comment on: http://stackoverflow.com/q/26697209
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42045479
comment on: http://stackoverflow.com/a/26713719
type: Comment
has text: you have changed the css? from `:hover` to `.hover`
score: 0
type: AnswerComment

http://stackoverflow.com/a/26797309
has body: When you look at you index php page. You will see your navigation divs. To turn off the behavior you can remove the toggle class. &lt;div class = container&gt; Etc One of the classes will be a toggle class. Simply remove it. What version is it? 2 or 3. You can just replace the code with yours. I'm familiar with joomla with is basically html surrounding php. If your looking to modify the css you will need to override it. How you do this easily will depend on wether your template uses CSS LESS or a custom.css file. You could even remove the navigation diva and replace with your own code utilizing bootstrap layout classes. Giving the version of bootstrap will help with this question. Bootstrap uses media queries you need to find what query you are targeting. Bootstrap website is very informative on this http://getbootstrap.com/getting-started/ There are examples of layouts here. Make sure your nav divs and classes are the same. It will work. Please back up or comment out old code for reuse. When I get to my PC il look at code if not fixed by then. You cofusing me slightly here. You have a menu (bootstrap) one and you have a plugin that is also calling a menu? Or Do you have two menus on the same page? Or does your plugin rely on the the current menu? Im confused what you want here. It looks like you have a menu as part of the template and then you are calling a module to create a menu in the form of a plugin. It will not work if this is the case. The plugin menu may conflict with the existing menu. If you have your own existing menu why dont you just remove the entire template menu and then just let your plugin be called? If I am way of the mark I apologize. However if a plugin is involved the code is an unknown! Is the plugin an addon to the template? If not you may have a conflict Think you may need to contact the developer of the plugin
answers question: http://stackoverflow.com/q/26796878
has comment: http://stackoverflow.com/comment/42172002
has comment: http://stackoverflow.com/comment/42168626
has comment: http://stackoverflow.com/comment/42169055
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42203044

http://stackoverflow.com/comment/42172751
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26796895
type: Comment
has text: OK I think my issue may in fact relate to a $.getJSON() call I make in my js code within the html file. That is trying to access a remote page returning jsonp data, but I never get data returned. Trying to figure out why this is happening when called within the node.js static server, and not on the normal server

http://stackoverflow.com/comment/42115434
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26767008
score: 0
has text: Are you sure you're getting valid references to your DOM objects? Make sure that your variables aren't empty. What is your console saying?

http://stackoverflow.com/q/26787772
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26787851
type: Question
tagged with: average
has title: Average of input prompt numbers
score: 0
answer count: 2
favorite count: 0
has comment: http://stackoverflow.com/comment/42151976
has comment: http://stackoverflow.com/comment/42151985
has answer: http://stackoverflow.com/a/26787851
has comment: http://stackoverflow.com/comment/42151978
has body: I am having an issue with getting the average of the numbers that are inputted through a prompt window. I need to display the numbers like i have so far, but I can't seem to get them to add together to get the average. here is my code so far. &lt;html&gt; &lt;body&gt; &lt;script type="text/javascript"&gt; function show_prompt() { i = 0; do { var number = prompt("Please Enter a Number"); var number = parseInt(number); i++; document.write("Number: " + number); document.write("&lt;br&gt;"); } while (i &lt; 5); } show_prompt(); var avrg = number + number + number + number + number document.write('Average of scores : ' + avrg); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;
upvote count: 1
tagged with: loops
downvote count: 1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26787837
has answer: http://stackoverflow.com/a/26787837

http://stackoverflow.com/a/26727653
has comment: http://stackoverflow.com/comment/42043986
has comment: http://stackoverflow.com/comment/42043999
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42044070
has body: Admittedly I haven´t used JS-routes but I think your problem is due to the fact that you are using Routes.relationship_path instead of Routes.relationships_path. Note that the former is singular (thats why the route expects an id to a relationship) relationship while relationships_path should link to the collection. Routes.relationships_path() // => "/relationships" Routes.relationships_path(1) // => "/relationships/1" $(document).ready(function() { $('#add-relationship').click(function(event) { event.preventDefault(); var addRelationshipBtn = $(this); $.ajax({ // note relationships - not relationship url: Routes.relationships_path(), data: { relationship: { followed_id: addRelationshipBtn.data('followedId') } }, dataType: 'json', type: 'POST', success: function(e) { addRelationshipBtn.hide(); $('#relationship-status').html("Relationship Requested") } }); }); }); Another issue is that you where attempting to pass the followed_id in the query parameters instead of the POST request body.
accepted answer of: http://stackoverflow.com/q/26725930
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26725930
has comment: http://stackoverflow.com/comment/42069027
has comment: http://stackoverflow.com/comment/42068963
type: Answer

http://stackoverflow.com/comment/42156874
comment on: http://stackoverflow.com/q/26790326
score: 0
type: QuestionComment
has text: So which `item.name` and `item.value` is this happening on?
type: Comment

http://stackoverflow.com/a/26700840
has comment: http://stackoverflow.com/comment/41997833
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41997987
type: Answer
has comment: http://stackoverflow.com/comment/41995373
accepted answer of: http://stackoverflow.com/q/26700463
answers question: http://stackoverflow.com/q/26700463
has body: You have done basically two mistakes. The first the attribute need to be concatenated correctly, so this statement must be var div = angular.element( ' directive ' ); Secondly the value provide in html should be added inside quotes, therefore h1 should be: test See my plunkr http://plnkr.co/edit/QctVj9utJ88Xss8O11ze?p=preview

http://stackoverflow.com/a/26712381
has comment: http://stackoverflow.com/comment/42018795
has comment: http://stackoverflow.com/comment/42016750
type: Answer
has body: Assuming you have images die1.gif to die6.gif in the same directory as the html file, the following code should be fine: Also, read this.
accepted answer of: http://stackoverflow.com/q/26711837
answers question: http://stackoverflow.com/q/26711837
has comment: http://stackoverflow.com/comment/42016644
has comment: http://stackoverflow.com/comment/42018629
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/26776924
has body: Try this: customerList['cusomer'].forEach(function(e){ alert(e.name) });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26776614

http://stackoverflow.com/comment/42061760
has text: Is this the whole code? Because there are closing curly brackets missing at the end of your script tag
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26737875
score: 2

http://stackoverflow.com/a/26717305
upvote count: 2
answers question: http://stackoverflow.com/q/26715573
downvote count: 0
type: Answer
has body: Though I am new to nodejs, I will try to give some advices. IMHO, Node doesn't handle any parallelism. It is single-thread, means only 1 process, 1 thread, 1 cpu. All his power resides in his non-blocking way of processing by using callback functions. This makes node stay rapid without the complexity of multithread. If a single nodejs server is not enough for your huge incoming request, think of cluster to take advantage of multi-core system : http://nodejs.org/api/cluster.html Just google. There are lots of articles on this topic.
score: 2

http://stackoverflow.com/comment/42136954
type: AnswerComment
has text: Your questions is very hard for me because i work not on my own code. I know php , not jquery and i try to learn it :D I use firebug in mozilla. I though about something like that: 'code'(rowTemplate2(ii).value = "xx";) but it's doesn't work too.
comment on: http://stackoverflow.com/a/26779168
score: 0
type: Comment

http://stackoverflow.com/q/26748964
score: 1
type: Question
has title: Filter uniques in array based on subarray property
tagged with: arrays
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26749981
possible better answer: http://stackoverflow.com/a/26749012
has body: I'd like to filter this data for unique sub-arrays with the second property, so var arr = [ ["foo", "one"], ["bar", "one"], ["baz", "two"], ["qux", "two"] ] should turn into var arr = [ ["foo", "one"], ["baz", "two"] ] I could try a manual approach with two nested forEach, but it seems a inefficient. Array.prototype.filter seems to be better suited, but I fear I'm lacking experience to use it properly.
has comment: http://stackoverflow.com/comment/42082381
has answer: http://stackoverflow.com/a/26749012
favorite count: 0
has answer: http://stackoverflow.com/a/26749020
answer count: 5
has answer: http://stackoverflow.com/a/26749205
accepted answer: http://stackoverflow.com/a/26749981
upvote count: 1
has answer: http://stackoverflow.com/a/26750276
type: AnsweredQuestion

http://stackoverflow.com/a/26713715
upvote count: 2
has comment: http://stackoverflow.com/comment/42020908
has comment: http://stackoverflow.com/comment/42018198
has comment: http://stackoverflow.com/comment/42020476
has comment: http://stackoverflow.com/comment/42022091
has comment: http://stackoverflow.com/comment/42019625
downvote count: 0
has body: Try replacing the loop with a recursive code like this.. function recurring_end() { var diffbot = new Diffbot('ddddd'); var sql= "SELECT `bookmarks`.`id`,`bookmarks`.`bookmark_url` as url FROM bookmarks LIMIT 0, 10"; connection.query(sql, function(err,bookmarks) { console.log(JSON.parse(JSON.stringify(bookmarks))); var i = 0; var callbackForParseArticle = function(err,result){ bookamrk_title= result.bookmark_title; bookmark_body= result.body; bookmark_file_name= result.file_name; preview_image = result.preview_image; local_image_name = result.local_image_name; mainPreviewImage = result.mainPreviewImage; viewImage=result.viewImage; var mediaExist =result.mediaExist; if(mediaExist == 1) { console.log("Entered in Media Exist"); download(preview_image, "images/" + local_image_name, function() { console.log("Entered in download"); fs.exists("images/" + local_image_name, function(exists) { console.log("Before Sending " +mainPreviewImage); console.log("Before Sending Local " +local_image_name); ImageMagic(local_image_name,mainPreviewImage,223,147,function(err,result) { if(result != 0){ mainPreviewImage= result; console.log("Image Magic Done" +mainPreviewImage); AmazonUpload(mainPreviewImage,function(err,result) { console.log("Amazon error "+err); if(result != 0){ mainPreviewImage = result; console.log("First Image Uploading is Sucessfully"); /* Now Lets Pass View Image FROM Graphic Magic */ ImageMagic(mainPreviewImage,viewImage,152,100,function(err,result) { if(result != 0){ viewImage= result; /* Upload New View File to Amazon */ AmazonUpload(viewImage,function(err,result) { if(result != 0){ viewImage = result; console.log("Second Image Upload to Amazon"); /*Finally here we need to write update logic here check it out */ console.log("Serious id is "+i); console.log("Book Mark id " +bookmark_id); console.log("bookamrk_title" +bookamrk_title); console.log("preview_image"+mainPreviewImage); console.log("viewImage"+viewImage); console.log("End " +ddd); }else { /* need to write…
type: Answer
has comment: http://stackoverflow.com/comment/42040917
score: 2
answers question: http://stackoverflow.com/q/26713354

http://stackoverflow.com/a/26696299
has comment: http://stackoverflow.com/comment/71119092
has body: Use the Dialogs plugin instead: https://www.npmjs.com/package/cordova-plugin-dialogs cordova plugin add cordova-plugin-dialogs Then you can replace all calls to alert() with: navigator.notification.alert(message, alertCallback, [title], [buttonName]) Example: navigator.notification.alert( 'You are the winner!', // message alertDismissed, // callback 'Game Over', // title 'Done' // buttonName ); Just be aware that the standard alert() blocks script execution, while the plugin version is non-blocking and hence provides an optional callback.
type: Answer
has comment: http://stackoverflow.com/comment/42028999
has comment: http://stackoverflow.com/comment/41990986
accepted answer of: http://stackoverflow.com/q/26696106
score: 8
downvote count: 0
answers question: http://stackoverflow.com/q/26696106
has comment: http://stackoverflow.com/comment/41987573
has comment: http://stackoverflow.com/comment/42029292
upvote count: 8
type: AcceptedAnswer

http://stackoverflow.com/comment/42060732
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26723214
has text: Hey no problem! Skrollr is a very cool JavaScript plugin, but it can be testy, good luck!
type: Comment

http://stackoverflow.com/comment/42006377
comment on: http://stackoverflow.com/a/26697548
type: AnswerComment
has text: `body > div` could become `.container .box`. Place the divs in a parent with a class such as `container` and give the divs inside a class, the same class for each inner div.
type: Comment
score: 0

parse-platform
tags question: http://stackoverflow.com/q/26779184
tags question: http://stackoverflow.com/q/26826820
tags question: http://stackoverflow.com/q/26684263
type: Tag
tags question: http://stackoverflow.com/q/26827503
tags question: http://stackoverflow.com/q/26707327
tags question: http://stackoverflow.com/q/26793780
tags question: http://stackoverflow.com/q/26674900
tags question: http://stackoverflow.com/q/26726676
tags question: http://stackoverflow.com/q/26817595
tags question: http://stackoverflow.com/q/26677920
tags question: http://stackoverflow.com/q/26682722
tags question: http://stackoverflow.com/q/26807100
tags question: http://stackoverflow.com/q/26702413
tags question: http://stackoverflow.com/q/26741644
tags question: http://stackoverflow.com/q/26745981
tags question: http://stackoverflow.com/q/26813648
tags question: http://stackoverflow.com/q/26742955
tag name: parse-platform

http://stackoverflow.com/comment/42102690
comment on: http://stackoverflow.com/a/26760008
has text: I've tried the last update and it renders widgets in all cells of column but not in the header cell.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42066802
comment on: http://stackoverflow.com/q/26740250
score: 0
type: Comment
type: QuestionComment
has text: data is the HTML string. I'm using $.get() to retrieve it.

http://stackoverflow.com/q/26761875
accepted answer: http://stackoverflow.com/a/26762173
has answer: http://stackoverflow.com/a/26762678
tagged with: razor-2
has title: Call GET from JavaScript and passing parameters
possible better answer: http://stackoverflow.com/a/26762678
type: AnsweredQuestion
has body: Hi I am new to ASP Razor and i want to know how to call URL Action to pass parameter to GET verb in the controller from JavaScript.Reloading the same page javascript { //some code @Url.Action("myAction","Conntroller", new { param1 = 123, param2 = 456}) // do not want to open new window but to reload the page } public ActionResult myAction(para1, param2) { return view() } Thanks in advance
tagged with: asp.net-mvc-3
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26762173
score: 0
answer count: 2

http://stackoverflow.com/q/26699697
tagged with: draggable
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26700184
score: 0
type: Question
has title: greensock draggable / triggering click and drag
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: gsap
has body: I have an issue which is related to greensock animation but also may be a more general js issue in that I need to transfer a mousedown event to a second draggable instance after killing the first draggable instance. the codepen hopefully will illustrate what i am trying to do.. code is underneath. Codepen URL: http://codepen.io/anon/pen/ypdGn var detachdraggable; var rotatedraggable; function makeRotateDraggable() { // create rotate draggable for the cards.. rotatedraggable = Draggable.create(".dragclone", { type:"rotation", throwProps:true, dragResistance : 0, edgeResistance : 1, bounds:{minRotation:-60, maxRotation:60}, onDragStart : function() { var $el = $(this.target); var cardStartAngle = $el.data('startangle'); }, onDrag: function() { currentCardAngle = this.rotation; var $el = $(this.target); var cardStartAngle = $el.data('startangle'); cardDirection = ( currentCardAngle &gt; cardStartAngle ) ? "up":"down"; cardTravelDegrees = Math.abs(currentCardAngle - cardStartAngle); this.vars.type = "x"; }, onDragEnd: function() { }, onClick: function() { return false; } }); $('.dragclone').mousedown(function() { $('.dragclone').css('z-index','10'); rotatedraggable[0].enable(); }); $('.dragclone').mouseout(function() { detachdraggable[0].disable(); $('.dragclone').trigger('mousedown'); }); $('.dragclone').trigger('mouseout'); } // first setup the x,y draggable.. detachdraggable = Draggable.create('.dragclone', { type: "x,y", edgeResistance:1, throwProps:true, onPress:function() { startX = this.x; startY = this.y; }, onDrag:function() { var xChange = this.x - startX, yChange = this.y - startY, ratio = Math.abs(xChange / yChange), direction = []; // NB:: you can adjust these ratio thresholds to make things // more or less sensitive to diagonal movement. if (ratio &gt; 0.25) { direction.push((xChange &lt; 0) ? "left" : "right"); } if (ratio &lt; 4) { direction.push((yChange &lt; 0) ? "up" : "down"); } if(direction[0] == "left") { // TweenMax.to( $('.cloned'), .0001, {right…
accepted answer: http://stackoverflow.com/a/26700184
tagged with: mousedown

http://stackoverflow.com/comment/42153708
comment on: http://stackoverflow.com/q/26788706
has text: Any javascript errors when you debug with Developer Tools?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26831533
answers question: http://stackoverflow.com/q/26831489
upvote count: 2
type: Answer
score: 2
has body: You could use find() instead. $('button').click(function() { $(this).find("i.fa").removeClass("fa-square-o"); }); Fiddle
downvote count: 0

http://stackoverflow.com/a/26762385
upvote count: 1
has comment: http://stackoverflow.com/comment/42106336
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26761186
type: Answer
has body: Assuming you would have some sort of table or list displaying the car for the user to select you could have something like {{car.model}} So this will create a list of cars that the user can select. On clicking on the link it will go to page on that model. (Note I am not using id here because you dont have id in you json)

http://stackoverflow.com/a/26781444
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26781306
type: Answer
has body: jQuery's .off() function doesn't work that way. If you wanna add and remove only your own scroll handler and leave other 3rd party scroll handlers alone, you want to use $("#scrollDiv").on("scroll.appName", appName.featureName.lazyLoader); and to remove all of your own handlers: $("#scrollDiv").off(".appName"); or, to only remove your own scroll handler, but leave a click handler alone: $("#scrollDiv").off("scroll.appName"); See the documentation at http://api.jquery.com/off/ for more information.
score: 1

http://stackoverflow.com/comment/42030948
has text: You need more logic in your function. Every time you scroll you're calling the function, which is stacking the event (and adding time). Using `stop(true,true)` usually would be an answer, however you don't want the animation completing immediately. Therefore you need code to detect current animations, and not stack them, but to change the animation if it goes beyond the scope of the window.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26705686

http://stackoverflow.com/a/26722397
has comment: http://stackoverflow.com/comment/58128459
has body: The problem is input type of number does a lot of stuff under the covers and the specification for it does not expose the actual invalid value to you. So an empty input and an invalid string look the same. So you need to do some investigation work using validity var result = document.getElementById("result"); document.getElementById("num").addEventListener("keyup", function() { var isValid = this.validity.valid; var len = this.value.length; if (isValid &amp;&amp; !len) { result.innerHTML = "No value"; } else if (!isValid) { result.innerHTML = "Invalid number"; } else { result.innerHTML = "Valid number: " + this.valueAsNumber; } }); &lt;input type="number" id="num" /&gt; &lt;span id="result"&gt;&lt;/span&gt; Problem with the code above is if you make it required, the empty check will fail. If it is required the if check would need to be if (!isValid &amp;&amp; this.validity.valueMissing) {
upvote count: 10
has comment: http://stackoverflow.com/comment/42034593
type: AcceptedAnswer
score: 10
answers question: http://stackoverflow.com/q/26722073
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26722073
type: Answer

http://stackoverflow.com/comment/41993525
type: Comment
type: QuestionComment
has text: Sure. I actually got cross browser functionality working last night.
comment on: http://stackoverflow.com/q/26695167
score: 0

http://stackoverflow.com/comment/42380161
type: AnswerComment
type: Comment
score: 1
has text: That's exactly the solution I was looking for! Thank you very much James Khoury!
comment on: http://stackoverflow.com/a/26859283

http://stackoverflow.com/q/26741650
tagged with: gruntjs
answer count: 1
tagged with: minify
has comment: http://stackoverflow.com/comment/42069517
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42069102
has title: Switching between minified code and normal code depending on environment?
upvote count: 1
has body: Currently using grunt to minify all of my js files. I have a php script in my html that checks the url and decides whether to include one big minified javascript file or all of the regular javascript files. This is annoying because I have all of the files listed in two places; once in the grunt file and once in the switch statement in my php script. If someone on the team adds a new file to one but not the other, bad things happen. Is there an easier more efficient way to go about switching between the two? We want it so that our production server uses the minified code and our local dev environments use the un-minified code.
score: 1
has answer: http://stackoverflow.com/a/78371362
type: Question
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/42199080
has text: In your first solution, you are "masking" the underlying message returned from the ajax call by providing your own messages. This is great and provides a non-technical context on the issue. However, you are also losing "knowledge" that may be available in the underlying response message (whatever it says). Ideally, you provide both styles of message. The first and primary is a clear user consumable message but in addition, I would also try and provide a way the user can "get at" the underlying message if and when needed.
score: 1
comment on: http://stackoverflow.com/q/26813429
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41985959
type: Comment
comment on: http://stackoverflow.com/q/26695480
type: QuestionComment
has text: `says woof` isn't an error message, it's in your `console.log()` call.
score: 1

http://stackoverflow.com/comment/42222628
type: QuestionComment
comment on: http://stackoverflow.com/q/26819978
score: 0
type: Comment
has text: Well I can give you the way how to do it! You just need to make as much inputs as you want and put those in an array in Java . then you can do the for loop on Java code which uploads the file....

http://stackoverflow.com/a/26790347
score: 1
has comment: http://stackoverflow.com/comment/42159300
has comment: http://stackoverflow.com/comment/42159578
has comment: http://stackoverflow.com/comment/42159334
has comment: http://stackoverflow.com/comment/42156789
has body: I think the problem is this part of your code: else if (stream.next() != null) { return null; } Looking at CodeMirror's overlay mode demo, it does something slightly different: while (stream.next() != null &amp;&amp; !stream.match("{{", false)) {} return null; Your code is returning null once for each ignored character, while the demo is only returning null once per contiguous chunk of ignored characters. Returning separately for every character seems to make CodeMirror break up all of its normal tokens into separate one-char tokens, which the Brackets Quick Edit code can't recognize -- e.g. if your cursor is here - cl|ass - CodeMirror says it's in an attribute token where the name is just "l", while the Brackets code is looking attributes named "class".
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26764868
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26764868
type: Answer
has comment: http://stackoverflow.com/comment/42158398
has comment: http://stackoverflow.com/comment/42158555
downvote count: 0

http://stackoverflow.com/a/26787380
has body: The error is coming from somewhere else in the code. You get the error when you do this.someFunction.bind(something) and something isn't null. this.someFunction.bind({}, foo); // warning this.someFunction.bind(this, foo); // warning, you're doing this this.someFunction.bind(null, foo); // okay! Do a search for .bind(this in your code to find the offending line.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26786786
has comment: http://stackoverflow.com/comment/53768866
upvote count: 31
answers question: http://stackoverflow.com/q/26786786
has comment: http://stackoverflow.com/comment/42167461
type: Answer
downvote count: 0
score: 31
has comment: http://stackoverflow.com/comment/57426631

http://stackoverflow.com/q/26729639
type: AnsweredQuestion
score: 0
type: Question
has comment: http://stackoverflow.com/comment/42047635
tagged with: javascript
has answer: http://stackoverflow.com/a/26730772
has body: Can anyone tell me the use of document.frmReport in JavaScript code? My application uses this but I don't have any information about this. Besides, it is an HTML DOM object from what I've searched on the internet. A speedy answer would be very helpful. The code is like this: function fnAddItems(strSource,strTarget) { var f = document.frmReport; var doAdd; var objSourceCombo = eval("document.frmReport."+strSource); var objTargetCombo = eval("document.frmReport."+strTarget); var selSourceLen = objSourceCombo.length; var selTargetLen = objTargetCombo.length; var strSourceText; var strSourceValue; var arrIDs; var arrIDs1; var IsMultipleSelected; var strFormat; }
answer count: 1
has comment: http://stackoverflow.com/comment/42048577
accepted answer: http://stackoverflow.com/a/26730772
has title: What is the use of document.frmReport

http://stackoverflow.com/comment/42225044
score: 0
type: Comment
has text: Besides the above js function, is there an alternative to achieve the result I want?
type: AnswerComment
comment on: http://stackoverflow.com/a/26827155

http://stackoverflow.com/a/26726432
accepted answer of: http://stackoverflow.com/q/26726179
type: Answer
has body: As Robby Cornelissen said, your variable names are not valid. See this previously asked question about this topic : What characters are valid for JavaScript variable names? That being said, you do have quite a few errors popping so before coming to us, try investigating them. That's how you'll make some progress, instead of having someone do the job for you. Once those errors are solved, you get something that works (see snippet below). However your method is awfully painful and bulky. I don't have the whole what-beats-what in rock-paper-scissors-lizard-spock, but to write elegant code, you should try to find a way to decide who is the winner without describing each particular case with an if statement. Maybe there's something worth looking into with having your values inside an array, comparing the indexes of your values (your user's and the computer's) and i'm thinking about permutation cycles on the array to have the values in the correct order. $(function() { $(document).on('click', '.game-image', function(event) { var value = $(event.target).data('value'); var win; var comproll = 1 + Math.floor(Math.random() * 5); //$('#comproll').html('Result: '+comproll) if (comproll === 1) { comp = "Lizard"; } else if (comproll === 2) { comp = "paper"; } else if (comproll === 3) { comp = "scissors"; } else if (comproll === 4) { comp = "Spock"; } else if (comproll === 5) { comp = "Rock"; } if (value === comproll) { win = "This ends in a tie" } else if (value === 1) { if (comproll === 2, 4) { win = "You win, comp choose" + comp + "."; } else if (comproll === 3, 5) { win = "You lose, comp choose " + comp + "."; } } else if (value === 2) { if (comproll === 4, 5) { win = "You win, comp choose" + comp + "."; } else if (comproll === 1, 3) { win = "You lose, comp choose " + comp + "."; } } else if (value === 3) { if (comproll === 1, 2) { win = "You win, comp choose" + comp + "."; } else if (comproll === 4, 5) { win = "You lose, comp choose " + comp + "."; } } else if (value === 4) {…
upvote count: 1
has comment: http://stackoverflow.com/comment/42042803
score: 1
has comment: http://stackoverflow.com/comment/42042906
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26726179
downvote count: 0

http://stackoverflow.com/comment/42097108
score: 1
has text: May be you can use the javascript function Number. E.g. var time = Number($(this).attr("data-value"));
comment on: http://stackoverflow.com/q/26757628
type: QuestionComment
type: Comment

http://stackoverflow.com/a/30634630
score: 1
upvote count: 1
has body: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data check out this SO and see if your problem is related. Basically, it could mean that the Success Message returned doesn't have proper HTML markup and hence the browser is not able to display them.
answers question: http://stackoverflow.com/q/26790299
downvote count: 0
type: Answer

http://stackoverflow.com/q/26826281
downvote count: 0
has answer: http://stackoverflow.com/a/35384325
tagged with: gsap
favorite count: 0
has body: I'm using TweenLite to build some banner advertisements. I have everything working fine, however I'm a bit confused on how an element is selected, or at least the best practice for selecting an element using TweenLite. At first I was using this: var logo = document.getElementById("logo"); to select the element and then animating with: TweenLite.to(logo, .45, {transform:"1,1", right:"19px", delay:.6, ease:Quart.easeOut}); However, I found that the animation still works without declaring the #logo as a variable. My question is, which of the following is best to use? var logo = document.getElementById("logo"); TweenLite.to(logo, .45, {transform:"1,1", right:"19px", delay:.6, ease:Quart.easeOut}); //Declare Variable and reference TweenLite.to(logo, .45, {transform:"1,1", right:"19px"}); //Don't declare #logo a variable or use # to reference logo as an ID. Not sure why this works. TweenLite.to("#logo", .45, {transform:"1,1", right:"19px", delay:.6, ease:Quart.easeOut}); //Reference ID in script without creating or referencing a variable Or is there another option that would be better that I'm not aware of, aside from using an additional js library? Is browser support the same for all of these? I'm loading in the following libraries from GSAP: css plugin ease pack tweenlite
has answer: http://stackoverflow.com/a/27284423
type: UnansweredQuestion
tagged with: animation
upvote count: 3
type: Question
score: 3
has title: Best way to select DOM object using TweenLite/GSAP?
tagged with: javascript
answer count: 2

http://stackoverflow.com/q/26734888
tagged with: fullcalendar
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26735272
tagged with: jquery
has body: I'm trying to add custom "options" icon to the event. I want that if i click on this icon, small tooltip appears. But if i click on this icon, eventClick is triggered. This is my html Text on row one Text on row two I tried this JS event.stopPropagation(); i found in this article but it won't help
has title: Fullcalendar add icon to event and not trigger eventClick
has answer: http://stackoverflow.com/a/26735137
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/12002468
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42064230

http://stackoverflow.com/q/26695739
type: Question
linked to: http://stackoverflow.com/q/16063394
accepted answer: http://stackoverflow.com/a/26696149
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/26696149
tagged with: javascript
tagged with: prototype
has title: Javascript prototype chain self reference
has comment: http://stackoverflow.com/comment/41986597
possible better answer: http://stackoverflow.com/a/26696289
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/26696289
score: 1
has comment: http://stackoverflow.com/comment/41986627
has body: This question is about how javascript prototypes work. In particular I do not understand why in the example below "Machine" appears to have a prototype of itself. In the screen capture from Chrome Web Tools console the Machine __proto __ object seems to reference the same function as its parent. You will see a "__proto __: Machine" with a property "whoAmI" and a second property "__proto __: Machine". Drilling into this second "__proto __" reveals a constructor and the "__proto __" containing Object but no property "whoAmI". What is the meaning of the double reference to "Machine" and why does only one of them contain the whoAmyI property? function Car(){} function Vehicle() {} function Machine() { this.whoAmI = 'I am a machine'; } Vehicle.prototype = new Machine(); Car.prototype = new Vehicle(); var myCar = new Car(); Chrome web tools screen capture:
favorite count: 0

http://stackoverflow.com/comment/42218392
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26824684
type: Comment
has text: I didn't test it, just an aproach. `StartSize < EndSize` just returns true or false wich gets assigned to Direction, so Direction is true or false. Dont know if it has a name... ^^

http://stackoverflow.com/comment/42212091
type: Comment
comment on: http://stackoverflow.com/a/26819771
has text: For example there are lets say 4 top level "li"s each have their own sub categories but the sub categories are only displayed inside the containing "li" and do not span across underneath the other list items.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26767211
has body: As per the specification: Because this attribute is typically implemented using CSS, it's also possible to override it using CSS. For instance, a rule that applies 'display: block' to all elements will cancel the effects of the hidden attribute. Authors therefore have to take care when writing their style sheets to make sure that the attribute is still styled as expected. You are trying to change the visibility but it is the display you need to change if you want to achieve this using CSS. document.getElementById('show').addEventListener('click', show); function show(event) { document.getElementById('proceed_to_next_question').style.display = "inline"; } Show other button Next Question That said, depending on browsers implementing specific CSS by default isn't a fantastic idea, so you should consider twiddling the attribute instead. document.getElementById('show').addEventListener('click', show); function show(event) { document.getElementById('proceed_to_next_question').removeAttribute('hidden') } Show other button Next Question
downvote count: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26767060
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26767060
type: Answer
score: 2

http://stackoverflow.com/comment/42146030
type: Comment
comment on: http://stackoverflow.com/a/26782673
score: 0
type: AnswerComment
has text: Yep. Not really any other choice here. The problem is the bundler actually does its thing at runtime, once the application has already been deployed and is no longer within the safe confines of Visual Studio where links actually work.

treegrid
tags question: http://stackoverflow.com/q/26777180
type: Tag
tag name: treegrid

http://stackoverflow.com/a/26802290
type: Answer
downvote count: 0
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26802117
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26802117
has body: So set your equations equal to get mP*x + nP = mQ*x + nQ then solve for x to get mP*x - mQ*x = nQ - nP (mP - mQ)x = nQ - nP x = (nQ - nP)/(mP - mQ) (If (mP - mQ)=0 then the lines are parallel and there is no point of intersection) and the y coordinate would be y = mP * x + nP or y = mQ * x + nQ The two equations should yield the same y-value (up to rounding error).

size
type: Tag
tag name: size
tags question: http://stackoverflow.com/q/26673854
tags question: http://stackoverflow.com/q/26781561

http://stackoverflow.com/q/26717620
has body: According to the document, a collection should update itself if the data is updated. For example, I have two elements in an array: [{name: "Tom", age:10}, {name: "Prank", age:12}] and this data is already joined to the following DOM elements Tom is 10 yrs old Prank is 12 yrs old and the data is updated. [{name: "Tom", age:20}, {name: "Prank", age:22}] I want the DOM to be Tom is 20 yrs old Prank is 22 yrs old but since the number of elements and the size of data is the same, the div elements do not seem to get updated. Am I missing something here? The above example is a simplified version of my code below, but I believe understanding how to update the above example correctly will solve the problem. function draw(data) { var bars = d3.select(".container") .selectAll(".bar-wrapper") .data(data); var barEnter = bars .enter() .append("div") .attr("class", "bar-wrapper") barEnter .append("button") .text(function(d) { return "Vote "+ d.name; }) .attr("class", "vote-btn btn-default btn-primary") .on("click", function(d) { console.log("send Data", d.name); sendData(d.name); }); barEnter .append("div") .attr("class", "bar") .style("width", function (d) { return (d.vote*10) + "px"; }) .text(function(d) { return d.vote }); bars .exit() .remove() }; Any help will be appreciated!
has comment: http://stackoverflow.com/comment/42034783
tagged with: d3.js
has comment: http://stackoverflow.com/comment/42040603
has comment: http://stackoverflow.com/comment/42037371
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26731229
type: Question
tagged with: javascript
has title: d3js elements not updated when data is updated
has comment: http://stackoverflow.com/comment/42026667
answer count: 1
accepted answer: http://stackoverflow.com/a/26731229

http://stackoverflow.com/q/26796634
has answer: http://stackoverflow.com/a/26796840
duplicate of: http://stackoverflow.com/q/3025396
downvote count: 1
has comment: http://stackoverflow.com/comment/42167328
type: Question
has body: I want to know if a form has changed at all. The form can contain any form element, such as input, select, textarea etc. Basically I want a way to display to the user that they have unsaved changed made to a form. How can I do this using jQuery? To clarify: I want to catch ANY change to the form, not only to input elements but to all other form elements as well, textarea, select etc.
has comment: http://stackoverflow.com/comment/42167637
tagged with: javascript
tagged with: jquery
has title: Using jQuery, how can I find if a form has changed?
upvote count: 30
has comment: http://stackoverflow.com/comment/42167736
accepted answer: http://stackoverflow.com/a/26796840
has comment: http://stackoverflow.com/comment/42167442
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42167533
score: 29
linked to: http://stackoverflow.com/q/3025396
type: AnsweredQuestion

http://stackoverflow.com/q/26768206
type: Question
has body: I am a complete beginner to d3. I am looking at this example: http://bl.ocks.org/d3noob/7030f35b72de721622b8 Here he is changing x, y axis information. In the same example, how would one change the actual height of the chart (say increase it by 100) when the update button is clicked? Thanks
has title: d3 Not understanding how to change attr
tagged with: d3.js
score: 0
accepted answer: http://stackoverflow.com/a/26768724
answer count: 1
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/26768724

http://stackoverflow.com/comment/60081480
comment on: http://stackoverflow.com/a/29698035
type: AnswerComment
score: 0
has text: You can't have p tags within p tags because it's illegal. Browsers "fix" it for you
type: Comment

http://stackoverflow.com/q/26696796
possible better answer: http://stackoverflow.com/a/26696860
has answer: http://stackoverflow.com/a/26696860
type: Question
has body: I've got the following jQuery: When i click on the Button some code is going to execute and its going to retrieve a value inside the panel "so far every thing works fine" now it's the time for my jQuery code to execute, but when the panel starts to expand the page is refreshing and the jQuery code stop working. here is my HTML code Company Name This awards are for the hard working staff bla bla bla bla bla bla bla bla bla bla, still <asp:Label ID="Label4" runat="server" Text="20"></asp:Label> trophy <asp:Button ID="Button1" runat="server" Text="wineer" OnClick="Button1_Click" class="btn btn-primary btn-large" Width="127px" /> <asp:Label ID="Label1" runat="server" Text="Congratulations"></asp:Label> <asp:Panel ID="Panel1" runat="server"><asp:Label ID="Label2" runat="server" Text=""></asp:Label></asp:Panel> <asp:Label ID="Label3" runat="server" Text="You've won the trophy"></asp:Label> How can I make the jQuery code work? Please advise
answer count: 2
score: -2
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26697537
downvote count: 2
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26697537
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/41988250
type: AnsweredQuestion
upvote count: 0
has title: The page is refreshing before it complets the jquery code

jsxgraph
tags question: http://stackoverflow.com/q/26818638
type: Tag
tag name: jsxgraph

http://stackoverflow.com/q/26722715
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26722938
tagged with: this
downvote count: 0
has body: This is a question about performance and best practice. Assuming I have a js object that encapsulates a large number of helper methods. The object is being treated as a static class, meaning it is never instantiated and all its methods are basically helper methods. When using events and jQuery, the object's this scope keeps changing, and since it has a fairly large number of methods I am wondering what is best practice - saving this into _this at the beginning of each method or simply use the object name MyObject. Over the years I've been doing both, when it comes to singelton/static objects, but I figured there must be just 1 best practice and it's about time to adopt the best approach. My current research shows that the benefits that come with using _this instead of directly calling MyObject are mainly these two: if the object's name changes, _this will always work May be faster (although haven't seen performance testing results) since the browser stays in the same scope and does not need to find out the scope of MyObject every time. Pros of using MyObject: Less code to write. Garbage collection management? (less variables to assign) May be more readable for some developers (where multiple this apply) Easier to refactor code since MyObject will always work I would like to know if there is a way of globally saving _this (only inside the object's scope of course) and avoid assigning it at the beginning of each method. If not - are there other pros/cons that I am missing or is it considered bad practice to call the object name directly. This is a simplified object for reference (real object has many more methods). var MyObject = { init: function() { this.registerEvents(); //other stuff }, registerEvents: function() { this.registerOnSomeEvent(); //registering more events.. //... }, registerOnSomeEvent: function() { var _this = this; jQuery('#someid').click(function() { _this.doSomething();//option 1 MyObject.doSomething();//option 2 }); }, doSomething: function() { //…
favorite count: 0
type: Question
score: 4
accepted answer: http://stackoverflow.com/a/26722938
tagged with: oop
answer count: 2
has answer: http://stackoverflow.com/a/26723001
tagged with: javascript
tagged with: encapsulation
tagged with: jquery
has title: Javascript static/singelton - this vs _this vs object name
upvote count: 4
possible better answer: http://stackoverflow.com/a/26723001

http://stackoverflow.com/comment/42018698
score: 2
has text: Working fiddle: http://jsfiddle.net/ezzqqpcd/ just hit run multiple times to see it work
comment on: http://stackoverflow.com/q/26714036
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41995150
type: QuestionComment
comment on: http://stackoverflow.com/q/26700711
has text: Personally I use `var_args` as recommended in the Google style guide/Closure compiler. If this actually provides a useful hint to someone looking at an uncommented function for the first time, who knows.
score: 0
type: Comment

http://stackoverflow.com/comment/41994539
score: 0
type: Comment
type: QuestionComment
has text: What's a "Beam"? Show some HTML, please.
comment on: http://stackoverflow.com/q/26700120

http://stackoverflow.com/q/26777206
has comment: http://stackoverflow.com/comment/42132587
score: 0
has answer: http://stackoverflow.com/a/26777325
has answer: http://stackoverflow.com/a/26778022
tagged with: jquery
has answer: http://stackoverflow.com/a/26777428
has body: Check my fiddle here JSFiddle. I have different id and class and i want to add the dynamically values.while key up I wanna add values dynamically in the total field I have 3 inputs with ids InvQty1, InvQty2 and InvQty3 and an input with id Total $(document).ready(function(){ $('.InvQty').keyup(function(){ var val2 = parseInt($('#InvQty1').val())+parseInt($('#InvQty2').val()); $('#Total').val(val2); }); }); Any help really appreciated !
favorite count: 0
has answer: http://stackoverflow.com/a/26777359
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26777305
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26777348
tagged with: javascript
has title: Dynamic add value on keyup function in jQuery
answer count: 6

http://stackoverflow.com/comment/42152643
has text: @FelixKling tried to comment old code with the mistakes.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26787851

http://stackoverflow.com/a/26695907
has comment: http://stackoverflow.com/comment/41987054
has comment: http://stackoverflow.com/comment/41987309
has comment: http://stackoverflow.com/comment/41987266
downvote count: 0
has comment: http://stackoverflow.com/comment/41986880
has comment: http://stackoverflow.com/comment/41986988
type: Answer
has comment: http://stackoverflow.com/comment/41994917
answers question: http://stackoverflow.com/q/26695382
has body: Iam answering this because i have been after this problem , you should refer to this link if you are after cross browser solution : http://css-tricks.com/svg-line-animation-works/ HTML: <path class="path" fill="#FFFFFF" stroke="#000000" stroke-width="4" stroke-miterlimit="10" d="M66.039,133.545c0,0-21-57,18-67s49-4,65,8 s30,41,53,27s66,4,58,32s-5,44,18,57s22,46,0,45s-54-40-68-16s-40,88-83,48s11-61-11-80s-79-7-70-41 C46.039,146.545,53.039,128.545,66.039,133.545z"/> CSS: .path { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: dash 5s linear alternate infinite; } @keyframes dash { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } } Demo Also : Knob JS would be a good option http://anthonyterrien.com/knob/ check the example where you can use knob as timer.
has comment: http://stackoverflow.com/comment/41986993
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41987226

http://stackoverflow.com/comment/42204517
has text: You won't be able to do this with only html. It would require some javascript
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26817031

http://stackoverflow.com/a/26715028
has comment: http://stackoverflow.com/comment/42030327
answers question: http://stackoverflow.com/q/26714724
has comment: http://stackoverflow.com/comment/42029616
accepted answer of: http://stackoverflow.com/q/26714724
score: 0
has comment: http://stackoverflow.com/comment/42020448
type: AcceptedAnswer
type: Answer
has body: The only way to know if everything in a list is a number is to touch everything in the list. For instance, you can write a function to decide if everything is a number: function hasOnlyNumbers(arr) { var l = arr.length; for (var i = 0; i &lt; l; i++) { if (isNaN(arr[i]) { return false; } } return true; } Then, you can use the result of that to do your sorting. If they are all numbers, sort numerically, otherwise sort alphabetically can now be implemented with: if (hasOnlyNumbers(myArr)) { myArr.sort(sortNumber); } else { myArr.sort(); } Since any non-numeric item implies that it should be sorted alphabetically, this is about as good as you can do because the hasOnlyNumbers function returns as soon as it finds something that is not a number. Of course, you need to understand what isNaN does, because it may call things numbers that you aren't expecting (like 25E7 is exponential notation for a perfectly valid number, and isNaN returns false).
has comment: http://stackoverflow.com/comment/42032210

http://stackoverflow.com/comment/42301430
type: AnswerComment
score: 0
type: Comment
has text: Thank you for answering. Indeed `.css()` call is not necessary. However the lag still presists on Chrome iOS and Safari iOS. Haven't tested Android yet. Updated the live version with animation that represents the lag: http://jsfiddle.net/3eeLo819/6/
comment on: http://stackoverflow.com/a/26845259

http://stackoverflow.com/comment/41981980
score: 0
type: Comment
type: QuestionComment
has text: Why do you suspect that MitM attacks to be a likely scenario?
comment on: http://stackoverflow.com/q/26693227

http://stackoverflow.com/a/26689037
score: 0
has body: If you have a mobile application, you should integrate with facebook mobile sdk for android and ios. See: https://developers.facebook.com/docs/ios/ https://developers.facebook.com/docs/android There are several cordova plugins that can help you with such integration (I am the author of one by the way). You can search for these plugins at http://plugreg.com/search?q=facebook
answers question: http://stackoverflow.com/q/26678914
type: Answer

http://stackoverflow.com/q/26673003
tagged with: javascript
tagged with: duplicates
has comment: http://stackoverflow.com/comment/41946029
has comment: http://stackoverflow.com/comment/41946244
score: 0
tagged with: filter
has comment: http://stackoverflow.com/comment/41946565
has comment: http://stackoverflow.com/comment/41947011
has comment: http://stackoverflow.com/comment/41946672
has comment: http://stackoverflow.com/comment/41946368
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41946331
answer count: 0
tagged with: http://stackoverflow.com/tag/json
has body: Is there a way to remove duplicated values from a option field in angularjs when you are getting data from a json. For ex: I have many json objects like this { productCat: "G" productCatDesc: "GENERAL" productCode: "1" productDes: "LOCAL" subproductCode: "10" } { productCat: "G" productCatDesc: "GENERAL" productCode: "1" productDes: "FOREIGN" subproductCode: "10" } { productCat: "G" productCatDesc: "RELIGION" productCode: "1" productDes: "GEN" subproductCode: "10" } { productCat: "G" productCatDesc: "RELIGION" productCode: "1" productDes: "REL" subproductCode: "10" } NOTE: there are many objects like these.My task is to show 'productDes's according to the 'productCatDesc' . I have hardcoded 'productCatDesc'.SO for ex: if i choose General from the selection option i have to show the 'productDes' according to it.But the way i have done it 'productDes' is read from every object resulting repeating data.I only want to show only the 2types (Local,Foreign).How can i achieve this? This is what i have so far $scope.productList = function(){ if($scope.user.productCat.name.localeCompare("GENERAL")==0){ window.alert("genData"); // $scope.productListArr = $scope.generalData; for(var k=0; k<$scope.generalData.length ; k++){ $scope.productListArr[0] = $scope.generalData[0]; var arrayObject = $scope.generalData[k]; if($scope.productListArr[k].productDes.localeCompare(arrayObject.productDes) != 0){ $scope.productListArr.push(arrayObject); } } } else { window.alert("IslData"); $scope.productListArr = $scope.islamicData; for(var k =0; k< $scope.productListArr.length ;k++){ var arrayObj = $scope.productListArr[k]; if ($scope.filteredProductArray.indexOf(arrayObj.productDes) == -1) { $scope.filteredProductArray.push(arrayObj); } } window.alert("here"); window.alert(filteredProductArray.length); } }; My HTML Product Category --Select Type-- A Product Category is required. Product --Select Type-- A Product is required. Sub Product --Select Type-- A Sub Product is required. Reset Submit
type: Question
has comment: http://stackoverflow.com/comment/41946427
has title: angularjs filter: ng-options removing duplicates

http://stackoverflow.com/a/26704135
has body: JQuery is a library that works in JavaScript executed in your Browser , in other words, in client side JavaScript. Google Apps Script is a server side language based on JavaScript but it has a lot of specific features allowing to communicate with Google Apps services (and others...). One of these specific features is HTMLService, it will allow you to develop custom applications as webapps (standalone application you run in your browser) or spreadsheet/document hosted extensions that you can run from a 'popup' window or from the sidebar in your Google document/spreadsheet. These "auxiliary apps" built with HTML Service can use JQUERY libraries with very few restrictions. Reading the documentation I refer to above should give you enough information to start with. Give it a try and come back with specific question if you meet some difficulties.
score: 1
has comment: http://stackoverflow.com/comment/42466948
has comment: http://stackoverflow.com/comment/42463190
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26701497
accepted answer of: http://stackoverflow.com/q/26701497
type: Answer
has comment: http://stackoverflow.com/comment/42424667
has comment: http://stackoverflow.com/comment/42463271
has comment: http://stackoverflow.com/comment/42445302
has comment: http://stackoverflow.com/comment/42424451
upvote count: 1

http://stackoverflow.com/q/26727522
has body: Added a plunkr http://plnkr.co/edit/9WTNW0?p=preview Just switch between the ng-include and the embedded div based approach in the html HTML OR JavaScript var self = this; angular.module('demo', []) .controller("AttendeeController", function($scope, $location){self.attendeesController($scope, angular.bootstrap(document.getElementById("attendee"), ['demo']); it works fine but I see an error on the console for the line that triggers the bootstrap. TypeError: object is not a function however if I've embedded html, then no error {{attendee.firstName}}
answer count: 1
has title: angular bootstrap with ng-include
has answer: http://stackoverflow.com/a/26740378
tagged with: javascript
type: UnansweredQuestion
tagged with: angularjs-ng-include
tagged with: angularjs
type: Question
score: 0

http://stackoverflow.com/q/26763111
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26763540
type: Question
has title: Jqtree - ordering entrys
tagged with: javascript
tagged with: sorting
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26763540
has body: I am using the jqtree plugin to generate a treeview. Now I want to sort the tree for every node via the label. The plugin comes without a sort function so I think I need to sort it before I load the data into it. This is my data to sort. [ { "label": "A label", "id": "201", "children": [ { "label": "C Label", "id": "40773", "children": [ { "label": "F label", "id": "222460", "children": [] }, { "label": "C label", "id": "222469", "children": [] }, { "label": "X label", "id": "27512", "children": [ { "label": "F label", "id": "143546", "children": [] }, { "label": "D label", "id": "141341", "children": [ { "label": "G label", "id": "222456", "children": [] }, { "label": "L label", "id": "222457", "children": [] }, { "label": "x label", "id": "222443", "children": [ { "label": "Z label", "id": "222447", "children": [] }, { "label": "A label", "id": "222446", "children": [] } ] }, { "label": "L label", "id": "222455", "children": [] } ] }, { "label": "A label", "id": "143547", "children": [ { "label": "B label", "id": "222458", "children": [] } ] }, { "label": "R label", "id": "143548", "children": [] } ] } ] } ] } ] Many thanks for any suggestions.
tagged with: jqtree

http://stackoverflow.com/comment/42090895
comment on: http://stackoverflow.com/q/26753768
score: 0
type: Comment
has text: The route itself does not contain any parameter, so how you can expect params in cosole. If you are trying to get form data, you should use req.body
type: QuestionComment

http://stackoverflow.com/a/26789545
score: 1
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26784611
has body: suppose you have a file located at http://your-host.com/sampleData.json containing your JSON data : {"output_no_match": [{ "date": "2014-12-01T00:00:00-06:00", "id": null, "balance": 915047.12, "interest": 710669475.15, "interest_paid": 10199.29, "ending_principal_balance": 915047.12, "ending_interest_balance": 710659275.86, "payment_due": 10199.29 }], "avalanche_with_match": [{ "date": "2014-12-01T00:00:00-06:00", "id": null, "balance": 915047.12, "interest": 710669475.15, "interest_paid": 10199.29, "ending_principal_balance": 915047.12, "ending_interest_balance": 710659275.86, "payment_due": 10199.29 }]}, then you can get it with XMLHttpRequest (using jQuery): $.get('http://your-host/sampleData.json').success(function(data){ //data is js object with your arrays });

http://stackoverflow.com/q/26676925
favorite count: 0
has comment: http://stackoverflow.com/comment/41953974
has answer: http://stackoverflow.com/a/26677475
has answer: http://stackoverflow.com/a/26677009
has comment: http://stackoverflow.com/comment/41954300
accepted answer: http://stackoverflow.com/a/26677475
possible better answer: http://stackoverflow.com/a/26677009
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41965638
has body: I want to optimise and reduce my code to increase performance and correct-ability of it. With those two different functions below I can successfuly move a Google Map Marker on a map forward and backward using a pathIndex, calcuted on an array of GPS coordinates [I didn't include this section of code since I think it's not releated to this question but I can and will post it if needed]. This is my code: 1st function: function animate() { if (pathIndex &lt; coord.length &amp;&amp; mapAnimationStatus != PLAY_PAUSED) { googleMapsMarker.setPosition(coord[pathIndex]); googleMap.panTo(coord[pathIndex]); pathIndex += 1; if (pathIndex == coord.length) { pause(); pathIndex = 0; mapAnimationStatus = NOT_PLAY; return; } timerHandler = setTimeout("animate(" + pathIndex + ")", 1000); } } 2nd function: function animateRewind() { if (pathIndex &gt;= 0 &amp;&amp; mapAnimationStatus != PLAY_PAUSED) { googleMap.panTo(coord[pathIndex]); googleMapsMarker.setPosition(coord[pathIndex]); if (pathIndex == 0) { pause(); mapAnimationStatus = NOT_PLAY; return; } pathIndex -= 1; timerHandler = setTimeout("animateRewind(" + pathIndex + ")", 1000); } } As you can see those two functions shares a lot of portions of code and it think that they can be replaced with a single one for this reason but I can't figure out how to do this. So, is it possible to create a single function to manage those two different animations?
has comment: http://stackoverflow.com/comment/41954262
score: 0
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has title: Is it possible to replace two opposite and different functions with a single one?
has comment: http://stackoverflow.com/comment/41954210
has comment: http://stackoverflow.com/comment/41953944
tagged with: optimization
has comment: http://stackoverflow.com/comment/41954583
answer count: 2
tagged with: function

http://stackoverflow.com/a/26818268
answers question: http://stackoverflow.com/q/26818095
score: 0
has body: The problem is that nodejs is only used to make custom builds of jquery, more info here: How to build your own jquery (Github) You dont need to put any json file in your proyect, you can learn how to build Jquery in a different directory here: Building to a different directory (Github) Note: Jquery is a client-side library not a sever side module.
type: Answer

http://stackoverflow.com/comment/41974837
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26683071
type: Comment
has text: Are you sure your ionic file references are correct, I mean the paths are correct paths referenced to your index.html, looks like angular has not kicked in and processed {{ and }}

http://stackoverflow.com/q/26821480
has body: I have recently started working with Paper.js I did as mentioned in the tutorial but couldn't get any output. I have mentioned the code below. Can someone please help me to solve the problem ? var path = new Path(); path.strokeColor = 'black'; var start = new Point(100,200); path.moveTo(start); path.lineTo(start + [100,100]); I am not sure where to put the different files inside my computer. Please help.
type: Question
has answer: http://stackoverflow.com/a/26823341
answer count: 2
tagged with: canvas
tagged with: javascript
favorite count: 0
score: 0
tagged with: html5-canvas
has comment: http://stackoverflow.com/comment/42212540
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26823341
tagged with: paperjs
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42212458
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26821647
has title: How to Load paper.js library?
has answer: http://stackoverflow.com/a/26821647

image
tags question: http://stackoverflow.com/q/26763002
tags question: http://stackoverflow.com/q/26674544
tags question: http://stackoverflow.com/q/26805109
tags question: http://stackoverflow.com/q/26723586
tags question: http://stackoverflow.com/q/26695240
tags question: http://stackoverflow.com/q/26790719
tags question: http://stackoverflow.com/q/26715419
tags question: http://stackoverflow.com/q/26772491
tags question: http://stackoverflow.com/q/26790450
tags question: http://stackoverflow.com/q/26769610
tags question: http://stackoverflow.com/q/26705803
tags question: http://stackoverflow.com/q/26750242
tags question: http://stackoverflow.com/q/26770854
tags question: http://stackoverflow.com/q/26825636
tags question: http://stackoverflow.com/q/26799037
tags question: http://stackoverflow.com/q/26761019
tags question: http://stackoverflow.com/q/26788080
tags question: http://stackoverflow.com/q/26726445
tags question: http://stackoverflow.com/q/26680117
tags question: http://stackoverflow.com/q/26702869
tags question: http://stackoverflow.com/q/26706261
tags question: http://stackoverflow.com/q/26726583
tags question: http://stackoverflow.com/q/26717000
tags question: http://stackoverflow.com/q/26749104
tags question: http://stackoverflow.com/q/26796503
tag name: image
tags question: http://stackoverflow.com/q/26766424
tags question: http://stackoverflow.com/q/26673854
tags question: http://stackoverflow.com/q/26770222
tags question: http://stackoverflow.com/q/26682072
tags question: http://stackoverflow.com/q/26721062
tags question: http://stackoverflow.com/q/26813081
tags question: http://stackoverflow.com/q/26782608
type: Tag
tags question: http://stackoverflow.com/q/26760796
tags question: http://stackoverflow.com/q/26682163

http://stackoverflow.com/comment/66630139
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26763015
type: Comment
has text: @Anonymous Have you posted a Question including `html`, `css`, describing expected result?

http://stackoverflow.com/q/26741575
has title: Filtering array of JSON data using multiple controls
has answer: http://stackoverflow.com/a/26741754
tagged with: ajax
score: 0
answer count: 1
tagged with: twitter-bootstrap
type: UnansweredQuestion
has body: I've used bootstrap and jquery to make a nice little mobile app that pulls an array of objects from a URL and create a table of them. Now I have about 5 controls (button groups and dropdowns) that I'd like to use to filter the JSON data. My question is should I use ajax? I'd like to have the filter occur without a page refresh when any of the controls are changed. It's been many years since I've used ajax (back when I developed in .NET) but I know it's built into jquery. Here's my jquery function that builds my table of objects: $(document).ready(function () { var url = "http://json.url/"; $.getJSON(url, function ( json ) { var tr; for (var i = 0; i &lt; json.length; i++) { //Create each table row tr = $('&lt;tr data-id="' + json[i].id + '" class="tap"&gt;'); tr.append("&lt;td&gt;" + "&lt;span&gt;" + json[i].part_number + "&lt;/span&gt;" + "&lt;br&gt;" + json[i].diameter + '\" &amp;raquo; ' + json[i].phases + ' &amp;raquo; ' + json[i].voltage + ' &amp;raquo; ' + json[i].rpm); tr.append("&lt;/td&gt;&lt;/tr&gt;"); $('table').append(tr); } }); }); Would it be better to keep the original array and store it? Or maybe call it every time I click one of the filters? I have 4 bootstrap button groups and and 3 select inputs that I want to use to filter when any or all of them are changed (preferably without a submit button). I'm reading up on jquery.ajax now but wanted to get a question out there because I'm sure I'll need a little assistance.
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41954092
comment on: http://stackoverflow.com/q/26677547
type: QuestionComment
type: Comment
has text: Create a global variable (outside the function) and set it =0, once clicked set it as 1, then test if the variable is >0, don't do the alert. I think that only Chrome can understand the "click.once" event.
score: 0

http://stackoverflow.com/a/26747351
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26746631
has body: Is there a reason you want to use setTimeout instead of a resize event? What about something like this: window.onresize = function(event) { setSlidePosition(); }; function setSlidePosition() { var slideLeft = (document.getElementById("slide-image").style.left.indexOf('px') != -1 ) ? document.getElementById("slide-image").style.left : '0px'; var numLeft = slideLeft.replace('px',''); console.log(numLeft); var element = document.getElementById("slide-image") if(element.width &gt; window.innerWidth) { var newLeft = (element.width - window.innerWidth) / 2 * -1 + "px"; document.getElementById("slide-image").style.left = newLeft; } else { document.getElementById("slide-image").style.left = "0px"; } }; setSlidePosition(); http://jsfiddle.net/4qomq7tb/45/ Seems to behave the same in chrome and FF at least. This doesn't specifically answer the question relating relating to your code, though :/

http://stackoverflow.com/comment/42095382
score: 0
comment on: http://stackoverflow.com/a/26755548
type: AnswerComment
has text: Yes But Need to refresh, how can we do refresh the page
type: Comment

http://stackoverflow.com/comment/42171907
type: Comment
type: QuestionComment
score: 0
has text: yes I am aware...so you are hiring me for this work?;)
comment on: http://stackoverflow.com/q/26799010

http://stackoverflow.com/a/27053568
has body: I think the reason is that strings in javascript are encoded in UTF-16. So a 10MB ascii text file will take 20MB of memory.
score: 0
has comment: http://stackoverflow.com/comment/42628985
type: Answer
has comment: http://stackoverflow.com/comment/42661369
has comment: http://stackoverflow.com/comment/42659734
answers question: http://stackoverflow.com/q/26799545

addthis
tags question: http://stackoverflow.com/q/26733038
type: Tag
tag name: addthis

http://stackoverflow.com/comment/42087939
has text: the effects are good but I need is just a simple fade in and out to match with my theme.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26751356
score: 0

http://stackoverflow.com/a/26780145
has comment: http://stackoverflow.com/comment/42138123
upvote count: 2
has comment: http://stackoverflow.com/comment/42138082
has comment: http://stackoverflow.com/comment/42138387
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/57226641
answers question: http://stackoverflow.com/q/26779848
has body: You can do: $("#box").on( "hide" , function() { $(document).off( "keyup" , "#box" ); }); Explanation: "keyup" is the event "#box" is the selector so it only counts for the #box

http://stackoverflow.com/q/26684898
type: Question
has comment: http://stackoverflow.com/comment/41967959
tagged with: javascript
has body: I have modal window with pure CSS. I use for this 2 divs. Question: How can I refactor this to use ONE div instead? Wanted usage: some text x Current code: JSFiddle: http://jsfiddle.net/uogoxj8d/ .modal:before { content: ""; position: fixed; background-color: rgba(0,0,0,0.8); top: 0; left: 0; height: 100%; width: 100%; } .modal-content { position: fixed; background-color: #FFFFFF; border: 1px #000000 solid; padding: 10px; width: 70%; max-width: 400px; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); -moz-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); -o-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .modal-content a { position: absolute; top: 0; right: 10px; } some text x
tagged with: jquery
has title: CSS modal with one element
score: 0
has comment: http://stackoverflow.com/comment/41968173
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41968140
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41968055
has comment: http://stackoverflow.com/comment/41967965
tagged with: css
has comment: http://stackoverflow.com/comment/41968024
has answer: http://stackoverflow.com/a/26684952
has comment: http://stackoverflow.com/comment/41967980
has comment: http://stackoverflow.com/comment/41968008
has comment: http://stackoverflow.com/comment/41968082
has comment: http://stackoverflow.com/comment/41968098

http://stackoverflow.com/q/26700307
tagged with: facebook
has title: AddThis FaceBook sharing without webpage scraping
has comment: http://stackoverflow.com/comment/42012765
has body: I have a web application that is built on Backbone JS framework, that is most URLs have a hashtag section in them. For example: www.abcd.com/xyz.shtml#/route1 the 'route1' is the name of a defined execution route which causes contents including the meta-tags of the page to be populated dynamically on-load by making a number of AJAX calls to the server. I'm not able to integrate AddThis Facebook-share because when FB scrapes the URL it doesn't execute the JS section defined by the 'route1' and thus none of the meta-tags are populated! Can anyone suggest me a way to bypass this scraping process of FB and/or lets me supply the relevant parameters to FB and FB posts it directly without messing with the URL? Many Thanks.
score: 0
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41995665
tagged with: backbone.js
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/26689526
accepted answer of: http://stackoverflow.com/q/26689502
answers question: http://stackoverflow.com/q/26689502
has body: Because the browser does one thing at a time (in most cases), it is for all intents and purposes assigning those styles at the same time. This means that the transition style hasn't actually applied yet when you're also setting the opacity, causing it to not take effect. If you want a style to be affected by the transition, try: next.style.transition = "opacity 1.0s"; requestAnimationFrame(function() {next.style.opacity = 1;}); This will make it transition nicely. Note that you may need a polyfill for requestAnimationFrame.
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/42153726
comment on: http://stackoverflow.com/q/26788706
score: 0
type: QuestionComment
type: Comment
has text: Your posted HTML and jQuery works for me: [demo](http://jsfiddle.net/jyLcb2nz/); so what's different in your live page?

c3.js
tags question: http://stackoverflow.com/q/26782482
tags question: http://stackoverflow.com/q/26829384
tags question: http://stackoverflow.com/q/26690852
tag name: c3.js
type: Tag
tags question: http://stackoverflow.com/q/26784174

http://stackoverflow.com/comment/42210800
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26820499
has text: The tilbe(~) is a general sibling operator meaning that the two elements have to have the same parent (in this case the ul). I know of no way to do this through pure CSS.

http://stackoverflow.com/a/26804134
has body: You are declaring X inside the function, and you cant access it outside.. Try something like this: var x; // here you will have a global variable function search(id) { document.getElementById(id).style.color = "red"; return setInterval(function () {answer(id)}, 1000); // return the timeinterval ID } function answer(id) { document.getElementById("result").innerHTML = id; clearTimeout(x); /* AJAX request, looks for an anwser if(answer) { clearTimeout(x); // var x is not defined } */ } &lt;div id="one" onclick="x = search('one');"&gt; &lt;!-- set X = the interval --&gt; click &lt;/div&gt; &lt;div id="two" onclick="x = search('two');"&gt; click &lt;/div&gt; &lt;div id="result"&gt; &lt;/div&gt;
type: Answer
answers question: http://stackoverflow.com/q/26803998
downvote count: 1
has comment: http://stackoverflow.com/comment/42181555
score: -1
upvote count: 0

http://stackoverflow.com/comment/42132443
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/64383/discussion-between-gilsha-and-rzach).
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26770672
type: Comment

http://stackoverflow.com/comment/42118449
type: QuestionComment
comment on: http://stackoverflow.com/q/26768834
has text: @AlexanderLozada Strings are immutable in Javascript.
score: 0
type: Comment

http://stackoverflow.com/q/26695954
has answer: http://stackoverflow.com/a/26696130
has answer: http://stackoverflow.com/a/26696237
has answer: http://stackoverflow.com/a/26696467
type: AnsweredQuestion
has body: I have a string like: Price=10.00 and Count=30 and Name='a and b mix' I want to get result: ["Price=10.00", "Count=30", "Name='a and b mix'"] I use any way to get it but I can't. I need split them use 'and', but it should be ignore if 'and' is in the quote. I try ("Price=10.00 and Count=30 and Name='a and b mix'" + ' and').match(/(.*?)and/g) but get ["Price=10.00 and", " Count=30 and", " Name='a and", " b mix' and"] Anybody know how to do that?
accepted answer: http://stackoverflow.com/a/26696467
favorite count: 0
has answer: http://stackoverflow.com/a/26696247
type: Question
has comment: http://stackoverflow.com/comment/41986800
tagged with: regex
possible better answer: http://stackoverflow.com/a/26696021
has answer: http://stackoverflow.com/a/26696021
score: 0
upvote count: 1
downvote count: 1
has title: Split string on keyword (and) except when quoted ('... and ...')
tagged with: javascript
answer count: 5

http://stackoverflow.com/q/26766696
score: -5
type: Question
has body: Simple question maybe, but I'm a bit lost here. Been googling around for a while, but I can't find any information. Maybe I'm seaching for wrong information.. So please: A quick example-code would be great! How do I create an entity in javascript holdning attributes??
has answer: http://stackoverflow.com/a/26766733
accepted answer: http://stackoverflow.com/a/26766733
tagged with: javascript
downvote count: 6
has title: How to create entites in javascript
has comment: http://stackoverflow.com/comment/42114812
has comment: http://stackoverflow.com/comment/42114234
upvote count: 1
has comment: http://stackoverflow.com/comment/42114335
has comment: http://stackoverflow.com/comment/42114959
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42114278
has comment: http://stackoverflow.com/comment/42114219
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42115417

http://stackoverflow.com/comment/41977949
type: Comment
type: QuestionComment
has text: BTW, By default the dropdown will close once you click anywhere including a button, so...? Please update the question mentioning the source of code, expected result etc.
comment on: http://stackoverflow.com/q/26687907
score: 0

http://stackoverflow.com/a/26683834
upvote count: 12
answers question: http://stackoverflow.com/q/26683734
has body: var readline = require('readline'); var rl = readline.createInterface({ input: process.stdin, output: process.stdout }); rl.question("What do you think of node.js? ", function(answer) { // TODO: Log the answer in a database console.log("Thank you for your valuable feedback:", answer); rl.close(); }); as taken from here http://nodejs.org/api/readline.html#readline_readline More specifically, stuff this code into an app.js file, then run the following command node app.js And answer the question above. What happens? the require statement exposes the public methods of the 'readline' module, one of which is 'createInterface' method. This method takes input and output as options. From the looks of it, different sources of input and output can be specified, but in this case, you are using the 'stdin' and 'stdout' properties of the global node 'process' variable. These specify input and out to and from the console. Next you call the question method of the readline object you've created and specify a callback function to display the user input back to user. 'close' is called on readline to release control back to the caller.
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/101645780
score: 12

http://stackoverflow.com/comment/42027998
comment on: http://stackoverflow.com/a/26718350
type: AnswerComment
type: Comment
has text: I write it down also.
score: 0

http://stackoverflow.com/comment/42113358
comment on: http://stackoverflow.com/q/26766181
has text: are the things you try to import contained in html tags?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42139000
comment on: http://stackoverflow.com/a/26759373
score: 0
type: AnswerComment
type: Comment
has text: The _append_ method creates a DOM element, same as pure js

http://stackoverflow.com/q/26778932
has answer: http://stackoverflow.com/a/26779060
favorite count: 0
type: UnansweredQuestion
tagged with: razor
tagged with: asp.net-mvc-4
has title: Razor View if/else statement in javascript
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42135674
type: Question
has answer: http://stackoverflow.com/a/26779619
tagged with: asp.net-mvc
tagged with: javascript
answer count: 2
upvote count: 1
has body: Is it possible to do this in the razor View . I want to inject below JavaScript only if statement is true else not. How can i do this. @if (Model.EmployeeInterviews != null) { $("#select-Candidate")[0].selectize.setValue(@Html.Raw(JsonConvert.SerializeObject(Model.CandidateId))); var employee = @Html.Raw(JsonConvert.SerializeObject(selectedempobj)); var val = "["; for (i = 0; i &lt; employee.length; i++) { val += employee[i].EmployeeID + ","; } val = val.substring(0, val.length - 1) + "]"; $("#select-Employee")[0].selectize.setValue(JSON.parse(val)); $('#txtScheduledOn').val('@String.Format("{0:M/d/yyyy HH:mm tt}", Model.ScheduledOn)'); $('#txtCompletedOn').val('@String.Format("{0:M/d/yyyy HH:mm tt}", Model.CompletedOn)'); $('#hdnEmployeeId').val(JSON.parse(val).toString()); $('#hdnCandidateId').val('@Html.Raw(JsonConvert.SerializeObject(Model.CandidateId))'); }

atomic
type: Tag
tags question: http://stackoverflow.com/q/26686493
tag name: atomic

http://stackoverflow.com/comment/42082694
score: 1
comment on: http://stackoverflow.com/q/26748995
has text: I don't think spans (inline elements) are supposed to contain tables (block elements). Depending on doctype, the table may be built outside its would-be span container. The fact that someone has got this HTML working in a fiddle doesn't mean that it will work under all doctypes in all browsers.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42094397
score: 0
comment on: http://stackoverflow.com/a/26755552
has text: Best you edit your answer to match your new JSFiddle, as the answer you posted *is not correct* (but your new JSFiddle is).
type: Comment
type: AnswerComment

http://stackoverflow.com/a/26824181
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26823172
type: AcceptedAnswer
downvote count: 0
has body: You are not auto-submitting the form (at least not in the code you've provided). .submit() is just attaching an event handler to #sliderForm's submit event. If you want your ajax method to be called, you must either trigger the submit event, or - even prettier - you can use jQuery's .triggerHandler (http://api.jquery.com/triggerhandler/) to invoke your handler without triggering the event's default behaviour: $('#sliderForm').triggerHandler('submit');
type: Answer
accepted answer of: http://stackoverflow.com/q/26823172

http://stackoverflow.com/comment/41980545
type: AnswerComment
score: 0
type: Comment
has text: man thats right! ... i was totally zoning out, not considering the ajax calls...of course i can get them locally. dumb question dough. thanks man
comment on: http://stackoverflow.com/a/26692430

http://stackoverflow.com/comment/41980334
has text: You don't want to store 8 datasets(array of objects) in the dataSetReference variable that's it ?
comment on: http://stackoverflow.com/a/26692009
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26689917
has body: may be this is what you want // usernameArray contains all the usernames that can't be used var usernameArray = ['username1','username2','username3']; // i'm using .kyup() method to get a dynamic result so whenever the user type a letter or // something else (just one caracter) we check that value against our usernameArray list $('#username').keyup(function(){ var value = $(this).val(); if(usernameArray.indexOf(value) &gt;= 0){ alert('sorry, try another username '); }else{ alert('good, you can use this username it is available'); } });
type: Answer
answers question: http://stackoverflow.com/q/26689681
score: 0

http://stackoverflow.com/q/26699485
tagged with: ajax
score: 0
has body: Help. I have these buttons on a webpage, they are nested within an asp paginated gridview with updatepanel surrounding them. Do not be put of with all of that as everthing there works well however it is Button3 that is causing me problems. &lt;asp:Button ID="Button1" runat="server" Text="Filter Jobs" CssClass="mybuttonblue" Style="width: 115px;" /&gt; &lt;asp:Button ID="Button3" runat="server" Text="Reset Filter" CssClass="mybuttonblue" Style="width: 115px;" OnClientClick="resetfilter();" /&gt; &lt;asp:Button ID="Button2" runat="server" Text="Add New Job" CssClass="mybuttonblue" Style="width: 135px; float: right;" OnClick="btnNewJob" /&gt; If you look at Button3, I have a OnClientClick which (as you know) on runtime converts to OnClick="" to run some javascript code. The button is set to run "resetfilter()"... which is .. &lt;script&gt; function resetfilter() { document.getElementById("filterID").value = ""; document.getElementById("filterJobRef").value = ""; document.getElementById("filterJobTitle").value = ""; } &lt;/script&gt; The problem is that sometimes when I press this button it fires this code, sometimes it does not. To know and test that I added the following. &lt;script&gt; function resetfilter() { alert("fire"); document.getElementById("filterID").value = ""; document.getElementById("filterJobRef").value = ""; document.getElementById("filterJobTitle").value = ""; } &lt;/script&gt; I have noticed that it will fire all of the time until an AJAX update has taken place on the updatepanel and then it will "sometimes" will not fire. Any idea what is going on here? Thanks
tagged with: asp.net
type: UnansweredQuestion
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/41997254
has title: Intermittant fire of javascript code behind button
tagged with: button
tagged with: javascript
has comment: http://stackoverflow.com/comment/41996185

http://stackoverflow.com/comment/41989336
type: AnswerComment
score: 0
type: Comment
has text: in result console? lower right portion in the jsfiddle?
comment on: http://stackoverflow.com/a/26697287

http://stackoverflow.com/a/26728046
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26727989
answers question: http://stackoverflow.com/q/26727989
type: AcceptedAnswer
downvote count: 0
has body: You can just add the following expression... @(HttpContext.Current.Session["UserLocation"] != null ? HttpContext.Current.Session["UserLocation"].ToString() : "ALL") but really, try to change your approach...keeping user's information in session state is horrible and not scalable
type: Answer

http://stackoverflow.com/a/26714044
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26713068
has body: The second element seems like a slideshow, does the current time update on the 2nd one? also your 2nd if check will always evaluate true after the second call.
has comment: http://stackoverflow.com/comment/42018750

http://stackoverflow.com/comment/41954103
type: QuestionComment
comment on: http://stackoverflow.com/q/26677245
has text: Referencing multiple functions by name, out of context, is not a good way for coders (i.e. *us*) to read code. How about at least the functions with the function body remove/trimmed?
score: 0
type: Comment

http://stackoverflow.com/comment/42117765
comment on: http://stackoverflow.com/q/26768545
type: QuestionComment
has text: Probably! What does each slice produce?
score: 0
type: Comment

http://stackoverflow.com/comment/42152055
type: AnswerComment
type: Comment
has text: eval should always be avoided server side, but client side.... yes, i ve heard that is evil, but think about this... i can edit javascript code on browser and execute, so you shouldn´t worry for this
score: 0
comment on: http://stackoverflow.com/a/26787712

http://stackoverflow.com/a/26728727
has comment: http://stackoverflow.com/comment/42045783
score: 0
type: Answer
has body: Try this instead: "opacity": "0" It should work
answers question: http://stackoverflow.com/q/26728681

http://stackoverflow.com/comment/42005697
score: 0
type: AnswerComment
has text: huh, Ok, changed the link. Now the endpoints what you trying to connect? Are you making like a list of POST, GET, PUT to display a RESTful interface? like http://swagger.io/?
type: Comment
comment on: http://stackoverflow.com/a/26704141

http://stackoverflow.com/a/26801373
has comment: http://stackoverflow.com/comment/42176567
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26801325
downvote count: 0
has comment: http://stackoverflow.com/comment/42176555
type: Answer
has comment: http://stackoverflow.com/comment/42176347
has comment: http://stackoverflow.com/comment/42176620
has comment: http://stackoverflow.com/comment/42176503
upvote count: 2
has comment: http://stackoverflow.com/comment/42176753
has body: Try this : You can use each to check each tr for selected option text and make it visible. No need to use closest('tr') as $(this) itself is a TR. $(function(){ b = $("tr"); $(".show").on("click", function(){ var a = $("select option:selected").text(); b.hide(); //if ($("tr:contains('"+a+"')").length) // $(this).closest(tr).show(); b.each(function(){ if($(this).text().indexOf(a)!=-1) { $(this).show(); } }); }); $(".hide").on("click", function(){ b.show(); }); });
score: 2
accepted answer of: http://stackoverflow.com/q/26801325

http://stackoverflow.com/q/26762265
has comment: http://stackoverflow.com/comment/44596411
tagged with: angular-ui
favorite count: 0
has body: I have the following scenario. I am doing an excel export. It works fine when I use ng-href by passing just one ID in query string. But now I have multiple ID's to pass, So I am using ng-click in HTML and $http.POST that passes postData to the server as shown below. The problem is if I use ng-click and call $http.post, it gets the required data but it wont create the excel document. I think it is because I am not using ng-href, but cant figure out how to fix it. Any help would be greatly appreciated. HTML: Export to Excel Controller.JS: $scope.getWorklistExportData = function (e) { rest.post('../ExcelDownload/ExcelDownload.aspx', $scope.selectedWorkListIDs).success(function (resp) { var successResp = resp; e.preventDefault(); }).error(function (resp) { var errResp = resp; }); } aspx.cs: public partial class ExcelDownload_ExcelDownload : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { var sr = new StreamReader(Request.InputStream); var stream = sr.ReadToEnd(); CreateExcel(stream); //CreateExcel(Convert.ToInt32(Request.QueryString["workListID"])); //CreateExcel(823); } } private void CreateExcel(string cbrIdList) { var client = new RestClient(ConfigurationManager.AppSettings["TIBCOServer"]); string url = ConfigurationManager.AppSettings["ExportWorklistCBRS"]; //url = url.Replace("{workListID}", workListID.ToString()); var request = CreateStandardRestRequest(url, Method.POST); request.RootElement = "WorkListDetailExport"; request.AddParameter("CBR_ID", cbrIdList, ParameterType.RequestBody); var queryResult = client.Execute<List<CBRSRecord>>(request); var queryResult2 = client.Execute(request); DataTable tbl = ToDataTable<CBRSRecord>(queryResult.Data); tbl = FormatColumnNames(tbl); // DataTable tbl = new DataTable(); using (ExcelPackage pck = new ExcelPackage()) { //Create the worksheet ExcelWorksheet ws = pck.Workbook.Worksheets.Add("Worklist"); //Load the datatable into the sheet, starting from cell A1. Print the column names on row 1 ws.Ce…
answer count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42108891
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/42106024
tagged with: export-to-excel
tagged with: c#
has comment: http://stackoverflow.com/comment/42105825
score: 1
has comment: http://stackoverflow.com/comment/44813835
has comment: http://stackoverflow.com/comment/42106070
type: Question
downvote count: 0
tagged with: javascript
has title: How to pass postData using ng-href
has comment: http://stackoverflow.com/comment/42109017

http://stackoverflow.com/q/26806516
has answer: http://stackoverflow.com/a/26808611
tagged with: regex
favorite count: 0
has answer: http://stackoverflow.com/a/26811759
type: UnansweredQuestion
downvote count: 1
score: -1
has body: var quote = '[[quote=bob]This is some text bob wrote[/quote]]'; I'm trying to replace / regex this so it looks like: bob This is some text bob wrote I was trying to work with this: '/\[quote=(.*?)](.*?)\[\/quote]/' but I'm not great with regex.
tagged with: replace
type: Question
has title: JavaScript - replace / regex for formatting quotes in a forum
answer count: 2
upvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/42211891
type: AnswerComment
has text: basically most of my projects have two chained async calls each with success and fail handler followed by final success call (that gets out of queue)
type: Comment
comment on: http://stackoverflow.com/a/26821029
score: 0

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

http://stackoverflow.com/a/26716148
has comment: http://stackoverflow.com/comment/42037529
has comment: http://stackoverflow.com/comment/42037976
answers question: http://stackoverflow.com/q/26716000
type: Answer
accepted answer of: http://stackoverflow.com/q/26716000
has comment: http://stackoverflow.com/comment/42031428
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42036995
has body: Syntax errors, due to incorrect escaping. From your generated JS: d.write(" ^---start of string https://api.classmarker.com/v1/groups/recent_results.json result JS, you need to DOUBLE escape at the PHP level: d.write(\" {$address} result <link rel=\\"sty ^^---note the doubled backslash.
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26723625
score: 0
has body: Try with this: /[\d]+/ I hope this will be ok
type: Answer
has comment: http://stackoverflow.com/comment/42036862
answers question: http://stackoverflow.com/q/26723568

http://stackoverflow.com/q/26735059
tagged with: http://stackoverflow.com/tag/json
downvote count: 3
upvote count: 1
type: Question
score: -2
tagged with: javascript
has title: make use of @ character in json object
linked to: http://stackoverflow.com/q/4255472
answer count: 1
has answer: http://stackoverflow.com/a/26735094
duplicate of: http://stackoverflow.com/q/4255472
favorite count: 0
has body: I have a rather strange question. I have a json object with an @ character in its attribute name, like for example the na@me. I can't call on it since I can't make use of an @ character in the object. Well change the character is perhaps your most obvious answer, but I wonder if there is another solution besides this? How I can call the na@me attribute? JSON Object Creation in JavaScript
accepted answer: http://stackoverflow.com/a/26735094
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/11922383

http://stackoverflow.com/a/26728549
type: Answer
answers question: http://stackoverflow.com/q/26728419
has comment: http://stackoverflow.com/comment/42045656
has comment: http://stackoverflow.com/comment/42045463
has body: As I can see in your code you are not actually updating the object but creating a new object. But if that is your goal you can pass it as a parameter: var nutrientsConsumed = function(paramValue) { var g1 = new JustGage({ id : "g1", **value** : paramValue, min : 0, max : 100, title : "Protein", label : "", levelColorsGradient : false }); function update(){ var strength = 10; nutrientsConsumed(strength); }
has comment: http://stackoverflow.com/comment/42045556
score: 0

http://stackoverflow.com/a/26740822
upvote count: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26740737
type: Answer
has body: It's just one case, so: '1 Months 1 Days'.replace(/\b1 Months/, '1 Month') .replace(/\b1 Days/, '1 Day'); will work. document.getElementById('div1').textContent = '1 Months 1 Days'.replace(/\b1 Months/, '1 Month') .replace(/\b1 Days/, '1 Day'); document.getElementById('div2').textContent = '12 Months 21 Days'.replace(/\b1 Months/, '1 Month') .replace(/\b1 Days/, '1 Day'); 1 Months 1 Days --&gt; &lt;div id="div1"&gt;&lt;/div&gt; 12 Months 21 Days --&gt; &lt;div id="div2"&gt;&lt;/div&gt;
score: 2

http://stackoverflow.com/q/26758654
answer count: 1
tagged with: javascript
tagged with: jquery
has title: TypeScript: refactor a part of JQuerified code to another file
has body: I've a big.js file which starts with the following code: jQuery(document).ready(function ($) { Inside this huge call to function I've a piece of code which I would like to refactor and move to specific.ts I've tried both to write in the other file: jQuery(document).ready(function($) { $("#link").on("click", function(e) { And directly the piece of code which I want to move: $("#link").on("click", function(e) { In both cases I got errors like: Could not find symbol 'jQuery'.
has answer: http://stackoverflow.com/a/26759700
has comment: http://stackoverflow.com/comment/42098896
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26759700
type: Question
score: 0

http://stackoverflow.com/q/26812007
tagged with: javascript
tagged with: jquery
has body: What I want to do is to make an image grow when I hover over it. That's simple enough with :hover in CSS, but I also want the surrounding content not to be pushed around. I'd also prefer that the image grow from the center rather than the top-left corner. I could presumably spend hours fiddling with CSS and a lot of media queries (positioning of the surrounding elements varies with the window width), resulting in very messy but functional code. However, it would be much better if there were a simple way to do this in Javascript or Jquery. Does anyone know a good way to do this?
tagged with: zooming
score: 0
has comment: http://stackoverflow.com/comment/42196346
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42196472
has title: Javascript enlarge an image outside of flow
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26812420
accepted answer: http://stackoverflow.com/a/26812420
type: Question
answer count: 1

google-apps-script
tags question: http://stackoverflow.com/q/26750308
tags question: http://stackoverflow.com/q/26809415
tags question: http://stackoverflow.com/q/26713934
tags question: http://stackoverflow.com/q/26756483
tags question: http://stackoverflow.com/q/26831327
type: Tag
tag name: google-apps-script
tags question: http://stackoverflow.com/q/26733744
tags question: http://stackoverflow.com/q/26813003
tags question: http://stackoverflow.com/q/26758748
tags question: http://stackoverflow.com/q/26726013
tags question: http://stackoverflow.com/q/26701497
tags question: http://stackoverflow.com/q/26771018

http://stackoverflow.com/comment/42059720
type: Comment
comment on: http://stackoverflow.com/a/26736284
has text: Something like this: http://jsfiddle.net/n9evtryd/1/ Clicking on the button you activate a function which is called after 2 seconds. This function calls a service which emit an event catched by another controller
type: AnswerComment
score: 0

http://stackoverflow.com/q/26685293
upvote count: 3
has title: How can I use ng-model two-way binding with a function in AngularJS?
has body: So, I was coming up with this great data model approach for my Angular app which lets me do fancy stuff like this: var product = productModel.create(); product.set('name', 'Widget'); product.set('price', 12.99); product.set('quantity', 46); product.save().success(function() { alert('It saved!'); }); But then I realized...this doesn't work with ng-model :( Name Quantity Price When I type text in an input field, I get this Error: [ngModel:nonassign] Expression 'product.get('name')' is non-assignable. Element: Obviously this happens because Angular wants to bind against a variable, but instead I'm trying to bind against a function call. I really would like to keep this model approach that uses get() and set(). How can I make this work with ng-model and still have two-way binding? There must be a way...
type: Question
score: 3
tagged with: javascript
has comment: http://stackoverflow.com/comment/41968664
accepted answer: http://stackoverflow.com/a/26685741
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41968685
favorite count: 0
tagged with: model
tagged with: angularjs
type: AnsweredQuestion
tagged with: data-binding
has answer: http://stackoverflow.com/a/26685741

http://stackoverflow.com/q/26724942
has answer: http://stackoverflow.com/a/29093950
accepted answer: http://stackoverflow.com/a/29093950
type: Question
possible better answer: http://stackoverflow.com/a/29651889
tagged with: javascript
has body: I'm wondering if anyone has found a fix for the issue, when the menu is initialized but has not been shown yet and the user makes edge swipes what leads to ST throwing errors: Uncaught TypeError: Cannot read property 'on' of undefined. Please see here what I mean (open console and make edge swipes): https://fiddle.sencha.com/#fiddle/3vq More about that: http://www.sencha.com/forum/showthread.php?281225
tagged with: extjs
score: 0
answer count: 2
tagged with: sencha-touch-2
tagged with: sencha-touch
has answer: http://stackoverflow.com/a/29651889
has title: Sencha Touch - menu and edge swipes errors
tagged with: sencha-touch-2.1
type: AnsweredQuestion

http://stackoverflow.com/a/26693215
has body: You can kill two birds with one stone by giving all your checkbxes and radio buttons labels, with a "for" attribute. This firstly allows you to attach CSS to the label (give the label an id for this). But it is also the correct way to script checkboxes and radios these days, to make your web site accessible to the disabled. People who have impaired eyesight, or impaired handling, have difficulty clicking items as small as checkboxes. A labels becomes selectable along with the checkbox it is attached to, providing a much bigger area for the user to click on. It's good practice these days, especially if you do professional web development.
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26692994
downvote count: 0

http://stackoverflow.com/a/26799765
has comment: http://stackoverflow.com/comment/42175165
score: 4
answers question: http://stackoverflow.com/q/26798751
downvote count: 0
has comment: http://stackoverflow.com/comment/42174922
type: Answer
has comment: http://stackoverflow.com/comment/42174366
has body: Your question is really complex because console.log needs a css string argument for every %c in your message. But since you do that dynamically, you cannot hard code your arguments for console.log, what leads to the problem, that you need to call console.log with an array of arguments. For this problem the .apply method can be used: console.log.apply(console, args); But to use this, you need to set up an array for the arguments: var args = [msg]; and fill it with the needed amount of css styles, which is a little complicated, because you need to find all the appearances of %c in your message and toggle between two (or more if you want) css styles: var helpString = msg; var toggleNextString = false; while (helpString.indexOf("%c") != -1) { if (!toggleNextString) args.push(cssStrNew); else args.push(cssStrStandard); toggleNextString = !toggleNextString; helpString = helpString.substr(helpString.indexOf("%c") + 2); } Note: I used two strings for the standard log css and for the color red. Putting all of this together, the function looks like this: function redLog(msg, regExp) { var cssStrNew = 'color: red;'; var cssStrStandard = 'color: black'; if (msg &amp;&amp; regExp) { msg = msg.replace(regExp, '%c$&amp;%c'); var args = [msg]; var helpString = msg; var toggleNextString = false; while (helpString.indexOf("%c") != -1) { if (!toggleNextString) args.push(cssStrNew); else args.push(cssStrStandard); toggleNextString = !toggleNextString; helpString = helpString.substr(helpString.indexOf("%c") + 2); } console.log.apply(console, args); } else { msg = "%c" + msg console.log(msg, cssStrNew); } } Here is working fiddle IMPORTANT: %c doesn't work within all browsers (for Firefox you can use Firebug) (afaik)
upvote count: 4

http://stackoverflow.com/a/26805133
has comment: http://stackoverflow.com/comment/42183577
has body: If you don't expect your method to return anything - don't require JSON as result: $.ajax({ url: '/Material/UpdateCheckBoxes', type: 'POST', contentType: 'application/json; charset=utf-8', // dataType: 'json', - remove this line. traditional: true, data: JSON.stringify({ requiresSetupArray: requiresSetupArray, disabledArray: disabledArray }), success: function (data) { alert("success " + data); button.attr('value', 'Save Checkbox Changes'); button.addClass('disabled'); }, error: function () { alert("error"); } });
score: 1
has comment: http://stackoverflow.com/comment/42183478
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26804730
answers question: http://stackoverflow.com/q/26804730
type: Answer
downvote count: 0

http://stackoverflow.com/q/26830361
has comment: http://stackoverflow.com/comment/42227751
has body: I was having an issue with some code I had so I am starting again from scratch, but now something that was working in my original code is not working here and I can not figure out why. When I make a selection from the dropdown box the onchange function, which should trigger my reload function, nothing happens. Here is my code: <?php require 'config.php'; // Database connection //////// End of connecting to database //////// ?> <?Php @$year1=$_GET['year1']; @$team1=$_GET['team1']; $quer1="SELECT DISTINCT year FROM PlayerRegSeason ORDER BY year"; $quer2="SELECT DISTINCT team FROM PlayerRegSeason WHERE year=$year1 ORDER BY team"; $quer3="SELECT fname, lname FROM PlayerRegSeason WHERE year=$year1 and team ='$team1'"; echo " "; echo " Select Year "; foreach ($dbo->query($quer1) as $row1){ if($row1['year']==@$year1){echo " $row1[year] "." ";} else{echo " $row1[year] ";} } echo " "; ?>
accepted answer: http://stackoverflow.com/a/26830419
tagged with: onchange
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has title: Php select onchange doesn't seem to be working
has comment: http://stackoverflow.com/comment/42228556
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42227677
has answer: http://stackoverflow.com/a/26830419
type: Question
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26692369
has answer: http://stackoverflow.com/a/26692941
has answer: http://stackoverflow.com/a/26936154
answer count: 4
has answer: http://stackoverflow.com/a/26692433
accepted answer: http://stackoverflow.com/a/26692433
tagged with: object
has comment: http://stackoverflow.com/comment/41980420
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26692514
tagged with: oop
has title: javascript new does not create new object
type: Question
has comment: http://stackoverflow.com/comment/41980436
has body: I am trying to get two objects from the same class definition. However they seem to share the same attribute. What can i do? http://jsfiddle.net/dagod/nuam8dks/2/ myclass = function() { this.data.push(Math.random(1000)); }; myclass.prototype.data = []; a = new myclass(); b = new myclass(); console.log(a.data); console.log(b.data); //same as a.data
tagged with: javascript
tagged with: class
score: 0
possible better answer: http://stackoverflow.com/a/26692941

http://stackoverflow.com/comment/42070067
comment on: http://stackoverflow.com/q/26742108
score: 0
type: Comment
type: QuestionComment
has text: Tried but did not worked.

http://stackoverflow.com/a/26804624
downvote count: 0
score: 1
has body: Simply add them up: var rowSpanHeight = ['70', '70', '70', '70', '70', '70','74', '74', '74', '74', '74', '74','50', '50', '50', '50', '50', '50','70', '70', '70', '70', '70', '70']; document.write(parseInt(rowSpanHeight[0]) + parseInt(rowSpanHeight[6]) + parseInt(rowSpanHeight[12]) + parseInt(rowSpanHeight[18]));
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26804534

http://stackoverflow.com/a/26735626
answers question: http://stackoverflow.com/q/26735569
has body: document.getElementById("id").oninput = function() { if (this.value !== "") { document.getElementById("frei").className = "frei1"; } } or document.getElementById("id").addEventListener('input',function() { if (this.value !== "") { document.getElementById("frei").className = "frei1"; } }, false);
type: Answer
score: 0

http://stackoverflow.com/comment/41958335
type: AnswerComment
has text: @common do you want to alternate between what is shown? So that when they click the button, the button disappears and the content is shown?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26679483

http://stackoverflow.com/q/26701111
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26701126
type: Question
has title: JS Call Stack with context
answer count: 2
accepted answer: http://stackoverflow.com/a/26701126
has answer: http://stackoverflow.com/a/26701418
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/26701418
has body: All, I have a bit of code that is essentially, function b(){ console.log(this); } function a(){ console.log(this); b(); } Window.call(context, a); The output looks like: Object(context) Window It looks like the nonstandard context is only preserved when calling call, all subroutines where a context is not specified are called with the original context. Is there any way to invoke a function with context, having its entire execution stack occupy that same context? Thanks,

http://stackoverflow.com/comment/42077365
type: QuestionComment
has text: wait a moment, let me show u my picture
comment on: http://stackoverflow.com/q/26745905
score: 0
type: Comment

http://stackoverflow.com/comment/42108367
comment on: http://stackoverflow.com/q/26763285
score: 0
type: QuestionComment
type: Comment
has text: could you at least point me in the right direction? Relatively new to front end development, and just trying to learn.

http://stackoverflow.com/comment/42027268
comment on: http://stackoverflow.com/q/26718341
score: 0
has text: I did not have a doctype! Thanks for that I usually make sure of this, but forgot this time.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26674113
has comment: http://stackoverflow.com/comment/41947724
tagged with: operators
has body: In the following javascript code, var a = 5; console.log(5 &lt;= a &gt;= 6); False is printed to the console. However, true is printed for the statements 5 &lt;= a and a >= 6. Is it something to do with the double comparisons? Thanks!
type: UnansweredQuestion
tagged with: syntax
has comment: http://stackoverflow.com/comment/41947785
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41947878
has title: Why does JavaScript return false when comparing a variable with two true statements?
tagged with: comparison
has answer: http://stackoverflow.com/a/26674162
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26674194

http://stackoverflow.com/comment/42068381
has text: Note: My complete HTML file is posted in the original question. I don't have access to whatever gets loaded in by javascript, so I guess we're going to assume since it's a form that it uses the `form` tag somewhere. I'm can't add `class="form"` to the code loaded by javascript.
type: AnswerComment
comment on: http://stackoverflow.com/a/26741215
score: 0
type: Comment

http://stackoverflow.com/comment/42177033
comment on: http://stackoverflow.com/q/26797560
has text: Personally I'd just alter the TLD to allow arbitrary attributes.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27956685
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26709187
has body: The leaflet-angular directives do not support kml. You will need a Leaflet plugin such as this to get this functionality and interact directly with the map object: leafletData.getMap().then(function(map) { //add L.KML from plugin to map }); example of accessing map object

http://stackoverflow.com/comment/42055322
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26733998
has text: Do you see any error in the developer console of the browser? Did you run the exact same code? There must be some difference.
score: 0

http://stackoverflow.com/comment/42190928
has text: The jscode is there, under the javascript box. Can you not see it from your screen? I can see it from here just fine
comment on: http://stackoverflow.com/q/26808999
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41982626
has text: I put myFunction in the beginning, before 'Request Data'. Still not working.
type: Comment
comment on: http://stackoverflow.com/a/26693581
score: 0
type: AnswerComment

http://stackoverflow.com/q/26830001
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42227146
answer count: 1
has comment: http://stackoverflow.com/comment/42227162
has comment: http://stackoverflow.com/comment/42227259
has comment: http://stackoverflow.com/comment/42227366
has comment: http://stackoverflow.com/comment/42227116
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42227200
has title: validation in javascript is not validating the function
has answer: http://stackoverflow.com/a/26830360
has comment: http://stackoverflow.com/comment/42227762
score: 0
has body: I am validating a form which has validations for required field, character, number, email, password format, length of a field. In my code, required field and length are working but the rest. JavaScript code for Password format: function CheckPassword(paswd) { var submitFlag = false; var paswd = /^(?=.*[0-9])(?=.*[!@#$%^&*_])[a-zA-Z0-9!@#$%^&*]{7,15}$/; if (document.reg_indi_form.pswd.length > 0) { if (!document.reg_indi_form.pswd.value.match(paswd)) { submitFlag = true; document.getElementById('i3').innerHTML = "Use atleast one digit,character,specialCharacter"; document.getElementById('i3').style.color = "red"; document.getElementById('i10').style.fontSize = "12px"; //return false; } } return submitFlag; } function alls() { var valid = true; valid *= req(); valid *= validateUname(); valid *= CheckPassword(this); valid *= num(); valid *= confirm_pswd(); valid *= namevalid(); valid *= ValidateEmail(this); return valid ? true : false; } I am calling alls() on onSubmit. All other functions which are not working are similar to checkPassword(). HTML code: First Name*: Password*:
has comment: http://stackoverflow.com/comment/42227315

http://stackoverflow.com/comment/42124416
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26771676
score: 0
has text: @ It seems jquery conflict issue. Are you getting any error in console for the same ?

http://stackoverflow.com/q/26735927
score: 2
has body: In an effort to avoid repeating code I found it useful to have helper functions that could be called from within a foo.rendered function (for instance). Why is this possible in 0.9.3 of Meteor, but throws an error in 1.0 ? Template.foo.helpers({ 'fooFn' : function(){ return "something" } }); Template.foo.rendered = function(){ var something = Template.foo.fooFn(); } Should I change the syntax in foo.rendered (am I calling it wrong?) or maybe use a different approach entirely (set up functions outside of the helpers({}) and rendered() and call those? or set this up as a registered helper function?
has comment: http://stackoverflow.com/comment/42136172
type: Question
tagged with: javascript
upvote count: 2
answer count: 2
linked to: http://stackoverflow.com/q/22147813
downvote count: 0
has answer: http://stackoverflow.com/a/28621298
tagged with: meteor
favorite count: 0
has title: Calling helper functions from within template.rendered in Meteor.js, error in 1.0, fine in 0.9.3
has comment: http://stackoverflow.com/comment/42074564
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28748132

meteor
tags question: http://stackoverflow.com/q/26766941
tags question: http://stackoverflow.com/q/26773161
tags question: http://stackoverflow.com/q/26803104
tags question: http://stackoverflow.com/q/26819139
tags question: http://stackoverflow.com/q/26826425
tags question: http://stackoverflow.com/q/26719424
tags question: http://stackoverflow.com/q/26726418
tags question: http://stackoverflow.com/q/26765819
tags question: http://stackoverflow.com/q/26706510
tags question: http://stackoverflow.com/q/26728854
tags question: http://stackoverflow.com/q/26804851
tags question: http://stackoverflow.com/q/26823459
tags question: http://stackoverflow.com/q/26820537
tags question: http://stackoverflow.com/q/26781664
tags question: http://stackoverflow.com/q/26798497
tags question: http://stackoverflow.com/q/26686881
tags question: http://stackoverflow.com/q/26743989
tags question: http://stackoverflow.com/q/26785312
tags question: http://stackoverflow.com/q/26758465
tags question: http://stackoverflow.com/q/26772159
tags question: http://stackoverflow.com/q/26816871
tags question: http://stackoverflow.com/q/26735927
tags question: http://stackoverflow.com/q/26681071
tags question: http://stackoverflow.com/q/26806716
tags question: http://stackoverflow.com/q/26744800
tags question: http://stackoverflow.com/q/26690859
tags question: http://stackoverflow.com/q/26679900
tags question: http://stackoverflow.com/q/26762901
type: Tag
tags question: http://stackoverflow.com/q/26694030
tags question: http://stackoverflow.com/q/26695531
tags question: http://stackoverflow.com/q/26803659
tags question: http://stackoverflow.com/q/26728155
tags question: http://stackoverflow.com/q/26789216
tags question: http://stackoverflow.com/q/26811488
tags question: http://stackoverflow.com/q/26682640
tags question: http://stackoverflow.com/q/26771987
tags question: http://stackoverflow.com/q/26744069
tags question: http://stackoverflow.com/q/26707482
tags question: http://stackoverflow.com/q/26722197
tags question: http://stackoverflow.com/q/26770788
tags question: http://stackoverflow.com/q/26790326
tags question: http://stackoverflow.com/q/26692789
tags question: http://stackoverflow.com/q/26681474
tags question: http://stackoverflow.com/q/26703985
tags question: http://stackoverflow.com/q/26787217
tags question: http://stackoverflow.com/q/26730309
tag name: meteor
tags question: http://stackoverflow.com/q/26684079
tags question: http://stackoverflow.com/q/26694069
tags question: http://stackoverflow.com/q/26743323
tags question: http://stackoverflow.com/q/26764045
tags question: http://stackoverflow.com/q/26703522
tags question: http://stackoverflow.com/q/26818893

http://stackoverflow.com/q/26779758
type: Question
tagged with: highcharts
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/csv
downvote count: 1
upvote count: 0
has body: I made a JavaScript function that makes a Highchart, reading from a CSV file. &lt;script&gt; function Showgraph(){ var options = { chart: { renderTo: 'container', defaultSeriesType: 'line' }, title: { text: 'Measurement data' }, xAxis: { categories: [], title: { text: 'Measurement number' }, labels: { enable: false, y:20, rotation: -45, allign: 'right' } }, yAxis: { title: { text: 'Retro Reflection' } }, series: [] }; $.get('data.csv', function(data) { // Split the lines var lines = data.split('\n'); // Iterate over the lines and add categories or series $.each(lines, function(lineNo, line) { var items = line.split(','); // header line containes categories if (lineNo == 0) { $.each(items, function(itemNo, item) { if (itemNo &gt; 0) options.xAxis.categories.push(item); }); } // the rest of the lines contain data with their name in the first // position else { var series = { data: [] }; $.each(items, function(itemNo, item) { if (itemNo == 0) { series.name = item; } else { series.data.push(parseFloat(item)); } }); options.series.push(series); } }); // Create the chart var chart = new Highcharts.Chart(options); }) } &lt;/script&gt; The CSV file where the x are numbers. Categories,xxx, 0.2,xxx, 0.33,xxx, 0.5,xxx, 0.7,xxx, 1.0,xxx, 1.5,xxx, 2.0,xxx, I would then like to remove the value: Categories, xxx, from the CSV file and modify the JavaScript function so that it still works but the chart doesn't show any values on the X-axis. The new CSV file 0.2,xxx, 0.33,xxx, 0.5,xxx, 0.7,xxx, 1.0,xxx, 1.5,xxx, 2.0,xxx, Basically to make a Highchart from the last that CSV file.
has answer: http://stackoverflow.com/a/26799146
accepted answer: http://stackoverflow.com/a/26799146
type: AnsweredQuestion
has title: Highchart from CSV file with JavaScript
score: -1

http://stackoverflow.com/comment/42039675
type: QuestionComment
has text: Even if you don't like constructor functions then the following eBook has better examples. I suggest reading the answer in the other comment first so you understand instance specific and prototype members and know the role a constructor plays. Then this one: https://github.com/getify/You-Dont-Know-JS/tree/master/this%20%26%20object%20prototypes
score: 1
comment on: http://stackoverflow.com/q/26718444
type: Comment

http://stackoverflow.com/q/26711440
has answer: http://stackoverflow.com/a/26712920
has answer: http://stackoverflow.com/a/29491366
tagged with: javascript
type: UnansweredQuestion
tagged with: amd
has answer: http://stackoverflow.com/a/26712409
has body: I use requirejs for loading angular and angular's modules. I want to require all necessary modules (e.g. angular-sanitize.js) together. In my require.config I define following rule: require.config({ path: { 'angular':'libs/angular-modules' }, shim: { 'angular': { deps: ['libs/angular'], exports: 'angular' }, ... } }); And in libs/angular-modules.js I define following module: define( [ 'libs/angular-sanitize', 'libs/angular-animate' ], function () { return angular; } ); I expect that at the time of loading modules angular.js will already be loaded. But sometimes I get error: Cannot read property '$$minErr' of undefined angular-sanitize.js:8 This is the eighth line of the angular-sanitize.js: var $sanitizeMinErr = angular.$$minErr('$sanitize'); So it means that the angular.js file was not loaded but in network tab i see that it was. I guess that at the time of initializing angular-sanitize module angular.js was loaded but was not initialized (window.angular has not yet been defined). How I can determine that angular has been initialized?
has title: loading angular modules after angular is initialized
tagged with: angularjs
type: Question
score: 0
answer count: 3
tagged with: requirejs

http://stackoverflow.com/a/26742045
has comment: http://stackoverflow.com/comment/42070423
has comment: http://stackoverflow.com/comment/42070205
score: 4
has body: $(document).on('click', '.game-image', function(event) { ... var playerwin = parseInt($.trim($(this).html())); ... $(this) refers to the clicked image. Images do not contain .html()
has comment: http://stackoverflow.com/comment/42070302
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/26741948
has comment: http://stackoverflow.com/comment/42070338
downvote count: 0
has comment: http://stackoverflow.com/comment/42070802
has comment: http://stackoverflow.com/comment/42070128

http://stackoverflow.com/comment/42075503
score: 0
comment on: http://stackoverflow.com/q/26744800
type: Comment
type: QuestionComment
has text: The old data won't be reset, you can safely redeploy your new code !

http://stackoverflow.com/q/26775518
has comment: http://stackoverflow.com/comment/42131311
type: Question
tagged with: angularjs-directive
tagged with: javascript
has comment: http://stackoverflow.com/comment/42130338
has comment: http://stackoverflow.com/comment/42131469
score: 0
has title: Why is Custom Directive conflicting with ui-sref?
has body: Here is the directive: directive('cgHasPermissions', ['$animate', '$rootScope', 'PermissionService', 'PERMISSION', '$compile', function ($animate, $rootScope, PermissionService, PERMISSION, $compile) { return { multiElement: true, transclude: 'element', restrict: 'A', $$tlb: true, link: function ($scope, $element, $attr, ctrl, $transclude) { var block, childScope, previousElements; var unregister = $scope.$watch('user', function (newValue, oldValue) { var value = $attr.cgHasPermissions; var needsPermissions = value || "" if($rootScope.user &amp;&amp; $rootScope.permissions) { unregister() } needsPermissions = value.replace(/\s+/g,"").split(","); needsPermissions = _.map(needsPermissions, function(perm){ return PERMISSION[perm]; }) var user = $rootScope.user; if(!needsPermissions || PermissionService.hasPermissions(needsPermissions)){ if (!childScope) { $transclude (function (clone, newScope) { childScope = newScope; clone [clone.length++] = document.createComment (' end cgHasPermissions: ' + $attr.cgHasPermissions + ' '); block = { clone: clone } $animate.enter(clone, $element.parent (), $element); }); } } else { if (previousElements) { previousElements.remove(); previousElements = null; } if (childScope) { childScope.$destroy(); childScope = null; } if (block) { previousElements = getBlockNodes (block.clone); $animate.leave (previousElements).then(function () { previousElements = null; }); block = null; } } }) } }; }]) Here is the HTML &lt;a ui-sref="addStudentForm" cg-has-permissions="canAddNewStudent,canViewStudent"&gt;+&lt;/a&gt; There is no problem in the logic of how the permissions work. I have verified that. whenever I remove the directive form HTML, ui-sref works just fine but when I add my directive, the ui-sref probably doesn't get executed and href attributed is not added at all. I tried an ng-click, which also doesn't work. What is in this directive that is not letting other directives get executed ? What I have done is, take the source code of ng-if an…
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42130579
answer count: 0

http://stackoverflow.com/q/26810526
has body: I think I need general improvement of my gulp file. But what is currently bothering me the most, is the behavior of gulp watch. I use gulp-watch to reload gulp-connect to update chrome. The problem is, it is triggered for every file separately. Here is an extract of my the gulp file: gulp.task('copySources', function() { gulp.src('src/*.html') .pipe(gulp.dest('dist')); gulp.src('src/css/*css') .pipe(gulp.dest('dist/css')); gulp.src('src/images/**') .pipe(gulp.dest('dist/images')); gulp.src('src/api/**') .pipe(gulp.dest('dist/api')); }); gulp.task('webserver', function() { connect.server({ livereload: true, root: ['dist'] }); }); gulp.task('livereload', function() { gulp.src('dist/**') .pipe(connect.reload()); }); // Watch Files For Changes gulp.task('watch', function() { gulp.watch('src/js/*.js', ['lint', 'scripts']); gulp.watch('src/*.html', ['copySources']); gulp.watch('src/css/*.css', ['copySources']); gulp.watch('src/images/**', ['copySources']); gulp.watch('src/api/**', ['copySources']); gulp.watch('dist/**', {verbose: true}, function(files) { console.log(files); }); gulp.watch('libs/**', ['copyLibs']); }); I changed the last watch from ['livereload'] to the function which prints the file path for debugging purposes. (the verbose setting seems not to have any effect.) Output of running gulp looks like this: { type: 'changed', path: 'd:\\GitHub\\Meadule\\dist\\index.html' } { type: 'changed', path: 'd:\\GitHub\\Meadule\\dist\\css\\bootstrap.min.css' } { type: 'changed', path: 'd:\\GitHub\\Meadule\\dist\\css\\style.css' } { type: 'changed', path: 'd:\\GitHub\\Meadule\\dist\\js\\angular-resource.min.js' } { type: 'changed', path: 'd:\\GitHub\\Meadule\\dist\\js\\angular.min.js' } { type: 'changed', path: 'd:\\GitHub\\Meadule\\dist\\api\\recipe.json' } { type: 'changed', path: 'd:\\GitHub\\Meadule\\dist\\images\\Chocolate_Cake.png' } { type: 'changed', path: 'd:\\GitHub\\Meadule\\dist\\images\\Mint_Tea.png' } { type: 'changed', path: 'd:\\GitHub\\Meadule\\dist\\js\\…
has answer: http://stackoverflow.com/a/26822271
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/29161135
has answer: http://stackoverflow.com/a/29161135
has comment: http://stackoverflow.com/comment/42193778
has title: Gulp watch is triggered for every file separately
type: Question
accepted answer: http://stackoverflow.com/a/26822271
tagged with: javascript
tagged with: gulp-watch
score: 0
answer count: 2
tagged with: gulp

http://stackoverflow.com/comment/41973243
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26687977
has text: @MarvinSmit, yeah I was reading the page. Actually, I like the solution by Kalhano better since it doesn't rely on $parent and the problems mentioned there.

http://stackoverflow.com/q/26816008
tagged with: javascript
tagged with: express
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26817163
tagged with: requirejs
tagged with: node.js
type: AnsweredQuestion
has body: Problem: I have a trivial demo application which use requireJS. When require.min.js script loads, it tries to load entry-point script. But, the Problem is that instead of localhost:8090/js/app.js it tries to load localhost:8090/js/app.app and fails. Demo: You can see the whole app at GitHub. === Only if you don't like GutHub, here's my code === File structure ProjectRoot |-server.js |-public/ |-index.html |-js/ |-app.js |-lib/ |-require.min.js |-underscore.js |-backbone.js |-raphael.js |-app/ |-.. server.js: var express = require('express'); var app = express(); app.use('/', express.static(__dirname + '/public')); app.listen(8090); index.html: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body&gt; &lt;/body&gt; &lt;script src="js/lib/require.min.js" data-main="js/app.js"&gt;&lt;/script&gt; &lt;/html&gt; app.js: require.config({ paths: { 'jquery': 'lib/jquery', 'raphael': 'lib/raphael' }, shim: { 'lib/underscore': { exports: '_' }, 'lib/backbone': { deps: ["lib/underscore", "jquery"], exports: 'Backbone' } } });
score: 0
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26817163
has title: RequireJS search for app.app instead of app.js (where app.js is entry point specified in data-main)

http://stackoverflow.com/comment/42027994
comment on: http://stackoverflow.com/a/26707690
score: 0
type: AnswerComment
has text: That's because you're not putting those `a` elements into the DOM. You're just creating them in javascript, but not putting them on the page.
type: Comment

http://stackoverflow.com/a/26725892
score: 1
has body: Add return and use onsubmit: Value: Revise function like so: function genURL() { location.href = "randomsite/view" + document.getElementById("search").value; return false; } If you were to use onclick, it would go on the button, not the form.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26725833
upvote count: 1

http://stackoverflow.com/a/26688258
upvote count: 1
has comment: http://stackoverflow.com/comment/41973876
has comment: http://stackoverflow.com/comment/41973746
type: AcceptedAnswer
downvote count: 0
has body: You could use the outerHTML property: var link = $('.link').clone().empty().prop('outerHTML'); $('#wrap img').wrap(link);
answers question: http://stackoverflow.com/q/26688206
accepted answer of: http://stackoverflow.com/q/26688206
type: Answer
score: 1

http://stackoverflow.com/q/26751144
type: AnsweredQuestion
has title: JavaScript onchange to submit form to different location
downvote count: 2
has comment: http://stackoverflow.com/comment/42086351
type: Question
has comment: http://stackoverflow.com/comment/42086196
has answer: http://stackoverflow.com/a/26752093
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/42086261
upvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26752093
has body: I can't seem to get this working with the onchange event. The alert triggers but I need the form submitting. <select name="STOCKACTION<%=objRst.fields("returnpartid")%>" id="STOCKACTION<%=objRst.fields ("returnpartid")%>" onchange="validatelink3(<%=objRst.fields("returnpartid")%>)"> <option value="<%response.write objRst.fields("stockaction")%>" selected="selected"><%response.write objRst.fields("stockaction")%> Return To Supplier Stock Scrap Quarantine Test
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26834700
upvote count: 4
downvote count: 0
has body: You need to remove the text element before re-adding it. canvas.remove(text); check this updated fiddler
answers question: http://stackoverflow.com/q/26771308
score: 4
accepted answer of: http://stackoverflow.com/q/26771308
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41992595
comment on: http://stackoverflow.com/a/26699196
score: 0
type: AnswerComment
type: Comment
has text: sure, for that you should use an extended page token. i will add another article in my answer. you should use php for that though. posting to a page wall is a completely different topic, so i just post an important link in the comments: https://developers.facebook.com/docs/graph-api/reference/v2.2/page/feed

http://stackoverflow.com/comment/62355027
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29981988
has text: Not sure why, but `.to$()` is not working on `.node()` for me. Had to use `$( table.row(i).node() )`
score: 0

http://stackoverflow.com/comment/42115091
has text: memo_code(usernames) is the field name from where $memo_data is getting as you can see in the WHILE loop when declaring $memo_data array. I tried both of our codes and this is what I get : **user: A time: A user: A time: A user: A time: A user: A time: A user: A time: A time: B user: B time: B user: B time: B user: B time: B user: B time: B user: C time: C user: C time: C user: C time: C user: C time: C user: C time: C** and it goes all the way to Z.. any ideas?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26767077

http://stackoverflow.com/comment/42142930
comment on: http://stackoverflow.com/a/26769436
score: 0
type: AnswerComment
has text: This is exactly it. I forgot that installing AngularFire requested I use 1.0.24 as opposed to 2.0 and I downgraded. As a side note - is any version of AngularFire compatible with Firebase ~2.0? I like Firebase's built-in Authentication on 2.0...
type: Comment

http://stackoverflow.com/q/26813209
tagged with: three.js
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/26818391
accepted answer: http://stackoverflow.com/a/26818391
type: AnsweredQuestion
downvote count: 0
has body: js and I'm trying to create a simple skybox based on this demo. Everything seems ok so far except 1 thing when I rotate my camera (I'm using orbitControls.js) and the z value is not the minimum possible then textures act weird and seem broken. Source: var camera, scene, renderer, controls, skybox; var toRadians = function(deg) { return deg * Math.PI / 180 } var toDegrees = function(radians) { return radians * (180 / Math.PI); } var init = function() { // scene scene = new THREE.Scene(); scene.fog = new THREE.FogExp2( 0xffffff, 0.00010); // camera camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 1, 20000 ); camera.position.z = 5000; scene.add( camera ); // skydome var urlPrefix = "http://three.dev/skybox/textures/"; var urls = [urlPrefix + "px.png", urlPrefix + "nx.png", urlPrefix + "py.png", urlPrefix + "ny.png", urlPrefix + "pz.png", urlPrefix + "nz.png"]; var textureCube = THREE.ImageUtils.loadTextureCube( urls ); var shader = THREE.ShaderLib[ "cube" ]; shader.uniforms[ "tCube" ].value = textureCube; var material = new THREE.ShaderMaterial( { fragmentShader: shader.fragmentShader, vertexShader: shader.vertexShader, uniforms: shader.uniforms, depthWrite: false, side: THREE.BackSide } ), skybox = new THREE.Mesh( new THREE.BoxGeometry( 10000, 10000, 10000 ), material ); scene.add( skybox ); //var texture = THREE.ImageUtils.loadTexture( 'http://three.dev/skybox/textures/wood.jpg') //var paintMaterial = new THREE.MeshBasicMaterial({map: textureCube}) // var lightAmb = new THREE.AmbientLight(0x333333); // lightAmb.position.set( 0,0,0 ); // scene.add(lightAmb); // var directionalLightTop = new THREE.DirectionalLight( 0xffffff, 1 ); // directionalLightTop.position.set( 0, 0, 0 ).normalize(); // scene.add( directionalLightTop ); // var color = new THREE.Color("rgb(255,0,0)"); // var pointLightRed = new THREE.PointLight(color, 1, 8000); // pointLightRed.position.set( 0, 0, 0); // camera.add( pointLightRed ); // renderer renderer = new THREE.W…
tagged with: javascript
has title: Three.js skybox seems broken after rotating camera
favorite count: 0
type: Question
score: 1

http://stackoverflow.com/comment/41996355
score: 0
has text: Thank you so much for your kind guidance! Will play with the php.
type: Comment
comment on: http://stackoverflow.com/a/26693427
type: AnswerComment

http://stackoverflow.com/a/26885320
type: Answer
answers question: http://stackoverflow.com/q/26718944
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26718944
score: 1
has body: after several attempt i managed to find a solution. i set directionsDisplay and directionsService as global variables and add this bit of code before drawing the map: directionsDisplay.setDirections({routes: []}); this will reset the map every time a new direction is entered.
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/42141824
has text: @Forlan07 No, my source is the first result with google using "strstr js"
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26782270
type: Comment

http://stackoverflow.com/comment/71463804
comment on: http://stackoverflow.com/a/42148730
type: Comment
has text: Here is an [example](https://basecacti.bitballoon.com/cacti/image.html?clr1=royalblue&clr2=coral&clr3=greenyellow&speed=1000) of a Basecacti-generated background.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26833245
type: Answer
has body: It's not a bug in Knockout. Since the sort invocation (as you're doing it) is not under the control of a computed/dependent observable, there's nothing to trigger it to resort. You've basically broken the connection between the UI (or more technically, the bindingHandler) and the ko.observable which KO uses for tracking changes. I've run into this many times where I work, and the general pattern I use is something like this: var viewmodel = { listOfObjects:ko.observableArray(), deleteFromList:deleteFromList, addToList:addToList, } //in your HTML, you'll do a foreach: listOfSortedObjects (instead of listOfObjects) viewmodel.listOfSortedObjects = ko.computed(function(){ //Since this is *inside* the change tracking ecosystem, this sort will be called as you would expect return viewmodel.listOfObjects().sort(yourSortingFunction); }); //Since you cannot edit a (normal) computed, you need to do your work on the original array as below. function deleteFromList(item){ viewmodel.listOfObjects.remove(item);//Changing this array will trigger the sorted computed to update, which will update your UI } function addToList(item){ viewmodel.listOfObjects.push(item); }
answers question: http://stackoverflow.com/q/26808860
score: 0

http://stackoverflow.com/comment/42103205
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26760796
has text: With the basic functionality of my webpage and using solely HTML, I'll probably pass this concept then. Thanks for the answer. @Sage There's to be content (paragraphs) and a footer under the images.
score: 0

http://stackoverflow.com/a/26784236
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26784093
downvote count: 0
has body: getMonth() is zero-based. So you will need getMonth()+1 getYear() was not Y2K compliant, so a new function getFullYear() was created to return 4-digit years.
type: Answer

http://stackoverflow.com/a/26689226
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26689188
type: Answer
has comment: http://stackoverflow.com/comment/41975443
answers question: http://stackoverflow.com/q/26689188
score: 2
has body: The value isn't ignored inside the function, it's the code that is calling the function that is ignoring what the function returns. If you show the return value, you will see that the function uses the value: console.log(rpsGame());
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/42200517
type: Comment
type: QuestionComment
has text: You can just access 'passedData' directly. It's in a parent scope which is completely accessible to you in the callback. Each function call creates a new scope and thus creates a new set of data so multiple function calls do not mess it up.
comment on: http://stackoverflow.com/q/26814552
score: 1

http://stackoverflow.com/q/26831643
has answer: http://stackoverflow.com/a/26834894
has body: I use "router.get" to capture all incoming requests matching /user/read/:user_id In "router.param", I define a new object "user" with attribute name and age Then in "router.get" I recover that user object with req.res.user.name to send a user's name back as a response. According to this tutorial, I should be able to use req.user.name. But it didn't work so I used req.res.user.name here is my question : is the "res" object in my "req" object the right location to recover my user from? In other words, I am wrong or is the tutorial wrong? // route middleware to validate :id router.param('user_id', function(res, req, next, user_id) { // validation on id var user = { 'name': 'Bob', 'age' : '3' }; req.user = user; next(); }); router.get('/user/read/:user_id', function(req, res) { res.send({'user' : req.res.user.name}); }); update: I'm using express 4.10.x
tagged with: javascript
tagged with: express
answer count: 1
downvote count: 0
score: 1
favorite count: 0
type: UnansweredQuestion
has title: recovering parameters after validation
tagged with: node.js
upvote count: 1
type: Question

http://stackoverflow.com/q/26822195
tagged with: http://stackoverflow.com/tag/html
score: 1
has comment: http://stackoverflow.com/comment/42213905
favorite count: 0
has comment: http://stackoverflow.com/comment/42214029
type: UnansweredQuestion
tagged with: css
answer count: 0
upvote count: 1
has title: How to auto click on multiple divs by clicking on button
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I have 3 banners in a page. the need is to open all the link on a single click on HTML button. (Using JQuery/JavaScript only) my html code is i used click function but not work may be because its use CDATA formate in script. please help done only with jquery or java script

http://stackoverflow.com/comment/42223907
comment on: http://stackoverflow.com/q/26827644
score: 0
type: Comment
type: QuestionComment
has text: Some code please....

http://stackoverflow.com/comment/42084503
type: Comment
type: QuestionComment
has text: My C# code is this: http://pastebin.com/FSKRHj91
comment on: http://stackoverflow.com/q/26728661
score: 0

http://stackoverflow.com/comment/41999544
score: 1
comment on: http://stackoverflow.com/q/26703079
has text: `prospectName.toLowerCase().IndexOf(...` Please take the time to observe errors in your developer console.
type: Comment
type: QuestionComment

rsvp.js
type: Tag
tag name: rsvp.js
tags question: http://stackoverflow.com/q/26830327

http://stackoverflow.com/q/26673398
accepted answer: http://stackoverflow.com/a/26673543
has answer: http://stackoverflow.com/a/26673563
tagged with: javascript
tagged with: jquery
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41946988
type: Question
has comment: http://stackoverflow.com/comment/41946713
has answer: http://stackoverflow.com/a/26673543
has body: This is probably quite simple but I am wondering how to ignore value from an option select if it is equal to a certain value, for example I have this select All Dog Cat $('select').on('change', function() { var animal_type = $('option:selected').text(); }); So if 'All' is selected I do not want to assign anything to the animal_type variable so that in the following ajax post animal_type is disregarded and not sent as a parameter $.ajax({ type: 'POST', url: '/public/rehomed', data: { animal_type: animal_type, #so if ALL selected this should not be passed through rehomed: false, } }); The reason I am thinking to remove the animal_type variable from the ajax post is the parameters of the post make an SQL query on the server side for me in rails.
has comment: http://stackoverflow.com/comment/41946660
has title: ignore value of select option jQuery
has answer: http://stackoverflow.com/a/26673793
has answer: http://stackoverflow.com/a/26673617
has comment: http://stackoverflow.com/comment/41946789
score: 0
has comment: http://stackoverflow.com/comment/41946756
possible better answer: http://stackoverflow.com/a/26673563

http://stackoverflow.com/a/26796895
has comment: http://stackoverflow.com/comment/42201365
has comment: http://stackoverflow.com/comment/42202473
answers question: http://stackoverflow.com/q/26796717
has comment: http://stackoverflow.com/comment/42168046
has comment: http://stackoverflow.com/comment/42170178
has comment: http://stackoverflow.com/comment/42168156
has comment: http://stackoverflow.com/comment/42169302
has comment: http://stackoverflow.com/comment/42172751
score: 0
has comment: http://stackoverflow.com/comment/42167950
type: Answer
has body: Of course your relative paths will work when using your own custom built nodejs server, which can serve files, .html .css .js and such. I assume you have some sort of public folder from where you serve your assets. If you don't use any special routing magic, and just reffer to structure of your public folder, then relative paths in your HTML, will work. &lt;link rel="stylesheet" href="styles/main.css"&gt; Code above could load something like: public/styles/main.css
has comment: http://stackoverflow.com/comment/42169363

http://stackoverflow.com/comment/42194931
score: 0
type: Comment
has text: Bear in mind the difference between `prop()` and `attr()`; though I'm not sure if it's an issue with ` ` elements and the `src`.
type: AnswerComment
comment on: http://stackoverflow.com/a/26811261

http://stackoverflow.com/comment/42169589
has text: It's good in my Chrome browser.
score: 1
comment on: http://stackoverflow.com/q/26796942
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42182196
has text: Is the link anchor a known URL? if so, I would target with that as the selector (see: http://stackoverflow.com/a/303961/1981678) and work up to the parent and then do a .remove() with jQuery to get the div gone
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26804163

http://stackoverflow.com/comment/42141831
has text: That's what I thought, too, but event.shiftKey is always undefined. Why would anyone hold shift when navigating from a control, anyway?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26782323

http://stackoverflow.com/a/26763632
type: Answer
accepted answer of: http://stackoverflow.com/q/26762759
score: 2
downvote count: 0
has body: You should be able to find the ID of the context model like this: actions: { willTransition: function(transition) { var contexts = transition.intent.contexts; // array of all context models var contextID = contexts[0].id; // if you only expect one model, this is its ID if(contextID == 102) { // now you can use the ID for your condition transition.abort(); } } }
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42108511
answers question: http://stackoverflow.com/q/26762759

http://stackoverflow.com/comment/41967427
has text: The `id` attribute of each ` ` should be unique.
comment on: http://stackoverflow.com/q/26684625
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26831135
has body: I'm making a quiz and am trying to check for empty input fields when the "next" button is clicked. If someone doesn't answer a question, then I want to give an alert and prevent them from going to the next question. For some reason, with my code, on the second question, it will give the "no response" alert, even if you enter a response on the second try. I can't figure out why. Here is the part of the code that raises the alert: $("button").click(function() { // check for empty input var inputVal = $.trim($(".question:visible input").val()); console.log("The value of the input is: " + inputVal); if (inputVal.length == 0 || inputVal == "") { alert("Please enter a response."); } else { position++; quesNum = position + 1; // hide previous question $(".question").hide(); // show next question if (position &lt; totalQues) { $(".question").eq(position).show(); $(".questionNumber").text("Question " + quesNum + " of " + totalQues); } else { // at the end of the questions, hide the questions and show the results $(".question, .questionNumber, button").hide(); // calculate risk percentage calculatePerc(); //show results template $(".results").show(); showResults(); } } }); // end button click function And here is my JS Fiddle: http://jsfiddle.net/amykirst/mpjg2vbk/ What can I do to make the dropdown alert work properly, so that it lets you proceed if you enter a response on the second try?
has comment: http://stackoverflow.com/comment/42229131
type: UnansweredQuestion
tagged with: forms
has title: Check value of form input and give alert if it is empty
tagged with: javascript
tagged with: jquery
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26831273
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26831210

http://stackoverflow.com/comment/41979573
type: Comment
has text: It worked in Chrome. Is there a way to specify the URL for where to download it and ultimately overwrite the existing one with the new one? Thanks
comment on: http://stackoverflow.com/a/26690558
score: 0
type: AnswerComment

http://stackoverflow.com/a/26787746
has comment: http://stackoverflow.com/comment/42152153
upvote count: 1
has comment: http://stackoverflow.com/comment/42151891
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26787704
answers question: http://stackoverflow.com/q/26787704
downvote count: 0
score: 1
has body: You're not sending a valid json object as you claim to be doing with the contentType. JSON.stringify your data: data: JSON.stringify({ "fromDate":"2011-01-01", "toDate":"2011-03-16T14:35:00Z", "limitTotalFlows":1000, "operator":"AND", "keyValues":[ "J0419:E", "J0410:AMPY", "J1043:BEDFORD" ] }),
has comment: http://stackoverflow.com/comment/42152225

http://stackoverflow.com/q/26757576
has comment: http://stackoverflow.com/comment/42096947
favorite count: 0
has comment: http://stackoverflow.com/comment/42097144
type: AnsweredQuestion
has body: I do not know why it does not work? Can you help me please? function calcTime(city, offset) { d = new Date(); utc = d.getTime() + (d.getTimezoneOffset() * 60000); nd = new Date(utc + (3600000*offset)); return nd.toLocaleString(); } var Paris =setInterval( function() { calcTime('gmt', '+1'); }, 500 ); I do not get the value of calcTime in the Paris variable
possible better answer: http://stackoverflow.com/a/26757927
has comment: http://stackoverflow.com/comment/42096986
upvote count: 3
type: Question
has answer: http://stackoverflow.com/a/26757927
has title: My setInterval is not working as expected
tagged with: javascript
score: -1
downvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/26757669
accepted answer: http://stackoverflow.com/a/26757669

http://stackoverflow.com/q/26704563
tagged with: asp.net-mvc
score: 1
has comment: http://stackoverflow.com/comment/42003045
has title: jQuery post with ajax from variable number of input boxes
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I am trying to pass user input for a variable number of inputs for two different fields back to the controller using jQuery post with ajax. I am having trouble getting more than just the first inputs. For example, if an employee is assigned multiple pieces of equipment, only the first one is passed to the controller. In the View I am displaying each employee in a table with a button for each to open a modal where their individual equipment can be assigned. In each modal there are two text boxes (vehicles &amp; tools) with the option for the user to add more of each using jQuery. I am new to JS, and can't figure out how to determine how many inputs there are, and I don't know how to put these into an array to pass to the controller. Any help is very appreciated! View: @int count = 0; @foreach (var item in Model) { &lt;tr&gt; &lt;td&gt; &lt;button class="btn btn-default" data-toggle="modal" data-target="#modal-@count"&gt; Assign Resources &lt;/button&gt; &lt;div class="modal fade" id="modal-@count" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog modal-lg"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel"&gt;@item.Rank @item.FirstName @item.LastName&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;input type="hidden" value="@item.assignedRosterID" id="assignedRosterID-@count" /&gt; &lt;div class="table"&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th class="text-center"&gt; Vehicles &lt;/th&gt; &lt;th class="text-center"&gt; Equipment &lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="middle"&gt; &lt;div class=”addV” id=”addV-@count”&gt; &lt;p&gt; &lt;input type="text" size="20" class="text-center" value="" id="vehicleNumber-@c…
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/26705390
has comment: http://stackoverflow.com/comment/42003076
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42003205
has comment: http://stackoverflow.com/comment/42004451
has comment: http://stackoverflow.com/comment/42003229
upvote count: 1
type: Question
tagged with: c#

source-maps
type: Tag
tag name: source-maps
tags question: http://stackoverflow.com/q/26776119

http://stackoverflow.com/comment/42203044
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26797309
type: Comment
has text: There is no problem with the plugin, you can forget that :P It's just the matter of removing the toggle behaviour

http://stackoverflow.com/a/26768090
has body: so the map is being drawn in a pseudo-frame, which is probably throwing off the calculations for what's "visible"... do you have a way of sharing the actual output HTML? like jsfiddle? are there any console errors? maybe it's something as simple as you've met your quota for the map tile server... try a different tile server?
answers question: http://stackoverflow.com/q/26767308
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42117189

http://stackoverflow.com/comment/42114556
type: QuestionComment
comment on: http://stackoverflow.com/q/26765277
score: 0
has text: How about go learn CSS and JS :D
type: Comment

http://stackoverflow.com/q/26714919
duplicate of: http://stackoverflow.com/q/14220321
has comment: http://stackoverflow.com/comment/42032711
has comment: http://stackoverflow.com/comment/42033300
type: Question
tagged with: arrays
tagged with: javascript
has title: Jquery storing data to an array each for loop
has comment: http://stackoverflow.com/comment/42020205
has body: I am a complete newbie with javascript and jquery. I've been trying to make this code work.. var links = []; var innerlinks = []; var count = document.getElementsByClassName("boss").length; for (i = 0; i &lt; count; i++) { links[i] = 'http://something.com/'+ document.getElementsByClassName("boss")[i].firstChild.getAttribute("href"); }; for (j = 0; j &lt; count; j++) { $.get(links[j], function(data){ content=data; }); var x = content.indexOf("&lt;h5&gt;Text"); var y = content.indexOf("someothertext", x); var sliced=content.slice(x, y + 14); var z = sliced.indexOf("href="); var q = sliced.indexOf("style"); innerlinks[j]=sliced.slice(z + 6, q - 2); }; alert(innerlinks); ..but it just doesn't seem to listen to me. I tried bunch of methods I read about here on stackoverflow but none seem to work. It's probably just some basic problem I have no knowledge about yet. What I want this script to do is basically take the link, receive it's content, take a portion of it (a link) and store it into an array. Then move to another one. While this one just takes a random link from the links array and fills the innerlinks array with same value. I do suspect content variable here, but I can't come up with any solution. Any and all help would be really appreciated!
tagged with: get
score: 0
tagged with: for-loop
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42033718
answer count: 0

http://stackoverflow.com/q/26779863
answer count: 4
has answer: http://stackoverflow.com/a/26780246
has comment: http://stackoverflow.com/comment/42137457
favorite count: 0
has comment: http://stackoverflow.com/comment/42137578
accepted answer: http://stackoverflow.com/a/26779952
has comment: http://stackoverflow.com/comment/42137453
tagged with: attr
possible better answer: http://stackoverflow.com/a/26779922
downvote count: 1
has answer: http://stackoverflow.com/a/26779921
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26779922
score: 3
has comment: http://stackoverflow.com/comment/42138268
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/26779952
has body: I want to get attribute value of selected option element. jQuery: $("#select_element").val().attr("val"); HTML: element1 element2
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/2230704
tagged with: element
linked to: http://stackoverflow.com/q/314636
has comment: http://stackoverflow.com/comment/42137624
has title: How to get selected option element attr in jQuery?

http://stackoverflow.com/comment/41964101
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26681907
type: Comment
has text: I understand that. actually i wanted to do it all in one php file without redirects since i was not getting a desirable answer i asked for an alternative solution with two php files that you gave. i edited the question asking for an alternative solution because i am not getting a proper solution to reload the same page by just changing the variable based on the new url entered in the textbox.

http://stackoverflow.com/q/26700413
answer count: 0
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
score: 1
tagged with: node.js
favorite count: 0
has title: Can't run tasks in Grunt - Task not found| Uncss library
type: Question
tagged with: npm
upvote count: 1
has comment: http://stackoverflow.com/comment/41994769
has body: I've decided to optimize my CSS files. Found the library called UNCSS it runs with Grunt. The problem is that I haven't worked with command line but I've minimal knowledge level. I'm running Windows 7 X64 and I've installed git for Windows. It integrates with windows command line well. So my workflow is: 1). Install Grunt with Windows installer 2). Navigate with command prompt to my project folder 3). I ran these commands: npm install grunt --save-dev npm install grunt-uncss --save-dev 4). The project folder contains these folders: node_modules-&gt;grunt node_modules-&gt;grunt-uncss I've created the Gruntfile.js file inside project's root folder: module.exports = function(grunt) { grunt.initConfig({ uncss: { dist: { files: { 'css/style.css': ['index.html'] } } } }); grunt.loadNpmTasks('grunt-uncss'); //grunt.registerTask('default', 'uncss'); grunt.registerTask('default', ['uncss']); }; 5). Running the grunt or grunt uncss command throws the Warning: Task "default\uncss" not found. Use --force to continue. The only thing which I need is to scan and optimize my projects and make it simple... I can't figure out what I'm doing wrong. Searched for tutorials but they are the same...
tagged with: gruntjs

http://stackoverflow.com/comment/42053668
type: QuestionComment
comment on: http://stackoverflow.com/q/26733356
score: 0
has text: @RahilWazir doesn't work.
type: Comment

http://stackoverflow.com/q/26734047
tagged with: node.js
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26734658
has body: I want to save an image with node.js and the request library. So far I have this simple code: var request = require('request'); var fs = require('fs'); request('http://upload.wikimedia.org/wikipedia/commons/8/8c/JPEG_example_JPG_RIP_025.jpg', function(error, response, body) { // further logic that decides // whether or not the image will be saved fs.writeFile('downloaded.jpg', body, function(){}); }); But it doesn't work. The image always arrives corrupt. I assume it's an encoding error but I cannot figure out how to fix this.
has answer: http://stackoverflow.com/a/26734658
score: 12
type: Question
upvote count: 12
has title: Cannot save a remote image with node.js and request
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26737095
has answer: http://stackoverflow.com/a/39964283
answer count: 3
accepted answer: http://stackoverflow.com/a/26737095
favorite count: 0
tagged with: request

http://stackoverflow.com/comment/119710240
type: Comment
has text: Please dont just paste the code, explain the code as well.
comment on: http://stackoverflow.com/a/67723455
type: AnswerComment
score: 0

http://stackoverflow.com/a/26760721
has body: Following your intuition to use _.groupBy, var data = [ {ID:2570,name:"jim",latitude:59.4,longitude:-7.29}, {ID:2573,name:"joe",latitude:54.4,longitude:-7.36}, {ID:2573,name:"joe",latitude:54.3,longitude:-7.37}, {ID:2574,name:"bob",latitude:58.4,longitude:-7.31}, {ID:2574,name:"bob",latitude:58.6,longitude:-7.38}, {ID:2574,name:"bob",latitude:58.8,longitude:-7.39}, {ID:2575,name:"mary",latitude:54.1,longitude:-7.30}, ]; var groups = _.groupBy(data, function(locationObject) { return locationObject.ID; }); var result = _.map(groups, function(group) { var condensed = {ID: group[0].ID, name: group[0].name}; condensed.locs = _.map(group, function(row) { return [row.latitude, row.longitude]; }); return condensed; }); document.getElementById('log').innerHTML = JSON.stringify(result, null, ' '); &lt;script src="http://underscorejs.org/underscore-min.js"&gt;&lt;/script&gt; &lt;pre id="log"&gt;&lt;/pre&gt;
accepted answer of: http://stackoverflow.com/q/26758191
type: Answer
answers question: http://stackoverflow.com/q/26758191
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/42219270
comment on: http://stackoverflow.com/a/26825212
score: 0
type: Comment
has text: Thank you for help. No syntax error this time, but the function still doesn't work. :(
type: AnswerComment

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/26737270
tags question: http://stackoverflow.com/q/26730382
tags question: http://stackoverflow.com/q/26735645
tags question: http://stackoverflow.com/q/26736423
tags question: http://stackoverflow.com/q/26741866
tags question: http://stackoverflow.com/q/26740802
type: Tag

http://stackoverflow.com/a/46273674
score: 0
has body: I have met the same problem, now you can do it like this: $location.search().id
type: Answer
answers question: http://stackoverflow.com/q/26701798

http://stackoverflow.com/comment/42150858
type: Comment
type: QuestionComment
has text: actually, mongodb allows me to store a function expression (stringified I think). But how do I execute it in my code?
comment on: http://stackoverflow.com/q/26786969
score: 0

http://stackoverflow.com/comment/42162074
has text: First, your form is loading by ajax, So, you should put your code "$('#formSubmit').ajaxForm();" inside "LoadAjaxContent" function on ajax success event. This will attach ajax submit event to ajax loaded content. And also try jquery noConflict [http://api.jquery.com/jQuery.noConflict/]. And use "jQurey" instead of "$"
comment on: http://stackoverflow.com/a/26718049
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26737096
tagged with: javascript
favorite count: 0
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
has body: I have an exercise that i have to use getJSON method to display the information from http://headers.jsontest.com/ on a html page! Below is my code of js. . and i dont know how to fix this . . $(document).ready(function() { $('#id-a a').click(function() { var url = "http://headers.jsontest.com/"; $.getJSON(url, function(data) { $('#content').empty(); $.each(data, function(entryIndex, entry) { var html = ' '; html += ' ' + entry['Accept-Language'] + ' '; html += ' ' + entry['Host'] + ' '; html += ' '+ entry['User-Agent'] + ' '; html += ' '+ entry['Accept'] + ' '; html += ' '; html += ' '; $('#content').append(html); }); }); return false; }); }) Help me out! Thanks!
score: -3
downvote count: 3
has answer: http://stackoverflow.com/a/26737359
type: Question
type: AnsweredQuestion
has title: How can i fix this getJSON method()?
accepted answer: http://stackoverflow.com/a/26737359
upvote count: 0
answer count: 1

http://stackoverflow.com/comment/42148256
comment on: http://stackoverflow.com/q/26781577
type: Comment
has text: I thought long polling was used to make requests from the browser, here's [an example blog post](http://techoctave.com/c7/posts/60-simple-long-polling-example-with-javascript-and-jquery), are you trying to do this on the server side, I wonder why the question is downvoted.
score: 0
type: QuestionComment

http://stackoverflow.com/q/26741123
tagged with: cordova
answer count: 0
score: 1
has title: Cordova statusbar error - Deprecated attempt to access property 'userAgent' on IOS
upvote count: 1
has comment: http://stackoverflow.com/comment/42954065
type: Question
tagged with: ios
tagged with: javascript
has body: I'm getting a Cordova statusbar javascript error after I build an IOS project. I created a simple test that produces the error. Steps followed: 1) Create a new project with cordova create. 2) Add the ios platform with cordova platform add ios 3) Add the statusbar plugin with cordova plugin add org.apache.cordova.statusbar 4) Run the emulator with cordova emulate ios 5) See the error in the Safari dev tools console. Deprecated attempt to access property 'userAgent' on a non-Navigator object. #statusbar.js:99 Does anyone know how to fix this error? My computer is a mac and I'm using these versions. cordova --version 4.0.0 cordova platform Installed platforms: ios 3.6.3 cordova plugins org.apache.cordova.statusbar 0.1.8 "StatusBar"
tagged with: iphone
downvote count: 0
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/26717471
type: AcceptedAnswer
downvote count: 0
has body: Since you wrote both apps, it's pretty simple by using External Messaging: In app1 background script: var app2id = "abcdefghijklmnoabcdefhijklmnoab2"; chrome.runtime.onMessageExternal.addListener( // This should fire even if the app is not running, as long as it is // included in the event page (background script) function(request, sender, sendResponse) { if(sender.id == app2id &amp;&amp; request.areYouThere) sendResponse(true); } ); Somewhere in app2: var app1id = "abcdefghijklmnoabcdefhijklmnoab1"; chrome.runtime.sendMessage(app1id, {areYouThere: true}, function(response) { if(response) { // Installed and responded } else { // Could not connect; not installed } } );
has comment: http://stackoverflow.com/comment/42025388
type: Answer
accepted answer of: http://stackoverflow.com/q/26717336
answers question: http://stackoverflow.com/q/26717336
score: 6
has comment: http://stackoverflow.com/comment/42025906
upvote count: 6
has comment: http://stackoverflow.com/comment/42025178
has comment: http://stackoverflow.com/comment/42025382

http://stackoverflow.com/comment/41954254
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26677245
has text: @PawełFus Thanks for the link but I think I have that covered. I have the common options stored already but some charts need blue line, others need red line. Some charts need xlabel to be bold, some italic. Some charts need `3px` for `xAxis plot lines width`, some need it `1px`, etc. I end up writing all these options into an object for every chart.

http://stackoverflow.com/a/26762964
accepted answer of: http://stackoverflow.com/q/26762776
type: Answer
score: 1
has body: You could wrap both of those divs in a single "draggable" block. This keeps the two content divs seperate which will allow you to use them in code as you see fit, however the wrapper "draggable" div ensures they are moved together. 1900 1980 1990 2000 2010 2020 This text needs to drag with the timeline JSFiddle
has comment: http://stackoverflow.com/comment/42170776
upvote count: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26762776

http://stackoverflow.com/q/26766883
has title: Can't get iframe element passed to Angular controller from directive
tagged with: http://stackoverflow.com/tag/html
has body: I have an iframe that has an ng-src attribute on it, and I change it frequently. Each time that the iframe's src changes, I want to execute a function in my controller AFTER the iframe is fully loaded. Additionaly, I want to have the iframe DOM element passed into the function. Right now I'm using a directive from this StackOverflow post. The callback fires when the iframe is loaded, and the function in my controller executes; but I can't get the iframe DOM element passed in as a parameter. Here is a demo Plunkr THE HTML My Content Up Here Load iFrame Src THE Javascript (function() { angular.module('app', []) .controller('home', home) .directive('iframeOnload', iframeOnload); function home() { var vm = this; vm.currentIframeSource = ''; vm.setIframeSource = setIframeSource; vm.onIframeLoad = onIframeLoad; function onIframeLoad(element) { console.log(element); } function setIframeSource() { if (vm.currentIframeSource === '' || vm.currentIframeSource === 'iframe2.html') vm.currentIframeSource = 'iframe.html'; else vm.currentIframeSource = 'iframe2.html'; } } function iframeOnload() { var directive = { scope: { callBack: '&iframeOnload' }, restrict: 'A', link: function(scope, element, attrs) { element.on('load', function() { return scope.callBack(element); }); } }; return directive; } })(); I've tried using $event and passing in this as a parameter to the onIframeLoad function in my HTML, but I can never get a reference to the iframe DOM element. Thoughts?
upvote count: 3
linked to: http://stackoverflow.com/q/164085
tagged with: iframe
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26770232
score: 3
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: callback
favorite count: 0
linked to: http://stackoverflow.com/q/15882326
tagged with: angularjs
has answer: http://stackoverflow.com/a/26770232

http://stackoverflow.com/comment/42037317
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26723799
has text: Guys, I've added PHP part and fix missing ". Thanks for your warning.

http://stackoverflow.com/q/26743857
answer count: 2
tagged with: javascript
tagged with: dom-events
score: 0
accepted answer: http://stackoverflow.com/a/26744435
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26744490
has answer: http://stackoverflow.com/a/26744490
tagged with: object
type: AnsweredQuestion
tagged with: onclick
has body: I am making an animation with Javascript. It is a ball that has a set speed and travels around inside a box. The animation works, and I have a button that increases the speed of the animations. I want to make a new button that creates a new ball when I click on it. My Javascript code is the following: var canvas = document.getElementById("canvas"); ctx = canvas.getContext("2d"); var fart = document.getElementById("fart") var ny = document.getElementById("ny") var circle = { x:40, y:50, r:40, } var dx=5; var dy=5; var color = ["green", "blue", "yellow", "red", "orange", "pink"] fart.onclick = function circleto (x,y,r) { circle.x += 0; ctx.clearRect(0, 0, canvas.width, canvas.height) ctx.beginPath(); ctx.arc(circle.x, circle.y, circle.r, 0, 2*Math.PI); ctx.closePath(); ctx.fillStyle = color[Math.floor(Math.random()*color.length)]; ctx.fill(); requestAnimationFrame(circleto); if( circle.x<0+circle.r || circle.x>canvas.width-circle.r) dx=-dx; if( circle.y<0 + circle.r || circle.y>canvas.height-circle.r) dy=-dy; circle.x+=dx; circle.y+=dy; } This is my HTML code: øk hastigheten ny ball
has answer: http://stackoverflow.com/a/26744435
has title: Create a new object on button click
type: Question

http://stackoverflow.com/q/26776812
tagged with: angularjs
type: Question
score: 0
has comment: http://stackoverflow.com/comment/42134922
has title: Angular 1.3: How to return response asynchronously?
has body: My service calls a REST endpoint, but the response is never returned, the app shows always "...". The service: myServices.factory('myService', ['$resource', function($resource){ return {version: function getVersion() { var data="..."; var restCall = $resource('http://localhost/api/version', {}, {method:"GET", params: {}, isArray: true}).query(); restCall.$promise.then(function(response){data=response;}); return data; } } }]); In the controller: $scope.version = myService.version(); I know I could state return $resource([...]);, but I would like to alter the response in the service itself before returning it to the controller. How could I do that?
has comment: http://stackoverflow.com/comment/42134085
has comment: http://stackoverflow.com/comment/42132209
has comment: http://stackoverflow.com/comment/42133119
answer count: 0
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/a/28244781
score: 0
type: AcceptedAnswer
has body: After updating to chrome 40 I haven't seen the issue come up. I'm assuming it was caused by one of the memory corruption or webaudio bugs that was fixed (http://googlechromereleases.blogspot.com/2015/01/stable-update.html)
type: Answer
accepted answer of: http://stackoverflow.com/q/26793578
answers question: http://stackoverflow.com/q/26793578

http://stackoverflow.com/q/26791903
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
type: Question
tagged with: fullscreen
has title: HTML5 Fullscreen support for a specific webpage consisting only text
has comment: http://stackoverflow.com/comment/42160700
tagged with: javascript
score: 0
has body: I am a new intern in an organization. My lead has assigned me with a task to add the full screen functionality to a specific webpage in our website. I have been provided with the whole source code of our website. I am newbie to HTML 5. However I did a bit of research on Internet and found out a bit of code for supporting this functionality. Now, the biggest problem for me is how to integrate this code into our source code and where to integrate the code. I have got 3 files with me. 1.index.html HTML5 Fullscreen Live Demo <script type="text/javascript" HTML5 Fullscreen Basic Demo View Fullscreen Look a special image! 2.jquery.fullscreen.js // These helper functions available only to our plugin scope. function supportFullScreen(){ var doc = document.documentElement; return ('requestFullscreen' in doc) || ('mozRequestFullScreen' in doc && document.mozFullScreenEnabled) || ('webkitRequestFullScreen' in doc); } function requestFullScreen(elem){ if (elem.requestFullscreen) { elem.requestFullscreen(); } else if (elem.mozRequestFullScreen) { elem.mozRequestFullScreen(); } else if (elem.webkitRequestFullScreen) { elem.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); } } function fullScreenStatus(){ return document.fullscreen || document.mozFullScreen || document.webkitIsFullScreen || false; } function cancelFullScreen(){ if (document.exitFullscreen) { document.exitFullscreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } } function onFullScreenEvent(callback){ $(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange", function(){ // The full screen status is automatically // passed to our callback as an argument. callback(fullScreenStatus()); }); } // Adding a new test to the jQuery support object $.support.fullscreen = supportFullScreen(); // Creating the plugin $.fn.fullScreen = function(props){ if(!$.support.fullscreen || this.length !…
has comment: http://stackoverflow.com/comment/42160885

http://stackoverflow.com/q/26680062
answer count: 0
upvote count: 3
type: UnansweredQuestion
tagged with: windows-phone-8
linked to: http://stackoverflow.com/q/18454810
tagged with: javascript
type: Question
tagged with: runtime-error
score: 3
downvote count: 0
tagged with: jquery
favorite count: 0
has title: Cordova jQuery WP 8 - Blocking Excedpion
has body: I would like to deploy an app on WP8 with cordova. I created the enviroment using cordova platform add windowsbut when I tried to deploy my app on the emulator I got this error: 0x800c001c - JavaScript runtime error: Unable to add dynamic content. A script attempted to inject dynamic content, or elements previously modified dynamically, ... In this answer Windows 8 Phonegap Application JQuery Mobile Security Exception I've read that: WinJS security model won't allow the JQuery dom manipulation when you create elements from strings e.g. using the .html() method. But the only method I'm using from jQuery is toggleClass(); I read the issue was fixed in jQuery 2.0, but I'm using 2.1.1... Any suggestion on how to fix?
tagged with: cordova

http://stackoverflow.com/a/26794749
upvote count: 2
answers question: http://stackoverflow.com/q/26794571
accepted answer of: http://stackoverflow.com/q/26794571
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: I am not sure about your exact scenario but you can very well do $http.get('data/userData.json').success (function(data){ var city='bangalore'; //can be set anywhere $scope.users = data.filter(function(item){return item.city===city;}); var usersDb = TAFFY(); usersDb.insert($scope.users); }); Array.filter works on all modern browsers (ie 9 and above) Else implement an Angular filter and use it the controller using $filter service:
score: 2

http://stackoverflow.com/comment/42043290
type: Comment
comment on: http://stackoverflow.com/a/26695834
has text: apologies, i actually moved on with my original jquery for a couple days because the style property wasn't accessible _(see chris-l's explanation above)_
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42187881
type: QuestionComment
has text: @RafaelBaptista Sometimes SO no more really makes sense... http://stackoverflow.com/questions/8685978/heuristically-figuring-out-whether-im-running-ipad1-or-ipad2
comment on: http://stackoverflow.com/q/26807063
score: 1
type: Comment

http://stackoverflow.com/a/26801030
accepted answer of: http://stackoverflow.com/q/26800859
has body: If I got it right then maybe you want to scroll inside the divs. Here's the example : http://jsfiddle.net/fxj4jonx/1/ The basic code : $("#your_div_to_scroll_into").animate({scrollTop:[scroll amount]},[scroll time]); $("#sDiv1").click(function(){ $("#div1").animate({ scrollTop: 1000 }, 3000); }); $("#sDiv2").click(function(){ $("#div2").animate({ scrollTop: 500 }, 1000); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="button" value="Scroll Div1" id="sDiv1"/&gt; &lt;input type="button" value="Scroll Div2" id="sDiv2"/&gt; &lt;br/&gt; &lt;hr/&gt; Div 1 &lt;div id='div1' style='height:100px; overflow:scroll; width:200px;align:left;'&gt; text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/&gt;text&lt;br/…
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26800859

http://stackoverflow.com/comment/42204380
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26816937
type: Comment
has text: Thx @mark91 , I will try that later, but just curious why is that affecting the connection to MySQL, is it really a nodejs problem instead of docker's

http://stackoverflow.com/a/26790583
has body: [{"title":"First Item","href":"first","children":[{"title":"Sub First Item","href":"sub"}]},{"title":"Second Item","href":"home"}] This is not JSON, this is an array of objects. You don't need to parse this. It's already parsed. It's a javascript object. You should be able to just parse it like you would a regular object. data[0].title data[0].children[1].title etc.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26790258
has comment: http://stackoverflow.com/comment/42157355
has comment: http://stackoverflow.com/comment/42157417

http://stackoverflow.com/comment/42023306
has text: @ OP - Are you sure there is no extra code involved with this? I cannot reproduce this issue in any browser.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26716242

http://stackoverflow.com/comment/42059885
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26736540
has text: @KursadGulseven It can but usually, one knows the context its being used. In this case, its being called outside of angular which is safe. If the case was that it might be called inside of angular world sometimes and sometimes not, then timeout might be a better bet.

http://stackoverflow.com/a/26774758
answers question: http://stackoverflow.com/q/26774722
upvote count: 1
downvote count: 0
has body: No, in modern browsers it is not possible (Firefox, Chrome, IE>6). Here how google realize it - http://www.google.com/homepage/hp-chrome.html
score: 1
type: Answer

http://stackoverflow.com/comment/42111550
has text: @Pointy looking at the Chromium source https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/frame/DOMTimer.cpp&sq=package:chromium&type=cs&l=104&rcl=1415147671 it definitely shows timeouts less than 4ms being coerced to 4ms, but there's a demonstrable difference in behaviour (in Chrome desktop current) when calling from JS with a timeout of 2 or more vs. a shorter value. This suggests to me that there's some other code at play, though I can't find it in the Chromium source.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26764626

http://stackoverflow.com/q/26777518
possible better answer: http://stackoverflow.com/a/26777597
favorite count: 0
tagged with: angularjs
has body: I write angularjs application and have this block of code but just first html-bind-html works for me When i change the priority like this : It shows newsDetail value. How many ng-bind-html per page can i declare? why second value doesn't show?
accepted answer: http://stackoverflow.com/a/26777745
has comment: http://stackoverflow.com/comment/42133354
tagged with: bind
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26777762
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26777745
tagged with: javascript
has comment: http://stackoverflow.com/comment/42150657
has answer: http://stackoverflow.com/a/26777597
has title: just one of the ng-bind-html in page work
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/42172213

http://stackoverflow.com/a/78591514
has body: export const printPdf = (() => { const isFirefox = /Gecko\/\d/.test(navigator.userAgent); const isAndroid = /Android/.test(navigator.userAgent); const firefoxDelay = 1000; let iframe; return function (url) { if (iframe) { iframe.parentNode.removeChild(iframe); } iframe = document.createElement("iframe"); iframe.style.cssText = "width: 1px; height: 100px; position: fixed; left: 0; top: 0; opacity: 0; border-width: 0; margin: 0; padding: 0"; const xhr = new XMLHttpRequest(); try { xhr.responseType = "arraybuffer"; } catch (e) { window.open(url, "_blank"); return; } xhr.addEventListener("load", function () { if (xhr.status === 200 || xhr.status === 201) { const pdfBlob = new Blob([xhr.response], { type: "application/pdf" }); const iframeUrl = URL.createObjectURL(pdfBlob); iframe.src = iframeUrl; iframe.addEventListener("load", function () { const openPrintPreview = () => { try { iframe.focus(); iframe.contentWindow.print(); } catch (error) { console.error("Print preview failed: " + error, error); } finally { URL.revokeObjectURL(iframeUrl); } }; if (isFirefox) { window.setTimeout(openPrintPreview, firefoxDelay); } else if (isAndroid) { const newWindow = window.open("", "_blank"); if (newWindow) { newWindow.document.write(` Print PDF Print `); newWindow.document.close(); } else { alert("Please allow popups for this website"); } } else { openPrintPreview(); } }); document.body.appendChild(iframe); } }); xhr.open("GET", url, true); xhr.send(); }; })(); This is the complete function code, compatible with both PC and mobile devices, and all browsers.
type: Answer
upvote count: 0
has comment: http://stackoverflow.com/comment/138562259
answers question: http://stackoverflow.com/q/26684190
score: -1
downvote count: 1

http://stackoverflow.com/q/26822840
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42215029
has comment: http://stackoverflow.com/comment/42214866
type: Question
has comment: http://stackoverflow.com/comment/42214942
upvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26831925
answer count: 3
has comment: http://stackoverflow.com/comment/42214914
has title: Why is my code not passing to my div?
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to create a gameserver query for my website, and I want it to load the content, save it, and echo it later. However, it doesn't seem to be echoing. It selects the element by ID and is supposed to echo the content of the VAR. Here's my HTML code: &lt;center&gt;&lt;div id="cstrike-map"&gt;&lt;i class="fa fa-refresh fa-spin"&gt;&lt;/i&gt;&amp;nbsp;&amp;nbsp;&lt;b&gt;Please wait ...&lt;/b&gt;&lt;br /&gt;&lt;/div&gt; JavaScript: &lt;script type="text/javascript"&gt; var map = ""; var hostname = ""; var game = ""; var players = ""; $.post( "serverstats-cstrike/cstrike.php", { func: "getStats" }, function( data ) { map = ( data.map ); hostname = ( data.hostname ); game = ( data.game ); players = ( data.players ); }, "json"); function echoMap(){ document.getElementByID("cstrike-map"); document.write("&lt;h5&gt;Map: " + map + "&lt;/h5&gt;"); } &lt;/script&gt; PHP files: query.php /* SOURCE ENGINE QUERY FUNCTION, requires the server ip:port */ function source_query($ip) { $cut = explode(":", $ip); $HL2_address = $cut[0]; $HL2_port = $cut[1]; $HL2_command = "\377\377\377\377TSource Engine Query\0"; $HL2_socket = fsockopen("udp://".$HL2_address, $HL2_port, $errno, $errstr,3); fwrite($HL2_socket, $HL2_command); $JunkHead = fread($HL2_socket,4); $CheckStatus = socket_get_status($HL2_socket); if($CheckStatus["unread_bytes"] == 0) { return 0; } $do = 1; while($do) { $str = fread($HL2_socket,1); $HL2_stats.= $str; $status = socket_get_status($HL2_socket); if($status["unread_bytes"] == 0) { $do = 0; } } fclose($HL2_socket); $x = 0; while ($x &lt;= strlen($HL2_stats)) { $x++; $result.= substr($HL2_stats, $x, 1); } $result = urlencode($result); // the output return $result; } /* FORMAT SOURCE ENGINE QUERY (assumes the query's results were urlencode()'ed!) */ function format_source_query($string) { $string = str_replace('%07','',$string); $string = str_replace("%00","|||",$string); $sinfo = urldecode($string); $sinfo = explode('|||',$sinfo); $info['hostname'] = $sinfo[0]; $in…
favorite count: 0
score: -1
has answer: http://stackoverflow.com/a/26822955
has comment: http://stackoverflow.com/comment/42215002
possible better answer: http://stackoverflow.com/a/26822929
tagged with: php
accepted answer: http://stackoverflow.com/a/26831925
downvote count: 1
has answer: http://stackoverflow.com/a/26822929

http://stackoverflow.com/a/26677478
has comment: http://stackoverflow.com/comment/41954245
type: Answer
has comment: http://stackoverflow.com/comment/41954154
has body: I think you had a number of problems in your fragment. I have modified the code and here is a new jsFiddle that now seems to work. Because there were so many things I changed, I can't list them here but if you compare the new code to your existing code, hopefully it should become clear. jsFiddle Probably the biggest change was the way that the functions were invoked: &lt;a onclick="execFunction2();"&gt;
answers question: http://stackoverflow.com/q/26677165
has comment: http://stackoverflow.com/comment/41954346
accepted answer of: http://stackoverflow.com/q/26677165
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41954011
score: 0

http://stackoverflow.com/q/26749543
tagged with: performance
has comment: http://stackoverflow.com/comment/42092416
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/29498302
has body: I have installed JCH optimize plugin in Joomla-3 OS property base website to Minify CSS and javascript. I have activated only Minify CSS and Minify Javascript options, please see the attached file (ss I need these two options to improve in Google PageSpeed Insights) But I don't see any improvement in Google PageSpeed Insights after Minifying CSS and JS. If I activate 'Combine CSS Files' and 'Combine JavaScript Files', it's working fine, but the template has broken format and highlighted text.
tagged with: minify
tagged with: css
tagged with: joomla
has answer: http://stackoverflow.com/a/26759430
type: UnansweredQuestion
type: Question
has title: Minify CSS and JS files with JCH optimizer for Joomla

http://stackoverflow.com/q/26708748
tagged with: winjs
tagged with: javascript
tagged with: windows-runtime
score: 0
answer count: 1
has body: Im trying to create a function for app idle timeout. I registered all touch events using Gesture object. Doing these static events are fired. But zoom, pinch and cursor move are not fired. Any sussestions? var count = 0; var max = 15; var myGesture = new MSGesture(); myGesture.target = document.body; document.body.addEventListener("pointerdown", function (evt) { // adds the current mouse, pen, or touch contact for gesture recognition myGesture.addPointer(evt.pointerId); }); document.body.addEventListener("MSGestureStart", eventListener, false); document.body.addEventListener("MSGestureEnd", eventListener, false); document.body.addEventListener("MSGestureChange", eventListener, false); document.body.addEventListener("MSInertiaStart", eventListener, false); document.body.addEventListener("MSGestureTap", eventListener, false); document.body.addEventListener("MSGestureHold", eventListener, false); setTimer(); function setTimer() { if (count == max) window.close(); else { count = count + 1; t = setTimeout(setTimer, 1000); } } function eventListener(evt) { clearTimeout(t); count = 0; setTimer(); } }
type: UnansweredQuestion
tagged with: windows-store-apps
has answer: http://stackoverflow.com/a/26750065
has title: Zoom and pinch events not fired in Desktop using javascript
tagged with: windows-phone-8
type: Question

http://stackoverflow.com/comment/42064283
has text: Thank you Martin. As soon as possible i try your suggestions.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26733981

http://stackoverflow.com/a/26682520
answers question: http://stackoverflow.com/q/26682163
score: 1
has body: Ok, I've got a streaming example for you. You need to adapt it to your needs, of course. Suppose you make a php file on your server named mws.php with this content: if (isset($_GET['image'])) { header('Content-type: image/jpeg'); header('Content-transfer-encoding: binary'); echo file_get_contents($_GET['image']); } Look for any image on the web, for instance: http://freebigpictures.com/wp-content/uploads/2009/09/mountain-stream.jpg now you can show that image, as if it was located on your own secure server with this url: https://&lt;your server&gt;/mws.php?image=http://freebigpictures.com/wp-content/uploads/2009/09/mountain-stream.jpg It would of course be better to store the image locally if you need it more than once, and you have to include the correct code to get it from Amazon MWS ListMatchingProducts, but this is the basic idea. Please don't forget to secure your script against abuse.
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42223698
type: Comment
comment on: http://stackoverflow.com/a/26827711
has text: I know that but the column's quantity is not predicatedable for making a lot of them and make them unvisible for late uses.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41999666
comment on: http://stackoverflow.com/q/26703079
has text: Then it seems that no element is being located with `$(this).find('.propsect_td');`. Your `typeof obj != "undefined"` test is useless because it'll always be `true`. Do `if (obj.length)` instead.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42132564
comment on: http://stackoverflow.com/q/26777066
type: Comment
type: QuestionComment
has text: possible duplicate of [webkit-transition height for a div with a dynamic changing height based on content?](http://stackoverflow.com/questions/6588510/webkit-transition-height-for-a-div-with-a-dynamic-changing-height-based-on-conte)
score: 0

http://stackoverflow.com/comment/41985660
score: 0
type: Comment
has text: Yeah, so i understand what you're doing but my question is how would i write the addClass method.
type: AnswerComment
comment on: http://stackoverflow.com/a/26695306

http://stackoverflow.com/comment/42215549
comment on: http://stackoverflow.com/q/26811488
score: 0
type: Comment
type: QuestionComment
has text: meteor/meteor probably

http://stackoverflow.com/comment/42022495
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26716077
has text: Didn't even think of using objects, but at least now I know. Thank you!

http://stackoverflow.com/comment/42019488
has text: model employee.status is populated with data that is fetched from db using service and $resorce
score: 0
comment on: http://stackoverflow.com/q/26714493
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42211713
score: 0
type: AnswerComment
has text: I've read the edits, but I don't know how they make my answer worth revising, sorry.
comment on: http://stackoverflow.com/a/26821029
type: Comment

http://stackoverflow.com/comment/42182458
type: AnswerComment
comment on: http://stackoverflow.com/a/26804615
type: Comment
has text: yep i was just going to edit it then saw someone else had already posted the same with parseInt so figured would leave it as another option
score: 0

http://stackoverflow.com/comment/42037250
comment on: http://stackoverflow.com/q/26723799
has text: Either `$fields` is missing it, or your copy/paste is missing the closing `"` for `message` under the `field_1_confirm` option.
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/comment/42148936
score: 0
type: Comment
type: QuestionComment
has text: explain with an example plz
comment on: http://stackoverflow.com/q/26786045

http://stackoverflow.com/q/26776537
linked to: http://stackoverflow.com/q/23276481
type: Question
has title: Twitter Bootstrap Carousel - How to implement a continuous slow scroll?
score: -1
has comment: http://stackoverflow.com/comment/42131637
has body: I am using Twitter Bootstrap 3 and have got a carousel working of 8 images. It shows 4, then jumps to the next 4. At the moment, one must use the left and right arrow buttons (or wait a few moments) for the carousel to change. How can I make it so there is a continuous, slow scroll through the items in the carousel? I don't want it to jump from set of 4 to the next, I want a continuous scroll.
has answer: http://stackoverflow.com/a/26777990
has comment: http://stackoverflow.com/comment/42131596
answer count: 1
tagged with: javascript
favorite count: 0
upvote count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
downvote count: 4
tagged with: twitter-bootstrap-3
tagged with: twitter-bootstrap
type: UnansweredQuestion

http://stackoverflow.com/comment/42177097
type: AnswerComment
type: Comment
has text: Thank you so much! It worked, I will remember this in the future. Keeping it in the my notes, thanks again.
score: 0
comment on: http://stackoverflow.com/a/26801595

http://stackoverflow.com/comment/42210367
has text: When you scroll horizontally, would the whole page move, or only the big SVG?
type: QuestionComment
comment on: http://stackoverflow.com/q/26820263
type: Comment
score: 0

http://stackoverflow.com/comment/41967048
type: QuestionComment
comment on: http://stackoverflow.com/q/26684390
has text: Please define "objects" in your context. This question isn't as clear as you think it is.
score: 0
type: Comment

http://stackoverflow.com/comment/42036017
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26722938
score: 1
has text: @Yani Honestly, unless you're accessing that variable 1000s or maybe even millions of times per second it won't really matter. You should optimize for readable and reduction of bugs first.

http://stackoverflow.com/a/26724645
answers question: http://stackoverflow.com/q/26724504
score: 0
type: Answer
has body: Instead "-" upper signal document.getElementById("box").style.backgroundColor = "blue";

http://stackoverflow.com/comment/42184606
score: 0
comment on: http://stackoverflow.com/q/26805652
type: QuestionComment
has text: The legend normally contains static text. You are trying to use a point value. Which point do you want to use ? Are you trying to change the legend depending on which point you are hovering over ?
type: Comment

http://stackoverflow.com/a/29428345
answers question: http://stackoverflow.com/q/26710775
has body: Because it is not supported. See http://caniuse.com/#search=download
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26710775
score: 1
upvote count: 1

http://stackoverflow.com/q/26782917
has answer: http://stackoverflow.com/a/33608664
has answer: http://stackoverflow.com/a/40689848
has answer: http://stackoverflow.com/a/36794796
tagged with: date
upvote count: 34
has body: Using AngularJS I am trying to display a date using an input type=date: &lt;input ng-model="campaign.date_start" type="date"&gt; However, this gives the following error: Error: error:datefmt Model is not a date object The date actually comes from a JSON API in the following format: date_start": "2014-11-19" I thought that I could resolve it by using a filter, but this did not work and I get the same error with: &lt;input ng-model="campaign.date_start | date" type="date"&gt; I have also tried converting the string to a date, but again I get the same error: $scope.campaign.date_start = Date(campaign.date_start); What else can I try?
has answer: http://stackoverflow.com/a/45510685
has title: Model is not a date object on input in AngularJS
has answer: http://stackoverflow.com/a/28738060
has comment: http://stackoverflow.com/comment/42143191
answer count: 7
tagged with: javascript
has answer: http://stackoverflow.com/a/27666804
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26783101
accepted answer: http://stackoverflow.com/a/26783101
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/56431886
score: 34
possible better answer: http://stackoverflow.com/a/27666804
type: Question

http://stackoverflow.com/comment/42019764
has text: @user3594463 you should learn to inspect the variables using the console, you will then get a better idea why its working, why it doesn't, generally you need to play around.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26714036
score: 0

http://stackoverflow.com/q/26693533
favorite count: 0
score: -3
tagged with: php
has answer: http://stackoverflow.com/a/26693650
type: AnsweredQuestion
downvote count: 3
has comment: http://stackoverflow.com/comment/41982573
has body: basically I want this to be replicated when the add button (last div) is clicked, but add on a _1 to the name also Size {{ Form::select('size', $sizes, null, ['class' => 'form-control'])}} Colour {{ Form::select('colour', $colours, null, ['class' => 'form-control'])}} Stock Add That whole form-group I want to show again when the add button is clicked, adding a underscore and a number to the name also to stop duplicate entries. So something using jQuery I think should do this, but been a jQuery newbie I'm not sure what to write. So on the click of the add button it needs to show the whole form-group div again underneath the one already there, but also add to the name attribute a underscore and a number to stop duplicate entries when I save to a DB.
type: Question
tagged with: laravel-4
upvote count: 0
accepted answer: http://stackoverflow.com/a/26693650
tagged with: javascript
tagged with: jquery
has title: Adding extra line with JS
answer count: 1
has comment: http://stackoverflow.com/comment/41982656

http://stackoverflow.com/comment/42213006
type: Comment
comment on: http://stackoverflow.com/a/26821593
type: AnswerComment
has text: awesome, how can I pass the `data-href="#/speakers/{{speaker.id}}"` basically the url to myFunc(url) function, the links would be like #/speakers/1, #/speakers/2, #/speakers/3 etc. or what's the best way this works in angular world, I'm forced to use `window.location=url` for some reason in the code
score: 0

http://stackoverflow.com/comment/42002637
type: QuestionComment
comment on: http://stackoverflow.com/q/26702499
has text: How does it make no sense? It's taken directly from MaxMind's sample: http://dev.maxmind.com/geoip/geoip2/javascript/tutorial/#Redirect_Users_to_a_Country-Specific_Site - the only difference is I needed it to redirect to one site, not multiple sites.
score: 0
type: Comment

http://stackoverflow.com/q/26750671
score: 0
has body: I am Developing a web application which consists of Datagrid nested with another datagrid. In Parent Grid i have a Check box in the header template and in the child grid have another check box in the item template. Functionality is: 1.If i click on the parent check box all items in the child grid should be get checked and vice versa. 2. I have amount column in the child grid , i need the sum of checked row's amount to be displayed in the textbox. For EG: in my child grid i have 3 column with the amount field value as 100,200,300. If i click on Chkheader( parent grid header) then all child grid should get selected and in the textbox box it should display as (100+200+300)600. If i manuly uncheck the last row in the child grid then in text box it should dispaly as (100+200)300. here is my code: <asp:DataGrid ID="dgcostOrigin" runat="server" BorderWidth="1px" BorderColor="#FE9B00"> <asp:TemplateColumn> <asp:CheckBox ID="chkHeader" runat="server" /> </asp:TemplateColumn> <asp:TemplateColumn> <asp:PlaceHolder ID="VoucherDetailsChargeId" runat="server" Visible="False"> <asp:DataGrid ID="dg_VoucherChargeDetails" runat="server" DataSource='<%#GetCFSDetailsO( (String) DataBinder.Eval(Container.DataItem, "Name") ) %>'> <asp:BoundColumn DataField="ID" HeaderText="mFRL_NUPKId" Visible="False"></asp:BoundColumn> <asp:TemplateColumn> <asp:CheckBox ID="CHKJobsOrigin" runat="server" > </asp:CheckBox> </asp:TemplateColumn> </asp:DataGrid> </asp:PlaceHolder> </asp:TemplateColumn> </asp:DataGrid> here is my Javascript for calculate total() function CalculateTotalOriginCost(mcheckbox2) { var txtAmtOrg = mcheckbox2.id.replace("CHKJobsOrigin", "TXTCostOriginAmount"); var AmountO = +(document.getElementById(txtAmtOrg).value + 0); var TotalAmountO = +(document.getElementById("TxtOriginCost").value + 0); if (mcheckbox2.checked == true) { TotalAmountO = TotalAmountO + AmountO; } else { TotalAmountO = TotalAmountO - AmountO; } document.getElementById("TxtOriginCost").value = TotalAmountO.toFix…
has title: How to select/unselect all child check box based on the header checkbox of parent grid
tagged with: asp.net
answer count: 0
has comment: http://stackoverflow.com/comment/42166967
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42323588
tagged with: checkbox
has comment: http://stackoverflow.com/comment/42322405
linked to: http://stackoverflow.com/q/26884067
type: Question
tagged with: datagridview
tagged with: javascript

http://stackoverflow.com/a/27059677
has comment: http://stackoverflow.com/comment/42715930
has comment: http://stackoverflow.com/comment/42704607
score: 2
has comment: http://stackoverflow.com/comment/42713232
has body: have tried by printing the value you are sending in ajax request. You are passing this.value to your function get_da(str). But I think you are using it anywhere , In ajax post you are sending the value like data: {dropdown1:$('#dropdown').val()} But this will not post your selected vaule from dropdown, Try like this: &lt;script&gt; function get_da(this){ var id = $("#dropdown option:selected").val(); var selectedName = $("#dropdown option:selected").text(); $.ajax({ url: "samefile.php", type: "POST", async: true, data: { dropdown1:id, name:selectedName}, //your form data to post goes here as a json object dataType: "html", success: function(data) { $('#output').html(data); //drawVisualization(); }, }); } &lt;/script&gt; Hope this will work. Your dropdown script should be like this: &lt;?php echo "&lt;select name="dropdown" onchange="get_da()" id="dropdown"&gt;"; while ($row = mysql_fetch_array($result)) { if($row['id']==$row['user']) { echo "&lt;option value='" . $row['id'] . "' selected&gt;" . $row['name'] . "&lt;/option&gt;"; } else{ echo "&lt;option value='" . $row['id'] . "'&gt;" . $row['name'] . "&lt;/option&gt;"; } } echo "&lt;/select&gt;"; This will send your selected value from drop down to your samefile.php.And also you are not doing good with your php script it should be like: if(isset($_REQUEST['dropdown1'])) { $id=$_REQUEST['dropdown1']; $name=$_REQUEST['name']; $sql = "UPDATE table SET name = '$name' WHERE id ='$id'"; mysql_real_escape_string($sql); $result = mysql_query($sql) or die (mysql_error()); if ($result==1) { echo "Success"; } else { echo "Failed";} } ?&gt;
answers question: http://stackoverflow.com/q/26689319
has comment: http://stackoverflow.com/comment/42661444
downvote count: 0
upvote count: 2
type: Answer

http://stackoverflow.com/comment/42146053
has text: how big are these images?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26784562

http://stackoverflow.com/comment/125023485
type: Comment
score: 1
has text: This is the way I implemented it too. populate("author", ["firstName", "lastName", "profilePicture", "_id"]) And it works like a charm
comment on: http://stackoverflow.com/a/57584411
type: AnswerComment

http://stackoverflow.com/comment/41957683
type: Comment
comment on: http://stackoverflow.com/a/26679050
has text: @SlowPoke see my update, and check in browser console to see if ajax request is being made..
score: 0
type: AnswerComment

http://stackoverflow.com/a/26716531
type: Answer
has body: If there are no errors, you should check whether .has-error exists, not only the first. var el = $('.has-error'); if (el.length) { $('html, body').animate({ scrollTop: (el.first().offset().top) },500); }
score: 3
downvote count: 0
upvote count: 3
answers question: http://stackoverflow.com/q/26716442

http://stackoverflow.com/comment/42200119
has text: `setTimeout("autoFunction()",1000)` doesn't work because the string is executed as an expression in a global execution context, but *autoFunction* is declared inside the function expression passed to *$*, so not accessible from the global context. Declare it as a global function and it will be accessible (and create *djs* as a global variable when called the first time).
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26814127
type: Comment

http://stackoverflow.com/a/26733874
has comment: http://stackoverflow.com/comment/42054526
answers question: http://stackoverflow.com/q/26733844
upvote count: 1
has body: You need to use this for the context and target the span in the selector itself. $('.sentiment-text .text span').on('click',function(e) { var str = $(this).text(); alert(str); }); DEMO
downvote count: 0
has comment: http://stackoverflow.com/comment/42054516
score: 1
type: Answer

http://stackoverflow.com/comment/41949508
score: 0
type: Comment
type: QuestionComment
has text: tweaked it, try now?
comment on: http://stackoverflow.com/q/26674900

http://stackoverflow.com/a/26849589
score: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/56217373
has body: The issue ended up being a difference between the development and production environments' load order of JavaScript files (production is lexigraphic and development is...not...). By replacing a require_tree in the Gemfile with a require for each file and putting the files in the order they need to load, the problem was resolved.
accepted answer of: http://stackoverflow.com/q/26740955
answers question: http://stackoverflow.com/q/26740955

http://stackoverflow.com/comment/42020543
type: Comment
has text: @iMacTia the `` links to a PDF file/attachment, that the user can download manually. But I've been asked also to automatically trigger the link after page loading, to let the user to download the file without having to search for the link.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26714897

http://stackoverflow.com/q/26718944
answer count: 1
downvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42171716
tagged with: google-maps-api-3
tagged with: google-maps
has answer: http://stackoverflow.com/a/26885320
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42074549
favorite count: 0
has comment: http://stackoverflow.com/comment/42035438
type: Question
accepted answer: http://stackoverflow.com/a/26885320
score: 0
has title: maps showing multiple markers when changing directions
upvote count: 1
has body: i'm showing directions on google maps and everything works fine. The problem is when i update one of the markers (departure or arrival) a new marker gets added to the map instead of removing the previous one. I've tried to set directionsDisplay as a global variable but couldn't get rid of the problem. Is there a way to clear the map before showing a new route? here's how it looks like: i have also tried this as suggested on the api: directionDisplay = new google.maps.DirectionsRenderer(); directionDisplay.suppressMarkers = true; directionDisplay.setMap(null);![enter image description here][1] thanks for the help my code is var map = drawMap(map, mapOptions); var departure; var arrival; var marker = createMarker(); function mainMap(mapOptions) { departure1 = '#autocomplete_departure'; arrival1 = '#autocomplete_arrival'; var placeDeparture = getAddress(departure1); var placeArrival = getAddress(arrival1); google.maps.event.addListener(placeDeparture, 'place_changed', function(){ placeMarker(placeDeparture, departure1); }); google.maps.event.addListener(placeArrival, 'place_changed', function(){ placeMarker(placeArrival, arrival1); }); }; function setMarkerPosition(marker, place){ marker.setPosition(place.geometry.location); marker.setMap(map); } function drawMap(){ return new google.maps.Map(map, mapOptions); } function createMarker(){ var markerOptions = { map: map } return new google.maps.Marker(markerOptions); } function placeMarker(place, stop){ var place = place.getPlace(); if (place.geometry.viewport) { map.fitBounds(place.geometry.viewport); } else { map.setCenter(place.geometry.location); map.setZoom(17); } marker.setPosition(place.geometry.location); marker.setMap(map); if (stop == '#autocomplete_departure') { departure = stop; } else if (stop == '#autocomplete_arrival') { arrival = stop; } if (arrival !== undefined &amp;&amp; departure !== undefined) { updateRouteOnMap(arrival, departure); } function updateRouteOnMap(departure, arrival){ var from = $(departu…

http://stackoverflow.com/comment/42226372
comment on: http://stackoverflow.com/q/26829325
type: Comment
type: QuestionComment
score: 1
has text: Angularjs is SinglePageApplication FrameWork, so you cannot pass values to another page unless you store it in a cookie or local storage of a browser.

http://stackoverflow.com/a/26803880
has comment: http://stackoverflow.com/comment/42181418
has comment: http://stackoverflow.com/comment/42180998
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42181316
has comment: http://stackoverflow.com/comment/42180994
has comment: http://stackoverflow.com/comment/42181023
type: Answer
has comment: http://stackoverflow.com/comment/42180974
accepted answer of: http://stackoverflow.com/q/26803856
has comment: http://stackoverflow.com/comment/42180996
score: 2
has comment: http://stackoverflow.com/comment/42181179
downvote count: 0
answers question: http://stackoverflow.com/q/26803856
has comment: http://stackoverflow.com/comment/42181105
has comment: http://stackoverflow.com/comment/42181123
has body: "params" : [ "1", "Department" : { "ref" : "true", "returns" : "value" } ] This is a regular array, not an object. Change the [] to {} "params" : { // &lt;- Curly brackets denote an object consisting of key:value pairs "1" : "", "Department" : { "ref" : "true", "returns" : "value" } } or, if you want to keep the params as a numerical array "params" : [ // &lt;- Square brackets denote an array consisting values (which can be, in turn, objects) "1", {"ref" : "true", "returns" : "value"} ]
upvote count: 2
has comment: http://stackoverflow.com/comment/42181064

http://stackoverflow.com/comment/41965259
type: QuestionComment
comment on: http://stackoverflow.com/q/26682904
has text: `.load()` is simply not what you want to use to fetch JSON from a server. It's the wrong tool for the job. My recommendation is to use the right tool for the job rather than try to hack the wrong tool.
score: 0
type: Comment

http://stackoverflow.com/q/26708704
type: UnansweredQuestion
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/42009785
has body: Any help is most welcomed and really appreciated. I have an MVC action which retries a file content from a web service. This action is invoked from a Angular service (located in services.js) using $http.post(action, model), and the action is returning a FileContentResult object, which contains the byte array and the content type. public ActionResult DownloadResults(DownloadResultsModel downloadResultsModel) { downloadResult = ... // Retrieving the file from a web service Response.ClearHeaders(); Response.AddHeader("Content-Disposition", string.Format("attachment; filename={0}", downloadResult.FileName)); Response.BufferOutput = false; return new FileContentResult(downloadResult.Contents, downloadResult.ContentType); } The issue I'm having is about the browser not performing the default behavior of handing a file (for example, prompting to open it, saving it or cancel). The action is completed successfully with having the content of the file and the file name (injected to the FileContentResult object), but there s no response from the browser. When I'm replacing the post with $window.location.href, and construct the URI myself, I'm hitting the action and after it completes the browser is handling the file as expected. Does anyone can think of any idea how to complete the 'post' as expected? Thanks, Elad
upvote count: 1
has comment: http://stackoverflow.com/comment/42009475
type: Question
has title: Downloading a file in MVC app using AngularJS and $http.post
tagged with: asp.net-mvc
tagged with: javascript
has answer: http://stackoverflow.com/a/26709095
answer count: 1
downvote count: 0
score: 1
favorite count: 0
tagged with: download
tagged with: angularjs

http://stackoverflow.com/q/26678379
answer count: 3
score: 8
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41955867
tagged with: node.js
tagged with: foreach
tagged with: synchronous
has answer: http://stackoverflow.com/a/26678531
has answer: http://stackoverflow.com/a/26678542
has comment: http://stackoverflow.com/comment/41956064
type: Question
has body: I have a function in Node.js that takes in an array and loops through it, doing somewhat time-consuming computations on each element. Here's a super-simplified version of the function: var analyze_data = function (data) { data.forEach(function (elm) { if (elm.myProp == true) { return true; } }); return false; } Essentially, I want the function to return true if any of the elements' property myProp is equal to true. If none of the elements satisfy this condition, the function should return false. However, the code never waits for the forEach loop to finish. In other words, if the 100th element in the array satisfies the condition, the function should return true. Instead, it skips to return false; and returns false before the forEach loop has time to finish. Is there a solution to this? Edit So I realized that I oversimplified my question - I'm actually using the Node.js package es6-promise, and my code looks more like this: var analyze_data = function (data) { return new Promise(function (resolve, reject) { data.forEach(function (elm) { if (elm.myProp == true) { resolve(elm); } }); resolve(false); }); } So in reality, I don't have the issue of returning a value in the forEach function rather than the outer function. Additionally, notice how the function resolves to the element itself rather than true, otherwise false. I actually want to return some relevant data if the one of the elements passes the condition, otherwise false to indicate that they all failed. Any ideas now? :p Also, thanks for all the original answers!
has title: Synchronous forEach loop (wait for it to end)
has answer: http://stackoverflow.com/a/26678472
downvote count: 0
tagged with: javascript
favorite count: 0
upvote count: 8

http://stackoverflow.com/a/26723671
answers question: http://stackoverflow.com/q/26723568
downvote count: 0
type: Answer
has body: Consider using parseInt function instead of regex: parseInt("1233s") 1233 parseInt("1232:") 1232
score: 1
upvote count: 1

http://stackoverflow.com/q/26702058
has comment: http://stackoverflow.com/comment/41997795
tagged with: angularjs-scope
type: Question
tagged with: angularjs-directive
has body: I'm trying to make a dropdown directive, using the Angular UI code for inspiration. I can get it working in the sense that it's opening and closing the dropdown, but I've tried to extend it so that a "dropdownManager" service can close all the dropdowns on the page and so that it can be opened and closed using the page controller code. To do this I've created an attribute called "is-open" and put an angular watch on it. Unfortunately this watch isn't firing when the attribute is updated by the controller, or when the scope variable is updated from the directive's own open/close functions. I know that the value is changing because otherwise the dropdown wouldn't open and close, but the watch definitely isn't foring because I have a console.log inside it. The strange thing is that it does fire once for each dropdown on the page when it first initializes because the console.log gets written! Anyway, I tride to make a fiddle but there are too many dependencies, sorry, but I have managed to reduce the code down as much as possible so hopefully it should be very easy for a seasoned Angular user to understand. angular.module('directives').directive('dropdown', function () { return { restrict: 'EA', scope: { isOpen: '=?', }, link: function ($scope, $element, $attrs, ngModel) { // Defaults $scope.isOpen = false; // Watch the isOpen variable $scope.$watch('isOpen', function(value) { console.log("Scope Changed", $scope.isOpen); // Open or close this panel if (value === true){ $scope.openDropdown(); } else{ $scope.closeDropdown(); } }); // Open Dropdown $scope.openDropdown = function($event){ $scope.isOpen = true; var panelEl = $element.find('[dropdown-panel]'); panelEl.slideDown(100, function(){ $element.addClass('is-open'); }); }; // Open Dropdown $scope.closeDropdown = function($event){ $scope.isOpen = false; var panelEl = $element.find('[dropdown-panel]'); $element.removeClass('is-open'); panelEl.slideUp(100); }; // Toggle Dropdown $scope.toggleDropdown = function ($event) …
possible better answer: http://stackoverflow.com/a/26703935
has comment: http://stackoverflow.com/comment/41997808
has answer: http://stackoverflow.com/a/26716074
has title: Angular custom directive - $scope.$watch not firing
has answer: http://stackoverflow.com/a/26703935
tagged with: javascript
has comment: http://stackoverflow.com/comment/41997850
score: 0
answer count: 2
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26716074
linked to: http://stackoverflow.com/q/21640459
type: AnsweredQuestion

http://stackoverflow.com/a/26739525
answers question: http://stackoverflow.com/q/26737287
score: 1
accepted answer of: http://stackoverflow.com/q/26737287
upvote count: 1
has comment: http://stackoverflow.com/comment/42065857
type: AcceptedAnswer
downvote count: 0
has body: This in an extract of a 'production' Gruntfile.js: module.exports = function (grunt) { copy: { dist: { files: [{ expand: true, dot: true, cwd: '&lt;%= yeoman.app %&gt;', dest: '&lt;%= yeoman.dist %&gt;', src: [ //'*.{ico,png,txt}', '*.{txt}', '.htaccess', '*.html', '*.appcache', 'views/{,*/}*.html', 'images/{,*/}*.{webp}', 'icons/**/*.{ico,png}', 'scripts/i18n/{,*/}*.js', 'i18n/{,*/}*.json', ] }, { expand: true, cwd: '.tmp/images', dest: '&lt;%= yeoman.dist %&gt;/images', src: ['generated/*'] }, { expand: true, cwd: 'bower_components/bootstrap/dist', src: 'fonts/*', dest: '&lt;%= yeoman.dist %&gt;' }, { expand: true, cwd: 'bower_components/open-sans-fontface', src: 'fonts/**/*', dest: '&lt;%= yeoman.dist %&gt;/styles' }, { expand: true, cwd: 'bower_components/font-awesome', src: 'fonts/*', dest: '&lt;%= yeoman.dist %&gt;' }] }, }, ... grunt.registerTask('build', [ 'clean:dist', ... 'copy:dist', ... ]); grunt.registerTask('default', [ 'build', ]); }; Please, read http://gruntjs.com/getting-started (it's a five minutes task... :-).
type: Answer

http://stackoverflow.com/comment/42045614
comment on: http://stackoverflow.com/q/26728698
has text: it means you have error in server side
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26673478
accepted answer: http://stackoverflow.com/a/26673618
has answer: http://stackoverflow.com/a/26673564
has body: I have an service, and want to watch the data of an other service (so an event is triggered, when the data is changed). // Gets data from an json file and saves it in this.data myService.service('myService', ['$http', function($http) { this.data = {}; // This will be returned by $watch this.loadData = function( ){ $http.get('http://localhost/data.json'). success(function(json, status, headers, config) { this.data = json; // This wont be returned by $watch }); } }]); Now, is some different services, I call the load function and have a $watch event: // Load data myService.loadData( ); // $watch attempt #1 $rootScope.$watch('myService.data', function(data){ console.log(myService.data); }, true); // $watch attempt #2 $rootScope.$watch(function(){ return myService.data; }, function(newVal, oldVal){ console.log(newVal); }); Both $watch attempts will show me in my Firebug-Console: {} (from this.data = {};) But this.data = json; wont be displayed. What did I do wrong? Is there a way do get an event when the data is changed? Thank you very much.
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26673618
type: Question
upvote count: 2
answer count: 2
has title: AngularJS: $watch other service in a service
downvote count: 0
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/26673564
tagged with: angularjs

http://stackoverflow.com/q/26796834
has title: delete & back space not working in radeditor
has body: I am using radeditor in my project. I have created some custom tags which I insert in text area Bellow is demo html code of this tags with text this is demo&lt;var is-end="false" conditionid="439726" conditionfield="FELT001" conditionlabel="new co" title="Start of condition: new co" style="display: inline-block; width: 16px; height: 16px; margin-right: 3px; background-image: url('http://localhost/dialogportal.com/images/icons/condition-begin.gif'); background-repeat: no-repeat;" contenteditable="false"&gt;&lt;/var&gt; text &lt;var is-end="false" conditionid="439726" conditionfield="FELT001" conditionlabel="new co" title="Start of condition: new co" style="display: inline-block; width: 16px; height: 16px; margin-right: 3px; background-image: url('http://localhost/dialogportal.com/images/icons/condition-begin.gif'); background-repeat: no-repeat;" contenteditable="false"&gt;&lt;/var&gt;again this will have conditions&lt;var is-end="true" conditionid="439726" title="End of condition: new co" style="display: inline-block; width: 16px; height: 16px; margin-left: 3px; background-image: url('http://localhost/dialogportal.com/images/icons/condition-end.gif'); background-repeat: no-repeat;" contenteditable="false"&gt;&lt;/var&gt;&lt;var is-end="true" conditionid="439726" title="End of condition: new co" style="display: inline-block; width: 16px; height: 16px; margin-left: 3px; background-image: url('http://localhost/dialogportal.com/images/icons/condition-end.gif'); background-repeat: no-repeat;" contenteditable="false"&gt;&lt;/var&gt;&amp;nbsp;which we have to test It looks like something like this Here we can see two VAR tags together. Problem occurs with them in chrome &amp; safari. nor using right &amp; left arrows I can not go through this var tags neither using back space &amp; delete works with this. This problem occurs only in chrome &amp; safari &amp; not in firefox &amp; IE.
type: Question
answer count: 1
tagged with: javascript
tagged with: asp.net
score: 0
tagged with: telerik
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26797587
tagged with: radeditor

http://stackoverflow.com/q/26691847
tagged with: http
type: Question
has answer: http://stackoverflow.com/a/26751913
tagged with: nginx
has body: I'm trying to add a mobile redirect to my site. I'm thinking I want a completely separate layout though, rather than using media queries. One easy way to do this is to have CloudFlare detect and redirect to a subdomain m.example.com. I don't want to use a subdomain though for several reasons. The other way I did in the past was to use this mobile detect script with media queries and partially loading sections of the page. This proved to be a nightmare in the long run, and I don't want to use media queries. I notice the way buzzfeed.com does it is pretty much exactly how I want to do it. It looks like they somehow detect the browser or something, then redirect to ?s=mobile which displays the mobile site. I can't tell if this is done on the server or in Javascript though, or how they're doing it. I assume it's on the server because if i curl http://www.buzzfeed.com/?s=mobile I get a 302 response... I'm guessing because curl isn't sending a header that looks like mobile. Are there common, frequently-maintained scripts for nginx or varnish to do this? I'm mainly scratching my head and googling doesnt appear to be bringing up much relevant discussion other than weak-looking snippets from 3 years ago.
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26751913
score: 0
answer count: 1
tagged with: http-redirect
has title: How does BuzzFeed do their mobile redirect?
type: AnsweredQuestion
tagged with: varnish

http://stackoverflow.com/q/26691925
has title: json_encode(): Sending both a Table and Variables from PHP to JavaScript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41979743
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41979800
accepted answer: http://stackoverflow.com/a/26692306
has body: From my PHP script I have to send to JavaScript two pieces of data in one AJAX return call: relatively large array with app. 200 rows and 10 columns set of variables providing additional information about that array Both pieces of information should be returned from PHP to JavaScript in one JavaScript return call. A standard way of sending arrays from PHP is by using json_encode(). This function however accepts only one parameter, either a string or an array. How to, please, send both the table and variables from PHP to JavaScript then? If json_encode() wont handle this task, is there any other reliable way? I have tried combining the variable set and the table into one array, and passing that array to JavaScript. This worked, however, when I wanted to get lenght of such array, where table and variables were combined, it simply did not work. Which is the reason, why I came to consult this problem here. Thank you very much.
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41980235
has comment: http://stackoverflow.com/comment/41979872
upvote count: 0
tagged with: arrays
answer count: 1
favorite count: 0
tagged with: ajax
tagged with: php
has answer: http://stackoverflow.com/a/26692306

http://stackoverflow.com/a/26821086
downvote count: 1
has comment: http://stackoverflow.com/comment/42212058
score: -1
has comment: http://stackoverflow.com/comment/42211739
upvote count: 0
has body: Try to use this one $(document).ready(function() { // Rollover image var homeBlack = new Image(); homeBlack.src = "Images/HomeBlack.png"; //this is a shorthand for the actual src $('.homeRed').hover(function() { $(this).attr('src', homeBlack.src); }); // end mouseover }); // end ready
answers question: http://stackoverflow.com/q/26821061
type: Answer

http://stackoverflow.com/a/26820055
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26803441
accepted answer of: http://stackoverflow.com/q/26803441
has comment: http://stackoverflow.com/comment/42239749
score: 0
has body: I have created an example for you, hit "Run Code Snippet" and try to update the Phone with invalid phone number. $("#people").getOrgChart({ primaryColumns: ["Name", "Title"], dataSource: [ { id: 1, parentId: null, Name: "Amber McKenzie", Title: "ESL teacher", Phone: "05454545454"}, { id: 2, parentId: 1, Name: "Ava Field", Title: "Bricklayer", Phone: "08888888888"}, { id: 3, parentId: 1, Name: "Evie Johnson", Title: "Nursing aide", Phone: "077777777"}] }); $("#people").on("updateEvent", function( event, sender, args ) { if (!/^\d+$/.test(args.data.Phone)){ event.preventDefault(); args.returnValue = false; alert(args.data.Name + ' cannot be updated because Phone number field is not in correct format!'); } }); html, body {margin: 0px; padding: 0px;height: 100%; overflow: hidden; } #people {width: 100%;height: 100%; } &lt;script type='text/javascript' src='//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'&gt;&lt;/script&gt; I have created an example for you, hit "Run Code Snippet" and try to update the Phone with invalid phone number. &lt;link rel="stylesheet" type="text/css" href="//www.getorgchart.com/GetOrgChart/getorgchart/getorgchart.css"&gt; &lt;script type='text/javascript' src="//www.getorgchart.com/GetOrgChart/getorgchart/getorgchart.js"&gt;&lt;/script&gt; &lt;div id="people"&gt;&lt;/div&gt;

http://stackoverflow.com/a/26822547
has comment: http://stackoverflow.com/comment/42214453
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42214679
has body: Try asking for the css value, ala: $('#scrollbarY').css('height'); caveat: this will hand back a string representation with 'px' added, so you can parseInt($('#scrollbarY').css('height')) it. But another concern I would have is why the mismatch, is that div's height getting modified?
upvote count: 1
answers question: http://stackoverflow.com/q/26822473
has comment: http://stackoverflow.com/comment/42214522
score: 1

http://stackoverflow.com/a/26733659
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26733542
upvote count: 3
answers question: http://stackoverflow.com/q/26733542
has body: The delete won't work the second time because the database is open and therefor the "blocked" handler is invoked. If you do it like this it works. Notice the onsuccess function which closes the db. var delReq = indexedDB.deleteDatabase('myDB'); delReq.onsuccess= function(e){ var openReq = indexedDB.open('myDB', 1); openReq.onupgradeneeded= function(e){ console.log('Im called'); } openReq.onsuccess = function() { openReq.result.close(); } } delReq.onblocked = function() { console.log("blocked",arguments); } edit Also added some code for the onblocked event. If you comment out the openReq.result.close() code, you will see the blocked part edit2 Your deleteDb function doesn't work, notice the this.dbName. this is window in your context. If you change it too: deleteDB: function(){ var that = this; return new Promise(function(resolve, reject){ var deleteDbRequest= indexedDB.deleteDatabase(that.dbName); .... When you execute this code.. you will again see the onblocked event being fired edit3 Part of the spec where it makes deleting a undefined database succesfull: http://www.w3.org/TR/IndexedDB/Overview.html#dfn-steps-for-deleting-a-database --> If no database was found, then these steps are considered successful. Abort these steps
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42060539
has comment: http://stackoverflow.com/comment/42061544
type: Answer

http://stackoverflow.com/comment/42205335
score: 0
has text: Change `obj = new myObj();` to `var obj = new myObj();`. This might do the trick.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26817472

http://stackoverflow.com/q/26732523
has answer: http://stackoverflow.com/a/27365265
tagged with: unit-testing
type: Question
has title: QUnit/Sinon: testing a function which checks if cookies are enabled
tagged with: javascript
tagged with: jquery
score: 0
tagged with: sinon
accepted answer: http://stackoverflow.com/a/27365265
has body: I have the following (simplified) javascript module which uses jQuery Cookie plugin to check if cookies are enabled. If cookies are disabled it warns the user: var cookiePolicy = (function () { var cookiesEnabled = function () { return $.cookie('check', 'valid', { expires: 1 }) && $.cookie('check') == 'valid'; }; return { updateCookiePolicy: function () { if (!cookiesEnabled()) { $("#cookie-policy").append(' Cookies are disabled. Some features of this site may not work correctly. '); } } }; })(); I have the following unit test: QUnit.test("When cookies are enabled the cookie policy text remains unchanged", function (assert) { sinon.mock($).expects("cookie").once().withExactArgs("check", "valid", { expires: 1 }); sinon.mock($).expects("cookie").once().withExactArgs("check").returns("valid"); cookiePolicy.updateCookiePolicy(); assert.equal(0, $('#cookie-warning').length, "Failed!"); }); The test fails because "cookie is already wrapped". I assume this is because I am mocking $.cookie for both set and read. How can I mock the call to $.cookie for both setting and reading in this test?
answer count: 1
tagged with: qunit
has comment: http://stackoverflow.com/comment/42064334
type: AnsweredQuestion

http://stackoverflow.com/comment/42044835
has text: Hmmm, this is an interesting solution. I'll have to try it out!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26726785
type: AnswerComment

http://stackoverflow.com/comment/42085012
score: 1
comment on: http://stackoverflow.com/q/26750566
has text: the screenshot is not useful. please provide the error message in full.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42145636
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26781179
type: Comment
has text: You can check if the device is mobile and not display the popup; Answer for device check: http://stackoverflow.com/questions/3514784/what-is-the-best-way-to-detect-a-handheld-device-in-jquery Example: $.browser.device = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));

http://stackoverflow.com/comment/42232049
comment on: http://stackoverflow.com/a/26832467
score: 0
type: AnswerComment
type: Comment
has text: That returns "undefined method `image_url' for #<Paperclip::Attachment:0x00000004e0e558>"

http://stackoverflow.com/q/26745253
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/26745980
has comment: http://stackoverflow.com/comment/42076031
tagged with: php
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/26745980
has answer: http://stackoverflow.com/a/26745343
upvote count: 3
has answer: http://stackoverflow.com/a/26745522
has answer: http://stackoverflow.com/a/26745432
type: Question
has body: I have a single pay-per-click (PPC) landing page that has a menu at the top of Home / Services / About I do not want to have two other pages for Services/About. I just want to change the content &amp; replace everything including and after div class="inner" through !--inner-- based on a services click or about click. So when landing on the page the home content defaults but when the services nav is clicked, it just changes everything including and after &lt;div class="inner"&gt; through &lt;!--inner--&gt; html content and all.
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: show hide html code/content using nav menu
accepted answer: http://stackoverflow.com/a/26745522
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/a/44118808
score: 1
answers question: http://stackoverflow.com/q/26756560
has body: @RutwickGangurde and others who were having issues, if you're trying to set a scope variable that is not an object it won't work. I'm guessing that's what you're currently doing in your service: ... this.myVar = true; ... and then trying to set it in the directive/controller: ... scope.myVar = myService.myVar; ... That will NOT work for getting the updated variable in the service when it changes. Try this instead in your service: ... this.myObj = {}; this.myObj.myVar = true; ... and in your directive/controller: ... scope.myValue = myService.myObj; ... and in your html: ... {{ myValue.myVar }} ... I would have made this as a comment, but I don't have sufficient privileges yet so decided to post as a response with a very brief example.
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/42122451
score: 0
type: QuestionComment
has text: yes its huge. too big for this site. so many parameters. The point is that req.user is assigned to user and then properties are displayed of it in the EJS file. I want to get those properties in the JS file
type: Comment
comment on: http://stackoverflow.com/q/26771063

http://stackoverflow.com/comment/42038185
type: QuestionComment
comment on: http://stackoverflow.com/q/26723818
score: 0
has text: I dont uderstand please write an answer
type: Comment

http://stackoverflow.com/comment/42131991
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26773498
has text: ya tried with the url/check_events.php?y=2014/11/14... time of execution reduced little bit but no use...
score: 0

http://stackoverflow.com/comment/41973555
type: Comment
comment on: http://stackoverflow.com/q/26681611
has text: When you call `$.backstretch`, does `$` is set?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42026389
type: Comment
comment on: http://stackoverflow.com/q/26718125
has text: possible duplicate of [Get all elements without child node in jQuery](http://stackoverflow.com/questions/11061594/get-all-elements-without-child-node-in-jquery)
score: 0
type: QuestionComment

buttonclick
type: Tag
tags question: http://stackoverflow.com/q/26753339
tag name: buttonclick
tags question: http://stackoverflow.com/q/26831154
tags question: http://stackoverflow.com/q/26674094

http://stackoverflow.com/a/26754978
has comment: http://stackoverflow.com/comment/42092855
answers question: http://stackoverflow.com/q/26754859
has body: Short answer: You can't. Long version: Google maps is fairly data heavy. It takes a lot of downloads before it can load into the page; even the official version takes a few seconds. The only way to perceptibly increase the loading speed is to increase your wifi connection speed, then the downloads come faster and the map can load sooner.
upvote count: 2
has comment: http://stackoverflow.com/comment/42092904
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/q/26679165
has answer: http://stackoverflow.com/a/26679220
score: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/16296670
favorite count: 0
has comment: http://stackoverflow.com/comment/41957350
accepted answer: http://stackoverflow.com/a/26679220
tagged with: angularjs
duplicate of: http://stackoverflow.com/q/16296670
has title: How to display a blank div in my case?
has body: I am trying to display my array in my app. I have something like JS $scope.array1 = [' ',' ',1,2,3,4,5]; $scope.array2 = [6,7,8,9,10,' ',' ']; $scope.array3 = [12,13,14,15,16,17]; html &lt;div ng-repeat="a1 in array1"&gt; {{a1}} &lt;/div&gt; &lt;div ng-repeat="a2 in array2"&gt; {{a2}} &lt;/div&gt; &lt;div ng-repeat="a3 in array1"&gt; {{a3}} &lt;/div&gt; I was hoping to display empty div through my ng-repeat. However, I got error Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: a1 in array1, Duplicate key: string: , Duplicate value: " " Is there anyway I can display empty div in my case? Thanks!
has comment: http://stackoverflow.com/comment/41957680
upvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/q/26765096
type: Question
score: -2
has title: How to convert a JavaScript array to a PHP array?
tagged with: javascript
has comment: http://stackoverflow.com/comment/42111070
has body: I am new to PHP and would like to bring the following array to a database. I think, the best way is to convert it first to a PHP array. var bildInfo = new Array(); bildInfo[0] = "dummy"; bildInfo[1] = new Array(); bildInfo[1][0] = "Karaffen"; bildInfo[1][1] = "Öl auf Leinwand"; bildInfo[1][2] = "83 x 120 cm"; bildInfo[1][3] = " - "; bildInfo[1][4] = "1"; bildInfo[2] = new Array(); bildInfo[2][0] = "Santé"; bildInfo[2][1] = "Öl auf Leinwand"; bildInfo[2][2] = "80 x 100 cm"; bildInfo[2][3] = " - "; bildInfo[2][4] = "1"; bildInfo[3] = new Array(); bildInfo[3][0] = "Landleben I"; bildInfo[3][1] = "Öl auf Leinwand"; bildInfo[3][2] = "70 x 100 cm"; bildInfo[3][3] = " - "; bildInfo[3][4] = "1"; bildInfo[4] = new Array(); bildInfo[4][0] = "Landleben II"; bildInfo[4][1] = "Öl auf Leinwand"; bildInfo[4][2] = "70 x 100 cm"; bildInfo[4][3] = " - "; bildInfo[4][4] = "1"; and 700 more ... Because of the quantity I am asking for some hints to find the best way to do that. The array is in a JS/TXT-file, so my first idea was a simple search-replace like bildInfo to $bildInfo, but I do not know how to deal the "new Array()".
downvote count: 2
has answer: http://stackoverflow.com/a/26765249
answer count: 3
has answer: http://stackoverflow.com/a/26765319
tagged with: arrays
has comment: http://stackoverflow.com/comment/42111099
has comment: http://stackoverflow.com/comment/42111040
favorite count: 0
has answer: http://stackoverflow.com/a/26765256
type: UnansweredQuestion
tagged with: php
upvote count: 0
has comment: http://stackoverflow.com/comment/42111029

http://stackoverflow.com/q/26711948
tagged with: javascript
score: -1
has title: Node.js + Ember.js Login System
type: Question
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26720972
tagged with: ember.js
tagged with: node.js
has body: I have a server running node.js and my client-side is in ember.js. I'm trying to implement a login system but there is not much on the interner about these two tools working together. I've got a simple authentication system But what I need to do is the $_SESSION part like in php. I can login and get my information right away but I don't know how to remain logged in to forbid/allow to go trough certain pages. I need some cookies or something but not quite seeing how I'm going to do this with these two tools. Thanks in advance
type: UnansweredQuestion
tagged with: authentication
downvote count: 1
has comment: http://stackoverflow.com/comment/42017184
has comment: http://stackoverflow.com/comment/42016440

http://stackoverflow.com/a/26830384
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42228076
has comment: http://stackoverflow.com/comment/42228105
answers question: http://stackoverflow.com/q/26830279
has body: you can try with some like function changeLng(lang) { // remove language '/fr/' or '/es/' if exists var path = window.location.pathname.replace(/\/[a-z]{2}/, ''); // reload the page same url with the lang prefix window.location.href = '/' + lang + path; } the link can be FR ES EN this converts any url to lang specific, sample /contact to /fr/contact /about to /fr/about update for remove the lang part is simple function removeLng() { // remove language var path = window.location.pathname.replace(/\/[a-z]{2}/, ''); window.location.href = path; }
has comment: http://stackoverflow.com/comment/42228228

http://stackoverflow.com/a/26864997
type: Answer
answers question: http://stackoverflow.com/q/26689124
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42341898
score: 0
has body: I had that issue and found the solution by making clusters: http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/docs/examples.html This helps a lot and is actually faster than placing everything in arrays, and pushing them to the map 1 by one You can keep the events for each marker and group them + make it clustered.

http://stackoverflow.com/q/26822038
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26822112
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26822090
answer count: 3
has title: Ajax submiting a form with enter and onclick
tagged with: enter
has answer: http://stackoverflow.com/a/26822124
score: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26822090
tagged with: onclick
has body: I have a problem in my code. I've been trying to design a form that could update data in a database and showing it without refreshing the page. I could do this, but I wanted that the form would work if the user pressed the Enter key. Here is my code: I've tried to put onsubmit instead of onclick but without success :/ EDIT: Already solved I'm so dumb.. Thank you for the help misko! Here is my code in case you're having the same trouble as me:
type: Question
possible better answer: http://stackoverflow.com/a/26822112

http://stackoverflow.com/q/26785942
tagged with: asp.net
has comment: http://stackoverflow.com/comment/42148910
has comment: http://stackoverflow.com/comment/42148580
has comment: http://stackoverflow.com/comment/42149210
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42148610
answer count: 0
has comment: http://stackoverflow.com/comment/42148888
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/42148712
tagged with: javascript
has comment: http://stackoverflow.com/comment/42148972
has comment: http://stackoverflow.com/comment/42148751
score: 0
has comment: http://stackoverflow.com/comment/42148726
has title: how to pass string return from javascript on asp.net page?
has body: I want to retrieve the string returned from the javascript to asp.net page? Let suppose there is a string returned from javascript function and there is a string variable on asp.net page, i want to assign the string return from javascript to the string variable in asp.net page. There is my javascript &lt;script type="text/javascript"&gt; function networkInfo() { var wmi = new ActiveXObject("WbemScripting.SWbemLocator"); var service = wmi.ConnectServer("."); e = new Enumerator(service.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")); for (; !e.atEnd(); e.moveNext()) { var s = e.item(); var macAddress = unescape(s.MACAddress); } return macAddress; } &lt;/script&gt; Page load of Asp.net page protected void Page_Load(object sender, EventArgs e) { string MacAddress; } How could i do this?

http://stackoverflow.com/comment/42019962
has text: Set div height as auto
comment on: http://stackoverflow.com/q/26714796
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/26685923
has comment: http://stackoverflow.com/comment/41997994
has comment: http://stackoverflow.com/comment/42036498
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26685681
has body: If this javascript code is inline in a PHP file (which it sounds like it is) you can replace this: if ( sites[code] ) { with this: if (sites[code] &amp;&amp; "&lt;?php echo $_SERVER['REMOTE_ADDR']; ?&gt;" !== "11.111.111.111") { OP has specified that the javascript code is not inline. In that case, you can modify the code from this: if ( sites[code] ) { to this: if (sites[code] &amp;&amp; userIp !== "11.111.111.111") { Where 11.111.111.111 is the IP you want to whitelist. Then, in your PHP, include this script: &lt;script&gt; var userIp = "&lt;?php echo $_SERVER['REMOTE_ADDR']; ?&gt;"; &lt;/script&gt;
type: Answer

http://stackoverflow.com/comment/42029873
type: AnswerComment
has text: It wasn't obvious from the question, but it's a bit more complicated that that. The nextTick is done within a function I am testing, so I'm not able to switch things around like that...
score: 2
comment on: http://stackoverflow.com/a/26719920
type: Comment

http://stackoverflow.com/comment/42080996
comment on: http://stackoverflow.com/a/26748201
has text: I leave the answering to those who want rep.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26826536
has comment: http://stackoverflow.com/comment/42444758
accepted answer of: http://stackoverflow.com/q/26775808
type: Answer
answers question: http://stackoverflow.com/q/26775808
has comment: http://stackoverflow.com/comment/42320754
upvote count: 7
score: 7
has body: try looking at this code sample here: http://siddii.github.io/angular-timer/examples.html#/angularjs-single-timer starting the timer in angular is done via $scope.$broadcast('timer-stop'); not element.start(); BTW, your ng-app should be in the html/body tag, not in the timer tag.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42444714

http://stackoverflow.com/comment/42108715
type: Comment
has text: @AlonShmiel That's just because your logic is bad. I've created a new script: http://jsfiddle.net/sj0aeavw/1. For starters, you should be using a relatively positioned parent, you should be using `position` instead of `offset` (one pertains to the parent element and the other pertains to the entire document), and you should be checking the position against both the top and the bottom of the container.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26763092

http://stackoverflow.com/a/26687341
type: Answer
has comment: http://stackoverflow.com/comment/41972178
has body: You need to use the escaped value instead. Replace your line with this: document.getElementById("display").innerHTML = text_in.replace("&amp;#183;","-");
score: 0
answers question: http://stackoverflow.com/q/26687289

http://stackoverflow.com/comment/42207991
comment on: http://stackoverflow.com/a/26816937
score: 0
type: Comment
has text: so it was really because of the .env file, didnt know that .env was scanned only in the current working directory.
type: AnswerComment

http://stackoverflow.com/q/26731008
has comment: http://stackoverflow.com/comment/42050370
has comment: http://stackoverflow.com/comment/42050312
type: Question
has comment: http://stackoverflow.com/comment/42050247
has comment: http://stackoverflow.com/comment/42049976
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26731468
has body: i have two scopes (arrays). One with room data and one with room list. So everytime a user want to add some data for each room have to select it from a dropdown (select option) and add that data he wants. Now, i need to exclude every room tat already have some data from the dropdown and i am trying like thi. Here is the Room list: $scope.propertyRooms = [ { id: "1", name: "Room 1 Sea View" }, { id: "2", name: "Room 2 Mountain View" }, { id: "3", name: "Room 3" } ]; Here is the room with data (to exclude): $scope.ratePlansRoomsSettings = [ { id: "1", name: "Room 1 Sea View", allotment: "10", minPax: "1", maxPax: "5", maxAdult: "5", maxChild: "4", maxInf: "1", childAllowed: true }, { id: "2", name: "Room 2 Mountain View", allotment: "10", minPax: "1", maxPax: "10", maxAdult: "10", maxChild: "8", maxInf: "1", childAllowed: false } ]; Here is how i am trying to exclude the selected: $scope.getAvailableRooms = function(){ var selectedRooms = []; for(i = 0; i &lt; $scope.propertyRooms.length; i++){ var found = false; for(j = 0; j &lt; $scope.ratePlansRoomsSettings.length; j++){ if($scope.ratePlansRoomsSettings[j].id == $scope.propertyRooms[i].id){ found = true; break; } } if(!found){ selectedRooms.push($scope.propertyRooms[i]); } return $scope.propertyRooms; } } here is the select options: &lt;select ng-model="room.name" ng-options="p.name as p.name for p in getAvailableRooms()" ng-hide="room.name" class="form-control"&gt;&lt;/select&gt; The problem is that the select options give me all the time all the rooms from the propertyRooms scope instead those only that are not selected. I am not receiving any errors but i beleive i am wrong in the for function.
has comment: http://stackoverflow.com/comment/42050046
score: 0
has title: Find if an item is in an array and exclude it from select options with angularjs
answer count: 1
has comment: http://stackoverflow.com/comment/42050131
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42050077
has answer: http://stackoverflow.com/a/26731468
type: AnsweredQuestion

http://stackoverflow.com/comment/42032887
has text: One way is to add a `is:visible` clause inside body's click event to check the showen/hidden property of popover.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26721329
type: Comment

http://stackoverflow.com/comment/42198633
type: QuestionComment
comment on: http://stackoverflow.com/q/26793321
has text: In my method, if the radius is 30px, and zoom level 3. Then i divide zoom to 30. then make 30 screenshot of canvas each little shorter and more zoomed in. Then lay those 30 layers onto each other.
score: 0
type: Comment

http://stackoverflow.com/a/26680489
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26680349
has comment: http://stackoverflow.com/comment/41960358
score: 1
has body: 1). You can't point to external URL template file with script type="text/ng-template". When Angular sees such script tags with custom template type, it will use their inner text content to put into template cache. Angular will not download anything. For reference I can put here compile function of the scriptDirective: compile: function(element, attr) { if (attr.type == 'text/ng-template') { var templateUrl = attr.id, // IE is not consistent, in scripts we have to read .text but in other nodes we have to read .textContent text = element[0].text; $templateCache.put(templateUrl, text); } } As you can see, it's no surprise that you end up with empty string template in your case: your src attributes is never used, and script text is indeed empty. 2). While I don't think this is a very good idea but it's possible to create one more script directive (because you can have many directives with the same name) which would be respect src and download template for you: .directive('script', ['$templateCache', '$http', function($templateCache, $http) { return { restrict: 'E', terminal: true, compile: function(element, attr) { if (attr.type == 'text/ng-template' &amp;&amp; attr.src &amp;&amp; !attr.id) { $http.get(attr.src, { cache: $templateCache }); } } }; } ]); Demo: http://plnkr.co/edit/TChPjDr9iAq4Zi55N0rq?p=preview
answers question: http://stackoverflow.com/q/26680349
has comment: http://stackoverflow.com/comment/41960211
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/26772371
answers question: http://stackoverflow.com/q/26706213
type: Answer
upvote count: 9
has body: Helpers accept an optional Hash as its final argument.If the template provides no hash arguments, Handlebars will automatically pass an empty object ({}). [From https://handlebars-lang.github.io/docs/guide/block-helpers.html#hash-arguments ] So, when you are having title in the helpers parameter list it is treated as the Hash object. You can check that by logging title in console. So for your code to work you can just check that if the type of title is String or not using the typeof operator. if(!title || typeof title != 'String') { title = href.toString().charAt(0).toUpperCase() + href.slice(1); } and it should work. Working example : http://jsfiddle.net/prabhat_rai/ve4h39vm/
score: 9
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26706213

http://stackoverflow.com/comment/42041036
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26705868
has text: @IsmaelMiguel I didn't mean to insult the technique, maybe my English knowledge was too limited for that, sorry. I just meant that it's a less readable way to execute code conditionally.
type: AnswerComment

http://stackoverflow.com/a/26797389
accepted answer of: http://stackoverflow.com/q/26797334
answers question: http://stackoverflow.com/q/26797334
has body: If you want each function to be assigned to a name, use dictionary, not array: var opdrachtDict = {}; for (i = 0; i &lt; 10; i++) { opdrachtDict["opdracht"+i]=func.bind(null,i); } function func(i){ alert(i); } opdrachtDict["opdracht3"](); //ok, lets call it and see if you think its still a wrong answer ;)...
has comment: http://stackoverflow.com/comment/42168800
has comment: http://stackoverflow.com/comment/42173383
upvote count: 1
type: AcceptedAnswer
downvote count: 1
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42168783
has comment: http://stackoverflow.com/comment/42173536

http://stackoverflow.com/q/26809529
has answer: http://stackoverflow.com/a/34550358
has title: Why returned value from AJAX disappears almost instantly?
has comment: http://stackoverflow.com/comment/42197203
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42191856
score: 3
upvote count: 3
type: Question
has answer: http://stackoverflow.com/a/26809620
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: this is my server-side code: modify_emp.php &lt;?php echo $_POST[id]; ?&gt; And this is my Javascript in my html page: &lt;script&gt; $(document).ready(function () { var alreadyClicked = false; $('.element').hover( //mouseenter function function(){ $('.element').click( function(){ $(this).css("color","blue"); var objName = $(this).attr('name'); var objColumn = $(this).attr('id'); if(!alreadyClicked){ alreadyClicked = true; $(this) .prepend('&lt;form method="POST" class="newInput"&gt;&lt;input type="text" name="newInput" style="width:140px"&gt;&lt;/input&gt;&lt;/form&gt;'); var elemento = $(".newInput"); var position = elemento.position(); $(".newInput").css({ 'position': 'absolute', 'top': position.top + 15, 'opacity':0.9, 'z-index':5000, }) .focus(); //on enter keypress $(document).keypress(function(e) { if(e.which == 13) { $.ajax({ url: 'modify_imp.php', type: 'post', data: { id : objName, column : objColumn }, success: function(data, status){ $("#debug").html(data); } }); } }); } //if (!alreadyClicked) end }); //end mouseenter function }, //mouseleave function function () { alreadyClicked = false; $(this).css("color","red"); $(".newInput").remove(); } ); //end .hover }); The debug is a &lt;div id="debug"&gt; &lt;/div&gt; at the end of my html page where i want to show my response from server. When i press 'ENTER' I can actually see the value for 0.1s inside that div, but then it disappears. I already tried to pass the return value to a local or global variable but it didn't work. For some reason the value inside response is lost after 0.1s, even if i pass it to another variable elsewhere. Can someone explain me why and how can i "store" the server response? EDIT: Just edited with my entire &lt;script&gt;
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26809620
answer count: 3
has answer: http://stackoverflow.com/a/33022045
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42191730
possible better answer: http://stackoverflow.com/a/34550358
favorite count: 0

http://stackoverflow.com/comment/41986438
score: 0
has text: `GetCookie` only displays the last cookie. You should append to your HTML inside the loop.
comment on: http://stackoverflow.com/q/26695727
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26788341
score: 6
favorite count: 0
type: Question
has title: How to ignore required files in node.js from istanbul coverage
upvote count: 6
has answer: http://stackoverflow.com/a/26933321
tagged with: node.js
tagged with: command-line
has body: In my code I have var es = require('event-stream'); and in my package.json, I have "scripts": { "test": "istanbul cover ./node_modules/mocha/bin/_mocha -- -R spec", } I only want to cover my main file, however it covers also event-stream's files so I get things like =============================== Coverage summary =============================== Statements : 24.74% ( 757/3060 ) Branches : 5.42% ( 88/1625 ) Functions : 15.56% ( 70/450 ) Lines : 25.37% ( 735/2897 ) ================================================================================ Is there a way to only cover my own code?
answer count: 2
accepted answer: http://stackoverflow.com/a/26933321
possible better answer: http://stackoverflow.com/a/26921512
tagged with: istanbul
has answer: http://stackoverflow.com/a/26921512
tagged with: mocha.js
type: AnsweredQuestion
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/42059847
type: QuestionComment
comment on: http://stackoverflow.com/q/26734191
type: Comment
score: 0
has text: @Shlomo on my computer with Internet Explorer 11 on Windows I don't receive the alert on https://bay180.mail.live.com/default.aspx after refreshing the page.

http://stackoverflow.com/comment/42023949
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26716478
type: AnswerComment
has text: OK, now the new window opens in a new page. I need it to open in _self, replacing the previous page. Does that make it more complicated? Also, I'm going away, so i will not respond in the near 3 hours :(

http://stackoverflow.com/a/26785365
score: 3
type: AcceptedAnswer
downvote count: 0
has body: When I opened your page with flash player debug version on firefox, I got this security error (only on firefox) : #2044: Unhandled securityError : text=Error #2048: Security sandbox violation : http://www.мультипак.org/lib/Multi_Pack/bin/MultiPuck.swf cannot load data from config.xml. at _XML_/loadXml()[xxxxxxxxxxxx\Downloads\Multi_Puck\src\_XML_.as:34] at _XML_()[xxxxxxxxxxxx\Downloads\Multi_Puck\src\_XML_.as:29] at Main/init()[xxxxxxxxxxxx\Downloads\Multi_Puck\src\Main.as:61] at flash.display::DisplayObjectContainer/addChild() at Preloader/startup()[xxxxxxxxxxxx\Downloads\Multi_Puck\src\Preloader.as:105] at Preloader/loadingFinished()[xxxxxxxxxxxx\Downloads\Multi_Puck\src\Preloader.as:99] at Preloader/checkFrame()[xxxxxxxxxxxx\Downloads\Multi_Puck\src\Preloader.as:85] I changed your local path with 'xxxxxxxxxxxx'. Try to add a crossdomain.xml and force loading it using : Security.loadPolicyFile("http://www.мультипак.org/crossdomain.xml") For more info about crossdomain.xml, take a look here : Adobe : Cross-domain policy for Flash movies To debug your online prod version in your browser, you can download and install flash player debug version here : FlashPlayer downloads I hope all this helps you to resolve your problem.
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26782603
answers question: http://stackoverflow.com/q/26782603

http://stackoverflow.com/comment/114741870
type: AnswerComment
has text: Thanks this is handy.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/52310588

http://stackoverflow.com/comment/42178531
type: AnswerComment
comment on: http://stackoverflow.com/a/26800513
has text: @lightness: also only 1 thread is used on this with latest firefox so probably my statement about single-thread container is still right
type: Comment
score: 0

http://stackoverflow.com/comment/42218463
type: AnswerComment
comment on: http://stackoverflow.com/a/26824752
type: Comment
score: 0
has text: I marked as an answer because this will work but @ROX is correct that I was looking for a more dynamic way to do it. Thank you!

http://stackoverflow.com/a/26739979
answers question: http://stackoverflow.com/q/26738822
type: Answer
has body: The following code should help you with the logic. In this example I am suing onblur to process the data. You can consider using onkeyup and onkeydown. Hope it helps! Amount:
score: 1
upvote count: 1
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26738822

http://stackoverflow.com/comment/41985876
has text: You use dot-notation: `obj.propery`, but I don't see how you could not of found that.
comment on: http://stackoverflow.com/q/26695426
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42216528
has text: why don't you just do `proxy[member]=c[member]`?
comment on: http://stackoverflow.com/q/26823722
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26678179
type: Question
score: 3
has answer: http://stackoverflow.com/a/26678358
favorite count: 0
has body: I am trying to find a simple solution to a required input type of scenario. I have multiple small forms that all send on one button save on the bottom of the page. What I am trying to accomplish is something like ngRequired, however across the whole controller, not just the individual forms. So the desired effect is pretty simple - if any of the inputs aren't filled out - set a boolean( or something) to false that disables the save button at the bottom. So my first attempt is like this - I have a model on each of the required items - there are 10 items then I have a function that checks when you try to click the button how many are chcked like this if($scope.modeltracker1){ //if there is anything inside model 1 add 1 to the tracker $scope.modeltracker += 1; } and if the counter is not 10, don't do anything (all required are not filled out) if($scope.modeltracker != 10){ //do nothing because all required are not filed out }else{ //run save, all required all filed out } So - I feel like there should be a much easier solution than my first attempt here. Maybe something along the lines of checking if any individual one of these required fields is false, don't fire? I know that ngRequied would be great for this, but unfortunately the way this has to be structured, it cannot be one large form. There has to be a much easier way to accomplish this task with angular. Any input would be much appreciated, thanks for reading!!
tagged with: angularjs
answer count: 2
has answer: http://stackoverflow.com/a/26678550
has title: Angular, required check on controller throughout multiple forms
upvote count: 3
linked to: http://stackoverflow.com/q/15300067
downvote count: 0
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/q/26738715
answer count: 2
has title: HTMLElement or document.createElement?
tagged with: javascript
favorite count: 0
upvote count: 3
has answer: http://stackoverflow.com/a/26739431
has answer: http://stackoverflow.com/a/26738863
accepted answer: http://stackoverflow.com/a/26738863
has body: I am learning Javascript, and I figured that there are two simple ways to create HTML elements: HTMLElement and document.createElement. Is one of these two deprecated, and if not which one do you think I should use ? Thanks
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42063275
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/26739431
tagged with: dom

http://stackoverflow.com/comment/42072357
score: 0
type: QuestionComment
type: Comment
has text: And the webpage you open is NOT myphpwebpage.php right?
comment on: http://stackoverflow.com/q/26742905

http://stackoverflow.com/comment/41991114
has text: No, it's not temporary, it's just fake. Chrome will give something like "C:\fakepath\filename.jpg", and Firefox will return the name property, not even a path.
comment on: http://stackoverflow.com/a/26698420
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/42098602
has comment: http://stackoverflow.com/comment/79019676
has body: Note that if you run webpack within a virtual machine (Vagrant / Virtualbox) and you change your files on the host platform, file updates in the shared folder may not trigger inotify on Ubuntu. That will cause the changes to not be picked up by webpack. see: Virtualbox ticket #10660 In my case, editing and saving the file on de guest (in vi) did trigger webpack. Editing it on the host (in PhpStorm, Notepad or any other application) dit NOT trigger webpack whatever I did. I solved it by using vagrant-fsnotify.
type: Answer
score: 11
upvote count: 11
answers question: http://stackoverflow.com/q/26708205
has comment: http://stackoverflow.com/comment/108264677
downvote count: 0

http://stackoverflow.com/q/26792687
accepted answer: http://stackoverflow.com/a/26792710
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/42161148
type: AnsweredQuestion
has title: Removing encoding in a string
type: Question
has body: I have a very strange issue - I have included a text file to extract variables from, and this happens: var_dump($kw); returns: string(19) "fut coins" echo "keyword $kw"; returns: keyword: 0f0i0f0a0 0c0o0i0n0s0 Is there anyway to remove this encoding of the 0's from the string?
tagged with: javascript
has answer: http://stackoverflow.com/a/26792710
has comment: http://stackoverflow.com/comment/42160813
score: 0
has comment: http://stackoverflow.com/comment/42161045
has comment: http://stackoverflow.com/comment/42345569
answer count: 1
has comment: http://stackoverflow.com/comment/42160724

http://stackoverflow.com/comment/41991892
has text: No i havent try that, the problem, is thats i dont know how to write it.
score: 0
comment on: http://stackoverflow.com/q/26698829
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26831411
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: skin
score: 1
has answer: http://stackoverflow.com/a/26831488
upvote count: 1
has title: Exchange CSS colors
type: Question
has body: I want to be able to give my users the possibility to change the color scheme of my website (skins), however I already have 3 different CSS files that deal with the responsive design. I wanted to be able to add the possibility of changing the color scheme without having to create 3 different CSS files for each color scheme, thus optimizing the amount of CSS files I have to maintain and remember to alter every time I make a change to the main CSS color scheme files. So my question is, is there a way to say: whenever the color is #BC37ED change it to #3748ed, for instance? Maybe using JavaScript or even in the CSS file itself? Any help is highly appreciated. Thanks!
tagged with: javascript
has comment: http://stackoverflow.com/comment/42229584
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/26749496
has comment: http://stackoverflow.com/comment/47451462
tagged with: javascript
tagged with: jquery
tagged with: datatables-1.10
tagged with: datatables
answer count: 1
score: 8
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42186184
has comment: http://stackoverflow.com/comment/47860488
has title: put data attribute on row add on DataTables 1.10
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29981988
downvote count: 0
accepted answer: http://stackoverflow.com/a/29981988
has body: I dynamically add new row on DataTables 1.10.2 using the table.row.add() method using this code: table.row.add([ '', name, target_l, details, panel.html() ]).draw(); I produced this mark-up: 1 . ID Fee All students What I want to do is to add a data-id (and other data) attribute to the newly added tr tag (on or after row insert) and make it something like this: I've managed to get the index of the newly added row using the code and it returns the last row index: var i = table.row.add([ '', name, target_l, details, panel.html() ]).index(); And also tried to perform the following to add the data-id attribute using that index: var id = $("#department_id").val(); table.row(i).attr("data-id", id); // table.row(i).data("id", id); // I wanted to try this but there is also a method called data() already in // DataTables so it will not work like in JQuery. I'm new to DataTables and already scrolled its sourcecode, red the comments. Though not good at understanding its functions that begins with _fn*(). If there's any other way without relying on these _fn*() functions, thanks!
has comment: http://stackoverflow.com/comment/48118189
upvote count: 8
type: Question

http://stackoverflow.com/comment/42050574
score: 1
has text: I'm not sure how to say about the first option. It is visually similar to the Cyrillic e umlaut (U+0451), but it is in Latin script (which is unlikely to get mixed in Cyrillic text). I think your second solution is probably what OP wants, but it will include a bunch of unused Cyrillic characters.
comment on: http://stackoverflow.com/a/26731389
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26805378
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/42184279
has comment: http://stackoverflow.com/comment/42184103
downvote count: 1
tagged with: reload
type: Question
has comment: http://stackoverflow.com/comment/42183823
tagged with: javascript
has comment: http://stackoverflow.com/comment/42192225
favorite count: 0
score: 0
has title: Refresh single div and contents inside
has body: I'm trying to refresh the datepicker and also reload/recall the javascript in Calendar.js when refreshCalendar() is called. My code for the : My Calendar Can anyone assist. What is the easiest method of doing this.

http://stackoverflow.com/q/26725628
type: Question
accepted answer: http://stackoverflow.com/a/26725906
score: 0
has title: Keeping collapsible div panel open when clicking on main content
has answer: http://stackoverflow.com/a/26725906
answer count: 1
has body: I followed a quick tutorial online for adding a collapsible div panel to my site that opens and closes via a button. However, once the panel is opened, clicking anywhere outside of the panel closes it. My question is if there is anyway to keep the panel open until ONLY the user clicks the open/close button again? Cheers, Jquery noob Slide
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42040473
has comment: http://stackoverflow.com/comment/42040462
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42040745
has comment: http://stackoverflow.com/comment/42040751
has comment: http://stackoverflow.com/comment/42040680

http://stackoverflow.com/q/26697737
tagged with: javascript
has title: Cartesian product of javascript object properties
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26698059
favorite count: 0
upvote count: 8
tagged with: cartesian-product
has comment: http://stackoverflow.com/comment/41989906
has comment: http://stackoverflow.com/comment/41990016
score: 8
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41989969
has body: I have an object of the following form (simplified test case below) var test = { shirts: { sizes: ['large', 'medium'] ,colors:['red', 'blue'] } , trousers: { type: ['formal', 'casual'] , pattern: ['plaid', 'stripes'] } }; I want to generate a cartesian product of the properties so that the output is an array of the following form: // desired output [ {shirts:{sizes:'large', color:'red'}, trousers:{type:'formal', pattern:'plaid'}} ,{shirts:{sizes:'large', color:'red'}, trousers:{type:'formal', pattern:'stripes'}} ,{shirts:{sizes:'large', color:'red'}, trousers:{type:'casual', pattern:'plaid'}} , {shirts:{sizes:'large', color:'red'}, trousers:{type:'casual', pattern:'stripes'}} ,{shirts:{sizes:'large', color:'blue'}, trousers:{type:'formal', pattern:'plaid'}} ..... and so on ] How can I achieve this? I worked up the following code (based on a modification of code for cartesian product of array from another SO post) but I seem to be tying myself in knots trying to get this to work. function myCartesianProduct(input, current) { if (!input) { return []; } var head = input[Object.keys(input)[0]]; var tail = objSlice(input); var output = []; for (var key in head) { for (var i = 0; i &lt; head[key].length; i++) { var newCurrent = copy(current); newCurrent[key] = head[key][i]; if (Object.keys(tail).length) { //if tail.length var productOfTail = myCartesianProduct(tail, newCurrent); output = output.concat(productOfTail); } else { output.push(newCurrent); } } } return output; } function objSlice(obj) { var slicedObj = angular.copy(obj); // copy object using angularJs copy method delete slicedObj[Object.keys(slicedObj)[0]]; //delete the first key return slicedObj; }; function copy(obj) { var res = {}; for (var p in obj) res[p] = obj[p]; return res; } console.log(myCartesianProduct(test)); Thanks in advance for your help with this!
accepted answer: http://stackoverflow.com/a/26698059
type: Question
linked to: http://stackoverflow.com/q/12303989

sequelize.js
type: Tag
tags question: http://stackoverflow.com/q/26817057
tag name: sequelize.js

http://stackoverflow.com/a/26914278
has body: To resolve these issues I have procedures that behave like functions pass a single-valued array that is overwritten for each subsequent call. So the call goes from: trange[i] = BENTON(e1, z1, pa1, pI_pot, pz2, pa2); ...to... BENTON(e1, z1, pa1, pI_pot, pz2, pa2, reichweite); trange[i] = reichweite[0]; My function goes from: function BENTON(e1f, z1f, a1f, I_potf, z2f, a2f) { //my stuff BENTON = ((a1f / TAU) / (z1f * z1f)) * (prnglo[q] + bzz * cz[n]); return BENTON; } ...to... function BENTON(e1f, z1f, a1f, I_potf, z2f, a2f, reichweite) { //my stuff reichweite[0] = ((a1f / TAU) / (z1f * z1f)) * (prnglo[q] + bzz * cz[n]); return reichweite; } On the other hand, for procedures that behave like subroutines I pass a multi-valued array [] that is actively populated and not overwritten. Hopefully this will help those that are new JS.
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26741078
answers question: http://stackoverflow.com/q/26741078
type: Answer

http://stackoverflow.com/q/26675182
tagged with: javascript
has comment: http://stackoverflow.com/comment/41951588
has comment: http://stackoverflow.com/comment/41949620
has comment: http://stackoverflow.com/comment/41949644
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: settimeout
score: 0
has body: var playlist = [ ['Message 1','1000'], ['Message 2','6000'], ['Message 3','1000'], ['Message 4','8000'] ]; for (i = 0; i &lt; playlist.length; i++) { setTimeout((function(x) { return function() { $("content").empty().append("&lt;p&gt;" + playlist[x][0] + " timeout: " + playlist[x][1] + "&lt;/p&gt;"); }; })(i), playlist[i][1]*i) } I'm trying to create a timer where the length of each setTimeout interval varies depending on a variable stored in an array. For example I am expecting 'Message 1' to be displayed for 1 second, followed by 'Message 2' displayed for 6 seconds, and so on through the array. However, the messages appear in an unexpected order, and the periods which they are on screen doesn't appear to relate to the corresponding delay I've specified in the array. Ideally I'd also like the process to loop back to the start of the array once it gets to the end. Any help would be much appreciated!
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26675902
has title: How can I use setTimeout within a loop with different lengths of timeout?

http://stackoverflow.com/comment/41969714
has text: Removing the line breaks did the job perfectly, this might be another problem related to the mechanism of Blogger templates, which are quite confusing. Would you like to share a link to the blog/site where this is happening ?
comment on: http://stackoverflow.com/a/26685858
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/42156948
has text: thanks a lot. As far as the get goes I will edit the post with the get source.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26788993

http://stackoverflow.com/q/26693152
tagged with: get
score: 0
has comment: http://stackoverflow.com/comment/41982357
tagged with: google-chrome-extension
has title: chrome extension option page local storage set and get
answer count: 0
type: UnansweredQuestion
tagged with: local-storage
has body: I am trying to develop a chrome extension, and when developing the option page it could not be restored successfully. I have read several posting, but didn't quite understand. Really appreciate if someone could help. var x = document.getElementById("X-Frame"); function saveOptions(){ if(x.checked){ chorme.storage.local.set({"X-Frame":"true"},function(){ console.log("x-frame saved"); }); } } function callOptions(){ chrome.storage.local.get("X-Frame", function(obj){ if(obj.X-Frame === "true"){ document.getElementById("X-Frame").checked = true; } }) } document.addEventListener('DOMContentLoaded', callOptions); document.getElementById("saveOptions").addEventListener('click',saveOptions);
tagged with: set
has comment: http://stackoverflow.com/comment/41982227
type: Question
tagged with: javascript

http://stackoverflow.com/comment/42028509
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26719146
has text: @epascarello, i have something like editor template (Asp.NET MVC) that renders form for one container. Names are like this `Spaces[0].SpaceName`. When i want to add new Space, i click on button add. And to make it easier(as costumer said) need to populate new container for space with same values as in first container. All Fields have similar classes as `space-name` or `space-prise`
score: 0

http://stackoverflow.com/comment/42105530
type: QuestionComment
comment on: http://stackoverflow.com/q/26761795
type: Comment
has text: It would help if you had a working example on jsfiddle
score: 0

http://stackoverflow.com/comment/42050963
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26729941
has text: your question's formatting is great,but you should do more research before post the question
score: 0

http://stackoverflow.com/q/26759529
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26760345
has body: Hello everyone, I'm building a drop&drag inventory panel for my webgame, but I was unable to make it work with stackable elements. I have simplified the whole inventory so that it's less confusing. FIrst off, let me explain how do I expect it to work: Every .item element can be dropped on any free .inv_slot. If I try to drop an .item element on another .item that does not contain class .stackable, it will simply activate the draggable's revert() function. if I try to drop the .item element on an .item that does have the .stackable class, it will only remove the clone/helper. (Later on I will addd an function that only increases the items stack size.) Now what's wrong with the below example : in case an .item accidentally dropped on border or between two .inv_slotslots, the Revert animation is not activated. It does work however, while dropping the .item element outside the #panel. Also if I accidentally dropped an .item between two .inv_slot elements, it will behave as if the .item was dropped on a .stackable item. So it will remove the clone instead of reverting back to it's prev. position. (Most likely an issue with the selector in drop: method) If I drop a .stackable item over another .stackable item, it does not refresh the cursor. It seems to be stuck in the drag mode which activates the "pointer" cursor. Now here's the (partialy working) example: $(document).ready(function() { //var prev_el = ''; var item_isStackable = ""; $( ".item").draggable({ scroll: true, revert: function(isValidEl) { if(isValidEl) { return false; }else{ return true; } }, helper: "clone", cursor: "pointer", stack: false, zIndex: 27, drag: function(event, ui) { item_isStackable = $(this).hasClass("stackable"); }, }); $( ".inv_slot" ).droppable({ accept: ".item", drop: function( event, ui ) { var item = $(this).find(".item"); if(item.length == 0) /// See if there any items already in the currently selected inventory slot // { console.log("Inserting"); ui.draggable.detach().appendTo($(this))…
type: AnsweredQuestion
upvote count: 3
type: Question
score: 3
tagged with: jquery-ui
accepted answer: http://stackoverflow.com/a/26760345
has title: jquery-ui : drop&drag inventory with stackable items
tagged with: javascript

wookmark
type: Tag
tags question: http://stackoverflow.com/q/26803073
tag name: wookmark

http://stackoverflow.com/q/26696868
type: AnsweredQuestion
has body: The first time typing "express" in console to create a web skeleton of nodejs, in the index.js file, I got something like this: exports.index = function(req, res){ res.render('index', { title: 'Express' }); }; After that, for another usage, I invoke "express" again to create another web skeleton, and I got different source code in the index.js file: var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res) { res.render('index', { title: 'Express' }); }); The content in app.js is the same. Why did I get this differences in source code of index.js on different time invoke "express"? Are they different express-generator version?
type: Question
has answer: http://stackoverflow.com/a/26696931
tagged with: javascript
tagged with: express
score: 0
answer count: 1
has title: Getting different skeleton each time invoke Express js?
accepted answer: http://stackoverflow.com/a/26696931
tagged with: node.js

http://stackoverflow.com/comment/42248809
type: Comment
score: 0
has text: @emmanuel the question title changed by Mubasher and he said my answer is useful for him as an answer so i provide it again...
comment on: http://stackoverflow.com/a/26825706
type: AnswerComment

http://stackoverflow.com/a/26680671
downvote count: 0
answers question: http://stackoverflow.com/q/26674382
score: 1
accepted answer of: http://stackoverflow.com/q/26674382
type: AcceptedAnswer
upvote count: 1
has body: You can't just return a react component in an onClick. I'll try to get you started on the solution. You should do something like this in the addKeybehaviour function: var newAmount = this.state.currentAmount + 1; this.setState({currentAmount: newAmount}); Now in your render function of CompetenceComponent try doing something like: var keyboardComponents = []; for (i = 0; i &lt;= this.state.currentAmount; i++) { keyboardComponents.push(&lt;KeybehaviourComponent /&gt;) } Now just put {keyboardComponents} somewhere in your return function. Hope this gets you started.
type: Answer

http://stackoverflow.com/q/26810126
has comment: http://stackoverflow.com/comment/42192813
has title: How to parse the video ID from new YouTube URLs
type: Question
has answer: http://stackoverflow.com/a/26810638
has body: I am trying to parse these URLs with Javascript. It works for about 90% of them, but some of the newer urls dont work. Does anyone know how to make it work for all? Here is my code: http://jsfiddle.net/e26zstdp/ function matchYoutubeUrl(url){ var p = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&amp;v=))((\w|-){11})(?:\S+)?$/; url = (decodeURIComponent(url)); return (url.match(p)) ? RegExp.$1 : false ; } And here are the results: https://www.youtube.com/watch?v=QGJyPfQa8No parsed: QGJyPfQa8No http://www.youtube.com/attribution_link?a=shbk6GU0PaQ&amp;u=%2Fwatch%3Fv%3D9ZEdApyi9Vw%26feature%3Dshare parsed: false https://www.youtube.com/watch?v=HEc4RUhLQcs parsed: HEc4RUhLQcs https://www.youtube.com/watch?v=DYMM0OQpq6w parsed: DYMM0OQpq6w https://www.youtube.com/watch?v=Fqhc4ksS4Ig parsed: Fqhc4ksS4Ig https://www.youtube.com/watch?v=whLHguPnK0E&amp;feature=youtu.be parsed: whLHguPnK0E https://www.youtube.com/watch?v=NapUmeWL94s parsed: NapUmeWL94s https://www.youtube.com/watch?v=7Pfu5NVoMg0 parsed: 7Pfu5NVoMg0 https://www.youtube.com/watch?v=HyJ7xOg537U parsed: HyJ7xOg537U https://www.youtube.com/watch?v=-FEXFplTURE parsed: -FEXFplTURE https://www.youtube.com/watch?v=CYBPLy7EE6o&amp;feature=youtu.be parsed: CYBPLy7EE6o https://www.youtube.com/watch?v=EcqYR0um7WA parsed: EcqYR0um7WA http://www.youtube.com/watch?v=Z8HPrR-ulk0#t=121 parsed: Z8HPrR-ulk0 https://www.youtube.com/watch?v=P7AOJp1Pgoc parsed: P7AOJp1Pgoc https://www.youtube.com/watch?v=OnuB_v961mI parsed: OnuB_v961mI http://www.youtube.com/attribution_link?a=fQwFHkx3MIk&amp;u=%2Fwatch%3Fv%3D9ZEdApyi9Vw%26feature%3Dshare parsed: false http://www.youtube.com/attribution_link?a=omtWNfY0EqE&amp;u=%2Fwatch%3Fv%3D8PQiaurIiDM%26feature%3Dshare parsed: false https://www.youtube.com/watch?v=2vmfQiXv1-k parsed: 2vmfQiXv1-k https://www.youtube.com/watch?v=foRoDppzes8 parsed: foRoDppzes8 https://www.youtube.com/watch?v=vDVawKB1FwY&amp;feature=player_detailpage#t=12 parsed: vDVaw…
accepted answer: http://stackoverflow.com/a/26810638
has answer: http://stackoverflow.com/a/26811366
answer count: 3
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26811366
has answer: http://stackoverflow.com/a/26810195
score: 0
tagged with: regex
type: AnsweredQuestion

http://stackoverflow.com/comment/42211892
type: Comment
has text: It failed for me, then worked when I tried it in incognito, and then it worked when I tried again in non-incognito. :/
score: 0
comment on: http://stackoverflow.com/q/26767578
type: QuestionComment

http://stackoverflow.com/comment/42024664
has text: @James D.: Amazing the difference full code can make :)
comment on: http://stackoverflow.com/a/26716703
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26776936
linked to: http://stackoverflow.com/q/15095933
tagged with: css
accepted answer: http://stackoverflow.com/a/26779750
type: AnsweredQuestion
tagged with: css-transitions
downvote count: 3
upvote count: 1
type: Question
has title: How to expand div on click
answer count: 2
possible better answer: http://stackoverflow.com/a/26777042
score: -2
has body: I have a widget which contains some thumbnails. When any of the thumbnails is clicked I want to expand the div to reveal more detail (another div block), overlaying the widget content but pushing content below the widget down. I want to do it with some effect (as if its expanding), using css or javascript. Here's a visual: Obviously, the expanded green box would completely hide the 2 blue boxes. This is not my comfort zone at all, so any help would be appreciated.
has answer: http://stackoverflow.com/a/26777042
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26779750
has comment: http://stackoverflow.com/comment/42132137
favorite count: 0

http://stackoverflow.com/comment/42163536
type: Comment
comment on: http://stackoverflow.com/a/26793985
type: AnswerComment
has text: Did you go to the fiddle? The location has no confirmation box because you have confirmed it in the past so it is not asking again. The fiddle has the text showing in the right side, so you can use a similar concept to that in your page. The script is currently configured to write into id=content1 and id=content2, you can adjust that to whatever you need.
score: 0

http://stackoverflow.com/comment/42183755
score: 0
type: Comment
has text: Updated to use callbacks from ajax calls.
comment on: http://stackoverflow.com/a/26788457
type: AnswerComment

http://stackoverflow.com/comment/42085372
has text: If you need to get the value of the backreferences for any purpose other than in a replacement string, you will need to use `string.match(regex)` or `regex.exec(string)` to get back the pseudo-array of results, where element `[0]` is the full string matched by the regex, and `[1]` is the match for backreference #1 (if any, null/undefined if it didn't match).
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26750594
score: 0

http://stackoverflow.com/a/26758563
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26757943
upvote count: 1
has body: Just in case you want a solution for JavaScript only (no jQuery): var id = c["id"]; var tds = document.querySelectorAll('#' + id + ' td'); for(var i = 0; i &lt; tds.length; i++) { console.log(tds[i].innerHTML); } Demo

selectors-api
tag name: selectors-api
type: Tag
tags question: http://stackoverflow.com/q/26688132
tags question: http://stackoverflow.com/q/26715062
tags question: http://stackoverflow.com/q/26827817
tags question: http://stackoverflow.com/q/26784131

http://stackoverflow.com/q/26755399
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26755775
possible better answer: http://stackoverflow.com/a/26755767
type: Question
has answer: http://stackoverflow.com/a/26755767
has body: I have an array of data returned from my server. From this array I need to get an array of Topics and an array of SubTopics: var data = [ {"topicId":1,"subTopicId":1,"topicName":"J","subTopicName":" Ar"}, {"topicId":1,"subTopicId":2,"topicName":"J","subTopicName":" Us"}, {"topicId":1,"subTopicId":3,"topicName":"J","subTopicName":" Ut"}, {"topicId":2,"subTopicId":4,"topicName":"L","subTopicName":" Ov"}, {"topicId":2,"subTopicId":5,"topicName":"L","subTopicName":" El"}, {"topicId":2,"subTopicId":6,"topicName":"L","subTopicName":" In"}, {"topicId":2,"subTopicId":7,"topicName":"L","subTopicName":" Pr"}, {"topicId":2,"subTopicId":8,"topicName":"L","subTopicName":" Va"}, {"topicId":2,"subTopicId":9,"topicName":"L","subTopicName":" Pa"} ] I have code that I use to reformat this data and just give me topic information: var topics = data.map(function (t) { return { id: t.topicId, name: t.topicName }; }); But this gives me three entries for topicId 1 and six entries for topidId 2. How I can filter out duplicate entries so I can for example the above would just give me a topic array of two entries. One for each topicId Please no jQuery, lodash or other framework solutions as I didn't include these in the tags. thanks
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26755857
has title: How can I filter an array to remove duplicate entries?
has answer: http://stackoverflow.com/a/26755781
answer count: 4
accepted answer: http://stackoverflow.com/a/26755857

http://stackoverflow.com/comment/42078590
comment on: http://stackoverflow.com/q/26744979
score: 0
type: Comment
has text: Looks like server-side issue
type: QuestionComment

http://stackoverflow.com/comment/42132552
has text: AWESOME. It worked!! I've been banging my head against the wall for sooooo long! Thanks a lot! :-)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26776025

http://stackoverflow.com/comment/42066067
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26738654
has text: Where is the data coming from? You're exporting *from* google (e.g. via Google Takeout) or ?
score: 0

http://stackoverflow.com/a/26702566
accepted answer of: http://stackoverflow.com/q/26702243
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26702243
has body: Here is the working code: Objects Input: Destination Input: The only thing that is changed from your original code is where the textbox is populated with text: Because you want to give an element (with a certain id) some content, well then you just type: document.getElementById("idOfWhatEverElement").value = "This is the content"; And the last thing, as rule I made myself: If you don't put reference to the javascript code (as a separate file) in your html document, then don't type the javascript code in the head; put it at the end of the body (just as I have done now). That way you ensure the javascript have access to all DOM elements, because they are rendered before the script itself. One last thing, try to follow xhtml standards, like always use closing tag where it is necessary: something bold and This is a paragraph
type: AcceptedAnswer

http://stackoverflow.com/q/26813011
has body: The submitform() does not take the for datas to the function. Chrome console says ReferenceError: $ is not defined. Is there anything wrong in the code ? var app = angular.module('app', []); app.controller('testimonialController', function($scope, $http) { $scope.formdata = {}; $scope.submission = false; $scope.submitform = function($scope, $http) { $http({ method: 'POST', url: 'sendmail.php', data: $.param($scope.formdata), // pass in data as strings headers: { 'Content-Type': 'application/x-www-form-urlencoded' } // set the headers so angular passing info as form data (not request payload) }). success(function() { console.log("send successfuly"); }). error(function() { console.log("It is failed"); }); }; }); Contact Form data: {{formdata}} Take a look around the site, Do you have something in mind you would like to let me know .You can contact me by filling the form below or email hello@athimannil.com Name Email Message This is the console message when use $http({ method : 'POST', url : 'sendmail.php', data : $scope.formdata, // pass in data as strings headers : { 'Content-Type': 'application/x-www-form-urlencoded' } // set the headers so angular passing info as form data (not request payload) }).
has answer: http://stackoverflow.com/a/26813059
tagged with: angularjs-controller
tagged with: angularjs-scope
type: Question
linked to: http://stackoverflow.com/q/25282436
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42198089
score: 0
has comment: http://stackoverflow.com/comment/42204444
has comment: http://stackoverflow.com/comment/42198055
has comment: http://stackoverflow.com/comment/42198015
tagged with: angularjs
type: UnansweredQuestion
has title: AngularJS $scope data is not showing any thing

http://stackoverflow.com/a/26748710
has comment: http://stackoverflow.com/comment/42081990
score: 0
has comment: http://stackoverflow.com/comment/42082003
answers question: http://stackoverflow.com/q/26748692
type: Answer
has body: $host = $_SERVER['HTTP_HOST']; $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); $extra = 'confirm.php'; header("Location: http://$host$uri/$extra");
has comment: http://stackoverflow.com/comment/42082242

http://stackoverflow.com/q/26692976
tagged with: firefox-addon-sdk
accepted answer: http://stackoverflow.com/a/26725449
type: AnsweredQuestion
score: 0
has title: Firefox Add-on sdk: Right click on submenu context to show panel
type: Question
has body: I have a context-menu that expands to two sub-menus. I would like to click on the sub-menu to display a pop-up menu where I will allow for user input. I have combed the web for some help but in vain. Here is what my main.js looks like; /** * main.js file defining context mmenu using Item and Menu * **/ var cm = require("sdk/context-menu"); var data = require("sdk/self").data; /** * Construct a panel, loading its content from the "text-entry.html" * file in the "data" directory, and loading the "get-text.js" script * into it. **/ var textEntry = require("sdk/panel").Panel({ contentURL: data.url("text-entry.html"), contentScriptFIle: data.url("get-text.js") }); var quickInkItem = cm.Item({ label: "Quick Ink", contentScriptFile: data.url("testscript.js") }); var inkToBoardItem = cm.Item({ label: "Ink to Board", onClick: handleClick, //Does not work contentScriptFile: data.url("testscript.js") }); var inkLibsMenu = cm.Menu({ label: "inkLibs", context: cm.SelectorContext("a[href]"), items: [quickInkItem, inkToBoardItem] }); //Show panel when user clicks the ink-to-Board submenu function handleClick(){ textEntry.show(); } //When the panel is displayed, it generates an event called 'show' //We will listen to that event and when it happens, send our own "show" event //to the panel's script, so the script can prepare the panel for display textEntry.on('show', function(){ textEntry.port.emit("show"); }); //Listen for the messages called "text-entered" coming from the content script //The message payload is the text the user entered. textEntry.port.on("text-entered", function(text){ console.log(text); textEntry.hide(); });
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26725449
answer count: 1

http://stackoverflow.com/a/26790972
accepted answer of: http://stackoverflow.com/q/26759288
downvote count: 0
answers question: http://stackoverflow.com/q/26759288
type: Answer
upvote count: 1
has body: maybe try var myScript = doc.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'script') ?
score: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26778225
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42134464
score: 0
has answer: http://stackoverflow.com/a/26778514
has comment: http://stackoverflow.com/comment/42134621
accepted answer: http://stackoverflow.com/a/26778514
type: AnsweredQuestion
has body: I'm trying to figure out how I can send a specific form data fname[name] jQuery code: FileUploaded: function(up, file, info) { if(info.status == 204) { jQuery.ajax({ url: 'https://domain.com/file-uploaded.php', type: 'POST', data: { fname: file } }); } } Chrome Developer Tools: (here you can see it's sending multiple form data, I want to send only fname[name]) How can I do this?
has title: POST (HTTP) + jQuery: How can I send specific form data?
tagged with: httprequest
type: Question
has comment: http://stackoverflow.com/comment/42134572
has comment: http://stackoverflow.com/comment/42134708
answer count: 1

xmlhttprequest
tags question: http://stackoverflow.com/q/26799529
tags question: http://stackoverflow.com/q/26709580
tags question: http://stackoverflow.com/q/26718211
tags question: http://stackoverflow.com/q/26679940
tags question: http://stackoverflow.com/q/26710502
tags question: http://stackoverflow.com/q/26691908
tags question: http://stackoverflow.com/q/26684415
tags question: http://stackoverflow.com/q/26751962
tag name: xmlhttprequest
tags question: http://stackoverflow.com/q/26819604
tags question: http://stackoverflow.com/q/26694987
tags question: http://stackoverflow.com/q/26787722
tags question: http://stackoverflow.com/q/26688633
tags question: http://stackoverflow.com/q/26781561
tags question: http://stackoverflow.com/q/26720201
tags question: http://stackoverflow.com/q/26742729
tags question: http://stackoverflow.com/q/26752475
tags question: http://stackoverflow.com/q/26760067
type: Tag
tags question: http://stackoverflow.com/q/26828138
tags question: http://stackoverflow.com/q/26692525
tags question: http://stackoverflow.com/q/26715578
tags question: http://stackoverflow.com/q/26683986
tags question: http://stackoverflow.com/q/26680379
tags question: http://stackoverflow.com/q/26807552
tags question: http://stackoverflow.com/q/26742914
tags question: http://stackoverflow.com/q/26764192
tags question: http://stackoverflow.com/q/26685554
tags question: http://stackoverflow.com/q/26765311

http://stackoverflow.com/comment/42175490
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26800936
score: 0
has text: OK. Please provide a solution.I have needed a unique id to identify each checkbox.

http://stackoverflow.com/comment/42153103
score: 0
type: Comment
has text: Thanks a lot .it worked like a charm.Thank you so much.I am very happy.How could I contact you if I would have further doubts? could you please help me to connect with you?
type: AnswerComment
comment on: http://stackoverflow.com/a/26772352

http://stackoverflow.com/comment/42169285
type: Comment
comment on: http://stackoverflow.com/q/26778052
score: 0
type: QuestionComment
has text: Shall the user be able to enter the price, or should that be a (maintainable) fixed value?

http://stackoverflow.com/a/26771443
downvote count: 0
has body: Try the following code. It might help you. function f(){ var h = document.getElementById("head"); h.style.removeProperty("color"); } Removing a specific style If you want to remove the whole style attribute from the tag, try this. document.getElementById("head").removeAttribute("style");
type: Answer
score: 1
answers question: http://stackoverflow.com/q/26771230
upvote count: 1

http://stackoverflow.com/comment/42124142
has text: So you are saying without any user interaction the onchange event is triggered and some file gets uploaded through whatever plugin you are using?
type: Comment
comment on: http://stackoverflow.com/q/26771853
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42000637
type: QuestionComment
has text: But in your cellForRowAtIndexPath, you're only setting your cell's text label property... Is `item.address` the image's web url?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26703606

http://stackoverflow.com/comment/42224643
comment on: http://stackoverflow.com/a/26768171
has text: default.php: ' '
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26707682
has comment: http://stackoverflow.com/comment/42010600
downvote count: 0
has comment: http://stackoverflow.com/comment/42010693
answers question: http://stackoverflow.com/q/26707369
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26707369
upvote count: 2
type: Answer
score: 2
has body: Quote OP: "I don't want the remote check to kick in unless one of the radio buttons is selected." You can use the rules('add') and rules('remove') methods to toggle the remote rule within an external change handler... $('input[name="register_domain[]"]').on('change', function() { if ($(this).val() == "owned") { $('input[name="chosen_domain"]').rules('remove', 'remote'); } else { $('input[name="chosen_domain"]').rules('add', { remote: { url: "check.php", type: "post", data: { register_domain: function() { return jQuery('input[name="register_domain[]"]'); } } } }); } });

tidal-scheduler
tag name: tidal-scheduler
type: Tag
tags question: http://stackoverflow.com/q/26748519

http://stackoverflow.com/a/26807447
has body: Checkout mizzao:timesync package in atmospherejs. This will give you the server side time TimeSync.serverTime() will give you the server time and also it is reactive. I'm using like below in my app to show minutes:seconds ` var stime= TimeSync.serverTime(); var da=new Date(stime); var rest= da.getMinutes()+":"+da.getSeconds(); return rest; ` This helper returns the server time
type: AcceptedAnswer
type: Answer
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/26806716
accepted answer of: http://stackoverflow.com/q/26806716
score: 4

http://stackoverflow.com/comment/42066856
type: QuestionComment
has text: @user3087839 it in the css ref i copied from http://antenna.io/demo/jquery-bar-rating/examples/. i dont know it use as well, but the bar displays well.
score: 0
comment on: http://stackoverflow.com/q/26740244
type: Comment

http://stackoverflow.com/comment/46060960
comment on: http://stackoverflow.com/a/26804710
type: Comment
has text: I don't think it's a good idea, the principle of marionette.behaviors is to respect the DRY principle. and it seems your solution does repeat itself.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26693980
answers question: http://stackoverflow.com/q/26693909
type: Answer
has body: It's because your $scope has no Message object. I little bit confuse, where is your code that represent Message object, but I assume your Message object is a child of groupMessage, so your controller should be something like: Services.getGroupMessage($stateParams).then(function(data){ $scope.groupMessage = data.data; // I assume it's an array $scope.Message = $scope.groupMessage[0]; // It's an example to defining an `Message` object }); I give an example to create a Message object from your array and assume it's a date object. In your HTML simply put: {{Message.toISOString()}} Without creating a new method just to get ISOString from a date.
score: 0

http://stackoverflow.com/q/26707048
type: Question
tagged with: arrays
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42006898
score: 0
has body: I'm working on a requirement to dynamically insert text depending on user office locations. Suppose we have an array of people (4 person) and office locations (20 locations - 5 per person). I'm not sure what's the best of creating a mapping between the person and locations. An example of the what I'm trying to achieve when user's visit the page: We query user's office from AD (this is an intranet so user's will log in using creds) Compare user's office location to the mapping we have for people and office locations Insert the person's name from people when user's office matches one of the office locations I don't have an issue with the first bullet point but not sure what's the best way of going about the other two, any ideas will be greatly appreciated. Hope I explained the problem well. Thanks in Advance!
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42035144
answer count: 0
has comment: http://stackoverflow.com/comment/42006803
has title: Working with Javascript object and array

http://stackoverflow.com/comment/42027459
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26717295
score: 0
has text: Have you looked at the source? What is it doing to get the version?

http://stackoverflow.com/a/26800513
has comment: http://stackoverflow.com/comment/42178531
has comment: http://stackoverflow.com/comment/42177995
has comment: http://stackoverflow.com/comment/42174548
has comment: http://stackoverflow.com/comment/42174772
has body: There are many formatting errors in your code. It should be something like: function checkPallindrome(num) { var check = num.split("").reverse().join(''); return num == check; } Things that went wrong in your function: You didn't include any parameter in your function you forgot to add () to reverse
answers question: http://stackoverflow.com/q/26800401
has comment: http://stackoverflow.com/comment/42176048
has comment: http://stackoverflow.com/comment/42177086
type: Answer
has comment: http://stackoverflow.com/comment/42174635
has comment: http://stackoverflow.com/comment/42179336
has comment: http://stackoverflow.com/comment/42174870
has comment: http://stackoverflow.com/comment/42176700
has comment: http://stackoverflow.com/comment/42176616
has comment: http://stackoverflow.com/comment/42176843
has comment: http://stackoverflow.com/comment/42175919
has comment: http://stackoverflow.com/comment/42174735
has comment: http://stackoverflow.com/comment/42175485
has comment: http://stackoverflow.com/comment/42178623
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42178826
has comment: http://stackoverflow.com/comment/42178932
has comment: http://stackoverflow.com/comment/42174849
score: 0
has comment: http://stackoverflow.com/comment/42176472
has comment: http://stackoverflow.com/comment/42175731
has comment: http://stackoverflow.com/comment/42174662
accepted answer of: http://stackoverflow.com/q/26800401

http://stackoverflow.com/a/26790853
answers question: http://stackoverflow.com/q/26790757
score: 0
type: AcceptedAnswer
has body: This is because you are not giving your html variable a initial value, so that value is undefiend. When you go to try to concat the rest of your html strings to it it converts undefiend to a string version and the rest of your html is added to that. Simply set an initial value var html = "";
type: Answer
accepted answer of: http://stackoverflow.com/q/26790757

http://stackoverflow.com/q/26763762
type: Question
accepted answer: http://stackoverflow.com/a/26796390
score: 0
has title: Get 'selected tab index' on 'active tab change' - devexpress ribbon
answer count: 1
tagged with: javascript
tagged with: asp.net
has answer: http://stackoverflow.com/a/26796390
tagged with: devexpress
has body: I am looking for a way to get the selected tab index from my Ribbon when the active tab of the ribbon is changed. I am aware that I need to have a the Client-Side Event Handler to handle this specific event, but I am quite new to JavaScript and am a bit unsure about how to get this variable (active tab index) in a JavaScript function and then pass it through to the Server-Side. Any help appreciated, Thanks
type: AnsweredQuestion

http://stackoverflow.com/comment/42209435
type: QuestionComment
comment on: http://stackoverflow.com/q/26819500
type: Comment
score: 0
has text: @Marcelo Just posted my answer regarding the typo in the same moment when you posted your second comment, sorry about that. I suggest if this solves Rons issue, you just post both of your comments as an answer and Ron accepts yours.

http://stackoverflow.com/a/26806937
has body: You can create custom filter please see demo below app.filter('emptyString', [ function() { return function(input, param) { if (!param) return input var ret = []; if (!angular.isDefined(param)) param = true; if (param) { angular.forEach(input, function(v) { if (angular.isDefined(v.comment) && v.comment) { v.comment = v.comment.replace(/^\s*/g, ''); ret.push(v); } }); } return ret; }; } ]) var app = angular.module('app', []); app.controller('homeCtrl', function($scope) { $scope.recordlist = [{ time: "10/11/2014", comment: "super" }, { time: "10/11/20004", comment: "" }, { time: "10/11/2005", comment: "" }, { time: "11/1/2014", comment: "that was ok" } ]; }); app.filter('emptyString', [ function() { return function(input, param) { if (!param) return input var ret = []; if (!angular.isDefined(param)) param = true; if (param) { angular.forEach(input, function(v) { if (angular.isDefined(v.comment) && v.comment) { v.comment = v.comment.replace(/^\s*/g, ''); ret.push(v); } }); } return ret; }; } ]) Cancelled Commented records <div class="col-xs-12" {{record.time}} {{record.comment}}
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26806156
answers question: http://stackoverflow.com/q/26806156
score: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/45188863
downvote count: 0
has body: your error seems to be in this line camera = THREE.PerspectiveCamera(50, window.innerWidth / window.innerHeight, 0.1, 1000); Try putting a new before the THREE... camera = new THREE.PerspectiveCamera(50, window.innerWidth / window.innerHeight, 0.1, 1000);
type: AcceptedAnswer
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/26693300
score: 2
accepted answer of: http://stackoverflow.com/q/26693300

http://stackoverflow.com/q/26709508
downvote count: 1
has answer: http://stackoverflow.com/a/26709836
type: AnsweredQuestion
has body: I am getting uncaught type error undefined is not a function on .empty() method. The code is title: "Criteria: "+ (criteriaText.empty() ? (criteriaIncludeText.empty()? criteriaExcludeText : criteriaIncludeText) : criteriaText) In the above code criteriaText and criteriaIncludeText are having values. I could see that in my alert message. Version of jQuery used is 1.7 . I am not really sure why it is giving uncaught typeerror undefined is not a function when there is proper value. COuld some one please help? Edit These variable are getting their values, by following code. var criteriaText = jQuery(".categorySelect option[value='"+categoryId+"']").text(); var criteriaIncludeText = jQuery(".categorySelectInclude option[value='"+categoryId+"']").text(); var criteriaExcludeText = jQuery(".categorySelectExclude option[value='"+categoryId+"']").text();
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42011091
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42010829
accepted answer: http://stackoverflow.com/a/26709836
possible better answer: http://stackoverflow.com/a/26709619
has answer: http://stackoverflow.com/a/26709619
score: 1
has comment: http://stackoverflow.com/comment/42010795
favorite count: 0
has comment: http://stackoverflow.com/comment/42010960
has comment: http://stackoverflow.com/comment/42010812
upvote count: 2
has title: uncaught typeerror undefined is not a function on .empty()

http://stackoverflow.com/comment/42068807
score: 0
type: AnswerComment
has text: The key for me was watching the property by name. Thank you for helping.
type: Comment
comment on: http://stackoverflow.com/a/26740341

http://stackoverflow.com/a/26735003
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26734724
upvote count: 1
has comment: http://stackoverflow.com/comment/42056662
type: Answer
has body: You don't have p element after img in all case. I used .nextAll(): $("h1").click(function() { $(this).nextAll("p:first").toggle(); }); fiddle

http://stackoverflow.com/q/26825857
tagged with: javascript
has comment: http://stackoverflow.com/comment/42221055
has comment: http://stackoverflow.com/comment/42226939
type: UnansweredQuestion
tagged with: php
tagged with: css
answer count: 0
score: 0
tagged with: wordpress
type: Question
has body: I'm modifying a PHP Wordpress plugin (Ebor template builder, built on aqua page builder). One of the module outputs a text box, another one outputs a background video. When using the background video, the module uses JS to read the window size and resizes the video to cover it completely. It seems to be doing by appending it the "fullheight" CSS class. I'm not using the background video functionality so I'm trying to modify that plugin to make output a textbox that resizes to screen size (instead of the video). Appreciate any input...I tried to make it work but I don't know much PHP :( This is the PHP for the text functionality : //set and create block function __construct() { $block_options = array( 'name' => 'Text', 'size' => 'span6', 'block_icon' => '', 'block_description' => 'Use to add Text, HTML or shortcodes.' ); //create the block parent::__construct('aq_ebor_text_block', $block_options); } function form($instance) { $defaults = array( 'text' => '', 'wpautop' => 0, 'code_display' => 0, 'textcenter' => 0 ); $instance = wp_parse_args($instance, $defaults); extract($instance); ?> <label for="<?php echo $this->get_field_id('title') ?>"> Title (optional) <?php echo aq_field_input('title', $block_id, $title, $size = 'full') ?> <label for="<?php echo $this->get_field_id('text') ?>"> Content <?php echo aq_field_textarea('text', $block_id, $text, $size = 'full', true) ?> <label for="<?php echo $this->get_field_id('wpautop') ?>"> Disable Auto Paragraphs? wpautop <?php echo aq_field_checkbox('wpautop', $block_id, $wpautop) ?> <label for="<?php echo $this->get_field_id('textcenter') ?>"> Center Text? <?php echo aq_field_checkbox('textcenter', $block_id, $textcenter) ?> <?php }// end form function block($instance) { extract($instance); if( !(isset( $textcenter )) ) $textcenter = 0; if( $textcenter == 1 ) echo ' '; if($title) echo ' ' . $title . ' '; if($wpautop){ echo do_shortcode(htmlspecialchars_decode($text)); } else { echo wpautop(do_shortcode(htmlspecialchars_decode…
has title: PHP: Modifying plugin outputting video to text to make it fullscreen

http://stackoverflow.com/comment/42015998
has text: What's in the 'data' value if you put a breakpoint in buildFileList? It would be interesting to see what you get if you debug. What is your controller method like? Do you get any ajax errors?
comment on: http://stackoverflow.com/q/26691943
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42109778
has text: Since IE8 is no longer supported by Microsoft; is there a specific reason you still need to support it?
comment on: http://stackoverflow.com/q/26763819
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42038890
comment on: http://stackoverflow.com/q/26724734
type: Comment
type: QuestionComment
has text: css syntax note: css properties don't get quoted. Only property values with non-word-characters do (spaces, dashes, etc). So it's `margin-left`, not `'margin-left'`. The JavaScript equivalent is the camelcased version, so on the JS side it's `marginLeft`.
score: 1

http://stackoverflow.com/comment/42078790
type: Comment
type: QuestionComment
has text: @JonathanLonowski Thanks for the clarification! I see now why the `NaN` is the output; the `{}` returns `undefined` because its actually an invocation of a block, returning `undefined`, which is then converted to a number, and since `+ "bar"` is converted to `NaN` separately as a number as well, its sum is also `NaN`.
comment on: http://stackoverflow.com/q/26726727
score: 0

http://stackoverflow.com/a/26817156
answers question: http://stackoverflow.com/q/26816579
has comment: http://stackoverflow.com/comment/42204764
has body: You could do something like the checkbox hack in css to show a message in a hidden div, Style the labels like your buttons. input[type=checkbox] { position: absolute; top: -9999px; left: -9999px; } label { background: #08C; padding: 5px; border: 1px solid rgba(0,0,0,.1); border-radius: 2px; color: white; font-weight: bold; } .to-be-changed {display:none;} input[type=checkbox]:checked ~ .to-be-changed { display:block; margin-top:30px; font-size:120%; color:red; } button 1 button 2 button 3 You need to have javascript activated for the buttons to work ! Obviously turn js off to se it working. Here's a link to the page I got the info from Css click events
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42219277

http://stackoverflow.com/a/26741159
type: Answer
has body: As said in the comments, the calls you have only enable/disable certain event listeners in the DOM. If you need functions that start/stop something, you need to define them. Assuming that turnToolOn does what you expect it to do, you need to write its "counter" function (say turnToolOff) and use that as a handler attached to your off button: $("body").on("click", "#turnOn", turnToolOn); $("body").on("click", "#turnOff", turnToolOff); /// <--- here it is And if you don't plan to remove/add on/off buttons dynamically (you can't have more than one anyway since you're using IDs), you can drop the delegated event handler (on()) and use regular binding after the DOM is ready. Here is a super simple example that uses this to toggle a class of an element: $("body").on("click", "#turnOn", turnToolOn); $("body").on("click", "#turnOff", turnToolOff); function turnToolOn() { $('#el').addClass('on'); } function turnToolOff() { $('#el').removeClass('on'); } #el { width: 50px; height: 50px; background: #eee; } #el.on { background: #0c0; } On Off And here is what on/off functions can do (binding/unbinding event handlers), so you can understand it better: $("body").on("click", "#turnOn", turnToolOn); $("body").on("click", "#turnOff", turnToolOff); function turnToolOn() { $("body").on("click", "#trigger", triggerCall); alert('trigger handler attached'); } function turnToolOff() { $("body").off("click", "#trigger", triggerCall); alert('trigger handler detached'); } function triggerCall() { $('#el').toggleClass('on'); } #el { width: 50px; height: 50px; background: #eee; } #el.on { background: #0c0; } On Off Trigger
score: 0
answers question: http://stackoverflow.com/q/26740761

http://stackoverflow.com/a/26788095
answers question: http://stackoverflow.com/q/26787742
has comment: http://stackoverflow.com/comment/42253533
has comment: http://stackoverflow.com/comment/42197117
has body: Can you show your markup for your div with the id of myModal? Also, are you looking for a multiselect? If so here is a link to jQuery's documentation on including multiple element queries in a single selector call: http://api.jquery.com/multiple-selector/ Something more like: if($('#InputEmail,#InputMessage,#InputName').val().length === 0) { alert('not filled out'); return false; } else return true; Also, if that is a direct copy/paste, you are missing a closing parenthesis on your if statement: if($('#InputEmail'&amp;&amp;'#InputMessage'&amp;&amp;'#InputName').val().length === 0)&amp;&amp; (is_email=="valid")) Also, could you please clarify what you are asking in your bootstrap .css question?
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/42253624
downvote count: 0
score: 1

http://stackoverflow.com/q/26801325
answer count: 4
type: AnsweredQuestion
has body: I try to show all lines contaning selected text from option after click on button, this is my code: text1 text2 text3 text4 text1 .... text2 .... text3 .... text1 .... I try to do something like this but it doesnt work: $(function(){ b = $("tr"); $(".show").on("click", function(){ var a = $("select option:selected").text(); $(b).hide(); if ($("tr:contains('"+a+"')").length) $(this).closest(tr).show(); }); $(".hide").on("click", function(){ $(b).show(); }); }); Can someone help me, pls :)
score: 1
has comment: http://stackoverflow.com/comment/42176127
has comment: http://stackoverflow.com/comment/42176105
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26801396
has comment: http://stackoverflow.com/comment/42176189
has title: Jquery. Find all containing text from selected
has answer: http://stackoverflow.com/a/26801434
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26801396
has comment: http://stackoverflow.com/comment/42176219
downvote count: 0
has answer: http://stackoverflow.com/a/26801373
tagged with: jquery
has answer: http://stackoverflow.com/a/26801529
favorite count: 0
linked to: http://stackoverflow.com/q/7321896
accepted answer: http://stackoverflow.com/a/26801373

http://stackoverflow.com/q/26716028
tagged with: callback
has title: jQuery: Call 'complete' callback with .stop(xxx, false)
favorite count: 0
has comment: http://stackoverflow.com/comment/42023377
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
has answer: http://stackoverflow.com/a/26718766
tagged with: jquery-animate
downvote count: 0
answer count: 1
has body: There is a library X that animates the element '.the-element' and attaches a simple complete-callback for when the animation ends. That callback must be called, otherwise the library X will stop working. The library X by itself does not support freezing (aka pausing all animations where they are) so I tried to do jQuery('.the-element').stop(false, false);. But now the callback is not called. Since jQuery does not support resuming a paused animation (would be preferred but I do not want to use a plugin for this), I want to call the complete-callback myself, so that the library X can then continue with what it does. So the question comes up: How do I call the complete-callback while using .stop(xxx, false)?
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26809177
has answer: http://stackoverflow.com/a/26809251
tagged with: post
tagged with: get
answer count: 2
has title: Ajax acting as GET method even though is POST method
downvote count: 0
accepted answer: http://stackoverflow.com/a/26809234
favorite count: 0
tagged with: ajax
has body: Hello I have encountered a problem while coding in Javascript and PHP (Ajax non jquery). I am trying to upload a file over Ajax, and handle it in PHP. This is my code: index.html PHP AJAX Upload Upload File: upload.php <?php if(is_array($_FILES)) { if(is_uploaded_file($_FILES['rad']['tmp_name'])) { $sourcePath = $_FILES['rad']['tmp_name']; $targetPath = "images/".$_FILES['rad']['name']; if(move_uploaded_file($sourcePath,$targetPath)) { echo ("uspjeh "); }} } $podatak=$_POST['var']; echo "$podatak" ?> Problem is that I dont see PHP script response in my div2 element. Ajax behaves wierd and it puzzles me. I have put JavaScript alert command under xhr.readyState condition (now commented). When I do that then I see the output, but when I close alert dialog, the browser automaticly reloads page and makes the URL like i'm using GET method (i'm using POST) and then server output dissapears. (rad in ?rad=... is the name of my input element) When I'm not using alert command then I don't see output at all, because page redirects really fast. What am I misiing?
tagged with: php
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/26809234
type: Question
type: AnsweredQuestion
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26809251

http://stackoverflow.com/comment/42142215
has text: the response is ok, so if you get the error callback the json shouldn't be ok, remove the datatype: "json" from the ajax call or create a propper json response
score: 0
comment on: http://stackoverflow.com/q/26769605
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41983163
has text: @user1144397 May I ask *why* you need this behavior?
score: 2
comment on: http://stackoverflow.com/q/26693902
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26822764
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26822596
type: Answer
has body: Definately can't be done in HTML and CSS.. JS is necessary here. Well you can use "change()" jQuery function to handle the action of changing options. Then you can take selected option value by attribute 'selected' and put it as selected option text, then use "click()" on select element and return the option text to original. This is tricky game and not clean. Other option would be to create some container to store value of selected option. In this case you will need to style this container as select button and when it's clicked the select element will be clicked (more javascript here). In your case I would search for a nice looking and powerful select element plugin, that would grand your needs.

http://stackoverflow.com/q/26748568
has comment: http://stackoverflow.com/comment/42082405
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26748661
duplicate of: http://stackoverflow.com/q/336859
has comment: http://stackoverflow.com/comment/42081979
has comment: http://stackoverflow.com/comment/42082339
type: Question
possible better answer: http://stackoverflow.com/a/26748967
answer count: 2
has answer: http://stackoverflow.com/a/26748967
tagged with: function
tagged with: javascript
has comment: http://stackoverflow.com/comment/42081855
score: 0
has answer: http://stackoverflow.com/a/26748661
has comment: http://stackoverflow.com/comment/42082147
has comment: http://stackoverflow.com/comment/42081928
tagged with: hoisting
has body: Javascript has this funny thing called function hoisting, which means we can use a function expression before (that is, visually) it is declared (caution: my wording may be incorrect, feel free to comment on it). fn1(); // works OK function fn1() {console.log('fn1');} However, if we pass a named function as an argument, function hoisting does not happen. The syntax seems very similar but I suppose this is not a function expression anymore but a named anonymous function (!). fn2(); // throws a ReferenceError as fn2 is not defined setTimeout(function fn2() {console.log('fn2')}, 0); Is it indeed a difference between a function expression and a named lambda ? Are there other notable differences between the two ? Considering fn2 is a named lambda, is the fn2 name accessible from anywhere else than in fn2 itself ?
has comment: http://stackoverflow.com/comment/42082215
linked to: http://stackoverflow.com/q/336859
has title: Javascript function hoisting not applicable when the function is passed as an argument?

http://stackoverflow.com/q/26726779
score: 0
tagged with: validation
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/26727097
type: UnansweredQuestion
has body: I only want the user to be capable of submitting the form when the values in the text boxes have been filled in and the JSON array for the I only want the user to be capable of submitting the form when the values in the text boxes have been filled in and the JSON array of images have been dragged into the correct order. The code is requiring the image_order as well as the text box inputs. Is this because it is also labelled name? How can I avoid this but still require both fields and order to be correct before submission? Sorry I'm very new to all of this. The JavaScript $(window).load(function(){ $(function() { $( "#sortable" ).sortable({ placeholder: "ui-state-highlight", cursor: 'crosshair', update: function(event, ui) { var order = $("#sortable").sortable("toArray"); order = JSON.stringify(order); correct = JSON.stringify(["4","3","2","1"]); if (order==correct){ var valid = true console.log(':)'); } } }); $( "#sortable" ).disableSelection(); $('#submit').on('click', function() { var valid = true, message = ''; $('form input').each(function() { var $this = $(this); if(!$this.val()) { var inputName = $this.attr('name'); valid = false; message += 'Please enter your ' + inputName + '\n'; } }); if(!valid) { alert(message); } else { window.location.href = "http://stackoverflow.com"; } }); }); }); The HTML Name : Address : email :
has title: Validation jQuery not validating data correctly
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26682072
has title: Three.js - Can't Load A Texture
score: 0
has answer: http://stackoverflow.com/a/26682708
tagged with: three.js
tagged with: textures
has comment: http://stackoverflow.com/comment/41963588
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27640522
tagged with: image
answer count: 2
has body: So all I want to do is grab a texture that I have saved in a folder. The error I'm getting is: "GET file:///E:/Html/Expo%20Sites/Good%20Site/tex/dirt.jpg net::ERR_FILE_NOT_FOUND" I'm getting the texture, putting it in a variable, creating the geometry, creating the material, then creating the object and assigning the material to it. I'm new to the Three.js library so I might be missing something really obvious. Here's the code if you wanna have a look. var mousePos = {x: 0.0, y: 0.0}; var windowCenterX = window.innerWidth / 2; var windowCenterY = window.innerHeight / 2; var scene = new THREE.Scene(); var camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); var renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); renderer.shadowMapenabled = true; renderer.shadowMapType = THREE.PCFSoftShadowMap; document.body.appendChild(renderer.domElement); var dirtTex = new THREE.ImageUtils.loadTexture('tex/dirt.jpg'); var geometry = new THREE.BoxGeometry( 1, 1, 1); var floor = new THREE.BoxGeometry(10, 1, 10); var material = new THREE.MeshLambertMaterial({map: dirtTex}); var cube = new THREE.Mesh(geometry, material); var floor = new THREE.Mesh(floor, material); var directionalLight = new THREE.DirectionalLight(0xCCFFCC, 1.0); var hemiLight = new THREE.HemisphereLight(0xCCFFCC, 0xCCFFCC, 0.6); cube.position.z = -5; cube.castShadow = true; cube.recieveShadow = true; scene.add(cube); floor.position.z = -5; floor.position.y = -3; floor.castShadow = true; floor.recieveShadow = true; scene.add(floor); directionalLight.position.set(0, 1, 0); directionalLight.shadowDarkness = 1.0; directionalLight.castShadow = true; directionalLight.shadowCameraVisible = true; directionalLight.shadowCameraRight = 5; directionalLight.shadowCameraLeft = -5; directionalLight.shadowCameraTop = 5; directionalLight.shadowCameraBottom = -5; scene.add(directionalLight); hemiLight.castShadow = true; scene.add(hemiLight); function Upd…
tagged with: javascript

http://stackoverflow.com/comment/42050282
type: AnswerComment
has text: how do i apply this code sir? when i use this on my netbeans they mark it read.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26731338

http://stackoverflow.com/comment/42079640
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26747165
type: QuestionComment
has text: You could pre compile the Handlebars and then take that output and compile the HAML. However since there is already a Grunt task for HamlBars I would recommend using that. Can you post a link to your Grunt file so we can try and figure out why grunt-hamlbars is not working?

http://stackoverflow.com/q/26775654
favorite count: 0
possible better answer: http://stackoverflow.com/a/26775778
tagged with: php
has answer: http://stackoverflow.com/a/26775888
accepted answer: http://stackoverflow.com/a/26775888
has answer: http://stackoverflow.com/a/26775778
type: AnsweredQuestion
score: 1
has title: Function for pop up message in HTML
linked to: http://stackoverflow.com/q/3963338
type: Question
linked to: http://stackoverflow.com/q/857670
tagged with: javascript
has body: I have HTML file. What ever the details user has entered before submitting I want user to get a pop up message where users will be able to view all the details which he/she has entered in the form. I would like to know what function to be used so that before submitting the form a pop message comes for the confirmation.
tagged with: ajax
upvote count: 2
answer count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: sqlite
downvote count: 1

http://stackoverflow.com/q/26690565
type: AnsweredQuestion
score: -2
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has body: Using this code to access the elements of a json array : var json = "{\"noteDetailList\": [ {\"linkName\": \"test1\"}]}" $.each(json, function() { console.log(data) }); to iterate gives this error : Uncaught TypeError: Cannot use 'in' operator to search for '43' in {"noteDetailList": [ {"linkName": "test1"}]} jquery-1.11.0.js:592isArraylike jquery-1.11.0.js:592jQuery.extend.each jquery-1.11.0.js:359(anonymous function) (index):24jQuery.event.dispatch jquery-1.11.0.js:4624elemData.handle jquery-1.11.0.js:4292 fiddle : http://jsfiddle.net/rsv0tn5e/1/ Am I not iterating correctly ?
type: Question
answer count: 2
downvote count: 2
has answer: http://stackoverflow.com/a/26690592
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/26690592
has title: Iterating over json gives error
has answer: http://stackoverflow.com/a/26690585
accepted answer: http://stackoverflow.com/a/26690585
upvote count: 0

http://stackoverflow.com/a/28753123
answers question: http://stackoverflow.com/q/26820679
type: Answer
upvote count: 1
score: 1
downvote count: 0
has body: I was experiencing the same issue as @AVM, by using the same procedure he is using. this is the solution to this problem: var event_title = event.title; var event_date = event._start.format(); var event_backgroundColor = event.backgroundColor; var event_borderColor = event.borderColor; $.ajax({ url: '../php/add_event.php', type: 'post', data: { title: event_title, date: event_date, backgroundColor: event_backgroundColor, borderColor: event_borderColor }, success: function(response){ alert(response); }, error: function(){ alert("error"); } }); Note the: var event_date = event._start.format(); This solved my problem, I hope it will solve yours. Thanks Mat

http://stackoverflow.com/q/26715805
answer count: 1
downvote count: 0
tagged with: javascript
has title: HandlebarsJS registerHelper for comparing two dates
favorite count: 0
type: UnansweredQuestion
tagged with: handlebars.js
upvote count: 1
score: 1
has answer: http://stackoverflow.com/a/26717144
type: Question
has body: I want to create a helper where I can compare two dates between each other, and depending if a certain date has passed to show specific HTMl elements or not. I have some data which I receive from a remote JSON which contains a "date" field. So for example: data: { date: "2014-10-04", event: "some past event, }, { date: "2014-12-06", event: "some future event, ... So, If the date has passed , I want to either hide the HTML or archive it, and the upcoming events I want to display of course. So far I tried this: Handlebars.registerHelper('has_passed', function(dateString, options) { var current_date = moment(dateString).format("YYYY-MM-DD").toUpperCase(); // The current date if(current_date> WHAT HERE???) { return options.fn(this); // if current date is "bigger" than the passed date show html } }); And my HTML looks simply like this for now {{#has_passed date}} blablabla {{/has_passed}} Clearly, this doesnt work so can anyone help me out here?? Many thanks :-)

http://stackoverflow.com/a/26773151
has body: Although I can't fix this error of yours, You can do it like this. Have a form_for or link_to with an option remote true. A controller and a route to respond to your action For example: In your routes.rb resources :relationships, only: [:create, :destroy] And in your relationships_controller.rb def create //find the user_id of the to_be_followed user // like User.find(params[:relationship][:user_id] // this :relationship comes from your controller // and current_user.relationsihps.create(followed_id: other_user_id) respond_to do |format| format.html { redirect_to user_path(other_user) } format.js end end //similarly def destroy //find the other_user, if relationship exists, destroy it end And then in your html __ _follow.html.erb &lt;%= form_for(:relationship, url: relationships_path, remote: true) do |f| %&gt; &lt;div&gt;&lt;%= f.hidden_field :followed_id, value: @user.id %&gt;&lt;/div&gt; &lt;%= f.submit "Follow", class: "btn btn-large btn-primary" %&gt; &lt;% end %&gt; similarly a partial _unfollow.html.erb with the value of the submit button changed to Unfollow. (Although I am not a big fan of hidden fields. You could set up nested routes too.) So now you can have a method in your model say is_following(user) , which would check if the current_user and the `other_user have a relationship. And say in the show page &lt;% if current_user.is_following(other_user) %&gt; &lt;%= render 'unfollow' %&gt; &lt;% else %&gt; &lt;%= render 'follow' %&gt; &lt;% end %&gt; And then you need your js.erb files to handle the JavaScript response for you. In this case name create.js.erb and edit.js.erb for example: $("some_selector_name).html("&lt;%= j render('shared/follow') %&gt;") Regarding the state machine (which i feel is kindof overkill for a two state relation) can be used in your users model maybe like state_machine :state, initial: :unfollow event :confirm_follow do transition to: :follow, from: :unfollow end state :follow do def is_following?(user) // do some checks //!!re…
has comment: http://stackoverflow.com/comment/42133080
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26768908
answers question: http://stackoverflow.com/q/26768908
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/26684196
tagged with: javascript
has body: My Phantomjs script looks like this: var page = require('webpage').create(); var fs = require('fs'); page.content = ' '; page.evaluate(function(){ }); page.render('export.png'); fs.write('1.html', page.content, 'w'); phantom.exit(); It's producing the expected PNG: one that just says "Hello World". However, the 1.html file it is producing is unexpected: Hello World In the browser, this produces "Hello WorldHello World". I was hoping that 1.html would actually be: Hello World I guess I could read the result back into Ruby and strip the tags and their contents using Nokogiri, but this seems like something that Phantom.js should be doing as part of this process. Can it do what I want?
answer count: 1
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41968847
has title: Why is Phantom.js not removing JavaScript from my HTML after processing it?
has comment: http://stackoverflow.com/comment/41967963
type: AnsweredQuestion
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/41966745
score: 1
has answer: http://stackoverflow.com/a/41709292
type: Question
upvote count: 2
accepted answer: http://stackoverflow.com/a/41709292
has comment: http://stackoverflow.com/comment/41968412

http://stackoverflow.com/a/26715365
score: 0
answers question: http://stackoverflow.com/q/26714555
type: Answer
has comment: http://stackoverflow.com/comment/42041033
has body: You will have to create some kind of overlay to detect the initial focus event of the iframe. The close button can also be part of your website still if you show it based on class. http://jsfiddle.net/cxtgn72g/4/ HTML X JS - Requires jQuery $("#overlay").click(function() { $("#iframe").addClass("big"); }); $("#close").click(function() { $("#iframe").removeClass("big"); }); CSS #iframe { width : 500px; height : 300px; position : relative; } #iframe.big { width : 600px; height : 400px; } iframe { width : 100%; height : 100%; border : none; } #overlay { position : absolute; left : 0; top : 0; width : 100%; height : 100%; } #close { display : none; } .big #close { cursor : pointer; display : block; position : absolute; right : 10px; top : 10px; content : "X"; background : red; color : white; border-radius : 25%; padding : 8px; } .big #overlay { display : none; }
has comment: http://stackoverflow.com/comment/42091840
has comment: http://stackoverflow.com/comment/42071478

http://stackoverflow.com/comment/42052521
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26717816
type: Comment
has text: I made ​​the changes but the code generates a loop. I chose to follow another way. I put all the "alt" images in an array, and after I used ".sort () + .revert ()". Thanks for the corrections.

http://stackoverflow.com/q/26720201
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/26720366
accepted answer: http://stackoverflow.com/a/26720366
type: Question
has body: I have the following Javascript code using Ajax to send input data to database from form in notebook.php when submit button is clicked. Function called addNote() should handle the Ajax operation by posting the data to add.php. For some reason this doesn't work. onreadystate function seems to fail and response text from add.php is never received to variable res. I have no idea why. Is there something missing from the code or what? Here are the contents of files notebook.js, notebook.php. notebook.js: function addNote() { ... xhr.onreadystatechange = function () { if (xhr.readyState == 4 && xhr.status == 200) { // compelete & OK var res = xhr.responseText; } } var notetext = document.getElementById("notetext").value; xhr.open("POST", "add.php", true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.send("notetext=" + notetext); } function main() { $("#submitbtn").click(function() { addNote(); }); } $(document).ready(main); notebook.php: ... Notebook <?php // add stuff to list ?>
tagged with: javascript
score: -1
has title: Why onreadystatechange fails when trying to POST data to php script?
answer count: 1
downvote count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
tagged with: xmlhttprequest
tagged with: php

http://stackoverflow.com/comment/42126671
type: QuestionComment
type: Comment
has text: No,It is still showing same error. I have to handle it through Javascript. But i don't know how to handle it.. The problem is server is unable to access the contactus.html page.thankyou for responding
comment on: http://stackoverflow.com/q/26773509
score: 0

http://stackoverflow.com/a/26772825
type: Answer
has comment: http://stackoverflow.com/comment/46676277
upvote count: 9
has body: You can use the "data" function to set the initial values: var PRESELECTED_FRUITS = [ { id: '1', text: 'Apple' }, { id: '2', text: 'Mango' }, { id: '3', text: 'Orange' } ]; $('.myList').select2('data', PRESELECTED_FRUITS) Note: The "val" function is another way to set the initial values, but you only specify the ids with that function. In that case you would have to supply an "initSelection" function that builds the objects from the ids. Also note that the "id" option is not the only option that is forcing you to use a hidden input. You cannot use the "ajax" option with a select element either. As for the "id" option, I don't think you need it. Just put logic in the ajax "results" function so it builds an array of objects that have the proper id and text properties, or have the server return objects with those properties. jsfiddle demo
score: 9
answers question: http://stackoverflow.com/q/26730167
downvote count: 0
has comment: http://stackoverflow.com/comment/46676677

http://stackoverflow.com/q/26812850
favorite count: 0
has body: I'm taking tutorial in CodeSchool about angular and I try to create my own experiment in html5 and angular new version in vs2012. I try to test angular repeat but the problem is HTML5 can't render my angular. When I try to run my page, the repeater only show the angular statement {{item.name}}:{{item.quantity}} not the result. Why? -"show code below" Angular script : application.js : $(function () { var app = angular.module('zaskarCorp', []); app.controller('kirito', function ($scope) { $scope.items = [{ "name": "dual sword", "quantity": 2 }, { "name": "gun", "quantity": 1 }, { "name": "laser sword", "quantity": 1 }]; }); }); {{item.name}}:{{item.quantity}} As you can see I add data- in my angular because I use html5. -"I hate warnings"
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/26812914
has answer: http://stackoverflow.com/a/26812914
has comment: http://stackoverflow.com/comment/42197837
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26812917
has answer: http://stackoverflow.com/a/35498681
upvote count: 1
has comment: http://stackoverflow.com/comment/42197807
type: Question
has comment: http://stackoverflow.com/comment/42197850
has comment: http://stackoverflow.com/comment/42197847
has comment: http://stackoverflow.com/comment/42197833
tagged with: javascript
has comment: http://stackoverflow.com/comment/42197835
answer count: 3
accepted answer: http://stackoverflow.com/a/26812917
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has title: Use Angular with HTML5

http://stackoverflow.com/comment/41997308
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26701822
has text: Thank you Hatsjoem, unfortunately doing that makes my drop down menu go blank, so I think I am getting JSON data since my drop down menu displays each character from my JSON output above row by row.

http://stackoverflow.com/q/26676089
tagged with: web-worker
has comment: http://stackoverflow.com/comment/41953117
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/41951310
has title: HTML5 WebWorker send & receive Number
upvote count: 2
linked to: http://stackoverflow.com/q/4019230
has answer: http://stackoverflow.com/a/26677641
type: AnsweredQuestion
has body: How to send a number to webworker? How to receive a number in webworker? if possible, How to do this without using JSON or JavaScript Object, because using it will add extra line of code .. I try to create timer in webworker if I send string "start" to webworker, webworker will begin the interval( the timer ) if I send a number to webworker, webworker will set the duration of interval but I don't know how to send a number, I knew argument passed to webworker should be a string, I already read few tutorial, but I still don't understand what to do so my webworker can recognize a number.. because I try parseInt() and is not work .. Here's my code in HTML window.onload = function(){ var worker = new Worker("Thread.js"); worker.postMessage("1500"); //set duration of interval worker.postMessage("start"); //start the interval worker.onmessage = function(e){ document.body.innerHTML += ' worker receive: '+e.data+' '; } worker.onerror = function(e){ document.body.innderHTML += " worker error"+e.data+" "; } } Thread.js onmessage = function(e){ var msg = e.data ; var timer; var duration = 1000; //default duration try{ var number = parseInt(msg); msg = number; }catch(e){ } //start the interval if(msg === "start"){ timer = setInterval(function(){ postMessage( "lalala" ); }, duration); } else if(msg === "stop"){ clearInterval(timer); } //set duration else if(!isNaN(msg)){ duration = msg; } }
type: Question
downvote count: 4
has comment: http://stackoverflow.com/comment/41951321
score: -2
accepted answer: http://stackoverflow.com/a/26677641
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/42118914
has text: One other way is to mark the field as "text". Then put it into a div with display:none. Then add the div to the form.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26764378

http://stackoverflow.com/comment/41997649
type: Comment
type: QuestionComment
has text: As I mentioned on the previous comment, modifying the `else` part to take the removal action instead of adding a handler for the `click` event seems to work: http://jsfiddle.net/4g8nL9t5/
comment on: http://stackoverflow.com/q/26701767
score: 0

http://stackoverflow.com/comment/42123631
type: Comment
comment on: http://stackoverflow.com/a/26771827
type: AnswerComment
score: 0
has text: this should be a comment. not an answer.

http://stackoverflow.com/comment/42101104
type: QuestionComment
comment on: http://stackoverflow.com/q/26759753
has text: I see, do you know what 'object expected' means? I assume it means it's looking for an ID or something, but the error message doesn't appear to be very helpful. Thanks for replying!
score: 0
type: Comment

http://stackoverflow.com/comment/41960317
score: 0
type: Comment
type: QuestionComment
has text: @juvian Thanks I didnt know it was jquery . I cannot use jquery because I am writing this for offline aplication
comment on: http://stackoverflow.com/q/26680689

http://stackoverflow.com/q/26753029
type: UnansweredQuestion
tagged with: vb.net
has answer: http://stackoverflow.com/a/26753309
has answer: http://stackoverflow.com/a/26754315
type: Question
has answer: http://stackoverflow.com/a/26753186
has answer: http://stackoverflow.com/a/26753807
score: -2
has title: How many characters 2 bytes can hold?
has comment: http://stackoverflow.com/comment/42089331
downvote count: 4
tagged with: javascript
favorite count: 0
answer count: 4
has body: If I say 2 bytes can hold 510 characters of data will I be wrong? based on the fact that 1 byte can hold 0-255 max character
tagged with: c++
upvote count: 2

http://stackoverflow.com/comment/42065948
type: AnswerComment
has text: @user2002495: I know the listener was getting invoked, but when it was getting invoked "this" was not pointing to the `listener` object, was it? The code I provided was one of several ways to solve this problem.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26727533

http://stackoverflow.com/comment/42106151
score: 1
comment on: http://stackoverflow.com/q/26758748
type: Comment
type: QuestionComment
has text: "I'm using Google Apps Script" - no, you're not, at least not in your fiddle example.

http://stackoverflow.com/q/26695413
favorite count: 0
answer count: 0
type: UnansweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: mobile
tagged with: javascript
tagged with: jquery
has title: Jquery multiple classes not working on mobile browsers - how do I trace the conflicts?
has body: I'm trying to figure out why my navigation menu will not work within mobile browsers. Ive tried android and chrome mobile and it doesnt work. Sometimes if I load the page, then navigate to a new page, and come back, the menutoggle works fine, but it does not seem to work: mshake.honeybadgerofmoney.com in the upper right corner. BUT right click > inspect element then click the mobile phone icon to simulate a mobile browser to see the behavior I'm referencing. The menu appears on mobile, but it does not navigate to the anchor link as it should. I've tried to: change the loading order of the scripts loading in my header tag Menu About Work Samples Services We Provide Contact Us and the JS portion: Any ideas?
upvote count: 1

http://stackoverflow.com/q/26721791
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42034344
has body: I perform a test if a string contains a substring, if yes, I would like to have the substring that not matched var string = "Hello world"; var toMatch = new RegExp('world', 'i'); if (string.match(toMatch)){ // should return "Hello " }
has comment: http://stackoverflow.com/comment/42033376
type: Question
has comment: http://stackoverflow.com/comment/42033462
tagged with: javascript
score: 0
upvote count: 1
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/42033453
favorite count: 0
has answer: http://stackoverflow.com/a/26721839
accepted answer: http://stackoverflow.com/a/26721839
has comment: http://stackoverflow.com/comment/42033577
has title: match regex - How to get the difference between the two strings when matched
has comment: http://stackoverflow.com/comment/42033409

http://stackoverflow.com/q/26737844
upvote count: 1
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/44700743
has title: Are Leaflet.js and leaflet-indoors reliant on external map providers?
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/51723895
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
type: Question
has body: I am new to javascript and indoor/outdoor mapping, and I've only been coding for a little over a year, but I got a job (working for free) as a coder for a startup company that creates indoor location and guidance systems. This has not been my first task for this company but its the first task that I feel may be a little out of my depth but I think I could probably handle it with a little help from the proagramming community! What I need to do is create an interactive indoor location map that displays in real time the locations of various people and things on the map. It is to be part of an indoor location and tracking systems. The locations of things are gotten using static bluetooth beacons located around the building that recieve information from bluetooth tags that will be attatched to the person or thing that is being tracked. I would like if you could clear up some things related to Leaflet.js and leaflet-indoor. From what I have researched, it seems leaflet relies on external map providers such as OpenStreetMap or Mapbox, and uses geojson data to interact with those maps. An indoor map would be an extra layer, a geojson feature array, sitting on top of the other map layer. Leaflet/Leaflet-indoor then allows you to create the interactivity of that map. I will probably need to have an indoor map of a building on its own, without any surrounding areas, it looks to that when using the above APIs, you have to have your indoor map sitting over a full outdoor map. If I was to create my own SVG maps with Illustrator or Inkscape, would it be possible to use Leaflet to create the interactivity of that map? Would I still have to use geojson to create the coordinate references for the walls and paths of that map? Or is there a way to only display the indoor map and remove the surrounding areas with leaflet? I think I'm leaning more towards creating my own SVG maps and trying to interact with them using javascript, with or without Leaflet. I know Leaflet has a plugin for l…
tagged with: dictionary
tagged with: indoor-positioning-system
tagged with: leaflet
has comment: http://stackoverflow.com/comment/51723843

http://stackoverflow.com/q/26762258
has answer: http://stackoverflow.com/a/26762425
tagged with: javascript
score: 0
answer count: 1
has title: Bootstrap date picker-disable and enable on condition
accepted answer: http://stackoverflow.com/a/26762425
tagged with: bootstrap-datepicker
tagged with: datepicker
has body: I am using this date picker. http://bootstrap-datepicker.readthedocs.org/en/release/ My concern is that I want to enable date picker on some condition. For example : I have a select box of a country and if country is US, I want to enable date picker otherwise disable it. Disabling the date picker means user can not select date or No date picker should pop-up. I am selecting date picker by date picker calendar icon not with textbook.
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
type: Question

http://stackoverflow.com/a/26690574
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26690518
type: Answer
answers question: http://stackoverflow.com/q/26690518
downvote count: 0
has body: Just use a JSON validator tool such as http://jsonlint.com/ ... it's must faster than trying to spot the error. Booleans should be lowercased. Parse error on line 49: ... "v": True -----------------------^ Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['
score: 1
has comment: http://stackoverflow.com/comment/41977881

http://stackoverflow.com/q/26692575
has body: Given a 40x30 array of colors what would be the fastest way to display them on the screen in a 400x300 canvas? That is, each color would require 100 pixels in the canvas element. Using the canvas element in HTML5 I created 4 possible ways to do it. http://jsperf.com/pixel-plotting Random pixel data is loaded into the 40x30 array. It is then displayed in a canvas of size 400x300 such that each logical pixel is represented by 100 pixels on the screen. The fastest way (using Chrome 38.0) was to create the image data in a hidden canvas and copy it using toDataURL into the canvas that is displayed on the screen. The property imageSmoothingEnabled is set to false to stop the pixels blurring when they are scaled upwards. Is there any other method of doing this? I tried using small canvas dimensions and just scaling it up in CSS but this led to the pixels being blurred. I'd like to know how the test stands in other web browsers; especially mobile phone ones. Drawing the pixel data onto the screen is quite important as it needs to happen at least 30 times a second so even a small tweak could improve efficiency a lot. Here is the code for the four ways I tested. Method 1 var png = document.createElement("img"); var c2 = document.getElementById("myCanvas"); var ctx2 = c2.getContext("2d"); var c1 = document.createElement("canvas"); c1.width = 40; c1.height = 30; var ctx1 = c1.getContext("2d"); var imgData = ctx1.createImageData(40, 30); for (var i=0; i&lt;imgData.data.length; i+=4) { var x = (i/4)%40; var y = Math.floor(i/160); imgData.data[i] = pixelData1[x][y].r; imgData.data[i+1] = pixelData1[x][y].g; imgData.data[i+2] = pixelData1[x][y].b; imgData.data[i+3] = 255; } ctx1.putImageData(imgData, 0, 0); png.src = c1.toDataURL("image/png"); c2.width = 400; c2.height = 300; ctx2.imageSmoothingEnabled = false; ctx2.drawImage(png, 0, 0, 400, 300); Method 2 var c = document.getElementById("myCanvas"); c.width = 400; c.height = 300; var ctx = c.getContext("2d"); var imgData = ctx.cre…
has comment: http://stackoverflow.com/comment/41984107
type: Question
has comment: http://stackoverflow.com/comment/41989035
has title: HTML5 Canvas - Fastest way to display an array of pixel colors on the screen
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/42152104
tagged with: draw
tagged with: canvas
answer count: 1
downvote count: 1
favorite count: 0
upvote count: 5
has comment: http://stackoverflow.com/comment/41984540
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26790654
has comment: http://stackoverflow.com/comment/42028014
tagged with: pixel

http://stackoverflow.com/q/26830115
type: Question
tagged with: browser-cache
has body: I have a js+html single page app (angular) deployed on apache. It contains an index.html that includes (using script and link tag) a js and a css file both suffixed with a timestamp to allow refreshing on redeploy. But now it appears that index.html is getting cached and clients need a 'hard refresh' because the index.html will point to the old timestamps (and the old js and css is loaded locally since on the server there are just the files suffixed with the new time stamp). If I exclude index.html from cache using : &lt;filesMatch "index\.html$"&gt; Header set Cache-Control "max-age=0, no-store, no-cache, must-revalidate" will this exclude from cache the included js and css? Or the js and css will be cached until I change the time stamp suffix (on next version deploy) as I expect? Is this the right way to deal with caching of single page apps (it's an angular app) ?
tagged with: javascript
upvote count: 2
tagged with: apache
favorite count: 0
has title: apache index.html no-cache and included resources
tagged with: angularjs
type: UnansweredQuestion
tagged with: cache-control
score: 2
answer count: 0
downvote count: 0

http://stackoverflow.com/comment/41995964
comment on: http://stackoverflow.com/a/26688978
has text: Your good man :D,,, Okay thanks for your help :) Sorry troublesome :)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26742958
has answer: http://stackoverflow.com/a/26743136
type: Question
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26743136
answer count: 2
has title: Immediately stop a setTimeout loop without finishing current cycle
has answer: http://stackoverflow.com/a/26743218
has comment: http://stackoverflow.com/comment/42089600
has comment: http://stackoverflow.com/comment/42072134
possible better answer: http://stackoverflow.com/a/26743218
has body: Im creating a user operated random selector. Users hit a button and the system selects two random results (which will be videos). The page will then alternately highlight two random results - they user can hit the button again and they can choose the video they want. Its all working quite nicely, but the alternating highlighting is done with a setTimeout loop which finishes its current cycle, rather than stopping immediately. how would I get it so that when the user presses the 'select' button the flit function stops immediately - not when the current loop is over? Here's the fiddle http://jsfiddle.net/zandergrin/tmwst5z9/4/ ps - apologies, but this is a work in progrees - I know there's a few messy bits in here... var interval = 0; function random() { // create the array var posts = ["post 1", "post 2", "post 3", "post 4", "post 5", "post 6", "post 7", "post 8", "post 9", "post 10"]; var results = posts // Shuffle array .sort(function () { return .5 - Math.random() }) // Get first 2 items .slice(0, 2); var post1 = results[0]; var post2 = results[1]; // add them to the DOM $('#res1').html(post1); $('#res2').html(post2); // loop it interval = setTimeout(random, 100); } function start() { // Hide the start button $("#start").css("display", "none"); $("#stop").css("display", "block"); // Start the randomizer random(); } function stop() { // Hide the stop button and stop the random() timeout clearTimeout(interval); $("#stop").css("display", "none"); $("#select").css("display", "block"); // set the inital background colour $("#res1").css({'background': '#123','color': '#fff'}); $("#res2").css({'background': '#eee','color': '#000'}); //create a function to flick between items function flit() { //color the results setTimeout(function () { $("#res1").css({'background': '#eee','color': '#000'}); $("#res2").css({'background': '#123','color': '#fff'}); }, 800); //colour again after a delay setTimeout(function () { $("#res1").css({'background': '#123','color': '#fff'}); $("#res…
type: AnsweredQuestion
tagged with: settimeout
has comment: http://stackoverflow.com/comment/42111368

http://stackoverflow.com/comment/42157619
score: 0
has text: `$('body').concat(['foo'])` --- according to what you say - this code must work (except it does not)
type: Comment
comment on: http://stackoverflow.com/a/26790670
type: AnswerComment

cryptography
tag name: cryptography
type: Tag
tags question: http://stackoverflow.com/q/26822354
tags question: http://stackoverflow.com/q/26819245

http://stackoverflow.com/a/26813012
has comment: http://stackoverflow.com/comment/42271793
type: Answer
has comment: http://stackoverflow.com/comment/42270060
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26812720
has body: Because you are using the "URL encoded" method of providing your data to the AJAX POST: data: 'password=' + password, //data jQuery is treating the "+" in your password as a URL encoded character (it is a reserved character in URLs), and therefore it gets converted to its plaintext equivalent (a space character) before PHP gets a chance to process the POST. To fix it, change it to: data: {password: password}, //data For future troubleshooting of AJAX requests: inspecting the request via developer tools in the browser would have probably pointed you to the solution pretty quickly.
accepted answer of: http://stackoverflow.com/q/26812720
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/42291859
type: Comment
comment on: http://stackoverflow.com/q/26740402
has text: $('li#someID.someClass').removeClass('someClass');
score: 0
type: QuestionComment

http://stackoverflow.com/q/26752702
tagged with: javascript
score: 0
tagged with: google-chrome-app
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/42097651
has title: Extension gcm notification can't open
has body: i writting a extention gcm notification for chrome. When i sign in account gmail on chrome, first, i can open extension normal. I close extension appication, i reopen extension application, but application can't show. When i sign out account gmail on chrome, i can close open normal application. i don't know why. Background.js // Returns a new notification ID used in the notification. var registerWindowCreated = false; function getNotificationId() { var id = Math.floor(Math.random() * 9007199254740992) + 1; return id.toString(); } function messageReceived(message) { // A message is an object with a data property that // consists of key-value pairs. // Concatenate all key-value pairs to form a display string. var messageString = ""; for (var key in message.data) { if (messageString != "") messageString += ", " messageString += message.data[key]; //messageString += key + ":" + message.data[key]; } console.log("Message received: " + messageString); // Pop up a notification to show the GCM message. chrome.notifications.create(getNotificationId(), { title: 'NETWORK MONITOR', iconUrl: 'gcm_128.png', type: 'basic', message: messageString }, function() { if(registerWindowCreated==false) { chrome.app.window.create( "index.html", { width: 800, height: 600, frame: 'chrome' }, function(appWin) {} ); } }); } function firstTimeRegistration() { chrome.storage.local.get("registered", function(result) { // If already registered, bail out. if (result["registered"]) return; registerWindowCreated = true; chrome.app.window.create( "index.html", { width: 800, height: 600, frame: 'chrome' }, function(appWin) {} ); }); } // Set up a listener for GCM message event. chrome.gcm.onMessage.addListener(messageReceived); // Set up listeners to trigger the first time registration. chrome.app.runtime.onLaunched.addListener(firstTimeRegistration); chrome.runtime.onInstalled.addListener(firstTimeRegistration); chrome.runtime.onStartup.addListener(firstTimeRegistration); manifest.json { "name": "Networ…
has comment: http://stackoverflow.com/comment/42089864
type: Question
has comment: http://stackoverflow.com/comment/42089586
has comment: http://stackoverflow.com/comment/42123057

http://stackoverflow.com/comment/42013743
type: QuestionComment
score: 2
has text: Look at using a REST-based system on the server, in which case the request type provides the CRUD operation to perform. That would probably be a good pattern for you to start with.
comment on: http://stackoverflow.com/q/26711196
type: Comment

http://stackoverflow.com/comment/42284118
has text: you can shield yourself from such errors given that you are throwing custom exception from server which you can identify on client...
comment on: http://stackoverflow.com/q/26811211
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42141630
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26782178
has text: How can I check this? (I'm a newbie, I started coding AJAX yesterday as I said) If you mean inside PHP, I tried echoing the result and showing them with alerts but nothing happens...
type: Comment

http://stackoverflow.com/comment/41969711
type: Comment
comment on: http://stackoverflow.com/a/26685867
type: AnswerComment
has text: Not sure . . . The above code works for me. Do you have other code on your page?
score: 0

http://stackoverflow.com/a/26816507
downvote count: 0
score: 1
has body: if you see {{name}} its means that your angular.js file was not loaded I put your code in plunker and it works fine
answers question: http://stackoverflow.com/q/26816270
type: Answer
upvote count: 1

http://stackoverflow.com/q/26734682
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/2221167
has answer: http://stackoverflow.com/a/26735156
score: -4
has title: How to round off number at decimal places
duplicate of: http://stackoverflow.com/q/2221167
type: Question
has comment: http://stackoverflow.com/comment/42056026
tagged with: javascript
has comment: http://stackoverflow.com/comment/42055999
downvote count: 4
has comment: http://stackoverflow.com/comment/42055947
upvote count: 0
answer count: 1
has body: 44571.123 * 75.46 = 3363336.94158, But I want the value 3363336.942. So do i write code in java script
favorite count: 0

http://stackoverflow.com/a/26760801
has comment: http://stackoverflow.com/comment/42103032
has body: This would display a popup window every 5 after the page is ready. No it wouldn't, it would show an alert repeatedly with no delay and/or cause a "too much recursion" error, because setTimeout(testTimeout(), 5000) calls testTimeout and passes its return value into setTimeout, just like foo(bar()) calls bar and passes its return value into foo. If you remove the (): function testTimeout() { alert("testing timeout"); setTimeout(testTimeout, 5000); // here --------------^ } Then it would do that. What would happen if then I called testTimeout from a button click? You'd end up with the function being called twice as often (more than once every 5 seconds), because every time you call it, it reschedules itself. A third time would make it more frequently still (three times/second), and so on. If you want to avoid that, one option is to remember the timer handle and cancel any outstanding timed callback if you call the function before then: var handle = 0; function testTimeout() { clearTimeout(handle); // Clears the timed call if we're being called beforehand alert("testing timeout"); handle = setTimeout(testTimeout, 5000); } (I initialized handle with 0 because calling clearTimeout with a 0 is a no-op.)
has comment: http://stackoverflow.com/comment/42102962
accepted answer of: http://stackoverflow.com/q/26760717
has comment: http://stackoverflow.com/comment/42102990
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26760717
has comment: http://stackoverflow.com/comment/42104007
upvote count: 2

http://stackoverflow.com/q/26729523
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26729572
has answer: http://stackoverflow.com/a/26729572
type: Question
score: 0
answer count: 2
tagged with: javascript
has title: Back the calling page javascript
has answer: http://stackoverflow.com/a/26729580
has body: Hi there I want to back to a calling page My page's process is A->B->C and sometimes A->C, so i want to back like C->B->A or C->A by using button back I have tried this one in each page window.history.back(); but it work in this way A->B->C and back C->B->C Thanks in advance
accepted answer: http://stackoverflow.com/a/26729580
has comment: http://stackoverflow.com/comment/42053064
has comment: http://stackoverflow.com/comment/42047178
has comment: http://stackoverflow.com/comment/42047069
has comment: http://stackoverflow.com/comment/42059918

http://stackoverflow.com/q/26678060
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26679678
has answer: http://stackoverflow.com/a/26691072
type: Question
tagged with: jquery-mobile
tagged with: javascript
has answer: http://stackoverflow.com/a/26682290
score: 0
answer count: 3
has body: I'm looking for a way to show alerts when the app is minimized or the screen is locked. It appears that I have to use the official PushPlugin to make it happen - looks like I'll have to register the device and then wait for the notifications to come through. Question: Is there a way to push notifications from the app itself to the lock screen that does not use PushPlugin?
tagged with: push-notification
linked to: http://stackoverflow.com/q/25840599
tagged with: cordova
possible better answer: http://stackoverflow.com/a/26679678
tagged with: android
accepted answer: http://stackoverflow.com/a/26691072
has title: Cordova / PhoneGap push notifications without a server

http://stackoverflow.com/q/26699392
has title: Global mutable state of client-side applications
has comment: http://stackoverflow.com/comment/41992612
has comment: http://stackoverflow.com/comment/41992773
score: 1
tagged with: client-side
favorite count: 0
accepted answer: http://stackoverflow.com/a/26699889
has comment: http://stackoverflow.com/comment/41992665
has answer: http://stackoverflow.com/a/26699743
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41992846
possible better answer: http://stackoverflow.com/a/26699743
has comment: http://stackoverflow.com/comment/41992679
tagged with: dom
has comment: http://stackoverflow.com/comment/41992644
type: Question
has comment: http://stackoverflow.com/comment/41992897
has body: This is probably a very generic (and maybe naive) question. As I understand, the programming model of a "client-side" application (i.e. an application that runs in the browser) implies that there is a single shared mutable object -- DOM of the web page -- to be updated by the javascript program. Naive applications I have seen consists of dozens JS callbacks that update one large shared DOM, Is it correct ? How do modern JS frameworks manage it ? How do they implement data hiding ?
answer count: 2
has answer: http://stackoverflow.com/a/26699889
has comment: http://stackoverflow.com/comment/41994001
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/26768011
answers question: http://stackoverflow.com/q/26767922
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26767922
type: Answer
has body: I think what you're after is $rootScope. Scopes also inherit, so if you define something in a parent scope and you don't override it in the child scope, you can access it. function MainController($scope, $rootScope) { $rootScope.sharedVar = 'Hello'; } function Child1Controller($scope, $rootScope) { //access $rootScope.sharedVar; } function Child2Controller($scope, $rootScope) { //access $rootScope.sharedVar; } EDIT as Anthony Chu mentioned, you could also create a service and inject it into any controllers that need the shared value.
upvote count: 1

addition
tags question: http://stackoverflow.com/q/26819998
tags question: http://stackoverflow.com/q/26821092
type: Tag
tag name: addition

http://stackoverflow.com/comment/41959853
type: Comment
type: QuestionComment
score: 1
has text: I'd missed the bit about the tabindex attribute. That's really bad. Curiously the HTML5 validators seem to miss it too.
comment on: http://stackoverflow.com/q/26678347

http://stackoverflow.com/comment/123189784
type: Comment
comment on: http://stackoverflow.com/q/26781561
has text: If you haven't yet, take a look into this thread [https://stackoverflow.com/questions/26061856/javascript-cant-access-private-properties/26063201#26063201]. depends on wich runtime that code is being executed and the server side configuration. There are 347B missing, maybe is some information (HTTP header) that the browser doesn't need to render/display. The main question could be, where that 347B was stored? [https://stackoverflow.com/questions/2659952/maximum-length-of-http-get-request]
score: 0
type: QuestionComment

http://stackoverflow.com/q/26790450
tagged with: printing
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26790803
has answer: http://stackoverflow.com/a/26790803
type: Question
answer count: 2
has body: I am building a page in ExpressionEngine and each time the user adds a new image, the ID of the img element increments by one (to give each image a unique id). So for example, if admin uploads 3 images ids for each are mainImg0, mainImg1, mainImg2. User can add as many pictures as they need to. I'm using the following javascript/jquery to allow frontend user to those print images with an input button, but right now the code only prints the first image. What's the best way in js to grab each unique id so that when user clicks print, the respective image opens in new tab and printed? Here's my current js: $(document).ready(function(){ $('#printImg').click(function(){ pwin = window.open(document.getElementById("mainImg0").src,"_blank"); pwin.onload = function () {window.print();} }); }); Here's output of html: Click To Zoom Image Click To Zoom Image Click To Zoom Image
has answer: http://stackoverflow.com/a/26790614
score: 0
tagged with: expressionengine
has title: getElementById that have existing ids which are created dynamically
accepted answer: http://stackoverflow.com/a/26790614
tagged with: javascript
tagged with: image
has comment: http://stackoverflow.com/comment/42156987

http://stackoverflow.com/a/26804292
score: 2
answers question: http://stackoverflow.com/q/26804143
has body: The first issue is that there is no function call because it is inlined in this case. Second issue is that even if you make the function non-inlineable (in chrome), its code is just sitting in instruction cache and hit very well, so the difference is really hard to see. For your second jsperf, allocating a new function object is completely different task from calling a function, it's comparing apples and oranges.
has comment: http://stackoverflow.com/comment/42182624
upvote count: 2
downvote count: 0
type: Answer

http://stackoverflow.com/comment/42108430
comment on: http://stackoverflow.com/q/26760323
score: 0
type: QuestionComment
type: Comment
has text: I think you need `.each(animLink)` instead of `.call(animLink)`.

http://stackoverflow.com/a/26812741
upvote count: 1
answers question: http://stackoverflow.com/q/26812650
score: 1
downvote count: 0
type: Answer
has body: Try func.displayName = "whatever"; but it may not work in all browsers. See Function.displayName : and same thing in Chromium
has comment: http://stackoverflow.com/comment/42197610

http://stackoverflow.com/q/26721227
tagged with: mongodb
has body: I'm working a codebase with lots of code directly referencing documents by id for example user : { user_id, username, ...} And there are tons of places that directly reference user.user_id. I'm trying to make a mongoose.js population on the user_id field on a separate document, but it will only let me specify it like this user_id : { type : Schema.Types.ObjectId, ref : 'User' } Seeing as how I've already used user_id, how can I make a related population with a different name? It seems trivial that it could be mapped to users regardless of being name, but I don't see a way to do it. it'd be great if I could just do users: { type : Schema.Types.ObjectId, ref : 'User', field : 'user_id' } But it seems no one is trying to do this, nor has anyone managed to do it.
tagged with: mongoose
tagged with: javascript
upvote count: 1
has title: Mongoose schema -- populations in separate field
favorite count: 0
answer count: 0
type: UnansweredQuestion
tagged with: node.js
downvote count: 0
score: 1
type: Question

http://stackoverflow.com/q/26680324
tagged with: retina.js
has body: i'm using using the css background-image attribute to display images. Those images are queried via ajax, therefore I know i am supposed to call this: $('img').each(function(){new RetinaImage(this);}); after the images are loaded. It works with images or the img tag, but since I need the background-image url() attribute to be updated – I am not sure how to do this. I tried to change the JS to: $('.myBackgroundImgClass').each(function(){new RetinaImage(this);}); for the div: &lt;div class="myBackgroundImgClass" style="background-image:url(..someImg.jpg);"&gt;&lt;/div&gt; but it does not seem to do the job. Any suggestions? Thanks!
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: css
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: background-image
type: Question
has title: retina.js for hardcoded css background-images
score: 2

http://stackoverflow.com/a/26723757
answers question: http://stackoverflow.com/q/26723258
type: Answer
has body: Got it! Layout solved by using Bootstrap grid, very little jQuery DOM manipulation. I don't know why I didn't think of this earlier. Sheesh. I've been coding for hours non-stop, my brain is fried. Solution: http://jsbin.com/zopiquzore This is correct, yes?
score: 0

http://stackoverflow.com/q/26786407
has comment: http://stackoverflow.com/comment/42149676
upvote count: 1
type: Question
has body: I have the following code. The first bit of code - the individual animation, works as expected - the div reduces to 50%. The toggle on the other hand causes the div to disappear - seemingly reducing both width and height until the div is no longer visible. It reappears the same way. I'm no jquery expert - any ideas? // works $(".test-wrapper").animate({ width: "50%" }, 400); // Doesn't work $(".test-wrapper").toggle( function () { $(this).animate({ width: "50%" }, 400); }, function () { $(this).animate({ width: "100%" }, 400); });
possible better answer: http://stackoverflow.com/a/26786566
accepted answer: http://stackoverflow.com/a/26786715
tagged with: javascript
has answer: http://stackoverflow.com/a/26786566
has comment: http://stackoverflow.com/comment/42149592
answer count: 2
downvote count: 0
score: 1
tagged with: jquery
has title: jquery animate doesn't work correctly when toggled
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42149943
has answer: http://stackoverflow.com/a/26786715
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/a/26783113
has comment: http://stackoverflow.com/comment/42150892
score: 1
has comment: http://stackoverflow.com/comment/42147956
upvote count: 1
has comment: http://stackoverflow.com/comment/42151397
has comment: http://stackoverflow.com/comment/42149814
has comment: http://stackoverflow.com/comment/42151839
has comment: http://stackoverflow.com/comment/42184056
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42146544
has comment: http://stackoverflow.com/comment/42152279
accepted answer of: http://stackoverflow.com/q/26782879
has comment: http://stackoverflow.com/comment/42145798
has body: This will fix the check of the keypress, but you need to change the id of the items so that you do not have multiple error ids. That is invalid HTML, which is probably why its not working as you expect. function isNumberKey(e) { var charCode = (e.which ? e.which : e.keyCode), valid; switch(charCode){ case 96: case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 190: valid = true; break; default: valid = false; break; } if(valid){ // remove the error } else { // add the error } return valid; } This will at least limit the characters you want to accept, as it creates an inclusion list of numeric (0-9) characters plus the period character.
answers question: http://stackoverflow.com/q/26782879
type: Answer
has comment: http://stackoverflow.com/comment/42166208

http://stackoverflow.com/q/26822354
score: 2
has comment: http://stackoverflow.com/comment/42214124
type: AnsweredQuestion
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26822753
type: Question
tagged with: encryption
tagged with: python
tagged with: cryptography
has title: Trying to pass Steam auth: stumped with RSA ecnryption (js to python)
upvote count: 2
accepted answer: http://stackoverflow.com/a/26822753
answer count: 1
has comment: http://stackoverflow.com/comment/42220400
has body: I'm trying to pass steam auth here. The place i'm stumped is an RSA password encryption using public key. Parameters to encode could be received from here. The code i'm using to encrypt the password is: import base64 from Crypto.PublicKey import RSA mod = long(publickey_mod, 16) exp = long(publickey_exp, 16) rsa = RSA.construct((mod, exp)) encrypted_password = rsa.encrypt(password, '')[0] encrypted_password = base64.b64encode(encrypted_password) Here's RSA.js: var RSAPublicKey = function($modulus_hex, $encryptionExponent_hex) { this.modulus = new BigInteger( $modulus_hex, 16); this.encryptionExponent = new BigInteger( $encryptionExponent_hex, 16); } var Base64 = { base64: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", encode: function($input) { if (!$input) { return false; } var $output = ""; var $chr1, $chr2, $chr3; var $enc1, $enc2, $enc3, $enc4; var $i = 0; do { $chr1 = $input.charCodeAt($i++); $chr2 = $input.charCodeAt($i++); $chr3 = $input.charCodeAt($i++); $enc1 = $chr1 &gt;&gt; 2; $enc2 = (($chr1 &amp; 3) &lt;&lt; 4) | ($chr2 &gt;&gt; 4); $enc3 = (($chr2 &amp; 15) &lt;&lt; 2) | ($chr3 &gt;&gt; 6); $enc4 = $chr3 &amp; 63; if (isNaN($chr2)) $enc3 = $enc4 = 64; else if (isNaN($chr3)) $enc4 = 64; $output += this.base64.charAt($enc1) + this.base64.charAt($enc2) + this.base64.charAt($enc3) + this.base64.charAt($enc4); } while ($i &lt; $input.length); return $output; }, decode: function($input) { if(!$input) return false; $input = $input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); var $output = ""; var $enc1, $enc2, $enc3, $enc4; var $i = 0; do { $enc1 = this.base64.indexOf($input.charAt($i++)); $enc2 = this.base64.indexOf($input.charAt($i++)); $enc3 = this.base64.indexOf($input.charAt($i++)); $enc4 = this.base64.indexOf($input.charAt($i++)); $output += String.fromCharCode(($enc1 &lt;&lt; 2) | ($enc2 &gt;&gt; 4)); if ($enc3 != 64) $output += String.fromCharCode((($enc2 &amp; 15) &lt;&lt; 4) | ($enc3 &gt;&gt; 2)); if ($enc4 != 64) $output += String.from…
tagged with: rsa
tagged with: javascript

http://stackoverflow.com/comment/41999817
score: 0
has text: It appears then that the examples I drew form were incorrect. I am rather inexperienced in jQuery. Changed that. I just do not understand why it cannot find my elements that clearly exist in the page source. EDIT: Changed if (prospectName == 'undefined') to prospectName == undefined
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26703079

http://stackoverflow.com/comment/41991416
type: QuestionComment
type: Comment
has text: Sorry for that. The link has been updated in the first post.
comment on: http://stackoverflow.com/q/26694334
score: 0

http://stackoverflow.com/comment/42042259
comment on: http://stackoverflow.com/q/26726625
has text: It's not clear why you need `j` here at all. Why not just use `i%2` like you're already doing?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42061961
type: Comment
has text: Don't use the same for...each. Just the directive element in the link function to find decendent input elements and directly add the ngFocus directive to them. Those descendant elements haven't been linked yet so the ngFocus directive should work.
comment on: http://stackoverflow.com/a/26737545
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41965638
has text: "shares a lot of portions of code": I don't agree with that. These two functions differ more than they are similar.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26676925

http://stackoverflow.com/comment/42193235
has text: he's asking about occurrences of "tag". Yet having #tag indicates that he should only have 1.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26810303
score: 0

http://stackoverflow.com/comment/42014226
comment on: http://stackoverflow.com/q/26710414
type: Comment
score: 0
has text: Ok, your example works fine, but in my website not work ! no action occur when I click, when I write console.log(targetTop); it types 2288 ..
type: QuestionComment

http://stackoverflow.com/comment/42141570
type: Comment
has text: i am not downvoter but your answer is not complete, add why OP code not working and why this one working
comment on: http://stackoverflow.com/a/26782133
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42068182
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26741174
type: Comment
has text: Which part of your code is duplicated in the question?

http://stackoverflow.com/q/26781450
type: Question
has comment: http://stackoverflow.com/comment/42140713
tagged with: javascript
has body: I am trying to get this javascript code to open/close a megamenu section to work with Wordpress: It does work on a html template. I have also created a Walker that works. var swMegaMenu = (function() { var $listItems = $( '#sw-hrmenu &gt; ul &gt; li' ), // Uncaught TypeError: Undefined is not a function $menuItems = $listItems.children( 'a' ), $body = $( 'body' ), current = -1; function init() { $menuItems.on( 'click', open ); $listItems.on( 'click', function( event ) { event.stopPropagation(); } ); } function open( event ) { if( current !== -1 ) { $listItems.eq( current ).removeClass( 'sw-hropen' ); } var $item = $( event.currentTarget ).parent( 'li' ), idx = $item.index(); if( current === idx ) { $item.removeClass( 'sw-hropen' ); current = -1; } else { $item.addClass( 'sw-hropen' ); current = idx; $body.off( 'click' ).on( 'click', close ); } return false; } function close( event ) { $listItems.eq( current ).removeClass( 'sw-hropen' ); current = -1; } return { init : init }; })(); and(snippet in footer): &lt;script&gt; (function($) { // Uncaught TypeError: Cannot read property 'init' of undefined swMegaMenu.init(); })(jQuery); &lt;/script&gt; Any idea how to fix this problem?
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42140888
has comment: http://stackoverflow.com/comment/42184444
has comment: http://stackoverflow.com/comment/42184986
has comment: http://stackoverflow.com/comment/42143565
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26806019
has title: "Undefined is not a function and "Cannot read property 'init' of undefined"
has comment: http://stackoverflow.com/comment/42140292
tagged with: wordpress
has answer: http://stackoverflow.com/a/26783439

http://stackoverflow.com/a/26739123
type: AcceptedAnswer
downvote count: 0
has body: You dont have to write your one filter to filter by SegmentId. Here you have an example function MyCtrl($scope, $filter) { $scope.data = [{"SegmentId":"1","Description":"hod Registrations"}, {"SegmentId":"2","Description":"hod Inactive"}, {"SegmentId":"3","Description":"hod testUpd"}, {"SegmentId":"8","Description":"hod test"}, {"SegmentId":"1111","Description":"hod Release"}, {"SegmentId":"12","Description":"hod Requests"}, {"SegmentId":"13","Description":"hod Welcome Back"}] $scope.filterData = function(segmentId) { return $filter('filter')($scope.data, { SegmentId: segmentId }); } } Full: {{Segment.SegmentId}} Filtered in View: {{Segment.SegmentId}} Filtered in Controller: {{Segment.SegmentId}}
answers question: http://stackoverflow.com/q/26738559
type: Answer
accepted answer of: http://stackoverflow.com/q/26738559
has comment: http://stackoverflow.com/comment/42097758
has comment: http://stackoverflow.com/comment/52310027
score: 4
has comment: http://stackoverflow.com/comment/42089534
has comment: http://stackoverflow.com/comment/52294106
upvote count: 4

http://stackoverflow.com/comment/41996252
comment on: http://stackoverflow.com/q/26701196
score: 0
has text: @epascarello I know :/ I'm working on putting them in for loops, but I run into problems when I do.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41989076
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26697301
has text: Do you want to display the value in a table with new row? why you want to store it in array?
score: 0

http://stackoverflow.com/q/26752432
tagged with: ajax
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42088324
linked to: http://stackoverflow.com/q/3646914
has answer: http://stackoverflow.com/a/26752674
linked to: http://stackoverflow.com/q/8988855
linked to: http://stackoverflow.com/q/4208530
has comment: http://stackoverflow.com/comment/42088566
has comment: http://stackoverflow.com/comment/42088242
type: Question
has comment: http://stackoverflow.com/comment/42088530
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42088449
has body: As my website has only one page, and the index.html was getting really long and impossible to read. So I decided to put each section in a different HTML file and use jQuery to included it. I used jQuery's include in the way as it has been mentioned here to include a external HTML file but apparently it doesn't work for my website. I really don't know what is the problem. Here is the link of my workspace. Here is what I am doing in index.html file to include other sections I also used this method to make sure the file is accessible and everything was fine. So the problem is not the accessibility of the files
accepted answer: http://stackoverflow.com/a/26752674
possible better answer: http://stackoverflow.com/a/26752560
has title: jQuery's include method doesn't work
has comment: http://stackoverflow.com/comment/42088195
has answer: http://stackoverflow.com/a/26752560
answer count: 2
has comment: http://stackoverflow.com/comment/42088351
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26778442
linked to: http://stackoverflow.com/q/3437786
has comment: http://stackoverflow.com/comment/42139692
tagged with: javascript
has comment: http://stackoverflow.com/comment/42149432
has answer: http://stackoverflow.com/a/77164261
answer count: 2
has body: I need to calculate the visible screen height on ios8. Means when the keyboard is open, calculate the screen height minus the keyboard height. minus the status bar, etc. help?
tagged with: ios8.1
favorite count: 0
upvote count: 9
type: UnansweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/42136049
has answer: http://stackoverflow.com/a/44945561
score: 9
type: Question
has title: IOS8 - Calculate visible screen height when keyboard open or close
has comment: http://stackoverflow.com/comment/42139824
has comment: http://stackoverflow.com/comment/42246808

http://stackoverflow.com/comment/42077940
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26744927
type: Comment
has text: Thanks for the explanation, it seems as if in my current code that the css just gets ignored so I think you are onto something with your explanation. When I try the code you provided the mod[3] just disappears. I think you have brought me a little closer to solving this problem.

http://stackoverflow.com/a/26804029
has body: If your DATE contains TIME information, like 11/12/2014 13:30 for example. This will FAIL in the clause BETWEEN 10/12/2014 AND 11/12/2014 (using UK dd/mm/yyyy format). You must strip the TIME portion for the BETWEEN to work in the way you need it to here
answers question: http://stackoverflow.com/q/26803596
has comment: http://stackoverflow.com/comment/42202680
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42182757

http://stackoverflow.com/a/26827383
upvote count: 0
answers question: http://stackoverflow.com/q/26819566
downvote count: 3
score: -3
type: Answer
has body: here jsfiddle make any size row and column function yolYap(satir,sutun=0){ //My Create Path Function if(ilk){ //İlk seçim: First selection ilk=false; sutun = Math.floor((Math.random()*6)+1); matrix[satir][sutun].data('p', true); matrix[satir][sutun].addClass("red"); yolYap(satir,sutun); }else{ var xy=[]; var solust=satir&gt;1&amp;&amp;sutun&gt;1?!matrix[satir-1][sutun-1].data("p"):true var sol=sutun&gt;1?!matrix[satir][sutun-1].data("p"):false if(sol &amp;&amp; solust)//{ xy.push([satir,sutun-1]);//alert("&lt;-");} var sagust=satir&gt;1&amp;&amp;sutun&lt;matrix[1].length-1?!matrix[satir-1][sutun+1].data("p"):true; var sag=sutun&lt;matrix[1].length-1?!matrix[satir][sutun+1].data("p"):false; if(sag &amp;&amp; sagust)//{ xy.push([satir,sutun+1]);//alert("-&gt;");} //satir&gt;-1?alert("büyük"):alert("küçük"); xy.push([satir+1,sutun]); var sec = Math.floor((Math.random()*102)+1)%xy.length; matrix[xy[sec][0]][xy[sec][1]].data("p", true); matrix[xy[sec][0]][xy[sec][1]].addClass("red"); //alert(xy.join(" - ")); if(xy[sec][0]&lt;matrix.length-1) yolYap(xy[sec][0],xy[sec][1]); else alert("Finish"); } }

http://stackoverflow.com/comment/42186693
has text: It works, thank you very much. I got another approach(check question), could you tell me what you think about it? what's better? best practice?
type: AnswerComment
comment on: http://stackoverflow.com/a/26805997
type: Comment
score: 0

http://stackoverflow.com/comment/42019535
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26714493
score: 0
has text: So model value is the string like "Test1"?

http://stackoverflow.com/q/26739756
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: html4
has comment: http://stackoverflow.com/comment/42091650
has comment: http://stackoverflow.com/comment/42088835
type: Question
has comment: http://stackoverflow.com/comment/42077533
tagged with: input
has comment: http://stackoverflow.com/comment/42089117
score: 0
has title: How to get base64 from input file in IE without using FileReader or HTML5
has body: I hope I can have help from you. I need to get a file from an HTML input file element. This is the HTML: &lt;input type="file" name="allegatoImg" id="allegatoImg" onchange="javascript:readURL(this)"/&gt; And this is JavaScript: function readURL(input) { var mimeType; if (window.FileReader) { if (input.files &amp;&amp; input.files[0]) { var reader = new FileReader(); reader.onload = function(e) { var dataURL = e.target.result; mimeType = dataURL.split(",")[0].split(":")[1].split(";")[0]; if (mimeType == 'image/jpeg') { jQuery('#imgallegato').attr('src', e.target.result); //jQuery('#fotoTemp').attr('src', e.target.result); provaInvioImgSrcToServer(); } else { alert('Errore nella lettura del file. Controllare che sia stato caricato un file con estensione jpeg.'); return; } }; reader.readAsDataURL(input.files[0]); } } else { f = document.dettRichAbbForm; document.getElementById("imgallegato").src = "file:///" + input.value; var estensione = ctrlExtensionFileIE(input.value); alert('path file = ' + jQuery("#imgallegato").attr('src') ); if (estensione=='jpg' || estensione=='jpeg') { provaInvioImgSrcToServer(); } else { alert('Error in reading file'); return; } } } function provaInvioImgSrcToServer() { var urlToCall = provaInvioImgSrcToServerUrl; alert('img path = ' + jQuery("#imgallegato").attr('src')); jQuery.ajax({ cache : false, type : "POST", timeout : 5000, url : urlToCall, data : {imgSource: jQuery("#imgallegato").attr('src')}, success : function(result) { ritagliaImg(); }, error : function(errorMsg) { //gestAjaxCallError(errorMsg, divResultBodId, divResultBodId); alert('Errore nel caricamento dell\'immagine selezionata.'); } }); } function ctrlExtensionFileIE(value) { var splittedVal = value.split("."); return splittedVal[1]; } I'm working on Liferay 5.1 with an old version of jQuery so I can't use HTML5 with canvas element, because I should load the image from the input file into a Jcrop element. My problem is linked to this part of the code: f = document.dettRichA…
answer count: 0

http://stackoverflow.com/a/26764665
downvote count: 0
has comment: http://stackoverflow.com/comment/42116558
type: Answer
has comment: http://stackoverflow.com/comment/42116467
upvote count: 1
has body: The directive HTML looked like this: ... &lt;div class="buttons" ng-if="buttons"&gt; &lt;ui-button color="primary" size="small" ng-repeat="button in buttons"&gt;{{ button.label }}&lt;/ui-button&gt; &lt;/div&gt; ... You can see the buttons in the popup are only shown if buttons is truthy. Interestingly, the div.buttons wasn't showing when buttons was empty, even though !![] gives true in javascript, so I can only assume Angular uses its own equality function to test here. However, even when a button was subsequently added to the array, the div wasn't showing. When I changed the equality to ng-if="buttons.length", (as it probably should have been from the start) things worked correctly.
score: 1
accepted answer of: http://stackoverflow.com/q/26763706
has comment: http://stackoverflow.com/comment/42117475
answers question: http://stackoverflow.com/q/26763706
type: AcceptedAnswer

http://stackoverflow.com/comment/41979343
has text: That works, thanks! Good to know that ES6 will have string interpolation.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26691670

http://stackoverflow.com/comment/42127862
comment on: http://stackoverflow.com/a/26770513
type: Comment
has text: Perfect! Thanks a lot! There is so much to learn for in ember ... And this clears the mist a bit.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26737883
possible better answer: http://stackoverflow.com/a/32311570
favorite count: 0
tagged with: http://stackoverflow.com/tag/csv
has body: I've encountered some unexpected behavior when trying to create a file download functionality on my NodeJS server. I have a REST (express) API that calls for some export data function, which creates a CSV file on the server and uses res.download('path/to/file') to trigger the download. Response headers include Content-Disposition:attachment; filename="indicators.csv" Content-Length:30125 Content-Type:text/csv; charset=UTF-8 so everything seems to be in order. The thing is, I get the response from the server as plain text. The response has all the data the CSV file contains, but does not trigger the browser's file download dialog like I intended. I tried both on Chrome and FF. The problem persists in both. Any ideas? Update I managed to make it work by creating a dummy form, and using its submit action to make my AJAX call. But it's an ugly hack, and I'm still looking for a more elegant solution.
accepted answer: http://stackoverflow.com/a/32318930
answer count: 4
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/32407133
score: 23
linked to: http://stackoverflow.com/q/16086162
upvote count: 23
type: Question
has answer: http://stackoverflow.com/a/75142694
tagged with: javascript
has answer: http://stackoverflow.com/a/32318930
tagged with: express
linked to: http://stackoverflow.com/q/20830309
has answer: http://stackoverflow.com/a/32311570
linked to: http://stackoverflow.com/q/20176982
linked to: http://stackoverflow.com/q/12596024
tagged with: content-disposition
has title: Content-Disposition:attachment not triggering download dialog
downvote count: 0

outlook-web-addins
type: Tag
tag name: outlook-web-addins
tags question: http://stackoverflow.com/q/26745672

http://stackoverflow.com/a/26831665
score: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26831614
upvote count: 1
has body: Sure, it's possible if you use PhantomJS. PhantomJS acts like a browser without a display. You can use it to inject scripts into a page that can send information about the web page back to your node server.

http://stackoverflow.com/a/26707898
has body: Use css to hide the image initially, then modify your code as follows: HTML: &lt;img class="loading" src="images/loading-image.gif"/&gt; JS: $('#login_process').submit(function(event) { event.preventDefault(); $('.loading').show(); ..... ...... success: function (data) { $('.loading').hide(); .... });
score: 0
answers question: http://stackoverflow.com/q/26707827
type: Answer

http://stackoverflow.com/comment/42175676
comment on: http://stackoverflow.com/q/26800936
has text: Then it's extremely unclear what you're trying to do. Why do you use `ngModel` if you don't want its behaviour?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26735591
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42057651
answer count: 1
tagged with: javascript
type: Question
has title: bit shifting in javascript
has answer: http://stackoverflow.com/a/26736586
has comment: http://stackoverflow.com/comment/42057535
score: 0
tagged with: bit-manipulation
has comment: http://stackoverflow.com/comment/42057893
has comment: http://stackoverflow.com/comment/42057575
has body: I have an numerical value such as var x = 13434235234334; I want to bit shift it to the left or to the right. E.g.: x &gt;&gt; 2 or x &lt;&lt; 2 but then later in time I want to get back the original value of x (assume that I know how many times I shifted the original number). How do I get the original value of x back?

http://stackoverflow.com/comment/42117500
comment on: http://stackoverflow.com/q/26747811
has text: changing jsonp to json solves it.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26710363
linked to: http://stackoverflow.com/q/1108480
has comment: http://stackoverflow.com/comment/42027023
upvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: -3
tagged with: css
has body: image of a complete circle pizza and it is cut into 1/12 of the complete pizza in 12 pieces manually----> sorry I am not able to upload my image. I am doing drag and drop for the above images. I am having a issues. First in draggable, I am supposed to drag only the piece of the complete pizza based on the number of division(this is what I want to do). For this process I have cut complete pizza into 12 pieces and positioned them manually to look like a complete pizza. But the problem is since the image and/or div is in square or rectangle shape I can not differ one draggable piece from another please give me some solutions. please excuse my language if it's difficult to understand. Thanks for your effort in advance.
downvote count: 3
linked to: http://stackoverflow.com/q/11496734
has answer: http://stackoverflow.com/a/26710652
has title: image drag and drop issue using jqueryui
type: Question
tagged with: jquery-ui
tagged with: javascript
has comment: http://stackoverflow.com/comment/42026990

http://stackoverflow.com/comment/41955687
type: Comment
type: QuestionComment
has text: use `self = this`... (just kidding)
score: 0
comment on: http://stackoverflow.com/q/26678162

recaptcha
tag name: recaptcha
tags question: http://stackoverflow.com/q/26740305
tags question: http://stackoverflow.com/q/26723081
type: Tag

http://stackoverflow.com/comment/42121550
comment on: http://stackoverflow.com/q/26770598
score: 0
type: Comment
type: QuestionComment
has text: You have two loops. Which one is not working? Also, do you mean `break;` instead of `continue;`?

http://stackoverflow.com/q/26820726
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26820982
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26820812
tagged with: toggle
type: Question
answer count: 2
has body: I want to be able to toggle certain effects in jquery by using javascript, is this code correct? and what would be the simplest solution? P.s. dont say "use .toggle()", there is currently a bug with it that causes it to minimise the paragraph HTML Hello all CSS p { color: red; background-color: lightblue; border-radius: 5px; height: 50px } JQUERY/JAVASCRIPT var num = 0; $(document).ready(function () { $("p").click( if (num == 0) { var num == 1; } else { var num == 0;); $("p").click(function () { if (num == 1) { $(this).animate({ color: "black", backgroundColor: "white", fontFamily: "arial", fontSize: "20px", fontFamily: "serif" }, 500); } else { $(this).animate({ color: "red", backgroundColor: "lightblue", borderRadius: "5px", height: "50px", }, 500); }); }); Thank you all for your time i really appreciate it.
tagged with: javascript
tagged with: jquery
tagged with: effects
has title: how to toggle certain jquery effects with javascript
score: 0

http://stackoverflow.com/a/30634068
answers question: http://stackoverflow.com/q/26790374
upvote count: 4
downvote count: 0
score: 4
has body: If you don't want to use ng-click, you still have a chance! Try the following
type: Answer

http://stackoverflow.com/q/26830922
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26830980
tagged with: background-image
has body: I am using a background image to provide additional user instruction as to which navigation section is currently selected; and by using "background-position: right center;" for said background image, the code causes the background image to move across the container each time that it is shown... as opposed to just already showing up in the desired location without any movement. How do I modify my code so that the background image does not move across its container, and simply appears in the desired location (right and center)? Here is the JSFiddle demonstrating the unwanted movement HTML &lt;div id="panel"&gt; &lt;div class="panel-styling selected-panel"&gt; One &lt;/div&gt; &lt;div class="panel-styling"&gt; Two &lt;/div&gt; &lt;div class="panel-styling"&gt; Three &lt;/div&gt; &lt;/div&gt; CSS #panel { float: left; width: 50%; margin: 2% 0 0 2%; padding: 0 0 0 0; } .panel-styling { width: 100%; padding: 8px 0 7px 0; text-align: left; border-bottom: 1px solid rgba(136,136,136,1); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 16px; line-height: 100%; color: rgba(136,136,136,1); } .panel-styling:hover { cursor: pointer; color: rgba(255,0,0,1); border-bottom: 1px solid rgba(255,0,0,1); -webkit-transition: all 0.25s; -moz-transition: all 0.25s; transition: all 0.25s; } .selected-panel { color: rgba(255,0,0,1); border-bottom: 1px solid rgba(255,0,0,1); background-image: url('http://s23.postimg.org/7urmjdktj/slider_arrow.png'); background-position: right center; background-repeat: no-repeat; } JavaScript $('.panel-styling').click(function () { $('.panel-styling').removeClass('selected-panel'); $(this).addClass('selected-panel'); }); Thanks! Berklie
type: Question
has answer: http://stackoverflow.com/a/26830980
tagged with: javascript
has title: How To Prevent CSS Background Image From Moving When Shown?
score: 0

http://stackoverflow.com/comment/42236134
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26811211
has text: Are you using ui-bootstrap ?????

http://stackoverflow.com/q/26679770
has answer: http://stackoverflow.com/a/26679879
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41958393
tagged with: javascript
tagged with: jquery
has body: On my website I have a jQuery script that replaces the content of a div with HTML from another file when a button is clicked. Each button has an ID that is identical to the filename of the HTML document that gets replaced in the div. On the homepage all of the buttons work when clicked and the content gets replaced. However, when I try to click one of the new buttons to replace the content again nothing happens. Any idea why it will not execute twice? // JavaScript Document $( document ).ready(function() { $('.button').click(function(e) { e.preventDefault(); // Stops the browser from following the href in the &lt;a&gt; var that = $(this) , id = that.attr('id') , url = 'questions/' + id + '.html' ; $.post(url, function(data) { $('#replace').html(data); // Display external file to target div window.scrollTo(0, 0); // Forces a scroll back to the top of the page }); }); });
has comment: http://stackoverflow.com/comment/41958477
tagged with: http://stackoverflow.com/tag/html
has title: jQuery script only executes once
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26679879
type: Question
has comment: http://stackoverflow.com/comment/41959133
has comment: http://stackoverflow.com/comment/41958466
has comment: http://stackoverflow.com/comment/41958503

http://stackoverflow.com/comment/42084948
score: 0
type: AnswerComment
has text: Answer is useful, but I can't use PHP and Ajax requests. If you can see the code snippet I've added, you may get clear idea about the code.
comment on: http://stackoverflow.com/a/26729991
type: Comment

http://stackoverflow.com/comment/42136509
has text: @Srikan that seems to be the best cross-browser solution at this point.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26750700
type: Comment

http://stackoverflow.com/comment/42109453
score: 0
type: AnswerComment
has text: Thanks for correcting the syntax. I'm still missing most of my news feed, only getting posts from band pages, political advocacies, etc. Do you think my friends' privacy settings are preventing their status updates from being included in this call's results?
type: Comment
comment on: http://stackoverflow.com/a/26716352

http://stackoverflow.com/comment/42150194
comment on: http://stackoverflow.com/a/26786810
type: Comment
score: 0
type: AnswerComment
has text: his submit button is a mix of input and button, this might solve the problem

http://stackoverflow.com/a/26811626
type: Answer
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26811572
has body: Because the privateMethod is not a method, it's just a function in the constructor scope, so this.b = "foo"; is not pointing to your instance, so it's looking for window.b. In strict mode that flags undefined.

http://stackoverflow.com/q/26803555
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42180422
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/42180736
has answer: http://stackoverflow.com/a/26803585
has title: How to filter my json object in different variables
has body: I want to insert into different variables the following: name, meetup, tag from my object. To put them separately in an array or object. My json object: var data = { "MY_ID": 1, "module": [ { "name": "Manchester", "meetup": "First Monday of every month", "tags": [ "gtug", "google", "manchester", "madlab" ] }, { "name": "jQuery Group", "meetup": "First Tuesday of every month", "tags": [ "jquery", "javascript", "jresig", "madlab" ] }, { "name": "Hybrid!", "meetup": "First Monday of every month", "tags": [ "jquery", "javascript", "jresig", "madlab" ] } ] }
favorite count: 0
type: UnansweredQuestion
downvote count: 8
has comment: http://stackoverflow.com/comment/42180555
score: -7
has answer: http://stackoverflow.com/a/26803696

http://stackoverflow.com/comment/42031812
score: 4
type: Comment
comment on: http://stackoverflow.com/q/26720947
type: QuestionComment
has text: Essentially you seem to be asking for http://api.jquery.com/detach/

push-notification
tags question: http://stackoverflow.com/q/26791310
type: Tag
tag name: push-notification
tags question: http://stackoverflow.com/q/26678060

http://stackoverflow.com/comment/42224306
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26828439
score: 0
has text: Did you check if you come into each loop? with console.log or something?

http://stackoverflow.com/a/26692454
has comment: http://stackoverflow.com/comment/41981651
has comment: http://stackoverflow.com/comment/41981387
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26692311
type: Answer
accepted answer of: http://stackoverflow.com/q/26692311
has comment: http://stackoverflow.com/comment/41981851
has body: The problem is probably with the fact, that tokenizeCard makes an asynchronous call to get the nonce. The flow of events is then like this: submit form begins -&gt; tokenizing begins -&gt; submit form ends -&gt; (somewhere here the promise is resolved - the result comes back from the server) -&gt; tokenizing ends What you can do is to add return false to the end of submit listener (conditions by the emptiness of nonce field) and then then call submit again (without getting the nonce from server again) from the client callback. It would look like this: $('#checkout').on("submit", function() { //I could be wrong in the condition below - it may be undefined if($("#checkout input[name=nonce]").val() === ''){ var client = new braintree.api.Client({clientToken: "&lt;?php echo $clientToken ?&gt;"}); client.tokenizeCard({ number: $('#number').val(), cardholderName: $('#first_name').val() + ' ' + $('#last_name').val(), expirationMonth: $('#expiration_month').val(), expirationYear: $('#expiration_year').val(), cvv: $('#cvv').val(), }, function (err, nonce) { $("#checkout input[name=nonce]").val(nonce); $('#checkout input[name=random]').val('randomtext'); $('#checkout').submit(); }); return false; //stops form submitting } else { return true; //continues form submitting } }); Edit: This fiddle represents your problem exactly $("#form").submit(function(){ alert("submit invoked!"); if($("#writeMe").val() === ''){ writeValue(); alert("submit not done - writeValue invoked"); } else { alert("submit actually done"); } return false; }); function writeValue(){ setTimeout(function() { alert("result's back -&gt; gonna submit again"); $("#writeMe").val("written"); $("#form").submit(); }, 1000); } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"&gt;&lt;/script&gt; &lt;form id="form"&gt; &lt;input type="text" readonly id="writeMe" /&gt; &lt;input type="submit" value="Submit me!" /&gt; &lt;/form&gt;
score: 3
has comment: http://stackoverflow.com/comment/41981406
has comment: http://stackoverflow.com/comment/41982234
upvote count: 3

http://stackoverflow.com/q/26714216
score: 0
has comment: http://stackoverflow.com/comment/42020161
type: UnansweredQuestion
tagged with: facebook
tagged with: permissions
answer count: 0
has body: In JavaScript we are making request: FB.api("/me/permissions", function(data){ console.log(data); }); On average in 1% we get answer: {"error":{"message":"unknown error","type":"http"}} or {"error":{"code":2500,"message":"An active access token must be used to query information about the current user.","type":"OAuthException"}} Is that normal?
has comment: http://stackoverflow.com/comment/42021424
has title: Facebook JS API /me/permissions
has comment: http://stackoverflow.com/comment/42019606
type: Question
has comment: http://stackoverflow.com/comment/48817863
tagged with: javascript

http://stackoverflow.com/a/26820485
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26819464
score: 1
has body: meh, it works. &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;meta http-equiv="X-UA-Compatible" content="IE=8" /&gt; &lt;link href="http://threedubmedia.com/inc/img/favicon.ico" rel="shortcut icon" /&gt; &lt;link href="http://threedubmedia.com/inc/css/base.css" rel="stylesheet" /&gt; &lt;script src="http://threedubmedia.com/inc/js/jquery-1.7.2.js"&gt;&lt;/script&gt; &lt;script src="http://threedubmedia.com/inc/js/jquery.event.drag-2.2.js"&gt;&lt;/script&gt; &lt;script src="http://threedubmedia.com/inc/js/jquery.event.drag.live-2.2.js"&gt;&lt;/script&gt; &lt;script src="http://threedubmedia.com/inc/js/jquery.event.drop-2.2.js"&gt;&lt;/script&gt; &lt;script src="http://threedubmedia.com/inc/js/jquery.event.drop.live-2.2.js"&gt;&lt;/script&gt; &lt;script src="http://threedubmedia.com/inc/js/excanvas.min.js"&gt;&lt;/script&gt; &lt;title&gt;ThreeDubMedia &amp;middot; jquery.event.drag&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;script type="text/javascript"&gt; jQuery(function($){ var num = 1; var $div = $('#container'); $('.drag') .drag("start",function( ev, dd ){ dd.limit = $div.offset(); dd.limit.bottom = dd.limit.top + $div.outerHeight() - $( this ).outerHeight(); dd.limit.right = dd.limit.left + $div.outerWidth() - $( this ).outerWidth(); }) .drag(function( ev, dd ){ $( this ).css({ top: Math.min( dd.limit.bottom, Math.max( dd.limit.top, dd.offsetY ) ), left: Math.min( dd.limit.right, Math.max( dd.limit.left, dd.offsetX ) ) }); }); $('#add').click(function(){ $('&lt;div class="drag"/&gt;') .text( num++ ) .appendTo( document.body ) .css({ top: Math.random() * 241 + $div.offset().top, left: Math.random() * ( $( window ).width() - 100 ) + 20, }) .drag("start",function( ev, dd ){ dd.limit = $div.offset(); dd.limit.bottom = dd.limit.top + $div.outerHeight() - $( this ).outerHeight(); dd.limit.right = dd.limit.left + $div.outerWidth() - $( this ).outerWidth(); }) .drag(functio…
answers question: http://stackoverflow.com/q/26819464
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/26710090
tagged with: angularjs
type: UnansweredQuestion
has body: Let's say I am creating a directive for a scatter chart that should have a whole set of configurable attributes. To the best of my knowledge, I can either set these up individual scope attributes: directive('scatterChart', ['$http', function($http){ scope: { data: "=?", selected : "=?", indicatorX : "=?", indicatorY : "=?", indicatorSize : "=?" } Or pass an object with options: directive('scatterChart', ['$http', function($http){ scope: { model: "=?", } In the latter case I would not have to go back and tweak my markup, this would be sufficient: &lt;div class="scatter-chart" model="scatter.options"&gt; And inside my directive it would be sufficient to watch the object to trigger a re-render: scope.$watch('model', function(newVal, oldVal) { render(); }, true); So, which approach should I adopt and why?
score: 1
upvote count: 1
type: Question
has title: AngularJS directive - pros and cons of passing in an options object vs separate attributes?
tagged with: javascript
has answer: http://stackoverflow.com/a/26710464
answer count: 1
downvote count: 0
favorite count: 0

sorteddictionary
tags question: http://stackoverflow.com/q/26807927
tag name: sorteddictionary
type: Tag

http://stackoverflow.com/comment/42094793
score: 0
type: Comment
type: QuestionComment
has text: I am testing in multiple browsers, I just can't figure out why my script is functioning sometimes in fiddle and then not at all in a browser.
comment on: http://stackoverflow.com/q/26749583

http://stackoverflow.com/comment/42140742
has text: I understand what you mean. But I was looking the way not to create an additional $scope.filteredsuperheroes. Just to use existing $scope.superheroes
comment on: http://stackoverflow.com/a/26780563
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26690436
has body: I have cookies list like this key value domain expiry HTTP usid 1234567 abc.domain.com 2014-12-01T23:54:12.256Z yes ssid 1234534 abc.domain.com 2014-12-01T23:54:12.256Z yes _ga GA1.1.323232323 domain.com 2014-12-01T23:54:12.256Z no When I use $.cookie to get the cookies the output is object _ga: "GA1.1.323232323" lang: "en" also document.cookie returns the same result How can I get all the cookies present
tagged with: cookies
score: 0
has title: $.cookie not returning all cookies
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has answer: http://stackoverflow.com/a/26690542
type: Question
has answer: http://stackoverflow.com/a/26690545
answer count: 2

http://stackoverflow.com/comment/42036221
has text: What do you mean by underneath and below, if h1 is a direct child, or if h1 is next sibling?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26722961
score: 0

http://stackoverflow.com/a/26824763
answers question: http://stackoverflow.com/q/26823957
upvote count: 2
type: AcceptedAnswer
has body: Add this css to your html &lt;style type="text/css"&gt; //container div .container{ width:300px; position:relative; } //image css property .imageHolder{ position:absolute; left:0px; top:0px; width:100%; height:100%; z-index:10px; } // overlay css property .imageOverlay{ position: absolute; z-index:11px; top:0px; left:0px; width:100%; height:100%; text-align:center; } &lt;/style&gt; This is your html code will be &lt;div class="container"&gt; &lt;img src="myimage.png" class="imageHolder" /&gt; &lt;div class="imageOverlay"&gt; Load &lt;/div&gt; &lt;/div&gt; Hope it helps... Thanks.
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26823957

http://stackoverflow.com/comment/42112590
has text: Found a way to fix it using clip - http://plnkr.co/edit/isaHzvCO6fTNlXpE18Yt?p=preview
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26751676

http://stackoverflow.com/a/26807694
has comment: http://stackoverflow.com/comment/42188472
answers question: http://stackoverflow.com/q/26807515
has comment: http://stackoverflow.com/comment/42188421
upvote count: 3
score: 3
has body: The "data" event does not guarantee that you will receive the entire message from the server in a single chunk. As pieces of the stream of data coming to your client are received, only those immediately available are handled by your function, in sequence. It may happen that the entire message arrives all at once, but the behavior isn't at all deterministic. You can just merge the entire data into a single string, and then write it to the console. var http = require('http') http.get('http://www.vinylzilla.com/search/autocomplete?q=kiss', function(response){ var content = ''; response.on('data',function(data){ content += String(data); }); response.on('end', function() { console.log('Result: ", content); }); })
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26807515

http://stackoverflow.com/comment/41973251
score: 5
has text: `.toUpperCase()` returns a new string that is the value of the original string changed to upper case - it doesn't modify the original string. You probably want `firstName = firstName.charAt(0).toUpperCase() + firstName.substr(1);`
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26688035

http://stackoverflow.com/a/27207709
type: Answer
upvote count: 2
has body: Short answer is you cannot do that. Because of the client side / server side relationship. Try using an include to your project, that way the code is called multiple times, but you have only one reference of the code in your project. Hope that helps you.
score: 2
has comment: http://stackoverflow.com/comment/43745616
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26728001
answers question: http://stackoverflow.com/q/26728001

http://stackoverflow.com/a/26685631
score: 1
has comment: http://stackoverflow.com/comment/41976821
has comment: http://stackoverflow.com/comment/41977912
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26685554
type: Answer
has body: At least in the case of your example, I'm guessing PHP isn't actually flushing the buffer (and thus sending the headers) until after the sleep, but I'm not sure if that would explain this behavior if you've encountered it using actual file downloads.
answers question: http://stackoverflow.com/q/26685554
downvote count: 0

http://stackoverflow.com/q/26744345
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/40831078
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/40831078
accepted answer: http://stackoverflow.com/a/26744502
tagged with: cookies
upvote count: 3
has title: Why can't I get the vaue of __RequestVerificationToken from AngularJS or even pure JavaScript?
type: Question
tagged with: c#
score: 3
tagged with: asp.net-mvc
tagged with: javascript
linked to: http://stackoverflow.com/q/14925446
answer count: 2
has answer: http://stackoverflow.com/a/26744502
downvote count: 0
has body: I am writing a front-end application with Bootstrap and AngularJS for a C# MVC back-end code. Using Chrome's developer console (and any other browser, including IE), I can see a cookie called __RequestVerificationToken, as the image below shows: I understand this is a technique used to prevent CSRF attacks. Anyway, since this cookie is there, I was trying to get it's value using AngluarJS module $cookies, but it always returns undefined, and printing document.cookie doesn't show it. Below is the code used: ... this.initApp = function () { console.log('Value of __RequestVerificationToken: "' + $cookies.__RequestVerificationToken + '"'); // Angular way console.log('Cookie: "' + document.cookie + '"'); // Pure JavaScript }; ... So my question is, why can't I get its value if the cookie is there and is being sent to the client in every single response, and how do I get its value?

http://stackoverflow.com/q/26731200
has answer: http://stackoverflow.com/a/26731326
score: 0
has body: I am developing a web game. Now i need to display a webpage, in a dialog, within my game stage. And i know a solution, using jqueryui: This solution need me to set "wmode" of flash object to be "opaque". But for performance, i need to use "wmode=direct", and if i use "wmode=direct", the jquery dialog has some ploblem: titlebar is hided behind flash object, so that, i cannot drag(move) the dialog or close the dialog. Are there other solution, without changing "wmode"? I've seen a solution, but i don't know how to do it. here are some code generated by that solution: the title
answer count: 1
tagged with: jquery
has title: how to display a webpage inside(or under) flash(as3, not flex)
tagged with: actionscript-3
type: UnansweredQuestion
type: Question
tagged with: flash
tagged with: jquery-ui
tagged with: javascript

http://stackoverflow.com/q/26753665
type: Question
has title: Which 3 marker creates a triangle that contains specified point?
tagged with: javascript
has body: I have a map with ~50 markers on it (Google maps api v3) and I'd like to click a random point and get which 3 markers surrounds it. I've found this example, but it doesn't really do the thing i want alone. Here's an image of my markers and what I'm trying to accomplish: [IMAGE] According to image; When I click to red point, the script should return me the coordinates of those 3 markers connected with yellow lines. Same for blue point and green lines. It has to be the narrowest, smallest triangle. I've tried finding closest 3 markers, it works for most situations but doesn't cover all. (Like when there's 3 markers in the same line with a close range.) Any advice? Thanks in advance! Edit ps. I can use PHP with ajax calls if it helps.
tagged with: google-maps-api-3
score: 0
has answer: http://stackoverflow.com/a/26776556
accepted answer: http://stackoverflow.com/a/26776556
tagged with: google-maps
answer count: 1
tagged with: ajax
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42091787
has comment: http://stackoverflow.com/comment/42093163

http://stackoverflow.com/q/26812178
has body: For Instance lets say I have a isNullOrEmpty function defined like so. String.prototype.IsNullOrEmpty = function (o) { return o == null || o == ''; } I want to be able to say something like this: var s = 'test'; s.isNullOrEmpty and get the answer as false or true for that string.
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/26812235
tagged with: javascript
favorite count: 0
answer count: 3
score: 2
has title: How can I create a javascript extension Method that I don't have to pass the string into
downvote count: 0
has answer: http://stackoverflow.com/a/26812954
has comment: http://stackoverflow.com/comment/42196630
has comment: http://stackoverflow.com/comment/42196611
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42199162
has answer: http://stackoverflow.com/a/26812243
accepted answer: http://stackoverflow.com/a/26812243
possible better answer: http://stackoverflow.com/a/26812235

http://stackoverflow.com/comment/42228873
comment on: http://stackoverflow.com/a/26830980
score: 0
type: AnswerComment
has text: Thank you and I see that if I want multiple things to transition (and not "all" things), that I use multiple properties like this... -webkit-transition: color 2.25s, border-bottom 2.25s; -moz-transition: color 2.25s, border-bottom 2.25s; transition: color 2.25s, border-bottom 2.25s;
type: Comment

http://stackoverflow.com/q/26815829
answer count: 3
favorite count: 0
has title: array.forEach.call vs array.map.call
has answer: http://stackoverflow.com/a/26815875
upvote count: 5
tagged with: dictionary
possible better answer: http://stackoverflow.com/a/26815911
tagged with: foreach
type: AnsweredQuestion
downvote count: 0
has body: To loop over the results of querySelectorAll in JavaScript, is one of the following more preferable than the other? [].forEach.call(document.querySelectorAll('div'){ // do something }) [].map.call(document.querySelectorAll('div'){ // do something }) Essentially, I'm wondering if these each achieve the same result of providing access to each dom element returned from querySelectorAll. If so, what are reasons one might want to use one over the other?
type: Question
score: 5
has answer: http://stackoverflow.com/a/26815955
tagged with: arrays
tagged with: javascript
tagged with: selector
has answer: http://stackoverflow.com/a/26815911
accepted answer: http://stackoverflow.com/a/26815875

http://stackoverflow.com/a/26722374
answers question: http://stackoverflow.com/q/26722232
upvote count: 2
type: Answer
score: 2
has body: To make it read only and then read write you can switch the disabled attribute accordingly here is a working example link and if you have several text fields, then use a class as the selector rather a ID $("#otherinj").change(function(){ if($(this).is(':checked')){ $("#otherinjcomment").attr("disabled","disabled"); } else{ $("#otherinjcomment").removeAttr('disabled') } })
downvote count: 0

http://stackoverflow.com/comment/42107707
type: QuestionComment
has text: video type is MP4, , cant edit it as code.. weird, anyway, thats rendered dynamically!. thanks
comment on: http://stackoverflow.com/q/26761998
score: 0
type: Comment

http://stackoverflow.com/q/26816147
favorite count: 0
has answer: http://stackoverflow.com/a/26816870
type: UnansweredQuestion
tagged with: three.js
score: 1
upvote count: 1
has body: I made this function that for each vertices of geometry create a sphere and place it in the same position of vertice.For example if I have a cube,the function place a sphere for each cube vertice. function makeSphereVertices(){ console.log("makesphere"); spheres = []; for(var j=0 ; j&lt;geometryContainer.length ; j++) { for (var i=0 ; i&lt;geometryContainer[j].geometry.vertices.length ; i++){ var sphereGeometry = new THREE.SphereGeometry(0.04,10,10);//relative to dimension object : ToDo var sphereMaterial = new THREE.MeshBasicMaterial({transparent: false,color: 0x000000 /*opacity: 0.01*/}); spheres = new THREE.Mesh(sphereGeometry,sphereMaterial); spheres.position.set(geometryContainer[j].geometry.vertices[i].x, geometryContainer[j].geometry.vertices[i].y, geometryContainer[j].geometry.vertices[i].z); console.log(geometryContainer[j].id); spheres.name = "sphere"; scene.add(spheres); verticesSphere.push(spheres); } } } After this,I have created function to move my cube like this Draggable shape. Now the problem is: I can't find a way to move together cube and all spheres. For example if I drag cube all the spheres remains in the old position. Is there a way to chain the spheres to my cube?Thank you.
type: Question
has title: Three.js connect two object as one
tagged with: javascript
linked to: http://stackoverflow.com/q/7985805
linked to: http://stackoverflow.com/q/26800922
downvote count: 0
answer count: 1

http://stackoverflow.com/q/26730523
has answer: http://stackoverflow.com/a/26730590
accepted answer: http://stackoverflow.com/a/26730598
has title: Can't append elements to html with jQuery
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26730561
has comment: http://stackoverflow.com/comment/42048727
possible better answer: http://stackoverflow.com/a/26730561
answer count: 3
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26730598
has body: I want to add all destinations as headers in my div but only the last one is added. What's wrong with this code? &lt;script type="text/javascript"&gt; $(function() { var $dialog = $("#dialog"); var data = { destinations: [ {dep: "Varna Airport", dest: "Domodedovo Airport"}, {dep: "Domodedovo Airport", dest: "Schwechat"}, {dep: "Schwechat", dest: "Heathrow Airport"} ] }; $.each(data.destinations, function(key, destination) { var $title = $('h1').text(destination.dep + ' - ' + destination.dest); $dialog.append($title); }); }); &lt;/script&gt; &lt;div id="dialog"&gt;&lt;/div&gt;
score: 0

http://stackoverflow.com/a/26803437
answers question: http://stackoverflow.com/q/26790511
type: AcceptedAnswer
score: 0
type: Answer
has body: Well, I found the issue and it wasn't anything to do with Backbone routing. There was a section of the site that was feeding the location.hash into a selector on page load. face-palm if (location.hash) { ... doSomething(location.hash); // &lt;-- feeds into a jQuery selector } function doSomething(id) { var container = $(id); ..... This was running before the js app starts up and caused the issue. Easy solution in the end was to wrap this in a try catch clause. Thanks Mu and Quince for pointing this out.
accepted answer of: http://stackoverflow.com/q/26790511

http://stackoverflow.com/comment/41952834
comment on: http://stackoverflow.com/a/26676245
score: 1
has text: @tymeJV: the strings could contain special characters such as < or &, in which case you would produce invalid HTML. It's not the case in this particular example though.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26810836
score: 0
has body: Combine the selectors, delimit by comma $('input#activity-upload, input#activity-view').change(function() { Of course, you're going to have to run a check to make sure you're hiding/showing the proper classed element
type: Answer
answers question: http://stackoverflow.com/q/26810799

http://stackoverflow.com/comment/42010451
has text: Look at your browser's developer tools. Look at the JavaScript console. Does it report any errors? Look at the Net tab. Is the request being made? Does it get a response? Do they contain the data you expect?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26708725

http://stackoverflow.com/comment/42218106
has text: That's exactly what my code is doing. If you don't want to change the other select, just don't use that part of the code.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26824511

combobox
tags question: http://stackoverflow.com/q/26777749
tags question: http://stackoverflow.com/q/26795460
type: Tag
tags question: http://stackoverflow.com/q/26678025
tag name: combobox
tags question: http://stackoverflow.com/q/26786488
tags question: http://stackoverflow.com/q/26790410
tags question: http://stackoverflow.com/q/26687907

http://stackoverflow.com/a/72058333
type: Answer
answers question: http://stackoverflow.com/q/26678435
has body: Following is screenshot to better explain the above answer: open browser and press F12 to open console tab paste similar code as mentioned in below screenshot Run We would get desired outcome on the right hand side.
score: 0

http://stackoverflow.com/comment/42074807
comment on: http://stackoverflow.com/a/26737340
type: Comment
has text: Then I get a NoSuchElementException. WebElement montana = driver.findElement(By.xpath("//*[@id='ext-gen203']/svg/a[starts-with(@title, 'Montana')]"));
score: 0
type: AnswerComment

http://stackoverflow.com/a/26744552
answers question: http://stackoverflow.com/q/26744474
has body: This isn't mentioned above, but I see that li.first is given a clear:left. This will make it start a new row.
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/42063707
score: 0
has text: Did you try it? Did it work?
type: Comment
comment on: http://stackoverflow.com/q/26727379
type: QuestionComment

http://stackoverflow.com/q/26715403
tagged with: php
has comment: http://stackoverflow.com/comment/98176702
type: Question
has title: Accessing SugarCRM Global variable $current_user from a custom Javascript file v6.5
tagged with: sugarcrm
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26734650
has body: How can I access global SugarCRM variables from a custom javascript file that I have attached to a field on the DetailView in SugarCRM V6.5. Specifically, I want to access the $current_user global PHP variable from the Javascript file. I have added the javascript file by editing the custom/modules/Accounts/views/detailviewdef.php and then editing the array to look like this array ( 0 =&gt; array ( 'file' =&gt; 'modules/Accounts/Account.js', ), 1 =&gt; array ( 'file' =&gt; 'custom/modules/Accounts/Account1.js', ), ), The details that i want to access from the $current_user is actually a customization that I made to the User module to add more configuration option for every user. I saw somewhere else on Google that i could use var current_user = current_user; in the custom Javascript file and it actually shows the user ID of the logged in user, however what i really want is to get the User detail Object, please does anyone have any ideas. Regards
type: UnansweredQuestion

http://stackoverflow.com/q/26777119
has title: How to remove cloned element div except first div using jquery
has answer: http://stackoverflow.com/a/26777334
type: Question
has body: I have a problem with removing cloned div. I*m unable to remove the cloned div which div clicked on to be remove. My code is like below: Name: Brand: Model No: Remove Item Add New Item Here And my jquery code like this: I tried like this. For every cloned div I appended new div id with increment number. But I'm unable to remove the particular cloned div. First div dont be removed. please help me how to solve this. Thanks.
possible better answer: http://stackoverflow.com/a/26777334
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 3
has answer: http://stackoverflow.com/a/26777298
favorite count: 0
has answer: http://stackoverflow.com/a/26777525
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26777298

http://stackoverflow.com/a/26748135
score: 1
answers question: http://stackoverflow.com/q/26748076
upvote count: 1
has comment: http://stackoverflow.com/comment/42080943
has comment: http://stackoverflow.com/comment/42080873
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42080907
type: Answer
has body: If you do not want to use any server side technology then you can use query string. Add movie name as query string parameter while opening the new page then in new page access URL to fetch this variable. Second Page: Note: I have not written getQueryVariable function myself. Credit goes to this link.
accepted answer of: http://stackoverflow.com/q/26748076

http://stackoverflow.com/comment/42111015
has text: That still doesn't return from *your* code.
type: QuestionComment
comment on: http://stackoverflow.com/q/26764194
score: 0
type: Comment

http://stackoverflow.com/a/32141840
downvote count: 0
answers question: http://stackoverflow.com/q/26718261
score: 5
upvote count: 5
has body: I believe this will fix your problem: https://coderwall.com/p/s8pjpg/reseting-pointer-events-on-ie11 So, for your code: .divstyle { pointer-events: none; } .buttonstyle { pointer-events: auto; position: relative; }
type: Answer

http://stackoverflow.com/q/26768545
has comment: http://stackoverflow.com/comment/42117710
type: Question
score: 0
tagged with: mobile
tagged with: javascript
has comment: http://stackoverflow.com/comment/42117969
has body: I have this line in erb: &lt;% @testimonials.each_slice(3) do |testimonial_slice| %&gt; ... If this is being rendered on mobile, I simply need to change out the 3 with a 1: &lt;% @testimonials.each_slice(1) do |testimonial_slice| %&gt; I am guessing that the only way to do this is through JavaScript on detecting viewport size? I also thought about copying and pasting this section twice (one with the value 3 and the other with 1) then simply doing a show/hide based on a media query, but that is not DRY. Any ideas?
tagged with: css
answer count: 0
has comment: http://stackoverflow.com/comment/42117756
type: UnansweredQuestion
has title: Changing value in ERB based on viewport size?
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/42117765
has comment: http://stackoverflow.com/comment/42117776

http://stackoverflow.com/q/26762746
has answer: http://stackoverflow.com/a/26900239
tagged with: javascript
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/46132408
favorite count: 0
type: UnansweredQuestion
tagged with: extendscript
tagged with: adobe-illustrator
has answer: http://stackoverflow.com/a/54200080
downvote count: 0
score: 1
has body: I'm trying to color the pathItems within a compoundPathItem in Illustrator. My object looks like a circle inside a circle. No strokes, four paths, two compoundPathItems within a compoundPathItem. When I debug with this line: alert(doc.compoundPathItems[0])I get:-[CompoundPathItem] .... which makes sense because I've combined two compoundPathItems. However, I cannot seem to get access to the pathItems in order to color them: doc.compoundPathItems[0].compoundPathItems[0].pathItems ... errors out x_x ... alert(doc.compoundPathItems[0].pathItems.length) gives me 0 .... T-T Help me understand what's happening here please.
has title: How to color nested compound paths Extendscript for Illustrator CS5?
type: Question

http://stackoverflow.com/comment/41955959
type: QuestionComment
comment on: http://stackoverflow.com/q/26677688
score: 0
has text: Im not qiet sure if i understand ur question but normaly u can stopp the bubbeling effect by writing "return false" or if you are using jquery: event.stopPropagation()
type: Comment

http://stackoverflow.com/q/26723864
tagged with: amazon-s3
has body: I am trying to get gulp.src to pipe into two separate stream in my foo function. gulp.src('./test/**') .pipe( foo( options ) ); One of the stream will see the files from gulp.src and determine whether or not to pipe it into gulp-s3 stream. So if first stream succeed then pipe gulp.src data again to gulp-s3 stream.
answer count: 1
has title: I want to pipe gulp.src into two separate streams
tagged with: javascript
tagged with: gulp
has answer: http://stackoverflow.com/a/26791449
tagged with: node.js
score: 0
type: UnansweredQuestion
tagged with: stream
type: Question

http://stackoverflow.com/a/26724958
type: Answer
answers question: http://stackoverflow.com/q/26724461
has body: This is my take on it. I didn't check it for errors but if you're creating the forms in a loop you'll need to call a function like this one so that you don't run into variable scope issues with your events. [IDs and other identifying attributes are unnecessary] function addForm(url, api, getpost) { var f = document.createElement('form'); f.setAttribute('method',getpost?getpost:'GET'); f.setAttribute('action',url); var filters = document.createElement('input'); filters.setAttribute('type','hidden'); filters.setAttribute('name','filters'); filters.value = api?api:'&amp;param=1'; var anchor = document.createElement('a'); anchor.setAttribute('href', '#'); anchor.setAttribute('role', 'button'); anchor.innerHTML='Click Me'; anchor.addEventListener('click', function(e) { e.preventDefault(); f.submit(); }); f.appendChild(filters); document.getElementById('body').appendChild(f); var li = document.createElement('li'); li.appendChild(anchor); document.getElementById('formAnchors').appendChild(li); return f; }
score: 0

http://stackoverflow.com/a/26731993
has comment: http://stackoverflow.com/comment/42051414
score: 0
has body: without the empty div you have added it will work fine try this :
answers question: http://stackoverflow.com/q/26731666
type: Answer
has comment: http://stackoverflow.com/comment/42068439
has comment: http://stackoverflow.com/comment/42051337

http://stackoverflow.com/comment/42251332
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26782126
score: 0
has text: Hello, Im not sure what you mean by the fiddle, but using google chrome it opens correctly, when using internet explorer it opens as fash, for that when I open on IOS device (iphone5) it just won´t open so I assume it is also trying to open as flash? Thank you again for the attention.

http://stackoverflow.com/q/26794699
has comment: http://stackoverflow.com/comment/42163978
score: 0
has body: I kept a counter in my Javascript, when the counter reaches 0, it will trigger the following AJAX call: function logout2() { $.ajax({ type: "GET", dataType: "json", url: "app/logout", timeout: 20000, success: function() { ; }, error : function(xhr, textStatus, errorThrown) { ajaxErrorHandler(xhr, textStatus, errorThrown); } }) } As you will see, it will log out from the server side officially, however, the page will remain unchanged, which means the page remains unchanged, it will NOT automatically be redirected to login page. Only when the user does something specific(like click on a button on this page) will trigger a pop-up saying "session timeout" and redirect the user to the login page. However, now I am requested to enhance this a little bit, after the AJAX function above has been called, not only user actions like clicking a button will trigger the redirect but also when user refresh the page it will do the same. I tried a little but really have no gain. Currently after page expires, if I refresh, it will not pop-up session-time out dialog, nor it will redirect to the desired page. Is there anything I can do at JavaScript or Ajax level to achieve after user refresh, I will be able to also pop up that dialogue then redirect?
possible better answer: http://stackoverflow.com/a/26794758
type: AnsweredQuestion
tagged with: session
tagged with: java
type: Question
answer count: 2
has title: Is there a way to make Javascript redirect the page after cliking refresh( the session already expired)
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26794729
has answer: http://stackoverflow.com/a/26794758
accepted answer: http://stackoverflow.com/a/26794729
tagged with: ajax

http://stackoverflow.com/comment/42181796
type: Comment
comment on: http://stackoverflow.com/q/26804155
has text: and this https://developer.mozilla.org/en-US/docs/Web/API/Attr
score: 0
type: QuestionComment

http://stackoverflow.com/q/26773959
upvote count: 2
has body: I am using bootstrap typeahead in my angular project. My requirement was to open the typeahead drop down by pressing down key when user have not entered any text. I have successfully added this functionality by using this link. Here is my demo. Now down key opens the drop down and hence it lose the default behavior of traversing the drop down (moving down to next option). index.html Model: script.js (function () { var secretEmptyKey = '[$empty$]' angular.module('plunker', ['ui.bootstrap']) .directive('emptyTypeahead', function () { return { require: 'ngModel', link: function (scope, element, attrs, modelCtrl) { // this parser run before typeahead's parser modelCtrl.$parsers.unshift(function (inputValue) { var value = (inputValue ? inputValue : secretEmptyKey); // replace empty string with secretEmptyKey to bypass typeahead-min-length check modelCtrl.$viewValue = value; // this $viewValue must match the inputValue pass to typehead directive return value; }); // this parser run after typeahead's parser modelCtrl.$parsers.push(function (inputValue) { return inputValue === secretEmptyKey ? '' : inputValue; // set the secretEmptyKey back to empty string }); } } }) .controller('TypeaheadCtrl', function($scope, $http, $timeout) { $scope.selected = undefined; $scope.states = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Dakota', 'North Carolina', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming']; $scope.stateComparator = function (state, viewValue) { return viewVa…
accepted answer: http://stackoverflow.com/a/27902349
score: 2
type: AnsweredQuestion
type: Question
has title: open typeahead drop down by clicking down key first and then traverse the drop down
linked to: http://stackoverflow.com/q/27705490
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: angular-ui-bootstrap
linked to: http://stackoverflow.com/q/24764802
has comment: http://stackoverflow.com/comment/42129152
favorite count: 0
has answer: http://stackoverflow.com/a/27902349
tagged with: css
tagged with: angularjs

http://stackoverflow.com/comment/42082440
type: QuestionComment
has text: [Timestamps](http://en.wikipedia.org/wiki/Unix_time) are by definition UTC+0 based, so you do not need to ensure anything except that its plausible.
comment on: http://stackoverflow.com/q/26748500
score: 0
type: Comment

http://stackoverflow.com/a/26750640
has comment: http://stackoverflow.com/comment/42085293
has comment: http://stackoverflow.com/comment/42089054
has body: Just remove the unnecessary , from here: success: function(data), So the new code should be: $.ajax({ type: "GET", url: 'check_events.php', data: { y : x}, //dataType: 'json', success: function(data) { alert(data); //Alert Data on success not result. } });
score: 0
answers question: http://stackoverflow.com/q/26750448
type: Answer

http://stackoverflow.com/comment/41965881
type: QuestionComment
comment on: http://stackoverflow.com/q/26683570
has text: sorry wrong typing, it is either value or val, but still not working
score: 0
type: Comment

http://stackoverflow.com/a/26783372
answers question: http://stackoverflow.com/q/26783306
has body: Because it is, you need to get Goggle's API first: ... Look here for how to get an API key in the developers guide. If you look at the HTML+JavaScript notice they included the API at the top:
score: 0
type: Answer

http://stackoverflow.com/q/26775868
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/4729644
has comment: http://stackoverflow.com/comment/42130497
score: 0
has title: IE can't set innerHTML of object to empty
tagged with: internet-explorer
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42130502
has comment: http://stackoverflow.com/comment/42130468
has answer: http://stackoverflow.com/a/26775916
answer count: 1
has body: Hello i have such problem, i need to make empty some of my elements in document, when i am trying to do this in IE 11 it fails with error Unknown runtime error on 3rd line. js var element = document.getElementById('sum'); alert(element.innerHTML); element.innerHTML = ''; and html &lt;table&gt; &lt;thead&gt;&lt;/thead&gt; &lt;tbody id="sum"&gt; &lt;/tbody&gt; &lt;/table&gt; In alert i see &lt;TBODY&gt;&lt;/TBODY&gt;. This code works in google chrome and firefox, but not in IE, how i can fix this problem? Thank you for help.
tagged with: javascript
type: Question

http://stackoverflow.com/comment/42033863
comment on: http://stackoverflow.com/a/26721834
type: AnswerComment
score: 0
type: Comment
has text: My apologies Roko I didn't even spot that on there.. thats me being blind I have opened it and it works in query. Thankyou again! if you don't teach already you should!

http://stackoverflow.com/q/26793905
possible better answer: http://stackoverflow.com/a/26793932
has answer: http://stackoverflow.com/a/26793932
answer count: 5
has comment: http://stackoverflow.com/comment/42162891
has comment: http://stackoverflow.com/comment/42163056
has answer: http://stackoverflow.com/a/26793939
type: AnsweredQuestion
tagged with: validation
downvote count: 0
tagged with: javascript
score: 1
has answer: http://stackoverflow.com/a/26793999
favorite count: 0
has title: JavaScript name validation not working
linked to: http://stackoverflow.com/q/11806253
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26793939
has body: My JavaScript validation function doesn't seem to be working. The same validation format also doesn't seem to be working for my other inputs eg. last name. However, it does work for my email input. I'm creating a webpage and within the full code, I have this JavaScript function for validating the first name, so that the field isn't empty upon submission. function validateFName() { var firstname = document.getElementById('firstname').value; if( firstname==null || firstname=="") { alert("Please input a first name"); } } Additionally, below is the input code within the body: First Name: Below is the calling of the function: Below is my full code. (Not yet completed) Truth or Dare Home TRUTH DARE Truth First Name: Last Name: Email: Male Female Date to be performed: Victim Name: Email: Please select a truth questions below Have you ever fallen and landed on your head? Have you ever return too much change? Have you ever been admitted into the hospital? Have you ever baked a cake? Have you ever cheated on test? Did you ever wish you were never born? Did you ever hide from Sunday School?
has answer: http://stackoverflow.com/a/26794002
has answer: http://stackoverflow.com/a/26795267
has comment: http://stackoverflow.com/comment/42162838
upvote count: 1

http://stackoverflow.com/comment/42083706
type: Comment
has text: @KyleSchmelzer Just to clarify your confusion a little: an image doesn't have *child* HTML content. For example, ` hello world ` is a ` ` that contains the HTML `hello world`. While a ` ` or `` can contain HTML content, an image tag can't contain any HTML inside of it. A link can contain text, for example, but doesn't make sense for an image to contain something; it's just an image. For example, ` hello world ` doesn't make any sense: what meaning would text have inside of an ` ` tag?
comment on: http://stackoverflow.com/a/26742564
score: 0
type: AnswerComment

http://stackoverflow.com/a/34041725
upvote count: 3
has comment: http://stackoverflow.com/comment/125436840
has body: This works well for me. &lt;script type="text/javascript"&gt; if (typeof dataLayer !== "undefined") { dataLayer.push({ 'event': 'MyEvent', 'eventCallback' : function() { window.location = 'http://stackoverflow.com/questions/26802554/gtm-data-layer-eventcallback-function'; } }); } &lt;/script&gt; &lt;noscript&gt; &lt;meta http-equiv="refresh" content="0;url=http://stackoverflow.com/questions/26802554/gtm-data-layer-eventcallback-function" /&gt; &lt;/noscript&gt;
type: Answer
answers question: http://stackoverflow.com/q/26802554
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/55839685

http://stackoverflow.com/a/26730561
has comment: http://stackoverflow.com/comment/42048762
score: 5
downvote count: 1
answers question: http://stackoverflow.com/q/26730523
type: Answer
has comment: http://stackoverflow.com/comment/42048755
has body: You need to create h1 using jQuery, currently you are selecting h1. Use $(' ') or $(' ') instead of $('h1') $(function() { var $dialog = $("#dialog"); var data = { destinations: [{ dep: "Varna Airport", dest: "Domodedovo Airport" }, { dep: "Domodedovo Airport", dest: "Schwechat" }, { dep: "Schwechat", dest: "Heathrow Airport" }] }; $.each(data.destinations, function(key, destination) { var $title = $(' ').text(destination.dep + ' - ' + destination.dest); $dialog.append($title); }); });
upvote count: 6

http://stackoverflow.com/comment/42103200
type: Comment
score: 0
has text: Me neither, the other events were described in the cordova documentation so if there was one they would probably include it in there
type: AnswerComment
comment on: http://stackoverflow.com/a/26757967

http://stackoverflow.com/q/26693134
type: Question
has title: How can I stop this image from stretching unproportionally?
has answer: http://stackoverflow.com/a/26693452
tagged with: javascript
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41981841
tagged with: css
has body: Visit http://www.appsbayou.se In Windows 7 (only tested in Chrome and IE11), the big jumbotron background image with the table and mac, becomes stretched unproportionally. However in Mac and in my iPhone the image never becomes stretched. I haven't created this site, I'm to fix the bugs on it though, such as this one. So far I've opened tc-scripts.js and messer around with the function CenterSlides() but it doesn't seem to help anything. Where is this effect coming from and why does it only break in Windows browsers it seems? Is it JS or CSS related? How can I stop this image from being stretched?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26693397
has answer: http://stackoverflow.com/a/26693267

http://stackoverflow.com/q/26793090
has answer: http://stackoverflow.com/a/26793141
has answer: http://stackoverflow.com/a/26793169
accepted answer: http://stackoverflow.com/a/26793265
upvote count: 2
has comment: http://stackoverflow.com/comment/42161771
has comment: http://stackoverflow.com/comment/42161819
has answer: http://stackoverflow.com/a/26793265
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26793141
has comment: http://stackoverflow.com/comment/42161920
type: Question
has comment: http://stackoverflow.com/comment/42161884
downvote count: 0
tagged with: javascript
has title: How do adjacent parentheses in JavaScript functions work, and where is this documented?
favorite count: 0
has body: Before you flag this as a duplicate, note: I understand what an IIFE is. This question is not about IIFE's. The question: why is JavaScript able to parse adjacent parentheses, even in a standard function call? How does this construct - myFunction()() - work? For example, here's a bit of code from a test using Jasmine: var element = compile('&lt;div my-directive&gt;&lt;/div&gt;')(scope); Why would we go this route rather than passing the scope as the second argument? I don't believe this has anything to do with the keeping the global environment clean, and I can't find a thing about this particular construct anywhere, except where it concerns IIFE's. Is there a name for this construct? Most importantly, please provide some sort of authoritative reference (link to mdn, ecmascript spec, etc).
answer count: 3

http://stackoverflow.com/q/26796775
has comment: http://stackoverflow.com/comment/42167905
tagged with: node.js
has answer: http://stackoverflow.com/a/26797057
has title: Regular Expression word boundary breaks on '-'
has body: I have a string in the following format. "ad60 ad60-12 ad60 12-ad60" now I want to find the matches only where "ad60" is written. I started off with /\bad60\b/i but regex finds that '-' is not part of the character string. which returns 4 matches. I tried many things but they all either return 4 matches or return nothing. Any kind of help would be appreciated.
has comment: http://stackoverflow.com/comment/42167999
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26796867
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/26796867
tagged with: javascript
tagged with: string
favorite count: 0
has answer: http://stackoverflow.com/a/26797053
type: Question
has comment: http://stackoverflow.com/comment/42167935
has comment: http://stackoverflow.com/comment/42167810
tagged with: regex
upvote count: 2
answer count: 3
accepted answer: http://stackoverflow.com/a/26797053

http://stackoverflow.com/comment/42115552
has text: That is a good point, I have added a very quick overview of what the special-file.php will look like in the original question.
type: QuestionComment
comment on: http://stackoverflow.com/q/26767242
score: 0
type: Comment

http://stackoverflow.com/comment/42152005
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26787295
has text: The class gets added. Have a look with firebug or developer tools.
score: 0

http://stackoverflow.com/q/26735256
answer count: 3
has comment: http://stackoverflow.com/comment/42057025
has answer: http://stackoverflow.com/a/26735544
has body: This is my scenario, I have an image named img.png shown on top of a page, I have another image named fly_img.png (same size of img.png) located at the bottom of the page. I've built a button, when I click it I would like the fly_img.png to fly/animate and be placed over the img.png. I can't achieve the above scenario. But I tried some code, let me share it with you. $("#clickme").click(function() { var p = $("#img").offset(); var v = $("#fly_img").offset(); $("#fly_img").animate({ opacity: 1, bottom: v.top - p.top, left: v.left - p.left }, 1000, function() { // Animation complete. }); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt; &lt;body&gt; &lt;button id="clickme"&gt; Click here &lt;/button&gt; &lt;br /&gt; &lt;img id="img" src="img.png" alt="" "&gt; &lt;br /&gt; &lt;div style ="padding-left :350px;padding-top:150px "&gt; &lt;img id ="fly_img " src="fly_img.png " style="position: absolute; "alt=" "/&gt; &lt;/div&gt;
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26735745
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26735544
has comment: http://stackoverflow.com/comment/42057344
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26735350
has title: Flying effect in HTML using jquery
has comment: http://stackoverflow.com/comment/42057094
has comment: http://stackoverflow.com/comment/42057396
possible better answer: http://stackoverflow.com/a/26735350
upvote count: 2

http://stackoverflow.com/comment/42033039
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26721608
has text: You may also set, `}, 'json');` as the last argument to the `$.post()` method to have your `data` interpreted as JSON.
score: 0

arrow-functions
tag name: arrow-functions
type: Tag
tags question: http://stackoverflow.com/q/26692389

http://stackoverflow.com/comment/43680606
type: AnswerComment
has text: here is the link to live version of website: [link](http://www.jhdecor.cz). You can have a look at whole source code. In a header, there is this conditional: <!--[if lte IE 9]> and in it, is script for loading jQuery 1.9 instead of 2.1, which is used for non IE 5-9
type: Comment
comment on: http://stackoverflow.com/a/27592443
score: 0

http://stackoverflow.com/comment/41987814
type: Comment
comment on: http://stackoverflow.com/a/26696465
has text: The theme is showing up properly with the select menu, the functionality is just not working. You can see the issue at: http://secretswith.me/newindex.php - The select menu without the JQuery UI checks the database and displays properly. The one with the UI doesn't.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26727320
upvote count: 1
has body: The reason it is not working is because youre only running the function once at load. You need to also make sure the function runs every time you run the toggle event. This is what I would do: $(function(){ var toggleButton = 0 ; console.log(toggleButton); $('.switchButton').toggle(function(){ toggleButton = 1 ; $('.toggleButton').css({'transform' : 'rotateZ(0deg)'}); $('#hover').removeClass('active'); $('#click').addClass('active'); console.log(toggleButton); runTransition(); }, function(){ toggleButton = 0 ; $('.toggleButton').css({'transform' : 'rotateZ(180deg)'}); $('#hover').addClass('active'); $('#click').removeClass('active'); console.log(toggleButton); runTransition(); }); runTransition(); // thumb hover function runTransition(){ if ( toggleButton == 0 ) { $('.thumb').mouseenter(function(){ $('.overlay').css({'left' : '-100%'}); }).mouseleave(function(){ $('.overlay').css({'left' : '0%'}); }); } else { $('.thumb').unbind('mouseenter mouseleave'); $('.thumb').toggle(function(){ $('.overlay').css({'left' : '-100%'}); }, function(){ $('.overlay').css({'left' : '0%'}); }); } } });
answers question: http://stackoverflow.com/q/26727261
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26727261

http://stackoverflow.com/comment/42174260
has text: `{name: "item_two", icon: "./path2")` ? Don't you mean: `{name: "item_two", icon: "./path2"}` You are also missing a closing brace...
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26800350
score: 0

http://stackoverflow.com/comment/42066812
score: 1
has text: Aha. You can [add to the condition](http://stackoverflow.com/a/21825207/21475) of the `else if`: `|| "ActiveXObject" in win`. By default, IE11 tries to fool browser sniffing JS (since it's in general very compatible with other leading browsers). Obviously, this can sometimes cause havoc!
comment on: http://stackoverflow.com/q/26717295
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26678550
answers question: http://stackoverflow.com/q/26678179
downvote count: 0
upvote count: 2
type: Answer
score: 2
has body: You can use ng-form to nest your multiple forms. It allows using nested forms and validating multiple forms as one form. So, you need to nest your multiple forms in one root form. &lt;div ng-controller="demoController"&gt; &lt;form name="parentForm"&gt; &lt;ng-form name="firstForm"&gt; &lt;input type="text" ng-model="firstModel" required&gt; &lt;/ng-form&gt; &lt;ng-form name="secondForm"&gt; &lt;input type="text" ng-model="secondModel" required&gt; &lt;/ng-form&gt; &lt;/form&gt; &lt;/div&gt; Then, all you need to do is to check parent form's validation status. angular.module('formDemo', []) .controller('demoController', ['$scope', function($scope) { if($scope.parentForm.$valid) { //run save, all required all filed out } else { //do nothing because all required are not filed out } }]);

http://stackoverflow.com/comment/42034369
comment on: http://stackoverflow.com/q/26698266
has text: If you don't want to use JJT, the next best thing may be to use the builder pattern.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42089354
comment on: http://stackoverflow.com/a/26738058
has text: Here is a fiddle on which I reproduced the problem : http://jsfiddle.net/L0m1udsy/12/ As you can see in the log the directive is run each second because of interval on the controller. (we see url loaded in logs each second)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26765178
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26765666
score: 0
has comment: http://stackoverflow.com/comment/42111215
has body: This is my first time trying to use JQuery and I was trying to add an event when the document is ready, but every time it says: "$ was used before defined". I don't know how to solve it. I tried different solutions on the internet but couldn't find any. Don't really know what I am doing wrong. I referenced the HTML file to the js file like this Experimenting with Javascript and this is my script $(document).ready(function () { "use strict"; $('div').mouseenter(function () { $(this).animate({ height: '+=10px' }); }); });
has answer: http://stackoverflow.com/a/26765285
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/26765264
has comment: http://stackoverflow.com/comment/42111203
answer count: 4
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/2075337
linked to: http://stackoverflow.com/q/547384
possible better answer: http://stackoverflow.com/a/26765248
has title: '$' was used before it was defined
has answer: http://stackoverflow.com/a/26765248
linked to: http://stackoverflow.com/q/25460567
has comment: http://stackoverflow.com/comment/42111375
upvote count: 1
has comment: http://stackoverflow.com/comment/42112597
duplicate of: http://stackoverflow.com/q/2075337
has comment: http://stackoverflow.com/comment/42111579
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26765264
duplicate of: http://stackoverflow.com/q/25460567

http://stackoverflow.com/a/26680703
has body: Not all regex with branch reset has an equivalent version without. However, the regex in your case can be trivially rewritten to avoid the use to branch reset feature. Let us look at your regex: (?| \s+1+\s+([\d]+)\s+((?:\w+)(?:[\.]ms[\.]com)?)[\S\s]*?\s+1+\s+([\d]+)\s+((?:\w+)(?:[\.]ms[\.]com)?)[\S\s]*?\s+1+\s+([\d]+)\s+((?:\w+)(?:[\.]ms[\.]com)?)| \s+1+\s+([\d]+)\s+((?:\w+)(?:[\.]ms[\.]com)?)[\S\s]*?\s+1+\s+([\d]+)\s+((?:\w+)(?:[\.]ms[\.]com)?)| \s+1+\s+([\d]+)\s+((?:\w+)(?:[\.]ms[\.]com)?) ) Since the next alternative is essentially prefix of the previous alternative down to the syntax, you can merge the two branches by making the tail part optional. Let us look at a simplified view of your regex: (?| ABC| AB| C ) The regex can be rewritten without branch reset: A(?:B(?:C)?)? The rewritten regex doesn't sacrifice any functionality in the original regex. You can even use this regex to replace the regex you currently use in PCRE. \s+1+\s+([\d]+)\s+((?:\w+)(?:[\.]ms[\.]com)?)(?:[\S\s]*?\s+1+\s+([\d]+)\s+((?:\w+)(?:[\.]ms[\.]com)?)(?:[\S\s]*?\s+1+\s+([\d]+)\s+((?:\w+)(?:[\.]ms[\.]com)?))?)?
score: 3
upvote count: 3
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26674069
has comment: http://stackoverflow.com/comment/75035952
type: Answer
accepted answer of: http://stackoverflow.com/q/26674069

http://stackoverflow.com/comment/42166971
has text: So you want the result array contains matched strings first, then the rest of original array sorted by alphanum. order. Isn't it?
comment on: http://stackoverflow.com/q/26796276
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42006922
has text: Use `setTimeout` or `setInterval`, if you must use recursion you'll have to print to the console.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26707136

http://stackoverflow.com/q/26772883
type: AnsweredQuestion
tagged with: caret
has comment: http://stackoverflow.com/comment/42126715
has title: How to fix firefox contenteditable wordwrap?
score: 1
type: Question
has comment: http://stackoverflow.com/comment/42126114
accepted answer: http://stackoverflow.com/a/26779494
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: In firefox only this problem occurs. If you do any sort of update to the range in the keyup event, it won't allow you to move the caret from the beginning of the line to the end of the previous using the left arrow key. See: jsfiddle blah blah blah... enough to fill more than one line bE.addEventListener("keyup",KU); function KU() { var sel=window.getSelection(); var range=sel.getRangeAt(0).cloneRange(); sel.removeAllRanges(); sel.addRange(range); } All I'm doing here is getting the range and saving back again without making any changes. Retrieving and saving the range (without changing anything) causes this problem. Really need to make it work. Works fine in ever other browser.
tagged with: range
tagged with: word-wrap
tagged with: contenteditable
has answer: http://stackoverflow.com/a/26779494
upvote count: 1

http://stackoverflow.com/a/26831695
has body: Two options: you can maintain context by adding a variable that references the original this, or you can use jquery.proxy() Option 1: Maintain the context by adding a variable that references the original this like so: (function ($) { $.likeApi = function (action, options) { var self = this; Then you just call self whenever you are out of context. If you want to keep self available externally, you can inject it using jquery extend. http://api.jquery.com/jquery.extend/ options.success = $.extend(options.sucesss, {el: self}); inside your ajax call $('.user-like').like({ success: function(data, textStatus, jqXHR) { $(data.el).text('Liked'); } }); Option 2: Alternatively, you can use jQuery.proxy() http://api.jquery.com/jquery.proxy/ proxy can change the this context for you...
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42235094
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/26831606
answers question: http://stackoverflow.com/q/26831606

http://stackoverflow.com/comment/42080482
type: QuestionComment
has text: Hitting the API endpoint directly results in a successful get - no problem. I don't think the problem is on the server side.
comment on: http://stackoverflow.com/q/26744979
score: 0
type: Comment

http://stackoverflow.com/comment/42103729
comment on: http://stackoverflow.com/a/26760494
type: Comment
has text: I check it. Wait for a while.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26674042
has comment: http://stackoverflow.com/comment/41948211
score: 0
has comment: http://stackoverflow.com/comment/41947866
has comment: http://stackoverflow.com/comment/41948736
has comment: http://stackoverflow.com/comment/41948674
has body: Refer this code
type: Answer
answers question: http://stackoverflow.com/q/26673918
has comment: http://stackoverflow.com/comment/41948334
has comment: http://stackoverflow.com/comment/42560876

http://stackoverflow.com/comment/138734075
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/75836407
has text: Doesn't work in firefox.... with either method.

http://stackoverflow.com/comment/41969899
comment on: http://stackoverflow.com/a/26685971
type: AnswerComment
has text: After @BrockAdams tip, it's working now. Thank you both.
score: 0
type: Comment

http://stackoverflow.com/a/26748493
answers question: http://stackoverflow.com/q/26748428
type: Answer
has body: "Is it possible to change html after using media query?" ----sure. as long as the css or script runs later than the html created, it will change. as per your requirments "when clicked on any of the thumbnails the right side will show the full image of it." I think you can use some image gallery animation framework and enable its responsive features then custom the css according to your requirements using media queries to achieve the effects you expected.
score: 0

http://stackoverflow.com/comment/42104321
type: Comment
score: 1
has text: I had tried this as well but it does not work properly at runtime. The desired result is not achieved like in the sample I used. In the constructor of my `TypeScript` class I have `this._q = $q;`. So then in the `error` function I tried: `this._q.reject(error);` It builds fine but doesn't seem to properly bubble the error. Is something else required?
type: AnswerComment
comment on: http://stackoverflow.com/a/26750396

http://stackoverflow.com/comment/42224622
comment on: http://stackoverflow.com/q/26828514
has text: Client-side code (html) would be much more helpful than the server-side code you have provided.
score: 0
type: Comment
type: QuestionComment

google-maps-api-3
tags question: http://stackoverflow.com/q/26804173
tags question: http://stackoverflow.com/q/26753444
tags question: http://stackoverflow.com/q/26699350
tags question: http://stackoverflow.com/q/26701591
tags question: http://stackoverflow.com/q/26803791
tags question: http://stackoverflow.com/q/26678721
tags question: http://stackoverflow.com/q/26725037
tags question: http://stackoverflow.com/q/26753884
tags question: http://stackoverflow.com/q/26718944
tags question: http://stackoverflow.com/q/26815839
tags question: http://stackoverflow.com/q/26788898
tags question: http://stackoverflow.com/q/26715769
tags question: http://stackoverflow.com/q/26753665
tags question: http://stackoverflow.com/q/26792257
tags question: http://stackoverflow.com/q/26767234
tags question: http://stackoverflow.com/q/26767038
tags question: http://stackoverflow.com/q/26788082
tags question: http://stackoverflow.com/q/26715081
tags question: http://stackoverflow.com/q/26709953
tags question: http://stackoverflow.com/q/26773271
tags question: http://stackoverflow.com/q/26696979
tags question: http://stackoverflow.com/q/26711530
tags question: http://stackoverflow.com/q/26715570
tags question: http://stackoverflow.com/q/26791546
tags question: http://stackoverflow.com/q/26725442
tags question: http://stackoverflow.com/q/26689124
tags question: http://stackoverflow.com/q/26811576
tag name: google-maps-api-3
type: Tag
tags question: http://stackoverflow.com/q/26810726
tags question: http://stackoverflow.com/q/26761829
tags question: http://stackoverflow.com/q/26706201
tags question: http://stackoverflow.com/q/26678595
tags question: http://stackoverflow.com/q/26707278
tags question: http://stackoverflow.com/q/26692628
tags question: http://stackoverflow.com/q/26750955
tags question: http://stackoverflow.com/q/26762137
tags question: http://stackoverflow.com/q/26684512
tags question: http://stackoverflow.com/q/26830002

http://stackoverflow.com/a/26781191
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26774881
type: Answer
answers question: http://stackoverflow.com/q/26774881
has comment: http://stackoverflow.com/comment/42140004
has body: The problem was that my element was in the DOM but not visible to the user. I don't know why, but selenium web drive could find it only when I pressed a tab that revealed this element to the user. That's weird because I know the element exist even before pressing this tab, because I could find it with the inspect element tool.
score: 0

methodology
tag name: methodology
tags question: http://stackoverflow.com/q/26790281
type: Tag

jqbootstrapvalidation
type: Tag
tag name: jqbootstrapvalidation
tags question: http://stackoverflow.com/q/26700318
tags question: http://stackoverflow.com/q/26723799
tags question: http://stackoverflow.com/q/26767719

jquery-file-upload
tags question: http://stackoverflow.com/q/26707039
tags question: http://stackoverflow.com/q/26694151
tags question: http://stackoverflow.com/q/26822869
type: Tag
tags question: http://stackoverflow.com/q/26703849
tag name: jquery-file-upload
tags question: http://stackoverflow.com/q/26754471

http://stackoverflow.com/a/26724040
has body: var myURL = '&lt;img src="images/image.gif?' + JSON.stringify(activity) + '"&gt;';
has comment: http://stackoverflow.com/comment/42037741
has comment: http://stackoverflow.com/comment/42038000
answers question: http://stackoverflow.com/q/26723950
score: 0
type: Answer

http://stackoverflow.com/a/26752381
answers question: http://stackoverflow.com/q/26751962
has comment: http://stackoverflow.com/comment/42093968
has comment: http://stackoverflow.com/comment/42091081
has comment: http://stackoverflow.com/comment/42093318
has comment: http://stackoverflow.com/comment/42093462
score: 0
has body: Actually it's not you who is supposed to set the header. The server should set the header, Access-Control-Allow-Origin: * in the response. The browser sees that you are sending a cross domain request. As there are security issues with cross domain requests like CSRF and XSS, the browser checks if the server allows cross domain requests by sending another request and inspecting the response headers. If the server doesn't, the browser shows an error. If the server does, it sends your request and get the response. In your case I think the server doesn't set the header in the response.. You may contact server admins and ask them to set that header from the server side. Otherwise you may try JSONP. Basic example of using .ajax() with JSONP?
has comment: http://stackoverflow.com/comment/42093382
has comment: http://stackoverflow.com/comment/42094337
type: Answer
has comment: http://stackoverflow.com/comment/42093892
has comment: http://stackoverflow.com/comment/42091439
has comment: http://stackoverflow.com/comment/42094007
has comment: http://stackoverflow.com/comment/42094409

http://stackoverflow.com/comment/42026705
type: Comment
comment on: http://stackoverflow.com/a/26684642
has text: Excuse me, but yes it is. It is a solution written entirely in Javascript. If you don't want to use a library, then you could rebuild the svg html you have using javascript. This is effectively what the library does, but if you insist.
type: AnswerComment
score: 0

http://stackoverflow.com/a/26708264
type: Answer
answers question: http://stackoverflow.com/q/26707946
has comment: http://stackoverflow.com/comment/42016027
has comment: http://stackoverflow.com/comment/42019578
has comment: http://stackoverflow.com/comment/42019284
has comment: http://stackoverflow.com/comment/42013274
has comment: http://stackoverflow.com/comment/42018623
score: 1
has comment: http://stackoverflow.com/comment/42013578
upvote count: 1
has body: ERRORS 1.div tags in the head 2.In-proper tags in tables 3.Un-necessary `&lt;/br&gt;` tags // which can be solved through `CSS` Refer this working fiddle http://jsfiddle.net/gjfqzyc5/ #ID is unique. if you use same id in multiple places in same page it will not affect. http://jsfiddle.net/gjfqzyc5/6/
accepted answer of: http://stackoverflow.com/q/26707946
has comment: http://stackoverflow.com/comment/42016525
has comment: http://stackoverflow.com/comment/42019540
has comment: http://stackoverflow.com/comment/42009752
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42013936
has comment: http://stackoverflow.com/comment/42013216
has comment: http://stackoverflow.com/comment/42013385
has comment: http://stackoverflow.com/comment/42013080

http://stackoverflow.com/q/26734479
type: Question
score: 0
has comment: http://stackoverflow.com/comment/42065481
has comment: http://stackoverflow.com/comment/42055746
answer count: 1
has title: How to link href to a TAB?
has answer: http://stackoverflow.com/a/26737611
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42058368
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/42055782
has comment: http://stackoverflow.com/comment/42058438
has comment: http://stackoverflow.com/comment/42067918
accepted answer: http://stackoverflow.com/a/26737611
type: AnsweredQuestion
has body: I'm using this example CODE. I have a page with links using href. And I intend to add links to another page. When clicked on these links, automatically opening the TAB on the secound page, is it possible? First page with Links: TAB1 TAB2 Secound page with TABS Licenciaturas Eng Inf Eng Quimic Eng Civil Mestrados Mestrado 1 Mestrado 2 Mestrado 3 Mestrado 4 Mestrado 5 TEXTO LICENCIATURA 1 TEXTO LICENCIATURA 2 TEXTO Mestrado 1 TEXTO Mestrado 2 $('ul.prov').on('click', 'a', function (e) { //Change content displayed $($("ul.prov a.active")[0].hash).hide(); $(this.hash).show(); //Change active item $("ul.prov a.active").removeClass("active"); $(this).addClass("active"); e.preventDefault(); }); //Hide all content divs except first one $("ul.prov a").each(function(index){ if(index != 0) $(this.hash).hide(); else $(this).addClass("active"); }); $('a').click(function(){ $("#tabs").tabs("option", "active", parseInt(this.id)); });
has comment: http://stackoverflow.com/comment/42056141

http://stackoverflow.com/a/26699095
answers question: http://stackoverflow.com/q/26698816
accepted answer of: http://stackoverflow.com/q/26698816
has comment: http://stackoverflow.com/comment/41992364
has comment: http://stackoverflow.com/comment/41992158
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41992179
has comment: http://stackoverflow.com/comment/41992358
type: Answer
has comment: http://stackoverflow.com/comment/41992267
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41992262
has body: Maybe what you need is to create a closure: var newParam = externalFunction(); $.getJSON('http://date.jsontest.com/', (function (newParam) { return function (data) { alert(newParam); $.each( data, function( key, val ) { ... }); }}(newParam))); The closure will capture the value of newParam just when $.getJSON was called.
has comment: http://stackoverflow.com/comment/41992256
has comment: http://stackoverflow.com/comment/41997341

http://stackoverflow.com/a/26700179
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26700048
has body: This appears to be a bug with out and over that has since been fixed. I believe you're using a version that has that problem. I've updated the fiddle to use the new version of jQuery UI and seems to be working fine, http://jsfiddle.net/751vo8d3/2/
accepted answer of: http://stackoverflow.com/q/26700048
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/42066943
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26740244
has text: attributes and properties are different things. You want the property.

http://stackoverflow.com/comment/42069508
score: 1
has text: It sounds like you're trying to make a library that can kill other people's code. If so: unless you have control of the JS engine itself, you can't. You might be able to shut off all intervals (because interval ids are just numbers, but most people don't use intervals because they're bad practice). And unless you control the code loading, you will not have access to the content of any closure so you won't be able to mess with other people's code that way.
comment on: http://stackoverflow.com/q/26741674
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26790600
tagged with: http://stackoverflow.com/tag/html
tagged with: cordova
upvote count: 1
has body: So I'm working on an AngularJS app that I'd like to put out as both a website and a phonegap app. For the web version, I'd like to use html5 mode, but for phonegap, that is obviously a problem, and from searching for quite a while it seems like no one has found a workable solution. I'd like to use one codebase for both, and I'm using grunt's preprocessor to add platform specific code (like taking the LocationProvider configuration out of the phonegap version.) However, the two are incompatible in a very frustrating way--hrefs that work in one don't work in the other, and vice versa. works in html5, while doesn't, and the opposite for non-html5 mode. Currently, the best solution I've thought of is pretty gross--writing links as and then setting hash to either blank or # depending on the platform. This works, but it seems like a pretty poor solution. Are there any better ways to manage links in a codebase meant to work in both modes? (Forcing 'HTML5 fallback mode' does not appear to work in phonegap.)
type: UnansweredQuestion
downvote count: 0
answer count: 0
tagged with: javascript
score: 1
favorite count: 0
tagged with: angularjs
has title: Dealing with hrefs in an angularjs app meant for html5 and phonegap
type: Question

http://stackoverflow.com/a/26798246
has comment: http://stackoverflow.com/comment/42241197
has comment: http://stackoverflow.com/comment/42241167
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/42241243
has comment: http://stackoverflow.com/comment/42240977
has comment: http://stackoverflow.com/comment/42170443
downvote count: 0
has comment: http://stackoverflow.com/comment/42241185
has comment: http://stackoverflow.com/comment/42241362
has comment: http://stackoverflow.com/comment/42241348
score: 1
has body: you can try like this: var json = JSON.parse('{"busno":["Bus No field is required"],"Comp Id":["Comp Id is required."]}'); // alert(json['busno']); $("#busno").html(json.busno);// like this for others also. change here: obj = JSON.parse(data); var error_string = ''; $.each(obj, function(entry) { error_string += obj[entry] + '&lt;br/&gt;'; if(entry == 'busno'){ $("#busno").html(obj[entry]);// like this for others also. } if(entry == 'Comp Id'){ $("#compid").html(obj[entry]);// like this for others also. } }); $('#stage_error').html(error_string);
answers question: http://stackoverflow.com/q/26797872

http://stackoverflow.com/q/26806880
favorite count: 0
accepted answer: http://stackoverflow.com/a/26853273
tagged with: nicescroll
type: AnsweredQuestion
score: 2
upvote count: 2
tagged with: scroll
type: Question
tagged with: mousewheel
tagged with: javascript
has answer: http://stackoverflow.com/a/26853273
has body: I'm trying to make a simple page where there are several rows of images, each one with a horizontal scrolling (using Nicescroll 3). Using the mouse, when the horizontal scrolling of the row is finished, the mouse wheel has no function. What I wanted to do is that the page continued scrolling vertically after the horizontal scrolling has finished. My code: HTML: CSS: #main-content{ min-height: 100%; height: auto; } #main-content > .row { overflow-x:scroll; overflow-y:hidden; white-space:nowrap; } .square-container { float:none; display:inline-block; margin: 20px 30px 5px 30px; } .square{ height: 100px; width: 100px; border: 1px solid black; } Here's my Fiddle
has title: Nicescroll 3 - Vertical scroll after horizontal scrolling ends
answer count: 1
downvote count: 0
tagged with: jquery

http://stackoverflow.com/q/26698440
has comment: http://stackoverflow.com/comment/42237668
has comment: http://stackoverflow.com/comment/41995626
tagged with: cross-domain
has comment: http://stackoverflow.com/comment/42063981
tagged with: wsdl
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: soap
score: 3
answer count: 0
upvote count: 3
has title: Why is cross domain jQuery SOAP request rejected even though "crossDomain" property is set?
has body: I've got a jQuery SOAP request which for some reason does not work. What bothers me is that I've considered everything necessary for a CORS request, but all it returns is status 0 with the statusText "Error". I know this is probably an unproductive (and dumb) question, but may you please take a look and find what I couldn't? I'd be really glad since this is exasperating me for days now. The code is a complete HTML file with JS already and can be taken as-is, only the jQuery path has to be adjusted. Kind regards, jaySon SOAP JavaScript Client Test Analysing the response via Firebug, there's some weird error message in the XML part: XML-Verarbeitungsfehler: Nicht übereinstimmendes Tag. Erwartet: . Adresse: moz-nullprincipal:{e5ad2994-5e6d-4c61-9c47-7cad2f80f169} Zeile Nr. 71, Spalte 96: ...frmInput" type="text" size="50" name="Celsius"> ...-------------------------------------------------^ ... which simply means "XML processing error: non-matching tag. Expected , line 71, column 96". Is that a serverside error? Because it cannot come from my minified HTML fiel as it does not have a table. Kind regards, jaySon
has comment: http://stackoverflow.com/comment/48223882
type: Question
has comment: http://stackoverflow.com/comment/42013136
has comment: http://stackoverflow.com/comment/41993576
tagged with: javascript
linked to: http://stackoverflow.com/q/18874320

http://stackoverflow.com/a/26786661
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26782603
score: 1
upvote count: 1
has body: only use absolute paths or local paths only, should not combine. That is the reason that it shows the security error

http://stackoverflow.com/a/26748436
upvote count: 1
type: AcceptedAnswer
has body: Thanks to Brad, I came up with a solution: var allData = []; $.getJSON("data/bn1.json", function(data) { allData = allData.concat(data); start(allData); }); $.getJSON("data/bn2.json", function(data2) { allData = allData.concat(data2); start(allData); }); Hooray!
type: Answer
accepted answer of: http://stackoverflow.com/q/26748032
has comment: http://stackoverflow.com/comment/42081356
answers question: http://stackoverflow.com/q/26748032
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42082218

http://stackoverflow.com/q/26695541
tagged with: addeventlistener
tagged with: javascript
has comment: http://stackoverflow.com/comment/41986068
score: 0
has body: i.e. I'm looking to get two circles to be moved around simultaneously. One controlled by the arrow keys and the other with WASD. Right now when I push "W", I can't push "up" at the same time to get it working where both circles move up at the same time, just the circle controlled by "W" moves up. Essentially only one key can be pressed and captured at a time and I want multiple keys to be captured at once. This is my code maybe you can tell me where I went wrong:
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41986190
has title: How do you get two/multiple keydown events to run simultaneously?
has comment: http://stackoverflow.com/comment/41986064
type: UnansweredQuestion
tagged with: keydown
duplicate of: http://stackoverflow.com/q/5203407
answer count: 0
linked to: http://stackoverflow.com/q/5203407
type: Question

http://stackoverflow.com/q/26676679
answer count: 3
has title: how to add(link) my customized javascript code to any html/php page
tagged with: external
possible better answer: http://stackoverflow.com/a/26676830
has comment: http://stackoverflow.com/comment/41952447
score: -3
tagged with: php
accepted answer: http://stackoverflow.com/a/26676834
has comment: http://stackoverflow.com/comment/41952806
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41952535
has answer: http://stackoverflow.com/a/26676922
has answer: http://stackoverflow.com/a/26676834
downvote count: 7
has answer: http://stackoverflow.com/a/26676830
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/41972755
tagged with: customization
has body: i would like to add javascript to an html page. I don't want to have those scripts inline on the home page however, I would like them to be in an external javascript file. How do I link to an external javascript file so those scripts are run on the page? asc Computer Grass Roots pvt. ltd. somecodes
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41952584

http://stackoverflow.com/comment/42079079
type: QuestionComment
has text: $("form").submit(); will bypass that, a user could execute the call from their console or url.
comment on: http://stackoverflow.com/q/26746982
score: 0
type: Comment

http://stackoverflow.com/comment/49324832
type: AnswerComment
type: Comment
has text: As of Polymer 1.0, `job` has been renamed to `debounce`.
score: 2
comment on: http://stackoverflow.com/a/26693755

http://stackoverflow.com/comment/41992687
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26698987
type: AnswerComment
has text: *"After fixing your html"* - OP's HTML can be fixed in many ways - by moving the ` ` into `li.collapse-trigger`, by moving the ` ` into an ` ` after `.collapse-trigger`, the answer will not work for such cases... Please also show the *correct* HTML structure that'll work with your answer.

http://stackoverflow.com/q/26743407
has body: In my component's render method, I need to filter through the props.children variable looking for components that have a specific method or property, but I'm unable to expose any methods or properties on the children. I'd like to have the method be inherited from a mixin. Example: var barMixin = { isBar: function() { return true; } }; var Foo = React.createClass({ render: function() { var filteredChildren = this.props.children.filter(function(child) { return child.isBar(); }); return ( &lt;div&gt; {filteredChildren} &lt;/div&gt; ); } }); Unfortunately, this example doesn't work because child.isBar is undefined even when the child components inherit the mixin barMixin. Is there something I'm misunderstanding? I've also tried declaring my mixin methods as static like this: var barMixin = { statics: { isBar: function() { return true; } } }; Any help would be greatly appreciated. Edit: I've found a working solution: var barMixin = { getDefaultProps: function() { return { isBar: function() { return true; } }; } }; Checking in the render function with: child.props.isBar(). However, this doesn't seem like the correct way to do this.
has comment: http://stackoverflow.com/comment/42076490
has answer: http://stackoverflow.com/a/26747003
type: Question
has title: Detecting if a child component has a specific mixin/method in React.js
tagged with: javascript
score: 0
tagged with: reactjs
has comment: http://stackoverflow.com/comment/42073206
answer count: 2
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/43865051
favorite count: 0
has comment: http://stackoverflow.com/comment/42073786
type: UnansweredQuestion

http://stackoverflow.com/q/26776670
has body: I am reading tables tr id with closest attribute on change but I keep getting wrong values and do not know how to fix. If I choose the firts the "lower"(16) checkbox, I get the tr id ok and after that the upper one everythins peachy. Now if I do it the other way around I keep only getting the value of the "top"(17) one. My guess is that it is because the class name is the same, but I´m not sure and I can not influence the class name, since it is generated by Datatables. Could someone take a peek at jquery and tell me what I´m doing wrong. Thank you for your help. var a = $(".report_report").change(function() { var closestTr = $('.report_report:checkbox:checked').closest('tr').attr('id'); alert(closestTr); This the basic table concept
answer count: 1
has answer: http://stackoverflow.com/a/26776766
tagged with: jquery
type: UnansweredQuestion
tagged with: datatable
has title: Getting wrong tr id with .closest .attr
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/a/26722110
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42035025
accepted answer of: http://stackoverflow.com/q/26715850
answers question: http://stackoverflow.com/q/26715850
upvote count: 1
type: AcceptedAnswer
has body: I can't find any docs that show where this got added, but LayoutView should have a getRegion method : https://github.com/marionettejs/backbone.marionette/blob/master/src/marionette.layoutview.js#L74 so your code would look like : var appLayoutView = Backbone.Marionette.LayoutView.extend({ template: function() { return "some template string"; }, regions: { notify: "[data-region='Notify']" }, onShow: function() { this.getRegion('notify').show(new notifyView()); } });

http://stackoverflow.com/comment/41975668
score: 0
comment on: http://stackoverflow.com/a/26689375
type: Comment
has text: I changed it but still null
type: AnswerComment

http://stackoverflow.com/a/26741562
score: 1
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26741492
has body: use this code: var numbers = []; var max = 110; var min = 100; while (numbers.length != 10) { var number = Math.floor(Math.random() * (max - min + 1)) + min; var exists = false; for (var i = 0; i &lt; numbers.length; i++) { if (number == numbers[i]) exists = true; } if (!exists) numbers.push(number); } console.log(numbers); jsfiddle

conflict
tag name: conflict
type: Tag
tags question: http://stackoverflow.com/q/26786500

http://stackoverflow.com/comment/42068342
has text: you missed this line: `th = document.createElement('th');` after `familyNameTxt` ... you had only one th .... that's what was causing your issue
comment on: http://stackoverflow.com/a/26736978
score: 0
type: AnswerComment
type: Comment

visual-studio
tags question: http://stackoverflow.com/q/26740741
type: Tag
tags question: http://stackoverflow.com/q/26683570
tags question: http://stackoverflow.com/q/26745645
tags question: http://stackoverflow.com/q/26733729
tag name: visual-studio

http://stackoverflow.com/q/26746850
accepted answer: http://stackoverflow.com/a/26752530
answer count: 1
favorite count: 0
has body: Could someone explain to me the right way to create custom event listeners in AngularJS that resist DOM modifications? My problem is that I need to plot 2 different datasets according to a dropdown menu. Each element of the datasets has to respond to an event (mouseover/mousemove etc...). But when switching from one dataset to another, the event listener is lost. This behavior is well explained here: Injecting HTML into the DOM destroys the AngularJS events but I do not understand the answer given to bypass it. The post mentions that manually avoiding ng-app can help but it seems like a bad workaround. I would rather redefine my own event listeners such that they would not be lost during DOM modification. Can someone tell me how to correctly use addEventListener in the directive/controller model? Here is an SSCCE html/javascript file that illustrates how my program is organized angular.module("testUpdate", []) .directive("shape", function($parse) { return { restrict: "E", replace: false, scope: false, link: function(scope, element, attrs) { // draw dataset according to #shapeSelection choice d3.select("#shapeSelection") .on("change", scope.redraw); // change color on mouseover d3.selectAll("circle,rect,polygon") .on("mouseover", function() { d3.select(this).style("fill", "#0f0"); }); } }; }) .controller("testController", function($scope) { $scope.shape = "none"; //create datasets $scope.dataset1 = [{ cx: 10, cy: 20 }, { cx: 30, cy: 20 }]; $scope.dataset2 = [{ w: 20, h: 20 }]; // the triangle actually responds to the event d3.selectAll("svg") .append("polygon") .attr("points", "15,20 0,40 30,40") .style("fill", "#f00"); // draw dataset depending on the user choice $scope.draw = function() { if ($scope.shape === "circle") { d3.selectAll("svg").selectAll("circle") .data($scope.dataset1).enter() .append("circle") .attr("cx", function(d) { return d.cx; }) .attr("cy", function(d) { return d.cy; }) .attr("r", 10) .style("fill", "#f00"); } else if ($scope.shape === "rect") …
tagged with: angularjs
upvote count: 2
tagged with: d3.js
linked to: http://stackoverflow.com/q/23119434
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/26752530
tagged with: dom
has title: AngularJS DOM modification deletes events -> need viable workaround implementation schema
type: Question
downvote count: 0
tagged with: javascript
tagged with: event-handling

http://stackoverflow.com/comment/42087721
comment on: http://stackoverflow.com/q/26752069
type: QuestionComment
has text: did you try `httpRes.setHeader("Access-Control-Allow-Headers", "x-requested-with");` ?
score: 0
type: Comment

http://stackoverflow.com/q/26773933
tagged with: mandrill
tagged with: cloud
tagged with: javascript
upvote count: 1
downvote count: 0
favorite count: 0
tagged with: parsing
type: UnansweredQuestion
has body: Created a parse cloud function to send an email via MandrillApp to all recipients, can able to send all emails. But not able to see the logs, status(delivered/Rejected/Bounce) of sent email. Created a webhook for them and called that when we invoke sendemail cloud function. How can I request for webhooks results. I like to get the status of the email. Can anyone of experts work on this, pl. share your inputs to accomplish this.. It will be helpful if you give detailed code. Thanks in advance
tagged with: sendmail
answer count: 0
score: 1
has title: Mandrill SendEmail and get webhooks parse cloud code javascript
type: Question

http://stackoverflow.com/q/26806910
score: 1
type: Question
tagged with: google-closure-compiler
accepted answer: http://stackoverflow.com/a/26818359
possible better answer: http://stackoverflow.com/a/26813412
tagged with: javascript
has answer: http://stackoverflow.com/a/26813412
answer count: 2
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/5374455
has answer: http://stackoverflow.com/a/26818359
upvote count: 1
type: AnsweredQuestion
has body: I'm trying to reduce my javascript code (which have 172k lines) with Closure Compiler installed via node package manager, but it fails with "out of memory error": $ ccjs ./static/ui.jsexe/all.js --compilation_level=ADVANCED_OPTIMIZATIONS &gt; ./static/ui.jsexe/all.min.js java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2245) at java.util.Arrays.copyOf(Arrays.java:2219) at java.util.ArrayList.grow(ArrayList.java:213) at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:187) at java.util.ArrayList.add(ArrayList.java:411) at com.google.javascript.jscomp.parsing.NewIRFactory.&lt;init&gt;(NewIRFactory.java:241) at com.google.javascript.jscomp.parsing.NewIRFactory.transformTree(NewIRFactory.java:289) at com.google.javascript.jscomp.parsing.ParserRunner.parse(ParserRunner.java:106) at com.google.javascript.jscomp.JsAst.parse(JsAst.java:84) at com.google.javascript.jscomp.JsAst.getAstRoot(JsAst.java:50) at com.google.javascript.jscomp.CompilerInput.getAstRoot(CompilerInput.java:118) at com.google.javascript.jscomp.Compiler.hoistNoCompileFiles(Compiler.java:1500) at com.google.javascript.jscomp.Compiler.parseInputs(Compiler.java:1404) at com.google.javascript.jscomp.Compiler.parse(Compiler.java:788) at com.google.javascript.jscomp.Compiler.compileInternal(Compiler.java:743) at com.google.javascript.jscomp.Compiler.access$000(Compiler.java:93) at com.google.javascript.jscomp.Compiler$3.call(Compiler.java:655) at com.google.javascript.jscomp.Compiler$3.call(Compiler.java:652) at com.google.javascript.jscomp.Compiler$4.call(Compiler.java:699) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) I have 16 gigabytes on my machine, how can I resolve this issue?
has title: Closure Compiler (ccjs) out of memory error

http://stackoverflow.com/q/26811792
accepted answer: http://stackoverflow.com/a/26811896
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: mongodb
tagged with: javascript
has body: **This is my drink list, with a delete button for each ingredient.** ![My Ingredient Page][1] [1]: https://i.sstatic.net/QPNHs.png **1. Relevant template html:** div.row.editRow(ng-repeat="drink in drinks | orderBy: 'name'") form(ng-submit="editDrink(drink)") div.col-md-3 input(value="{{drink.name}}", ng-model="drink.name") div.col-md-3 input(value="{{drink.image}}", ng-model="drink.image") div.col-md-1.text-right a(ng-click="addNewIngredient()") + div.col-md-4 div.row(ng-repeat="ingredient in drink.ingredients") div.col-md-7 select.mixers(value="{{ingredient.name}}", ng-model="ingredient.name", ng-options="i for i in ingredientsList") div.col-md-4 input.addForm.ingredient(value="{{ingredient.amount}}", ng-model="ingredient.amount", style="width: 100px;") div.col-md-1 a(ng-click="removeIngredientEdit($index)") - div.col-md-1 button.btn Save 2. Relevant controller method: $scope.removeIngredientEdit = function (index) { $scope.newDrink.ingredients.splice(index); console.log('Removed ingredient at index ' ); }; When I do this nothing happens. I am using mongodb to store my drink information. I am new to Angular JS and do not know what to do.
has answer: http://stackoverflow.com/a/26811896
has comment: http://stackoverflow.com/comment/42196777
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42196906
has title: How to remove an Item from scope AngularJS
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42199009

http://stackoverflow.com/q/26698682
tagged with: angularjs
tagged with: parameter-passing
tagged with: php
has answer: http://stackoverflow.com/a/26699181
tagged with: laravel
type: AnsweredQuestion
has title: AngularJS get parameters from Laravel
has body: I don't know how to pass a variable from home.blade.php of Laravel to my Controller.js of AngularJS. LARAVEL: I have a home.blade.php with a variable searchid: @extends('layouts.default') @section('content') &lt;div class="row" ng-app="app"&gt; {{ $searchid }} &lt;post-controller&gt;&lt;/post-controller&gt; &lt;/div&gt; @stop This variable is send by controller of Laravel: class SearchController extends BaseController { public function makeSearch($searchid) { return View::make('pages.search')-&gt;with('searchid', $searchid); } } ANGULARJS: I need to pass this variable to AngularJS controller. I have a directive file like this: app.directive('postController', function() { return { restrict: 'E', templateUrl: 'templates/search.html' } }); And controller file like this: app.controller('SearchController', ['$scope', function($scope, $routeParams) { console.log($routeParams.search); $scope.param = $routeParams.search; }]); I don't know how to pass this variable search to my controller.js.
type: Question
accepted answer: http://stackoverflow.com/a/26699181
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/q/26738925
answer count: 1
tagged with: clicktag
has body: I made a banner using flashcc2014 using the html5 canvas. I just don't know how to add the normal clicktag banners need in javascript.
has title: how do I add a clicktag in JS to a banner done with flash cc2014 html5 canvas?
type: AnsweredQuestion
tagged with: flash-cc
has answer: http://stackoverflow.com/a/26746682
accepted answer: http://stackoverflow.com/a/26746682
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/q/26800747
tagged with: javascript
has body: So I have this: I managed to find the zoom code on here, however I couldn't find a way to remove the grey bar that appears at the top of the map with my google account stuff. A screenshot can be found here. Is there a way to remove this using a URL parameter?
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: url
favorite count: 0
has title: URL variables on a Google 'My Maps'
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/26801801
accepted answer: http://stackoverflow.com/a/26801801
downvote count: 0
type: Question
tagged with: google-maps

http://stackoverflow.com/q/26702499
has title: Modify Javascript to remove variables
upvote count: 0
score: -2
tagged with: javascript
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26703836
has comment: http://stackoverflow.com/comment/42000831
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42002301
has comment: http://stackoverflow.com/comment/41998623
has comment: http://stackoverflow.com/comment/42002637
has comment: http://stackoverflow.com/comment/41998415
has body: I took some Javascript code originally meant to send users to different domains based on their location and changed it to make it so it just sends user to one location. The problem: It's rather redundant. Would someone be able to provide the code that just uses one domain? Thank you &lt;script src="//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var redirect = (function () { /* This implements the actual redirection. */ var redirectBrowser = function (site) { var uri = "http://" + site + ".google.com/"; window.location = uri; }; /* These are the country codes for the countries we have sites for. * We will check to see if a visitor is coming from one of these countries. * If they are, we redirect them to the country-specific site. If not, we * redirect them to world.example.com */ var sites = { "WA": true }; var defaultSite = "www"; var onSuccess = function (geoipResponse) { /* There's no guarantee that a successful response object * has any particular property, so we need to code defensively. */ if (!geoipResponse.city.iso_code) { redirectBrowser("www"); return; } /* ISO country codes are in upper case. */ var code = geoipResponse.city.iso_code.toLowerCase(); if ( sites[code] ) { redirectBrowser(code); } else { redirectBrowser("www"); } }; /* We don't really care what the error is, we'll send them * to the default site. */ var onError = function (error) { redirectBrowser("www"); }; return function () { geoip2.city( onSuccess, onError ); }; }()); redirect(); &lt;/script&gt;
downvote count: 2
type: Question

http://stackoverflow.com/a/26689456
type: Answer
upvote count: 5
has body: This is just normal usage of comments in javascript program, nothing special about it. You can use single or multi-line comments the way you usually would use: var myObject = { prop1: 'value1', // prop1 description prop2: 'value2', /* prop2 description */ prop3: /* or even so */ 'value3' } Also you should not confuse javascript object notation with JSON. Above is not JSON (and as you correctly stated comments are not allowed within JSON body), JSON is just a string representation of the javascript object.
answers question: http://stackoverflow.com/q/26689302
score: 5
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26689302

http://stackoverflow.com/q/26794395
tagged with: javascript
has body: hey guys i am a newbie to core javascript. i am learning to make an array. I wrote this code but somehow the pop is not working. var players=['david','micky','Ryan','Benjamin','fransesco']; var totalPlayers=players.length; var lastPlayer=players.pop(); alert=("The Last Player is " + lastPlayer); alert("The total number of players are " + totalPlayers); Now, the lastplayer alert is not showing up. Please tell me where i am doing it wrong.thanks.
has title: My pop method is not working
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/26794504
has answer: http://stackoverflow.com/a/26794448
has answer: http://stackoverflow.com/a/26794504
favorite count: 0
has comment: http://stackoverflow.com/comment/42164052
has answer: http://stackoverflow.com/a/26794626
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26794448
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42163609

request
tags question: http://stackoverflow.com/q/26791301
tags question: http://stackoverflow.com/q/26734047
tag name: request
type: Tag
tags question: http://stackoverflow.com/q/26708371
tags question: http://stackoverflow.com/q/26809688
tags question: http://stackoverflow.com/q/26762913

http://stackoverflow.com/q/26829447
has body: In my Angular program, I would like to use a template that can be passed two variables. I wish the above line would work but it doesn't. I can't figure out how to pass these two variables. My template resembles the toy template below (I'm aiming for the same recursive effect). Any ideas on how to do this?
accepted answer: http://stackoverflow.com/a/26829471
upvote count: 1
type: AnsweredQuestion
tagged with: recursion
score: 1
type: Question
has answer: http://stackoverflow.com/a/26829471
answer count: 1
downvote count: 0
tagged with: javascript
has title: How to pass multiple variables to onload in Angular ng-include?
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/42199740
type: Comment
comment on: http://stackoverflow.com/q/26813184
has text: Why not remove it? You don't need to show it again.
score: 0
type: QuestionComment

http://stackoverflow.com/q/26742822
tagged with: mysql
has answer: http://stackoverflow.com/a/26742985
tagged with: arangodb
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26743692
type: AnsweredQuestion
score: 2
has body: I wrote a naive Node.js script to migrate a MySQL table to an ArangoDB collection. It works quite well, despite that there are always records missing as if the connection was closed too early. How many documents will be missing is not random however, it's always the same amount: There are 68,750 records in the source, my self-built buffer has a size of 1,000 and 68,682 (-68) documents are created in ArangoDB var mysql = require('mysql'); var arango = require('arango'); var docs = []; function processRow(row, connection) { if (docs.length &lt; 1000 &amp;&amp; row !== false) { docs.push(row); } else { connection.pause(); db.import.importJSONData( "target_collection", JSON.stringify(docs, function(key, value) { if (value == null || (typeof value === "string" &amp;&amp; !value.trim())) { return undefined; } else { return value; } }), { createCollection: true, waitForSync: false }, function(err, ret) { docs = []; connection.resume(); if (row === false) process.exit(); } ); } } var connection = mysql.createConnection({ host: 'localhost', user: 'root', password: '' }); var db = arango.Connection("http://localhost:8529/my_database"); connection.connect(); var query = connection.query('SELECT * FROM my_database.source_table'); var i = 0; query .on('error', function(err) { console.log(err); }) .on('result', function(row) { i++; if (i % 1000 == 0) console.log(i); processRow(row, connection); }) .on('end', function() { processRow(false, connection); }); Another version of the script I wrote uses a transform stream and imports exactly 68,744 records, and a third script all of the records but creates the target collection and records as it finishes, although it should write every n source records. Is there something obvious I am missing here? A counter variable can confirm that all 68,750 records are read and there are no source records which are completely empty (all columns NULL), as there's at least a primary key integer (and I also tried without customized JSON stringify hand…
downvote count: 0
has title: Import from MySQL to ArangoDB consistently incomplete (own Node.js script)
favorite count: 0
has answer: http://stackoverflow.com/a/26743692
tagged with: rest
type: Question
tagged with: node.js
upvote count: 2
answer count: 2
possible better answer: http://stackoverflow.com/a/26742985

http://stackoverflow.com/q/26714912
has title: Facebook notification when event happens on my server
tagged with: java
score: 0
answer count: 1
tagged with: javascript
tagged with: web
tagged with: facebook-graph-api
tagged with: facebook
has body: I'm new to FB API, and I'm completely lost through variety of them. I have Java web app, and FB login to it on my site. How can I send notification to user, when some event happens (for example, his good arrived, and we want to notify him)? Should I use Cavans application, or Graph API? Is it possible?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26715651
accepted answer: http://stackoverflow.com/a/26715651
type: Question

http://stackoverflow.com/comment/42157742
type: Comment
has text: You can recursively get the parents until you get to the parent you want. The root node/parent is "body", use the name property to check this.
comment on: http://stackoverflow.com/a/26788254
score: 0
type: AnswerComment

http://stackoverflow.com/q/26825115
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: kik
tagged with: android
has body: I've been messing around in a Kik web app for Android. I noticed that certain events do not fire properly until the user has interacted with the page. The problem manifests itself in Kik, but it also shows up in the stock web browser on my Galaxy S5 running Android 4.4/KitKat. HTML click here: a button textbox: CSS * { font-size: 20px; } JavaScript window.onload=function(e) { // set function to button.click $('#button').click(function() { fucus(); }); // run the exact same function rightey-right now $('#textbox').focus(); // run it again in three minutes $('#textbox').focus() }; function fucus() { $('#textbox').focus(); }
accepted answer: http://stackoverflow.com/a/26825410
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26825410
type: Question
has title: Why must the user tap inside my app before events (like Focus etc) work?
tagged with: javascript
score: 0

http://stackoverflow.com/comment/42116345
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26767696
has text: What do you mean when you say you want the "footer to move with the content"? Setting an element as position:relative has no real effect in the implementation you show here. Setting an element as position:absolute takes it out of the normal flow of the document, causing other elements to ignore it when calculating their position.
score: 0

http://stackoverflow.com/comment/58516495
type: AnswerComment
has text: Hi, I'm using PostMan for testing the API and I am able to perform coblogin authentication. However, when I try to register a user calling the suburl `jsonsdk/UserRegistration/register3` and setting the parameters specified in the documentation in `x-www-form-urlencoded` format, I get the following error: `{ "errorOccurred": "true", "exceptionType": "Exception Occurred", "referenceCode": "_1eed175d-4d05-4644-9a84-913976e9799b" }`, which is not very informative. Why could this be happening?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26754891

http://stackoverflow.com/q/26770988
tagged with: angularjs
type: Question
has title: Cannot read property $scope.dropdownfield of null in angularjs
has body: I have a simple registration form page. The form page have a person_id field and drop down list name condition_code_1. Person_id field is mandatory field meanwhile the condition_code_1 drop down list is an optional field mean's that it is optional for user to be selected or not. The value of the drop down list is fetched through specialConds array that data are get from oracle db field. I stored the value of drop down list in data array in Condition_code_1 controller.The problem is when i do not select the list and submitted the form, angularjs throws an error : Cannot read property 'condCode1' of null. How do i ignored the drop down list when it is not selected. Any help here. 1) Condition_code_1 list &lt;select id = "condition_code_1" data-placeholder = "Please select" ng-model = "specialCond.condCode1" ng-options = "t.condCode as t.condDesc for t in specialConds" chosen&gt; &lt;option value=""&gt;&amp;nbsp;&lt;/option&gt; &lt;/select&gt; 2) Condition_code_1 Controller $scope.create = function () { var data = {}; data.personId = $scope.person_id; data.conditionCode1 = $scope.specialCond.condCode1; CondCodeSvc.create(data, function(res){ jAlert('Create successfull'); }, errSvc.errorHandler); };
score: -1
answer count: 1
downvote count: 1
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26771496
upvote count: 0
favorite count: 0

http://stackoverflow.com/q/26718290
type: Question
has title: jquery toggle class & mouseup button issues
accepted answer: http://stackoverflow.com/a/26718644
has comment: http://stackoverflow.com/comment/42027017
has body: I am using 2 script's, as shown below. The 1st script open's a div when a button is clicked with the class of "bookaviewing". I need the div with the class "booking-form" to close when someone click's outside of the "booking-form" div - the 2nd script does this. My issue is when you click the button more than once (as it's outside of the "booking-form" div), it won't close the "booking-form"... it just keeps opening. I need to combine the 2 below scripts &amp; need assistance. Script 1 &lt;script type="text/javascript"&gt; // set click/toggle event on bookaviewing button to show form $('.bookaviewing').click(function () { $('.booking-form').slideToggle(400).toggleClass('opened'); return false; }); &lt;/script&gt; Script 2 &lt;script type="text/javascript"&gt; // close booking-form when click outside of div $(document).mouseup(function (e){ var bookingform = $(".booking-form"); if (!bookingform.is(e.target) &amp;&amp; bookingform.has(e.target).length === 0){ bookingform.hide(); } }); &lt;/script&gt;
tagged with: mouseup
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42027027
has comment: http://stackoverflow.com/comment/42026687
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42026627
has comment: http://stackoverflow.com/comment/42026716
has comment: http://stackoverflow.com/comment/42027014
favorite count: 0
has answer: http://stackoverflow.com/a/26718644
type: AnsweredQuestion
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42026778
tagged with: toggle

http://stackoverflow.com/q/26816270
tagged with: angularjs
answer count: 3
has comment: http://stackoverflow.com/comment/42203309
has title: Simple Angularjs not showing up
accepted answer: http://stackoverflow.com/a/26816534
has comment: http://stackoverflow.com/comment/42203412
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/26816507
type: Question
has answer: http://stackoverflow.com/a/26816519
score: 0
possible better answer: http://stackoverflow.com/a/26816507
has answer: http://stackoverflow.com/a/26816534
has body: I went through two tutorials with different approaches and the same thing is happening. The expressions simply aren't showing up and I everything step by step but it doesn't go the same way. Page Title Name: {{ name }} When executed the {{ name }} is printed out instead of taking the vlue in the variable name.

http://stackoverflow.com/comment/42249104
type: Comment
comment on: http://stackoverflow.com/a/26829835
has text: Thanks Miki, I had thought about this solution before posting this question. But for the sake of knowing things in depth, I have posted this. Suppose, we have an xml dataset and we need to use a particular cell's value. Anyway, Thanks for the answer.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41984143
type: Comment
type: QuestionComment
has text: Also for the first two objects, the correct total is 73196, not 23196. There are bigger issues here.
score: 0
comment on: http://stackoverflow.com/q/26694332

http://stackoverflow.com/q/26741060
has body: I have this sample code: Example ...content... As you can see, the webpage waits till it's loaded and then fades in. But in some cases, some users might have a slow internet and might be confused by the website taking a while to load. I've tried to look for jQuery or other preloaders but none seem to work with my code. How could I add a small, centered loading gif to this code to let the users know the webpage is indeed loading? Also, this is related to the same website so I didn't want to post another question. My background img changes randomly every time the page is reloaded. This is the code: It works great. Now, the only little thing I wondered was, how could I make that background img fade in? I can't seem to make it work by adding .fadeIn(1000); to the code. $("#banner").css("background-image","url('css/images/overlay.png'), url('images/" + randomNum + ".jpg')").fadeIn(1000); How can I make it fade in so it looks a little bit neater?
tagged with: javascript
has answer: http://stackoverflow.com/a/26741342
answer count: 1
downvote count: 0
has title: Loader before website fadein
tagged with: jquery
favorite count: 0
tagged with: fadein
tagged with: http://stackoverflow.com/tag/html
score: 2
upvote count: 2
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/38048866
has body: I too was getting the same error . For me the error was because i was behind a proxy . When run without proxy the code worked fine . So try this once .
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26780760

http://stackoverflow.com/comment/42279991
type: Comment
comment on: http://stackoverflow.com/q/26692852
type: QuestionComment
score: 0
has text: Did you ever get an answer to your question? I'm having the same problem. The POST does not seem to be working on the button click.

http://stackoverflow.com/comment/42093373
type: Comment
type: QuestionComment
has text: Sorry I still don't understand ..
comment on: http://stackoverflow.com/q/26754233
score: 0

http://stackoverflow.com/comment/42202223
type: AnswerComment
comment on: http://stackoverflow.com/a/26811299
score: 0
type: Comment
has text: @DavidKnipe, I don't know if HTML specify this or not, but in the most used browser (IE, FX, Chrome) I can ensure you that the behaviour is the same: the first element is returned... However we are talking of an *error*, because there shouldn't be two elements with the same id.

http://stackoverflow.com/q/26789299
answer count: 1
upvote count: 3
tagged with: forms
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: angularjs
type: Question
score: 3
favorite count: 0
has title: Using angular 1.3 ngMessage for form submission errors
has body: I've gotten an example of form validation working correctly in my app for the login page, looking something like this: Password A password is required Password must be at least {{passwordLength}} characters This works great for "required" and "minlength" checks, which can be done before submission. However after submission, we can get back a 401 for an invalid username/password. Angular 1.3 has an async validaiton concept, but it seems to run before submission, and it seems unreasonable to try to login twice (once just to see if they could and prompt an error) Is there a reasonable way to use the ng-messages concept to display this post-submission error?
has answer: http://stackoverflow.com/a/26791933

http://stackoverflow.com/comment/41978081
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26685817
has text: I've tried debugging using the code sound.addEventListener("eventname", function(){ console.log(url + " eventname"); }); but with the following events: `abort`, `canplay`, `durationchange`, `emptied`, `ended`, `error`, `loadeddata`, `loadedmetadata`, `loadstart`, `pause`, `play`, `playing`, `progress`, `ratechange`, `seeked`, `seeking`, `stalled`, `suspend`, `timeupdate`, `volumechange`, `waiting`, and `canplaythrough`. The only events that run when the load fails seem to be `emptied`, and `loadstart`. I've also updated my post to show the `play()` function is deferred.
score: 0

http://stackoverflow.com/comment/41991570
comment on: http://stackoverflow.com/a/26698617
score: 0
type: AnswerComment
type: Comment
has text: Oh, do you want it so that only 1 checkbox per row can be selected?

http://stackoverflow.com/a/26753677
accepted answer of: http://stackoverflow.com/q/26753668
has body: Try this : Inside click event you have to use $(this) to refer to clicked element. You were calling $(".unlink_table").val(); which will try to call val() for all element with class="unlink_table". Also .val() will not work for div, you have to use .attr('value'). $(".unlink_table").click(function(){ var test = $(this).attr('value'); alert(test); }); DEMO
type: Answer
answers question: http://stackoverflow.com/q/26753668
has comment: http://stackoverflow.com/comment/42090615
downvote count: 1
has comment: http://stackoverflow.com/comment/42090634
score: 4
has comment: http://stackoverflow.com/comment/42090534
type: AcceptedAnswer
upvote count: 5

http://stackoverflow.com/comment/42197117
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26788095
type: Comment
has text: I want the modal to show up if all is valid, do I do that with the first or with the second part that you wrote? If I put in the first thing, it is not working, cause it will give me an alert once I open the html document. And it anyways says please fill out this field? What do you suggest? I am using a standard bootstrap modal that I defined in my HTML.

http://stackoverflow.com/comment/42218380
type: AnswerComment
score: 0
type: Comment
has text: I can hardly beleive the idea might work at all. The requirements of a customer are too far from what is supposed to be tested (at least at the level of unit-tests). The actual tests written by a developer mostly verify the substances that do not make too much sence for a business. Customers may be curious about acceptance / system tests, and today this is mostly GUI which is tested manually (until the task is to create something computing-related with an API, like a library, but in this case the customer should obviously be capable of writing code).
comment on: http://stackoverflow.com/a/26812383

http://stackoverflow.com/comment/42116613
has text: the outcome is the same as doing `logs[curTestName].push({log:"",etc})` instead of `curLogs.push({log:"",etc})`
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26767815

http://stackoverflow.com/comment/42109192
comment on: http://stackoverflow.com/a/26763332
type: AnswerComment
score: 0
type: Comment
has text: @TrueBlueAussie That was the answer! Thank you for figuring that out for me.

http://stackoverflow.com/comment/42133622
type: AnswerComment
score: 0
has text: Use `bottom:-45px;` then.
type: Comment
comment on: http://stackoverflow.com/a/26774801

http://stackoverflow.com/a/26776864
type: Answer
has body: Like this: var clickTimes = []; $("#bu").on('click', function() { var clickTime = new Date().getTime(); for (var i = 0; i &lt; clickTimes.length; i++) { var difference = clickTime - clickTimes[i]; alert("Time since click " + (i + 1) + ": " + difference); } clickTimes.push(clickTime); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="button" id="bu" value="Click me"/&gt; By storing all the times the button was clicked in an array, you can calculate the difference between any two clicks at any point. So for the third and the fourth click, respectively, it would be: var timeBetweenFirstAndThirdClick = clickTimes[2] - clickTimes[0]; var timeBetweenFirstAndFourthClick = clickTimes[3] - clickTimes[0];
accepted answer of: http://stackoverflow.com/q/26776691
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26776691
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42082755
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26737037
type: Comment
has text: really sorry, It was my mistake. wrong syntax. name="Images['+i+']

http://stackoverflow.com/a/26756599
type: Answer
answers question: http://stackoverflow.com/q/26756395
has comment: http://stackoverflow.com/comment/42095298
has comment: http://stackoverflow.com/comment/42098362
has comment: http://stackoverflow.com/comment/42099257
score: 0
has comment: http://stackoverflow.com/comment/42098547
has comment: http://stackoverflow.com/comment/42095853
has body: The following line is useless so remove it: document.getElementById('game').contentWindow.document.body.innerHTML; First you are not looking at the code in the iframe, you are selecting elements in the current window. So you need to change to the code look at the iframe. Second, the contains selector looks at the text, not the attributes. You want to use an attribute contains selector. Change $('a:contains("5562089")') to $('a[href*="5562089"]', $("game").contents()) and I am not sure why you are clicking the div and not the actual link itself. $('a[href*="5562089"]', $("game").contents()).closest('tr').find('.fightActionInnerInner').parent("a").trigger("click"); and hopefully the iframe is fully loaded when you try to click it. And if the name of the function does not change you can just call the function $('#game')[0].contentWindow.fsb99995143();

http://stackoverflow.com/comment/41967024
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26684322
has text: my understanding is that, in the background of the map function, it first makes a copy of the object in the array and then passes that copied object to the callback function, and the return of that callback function is inserted into the new array. At leas that's the way it SHOULD work....
score: 0

http://stackoverflow.com/a/26766959
answers question: http://stackoverflow.com/q/26766837
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26766837
has body: Sure, just have the function accept a parameter that dictates what property to show. function $(id){ return document.querySelector(id); }; function Person(name, age, weight, favoriteActivity) { this.name = name; this.age = age; this.weight = weight; this.favoriteActivity = favoriteActivity; } var Jack = new Person("Jack Crish", 29, 200, "coding"); var a = $("#person"); function showProperty(property) { this.innerHTML = Jack[property]; } /* function showAge(){ a.innerHTML = Jack.age; } function showName(){ a.innerHTML = Jack.name; } function showWeight(){ a.innerHTML = Jack.weight; } function showActivity(){ a.innerHTML = Jack.favoriteActivity; } */ $("#age").addEventListener("click", showProperty.bind(a, 'age')); $("#name").addEventListener("click", showProperty.bind(a, 'name')); $("#weight").addEventListener("click", showProperty.bind(a, 'weight')); $("#enjoys").addEventListener("click", showProperty.bind(a, 'favoriteActivity')); p{ width:200px; height:20px; border:1px solid grey; }
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/26794802
linked to: http://stackoverflow.com/q/17780756
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42164557
tagged with: css
has comment: http://stackoverflow.com/comment/42166195
score: 10
has title: Autofocus With Cursor On End Of Textbox
has answer: http://stackoverflow.com/a/26795105
accepted answer: http://stackoverflow.com/a/26795862
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26794872
tagged with: javascript
answer count: 6
linked to: http://stackoverflow.com/q/511088
possible better answer: http://stackoverflow.com/a/26795028
upvote count: 10
has body: I want to put autofocus on a html textbox such that the cursor points to the end of some text already present in the textbox. I know what the autofocus attribute does. And I have also seen put cursor at end of text input's value which answers how to put cursor at the end, But the textbox is not autofocussed upon page reload. How can I do both - autofocus the textbox upon page reload and put cursor to end of text ? Code : <?php echo $_GET["task"];?> I want to put Cursor after the text echoed. It is not the value of the textarea. Also the textbox I referred to is Textarea.
has answer: http://stackoverflow.com/a/26794850
type: Question
has answer: http://stackoverflow.com/a/26795028
has comment: http://stackoverflow.com/comment/137096528
has answer: http://stackoverflow.com/a/26794884
has comment: http://stackoverflow.com/comment/42164391
downvote count: 0
has comment: http://stackoverflow.com/comment/42165752
tagged with: web
tagged with: jquery
linked to: http://stackoverflow.com/q/4609405
favorite count: 0
has answer: http://stackoverflow.com/a/26795862
has comment: http://stackoverflow.com/comment/42164513
has comment: http://stackoverflow.com/comment/42164519

http://stackoverflow.com/q/26755167
possible better answer: http://stackoverflow.com/a/26755446
has answer: http://stackoverflow.com/a/26755446
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26755432
tagged with: css
accepted answer: http://stackoverflow.com/a/26755432
has title: How to remove HTML tags before replacing with new elements?
type: Question
type: AnsweredQuestion
tagged with: replace
has body: My code: http://codepen.io/vincentccw/pen/JhbgI Below is the JavaScript that I use: var items = "&lt;span class=\"brReplace\"&gt;&lt;/span&gt;", spans = document.getElementsByTagName( 'br' ); [].slice.call( spans ).forEach(function ( span ) { span.innerHTML = items; }); Basically I want to remove the default break elements with a custom span, but with using just purely JavaScript only. However it turns out that the break elements aren't removed before replacing with my custom span and hence become like this: &lt;br&gt; &lt;span class=\"brReplace\"&gt;&lt;/span&gt; &lt;/ br&gt;
answer count: 2
tagged with: javascript

http://stackoverflow.com/comment/41964718
type: Comment
comment on: http://stackoverflow.com/a/26683075
has text: That's because I was debugging it and checking to see if it actually worked. I originally had it with just one line, but I have added on since to try to see what's going on.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/122765787
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26770742
has text: Could you point to any example? I have loaded the package but have no clue how to use it, unfortunately. In Maple I have to Paste the MathML and it will be rendered automatically.

http://stackoverflow.com/comment/42240825
has text: Here's an example in fiddle: http://jsfiddle.net/dtobzooj/ And I meant events of other components not chart events, but you can also use chart events properly to use this.
comment on: http://stackoverflow.com/a/26829026
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41994831
type: QuestionComment
score: 1
has text: change the line : var selected=$('.item_id option:selected').val(); to var selected=$(this).val();
comment on: http://stackoverflow.com/q/26699990
type: Comment

http://stackoverflow.com/comment/42045996
comment on: http://stackoverflow.com/q/26728661
score: 0
has text: Actually no, is that a websocket event?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42061153
has text: @algoni i want to change these four images with a loop when i mouse over them. I will use changing images as a video preview.
type: QuestionComment
comment on: http://stackoverflow.com/q/26736793
score: 0
type: Comment

http://stackoverflow.com/comment/41971747
score: 0
type: AnswerComment
has text: i used bootstrap accordian in my page.so when i click one video file, suddenly quicktimeplayer opens play the video. Then i click another video file suddenly (already open)quicktimeplayer closed and now another qucktimeplayer opens and play the second video file.......
type: Comment
comment on: http://stackoverflow.com/a/26675267

http://stackoverflow.com/q/26802817
favorite count: 0
type: Question
score: 1
has title: clockwise and then anticlockwise rotation in javascript
has comment: http://stackoverflow.com/comment/42182368
has answer: http://stackoverflow.com/a/26816114
answer count: 2
has body: I want to rotate a canvas element to first do animation of rotation in clockwise direction by 180 degree then do a reverse(anticlockwise) rotation of 180 degree.I have used this code but its not working as i want. function Rotate(arg) { rotateInterval = setInterval(function () { arg.save(); //saves the state of canvas arg.clearRect(0, 0, arg.canvas.width, arg.canvas.height); //clear the canvas arg.translate(arg.canvas.width / 2, arg.canvas.height / 2); //let's translate if (flag2 == false) arg.rotate(-(ang += 5) * Math.PI / 180); //increment the angle and rotate the image //arg.style.rotate(5); else { ang = 0; arg.rotate((ang += 5) * Math.PI / 180); } if (ang == 180) { if (flag2 == true) flag3 = true; else flag2 = true; } if (flag3 == true &amp;&amp; ang == 180) { clearInterval(rotateInterval) flag2 = false; } // ctxOne.drawImage(bowl, -ctxOne.canvas.width / 2, -ctxOne.canvas.height / 2, ctxOne.canvas.width, ctxOne.canvas.height); //draw the image ;) arg.drawImage(bowl, -90, -90, 180, 180); arg.restore(); //restore the state of canvas }, 100); }
upvote count: 1
possible better answer: http://stackoverflow.com/a/26803871
has answer: http://stackoverflow.com/a/26803871
has comment: http://stackoverflow.com/comment/42198785
tagged with: canvas
accepted answer: http://stackoverflow.com/a/26816114
type: AnsweredQuestion
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/26711940
score: -1
has comment: http://stackoverflow.com/comment/42022043
upvote count: 0
answers question: http://stackoverflow.com/q/26711697
has comment: http://stackoverflow.com/comment/42015098
type: Answer
downvote count: 1
has body: Try to change type of dataType(last argument) to JSON $(function () { $('.pagination a').click(function () { $.get(this.href, null, null, "json"); return false; }); }); From here: http://api.jquery.com/jQuery.get/ dataType Type: String The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html). EDIT: This can be error with your RAILS server. You need to explicitly tell rails route to render json. Otherwise it renders html templates. So, if you cange your backend code to this: def index @accounts = Account.paginate(:page =&gt; params[:page], :per_page =&gt; 10) render json: @acounts end the result would be JSON EDIT2: So, if you are trying to get script, you can try http://api.jquery.com/jQuery.getScript/ $.getScript(url, successCallback);

http://stackoverflow.com/comment/42139615
comment on: http://stackoverflow.com/a/26781098
type: Comment
has text: means again we need to iterate within the getIndiansCount method for that....how can we avoid that, also how can we print the `Can Vote `count
score: 0
type: AnswerComment

cors
type: Tag
tag name: cors
tags question: http://stackoverflow.com/q/26764407
tags question: http://stackoverflow.com/q/26695017
tags question: http://stackoverflow.com/q/26781535
tags question: http://stackoverflow.com/q/26798635
tags question: http://stackoverflow.com/q/26682581
tags question: http://stackoverflow.com/q/26683986

http://stackoverflow.com/q/26677445
favorite count: 0
has answer: http://stackoverflow.com/a/26677798
has title: JQuery code I wrote stopped working, is there anywrong I've overlooked?
has comment: http://stackoverflow.com/comment/41953851
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41953888
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26677798
has comment: http://stackoverflow.com/comment/41953855
linked to: http://stackoverflow.com/q/5101948
has comment: http://stackoverflow.com/comment/41953978
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/41953868
answer count: 1
has comment: http://stackoverflow.com/comment/41954855
has body: For the below code I want the content of the submit button with the .btn-primary attribute to change to "Success!" only if the input fields are all not null. At preset the code goes straight to success when the button is press whether or not the fields have content. I thought it might be because the fields may somehow already have a value that is not null so I ran this code: alert($('#Comment').attr("value")); and it returned undefined in the alert message. Undefined is the same as null in js/jquery isn't it? I got this code to work earlier and it was typed almost the same way with just a few changes. I undid the changes but it still does not work. Any help will be appreciated. (If anyone knows this) Are there instances in which the same code could not work at a different time, all things being equal? $(document).ready(function () { var Fname = $('#FirstName').attr("value"); var Lname = $('#LastName').attr("value"); var Email = $('#Email').attr("value"); var Comment = $('#Comment').attr("value"); $(".btn-primary").click(function () //This block should say, if all fields are not null changed the content of button to "Success!" and change the content of to "THANKS, I'VE GOT YOUR MESSAGE." { if (Fname != null && Lname != null && Email != null && Comment != null) { $("button").html("Success!"); $("h1").html("THANKS, I'VE GOT YOUR MESSAGE"); } }) }); And this is the html on the same page Submit

http://stackoverflow.com/comment/42090384
type: Comment
type: QuestionComment
has text: implementation of each() is inside jqueryframwework.js . and the error is thrown from jqeuryframework.js.
comment on: http://stackoverflow.com/q/26753287
score: 0

http://stackoverflow.com/q/26692534
tagged with: jquery
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: Bootstrap Modal form appearing just in my local machine
has comment: http://stackoverflow.com/comment/41981352
answer count: 0
has comment: http://stackoverflow.com/comment/41982060
type: Question
has comment: http://stackoverflow.com/comment/41981342
has comment: http://stackoverflow.com/comment/41981559
tagged with: javascript
score: 0
has body: My modal form won't appear in my web-site. When i launch it in my localhost, appear and no problem, but in my website, i have 2 problem 1- don't appear 2- all the page under the place of this modal form is inaccessible. My page has this source code : &lt;button class="btn btn-primary" data-toggle="modal" data-target="#myModal"&gt; {{ prime.primeponctUtil ? 'Modifier affectation' : 'Affecter la prime à un TA'}} &lt;/button&gt; &lt;!-- Modal --&gt; &lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel"&gt;Choisissez un TA&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;table class="table table-striped table-hover"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Login&lt;/th&gt; &lt;th&gt;Nom&lt;/th&gt; &lt;th&gt;Prenom&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; {% for util in utilisateurs %} &lt;tr&gt; &lt;td&gt;&lt;a href="{{ path('prime_affectation', {'myprime':prime.id , 'myutil':util.id }) }}" &gt;{{ util.utilLogin }}&lt;/a&gt;&lt;/td&gt; &lt;td&gt;{{ util.utilNom }}&lt;/td&gt; &lt;td&gt;{{ util.utilPrenom }}&lt;/td&gt; &lt;/tr&gt; {% endfor %} &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;

http://stackoverflow.com/comment/42224981
has text: so do you mean to say that a javascript file is loaded and thats all , and the script can run thereafter and that will not be accounted in the jquery ready ?
type: Comment
comment on: http://stackoverflow.com/a/26828802
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42004114
comment on: http://stackoverflow.com/a/26700134
score: 0
type: AnswerComment
has text: What objects do you mean? in javascript strict comparison is `===`, so to check if `a` and `b` are the same, you can use `a === b` expression. Regarding scoping - usage of global scope is generally discouraged, global scope is always the last in scope chain so it's slow, it is also accessible from everywhere so you are polluting every scope by working in global. Generally libraries use global scope to expose entry point, like say jQuery might use `$` as a global variable so you can access it anywhere in your code.
type: Comment

http://stackoverflow.com/q/26730083
favorite count: 0
has comment: http://stackoverflow.com/comment/42048861
tagged with: php
has answer: http://stackoverflow.com/a/26730916
type: AnsweredQuestion
has body: I am able to pass the variable to the bootstrap 3 modal at the bottom of the modal where it says id="callId" but how do I pass the callID to the modal where I have $test = callId . &lt;a data-id="&lt;?=$sid?&gt;" data-conf="&lt;?=$call_conf?&gt;" class="open-AddCallDialog btn btn-success btn-xs" href="#addCallDialog"&gt;Call Borrower&lt;/a&gt; The jquery script $(document).on("click", ".open-AddCallDialog", function (e) { e.preventDefault(); var _self = $(this); var myCallId = _self.data('id'); $("#callId").val(myCallId); $(_self.attr('href')).modal('show'); }); The Modal &lt;div class="modal fade" id="addCallDialog"&gt; tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel"&gt;Call Borrower&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;div class="row well"&gt; $test = call_conf; &lt;/div&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;input name="id" id="callId" type="hidden" value=""/&gt; &lt;input name="pid" type="hidden" value="&lt;?php echo $pid;?&gt;"/&gt; &lt;input name="processtp" type="hidden" value="callborrower"/&gt; &lt;button id="submit" class="btn btn-primary btn-block btn-xs center"&gt;Update&lt;/button&gt; &lt;/div&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt;&lt;!-- /.modal-content --&gt; &lt;/div&gt;&lt;!-- /.modal-dialog --&gt;
tagged with: twitter-bootstrap
upvote count: 1
type: Question
score: 1
accepted answer: http://stackoverflow.com/a/26730916
has title: Passing a variable into a Bootstrap modal
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/42028045
comment on: http://stackoverflow.com/q/26718679
score: 0
type: Comment
type: QuestionComment
has text: Thanks, that clarifies things

http://stackoverflow.com/q/26776203
type: UnansweredQuestion
tagged with: windows-phone-8.1
has body: I'm making an application for Windows Phone 8.1 using WinJS. My application plays videos using the Microsoft Media Player framework. Right now, when a phone call is answered, the video playback still continues and does not pause. I'm looking for some event which I catch in my application and pause the video playback when a phone call is answered.
has title: How to pause video playback when phone call is answered?
has comment: http://stackoverflow.com/comment/42160666
type: Question
has answer: http://stackoverflow.com/a/26805303
tagged with: winjs
tagged with: javascript
tagged with: windows-runtime
score: 0
answer count: 1

http://stackoverflow.com/comment/42164006
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26793985
has text: i added the code thats currently in my body section at the end of my original post. are you saying i need to add to it?

http://stackoverflow.com/q/26766075
has answer: http://stackoverflow.com/a/26766706
type: UnansweredQuestion
upvote count: 1
tagged with: node.js
score: 1
has title: Jade when passing object/array from router get error
type: Question
tagged with: pug
has body: I'm exploring Jade as a view engine in Node and spent 3 hours not being able to pass an object (the response from the database) to Jade view without getting error. From my router all is an array with objects: var router = express.Router(); router.get('/all', function(req, res){ db.findAll().then(function(all){ res.render("index", { creators: all }); }); }); Jade view: doctype html html head title my jade template body .comment_list each el in creators p= el.creator As you see it's pretty simple. I've seen more than 20 examples of using Jade and do the same and always get this error: &gt; TypeError: index.jade:7 5| body 6| .comment_list &gt; 7| each el in creators 8| p= el.creator Cannot read property 'length' of undefined Until I finally tried to do a check if(typeof(creators) != "undefined") before each el in creators and guess what... magic happened. The error disappeared. I'm writing this post for reference to all people struggling with the same issuse and also I'd like to ask what is the reason for this error and why nowhere in the documentation of Jade is mentioned one should make such a check for undefined before iterating through a collection?
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: express
favorite count: 0

http://stackoverflow.com/a/26715926
has comment: http://stackoverflow.com/comment/42022894
has comment: http://stackoverflow.com/comment/42179460
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26715791
has comment: http://stackoverflow.com/comment/42179595
answers question: http://stackoverflow.com/q/26715791
type: Answer
downvote count: 0
score: 1
has body: You should delegate event, e.g: $('#abc').on('click', '.add_item_via_ajax_form', function(event){ //... }); See @my question's comment regarding FORM submit instead
has comment: http://stackoverflow.com/comment/42179570
has comment: http://stackoverflow.com/comment/42179541
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42047255

http://stackoverflow.com/comment/42227519
has text: That would work, but I wanted to bind a single event to the document, rather than one for each control. Thanks.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26723085

http://stackoverflow.com/a/26708793
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26708243
has body: I have no idea what algorithm you are attempting to implement, you haven't provided it. But if you are looking up card values, then an object is one solution: // cards is an array of cardNames to get the value of function getValues(cards) { var values = { cardName0: value, cardName1: value, cardName2: value, ... } var result = 0; // String? Number? for (var i=0, iLen=cards.length; i&lt;iLen; i++) { result += values[cards[i]]; } return result; } Maybe the value of the result maps to some sage advice, use another object. Maybe even randomly select one of say 5 similar pieces of advice.

http://stackoverflow.com/q/26824751
upvote count: 1
has body: I have created a function to center my using jQuery, it works on page load but doesn't on page resize. What am I doing wrong? JS: HTML: Header - Subtext CSS: * { padding: 0; margin: 0; } html { background: darkgrey; } body { color: #fff; text-align: center; /*padding-top: 300px;*/ } h1 { font-family: 'Arimo', sans-serif; text-transform: uppercase; font-weight: bold; font-size: 40px; } span.hyphen { color: #0CFFFC; font-size: 3em; } h2 { font-family: 'Montserrat', sans-serif; font-weight: 100; } UPDATE After getting the function to fire up on page load, it has some inconsistent behaviour between page load and window resize http://jsfiddle.net/7zqkd4w8/
downvote count: 1
has title: Why doesnt my function run on .resize()?
type: Question
tagged with: javascript
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/42221288
possible better answer: http://stackoverflow.com/a/26826548
has answer: http://stackoverflow.com/a/26824760
accepted answer: http://stackoverflow.com/a/26824760
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26824823
has answer: http://stackoverflow.com/a/26826548
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/comment/42012192
has text: Thanks, that was a typo. Fixed now.
type: Comment
comment on: http://stackoverflow.com/a/26710272
score: 0
type: AnswerComment

hoisting
tag name: hoisting
tags question: http://stackoverflow.com/q/26729693
tags question: http://stackoverflow.com/q/26753166
tags question: http://stackoverflow.com/q/26748568
type: Tag

http://stackoverflow.com/comment/42145509
score: 1
comment on: http://stackoverflow.com/q/26784194
type: QuestionComment
has text: Those are just regular properties.
type: Comment

http://stackoverflow.com/comment/42067630
comment on: http://stackoverflow.com/q/26740697
score: 0
type: Comment
type: QuestionComment
has text: Backslashes in the URL?

http://stackoverflow.com/comment/42236323
has text: Can you add an error callback to the `.build()` call? `function (err) { if(err) console.log(err) }` or something like that
score: 1
comment on: http://stackoverflow.com/q/26796459
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26827354
tagged with: javascript
has comment: http://stackoverflow.com/comment/42222980
has title: JavaScript checking an array of objects is coming up false when it should be true
favorite count: 0
has comment: http://stackoverflow.com/comment/42236692
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26827610
tagged with: object
has answer: http://stackoverflow.com/a/26827412
tagged with: if-statement
tagged with: forms
type: Question
answer count: 2
score: 2
has body: Working on a pseudo login form and ran into a problem with the if-else statement. I created a function to check an array of objects when submitted and see if they match the text inside the input. The last else statement is supposed to print only if the email input is not found. I discovered taking out the last else statement fixed the issue, but made it impossible to print 'user not found' if there were no matches. Pretty sure it's a simple fix but I cannot seem to find what is wrong. How do I get this to run properly without deleting that last else statement? (Included the HTML for reference.) var logForm = document.querySelector("#logForm"); var output = document.querySelector("#output"); var users = [{ email: "email1@address.com", password: "123" }, { email: "email2@address.com", password: "123again" }, { email: "email3@address.com", password: "123again2" }]; var submitHandler = function(e) { e.preventDefault(); output.innerText = ''; var inputEmail = logForm.email.value; var inputPassword = logForm.password.value; console.log(inputEmail); console.log(inputPassword); for (var i = 0; i < users.length; i++) { if (inputEmail === users[i].email) { if (inputPassword === users[i].password) { output.innerHTML = "Successfully logged in as " + users[i].email; } else { output.innerHTML = "Invaild password."; } } else { output.innerHTML = "User not found."; } } }; logForm.addEventListener('submit', submitHandler); Login Form Log In
tagged with: arrays
downvote count: 0

http://stackoverflow.com/comment/41992084
comment on: http://stackoverflow.com/a/26698938
score: 0
type: AnswerComment
has text: I don't know how to write analog for getJson
type: Comment

http://stackoverflow.com/q/26806841
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42186766
upvote count: 1
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/42187188
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
has body: This is the javascript code i did: var buttonPause = 'Pause Slide'; (function (d, w) { // user defines var swapHours = 0, swapMinutes = 0, swapSeconds = 5, swapTotal = (swapHours * 60 + swapMinutes) * 60 + swapSeconds, loopSlideShow = true, isPaused = true; // some handy helper functions function classExists(e, className) { return RegExp('(\\s|^)' + className + '(\\s|$)').test(e.className); } function classAdd(e, className) { if (classExists(e, className)) return false; e.className += (e.className ? ' ' : '') + className; return true; } function classRemove(e, className) { if (!classExists(e, className)) return false; e.className = e.className.replace( new RegExp('(\\s|^)' + className + '(\\s|$)'), ' ' ).replace(/^\s+|\s+$/g, ''); return true; } function nodeFirst(e) { e = e.firstChild; while (e &amp;&amp; e.nodeType != 1) e = e.nextSibling; return e; } function nodeLast(e) { e = e.lastChild; while (e &amp;&amp; e.nodeType != 1) e = e.previousSibling; return e; } function nodeNext(e) { while (e = e.nextSibling) if (e.nodeType == 1) return e; return null; } function nodePrev(e) { while (e = e.previousSibling) if (e.nodeType == 1) return e; return null; } function nodeFlush(e) { while (e.firstChild) e.removeChild(e.firstChild); } function nodeReplace(e, newNode) { nodeFlush(e); e.appendChild( typeof newNode == 'object' ? newNode : d.createTextNode(newNode) ); } function make(tagName, child, attribs, parent) { var e = d.createElement(tagName); if (child) e.appendChild( typeof child == 'object' ? child : d.createTextNode(child) ); if (attribs) for (var i in attribs) e[i] = attribs[i]; if (parent) parent.appendChild(e); return e; } function prevent(e, deselect) { e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); if (e.preventDefault) e.preventDefault(); e.returnValue = false; if (deselect) { if (w.getSelection) w.getSelection().removeAllRanges(); if (d.selection) d.selection.empty(); } } function controlEvent(e, handler) { handler(); e = e || window.even…
has comment: http://stackoverflow.com/comment/42186687
tagged with: http://stackoverflow.com/tag/html
has title: How can i define a global variable to make switch button?

http://stackoverflow.com/q/26739036
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
has title: Toggle issue using input value as id
upvote count: 2
possible better answer: http://stackoverflow.com/a/26739364
score: 2
type: AnsweredQuestion
tagged with: toggle
type: Question
has body: I'm trying to use jQuery's .toggle() to show and hide one of three divs. The divs have unique ids and the decision which div is got toggled is based on which of the three radio buttons has been selected. The three radio buttons have values that correspond to the ids of the divs. So if someone clicks the -1 radio, the div with the id cMB_0292_A07.m1 should be toggled. However I'm not getting any response at all and there's no report of any errors in debugger that I've tried. What is wrong? -1 0 +1 minus1 zero plus1
has answer: http://stackoverflow.com/a/26739364
tagged with: javascript
has answer: http://stackoverflow.com/a/26739208
accepted answer: http://stackoverflow.com/a/26739208

http://stackoverflow.com/q/26816415
has body: How do I get the touched element class name when using Iphones/Ipads? $(document).bind("touchstart", function (e) { var test1 = e.targetTouches[0].attr('class'); var test2 = e.targetTouches[0].hasClass('menu-item') var test3 = $(e).attr('class'); if (test1 != 'class-name') DoSomething(); if (test2 != true) DoSomething(); if (test3 != true) DoSomething(); }); Noone of these three tests works. This works on PC: $(document).click(function (event) { var test = $(event.target).attr('class'); if (test != 'class-name') $('.collapse').collapse('hide'); }); Update: This closes the navbar when clicked on the screen. if ($(".navbar-collapse").hasClass("in")) $('.collapse').collapse('hide'); If I update the code to: var test = e.targetTouches[0].target.className; if ($(".navbar-collapse").hasClass("in")) $('.collapse').collapse('hide'); It no longer works. Is var test = e.targetTouches[0].target.className; really a valid expression?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26816528
score: -1
downvote count: 1
type: Question
upvote count: 0
has comment: http://stackoverflow.com/comment/42204199
answer count: 1
tagged with: javascript
tagged with: jquery
has title: jQuery Get touched element class name
favorite count: 0
has comment: http://stackoverflow.com/comment/42204289
has comment: http://stackoverflow.com/comment/42203668
tagged with: touch
has comment: http://stackoverflow.com/comment/42203618
accepted answer: http://stackoverflow.com/a/26816528
has comment: http://stackoverflow.com/comment/42203641
has comment: http://stackoverflow.com/comment/42203493
has comment: http://stackoverflow.com/comment/42203473
has comment: http://stackoverflow.com/comment/42203623

http://stackoverflow.com/comment/42024825
type: AnswerComment
score: 0
type: Comment
has text: and I can't modify structure.
comment on: http://stackoverflow.com/a/26717111

http://stackoverflow.com/a/26796984
accepted answer of: http://stackoverflow.com/q/26796722
score: 6
type: Answer
upvote count: 6
has body: &lt;button class='url_qry_add' onclick='url_qry_add(event);'&gt; var url_qry_add = function (e) { console.log(typeof e.preventDefault); // function }; Update: I'll try clarify how it works "internally", when we add attributes to function url_qry_add "inside" it looks like this: document.querySelector('.url_qry_add').addEventListener('click', function (event) { (function (event) { url_qry_add(event, this, $(this)); }).call(event.target, event); }); var url_qry_add = function (event, element, $jElement) { console.log(event); console.log(element); console.log($jElement); }; Hence, we have variable "event" (event object, where we have method preventDefault and so on), and "this" (current element). I hope that this explanation will help you understand where we get variable "event".
answers question: http://stackoverflow.com/q/26796722
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41968662
has text: Can't answer your overall question, but here are a few services for the IP check: http://ipinfodb.com/ip_location_api.php http://www.geobytes.com/IpLocator.htm http://freegeoip.net/ http://www.hostip.info/use.html
score: 2
comment on: http://stackoverflow.com/q/26685241
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26804618
tagged with: textbox
favorite count: 0
has comment: http://stackoverflow.com/comment/42182542
type: AnsweredQuestion
downvote count: 2
has body: $(document).ready( function() { // hides the story and error text when the page loads $('.errorText').hide(); $("#story").hide(); // global variables for the blanks and the textarea forms var input = $("form").children(); var storyBlank = $('#story').children(); // Main Event on Click $('button.submit').on( "click", function (event) { // if the form is not validated, highlights errors and prevents the submit from going through if(!validate()) { event.preventDefault(); } // if the form is validated, fills the blanks in the story and displays it else { fillInTheBlanks(); } }); // Checks to see if there are any empty fields and highlights them if they are empty function validate() { console.log('validate() initiated') var success = false; errcnt = 0; cnt = 0; while (cnt &lt; 9) { if (input.eq(cnt).val().length == 0) { errcnt++; input.eq(cnt).removeClass("hide"); console.log('errorcount', errcnt, 'at input', cnt); } else if (input.eq(cnt).val().length !== 0 &amp;&amp; !(input.eq(cnt)).hasClass("hide")) { input.eq(cnt).addClass("hide"); } cnt++; } if (errcnt == 0) { success = true; } return success; } // Fills in the blanks of the story function fillInTheBlanks() { console.log('fillInTheBlanks() executed'); var blankCount = 0; while (blankCount &lt; 9) { storyBlank.eq(blankCount).empty().append(input.eq(blankCount).val()); blankCount++; } $("#story").show(); } }); I am trying to make a mad libs style page with 9 textboxes for input. I am running into two problems. First, when I click submit with all textboxes empty, only the the first four show an error (this is done in css, I have two classes on all the textboxes "error hide", I remove the class hide in my loop to show the error). The second problem I'm having is if I click submit with text in all the textboxes, my validate functions errorcount goes up to 4 errors at every other textbox. I've even tried '$('input').eq(0).val().length == 0' for every textbox in the index and it's returning false every time. I don't under…
has title: jquery validation loop producing false positives
type: Question
score: -2
accepted answer: http://stackoverflow.com/a/26804757
tagged with: validation
upvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/26804757
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/42002437
type: AnswerComment
comment on: http://stackoverflow.com/a/26704485
score: 0
has text: at least someone gives me some information. I will update my answer. Thanks.
type: Comment

http://stackoverflow.com/a/26741184
has comment: http://stackoverflow.com/comment/42068917
accepted answer of: http://stackoverflow.com/q/26740839
type: Answer
score: 2
downvote count: 0
has body: You have a misplaced parenthesis in your function, it should be like this: for (var i = 0; i &lt; nodes.length; i++){ var f = d3.select("svg #n" + (i+1).toString()).attr("r", function (n){ return 30 * graph.nodeSizeFactor; }); // moved it from here to before the .attr } But without understanding the rest of your code, this doesn't seem like the typical "D3 way" to do things. Is there a common class that you can apply to these nodes and then select them with something like? d3.selectAll('.mycircles').attr('r', function(d) { return 30 * graph.nodeSizeFactor; });
upvote count: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26740839

http://stackoverflow.com/comment/42342013
type: Comment
comment on: http://stackoverflow.com/a/26864993
has text: I don't know why but your solution seems to work :) Many thanks!
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42052885
type: QuestionComment
has text: Use the alt attribute of the tag
score: 0
comment on: http://stackoverflow.com/q/26732929
type: Comment

http://stackoverflow.com/q/26804155
has comment: http://stackoverflow.com/comment/42181609
has title: Getting attributes from Event Listener target using the NameNodeMap
has answer: http://stackoverflow.com/a/26805981
tagged with: javascript
has comment: http://stackoverflow.com/comment/42181796
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
has body: I have an image gallery that in wrapped in a div. Rather than assign onclick events to a finite list of images I assign the onclick to the wrapper div. Image information is provided by an ajax call and I loop through the response data creating HTML which I inject into the wrapper DIV. Now each image contains attributes that I use to pass to a light box/modal window later. Everything was fine but with adding more attributes to each image I have noticed the attributes are ordered differently when inspecting the images using IE or Firefox developer tools. The order is preserved in Chrome and older versions of IE an attribute of complete="complete" is created. This of course breaks my JavaScript code. Thus I can no longer reply on the positioning due to the parser of the browser. I output my HTML as so: &lt;img src="abcSmall.jpg" alt="Some Flowers" data-username="Mr Sausage" data-bigPhotoUrl="abcBig.jpg" data-UserId="31333205" photoUploadDate="25/05/2014"&gt; but in Firefox and IE this is coming out as &lt;img data-bigPhotoUrl="abcBig.jpg" data-username="Mr Sausage" alt="Some Flowers" data-UserId="31333205" photoUploadDate="25/05/2014" src="abcSmall.jpg"&gt; So my means of getting the attribute values below is now useless in IE and Firefox if(event.target.nodeName === 'IMG') { // this is src - event.target.attributes[0].value // this is alt - event.target.attributes[1].value // this is username - event.target.attributes[2].value // this is bigPhotoUrl - event.target.attributes[3].value // this is userId - event.target.attributes[4].value // this is photoUploadDate - event.target.attributes[5].value // now i create HTML Nodes and Elements to pass as contents of a modal window using the items above } so I have to now loop through the NamedNodeMap of event.target.attributes however I am unsure what is the best way to create a variable that has the name of the html attribute and takes the value of the property. To be honest I can't determine if the NamedNodeMap is an array …
type: Question

http://stackoverflow.com/a/26758395
has comment: http://stackoverflow.com/comment/42098827
accepted answer of: http://stackoverflow.com/q/26757949
has body: Just move the alert call to the end of the function, and it will work finely: function calculateGrade(){ document.getElementById("form1").style.display = "none"; document.getElementById("p1").style.display = "block"; var fname = document.getElementById("LastName").value; var lname = document.getElementById("FirstName").value; var valMidterm = document.getElementById("MidtermScore").value; var valFinal = document.getElementById("FinalScore").value; var lMidterm = document.getElementById("MidtermLetter").value; var lFinal = document.getElementById("FinalLetter").value; var homeworkArray = document.getElementById("HomeworkScores").value.split(','); var classworkArray = document.getElementById("ActivityScores").value.split(','); var grade = "A"; var score = 91; document.getElementById("span1").innerHTML = grade; document.getElementById("span2").innerHTML = score; document.getElementById("fname").innerHTML = fname; document.getElementById("lname").innerHTML = lname; alert(document.getElementById("FirstName").value); return false; } And set your form action to return calculateGrade() as Patrick Evans mentioned in his comment. here's a demo And as
answers question: http://stackoverflow.com/q/26757949
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42098690
type: Answer

http://stackoverflow.com/q/26676003
answer count: 1
has body: I want to highlight xml code inside textarea using CodeMirror but for some reason it fails. What's the reason?
tagged with: javascript
type: UnansweredQuestion
has title: CodeMirror is not hignlighting XML
type: Question
tagged with: codemirror
tagged with: http://stackoverflow.com/tag/xml
score: 0
has answer: http://stackoverflow.com/a/26683908

http://stackoverflow.com/comment/42082242
type: Comment
comment on: http://stackoverflow.com/a/26748710
type: AnswerComment
has text: I can go to my website in 2 ways. one is http://www.test2015.org/Registration/registration.php and http://test2015.abc.org/Registration/registration.php . host is test2015.abc.org ,uri is /Registration
score: 0

http://stackoverflow.com/comment/42167955
type: QuestionComment
type: Comment
has text: My bad. It is working with the latest version of MarkerWithLabel library.
comment on: http://stackoverflow.com/q/26796323
score: 0

http://stackoverflow.com/comment/42149643
has text: The code is not expected to work as is, before setTimeout, inside refresh function, you should put the code that actually refresh the content, that I don´t know how should look, but thought that somehow it came along with the callback function, isn´t it?
score: 0
comment on: http://stackoverflow.com/a/26785524
type: AnswerComment
type: Comment

modal-dialog
tag name: modal-dialog
tags question: http://stackoverflow.com/q/26787198
type: Tag
tags question: http://stackoverflow.com/q/26697851
tags question: http://stackoverflow.com/q/26703763
tags question: http://stackoverflow.com/q/26756500
tags question: http://stackoverflow.com/q/26767892
tags question: http://stackoverflow.com/q/26827490

http://stackoverflow.com/q/26683536
has title: Testing AngularJS inside a rails mountable engine?
tagged with: coffeescript
type: Question
accepted answer: http://stackoverflow.com/a/26758648
has body: I'm developing a gem that is a rails 4.1 mountable engine. It's mostly AngularJS written in CoffeeScript. How can I go about unit testing my angular code? I need the solution to be integrated with rails assets pipeline. I've tried jasmine-rails but it doesn't work within an engine. Not easily at least.
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41968843
answer count: 1
tagged with: rails-engines
has answer: http://stackoverflow.com/a/26758648
tagged with: angularjs
tagged with: ruby-on-rails
type: AnsweredQuestion

http://stackoverflow.com/comment/41953970
comment on: http://stackoverflow.com/q/26677514
score: 0
has text: Encrypt the data with a public/private key-principle.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/28254557
type: Answer
answers question: http://stackoverflow.com/q/26693769
upvote count: 5
has body: It is looking for the gm(GraphicsMagick) binary Install GraphicsMagick via PPA: sudo add-apt-repository ppa:dhor/myway sudo apt-get update sudo apt-get install graphicsmagick This worked for me
score: 5
downvote count: 0

http://stackoverflow.com/comment/42149943
comment on: http://stackoverflow.com/q/26786407
score: 0
has text: @legendofawesomeness i've replaced this with the selector - something is amiss an alert doesn't trigger inside the first toggle function
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42291709
type: Comment
type: QuestionComment
has text: `availHeight` is the portion of the screen that can be used, the 20 pixels deducted there should be height of the status line. Your problem is that "full screen" isn't really full screen - there is still the address bar and it seems to occupy the 19 pixels you are missing.
score: 2
comment on: http://stackoverflow.com/q/26801943

http://stackoverflow.com/comment/42114754
score: 0
comment on: http://stackoverflow.com/q/26760323
type: Comment
type: QuestionComment
has text: wow, this is what I was looking for. If you want to turn the comments into an answer, I can accept it. thank you.

http://stackoverflow.com/a/26781098
has comment: http://stackoverflow.com/comment/42139930
score: 1
has body: Your emp.country is undefined, because emp is a collection of employees. You could do this instead: HTML: Indians : {{getIndiansCount(emp, indiansCount)}} JS: $scope.getIndiansCount = function(employees, count) { angular.forEach(employees, function(employee) { if(employee && employee.country === "Indian") { count++; } }); return count; }; DEMO EDIT In case you don't want to add loops, you can indeed use the ng-repeat to execute an increment function. First you need to initialize an array for indianCounts (and voteCounts) in your scope: app.controller('Controller', function ($scope) { $scope.indiansCount = []; // Like this $scope.voteCount = []; ... Then you need these functions: $scope.initCount = function(i) { $scope.indiansCount[i] = 0; $scope.voteCount[i] = 0; } $scope.incrementCount = function(empl, i) { if(empl.country === "Indian") { $scope.indiansCount[i]++; } if(empl.employee && empl.employee.canVote === true) { $scope.voteCount[i]++; } }; Finally, here is the HTML with all the stuff needed: Can Vote : {{voteCount[i]}} Indians : {{indiansCount[i]}} {{empl.country}} {{empl.employee.name}} {{empl.employee.canVote}} Here is the JSFiddle updated
has comment: http://stackoverflow.com/comment/42139615
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26780840
type: Answer
has comment: http://stackoverflow.com/comment/42142959
accepted answer of: http://stackoverflow.com/q/26780840
has comment: http://stackoverflow.com/comment/42141791
has comment: http://stackoverflow.com/comment/42139794
has comment: http://stackoverflow.com/comment/42142263
upvote count: 1

http://stackoverflow.com/a/26762086
answers question: http://stackoverflow.com/q/26761808
type: Answer
score: 1
upvote count: 1
has body: If you really don't know what's going to be inside the parentheses (for example, if the pp_ prefix may change), you can use: var links = document.getElementsByTagName("img"); for(var i = 0, l = links.length; i &lt; l; i++) { var link = links[i]; link.src = link.src.replace(/\(.+\)/gi, ''); } Or even: link.src = link.src.replace(/\([a-zA-Z\d]+_[a-zA-Z\d]+_[a-zA-Z\d]+\)/gi, '');
downvote count: 0

http://stackoverflow.com/comment/42181147
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26779252
type: Comment
has text: @Serg I think you are right. But DOM element data is beyond the scope of this question.

http://stackoverflow.com/comment/42070423
type: Comment
comment on: http://stackoverflow.com/a/26742045
type: AnswerComment
score: 0
has text: Isn't playerwin and compwin the number of wins for each player? Why are you looking at the img data-value?

http://stackoverflow.com/q/26779622
type: AnsweredQuestion
has body: This is a simple form which takes 2 dates from and to and I am submiiting those to values to server. From to and the following is the controller code @RequestMapping("getPayments") @ResponseBody public void getPayments(HttpServletRequest request,Model uiModel) { String toDate=request.getParameter("toDate"); String fromDate=request.getParameter("fromDate"); System.out.println(fromDate+" "+ toDate); } and this is js code $('#recv').click(function(){ var fromDate=$('#from').val(); var toDate=$('#to').val(); $.ajax({ type: "GET", url: url, data:{"fromDate":fromDate,"toDate":toDate}, dataType:"json", success: function( data ) { console.log('success'); }, error:function() { console.log('failed'); } }); }); when ever I hit the button I can see todate and from date in the server console (This means System.out.println(fromDate+" "+ toDate); is executed) but in the browser console failed is printed(this means console.log('failed'); is executed) I do not have any error in browser console but the success function of ajax is never executed. What could be the reason behind it? jsfiddle
possible better answer: http://stackoverflow.com/a/26779796
type: Question
answer count: 2
tagged with: spring
accepted answer: http://stackoverflow.com/a/26780161
tagged with: spring-mvc
score: 0
has title: ajax form submitting but calling error function
tagged with: javascript
has answer: http://stackoverflow.com/a/26779796
has answer: http://stackoverflow.com/a/26780161

http://stackoverflow.com/comment/42159491
type: Comment
type: QuestionComment
has text: How are you using this function. To stop the submit of the form you must `return false`. If this function is used as the onsubmit handler then if there is an error the function returns true, which will mean the form will submit
comment on: http://stackoverflow.com/q/26791953
score: 0

http://stackoverflow.com/q/26826889
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26828122
score: 2
type: AnsweredQuestion
has body: This one's been a real hair-puller. I moved some divs into templates without altering any ko's datacontext, and all of a sudden I had the dreaded "undefined is not a function" in template. Turns out it wasn't something related to a missing observable, but something internal to ko: Looks like continuousNodeArray is not a plain-old array but it's a jQuery object array (I assume in this particular instance only, as I believe it should be a plain-old array). So I'm curious to know if this is a Knockout.js bug or something in my templates triggering this behaviour. I solved this by adding the following: jQuery.fn.shift = [].shift; But I'm sure there must be something else going on. Any clue?
upvote count: 3
tagged with: knockout.js
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42222684
has title: Strage behaviour using Knockout.js 3.2.0, shift is undefined
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26828122
has comment: http://stackoverflow.com/comment/42222143
tagged with: arrays
answer count: 1

http://stackoverflow.com/comment/42198381
type: Comment
comment on: http://stackoverflow.com/a/26813173
has text: Boom! That was it. Thank you hutchbat.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26700917
type: Question
tagged with: javascript
score: -1
has title: how can I make function being executed?
has body: I wrote below script. it works fine with my html editor. But, viwing on the actual website, the function does not run, displaying the innerHTML blank. How can I fix it? Is this problem something I need to see about self-executing function? for (i=0;i&lt;2;i++) { document.getElementById(tdHD3hour[i]).innerHTML = myhd.HDD(x[i].getAttribute("T")); } var myhd = { HDD: function (a) { if (a&gt;=15.5){ hdd = 0; } else { hdd = (15.5-a)/8; } return hdd; } }
upvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: innerhtml
has answer: http://stackoverflow.com/a/26700995
tagged with: self-executing-function
downvote count: 1

http://stackoverflow.com/q/26777390
has comment: http://stackoverflow.com/comment/42136042
accepted answer: http://stackoverflow.com/a/26778121
has comment: http://stackoverflow.com/comment/42133618
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26778121
tagged with: javascript
has title: Javascript creating an onclick event for a dynamic table row
answer count: 1
downvote count: 0
favorite count: 0
has body: I'm having trouble attaching an onclick event to my dynamic table rows. What I have is here: function parseOrderLine(data) { var obj = JSON.parse(data); if (obj.length &gt; 0) { var tbl = document.createElement('table'); var row = tbl.insertRow(0); var cell = row.insertCell(0); cell.innerHTML = "Code"; cell = row.insertCell(1); cell.innerHTML = "Size"; cell = row.insertCell(2); cell.innerHTML = "Description"; cell = row.insertCell(3); cell.innerHTML = "Type"; cell = row.insertCell(4); cell.innerHTML = "Price"; cell.style.textAlign = "right"; for (var i = 0; i &lt; obj.length; i++) { row = tbl.insertRow(i + 1); row.className = "results_row"; cell = row.insertCell(0); cell.innerHTML = obj[i].Code; cell = row.insertCell(1); cell.innerHTML = obj[i].Size; cell = row.insertCell(2); cell.innerHTML = obj[i].Description; cell = row.insertCell(3); cell.innerHTML = obj[i].Type; cell = row.insertCell(4); cell.innerHTML = parseFloat(obj[i].Price).toFixed(2); cell.style.textAlign = "right"; //row.addEventListener("click", function(){ alert('listen'); }); row.onclick = (function(){ alert('click'); }); } return tbl.outerHTML; } else { ... As you can see I have tried both setting the onclick event and adding a listener. Neither seem to work. I'm hoping someone can tell me I'm just being crazy and have overlooked something obvious. ;0) Any help appreciated guys. Thanks for reading. Jas

http://stackoverflow.com/q/26717537
tagged with: php
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26717807
has answer: http://stackoverflow.com/a/26718049
type: Question
has answer: http://stackoverflow.com/a/26752925
downvote count: 0
tagged with: javascript
has title: How can I avoid an undesired URL address change after a form submission?
favorite count: 0
tagged with: ajax
answer count: 3
score: 3
has body: I am working on a bootsrap3 template, which is Ajax based. My index file has a leftside menu and a conent block middle of the page, every time I click on a subelement of this left menu, an Ajax laod will put the page content in this block(ajax-content).* Any time I call any page, my URL normally looks something like this /index.php#page-one.php, except when the page contains form submission. The Problem happens when I add an action attribute (acion="page-one.php") to my form tag. After the form submission my URL turns to /page-one.php ; consequently I get a white page containing the page-one.php elements whitout any CSS styling and of course no index-file's elements. What is the correct and best way to come a cross this issue? index.php: Menu-element Menu-Subelement-one Menu-Subelement-two And here is my script.js: // // Function for load content from url and put in $('.ajax-content') block // function LoadAjaxContent(url){ $('.preloader').show(); $.ajax({ mimeType: 'text/html; charset=utf-8', // ! Need set mimeType only when run from local file url: url, type: 'GET', success: function(data) { $('#ajax-content').html(data); $('.preloader').hide(); }, error: function (jqXHR, textStatus, errorThrown) { alert(errorThrown); }, dataType: "html", async: false }); } ////////////////////////////////////////////////////// document.ready ////////////////////////////////////////////////////// $(document).ready(function () { var ajax_url = location.hash.replace(/^#/, ''); if (ajax_url.length < 1) { ajax_url = 'home.php'; } LoadAjaxContent(ajax_url); $('.main-menu').on('click', 'a', function (e) { var parents = $(this).parents('li'); var li = $(this).closest('li.dropdown'); var another_items = $('.main-menu li').not(parents); another_items.find('a').removeClass('active'); another_items.find('a').removeClass('active-parent'); if ($(this).hasClass('dropdown-toggle') || $(this).closest('li').find('ul').length == 0) { $(this).addClass('active-parent'); var current = $(this).next(); …
accepted answer: http://stackoverflow.com/a/26752925
upvote count: 3
has answer: http://stackoverflow.com/a/26717807

http://stackoverflow.com/q/26731903
has answer: http://stackoverflow.com/a/26734674
type: AnsweredQuestion
score: 3
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/35620384
favorite count: 0
accepted answer: http://stackoverflow.com/a/26734674
has answer: http://stackoverflow.com/a/35620384
type: Question
has title: How do you disable the drag function on an ionic side menu?
answer count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/42051304
tagged with: hybrid
tagged with: hybrid-mobile-app
tagged with: ionic-framework
has body: How do you disable the drag function on an ionic side menu? I am pretty new to this and need help. When I swipe right on the main page... it opens up a menu and I don't want this to happen. Here is my current code: <ion-side-menu side="left" drag-content="false"> Cards <ion-content scroll="true"> </ion-side-menus> Javascript: $scope.$root.canDrag = false;
upvote count: 5
tagged with: javascript

http://stackoverflow.com/comment/74599308
type: AnswerComment
has text: this event is triggered after click and not when the transition is finished. should be used 'shown.bs.collapse' event to fire after animation is finished.
type: Comment
score: 4
comment on: http://stackoverflow.com/a/26751078

http://stackoverflow.com/a/26675509
answers question: http://stackoverflow.com/q/26675410
score: 0
type: Answer
has body: You can use jQuery Listen the change event of a select $("#myselect1").change(function () { }); In the change event , you can do something like this $('#myselect2').append($('&lt;option&gt;', { value: 1, text: 'My option' })); In this way you know when the first select is used, and when you select an option, you can, depending on your criteria, change the second select

http://stackoverflow.com/comment/42001566
type: Comment
has text: you are welcome! Sometimes it is really difficult to see small mistakes in your own code as it seems too familiar)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26704178

http://stackoverflow.com/q/26754569
has comment: http://stackoverflow.com/comment/42093516
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42092039
tagged with: php
has comment: http://stackoverflow.com/comment/42091901
has answer: http://stackoverflow.com/a/26755896
has title: javascript month calculator not working
type: Question
has comment: http://stackoverflow.com/comment/42092242
tagged with: javascript
has body: I have the following code. It is an automatic month generator. If i click submit, the value is getting stored as NOVEMBER in the database. But I want it to be saved as 11.Help me. <?php if(isset($_POST['Submit'])) { $id=$_POST['id']; $month=$_POST['month']; $total=$_POST['total']; $points=$_POST['points']; $lotsize=$_POST['lotsize']; $amount=$_POST['amount']; $sql = 'INSERT INTO total(id,month,total,points,lotsize,amount) VALUES("'.$id.'","'.$month.'","'.$total.'","'.$points.'","'.$lotsize.'","'.$amount.'")'; $msg=" Successfull! "; if (!mysql_query($sql, $con)) { die('Error: ' . mysql_error()); } echo " "; } ?> <?php echo date('F') ?> January <?php if($month == "january"){echo "checked";} ?> February <?php if($month == "february"){echo "checked";} ?> March <?php if($month == "march"){echo "checked";} ?> April <?php if($month == "april"){echo "checked";} ?> May <?php if($month == "may"){echo "checked";} ?> June <?php if($month == "june"){echo "checked";} ?> July <?php if($month == "july"){echo "checked";} ?> August <?php if($month == "august"){echo "checked";} ?> September <?php if($month == "september"){echo "checked";} ?> October <?php if($month == "october"){echo "checked";} ?> November <?php if($month == "November"){echo "checked";} ?> December <?php if($month == "december"){echo "checked";} ?>
has comment: http://stackoverflow.com/comment/42092202
score: 0
has comment: http://stackoverflow.com/comment/42092706
has comment: http://stackoverflow.com/comment/42092068
answer count: 1

http://stackoverflow.com/q/26695481
tagged with: cross-domain
score: 2
downvote count: 0
favorite count: 0
type: Question
upvote count: 2
has body: I have two nodejs apps, server 1 running UI code, Server 2 provides back end logic and api services. I'm trying to call $.post jquery method from UI app in server 1 which posts to api in server 2, I'm getting cross domain restriction error, I added the following code in app.js and routes/index.js in UI Server (server 1), but no vain. app.js file enter code here app.use( function(req, res, next) { res.header('Access-Control-Allow-Origin', '*'); res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS'); res.header('Access-Control-Allow-Headers', 'X-Requested-With, X-HTTP-Method-Override, Content-Type, Accept'); next(); }); routes/index.js file router.use( function(req, res, next) { res.header('Access-Control-Allow-Origin', '*'); res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS'); res.header('Access-Control-Allow-Headers', 'X-Requested-With, X-HTTP-Method-Override, Content-Type, Accept'); next(); }); I'm new to nodejs/express.
has answer: http://stackoverflow.com/a/26696900
tagged with: node.js
answer count: 1
has comment: http://stackoverflow.com/comment/41986864
has title: Node Express CORS request
tagged with: javascript
type: UnansweredQuestion
tagged with: express

http://stackoverflow.com/q/26747536
linked to: http://stackoverflow.com/q/15763655
favorite count: 0
accepted answer: http://stackoverflow.com/a/26751859
linked to: http://stackoverflow.com/q/14590055
score: 9
type: Question
tagged with: scala
has comment: http://stackoverflow.com/comment/42085480
upvote count: 10
downvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/26751859
tagged with: javascript
has body: I'd like to have a Play template that is a JS file (as opposed to having &lt;script&gt; tags inside an HTML template). The reason for this is so that the script can be cached. However, I need to create a differences in the script depending on where it's included and hoped to do this with Play's template system. I can already do so if I use embedded scripts, but those can't be cached. I found an existing question that also asks the same thing, but the answer is totally different (different goals).
has title: Play Framework template that is actually a JS file
tagged with: playframework
has comment: http://stackoverflow.com/comment/42147497
type: AnsweredQuestion

http://stackoverflow.com/q/26777133
type: UnansweredQuestion
tagged with: php
tagged with: checkbox
has title: checkbox doesn't check for the first row
tagged with: twig
has comment: http://stackoverflow.com/comment/42132438
type: Question
has comment: http://stackoverflow.com/comment/42132492
tagged with: javascript
score: 0
has body: Hello I have 11 rows with 3 checkboxes and 1 checkbox for each row that checks all or unchecks all rows checkboxes. I also have a general checkbox that checks/uncheck all checkboxes of all rows. I have a problem with the first row checkbox, which doesnt check, it checks for the first time all 3 checkboxes but doesnt get checked and after that doesnt change nothing. All other checkboxes work fine. Another thing that happen is that if the general checkbox is checked then the first checkbox of the first row works when check/uncheck but when checkboxes of other rows are checke/unchecked changes are reflected evven for this first checkbox it is checked/unchecked: id="selectall"&gt; {% for group, privs in privileges %} &lt;div class="well well-sm priv-panel"&gt;&lt;span class="has-success"&gt;{{ group }}&lt;/span&gt; {% for p in privs %} &lt;span class="priv {% if p.ACTIVE %}priv-active{% else %}priv-inactive{% endif %}"&gt; &lt;input type="checkbox" class="checkbox1 checkbox1_{{ group }}" name="privs[{{ p.PRIVILEGE_ID }}]" id="{{ p.PRIVILEGE_NAME }}" {% if p.ACTIVE %}checked{% endif %}/&gt; &lt;label for="{{ p.PRIVILEGE_NAME }}"&gt;{{ p.PRIVILEGE_FRIENDLY_NAME }}&lt;/label&gt;&lt;/span&gt; {% endfor %} &lt;input style="float:right;" type="checkbox" class="priv_group_toggle_cb" value="{{ group }}"&gt; &lt;/div&gt; {% endfor %} $("#selectall, .priv_group_toggle_cb").on('change', function () { var $this = $(this); var checked = $this.is(':checked'); var cb = null; if ($this.hasClass('priv_group_toggle_cb')) { cb = $("[name*=privs]", $this.parent()); } else { cb = $("[name*=privs], .priv_group_toggle_cb"); } cb.each(function (idx, val) { if (val.checked !== checked) { val.checked = checked; $(val).trigger('change'); } }); }); $(".table-cb-toggle tr").on('click', function () { $(this).find("input[type=checkbox]").click(); }); $(".priv-panel input[type=checkbox]").on('change', function () { var parent = $(this).parent().toggleClass('priv-active priv-inactive'); var div = paren…
answer count: 0

http://stackoverflow.com/q/26690969
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26691425
tagged with: django
type: AnsweredQuestion
tagged with: django-views
has body: I want to use Django inlineformset_factory with custom formset and want to add or remove that inlineformset using django-dynamic-formset. Form: class CreatePacketForm(forms.ModelForm): """ CreatePacketForm class """ class Meta: model = Packet exclude = ('customer', 'created_on', 'updated_on', 'created_by', 'updated_by', 'remark', 'p_id' ) ItemFormSet = inlineformset_factory(Packet, Item, form=CreatePacketForm, formset=CreateItemForm, extra=1, max_num=20, can_delete=False) View: class CreatePacketView(LoginRequiredMixin, CreateView): """ """ model = Packet form_class = CreatePacketForm template_name = CREATE_PACKET_TEMPLATE def get(self, request, *args, **kwargs): """ Handles GET requests and instantiates blank versions of the form and its inline formsets. """ self.object = None form_class = self.get_form_class() form = self.get_form(form_class) item_form = ItemFormSet() return self.render_to_response(self.get_context_data(form=form, item_form=item_form,)) Template: {% load static %} Popup Please Enter Item Details {% csrf_token %} {{ form.non_field_errors }} {{ form }} {{ item_form.management_form }} {{ item_form.non_form_errors }} {% for subform in item_form %} {{ subform }} {% endfor %} Submit Reset My inlineformset is working fine without custom formset. But when i render it in my template it does not have management_form as well as all the fields in my formset can be removed. Rendered template without custom formset And template with custom formset
tagged with: django-forms
type: Question
has title: How to use Django inlineformset_factory with custom formset
answer count: 1
has answer: http://stackoverflow.com/a/26691425

http://stackoverflow.com/comment/42001266
type: Comment
has text: My friend solved the problem using such method - . And yes, codepen was fine, which was strange to me.
comment on: http://stackoverflow.com/a/26703632
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42060789
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26731194
has text: More info: if I try to open popup2 from popup1 without setTimeout(), it will not open in all browsers.

http://stackoverflow.com/comment/41986112
type: Comment
has text: Thanks, this is pretty much what I wanted; Cheerio looks awesome. It sounds like your old project and my current one are similar. Anything to add on giving feedback to a user who is running a node script via the gui? (Message box or something like this?)
comment on: http://stackoverflow.com/a/26692600
score: 0
type: AnswerComment

http://stackoverflow.com/a/26800431
answers question: http://stackoverflow.com/q/26799232
score: 0
has body: Find out what version of php you are using. As of php 5.5.x the original MySQL extension is now deprecated, and will generate E_DEPRECATED errors. http://php.net/manual/en/migration55.deprecated.php you might need to use mysqli.
type: Answer

http://stackoverflow.com/q/26754096
tagged with: class
score: 0
answer count: 2
has body: When I have a menu toggled to on, I would like to change the class of the entire body of the website to add padding for the menu.. I am attempting this in wordpress' functions php but it doesn't affect anything when clicked. Any ideas? The whole site works fine otherwise, if i scroll down as in the function above mine, the masthead fixed is added to the body class. my own javascript snippet: if ($(' #primary-navigation' ).hasClass( 'site-navigation .primary-navigation .toggled-on' )) { body.addClass( 'menu-padding' ); } else { body.removeClass( 'menu-padding' ); } body variable in the javascript function( $ ) { var body = $( 'body' ), _window = $( window ); snippet in place of window width function: if ( _window.width() > 781 ) { var mastheadHeight = $( '#masthead' ).height(), toolbarOffset, mastheadOffset; if ( mastheadHeight > 48 ) { body.removeClass( 'masthead-fixed' ); } if ( body.is( '.header-image' ) ) { toolbarOffset = body.is( '.admin-bar' ) ? $( '#wpadminbar' ).height() : 0; mastheadOffset = $( '#masthead' ).offset().top - toolbarOffset; _window.on( 'scroll.twentyfourteen', function() { if ( _window.scrollTop() > mastheadOffset && mastheadHeight < 49 ) { body.addClass( 'masthead-fixed' ); } else { body.removeClass( 'masthead-fixed' ); } } ); } if ($(' #primary-navigation' ).hasClass( 'site-navigation .primary-navigation .toggled-on' )) { body.addClass( 'menu-padding' ); } else { body.removeClass( 'menu-padding' ); } } im adding my javascript in the midst of the masthead fixing in wordpress because this function only works when the screen resolution is higher than 781 pixels. css for the padding to be added for the menu .menu-padding .site-main { margin-top: 48px; } body div: <body <?php body_class(); ?>> navigation menu: Menu function navigation class when clicked: Menu function site-main div: content
tagged with: jquery
has answer: http://stackoverflow.com/a/26797290
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42092549
tagged with: css
has comment: http://stackoverflow.com/comment/42091258
tagged with: wordpress
has title: adding a class when another is activated
type: Question
has answer: http://stackoverflow.com/a/26756459
tagged with: javascript

tabs
type: Tag
tags question: http://stackoverflow.com/q/26824820
tags question: http://stackoverflow.com/q/26740116
tags question: http://stackoverflow.com/q/26831312
tags question: http://stackoverflow.com/q/26712329
tag name: tabs
tags question: http://stackoverflow.com/q/26743551

http://stackoverflow.com/a/26675772
type: AcceptedAnswer
has body: Along with the regionsSelectable property, there is also a regionsSelectableOne property to go with it. Setting regionsSelectable to true lets you select the regions and setting regionsSelectableOne to true only allows one to be selected at a time. jVectorMap Documentation $('#world-map').vectorMap({ backgroundColor: '#0099FF', /* Hover color for each state */ hoverColor: '#FCEF06', hover: { stroke: 'black', "stroke-width": 2, fill:'#FCEF06' }, onRegionClick: function(event, code) { alert(code); }, regionsSelectable: true, regionsSelectableOne: true, //add this line here regionStyle: { fill:'black', selected: { fill: 'red' } } });
type: Answer
accepted answer of: http://stackoverflow.com/q/26673908
downvote count: 0
answers question: http://stackoverflow.com/q/26673908
score: 3
upvote count: 3

http://stackoverflow.com/q/26832310
type: Question
has title: Improve this custom function addClassIfVarDefined() or share better solution
tagged with: function
tagged with: javascript
has body: I'm developing an app in Node.js, and I'm new at it. So I wrote a function that adds active class to topNavigation's li if a user is in corresponding section, if not it doesn't. This function works but it's uncomfortable and wrong. I'm looking for better way to handle it. Please share better solution. var addActive = function(requiredPage, currentPage) { // Current page defined only in certain pages if( requiredPage == currentPage) return 'class="active"'; else return null; }; In cerrtain pages (pages that wrote in topNavbar) I define a variable appSection in others I don't, because I don't want to define a class where it useless. So I make this addActive('gallery', (typeof appSection === "undefined" ? '' : appSection)) Sorry if I made grammar errors. Learning english. Thank you
accepted answer: http://stackoverflow.com/a/26832642
answer count: 1
downvote count: 0
favorite count: 0
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26832642
score: 1
upvote count: 1

http://stackoverflow.com/a/26810289
has body: The way I would validate something like this would be to set a variable to false and loop through all of the options checking to see if they are checked. If you find one that is checked you can set that variable to true and break out of the loop.
type: Answer
answers question: http://stackoverflow.com/q/26810228
score: 0

http://stackoverflow.com/comment/41974767
score: 0
type: AnswerComment
has text: Thank you for your answer. Well, I am not using jQuery. Isn't there a Javascript fix?
type: Comment
comment on: http://stackoverflow.com/a/26688889

http://stackoverflow.com/a/26782579
has body: The string is just an expression - JS doesn't differentiate between function calls and ordinary expressions. In the first case, a semicolon is automatically placed at the end of the first line, breaking it up. That clearly doesn't exist in the second example. In the third, again, you break them up into different expressions. Even console.log() is an expression - it is a function call that returns undefined and has side effects. This effect is intentionally used to force strict mode interpretation. A strict-mode function is written as: function myFunc() { "use strict"; // just the plain string // function body }
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26782531
type: Answer
answers question: http://stackoverflow.com/q/26782531
has comment: http://stackoverflow.com/comment/42142468

http://stackoverflow.com/comment/42070263
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26742234
has text: OP [is not using jQuery](http://stackoverflow.com/questions/26741988/href-not-showing-output-on-click#comment42069960_26742029)
score: 0

http://stackoverflow.com/comment/41965400
has text: Thanks, I tried you suggestion, but no modal show's when i enter domain.com#steg2. Any ideas on what i might do wrong?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26683194

http://stackoverflow.com/comment/42108738
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26763821
type: AnswerComment
has text: @Jose I don't understand this question, could you please elaborate?

http://stackoverflow.com/comment/42133364
type: QuestionComment
comment on: http://stackoverflow.com/q/26777542
score: 0
has text: you want to fill spans with checkboxes?
type: Comment

http://stackoverflow.com/q/26724242
type: Question
has comment: http://stackoverflow.com/comment/42038159
tagged with: javascript
has title: angular.js ... $scope function returns same result on different positions
tagged with: scope
score: 0
has comment: http://stackoverflow.com/comment/42040699
has comment: http://stackoverflow.com/comment/42061854
tagged with: http://stackoverflow.com/tag/html
has body: When i use my $scope function on different positions, it returns the same result. Javascript: $scope.isActive = function(d) { var res = false; if(typeof d.route !== 'undefined') { res = d.route === $location.path(); } else if(typeof d.path !== 'undefined') { var regexp = new RegExp('^' + d.path.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&") + '.*', 'g'); res = $location.path().match(regexp); } return res; }; HTML-Source: Einstellungen Aktuelle Systemkonfiguration Stammdaten Werkzeuge The problem, the function isActive returns TRUE at all! All items under "Einstellungen" get the active class. But, why?
tagged with: angularjs
type: UnansweredQuestion
tagged with: css
answer count: 0
has comment: http://stackoverflow.com/comment/42039657

http://stackoverflow.com/a/26702348
upvote count: 2
has body: Dropzone.js allows you to attach callbacks to various events in the cycle. To provide a status after each file is uploaded to the server, you can register success and error callbacks to provide this functionality. var myDropzone = new Dropzone("div#myId", { url: "/file/post" }); // attach callback to the `success` event myDropzone.on("success", function( file, result ) { // the file parameter is https://developer.mozilla.org/en-US/docs/DOM/File // the result parameter is the result from the server // [success code here] }); // attach callback to the 'error' event myDropzone.on("error", function( file, errorMessage, xhr ) { // if the xhr parameter exists, it means the error was server-side if (xhr) { // [error code here] } });
score: 2
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42013594
answers question: http://stackoverflow.com/q/26701702

http://stackoverflow.com/comment/41969038
has text: @GregBurghardt If you try to use "value: product.@ProductCode" in the code above, jslint will highlight the error. You'll also get an "Uncaught SyntaxError: Unexpected token ILLEGAL" in the browser console for that line.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26685249

http://stackoverflow.com/q/26804851
type: UnansweredQuestion
has title: How to create a new copy of a collection in Meteor depending on a url
has body: I am building a magnetic poetry game you can see here http://test-magnets.meteor.com/ The idea is that the home page is where a bunch of people can collaborate and build some poems together. There is a mongo collection for the magnets that stores their position on the screen. This is working great but I am interested in having an option for people to create their own poems that other people can't access. I have used iron router to generate a url based on the userId. So now i need to build the functionality of creating a private copy of the magnet collection that only that user can use and does not affect the collection used in the colloborate/homepage. I have some faint ideas of how to do this. Maybe dynamically generate a new magnet collection with the userId? Maybe publish and subscribe can handle this? There might be a package already available for this? If anyone has any suggestions how to implement this, it would be greatly appreciated. Thanks!
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26805555
tagged with: mongodb
tagged with: javascript
downvote count: 0
answer count: 1
tagged with: meteor
favorite count: 0

http://stackoverflow.com/q/26823124
possible better answer: http://stackoverflow.com/a/26823151
has comment: http://stackoverflow.com/comment/42215438
has body: I've been wondering quite a while, whether or not to create my site in an iframe structured environment. What I mean by this, is a site with a static menu on the left hand site along with a static menu on the top. Visual description: Does this setup limit capabilities of the site or does it improve it? Will I be able to entail all elements as a site structured page would. All in all I'm asking whether it's smarter to create a 80+ site webpage within an iframe structured environment, with two main menu's or whether it's smarter to just link 80+ different sites with the same setup.
score: 0
tagged with: iframe
has answer: http://stackoverflow.com/a/26823179
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26829164
type: Question
has comment: http://stackoverflow.com/comment/42215427
tagged with: javascript
tagged with: web
accepted answer: http://stackoverflow.com/a/26823179
has title: Iframe structured site
has answer: http://stackoverflow.com/a/26823151
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: structure

http://stackoverflow.com/comment/42114760
type: Comment
has text: use class instead of id.Id cannot be duplicate at a page.if u have multiple id only first one will called
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26766927

http://stackoverflow.com/a/26687922
has body: In the first case the item variable doesn't exist until the function is run, at which point it is local to each function and gets set equal to "item" + i. And i is 3 because it is declared in the outer scope and 3 is what it was when the loop ended. In the second case, the item variable exists in the functions' containing scope - the same scope as i - and it has been set to "item2" during the last iteration of the first loop. Inside that loop i had the values 0, 1, 2 - it only got set to 3 when the loop ended.
has comment: http://stackoverflow.com/comment/41974826
answers question: http://stackoverflow.com/q/26687859
score: 0
type: Answer

http://stackoverflow.com/comment/42217013
has text: The whole ` `.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26817434
type: Comment

http://stackoverflow.com/q/26694385
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/35459696
has body: I'm trying to get a series of elements to fade in on scroll down when they are fully visible in the window. If I keep scrolling down, I do not want them to fade out, but if I scroll up, I do want them to fade out. This is the closest jsfiddle I've found. http://jsfiddle.net/tcloninger/e5qaD/ $(document).ready(function() { /* Every time the window is scrolled ... */ $(window).scroll( function(){ /* Check the location of each desired element */ $('.hideme').each( function(i){ var bottom_of_object = $(this).position().top + $(this).outerHeight(); var bottom_of_window = $(window).scrollTop() + $(window).height(); /* If the object is completely visible in the window, fade it it */ if( bottom_of_window &gt; bottom_of_object ){ $(this).animate({'opacity':'1'},500); } }); }); }); It does exactly what I want on scroll down, but I also want the elements to fade out if I scroll up past them. I tried this with no luck. if( bottom_of_window &gt; bottom_of_object ){ $(this).animate({'opacity':'1'},500); } else { $(this).animate({'opacity':'0'},500); } Thanks so much for taking the time to look at this.
has title: Fade In on Scroll Down, Fade Out on Scroll Up - based on element position in window
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26697397
tagged with: scroll
score: 23
possible better answer: http://stackoverflow.com/a/32652044
upvote count: 23
has answer: http://stackoverflow.com/a/46559998
type: Question
has answer: http://stackoverflow.com/a/32652044
tagged with: javascript
tagged with: fade
accepted answer: http://stackoverflow.com/a/26697397
downvote count: 0

checkbox
tag name: checkbox
tags question: http://stackoverflow.com/q/26750671
tags question: http://stackoverflow.com/q/26767803
tags question: http://stackoverflow.com/q/26765899
tags question: http://stackoverflow.com/q/26771968
tags question: http://stackoverflow.com/q/26716011
tags question: http://stackoverflow.com/q/26759467
tags question: http://stackoverflow.com/q/26710893
tags question: http://stackoverflow.com/q/26787400
tags question: http://stackoverflow.com/q/26730986
tags question: http://stackoverflow.com/q/26804792
tags question: http://stackoverflow.com/q/26754600
tags question: http://stackoverflow.com/q/26727045
tags question: http://stackoverflow.com/q/26755291
tags question: http://stackoverflow.com/q/26831028
tags question: http://stackoverflow.com/q/26749501
tags question: http://stackoverflow.com/q/26707391
tags question: http://stackoverflow.com/q/26783226
tags question: http://stackoverflow.com/q/26777133
tags question: http://stackoverflow.com/q/26691776
tags question: http://stackoverflow.com/q/26793405
type: Tag
tags question: http://stackoverflow.com/q/26708973
tags question: http://stackoverflow.com/q/26750023
tags question: http://stackoverflow.com/q/26781007
tags question: http://stackoverflow.com/q/26831061
tags question: http://stackoverflow.com/q/26810435
tags question: http://stackoverflow.com/q/26702938
tags question: http://stackoverflow.com/q/26714484
tags question: http://stackoverflow.com/q/26756490

http://stackoverflow.com/comment/42079869
has text: Thanks @prabu-raja, but what about the fact that it's not centered properly, the color mismatch etc?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26747256
type: Comment

http://stackoverflow.com/a/26685867
answers question: http://stackoverflow.com/q/26685846
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41969792
has comment: http://stackoverflow.com/comment/41969711
has comment: http://stackoverflow.com/comment/41979721
has body: You needed to escape some of your characters. Try this: var p = document.createElement("p"); p.innerHTML = "Welcome to Akecheta, the web warrior social network. Here you\'ll find blogger templates, a freelancers area, Question \&amp; Answers Forum. You can even create your own blog to interact with other people.&lt;br/&gt;&lt;br/&gt;Download Free Blogger Templates, Free Blogger Templates Download, Templates for blogspot blogs, Free download, Free templates for blogspot blogs, Free templates for blogspot blogs download."; document.body.appendChild(p); EDIT: The entire code should look like this JSFIDDLE.
has comment: http://stackoverflow.com/comment/41969705
has comment: http://stackoverflow.com/comment/41970178
accepted answer of: http://stackoverflow.com/q/26685846
type: AcceptedAnswer

http://stackoverflow.com/a/26772010
downvote count: 0
score: 1
has body: If this is all local content then you should not be loading it via ajax. One option you have at your disposal is to set up your help files as local Javascript templates. You can then refer to them using a template library like mustache or underscore and link to them in your application like so: &lt;script type="text/template" src="local/helpfile.js" /&gt; If you don't want to use a templating library then you can set up helpfile.js as JSON data, but you'll need to escape quote characters first.
answers question: http://stackoverflow.com/q/26768487
upvote count: 1
type: Answer

http://stackoverflow.com/q/26797756
type: Question
has answer: http://stackoverflow.com/a/26797874
accepted answer: http://stackoverflow.com/a/26797874
answer count: 2
score: 18
tagged with: javascript
possible better answer: http://stackoverflow.com/a/32114405
has title: How to find a reason AngularJS "Argument 'MyCtrl' is not a function, got undefined"
favorite count: 0
tagged with: angularjs
has body: When AngularJS crashes with an error "Argument 'MyCtrl' is not a function, got undefined" it's may be little bit challenging to find a reason why. Here I want to make a kind of a "check list", what should you check when got an error
upvote count: 18
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/32114405
downvote count: 0

http://stackoverflow.com/comment/42189151
comment on: http://stackoverflow.com/q/26808143
score: 2
has text: Where do you define `self.tree_data`? It looks to be an array, since you are doing `self.tree_data.push()`. You need to declare it an object (`self.tree_data = {};`), then do `self.tree_data['prop'] = newMenu;`.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42184784
type: Comment
comment on: http://stackoverflow.com/q/26805824
score: 1
has text: If the user navigates and has focus on another element, how can the text also be selected?
type: QuestionComment

http://stackoverflow.com/q/26745828
type: UnansweredQuestion
score: -2
has comment: http://stackoverflow.com/comment/42077073
has answer: http://stackoverflow.com/a/26746600
has comment: http://stackoverflow.com/comment/42077048
has title: How to transform HTML entities in string into HTML?
type: Question
has comment: http://stackoverflow.com/comment/42077082
tagged with: javascript
tagged with: jquery
downvote count: 4
answer count: 3
has body: I am passing to a javascript function this string: Peter Paul Jane and when I print this code out in javascript, the output is this: Peter Paul Jane But I would need to transform it into this: Peter Paul Jane to execute the HTML code. How to do that in javascript/jQuery? Thank you
has answer: http://stackoverflow.com/a/26745936
tagged with: http://stackoverflow.com/tag/html
tagged with: string
favorite count: 0
has answer: http://stackoverflow.com/a/26746085
upvote count: 2

http://stackoverflow.com/comment/42192986
has text: Well I am not sure but this is the way I found on the internet.... But i am quite sure it's empty because it goes and print the echo inside the if the username is empty.
score: 0
comment on: http://stackoverflow.com/q/26769605
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26819875
answers question: http://stackoverflow.com/q/26819769
downvote count: 0
has body: My friend, behold the wonder and curse of prototypical inheritance. What you are iterating over with for..in isn't an array. You are iterating over an Array object. Take a look at the doc: Array indexes are just enumerable properties with integer names and are otherwise identical to general Object properties. There is no guarantee that for...in will return the indexes in any particular order and it will return all enumerable properties, including those with non–integer names and those that are inherited. Because the order of iteration is implementation dependent, iterating over an array may not visit elements in a consistent order. Therefore it is better to use a for loop with a numeric index (or Array.forEach or the for...of loop) when iterating over arrays where the order of access is important. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in So what you are dealing with are enumerable "integer names" of properties in an Array object, not numerical order. EDIT for v in array in JavaScript isn't equivalent to for v in list in python. It's equivalent to for k, v in dict.iteritems() but k is implicitly given to you as a string with integer name so to speak, i.e. "1", "2", "3", etc. I think it's counter-intuitive as well from an OO standpoint. How can a list/array be a dict-like object? But from a prototypical standpoint, so long as anything inherits from Object.prototype, it can be considered an Object with keys and properties.
type: Answer
upvote count: 4
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26819769
score: 4

http://stackoverflow.com/q/26722014
has title: Returning word when looking for longest word instead of number of characters
has comment: http://stackoverflow.com/comment/42033970
downvote count: 0
score: 1
tagged with: string
has answer: http://stackoverflow.com/a/26722092
favorite count: 0
has comment: http://stackoverflow.com/comment/42036191
type: Question
possible better answer: http://stackoverflow.com/a/26722092
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/26722131
tagged with: javascript
has body: So, I am working on a function that looks for the longest word in a string. However I can't find how to console.log the actual word and not the value of the number of characters it has. Here is my function: function longestWord(text) { var textSplit = text.split(" "); for (var i = 0; i &lt; textSplit.length; i++) { var wordLength = textSplit[i].length; }; console.log(Math.max(wordLength)); } longestWord("I dislike taking recent microwaves");
accepted answer: http://stackoverflow.com/a/26722131
tagged with: for-loop
type: AnsweredQuestion

http://stackoverflow.com/comment/98176702
comment on: http://stackoverflow.com/q/26715403
has text: if the answer helped you should accept it, that way you get points also
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42190482
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26808548
has text: tried that and still get this error - `Error: $resource(...).update is not a function`
type: AnswerComment

http://stackoverflow.com/comment/42006398
has text: I should be asking you that. Can you show us the code for function A.
type: AnswerComment
comment on: http://stackoverflow.com/a/26706787
score: 0
type: Comment

http://stackoverflow.com/a/26714504
type: Answer
has body: This only works without strict mode: function test(x, y) { console.log("Original: " + x); // 1 [].shift.apply(arguments); console.log("Modified: " + x); // 2 } function testStrict(x, y) { "use strict" console.log("Original (strict): " + x); // 1 [].shift.apply(arguments); console.log("Modified (strict): " + x); // 1 } test(1,2) testStrict(1,2) http://jsfiddle.net/omahlama/mmn2vf0p/
score: 0
answers question: http://stackoverflow.com/q/26713538

http://stackoverflow.com/comment/42001814
type: Comment
comment on: http://stackoverflow.com/q/26702762
type: QuestionComment
has text: I didn't even know about services, thanks for the advice! Looking into it now.
score: 0

http://stackoverflow.com/comment/42187768
type: Comment
has text: UI might be a little too heavy for the *magically appear* @Reeno, the OP just needs one input to appear.
comment on: http://stackoverflow.com/q/26807257
score: 0
type: QuestionComment

http://stackoverflow.com/a/26731923
has comment: http://stackoverflow.com/comment/42053564
score: 1
answers question: http://stackoverflow.com/q/26731653
has body: There are many ways to solve this. Here's one. &lt;a href="#" class="image-link" data-url="/MonkWhoSold"&gt; &lt;a href="#" class="image-link" data-url="/AnotherImage"&gt; ... Then in JavaScript you can write: // find all &lt;a&gt; tags with class of 'image-link' var links = document.querySelectorAll('a.image-link'); // loop through them all for (var i = 0; i &lt; links.length; i++) { var link = links[i]; // listen for the click event link.addEventListener('click', function() { // on click, show the image using the URL from the data-url attribute disp_img(link.data.url); }); } This doesn't use any jQuery. If you're starting out programming these days, I think it's worth learning the DOM stuff directly. Once upon a time this wasn't easy or didn't work across browsers, and jQuery was really valuable. That's less true nowadays, though it still can be quite convenient. In this code there are only three functions you really need to learn: querySelectorAll to find all elements that match some CSS selector addEventListener to attach a callback function to a particular event element.data to access data stored in data-foo="bar" attributes of the HTML Other than that it's for, function and other simple elements of the language.
downvote count: 0
has comment: http://stackoverflow.com/comment/42053749
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/42052747
has comment: http://stackoverflow.com/comment/42054484

http://stackoverflow.com/comment/42173019
has text: When I use your example in my website, when I click the button I see the popup coming up but with "have patience". What could be wrong? Apparently the function is not executed?
comment on: http://stackoverflow.com/q/26799290
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/26722124
answers question: http://stackoverflow.com/q/26721953
has body: man. Try this function respondHandler() { // get element reference here var element = document.getElementById('output'); if(xmlHttp.readyState == 4){ if(xmlHttp.status == 200){ xmlResponse = xmlHttp.responseXML; xmlDocumentElement = xmlResponse.documentElement; message = xmlDocumentElement.firstChild.data; element.innerHTML = message; }else{ alert('something went really wrong'); } }
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42037619
has comment: http://stackoverflow.com/comment/42034044

http://stackoverflow.com/comment/41986899
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26695994
has text: Thanks, I'm new to MySQL, I thought it was a security issue to leave the connection open after each query
type: AnswerComment

http://stackoverflow.com/q/26731103
has comment: http://stackoverflow.com/comment/42051403
tagged with: datatable
has answer: http://stackoverflow.com/a/26732065
has body: I am trying to have a javascript.datatable (http://www.datatables.net/) show a dataset which I have passed through as a json string. $(document).ready(function () { $('#Reports').html('&lt;table cellpadding="0" cellspacing="0" border="0" class="display" id="ReportsTable"&gt;&lt;/table&gt;'); var data = &lt;%=jsonResult%&gt;; $('#ReportsTable').dataTable({ "data": data, "columns": [ { "title": "id" }, { "title": "name" }, { "title": "regAndId" }, { "title": "type" }, { "title": "timeStamp" } ] }); }); My jsonResult or data variable looks as follows: { "reports": [ { "id": "421b4b9b-63d5-4fe2-a929-a85d9fe9d2ef", "name": "TAMANYA PROPERTIES", "regAndId": "1989/011313/23", "timeStamp": "2014/10/31 01:57:51 PM", "type": "Company" }, { "id": "56751c5d-84b2-463a-95be-9feb2fa02c10", "name": "TESTA PROPERTY COMPANY PTY", "regAndId": "1980/004250/07", "timeStamp": "2014/10/31 10:29:09 AM", "type": "Company" } ] } The error I am getting is: Uncaught TypeError: undefined is not a function
has answer: http://stackoverflow.com/a/26732027
linked to: http://stackoverflow.com/q/23295424
score: 0
tagged with: http://stackoverflow.com/tag/json
answer count: 3
accepted answer: http://stackoverflow.com/a/26732065
has title: Populate javascript.datatables with json?
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26732168
has answer: http://stackoverflow.com/a/26732168
has comment: http://stackoverflow.com/comment/42051231
type: AnsweredQuestion
tagged with: jquery
type: Question

http://stackoverflow.com/a/40543853
answers question: http://stackoverflow.com/q/26720291
type: Answer
has body: You can create and define where ever and whenever you'd like - your offer/experience just may not be available until you do so. I'm not sure what you're trying to achieve but a simple: //Define global mbox mboxDefine('mboxDefaultRandom', 'Shoppable_Global_Clicks'); mboxDefine('mboxAnotherRandomMbox', 'Shoppable_Global_Add-to-Cart-Clicks'); mboxUpdate( 'Shoppable_Global_Add-to-Cart-Clicks', 'clicked=Y'); mboxUpdate( 'Shoppable_Global_Clicks'); Should suffice : )
score: 0

http://stackoverflow.com/q/26832169
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42231905
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42231761
type: Question
has comment: http://stackoverflow.com/comment/42232834
tagged with: jsp
tagged with: javascript
tagged with: jquery
has body: I have a web page which has a 2 part form. Tech used: JSP, HTML, SQL server In first part the user would enter some basic info which would be common for all records he is entering in the current bunch. Then on clicking next he would be redirected to a page where he can go on to add specific information for each record in the batch - with options to 'submit and add another record' (redirecting to same page, and only needing to enter the new record specific fields) or submit all records entered. So I will need to constantly hold the parameters from the initial page and keep forming multiple 'objects' till the user clicks submit, which would call a method in JSP/JAVA class to insert the records. ------Page 1 | Basic Information ------ ------Page 2 | Per Record ------ One way would be to keep forming and appending a query for each record and storing in a hidden field passed through the pages and pass through method on click of submit. Can someone suggest a better method of how to handle such a situation?
tagged with: sql-server
score: 0
has title: Adding multiple records to database from HTML form having some common parameters

touch
tags question: http://stackoverflow.com/q/26761155
tags question: http://stackoverflow.com/q/26816415
tags question: http://stackoverflow.com/q/26743554
tags question: http://stackoverflow.com/q/26798580
type: Tag
tags question: http://stackoverflow.com/q/26764045
tag name: touch

http://stackoverflow.com/a/26789936
has comment: http://stackoverflow.com/comment/42156700
answers question: http://stackoverflow.com/q/26789876
type: Answer
has body: Your comparisons will always return false because the input coming from the user will be a string, which you are comparing to a number. Either parse the input as an int, or compare against strings: if (parseInt(day,10) == 1) or if (day == "1")
score: 0
has comment: http://stackoverflow.com/comment/42157016

http://stackoverflow.com/comment/41947703
has text: ......................:)
comment on: http://stackoverflow.com/q/26672966
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42157252
score: 0
type: Comment
has text: this only returns the first message. Can I concatenate the messages with a \r\n?
type: AnswerComment
comment on: http://stackoverflow.com/a/26790512

http://stackoverflow.com/comment/42195973
comment on: http://stackoverflow.com/a/26794557
score: 0
type: AnswerComment
type: Comment
has text: Thanks. I tried your first solution. Its kinda working but I get some weird results. Please see my updated question with the new screen shot. x2 and y2 are returning "NaN, so the lines are both ending at the origin. Also its adding 2 lines for some reason.

http://stackoverflow.com/comment/42214603
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26822550
type: Comment
has text: Could you show how and when you are trying to get the height?

http://stackoverflow.com/comment/42124883
comment on: http://stackoverflow.com/q/26771676
has text: @iitumstudant - you will need to recreate the problem in a sample that you can share... preferably [jsfiddle.net](http://www.jsfiddle.net). Without that we are unable to help as it cannot be re-created.
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/comment/42163062
score: 0
type: Comment
type: QuestionComment
has text: Presumably you aren't using Bootstrap v3.3.0 (i.e. latest).
comment on: http://stackoverflow.com/q/26790155

http://stackoverflow.com/comment/42037243
type: QuestionComment
comment on: http://stackoverflow.com/q/26712821
has text: See if https://github.com/twbs/bootlint reports anything
score: 0
type: Comment

http://stackoverflow.com/comment/42028774
type: Comment
has text: Paulie_D, what is your suggestion please?
score: 0
comment on: http://stackoverflow.com/q/26719012
type: QuestionComment

webgl
tags question: http://stackoverflow.com/q/26783586
tags question: http://stackoverflow.com/q/26747759
tags question: http://stackoverflow.com/q/26728728
tags question: http://stackoverflow.com/q/26748763
tags question: http://stackoverflow.com/q/26763273
tags question: http://stackoverflow.com/q/26703053
tags question: http://stackoverflow.com/q/26776229
tags question: http://stackoverflow.com/q/26677685
tag name: webgl
type: Tag
tags question: http://stackoverflow.com/q/26729636

http://stackoverflow.com/comment/42101259
has text: Indeed it works but only with IE. With other browser I lost style (everything is in normal).
comment on: http://stackoverflow.com/a/26721324
type: Comment
score: 0
type: AnswerComment

jquery-events
tag name: jquery-events
tags question: http://stackoverflow.com/q/26782333
tags question: http://stackoverflow.com/q/26748448
tags question: http://stackoverflow.com/q/26765070
tags question: http://stackoverflow.com/q/26742336
tags question: http://stackoverflow.com/q/26775955
tags question: http://stackoverflow.com/q/26768053
tags question: http://stackoverflow.com/q/26830475
tags question: http://stackoverflow.com/q/26734531
tags question: http://stackoverflow.com/q/26806794
type: Tag
tags question: http://stackoverflow.com/q/26768612
tags question: http://stackoverflow.com/q/26776691
tags question: http://stackoverflow.com/q/26773912

http://stackoverflow.com/a/26740085
answers question: http://stackoverflow.com/q/26739795
score: 2
has body: You've missed out a variable declaration so your code doesn't compile. xhr: function () { var xhr = new window.XMLHttpRequest(); // &lt;&lt;&lt;&lt;&lt;&lt;&lt; missed this variable //Download progress xhr.addEventListener("progress", function (evt) { if (evt.lengthComputable) { var percentComplete = evt.loaded / evt.total; //Do something with download progress console.log(percentComplete); } }, false); return xhr; }, Note that if evt.lengthComputable is false then you cannot measure the progress of the request.
has comment: http://stackoverflow.com/comment/42982856
upvote count: 2
has comment: http://stackoverflow.com/comment/42089771
has comment: http://stackoverflow.com/comment/42089093
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26739795
type: Answer

http://stackoverflow.com/q/26674948
has comment: http://stackoverflow.com/comment/41949388
has comment: http://stackoverflow.com/comment/41949211
has comment: http://stackoverflow.com/comment/41949266
has answer: http://stackoverflow.com/a/26675122
has comment: http://stackoverflow.com/comment/41949354
answer count: 4
downvote count: 4
has body: I have two textareas. I am copying data from one to another but if I change data in the first textarea then data in the second textarea is also changed which is obvious. My requirement is like this: Suppose I have written "country" and it has been pasted to the second textarea. Now if I replace "country" with "anyother" then in the second textarea "country" should not be replaced. If I write something in the first textarea which is new(not replacement) then only that data will be pasted. Is it possible to do? My code till now: function showRelated(e) { //$('src2').html($('src1').html()); $('#src2').val( $('#src1').val() ); } &lt;textarea name="source" id="src1" cols="150" rows="20" onkeyup="showRelated(event)"&gt;&lt;/textarea&gt; &lt;textarea name="source2" id="src2" cols="150" rows="20"&gt;&lt;/textarea&gt; the second text area is hidden from user.whatever the user writes will be copied to second textarea and will be transliterate.The requirement is like this if the user replace some data then also it should not effect the data which he already entered.that is why i need to maintain a copy without using database.
has title: Copy from textarea to anther textarea but the value of the second textarea should not change
upvote count: 0
has answer: http://stackoverflow.com/a/26675213
has comment: http://stackoverflow.com/comment/41949322
has comment: http://stackoverflow.com/comment/41949169
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has answer: http://stackoverflow.com/a/26675409
score: -4
has comment: http://stackoverflow.com/comment/41949700
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41949513
has answer: http://stackoverflow.com/a/26675578
has comment: http://stackoverflow.com/comment/41949273
favorite count: 0
type: Question

http://stackoverflow.com/q/26757367
has body: The ECMAScript language specification specifies that the multiplication operator is commutative (A*B==B*A). However this doesn't hold if A or B includes an assignment operator. For example if I type the following into a browser's console: var x = 1; (x + 2) * ((x = 4) + 1); gives 15, however: var x = 1; ((x = 4) + 1) * (x + 2) gives 30. Or does commutative mean it is commutative once all the variables have been resolved to their values? However the spec talks about the "* operator", not the mathematical multiplication operation.
has comment: http://stackoverflow.com/comment/42108002
type: Question
score: 4
has title: Multiplication isn't commutative?
downvote count: 1
answer count: 1
tagged with: commutativity
has comment: http://stackoverflow.com/comment/42096687
has comment: http://stackoverflow.com/comment/42097316
has answer: http://stackoverflow.com/a/26757534
upvote count: 5
has comment: http://stackoverflow.com/comment/42096800
tagged with: javascript
type: UnansweredQuestion
favorite count: 0

http://stackoverflow.com/q/26761136
tagged with: http://stackoverflow.com/tag/html
tagged with: view
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26761374
tagged with: angular-ui-router
has title: angularjs view not getting updated
type: AnsweredQuestion
has body: Here is a small self-contained html todo application using routes... It has two views - list.html and add.html list.html: &lt;div&gt; &lt;a href="#/add" class="btn btn-default btn-sm" ng-click="setNewTask()"&gt;Add Task&lt;/a&gt; &lt;br /&gt; &lt;br /&gt; &lt;div class="container" id="tasks"&gt; &lt;ul&gt; &lt;li ng-repeat="task in tasks"&gt; &lt;button ng-show="!task.done" ng-click="markTaskAsDone(task)" class="btn btn-default btn-xs"&gt;&lt;span class="glyphicon glyphicon-ok-circle"&gt;&lt;/span&gt;&lt;/button&gt; &lt;button ng-show="task.done" ng-click="markTaskAsNotDone(task)" class="btn btn-default btn-xs"&gt;&lt;span class="glyphicon glyphicon-pushpin"&gt;&lt;/span&gt;&lt;/button&gt; &lt;button ng-click="removeTask(task)" class="btn btn-default btn-xs"&gt;&lt;span class="glyphicon glyphicon-remove-circle"&gt;&lt;/span&gt;&lt;/button&gt; &amp;nbsp; &lt;s ng-show="task.done"&gt;{{task.desc}}&lt;/s&gt; &lt;span ng-show="!task.done"&gt;{{task.desc}}&lt;/span&gt; &lt;/li&gt; &lt;/ul&gt; &lt;p ng-show="tasks.length == 0"&gt;Add few tasks&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; add.html: &lt;div&gt; &lt;a href="#/" class="btn btn-default btn-xs"&gt;&lt;span class="glyphicon glyphicon-arrow-left"&gt;&lt;/span&gt;&amp;nbsp;Back&lt;/a&gt; &lt;h2&gt;Add a task&lt;/h2&gt; &lt;div class="form-inline"&gt; &lt;input type="text" data-ng-model="newTask.desc" placeholder="Enter Task..." class="form-control" /&gt; &lt;a href="#/list" class="btn btn-default" data-ng-click="addNewTask()"&gt;Add&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; I only have one controller. controllers = { ToDoController: function ($scope, $timeout, $location) { //two items in by default... $scope.tasks = [ { desc: 'Buy milk', done: false }, { desc: 'Collect newspaper', done: false } ]; $scope.newTask = { desc: '', done: false }; $scope.addNewTask = function () { $location.path('/'); console.log('a'); $scope.tasks.push($scope.newTask); } $scope.markTaskAsDone = function (task) { task.done = true; console.log($scope.ta…
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26761374
tagged with: angularjs
type: Question

dropbox-api
tags question: http://stackoverflow.com/q/26784898
tag name: dropbox-api
type: Tag

http://stackoverflow.com/a/26755416
has comment: http://stackoverflow.com/comment/42093728
has body: You can avoid using plugin by implementing a simple state-machine approach. Demo. You will need Array of functions to be invoked on click states Variable to store current state currentState And a handler to invoke state functions on click run Code: var states = [function () { // click button 1st toggle $(".log").html("click Toggle1, show tab panel, isToggle = true"); $("#toggle_content").animate({width:'toggle'},350); $(".container").addClass("overlay-disable"); currentState = 1; //change state $(".container").click(function() { $(".container").unbind("click").removeClass("overlay-disable"); $(".log").html("panel hide success, isToggle = false"); $("#toggle_content").hide(); currentState = 0; //change state }); }, function() { $(".container").unbind("click").removeClass("overlay-disable"); $(".log").html("click Toggle2, hide tab panel"); $("#toggle_content").animate({width:'toggle'},350); currentState = 0; //change state }], currentState = 0, run = function() { return states[currentState].apply(this, arguments); }; $("#toggle").click(run);
has comment: http://stackoverflow.com/comment/42093643
accepted answer of: http://stackoverflow.com/q/26753407
has comment: http://stackoverflow.com/comment/42093956
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26753407

http://stackoverflow.com/q/26787217
has answer: http://stackoverflow.com/a/26790701
score: 0
tagged with: meteor
linked to: http://stackoverflow.com/q/26843042
has body: I want to detect which template includes another, because I want to have a css class only for one specific template. Here is how it should work: &lt;template name="includedTempl"&gt; &lt;div class="panel panel-default {{#if templateX}}specialCSS{{/if}}" id="{{_id}}"&gt; &lt;/template&gt; Template.includedTempl.helpers({ templateX: function() { if (this.includedBy('templX.html')) { return true; } return false; } }); How can I do this? Any help would be greatly appreciated.
has title: Detect which template includes the current one in Meteor
accepted answer: http://stackoverflow.com/a/26790701
type: AnsweredQuestion
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26788254
has comment: http://stackoverflow.com/comment/42154171
has answer: http://stackoverflow.com/a/26788254
tagged with: javascript

http://stackoverflow.com/q/26827577
has comment: http://stackoverflow.com/comment/42223050
downvote count: 5
has comment: http://stackoverflow.com/comment/42223036
accepted answer: http://stackoverflow.com/a/26828495
has comment: http://stackoverflow.com/comment/42223186
linked to: http://stackoverflow.com/q/1359018
type: AnsweredQuestion
score: -4
has comment: http://stackoverflow.com/comment/42223217
has comment: http://stackoverflow.com/comment/42224348
has title: Why jquery event doesn't handle?
has answer: http://stackoverflow.com/a/26828495
has comment: http://stackoverflow.com/comment/42223178
has comment: http://stackoverflow.com/comment/42223062
type: Question
has comment: http://stackoverflow.com/comment/42223460
has comment: http://stackoverflow.com/comment/42223252
has comment: http://stackoverflow.com/comment/42223417
linked to: http://stackoverflow.com/q/203198
has comment: http://stackoverflow.com/comment/42222974
tagged with: javascript
has comment: http://stackoverflow.com/comment/42223230
has body: I have wrote following code example: html: &lt;input type="checkbox" name="terminal" class="all" data-terminal-id="9800" &gt; javascript: function checkRightBarVisibility(){ if(this.checked){ alert('checked'); } } $('input[name=terminal]').change(checkRightBarVisibility); http://jsfiddle.net/o9ovnkxv/6/ This code works as expected. But in my real code I have same javascipt code but I don't see alert. I have not ideas how can it possible. debug information: bigger picture(https://i.sstatic.net/ADXB5.jpg) Please help me to find the mistake. P.S. full code is very huge thus I didn't post it. update: I tried following in debug: I wrote following row: $('input[name=terminal]').change(checkRightBarVisibility); After it I have seen alert 1 time. But only one time.
has comment: http://stackoverflow.com/comment/42223027
upvote count: 1
has comment: http://stackoverflow.com/comment/42222969
answer count: 1
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/26777066
score: 1
type: Question
has comment: http://stackoverflow.com/comment/42132564
has comment: http://stackoverflow.com/comment/42136185
tagged with: javascript
linked to: http://stackoverflow.com/q/6588510
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has title: animate height when content is changed css3
tagged with: css
has body: Is There a way to animate the height of div when it's content was changed (by script and \ or css)? div { width:100px; } #b { display:none; } .wrapper.switch #a { display:none; } .wrapper.switch #b { display:block; } Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text swich
has answer: http://stackoverflow.com/a/26787399

http://stackoverflow.com/q/26698576
tagged with: css
score: 2
upvote count: 3
tagged with: tic-tac-toe
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26700134
has title: JavaScript Tic tac toe, how do I check for the position of the image?
tagged with: javascript
has body: I was able to create a simple html5 tic tac toe game. I'm just having trouble on how to go about checking if three X or O's are on the same line to end the game. I though maybe I should compare the image source so I saved it to a multidimensional array. Doesn't seem to be 100% so if anyone can help I had appreciate it!. I have the following code: http://jsfiddle.net/AnthonyFigi/v3vfcLws/5/ ` &lt;!DOCTYPE HTML&gt; &lt;html&gt; &lt;head&gt; &lt;style type=&quot;text/css&quot;&gt; /* Selects all the id's starting with 'div'*/ .holder #drag1, .holder #drag2{ background-color:rgba(204, 204, 204, 0.7); transition:opacity 0.3s ease-in 0s; } .holder #drag2{ opacity:0.0; } .holder{ clear:both; padding:3em; } [id^=&quot;div&quot;] { width: 80px; height: 80px; padding: 10px; border: 1px solid #aaaaaa; float:left; transition:background-color 0.3s linear 0s; } [id^=&quot;row&quot;]{ clear:both; } &lt;/style&gt; &lt;script type=&quot;text/javascript&quot;&gt; function allowDrop(ev) { /* The default handling is to not allow dropping elements. */ /* Here we allow it by preventing the default browser behaviour. */ ev.preventDefault(); } function drag(ev) { /* Here we specify what should be dragged. */ /* This data will be dropped once the mouse button is released.*/ /* Here,we set the data type 'text' also we want to drag the element itself, so we set it's ID.(ev.target.id) */ ev.dataTransfer.setData(&quot;Text&quot;,ev.target.id); } function drop(ev) { /* Here we get the id of the image and store it is data*/ var data=ev.dataTransfer.getData(&quot;Text&quot;); /* Here we 'append' (add after) them image to the target element*/ /* We get the element to image by id stored in var data, then we only COPY it from DOM*/ /* The image is NOT moved in DOM*/ ev.target.appendChild(document.getElementById(data).cloneNode(true)); /* Here we get the image then return it's id as a String.*/ /* We then check to see whether it is 'drag1' OR 'drag2'*/ /* Then change the background colour of the targe…
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
tagged with: drag-and-drop
type: UnansweredQuestion

http://stackoverflow.com/a/26797973
answers question: http://stackoverflow.com/q/26797649
score: 0
type: Answer
has body: The variable arr from your scriptlet is passed to the HTML as a string with the content [{"Id":"9"},{"Id":"11"}], so your input tag will look like this: &lt;input type='hidden' id="agencycontactid" name="agencycontactid" value="[{"Id":"9"},{"Id":"11"}]" /&gt;. So the value attribute will only contain the part of the string up to the first ", i.e. [{. You could try to put the json data in a place where " doesn't interfere with the HTML, like inside a hidden tag like so &lt;div id="jsondata"&gt; &lt;%=arr%&gt; &lt;/div&gt; or put the scriptlet inside a &lt;script&gt; tag: &lt;script type="text/javascript"&gt; var s = &lt;%=arr%&gt;; &lt;/script&gt; Changing the delimiters of the value attribute to ' instead of " would also work but would break as soon as your json data contains strings with ' in them. However if you are sure that will never be the case, that is by far the easiest fix.

http://stackoverflow.com/comment/42101125
type: Comment
has text: Just use the code That I gave to you, erase all the code inside **** and place my code INSIDE this tag: **** . Remove that Hidden class and give all style that you want to that Iframe, you can put 100% width
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26748895

unit-testing
tags question: http://stackoverflow.com/q/26686493
tags question: http://stackoverflow.com/q/26812049
tags question: http://stackoverflow.com/q/26778271
tags question: http://stackoverflow.com/q/26751846
tags question: http://stackoverflow.com/q/26736974
tags question: http://stackoverflow.com/q/26748108
tags question: http://stackoverflow.com/q/26732523
tags question: http://stackoverflow.com/q/26686883
tags question: http://stackoverflow.com/q/26764769
type: Tag
tags question: http://stackoverflow.com/q/26713561
tag name: unit-testing

http://stackoverflow.com/a/41868535
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26767185
has body: Imagine a pin that's anchored in the center of the sphere pointing straight at you, it's now at 0 degrees, and this doesn't render anything. Change the angle of this pin by moving the end pointing at you up. At 90° the pin is pointing straight up and it renders everything between 0° and 90°. Rotate it a bit further and it starts to render the back half of the sphere. For reference, here's one clipped at 107° so that it renders a bit of the backside and appears to "wrap" around the inner globe:
answers question: http://stackoverflow.com/q/26767185
score: 3
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42008339
type: Comment
comment on: http://stackoverflow.com/q/26707886
score: 0
has text: @nbrooks, yes you're correct regarding code looking more concise.
type: QuestionComment

http://stackoverflow.com/q/26802117
tagged with: intersection
answer count: 1
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/26802290
has body: I’ve got two lines and I’d like to calculate their intersection point. See http://jsfiddle.net/magglomag/7sydgkt6/1/ Red line coordinates P1 ( 150, 0 ) P2 ( 125, (stepsY+150)/2 ) Blue line coordinates Q1 ( 150, 150 ) Q2 ( 125, (stepsY)/2 ) — I found out that you have to derive linear functions like f(x) = m*x + n for each line to calculate the intersection. — Step 1 To get the slope m: m = (y2 - y1) / (x2 - x1) Red line slope mP = - ( (stepsY + 150) / 50 ) Blue line slope mQ = - ( ((stepsY/2) - 150) / 25 ) — Step 2 The second step would be to define the y-intersect n: Red line y-intersect nP = ( (stepsY + 150) / 50 ) * 150 Blue line y-intersect nQ = ( ( (stepsY/2) - 150) / 25 ) * 150 ) - 150 — Step 3 Now I can derive the functions: Red line function f(x) = mP * x + nP f(x) = ( - ( (stepsY + 150) / 50 ) * x) + ( (stepsY + 150) / 50 ) * 150 Blue line function f(x) = mQ * x + nQ f(x) = ( - ( ( (stepsY/2) - 150) / 25 ) * x) + ( ( (stepsY/2) - 150) / 25 ) * 150 ) - 150 — Step 4 Now I need your help! The next step would be to equal both function like mP * x + nP = mQ * x + nQ but I don’t get it. It would be great if anyone can help out! — JS var mouseX = 0; var mouseY = 0; var stepsY = 75; var stepsX = 100; var pageY = 0; var pageX = 0; $(window).on({ load: resizeCanvas() }); function resizeCanvas() { document.onmousemove = function(e) { mouseX = e.pageX; mouseY = e.pageY; } } var loop = setInterval(function() { var canvas = document.getElementById('canvas'); if (canvas.getContext) { stepsY += ( ( 125 + parseInt(-mouseY / ($(document).height() / 85 ) )) - stepsY ) / 12; stepsX += ( ( 125 + parseInt(-mouseX / ($(document).width() / 46 ) )) - stepsX ) / 12; var ctx = canvas.getContext('2d'); if ( window.devicePixelRatio &gt;= 2 ) { canvas.width = 600; canvas.height = 300; canvas.style.width = "300px"; canvas.style.height = "150px"; ctx.scale(2,2); } else { canvas.style.width = "300px"; canvas.style.height = "150px"; } ctx.clearRect(0, 0, window.innerWidth, window.innerHeigh…
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26802290
has title: Calculate coordinates of intersection
downvote count: 1
type: Question
tagged with: canvas
upvote count: 0

http://stackoverflow.com/comment/42120005
type: Comment
score: 0
has text: I've managed to hide the dialog in the destroy method of the MarkTicket widget: destroy: function () { MT.myDialog.hide(); } unfortunately after this I cant recreate any of the modules
comment on: http://stackoverflow.com/q/26765362
type: QuestionComment

http://stackoverflow.com/q/26781055
upvote count: 1
downvote count: 1
has title: Dynamic regex pattern in JavaScript
type: Question
has answer: http://stackoverflow.com/a/72921825
has answer: http://stackoverflow.com/a/63860427
tagged with: javascript
score: 0
has body: I have some code that matches a certain number of digits after a decimal. Currently, I have the following: var input = getValueFromUser(); var count = getCount(); var x = Number(input.toString().match(/^\d+(?:\.\d{0,1})?/)); alert(x); This approach always gets the first digit after the decimal. However, I want to replace the 1 in the regex with the value in count. How do I do that? I tried the following: var pattern = '/^\d+(?:\.\d{0,' + count + '})?/'; var x = Number(input.toString().match(pattern)); However, now, I always get 0 for x.
favorite count: 0
has comment: http://stackoverflow.com/comment/42139570
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42140049
tagged with: regex
answer count: 4
has answer: http://stackoverflow.com/a/26781146
has answer: http://stackoverflow.com/a/26781169

http://stackoverflow.com/a/26817172
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26817160
answers question: http://stackoverflow.com/q/26817160
has comment: http://stackoverflow.com/comment/42205737
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42206095
has body: Currently, Since you're not clearing the existing interval every function call is creating new intervals. You should move the interval outside the function: var animateTitle = function(countMessages) { if (isChatTab) { if (animStep) { document.title = "New messages ("+countMessages+") - "+origTitle; } else { document.title = origTitle; } animStep = !animStep; } else { document.title = origTitle; animStep = false; } }; time_title = setInterval(function(){ animateTitle(countMessages) }, 3000);

http://stackoverflow.com/q/26760160
has body: What I'm really looking for is code like the following: var painter = {}; // An object to hold methods var colors = ['blue', 'red', 'green', 'yellow']; // The names of methods to be defined colors.forEach( function(color) { painter.defineMethod(color, function(){ console.log(color); }); }); painter.blue() // writes blue painter.red() // writes red etc. the painter.defineMethod() is the key. I have to define several (upwards of 40) methods to an object and they are all basically the same, with minor but predictable changes that really all call another method. For example: painter.blue = function(tool) { painter.draw('blue', tool); // Would paint blue with a brush or pencil or whatever. } Is something like this possible, or am I stuck defining all these properties explicitly? Is there any performance benefit to one way or the other? What would be easy in a language that has variable variables or magic methods is proving difficult (or impossible) in Javascript. Though I admit that javascript is not my forte. Thanks!
has answer: http://stackoverflow.com/a/26760225
type: AnsweredQuestion
tagged with: object
accepted answer: http://stackoverflow.com/a/26760225
downvote count: 0
score: 1
tagged with: loops
tagged with: methods
type: Question
tagged with: javascript
has title: Javascript: Create object methods/properties by looping over an array
upvote count: 1
answer count: 1
favorite count: 0

http://stackoverflow.com/a/27833053
has body: &lt;script type="text/javascript"&gt; SyntaxHighlighter.all(); $(window).load(function () { $('#spinner').hide(); // Hide after load is completed }); &lt;/script&gt; Syntax Highlighter does not run at .ready but completes when .load() is completed. So by hiding your element (here id="spinner") when load is completed using jquery. Took me a while to figure this out as well.
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26722683
upvote count: 1

http://stackoverflow.com/q/26783571
has title: Why does Object.observe() not provide the data path of change to a callback?
upvote count: 1
tagged with: observers
type: Question
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26784218
tagged with: ecmascript-harmony
answer count: 1
has body: The changes array of an Object.observe() callback contains objects with the following four properties: name object type oldValue https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe#Parameters Why isn't there a path provided natively? Example: var ob = { foo: [ {moo: "bar", val: 5}, {val: 8} ] } ob.foo[0].val = 1; // callback should provide path "foo.0.val" or "foo[0].val" There's a Node.js module that extends Object.observe() to also include the path: observed.js, but I worry the performance gain of a native observe() will be lost (if no, could you please explain how it is implemented then?). It might be possible to browserify the module, but can't imagine it will perform well in a synchronous environment and I still wonder why nobody seems to have thought about an additional path property.
favorite count: 0
accepted answer: http://stackoverflow.com/a/26784218
type: AnsweredQuestion
score: 1
tagged with: object.observe

http://stackoverflow.com/comment/42175263
type: QuestionComment
has text: Have a look at http://stackoverflow.com/questions/18831970/jquery-smooth-scroll-to-div-using-id-value-from-link
comment on: http://stackoverflow.com/q/26800859
score: 0
type: Comment

http://stackoverflow.com/q/26696408
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26696780
has comment: http://stackoverflow.com/comment/41987657
has title: External Javascript file not working, Help Needed
accepted answer: http://stackoverflow.com/a/26696780
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26696546
has body: So I have an external javascript file. it is linked to my html code, however none of my code is taking effect, and i don't seem to be able to locate the problem. Here is the external javascript file function inputFocus(element) { element.background="#FFFF00"; } function showTick(containerId, imgId) { document.getElementById(imgId).src="./images/tick/tick5.png"; document.getElementById(containerId).style.visibility="visible"; } function showX(containerId, imgId) { document.getElementById(imgId).src="./images/x/x1.png"; document.getElementById(containerId).style.visibility="visible"; } function highlightValid(element, containerId, imgId) { element.borderColor="#007A00"; element.borderWidth="2px"; showTick(containerId, imgId); } function highlightInvalid(element, containerId, imgId) { element.borderColor="red"; element.background="#FF4D4D"; showX(containerId, imgId); } function validateName(element, containerId, imgId) { document.getElementById(containerId).style.visibility="hidden"; if(element.value==null || element.value=="") { highlightInvalid(element, containerId, imgId); } else { highlightValid(element, containerId, imgId); } } function validateEmail(element, containerId, imgId) { document.getElementById(containerId).style.visibility="hidden"; var atpos=element.value.indexOf("@"); var dotpos=element.value.lastIndexOf("."); if(atpos&lt;1||dotpos&lt;=atpos+2||dotpos+2&gt;=element.value.length) { highlightInvalid(element, containerId, imgId); } else { highlightValid(element, containerId, imgId); } } function getCurrentDate() { var date=new Date(); var day=date.getDate(); var month=date.getMonth()+1; var year=date.getYear(); if (day&lt;10) { day="0"+day; } if(month&lt;10) { month="0"+month; } date = year+"-"+month+"-"+day; return date; } function validateDate(element, containerId, imgId) { document.getElementById(containerId).style.visibility="hidden"; if(element.value&lt;getCurrentDate() || element.value==null || element.value=="") { highlightInvalid(element, contain…
has comment: http://stackoverflow.com/comment/41987536
has comment: http://stackoverflow.com/comment/41987532
has comment: http://stackoverflow.com/comment/41987951
type: Question
has comment: http://stackoverflow.com/comment/41987877
tagged with: debugging
answer count: 2
tagged with: validation
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41987843
has comment: http://stackoverflow.com/comment/41988074
has comment: http://stackoverflow.com/comment/41988033
score: 0
has answer: http://stackoverflow.com/a/26696546

http://stackoverflow.com/comment/42183080
type: QuestionComment
comment on: http://stackoverflow.com/q/26804928
score: 0
has text: jQuery has some plugins that do pagination nicely. Which is probably what you need. Though depending on how many records it may not be the best experience to unload them all on the client, but rather go with a server side processing approach for the pagination
type: Comment

http://stackoverflow.com/comment/42120589
comment on: http://stackoverflow.com/q/26769952
has text: How do you send mails using JavaScript?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26706049
has comment: http://stackoverflow.com/comment/42004953
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42004856
has title: how did 2 javascript dev's habits coexisted together?
answer count: 0
score: 0
type: Question
has body: I heard that once JavaScript developers used to put the link to the script at the top of the page. if that was the case how did they grabbed elements from the document?
tagged with: javascript

http://stackoverflow.com/comment/42101085
has text: What do you mean by "preserve" ?
comment on: http://stackoverflow.com/q/26759915
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42084541
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26750226
has text: could you make jsfiddle.net?
type: Comment

http://stackoverflow.com/comment/42241972
comment on: http://stackoverflow.com/a/26837770
score: 0
type: AnswerComment
has text: Hi, I have not used any HTML5 tags. Only Div's. Also this issue is only on that specific version 8.0 7600. Its working perfect on 8.0 7601. Even the bootstrap site has the same problem. http://getbootstrap.com/ I guess its a browser bug. What do you think?
type: Comment

http://stackoverflow.com/a/26678335
has comment: http://stackoverflow.com/comment/41955835
answers question: http://stackoverflow.com/q/26678018
has comment: http://stackoverflow.com/comment/41956313
has comment: http://stackoverflow.com/comment/41955725
has comment: http://stackoverflow.com/comment/41955977
type: Answer
has body: Try: function recordToFilename(e){ $(this).attr("Id") //or: e.Id }
score: 0
has comment: http://stackoverflow.com/comment/41958420
has comment: http://stackoverflow.com/comment/41956005

http://stackoverflow.com/comment/42197539
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26812720
has text: If you want to check if it contains those characters anywhere. You could use the Regex pattern `/[/\+=@#^]/`
score: 0

http://stackoverflow.com/comment/42203751
type: Comment
has text: I attached a link in my answer about Q2, I'm sure it will solve your issue.
comment on: http://stackoverflow.com/a/26812613
score: 0
type: AnswerComment

http://stackoverflow.com/q/26799060
has title: How to get a value in textbox after change in dropdown
has answer: http://stackoverflow.com/a/26799274
tagged with: http://stackoverflow.com/tag/html
tagged with: textbox
answer count: 4
has answer: http://stackoverflow.com/a/26799310
has body: I have a dropdown and a textbox in html as shown below: Please Select DAILY WEEKLY MONTHLY No Of Installments : I need to get a value in the textbox to be entered by user if option selected is Daily or Weekly and the value to be 0 if option selected is Monthly. Need a javascript as I am new.
has answer: http://stackoverflow.com/a/26799289
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26799165
score: 0
tagged with: selectionchanged
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41960725
type: Comment
comment on: http://stackoverflow.com/q/26680670
score: 0
has text: @Dan gettings closer thank you. I now get the error callback that says "[object object]"
type: QuestionComment

http://stackoverflow.com/q/26727414
has title: Get pixel ARGB color by Photoshop Javascript
tagged with: photoshop-script
has answer: http://stackoverflow.com/a/26763104
upvote count: 1
has answer: http://stackoverflow.com/a/26765448
type: Question
linked to: http://stackoverflow.com/q/48188991
downvote count: 0
tagged with: javascript
answer count: 3
has body: I want to write some PS Javascript code to get a pixel's ARGB color value. A function which would look like: function getPixelARGB(doc, x, y); I searched for a while and found a method by Mike Hale in this site: a link The answer proposed by Mike Hale works fine, the only problem is that it can't get the alpha value(opacity) of the selected pixel, which is what I want to know. Anybody have any idea on how to get the ARGB value of a selected pixel by PS script? Thanks in advance.
has comment: http://stackoverflow.com/comment/124011396
score: 1
tagged with: photoshop
favorite count: 0
has comment: http://stackoverflow.com/comment/42068953
has answer: http://stackoverflow.com/a/26758410
type: UnansweredQuestion

http://stackoverflow.com/comment/50683916
type: Comment
type: QuestionComment
has text: I just noticed you showed some of your PHP server code. So you are using a backend. Thanks.
score: 0
comment on: http://stackoverflow.com/q/26673424

http://stackoverflow.com/a/26733627
type: Answer
has body: Please Initialze it before using $("#dialog").dialog({ autoOpen: false }) Please have a look at this link jQuery UI - Error: cannot call methods on dialog prior to initialization; attempted to call method 'open'
score: 0
answers question: http://stackoverflow.com/q/26733303

http://stackoverflow.com/a/26747561
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26747437
has body: I bet you could get this to work using the bind function of Underscore or Lo-Dash (a drop-in Underscore replacement): GoogleDrive.prototype.loadAPI = function() { window.gapi.load('picker', {'callback': _.bind(this.onPickerApiLoad, this)}); };
downvote count: 0
has comment: http://stackoverflow.com/comment/42080654
type: Answer
has comment: http://stackoverflow.com/comment/42080037

http://stackoverflow.com/q/26681518
score: -2
has comment: http://stackoverflow.com/comment/41961841
has comment: http://stackoverflow.com/comment/41962232
tagged with: arrays
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26681632
favorite count: 0
has comment: http://stackoverflow.com/comment/41961820
has title: How to override native isArray method is nesessary?
upvote count: 0
has comment: http://stackoverflow.com/comment/41963392
has comment: http://stackoverflow.com/comment/41961833
has comment: http://stackoverflow.com/comment/41963622
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41961874
has comment: http://stackoverflow.com/comment/41962204
has body: I'm trying to override native isArray method like the following: function isArray (obj) { isArray = Array.isArray || function(obj) { return Object.prototype.toString.call(obj) == '[object Array]'; }; return isArray(obj); } var ok = isArray([]); But unfortunately isArray always return function. What's wrong?
accepted answer: http://stackoverflow.com/a/26681632
has comment: http://stackoverflow.com/comment/41962039
type: Question
has comment: http://stackoverflow.com/comment/41966107
downvote count: 2

http://stackoverflow.com/comment/41955590
comment on: http://stackoverflow.com/q/26677514
score: 0
type: Comment
has text: Without authentication there's nothing stopping some random Joe from using your api if they somehow find the endpoint. Since the random joe wouldn't need to use your app to make the request, there's nothing you can do with the app to stop them from making the request from a desktop browser, or a local server.
type: QuestionComment

http://stackoverflow.com/comment/42530921
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26761298
has text: @rahulinaction `Modernizr` is awesome, but the only reason I will avoid is when I have to test just one specific property. I know that they allow you to customize the build http://modernizr.com/download/ which makes it even more awesome, but still I would download a plugin only when it is absolutely worth it.
score: 0

http://stackoverflow.com/q/26680689
score: -2
has title: How can I get the id of a button?
tagged with: javascript
has answer: http://stackoverflow.com/a/26680804
has comment: http://stackoverflow.com/comment/41960317
has comment: http://stackoverflow.com/comment/41960260
tagged with: http://stackoverflow.com/tag/html
answer count: 4
accepted answer: http://stackoverflow.com/a/26680913
favorite count: 0
has comment: http://stackoverflow.com/comment/41960189
upvote count: 0
has comment: http://stackoverflow.com/comment/41960350
possible better answer: http://stackoverflow.com/a/26680804
has answer: http://stackoverflow.com/a/26680913
has answer: http://stackoverflow.com/a/26681491
type: AnsweredQuestion
has body: I want to get the #id of an html button, so that I can use it elsewhere. HTML &lt;input type="button" onclick="recordToFilename(this);" id="submitdis" value="Enter Discount Price"&gt; JavaScript var x = document.getElementById("submitdis"); function recordToFilename(ele) { console.log(ele.id); } Here's my codepen. My goal is to do something similar to this fiddle, but I'm not really sure where to start.
has answer: http://stackoverflow.com/a/26680822
has comment: http://stackoverflow.com/comment/41960156
has comment: http://stackoverflow.com/comment/41960198
type: Question
downvote count: 2

http://stackoverflow.com/comment/42053459
type: Comment
type: QuestionComment
has text: it is a very good plugin for tooltips
score: 0
comment on: http://stackoverflow.com/q/26732929

http://stackoverflow.com/a/26711203
accepted answer of: http://stackoverflow.com/q/26711098
has comment: http://stackoverflow.com/comment/42014054
answers question: http://stackoverflow.com/q/26711098
upvote count: 1
has body: It is simple to do this, just supply a replacement function to String.replace: str.replace(/answers\[(\d+)\]/, function (_, $1) { return "answers[" + (+$1 + 1) + "]"; }); (If you want an explanation on the parameters to the replacement function, you can read the MDN link above, or my answer here) But whether this is a good solution to the bigger problem, I don't know.
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/a/27266121
answers question: http://stackoverflow.com/q/26773312
type: Answer
has body: My route works as follows: Route::get('getXYZ', 'ABCController@getXYZ'); In Chrome the Developer Tools (Ctrl-Shift-i) helped me a lot. Also this post helped me a lot Cascading/Dependent dropdown list HTH
score: 0

http://stackoverflow.com/comment/42172128
score: 1
comment on: http://stackoverflow.com/a/26798484
has text: First of all thank you for your answer. I am trying develop something that looks like command prompt which accepts some commands. So for login purpose I'm providing the command like 'login -u username -p password'. If I do like what you have given in your code, it doesn't look like a command
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26709362
has comment: http://stackoverflow.com/comment/42012867
has comment: http://stackoverflow.com/comment/42015046
score: 0
has comment: http://stackoverflow.com/comment/42016897
type: UnansweredQuestion
tagged with: python
tagged with: excel
has title: openpyxl 1.8.6 module Excel Protection not applying
answer count: 0
has body: I am using python openpyxl 1.8.6 module for reading and writing into Excel I am using protection method from this module and trying to protect the cell in Excel by not writing into Excel,but its not working. Here is my code... from openpyxl.style import Protection wb = Workbook() ws = wb.active ws.cell('A8').style.protection.locked=Protection.PROTECTION_PROTECTED
has comment: http://stackoverflow.com/comment/42011766
type: Question
tagged with: javascript

http://stackoverflow.com/comment/42193646
has text: https://gist.github.com/pnc89/dfd7581ec6d825c25ecd It looks like the data is output properly, but I'm clueless as to why it's not building the chart still.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26810255
type: Comment

http://stackoverflow.com/a/26818762
has comment: http://stackoverflow.com/comment/42207785
has body: You can to do the function var deepEquals = function(o1, o2) { var k1 = Object.keys(o1).sort(); var k2 = Object.keys(o2).sort(); if (k1.length != k2.length) return false; return k1.zip(k2, function(keyPair) { if(typeof o1[keyPair[0]] == typeof o2[keyPair[1]] == "object"){ return deepEquals(o1[keyPair[0]], o2[keyPair[1]]) } else { return o1[keyPair[0]] == o2[keyPair[1]]; } }).all(); } }); Think with me, you have the StudentJson with your 8 values and you need to compare one by one. We can usage a loop: for(var i=0;i &lt; StudentJson.length; i++){ //Here we do compare the value of the first position with the second position if (deepEquals(StudentJson[i], StudentJson[i+1])){ //This condition is going returning true or false } }
score: 0
has comment: http://stackoverflow.com/comment/42207496
type: Answer
answers question: http://stackoverflow.com/q/26818671

http://stackoverflow.com/comment/42033733
type: Comment
type: QuestionComment
has text: First there just came the response out of that. Now it says it is null? The 'fixes' on that post i already tried
score: 0
comment on: http://stackoverflow.com/q/26721953

http://stackoverflow.com/a/26802525
answers question: http://stackoverflow.com/q/26801638
has body: $show_message= FALSE; // at the top of page $message = ""; if($show_message= TRUE){ echo $message; } if(isset($_POST['sub'])){ //Php code goes here $show_message = TRUE; } &lt;input type ="submit" name="sub" /&gt;
score: 1
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42180553
upvote count: 1

http://stackoverflow.com/comment/42059386
type: QuestionComment
comment on: http://stackoverflow.com/q/26736434
type: Comment
score: 0
has text: @AshutoshPujari Right-click that field in the browser, select _Inspect element_, and see what the id is there. Depending on the rest of your ASPX layout, the id might be getting prefixed by something else. If so, then you'll have to include that prefix in your JavaScript.

http://stackoverflow.com/comment/42076193
comment on: http://stackoverflow.com/q/26745228
type: Comment
type: QuestionComment
score: 1
has text: My first reaction would be that the Ajax call is not resulting in any errors but returning no json response. You can check in your browser what data is being posted to the server. I guess that your if statement in your php script is evaluated as false and nothing is returned.

http://stackoverflow.com/comment/108264677
comment on: http://stackoverflow.com/a/42098602
type: Comment
score: 0
type: AnswerComment
has text: `vagrant plugin install vagrant-notify-forwarder` made a permanent solution for me

http://stackoverflow.com/comment/42129011
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26774932
score: 2
has text: That's not what a [` `](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label) is for.

http://stackoverflow.com/a/26796153
answers question: http://stackoverflow.com/q/26796090
type: Answer
accepted answer of: http://stackoverflow.com/q/26796090
has body: Replace duplicating ids with classnames and use find method: $('.message-subject-result').click(function() { var messageId = $(this).find('.message_id').val(); alert(messageId); }); valid HTML should be: '.$date.' FROM: '.$row['firstname'].' '.$row['lastname'].' SUBJECT: '.$row['subject'].' '.$row['message'].'
has comment: http://stackoverflow.com/comment/42166663
upvote count: 4
has comment: http://stackoverflow.com/comment/42166489
type: AcceptedAnswer
downvote count: 0
score: 4

http://stackoverflow.com/q/26798306
tagged with: css
has body: I have a fixed element that needs to stay 100px from top and 0px from the right side and I want a scrollbar inside it. I deal with this by having an absolute positioned element inside on which I apply overflow: scroll. This works fine BUT it looks like the scrollbar appears 100px (exactly the top px value) later than it should. So 100px of content is hidden. If I remove the top:100px property, the scrollbar appears exactly when it should. If needed, this is my HTML: &lt;div class="fixed"&gt; &lt;div class="absolute"&gt; {content} &lt;/div&gt; &lt;/div&gt; CSS: .fixed{ position: fixed; right: 0; top: 100px; width: 300px; } .absolute{ position: absolute; height: 100%; overflow: auto; } Is there any solution to overcome this issue? Thanks!
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/42170993
has comment: http://stackoverflow.com/comment/42171202
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42170904
has title: How to deal with the scrollbar inside a fixed element (top: 100px) that triggers 100px later?
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42170591
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42173442

http://stackoverflow.com/comment/42024504
comment on: http://stackoverflow.com/q/26716242
score: 0
has text: The source code is UPDATED, now is full...
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26673826
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26698205
type: UnansweredQuestion
has body: It's like my assignment to create slider control, but without using any external libraries. Only jQuery is allowed (not UI). First I thought I would have to write my own control from the scratch, but then I stumbled into range control from HTML5. It almost looked like win situation, but part of the task is coloring track differently as seen in the image. It really surprised me that IE is winner here since it has ::-ms-fill-lower pseudo element that can be styled. Unfortunately WebKit/Gecko seems lacking this completely. Do you think it could be hacked somehow ? I can think of some kind of floating div controlled by javascript that changes it's size, but that seems rather nasty. If this is not simply possible, can you recommend me some resource how to build this easily on my own? It seems rather complex to handle all dragging &amp; clicking correctly.
has title: Support for partial fill of HTML5 range input in WebKit/Gecko
type: Question
score: 0
answer count: 1

http://stackoverflow.com/q/26734512
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/30363891
downvote count: 0
has answer: http://stackoverflow.com/a/26777184
accepted answer: http://stackoverflow.com/a/26777184
has title: Open Layers 3 Zoom map event handler
has answer: http://stackoverflow.com/a/30363891
score: 19
type: Question
has answer: http://stackoverflow.com/a/32887546
tagged with: openlayers-3
tagged with: javascript
has answer: http://stackoverflow.com/a/54753955
upvote count: 19
favorite count: 0
has body: I need to handle a zoom event in Open Layers 3. The following is my code: map_object = new ol.Map({ target: 'map', controls: controls_list, interactions: interactions_list, overlays: [overlay], layers: [OSM_raster, WFS_layer], view: view }); map_object.on("Zoom", function() { console.log('Zooming...'); }); This code runs with no errors and shows a map, but there is no output to the console, suggesting this function isn't firing. I have also tried: map_object.on("drag", function() { console.log('Dragging...'); }); And this too does nothing. Any help as to how to handle map control events in OL3 would be much appreciated (particularly zooming!). Note I have tried 'zoom' as well as 'Zoom' for the type field of the on method.

http://stackoverflow.com/a/26754054
score: 1
upvote count: 1
type: AcceptedAnswer
has body: First of all, you would need the body-parser middleware if you dont want to pull the data out of the http headers yourself. Then you dont need to access the params as you dont have any, but the body of the request with req.body.
accepted answer of: http://stackoverflow.com/q/26753768
type: Answer
answers question: http://stackoverflow.com/q/26753768
downvote count: 0

http://stackoverflow.com/comment/42039056
has text: Also, i can see clear banding on your particle trail at regular intervals, so I would guess some position updates are being triggered at those band boundaries (elsewhere in your code probably).
comment on: http://stackoverflow.com/a/26724793
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42157777
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26790314
has text: Well with "standard" I mean that I can have a function that has the same semantic, signature and functionality in any possible implementation; for example if I use the functions `getViaHTTP` and `unpackTar` under Linux with nodejs I would like to get the same behaviour under Windows with another JS shell or inside a web browser .

http://stackoverflow.com/comment/42120584
comment on: http://stackoverflow.com/q/26770001
has text: eval(inputVal) is bad bad bad. There are plenty of ways to convert a string to a number. parseInt, parseFloat, number, urnary plus, etc.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42129162
comment on: http://stackoverflow.com/q/26769605
type: Comment
type: QuestionComment
has text: @itachi, about the `console.log(error)`where do I can see it's output ? @jcesarmobile I will try it
score: 0

http://stackoverflow.com/q/26721240
tagged with: firefox
answer count: 1
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has title: Setting scrollTop on Firefox causes a bounce
type: Question
has answer: http://stackoverflow.com/a/26721506
score: 0
has body: This should demonstrate the issue. It only happens in FF. Chrome act as expected. What I'm trying to do (refer to jsfiddle below) is stop scrolling the blue section when the bottom is level with the bottom of the red section. On FF there will be a slight delay and then a bounce. function adjustPosition() { var padding = $(window).height() - (checkoutBtn().offset().top - $(window).scrollTop() + checkoutBtn().height()); $(window).scrollTop(menuBox().height() - $(window).height() + menuBox().offset().top + padding); } function needsPositioned(wheelDelta) { return ((checkoutBtn().offset().top + checkoutBtn().height() + 10) &gt;= (menuBox().offset().top + menuBox().height())) &amp;&amp; wheelDelta &lt; 0 } function checkScrollPosition($event) { var wheelDelta = ($event.wheelDelta || ($event.detail*-1)); if (needsPositioned(wheelDelta)) { db_adjustPosition($event); $event.preventDefault(); $event.returnValue = false; return false; } return true; } function adjustHeight($event) { if ($event &amp;&amp; ($event.type === 'mousewheel' || $event.type === 'DOMMouseScroll' || $event.type === 'resize')) { if (!checkScrollPosition($event)) { return false; } } } http://jsfiddle.net/martyphee/pu1qncaL/3/ Update: I seem to have found the issue. It's with OSX inertia setting. Once I turn that off the bounce goes away. Any idea how to combat that?

http://stackoverflow.com/comment/42137914
comment on: http://stackoverflow.com/q/26779744
has text: I suppose nothing is wrong with reading meta properties directly from ` `. It is quite simple to do it: `document.querySelector('meta[name="viewport"]').getAttribute("user-scalable")`. If attribute doesn't contain specials chars, it is even more simple: `document.querySelector('meta[name="viewport"]').width`.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26775693
has comment: http://stackoverflow.com/comment/42130582
has comment: http://stackoverflow.com/comment/42130250
answer count: 0
has comment: http://stackoverflow.com/comment/42130188
has comment: http://stackoverflow.com/comment/42130186
type: Question
has comment: http://stackoverflow.com/comment/42134760
has body: I am trying to replace a the country code from a telefone number. As I do not know how the user entered the telefone number I am trying to get one out of several with a reg expression. In a first step I removed a possible '+' and brackets as well as spaces. Here is my try, which does not work: result = "4901762887541"; result.replace(/^00490|^0049|^490|^49/g, '0'); What would be the correct way to find the different country codes?
tagged with: javascript
tagged with: phone-number
has comment: http://stackoverflow.com/comment/42130381
score: 0
has title: Javascript RegEx find one out of several
has comment: http://stackoverflow.com/comment/42131656
tagged with: regex
type: UnansweredQuestion

http://stackoverflow.com/comment/42003796
comment on: http://stackoverflow.com/a/26705369
has text: That is right on the money. I didn't know about 'containerless control flow syntax' and it seems super handy. I knew ko had to have thought of this sceneario. Cheers!
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41951221
has text: http://jsfiddle.net/L4v036gf/
score: 0
comment on: http://stackoverflow.com/q/26675893
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42181418
comment on: http://stackoverflow.com/a/26803880
type: AnswerComment
score: 0
type: Comment
has text: Yes, that works, but what @somethinghere suggested doesn't because it loses "Department", "Zone"

http://stackoverflow.com/comment/42198184
type: Comment
has text: We have to see what style rules are applied to `#share-icon img` (without the `:hover`) in order to help.
comment on: http://stackoverflow.com/q/26813081
score: 0
type: QuestionComment

http://stackoverflow.com/q/26790299
has answer: http://stackoverflow.com/a/45824674
tagged with: upload
has comment: http://stackoverflow.com/comment/42924012
tagged with: jquery
favorite count: 0
answer count: 9
type: UnansweredQuestion
upvote count: 12
has answer: http://stackoverflow.com/a/32180549
has comment: http://stackoverflow.com/comment/49557468
downvote count: 0
has answer: http://stackoverflow.com/a/30745274
has answer: http://stackoverflow.com/a/28041823
has answer: http://stackoverflow.com/a/30752616
linked to: http://stackoverflow.com/q/25743994
has comment: http://stackoverflow.com/comment/49550383
type: Question
has answer: http://stackoverflow.com/a/27802315
has answer: http://stackoverflow.com/a/37140747
has answer: http://stackoverflow.com/a/56783944
has answer: http://stackoverflow.com/a/30634630
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has title: Jquery file uploader blueimp, Unexpected Token/Character
score: 12
tagged with: blueimp
has body: First of all let me tell you that I've already searched for some answers, and while it helped me out a bit, my main problems remain unresolved. I used the file uploader (Version 9.8.0) @ http://blueimp.github.io/jQuery-File-Upload/ (1st problem) Everything seems to work fine until I start uploading. After it finishes uploading, it says the following error for each image (instead of the "upload successful" message). On Google Chrome it says: "SyntaxError: Unexpected token &lt;" on Mozilla FireF. it says: "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data" I searched some solutions but I can't figure out how to apply these solutions. And btw, it adds the image, despite the error.

http://stackoverflow.com/q/26673951
has title: Issue with parsing JSON for typeahead
upvote count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/21530063
favorite count: 0
score: 0
possible better answer: http://stackoverflow.com/a/26689372
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41950724
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41952984
tagged with: bloodhound
has answer: http://stackoverflow.com/a/26689372
has comment: http://stackoverflow.com/comment/41951268
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41951412
linked to: http://stackoverflow.com/q/26605493
has body: I am new to the use of the typeahead plugin and my javascript(not jquery) skills are terrible. This is my JSON: {"Product":[ {"@ProductCode":"C1010","@CategoryName":"Clips"}, {"@ProductCode":"C1012","@CategoryName":"Clips"}, {"@ProductCode":"C1013","@CategoryName":"Clips"}, {"@ProductCode":"C1014","@CategoryName":"Clips"}, {"@ProductCode":"C1015","@CategoryName":"Clips", "EAN":"0987654321"} ]} I have the typeahead bundle 0.10.5 And this is my js: $(document).ready(function () { var products = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'), queryTokenizer: Bloodhound.tokenizers.whitespace, limit: 100, remote: { url: 'TypeAhead.ashx?q=%QUERY&cat=prod', filter: function (data) { return data.Products; } } }); products.initialize(); $("#tbSSearch").typeahead({ highlight: true, minLength: 2 }, { source: products.ttAdapter(), displayKey: function (products) { return products.product.code; }, templates: { header:" Products " } }); }); Chrome console gives me: Uncaught TypeError: Cannot read property 'length' of undefined But that is in my jquery.2.1 (minified) lib and not the above js source. browser shows no popup below #tbSearch input. as @Mike suggested, jsfiddle http://jsfiddle.net/gw0sfptd/1/ but I had to modify some stuff to work with local json. and this also does not work LOL edit as David suggested, I should clean up my json. so it is now : [{"Code":"C1010","Gtin13":0,"CategoryName":"Clips"}, {"Code":"C1012","Gtin13":0,"CategoryName":"Clips"}, {"Code":"C1013","Gtin13":0,"CategoryName":"Clips"}] and the js: remote: { url: 'TypeAhead.ashx?q=%QUERY&cat=prod', filter: function (products) { return $.map(products.results, function (product) { return { value: product.Code }; }); } } datumTokenizer: function (datum) { return Bloodhound.tokenizers.whitespace(datum.value); }, queryTokenizer: Bloodhound.tokenizers.whitespace, But no working typeahead and no (useable)error in firefox console. My desired output would be a list of productcode, but …
has answer: http://stackoverflow.com/a/26685249
tagged with: typeahead.js
answer count: 2
accepted answer: http://stackoverflow.com/a/26685249

http://stackoverflow.com/a/26828505
upvote count: 2
has body: Assuming your href reference the file with the contents that you want to show, you can use .load(). You can get the href property using .prop(). Prevent the default action (redirecting to a new page) when your anchors are clicked. You may also want to trigger the this functionality on page load for the .active nav button. I've added a filter and a click trigger afterwards for this reason. $(document).ready(function () { var $navAnchors = $('nav ul li a'); $navAnchors.click(function (e) { var $this = $(this); e.preventDefault(); $navAnchors.removeClass('active'); $this.addClass('active'); $('#content').load($this.prop('href')); }).filter('.active').click(); }); Notice I've assigned your matching jQuery collection to a variable, to save you making repeat selections. This way nav ul li a is only searched for once, on DOM load.
type: Answer
answers question: http://stackoverflow.com/q/26828435
score: 2
downvote count: 0

http://stackoverflow.com/comment/41994873
score: 0
has text: This also works: http://jsfiddle.net/ne397q4q/2/ Very odd??? Thanks for your help!
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26700097

http://stackoverflow.com/comment/42006919
score: 0
has text: @MagicLasso - that's a pain. I diagnose your issue and fully document it in a jsFiddle and then you change the code. Anyway, I tried to add an answer about your changed code.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26707102

http://stackoverflow.com/comment/42102519
type: Comment
has text: Sorry was off yesterday didn't check SO. Glad you got it working!
type: QuestionComment
comment on: http://stackoverflow.com/q/26695019
score: 0

http://stackoverflow.com/q/26744685
has answer: http://stackoverflow.com/a/26783411
answer count: 1
has body: I want my stream to pipe to another stream only if my first stream satisfy certain conditions. es = require('event-stream'); var checkBuffer = function() { return es.map(function(file, cb) { if (!file.isBuffer()) { cb(); } else { cb(null, file); } }); }; module.exports = function() { checkBuffer.pipe( mysteryFoo()); return checkBuffer; }; I only want to pipe to mysteryFoo only if all if the file piped into checkBuffer passes isBuffer, else I don't want this pipe to happen. The function that pipes its output to this module is gulp.src('/some-dest/**'). Thanks!
tagged with: gulp
favorite count: 0
has title: How to conditionally pipe output in node.js?
tagged with: node.js
accepted answer: http://stackoverflow.com/a/26783411
type: AnsweredQuestion
score: 1
tagged with: stream
upvote count: 1
type: Question
tagged with: pipe
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/26780121
has answer: http://stackoverflow.com/a/26781278
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
tagged with: iframe
has body: i having problem that i can not fit the external web content exactly as per the width and height of the iframe can someone help please??? I am posting the link via form because it will be like this by posting the values.. i gave this youtube and google just for example. External Link Form: Iframe: iframes are not supported by your browser. Please help me... Thanks & Regard's
has title: how to fit external website with iframe width
type: Question

http://stackoverflow.com/a/62269719
score: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26781561
upvote count: 1
has body: Most probably that is because the size shown by the Browser is total size of response body and all headers summed together whereas your Ajax call is printing the size of the response headers that will be less than total response size. For example, here's a request I made on postman. The response size is segrated into two parts. The total size was the same 728 B when I made the request on the browser. (specified in network console) Postman console

http://stackoverflow.com/q/26740145
has title: error with jsrouting-bundle symfony
has answer: http://stackoverflow.com/a/26740205
tagged with: javascript
has body: I have installed the jsrouting-bundle, and this is my code: Javascript: $(document).ready(function () { $(".pmcontents").hide(); $(".pmbox").click(function () { $(this).css("font-weight", "normal"); $(this).next().toggle(); var myValue = $('this').attr('id'); var DATA = 'sentValue=' + myValue; $.ajax({ type: "POST", url: Routing.generate('isread'), data: DATA, cache: false, success: function (data) { alert("database has been updated"); } }); }); }); Controller: public function isreadAction() { $request = $this-&gt;get('request'); if ($request-&gt;isXmlHttpRequest()) { var_dump($request-&gt;request-&gt;get('sentValue')); $em = $this-&gt;getDoctrine()-&gt;getEntityManager(); $pm = $this-&gt;getDoctrine() -&gt;getRepository('LoginLoginBundle:Privatemessage') -&gt;findBypmid($request-&gt;request-&gt;get('sentValue')); $pm-&gt;setIsRead(true); $em-&gt;flush(); return new Response(); } } Routing: isread: path: /game/isread defaults: { _controller: LoginLoginBundle:Default:isread } requirements: _method: POST I get the following error in my console:µ Error: The route "isread" does not exist. So along with the errors that I get on the image below this should be my problem, however I don't know what I have done wrong.
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26740205
tagged with: symfony
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/q/26747852
has comment: http://stackoverflow.com/comment/42081070
has comment: http://stackoverflow.com/comment/42080691
has comment: http://stackoverflow.com/comment/42095788
type: Question
has comment: http://stackoverflow.com/comment/42080646
has answer: http://stackoverflow.com/a/26784662
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42119472
has comment: http://stackoverflow.com/comment/42080848
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42120272
has body: I have a plugin that I just wrote, which is so far acting just I had hoped while developing. I attempted to take this code out of my scripts directory and post it on Codepen.io. I get a script error when running it there, the error is cannot read 'Action' of undefined. It gets instantiated by a click event which passes an event. Both using jQuery 2.1. Anyone know whats happening here? Heres the codepen: http://codepen.io/nicholasabrams/pen/uJKrL // $ DOC $.fn.dataValidate = function(event, userSettings) { "use strict"; event.preventDefault(); var api = { // Script definition defaults defined in object below notNull: { errorText: 'This field is required', symbol: false, Action: function(dataToCheck, instance) { if (dataToCheck === '' || dataToCheck === null || dataToCheck === 'undefined' || dataToCheck.length === 0 ) { // if true return true to caller alert('null'); // Retrieve errorText // Wrap in error template this.errorForNotNull = new api.ErrorInjector(instance); return false; } else { return true; } } }, isNaN: { errorText: 'Numbers not allowed here', symbol: false, Action: function(dataToCheck, instance) { api.notNull.Action(dataToCheck, instance); /* Reuse the notNull method as a screening service before entering into the method specific filtering (assuming null fields would be inappropriate in any types of check) */ if (isNaN(dataToCheck)){ // Check if the not null field is also non a number return true; } else { this.errorForIsNan = new api.ErrorInjector(instance); return false; } } }, isNum: { errorText: 'Please enter a number', symbol: false, Action: function(dataToCheck, instance) { api.notNull.Action(dataToCheck, instance); if (!isNaN(dataToCheck)){ // Check if the not null field is also non a number return true; } else { this.errorForIsNan = new api.ErrorInjector(instance); return false; } } }, isEmail: { errorText: 'Please enter a valid email address', symbol: false, Action: function(dataToCheck, instance) { api.notNull.Action(dataToCheck, instance); …
has title: JQuery plugin not working on codepen, works great elsewhere
has comment: http://stackoverflow.com/comment/42080602

http://stackoverflow.com/q/26715352
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/1087246
answer count: 1
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42021572
has answer: http://stackoverflow.com/a/26717299
tagged with: local-storage
has comment: http://stackoverflow.com/comment/42021356
score: 2
has body: Problem: User has N browsers installed. As an application I want to store a data shared between all installed browsers. Requirements: Support IE9 Possible solution for now: WebSQL using polyfill. Any another suggestions?
type: Question
has comment: http://stackoverflow.com/comment/42021908
has title: How to store data cross-browser on user's machine?

oauth-2.0
tag name: oauth-2.0
type: Tag
tags question: http://stackoverflow.com/q/26689462

http://stackoverflow.com/comment/42121722
score: 0
type: AnswerComment
has text: Eh added the condition in the if, but not worked. Now vere debug, but not very well as it is.
type: Comment
comment on: http://stackoverflow.com/a/26770684

http://stackoverflow.com/comment/42081917
type: AnswerComment
comment on: http://stackoverflow.com/a/26748730
type: Comment
has text: can i use the same tactic i used as my main image? it actually contains 2 images overlaying each other, and only respond to show once the thumbnail that link to the main image is clicked. So instead of overlaying and respond to thumbnail click this time i make it respond to image click. yes display:none is what i need. Thank you
score: 0

wcf
type: Tag
tag name: wcf
tags question: http://stackoverflow.com/q/26730565
tags question: http://stackoverflow.com/q/26782120
tags question: http://stackoverflow.com/q/26751043
tags question: http://stackoverflow.com/q/26730845

http://stackoverflow.com/comment/41978545
type: QuestionComment
has text: it will not change the buttons name to a random string from the array maps how do i do it?
score: 0
comment on: http://stackoverflow.com/q/26690959
type: Comment

http://stackoverflow.com/q/26697108
type: AnsweredQuestion
tagged with: mysql
has answer: http://stackoverflow.com/a/26697155
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41988760
upvote count: 0
tagged with: javascript
tagged with: ajax
has body: I'm trying to move vars from js code to php so I can do a query. I know for sure that the vars are getting to the PHP fine. The problem is, when I'm trying to combine the vars in the SQL query, it ignores them and I'm not getting any results... Here is the problematic part of the code: $postdata = file_get_contents("php://input"); $request = json_decode($postdata); $gluten = $_POST['gluten']; $vegan = $_POST['vegan']; $vegetarian = $_POST['vegetarian']; $result = $conn-&gt;query("SELECT * FROM dishes JOIN restaurants USING (res_id) WHERE (gluten LIKE '$gluten' AND '$vegan' LIKE 0 AND vegetarian LIKE '$vegetarian')"); Any ideas? Thanks!
has comment: http://stackoverflow.com/comment/41988862
has comment: http://stackoverflow.com/comment/41988763
accepted answer: http://stackoverflow.com/a/26697155
answer count: 1
has title: PHP mysql query ignores POST vars
score: -1
favorite count: 0
tagged with: php

http://stackoverflow.com/q/26712618
type: Question
tagged with: mongodb
has comment: http://stackoverflow.com/comment/42016781
has comment: http://stackoverflow.com/comment/42016664
tagged with: javascript
has comment: http://stackoverflow.com/comment/42016423
tagged with: express
has body: how can i validate after data insert and saving data to database if data already in a database send user to error alert message. how can i do this with express REST server? this is my "POST" on client side button.addEventListener('click', function(e) { var service_ = service.value; var amount_ = amount.value; var name_ = name.value; var phone_ = phone.value; var reminder_ = reminder.value; if (start_pick &lt; end_pick) { var jsondata = [{ start_time : new Date(start_pick), end_time : new Date(end_pick), service : service_, amount : amount_, client_phone : phone_, client_name : name_, reminder : reminder_ }]; var xhr = Titanium.Network.createHTTPClient(); xhr.setTimeout(10000); xhr.open("POST", "http://127.0.0.1:3000/collections/appoinments"); xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8"); xhr.send(JSON.stringify(jsondata)); xhr.onerror = function() { Titanium.API.info("Error in connecting to server !!"); alert("Error on connecting to server, Please try again"); }; xhr.onload = function() { windowPayment.close(); } this is my POST on server app.post('/collections/:collectionName', function(req, res, next) { req.collection.insert(req.body, {}, function(e, results){ if (e) return next(e) res.send(results) }) }) how can i do this.any help?
has comment: http://stackoverflow.com/comment/42016563
has comment: http://stackoverflow.com/comment/42044074
downvote count: 0
has comment: http://stackoverflow.com/comment/42016310
has comment: http://stackoverflow.com/comment/42016756
favorite count: 0
has comment: http://stackoverflow.com/comment/42017701
has comment: http://stackoverflow.com/comment/42043396
has comment: http://stackoverflow.com/comment/42016601
type: UnansweredQuestion
has title: How to validate a data insert with mongoDB
tagged with: node.js
has comment: http://stackoverflow.com/comment/42017792
answer count: 0
score: 1
upvote count: 1

http://stackoverflow.com/comment/42056507
type: QuestionComment
has text: You could use a jQuery plugin for that. Can be useful. http://plugins.jquery.com/fullscreen/
comment on: http://stackoverflow.com/q/26735000
score: 0
type: Comment

http://stackoverflow.com/comment/42044128
type: AnswerComment
score: 0
type: Comment
has text: Thank you for answer but actually I got 5-6 div on the same page with horizontal scroll. If I make position:fixed then all header and footer moving along with scroll.
comment on: http://stackoverflow.com/a/26727726

http://stackoverflow.com/q/26742955
tagged with: javascript
score: 0
answer count: 1
has title: Result: TypeError: Object [object Object] has no method 'set' when trying to edit Parse object
has body: When I try to run the following background job, I get an error stating Result: TypeError: Object [object Object] has no method 'set', referring to the line where I attempt to set the 'Number' property of the object being returned to a value of 2. I've used this same format to edit Parse objects before, and it worked fine, what am I doing wrong here? Parse.Cloud.job("sendLowPush", function(request, status) { Parse.Cloud.useMasterKey(); ///////////// //send push notification to all users in the "lowPush" channel //{Query the # value of pushIncrement with object id hKj2Eazz6h} var pushIncrement = Parse.Object.extend("pushIncrement"); var pushIncrementQuery = new Parse.Query(pushIncrement); pushIncrementQuery.equalTo('objectId', 'hKj2Eazz6h'); pushIncrementQuery.find({ success: function(results) { for (var i = 0; i &lt; results.length; ++i) { var dayNumber = results[i].get("Number"); } console.log('dem results be:' + dayNumber); //Figure out whether its day 1, 2, or 3, and increment. Send lowPush if day 3. if (dayNumber = 1){ //change it to 2 console.log('dayNumber is 1'); results.set('Number', '2'); results.save(); } else if (dayNumber = 2){ //change it to 3 console.log('dayNumber is 2'); } status.success("Push Notifications completed successfully."); }, error: function(error) { console.log('shit'); status.error('shitty shit'); } }); });
has answer: http://stackoverflow.com/a/26742980
tagged with: parse-platform
accepted answer: http://stackoverflow.com/a/26742980
type: AnsweredQuestion
type: Question

http://stackoverflow.com/a/26697548
type: Answer
has body: In this example the clicked div is given 100% width and its siblings have their width removed. The transition gives a smooth animation. Create the hover with the :hover pseudo class on the div. In this example, the div is scaled slightly using the transform scale property like this: body > div:hover { transform: scale(1.05); cursor: pointer; } The scale is removed when selected with .selected:hover { transform: scale(1) } Working Example Note: I have changed all the ids to classes and condensed all the duplicate styles into body > div; all the direct div children of body have the same width, height, transition, and are floated to the left. $('body > div').on('click', function() { $(this).toggleClass('selected').siblings().toggleClass('hide'); }); html, body { height: 100%; margin: 0; overflow: hidden; } body > div { transition: all 0.3s; float: left; height: 100%; width: 20%; } body > div:hover { transform: scale(1.05); cursor: pointer; } .one { background-color: #ffccaa; } .two { background-color: #ffffcc; } .three { background-color: #aabbcc; } .four { background-color: #cccccc; } .five { background-color: #ff11bb; } .selected { width: 100%; } .selected:hover { transform: scale(1); } .hide { width: 0; }
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26695332
has comment: http://stackoverflow.com/comment/43755365
has comment: http://stackoverflow.com/comment/43754287
answers question: http://stackoverflow.com/q/26695332
has comment: http://stackoverflow.com/comment/43754950
has comment: http://stackoverflow.com/comment/43754387
upvote count: 2
has comment: http://stackoverflow.com/comment/42006154
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42006377
has comment: http://stackoverflow.com/comment/43754183

http://stackoverflow.com/a/29367462
has comment: http://stackoverflow.com/comment/66015995
downvote count: 0
has comment: http://stackoverflow.com/comment/128104920
score: 20
answers question: http://stackoverflow.com/q/26756500
has comment: http://stackoverflow.com/comment/80753729
has body: Add an onEscape callback function, which may have an empty body. See docs and example. Basic code: bootbox.dialog({ onEscape: function() {}, // ... });
upvote count: 20
type: Answer

http://stackoverflow.com/comment/42229732
type: AnswerComment
has text: There's still something that is unclear. Maybe you can clarify that for me. According to my understanding, e.stopImmediatePropagation(); should, well, stop immediate propagation. so basically, if my alert is fired, it's not suppose to fire anything else. Can you help me with an explanation? Thanks.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26830670

http://stackoverflow.com/q/26815450
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/26815472
favorite count: 0
possible better answer: http://stackoverflow.com/a/26815463
has title: Aligning td's in a table
has answer: http://stackoverflow.com/a/26815463
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
score: 2
upvote count: 2
accepted answer: http://stackoverflow.com/a/26815472
type: Question
has body: In the below table how can Item6 be aligned with Item2 when the table is constructed dynamically? Is there a pure css or css3 way of achieving this? Current Table Required Table Item1 Item2 Item3 Item4 Item5asfasfasf Item6 Fiddle : http://jsfiddle.net/jxvf9arL/1/
tagged with: javascript

http://stackoverflow.com/q/26713196
score: 1
tagged with: ng-view
favorite count: 0
tagged with: ng-animate
tagged with: angularjs
upvote count: 1
answer count: 1
has title: AngularJS - Location aware ng-view navigation using TweenMax
has answer: http://stackoverflow.com/a/29915694
has comment: http://stackoverflow.com/comment/42244020
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42155994
accepted answer: http://stackoverflow.com/a/29915694
has body: I am a complete noob to AngularJS and have started building my first project and have been hitting obstacles every step of the way... I'm trying to build something very simple, here's the gist of what i'm trying to achieve: I have 5 pages/views that get pulled in and created using JSON data based on this article - blog.brunoscopelliti.com/how-to-defer-route-definition-in-an-angularjs-web-app. Which is wired into a factory. getJSON() function($route, $location, $http, $q) { var jsonLoaded = {}; jsonLoaded.getJSON = function() { var deferred = $q.defer(); $http.get('pages.json').success(function(data) { deferred.resolve(data); }).error(function() { deferred.reject(); }); return deferred.promise; } return jsonLoaded; When navigating through the views, I would like to have a hierarchical carousel transition effect. i.e. if your on index 0, clicking index 1, would navigate from right to left and clicking back on index 0 would then navigate the view from left to right etc. This is conditionalised in the animate.js file(s) in my plunks using hasClass(). I have tried 3 main options with separate plunks: Option 1 using ng-click to add class - http://plnkr.co/edit/0mrebo8BMlrz1YkttxsT?p=preview $scope.navDirection = function(pageClass) { $scope.pageTransClass = pageClass; }; This yields the best result, and navigates exactly as I want, the problem then is when clicking the browser back or forward button, the class remains the same which is also expected. Adds/changes the class for both enter and leave views. Option 2 using $routeProvider resolve - http://plnkr.co/edit/SPfgKUyYt7LMQITHzj2I?p=preview resolve: { direction: ["changePageDirection", function(changePageDirection) { return changePageDirection.direction($route.current.params.pageId, $routeParams.pageId); } ] } This produces a delay when adding the Classes, i.e. only really starts to work on the 3rd nav item click. This method seams to add/change the Class to the "enter" animation, but the "leave" still keeps the old C…
has comment: http://stackoverflow.com/comment/42243486
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42105118
type: Question
has comment: http://stackoverflow.com/comment/42243457

http://stackoverflow.com/q/26770788
tagged with: javascript
has body: I am working through the Discover Meteor tutorial, and even though the Posts = new Mongo.Collection('posts'); has all of its functions working on the server side Mongo shell, calling the Posts functions on the browser console is simply not working: Posts.insert() ReferenceError: Posts is not defined` The collection is declared in my lib/collections folder in a posts.js file, as such: Posts = new Mongo.Collection('posts'); if (Meteor.isServer) { Meteor.publish('posts', function(){ return Posts.find()}); } if(Meteor.isClient) { Meteor.subscribe('posts'); } ` Any ideas or suggestions? When I run db.posts.insert({title: "postname}) in the Mongo shell, the new post shows up instantly asynchronously in the browser, so I know the DB is functioning. I'm pretty early on in the tutorial so I feel like this shouldn't be happening.
has comment: http://stackoverflow.com/comment/42121848
favorite count: 0
has title: Meteor 1.0 MiniMongo not serving objects to the client side
accepted answer: http://stackoverflow.com/a/26770893
possible better answer: http://stackoverflow.com/a/32032970
has answer: http://stackoverflow.com/a/32032970
tagged with: meteor
upvote count: 1
type: Question
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26770893
tagged with: mongodb
answer count: 2
has comment: http://stackoverflow.com/comment/42121898
downvote count: 0

http://stackoverflow.com/comment/42022110
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26715897
has text: How are you populating `persons` array?

http://stackoverflow.com/q/26831732
tagged with: peerjs
score: 1
has body: One of my University assignments is to develop a P2P file sharing web application to transfer files between machines on the same local network. I'm not looking for a handout on how to do this, I can figure it out once I get the high level design down, I just need to know if this is sane. I'm planning on using the PeerJS library. From what I can tell each client gets a unique ID and these IDs are used to connect clients to each other. So somehow I need to coordinate IDs between all the clients on the same local network. The way I was planning on doing this is to have a NodeJS server running with Socket.IO. When the client loads the web application, they send a websocket request to the Node server. The node server then records the external IP address of the client. When another client connects and makes a request with the same external IP address as another client, those two clients are given each other's IDs so they can connect to each other. There are a few potential problems with this: I'm assuming people with the same external IP address are on the same local network. Would this be wrong in any situations? I don't know how the file transfer between clients will happen. Ideally it should be isolated to the local network. For example if I'm transferring a file between two computers it will go: computer 1 -&gt; router/switch -&gt; computer 2, not something like computer 1 -&gt; router/switch -&gt; local exchange -&gt; ISP switch -&gt; local exchange -&gt; router/switch -&gt; computer 2. Basically the transfer shouldn't leave the local network onto the Internet. Thoughts?
type: Question
tagged with: network-programming
has comment: http://stackoverflow.com/comment/134359552
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Local network P2P file transfer
answer count: 0
type: UnansweredQuestion
tagged with: sockets
upvote count: 1
tagged with: node.js

http://stackoverflow.com/a/26687274
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41972049
score: 3
upvote count: 3
has body: function changeclassstyle() { var c = document.getElementsByClassName("c1"); for (var i=0; i<c.length; i++) { c[i].style.color = "green"; } } .c1 { color : RED; } Hi
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26687201
answers question: http://stackoverflow.com/q/26687201

http://stackoverflow.com/comment/42012765
type: Comment
has text: Thanks CBroe! Can you suggest any other plugin like Addthis that can be used in this scenario?!
comment on: http://stackoverflow.com/q/26700307
score: 0
type: QuestionComment

http://stackoverflow.com/q/26720070
type: Question
has answer: http://stackoverflow.com/a/26720395
has title: How to make my button display two different images once clicked?
tagged with: javascript
has body: I have two dies, on the main page they are default dice faces, but once the 'throw' button is clicked the two images are randomly changed to two random dice numbers. The numbers are added and displayed in my 'total' div. How to I make this happen in javascript? I also have a 'clear' button, that once selected, it returns the two default dice faces and clears the result from the total div back to 0. heres my html: Dice Dice Throw Clear Total here is my css: body{ background-color: black; color: white; text-align: center; font-size: 30px; font-family: arial; } #green { background-color: #0B610B; height: 200px; width: 550px; border-radius: 25px; position: relative; left: 480px; } .die1{ float: left; margin-top: 12px; margin-left: 70px; } .die2{ float: right; margin-top: 12px; margin-right: 70px; } .throw { margin-top: 100px; font-size: 40px; border-radius: 10px; height: 70px; width: 200px; text-align: center; background-color: white; } .clear { margin-top: 100px; font-size: 40px; border-radius: 10px; height: 70px; width: 200px; text-align: center; background-color: white; } h2{ font-size: 30px; text-align: center; margin-top: 40px; font-family: arial; } #total { background-color: white; height: 70px; width: 300px; border-radius: 10px; position: relative; left: 600px; } I have images of the 6 faces of a dice plus the default dice image of a dice face with a question mark. All my images are named die1.gif - die6.gif and my default in die-default.gif
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/26720395
possible better answer: http://stackoverflow.com/a/26720238
has answer: http://stackoverflow.com/a/26720238
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42030347

http://stackoverflow.com/q/26791936
has answer: http://stackoverflow.com/a/26792167
score: 0
answer count: 1
tagged with: javascript
tagged with: angularjs
linked to: http://stackoverflow.com/q/19168330
has title: Angular app check if user session expired or is logged out constantly
has body: I have a angular application with api calls being made to back end for logging and and so forth. What i need is to be able to tell when the session expires and logged the user out. I know on every route change i can check if the user is logged in or not which i do right now but how can i handle it when they are idle. So i have instances where the user is on a specific page and remains inactive and although they are logged out in the back end i do not know on the front end and need some where to constantly be checking. Any solutions for the best method.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42159729
tagged with: authentication
type: Question

http://stackoverflow.com/a/63748373
score: 0
type: Answer
has body: Per the Bing Maps documentation that can be done by adding the rtp parameter to the url and having each waypoint seperated by a &quot;~&quot;. https://bing.com/maps/default.aspx?rtp=adr.Seattle,WA~adr.One%20Microsoft%20Way,Redmond,WA
has comment: http://stackoverflow.com/comment/122652855
answers question: http://stackoverflow.com/q/26723301

http://stackoverflow.com/comment/42016644
has text: ok thanks so much, i am guessing you do the same for the loser? or how do you do the loser?
comment on: http://stackoverflow.com/a/26712381
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42033724
type: Comment
comment on: http://stackoverflow.com/a/26721698
type: AnswerComment
score: 0
has text: Accepted your answer, as it makes the code a lot shorter. And it works :)

http://stackoverflow.com/comment/42174503
has text: Have you tried element.id? `.attr()` is a jquery keyword. In order to use that you need to call jquery by using `$(element)`.
comment on: http://stackoverflow.com/q/26800467
score: 2
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26757357
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: How to get working button animation with built-in progress bar?
tagged with: css
tagged with: angularjs
type: UnansweredQuestion
has body: I need to get working button with progress bar like here. I have set up resources, js binding but for some reason button is not acting as in the example. How to fix it? My code: Submit Ladda.bind('.ladda-button .progress-button button', { callback: function (instance) { var progress = 0; var interval = setInterval(function () { progress = Math.min(progress + Math.random() * 0.1, 1); instance.setProgress(progress); if (progress === 1) { instance.stop(); clearInterval(interval); } }, 200); } }); http://jsfiddle.net/RCola/4p2jke75/ UPDATE: I was following tutorial but still can find what is wrong with my jsfiddle code. How to get it working?
has answer: http://stackoverflow.com/a/26757453
type: Question
tagged with: javascript

http://stackoverflow.com/q/26777537
upvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26777664
has answer: http://stackoverflow.com/a/26777672
has comment: http://stackoverflow.com/comment/42135296
has comment: http://stackoverflow.com/comment/42133297
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42133287
tagged with: css
has comment: http://stackoverflow.com/comment/42136027
has answer: http://stackoverflow.com/a/26777711
possible better answer: http://stackoverflow.com/a/26777672
answer count: 4
has comment: http://stackoverflow.com/comment/42133961
has comment: http://stackoverflow.com/comment/42147518
has title: Style a dynamically created div element
tagged with: dynamic
downvote count: 0
has comment: http://stackoverflow.com/comment/42134967
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26777797
accepted answer: http://stackoverflow.com/a/26777797
has body: I would like to apply a css style to a element after it's created. The element is created by a plugin, so I can't access the event in which it is created. This element has the .appointments-address-field class. I have tried to add a simple style: .appointments-address-field { background: #fff; } ... with no success. Then I tried to attach a delegated load event in jQuery: $(document).on('load', '.appointments-address-field'), function() { $('.appointments-address-field').css('background', '#fff'); }); ... with no success either. How can I apply a style to that element? Edit: Sorry, I misspelled my jQuery code. Many of you have suggested to use .css instead of .style, but I did use that.
score: 1
has comment: http://stackoverflow.com/comment/42135019
has comment: http://stackoverflow.com/comment/42135625
has comment: http://stackoverflow.com/comment/42135345
type: Question

http://stackoverflow.com/comment/42046307
comment on: http://stackoverflow.com/a/26728658
score: 0
type: AnswerComment
has text: Have a look here: http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html (mind you, also not perfect..), Oh, and here: http://programmers.stackexchange.com/questions/78353/how-far-should-one-take-e-mail-address-validation
type: Comment

http://stackoverflow.com/q/26789216
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/42157358
tagged with: meteor
favorite count: 0
has body: Ok, let me restate the question. I am new in Meteor and I do not know how to add I created a meteor collection called Products1 = new Meteor.Collection ('products1'); and in that collection I have several variables which include : "watts" and "wattsbal". This is a sample of the app http://orozcotest.meteor.com/products1 (in this webpage I had to store manually the column "Watts totales" by storing the information in {{wats_tot}} this is momentarily while I learn how to add) you can see an updated copy in https://github.com/orozcorp/myapp.git now I want to add the column "watts" and "watts balastro" which are identified by the variables "watts" and "wattsbal" respectively. I also have the following template Template.product1Form.events({ 'click .save':function(evt,tmpl){ var codigo = tmpl.find('.codigo').value; var tipo = tmpl.find('.tipo').value; var watts = tmpl.find('.watts').value; var wattsbal = tmpl.find('.wattsbal').value; var watts_tot = tmpl.find('.watts_tot').value; var precio = tmpl.find('.precio').value; var precio_bal = tmpl.find('.precio_bal').value; var numbal = tmpl.find('.numbal').value; var mo = tmpl.find('.mo').value; var horasvid = tmpl.find('.horasvid').value; var lux_watt = tmpl.find('.lux_watt').value; if(Session.get('editing_product1')){ updateProduct1(codigo,watts, tipo, watts_tot, precio, precio_bal, numbal, mo, horasvid, wattsbal, lux_watt); } else{ addProduct1(codigo,watts, tipo, watts_tot, precio, precio_bal, numbal, mo, horasvid, wattsbal, lux_watt); } Session.set('showProduct1Dialog',false); Session.set('editing_product1',null); }, 'click .cancel':function(evt,tmpl){ Session.set('showProduct1Dialog',false); Session.set('editing_product1',null); }, 'click .remove':function(evt,tmpl){ removeProduct1(); Session.set('showProduct1Dialog',false); Session.set('editing_product1',null); } }) Now in my javascript file i have tried all of the following methods and I keep getting undefined or NaN Template.product1Row.helpers ({ wattstotales1 : func…
has title: Adding two items in the same Collection
type: AnsweredQuestion
tagged with: collections
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26831159
tagged with: math
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/26831159
upvote count: 0

http://stackoverflow.com/q/26813315
accepted answer: http://stackoverflow.com/a/26813482
type: Question
tagged with: mongodb
has body: I have an object I've saved to the database like so var newObject = new PObject ({ value : 'before', id :123456 }); newObject.save(function (err) { if (err) console.log ('Error on save!') }); If i just want to change value to 'after', is that possible without adding a new object and deleting the old one?
tagged with: mongoose
tagged with: javascript
has title: Possible to append existing object in DB? (Node + Mongoose)
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26813482
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/q/26715653
tagged with: jwebunit
has answer: http://stackoverflow.com/a/26755180
tagged with: load-testing
type: UnansweredQuestion
has body: I need to check my login screen through JWebunit test class. The page doesnt have any sumbit button. We are using a href tag. When we click the href, then process goes to goPasswordPage method script. this script will call the respective servlet LoginServelet.java. The process details Home.jsp --> LoginServlet.java --> password.jsp home.jsp ... ... Home UserName: Go Password Page LoginServlet.java public class LoginServlet extends HttpServlet { private static final long serialVersionUID = 1L; public LoginServlet() { super(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String userName = request.getParameter("username"); /** * Here we did some back end validation. * Based on the validation, * decided to navigate: go to the password page or same home page */ request.getRequestDispatcher("/password.jsp").forward(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } } password.jsp ... ... Password <% String username = request.getParameter("username"); %> Welcome <%=username%>!!! JWebUnit Test class BasicWebAppTest.java package com.jwebunit.test; import org.junit.Before; import org.junit.Test; import static net.sourceforge.jwebunit.junit.JWebUnit.*; public class BasicWebAppTest { @Before public void setUp() throws Exception { setBaseUrl("http://localhost:7070/BasicWebApp"); } @Test public void testJSFDemoMethod() { beginAt("/home.jsp"); assertTitleEquals("Home"); setTextField("username", "Jack123"); /** * Here i have to write the code for * calling the javascript or href tag action */ assertTitleEquals("Password"); } } Please help me. thanks in advance.
type: Question
has title: How to call javascript method from JWebunit
tagged with: servlets
score: 0
answer count: 1
tagged with: jsp
tagged with: javascript

http://stackoverflow.com/comment/41996746
has text: @Emissary let me try! thanks
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26701331

http://stackoverflow.com/q/26823890
has comment: http://stackoverflow.com/comment/42216939
has title: Php: Form auto-fill using $_SESSION variables with multiple php files
has body: I already searched for an hour to solve the following problem, but I couldnt find an answer for my specific problem. I have some ideas, which I propose after the introduction to the problem. Problem: I have an html form in a php file. You can enter a name (first,mi,last) a phone number and an account number to that form. If a phone number is added, then the onblur function (using javascript file request.js) on the input field of phone number is used to auto fill the other 4 fields using a hash, which keys are the phone numbers and the values are a json-object, which holds all 4 other values. If the entered customer data doesn't exist in the hash, then it should be added by clicking on the submit-button using an ajax-request again. the following shows the file with the input form: index.php: <?php session_start(); // set the hash to session // add the new item to the array/hash // reset the array/hash back to session variable // ?> Name: Phone: Account: the next file is the javascript file, which handles all actions on the form. The getCustomerInformation.php shall include all Session variables, which can be loaded using the ajax calls. file: request.js $(document).ready(function(){ $('#phone').blur(function(){ console.log('on blur was called'); $.ajax({ url: './getCustomerInformation.php?code=0&phone=' + this.value, success: function(response, status, jqXhr) { var info = JSON.parse(response); $('#fname').val(info.fname); $('#mi').val(info.mi); $('#lname').val(info.lname); $('#account').val(info.account); console.log("successful response"); }, error: function(xhr, status, error){ alert("Error!" + xhr.status); } }) }); $('#dataForm').submit(function(){ console.log('form submitted'); var phone = $('#phone').value; var fname = $('#fname').value; var mi = $('#mi').value; var lname = $('#lname').value; var account = $('#account').value; $.ajax({ url: './getCustomerInformation.php?code=1&phone=' + phone +'&fname='+fname+'&mi='+mi + '&lname='+ lname +'&account='+account, su…
has answer: http://stackoverflow.com/a/26845852
tagged with: php
accepted answer: http://stackoverflow.com/a/26845852
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42225816
type: Question
has comment: http://stackoverflow.com/comment/42225601
tagged with: session
answer count: 1
has comment: http://stackoverflow.com/comment/42235424
has comment: http://stackoverflow.com/comment/42238756
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/42235147
score: 0

http://stackoverflow.com/q/26805955
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26806374
has comment: http://stackoverflow.com/comment/42185053
upvote count: 0
has comment: http://stackoverflow.com/comment/42185476
has comment: http://stackoverflow.com/comment/42184957
type: Question
has answer: http://stackoverflow.com/a/26806242
has comment: http://stackoverflow.com/comment/42185066
has comment: http://stackoverflow.com/comment/42185240
score: -1
answer count: 2
has title: Password validation with javascript AND cancel form submission
downvote count: 1
tagged with: javascript
tagged with: jquery
has body: I am trying to use javascript to make sure users that register on my site do not have symbols and have a minimum of 8 characters in their password. I have an onclick function assigned to the input btn and it doesnt seem to be working. Here is the JS Fiddle Link: http://jsfiddle.net/fh8o5vub/ How exactly does the password syntax check work? I dont understand the formatting.. Also, how do I stop php form submission? Return false isnt doing it.. function CheckPassword() { var passw = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,14}$/; if (document.getElementById("password".value.match(passw)) { return true; } else { alert('You can only use standard letters a-z and your psasword must be atleast eight letters!') return false; } } CONTINUE Thanks!
has comment: http://stackoverflow.com/comment/42185034

http://stackoverflow.com/q/26772847
has body: I tried with this function makeid() { var chars = "!~/-^"; var st = "It turns out tho, that if you append a string to the end of the URL that the CDN has never seen before, it will return the most recent version of the file. Bogus to be sure."; var string_length = 8; var randomstring = ''; for (var i=0; i&lt;string_length; i++) { var rnum = Math.floor(Math.random() * chars.length); randomstring += chars.substring(rnum,rnum+1); } return randomstring; } var output = makeid(); console.log(output); The random string is generated with the code above now how will I append the randomly generated string to the random position of the given string. Thanks
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26773275
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42125283
score: 0
tagged with: random
has title: How to append some special character to a string in random position?
has comment: http://stackoverflow.com/comment/42125350
has answer: http://stackoverflow.com/a/26774042
type: UnansweredQuestion

http://stackoverflow.com/comment/42059932
has text: No, the runtime is not a converter that compiles ES6 on the fly. The `class` syntax will give you a syntax error.
type: QuestionComment
comment on: http://stackoverflow.com/q/26736174
score: 0
type: Comment

http://stackoverflow.com/comment/42120492
type: Comment
has text: @myfunkyside: Thanks, but I guess that I wanted to make this as simple to understand.
comment on: http://stackoverflow.com/a/26769866
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42217060
score: 0
type: AnswerComment
has text: Thank you it was the for loop and I didn't realize it.
type: Comment
comment on: http://stackoverflow.com/a/26824014

rest
tags question: http://stackoverflow.com/q/26754411
tags question: http://stackoverflow.com/q/26826820
tags question: http://stackoverflow.com/q/26725196
tags question: http://stackoverflow.com/q/26698282
tags question: http://stackoverflow.com/q/26744979
tags question: http://stackoverflow.com/q/26804581
tags question: http://stackoverflow.com/q/26685241
tags question: http://stackoverflow.com/q/26691908
tags question: http://stackoverflow.com/q/26684614
tags question: http://stackoverflow.com/q/26817369
tags question: http://stackoverflow.com/q/26744429
tags question: http://stackoverflow.com/q/26806416
tags question: http://stackoverflow.com/q/26742729
tags question: http://stackoverflow.com/q/26743643
type: Tag
tags question: http://stackoverflow.com/q/26735645
tags question: http://stackoverflow.com/q/26697338
tag name: rest
tags question: http://stackoverflow.com/q/26710848
tags question: http://stackoverflow.com/q/26742822

http://stackoverflow.com/q/26778507
type: Question
tagged with: javascript
has body: I have this following html &lt;div class="z-content" data-slug="aaa" data-content-url="some url 1"&gt;&lt;/div&gt; &lt;div class="z-content" data-slug="bbb" data-content-url="some url 2"&gt;&lt;/div&gt; Now I have a hash in url and I get that part in this way. var hash = location.href.substr(location.href.indexOf('#')+1); Now I want to match that hash within the data sets I mentioned earlier and pick up the right data-content-url for that hash var zcons = $('.z-content'); var zcon_array = []; $.each(zcons, function (index, item) { zcon_array.push( { value: $(item).data('slug')} ); }); $.each(zcon_array, function(key, object) { if(object.value == hash) { alert($('.z-content').data('content-url')); //But it picks up the first one ie 'some url 1' always } }); So even if the hash is bbb it goes to the first one. Any help/hint is highly welcomed. Thanks in advance.
has answer: http://stackoverflow.com/a/26778624
answer count: 1
downvote count: 0
has title: Get correct data attribute for the matched value using jquery
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26778624
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/comment/69825367
has text: Add some explanation with answer for how this answer help OP in fixing current issue
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/41310957
type: Comment

http://stackoverflow.com/a/26804301
has body: use this meta tag &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
downvote count: 0
has comment: http://stackoverflow.com/comment/42181869
upvote count: 2
answers question: http://stackoverflow.com/q/26804228
type: Answer
score: 2

http://stackoverflow.com/q/26683508
score: 0
possible better answer: http://stackoverflow.com/a/26683590
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41965822
accepted answer: http://stackoverflow.com/a/26683621
has answer: http://stackoverflow.com/a/26683637
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26683590
has body: Im trying to create a ball which generates a different random number in the middle every time the function's called. This is my code for creating a ball object but i have no clue where to put the Math.random method and how to actually draw the number in the middle. Have you got any idea? Below is my JavaScript external file's code: var c = document.getElementById("canvas"); var ctx = c.getContext("2d"); var ball = { radius:50, x:200, y:150, color:"#00F", draw:function() { var arcStartAngle=0; var arcEndAngle=2*Math.PI; ctx.fillStyle=this.color ctx.beginPath(); ctx.arc(this.x,this.y,this.radius,arcStartAngle,arcEndAngle); ctx.fill(); } } ball.draw();
has title: Create a ball with a random number in the middle (html canvas and javascript)
has answer: http://stackoverflow.com/a/26683621
type: Question
tagged with: canvas
tagged with: javascript

http://stackoverflow.com/q/26793578
has body: I'm building a web app that allows users to evolve webaudio synthesizers (https://gensynth.ou.edu/#/evolve). However, on chrome, whenever you click refresh a few times with mutation amount turned all the way up and play around during evolution, the app will crash unpredictably (The tab just shows the 'aw snap' crash screen). When a synthesizer loads it plays through a scriptProcessor and analyser nodes connected to a silent gain node so it can render out the initial spectogram (initially tried using an offline context for this, but that just brakes horribly). Then, when a user clicks to play the instrument it plays through a different set of script/analyser nodes. Each subsequent play, the oscillators and filters get regenerated and connected to this same set of script/analyser nodes. It seems like it crashes whenever older script nodes try to get garbage collected since it happens less often when I try and keep references to the node and not set its onaudioprocess function to null (which really hits the memory hard). Is there a better or more standard way of doing this? I'm not entirely what code to put in this post since the issue only comes up most of the time when everything is pulled together. The main widget that utilizes the script/analyser nodes is here. Works fine in firefox and let me know if there's any other information that would be helpful for me to provide. Edit: Isolating just the visualizer code on this page, you can get the crash (albeit less often) by clicking the new x30 button a few times.
tagged with: web-audio-api
has title: Chrome crash when utilizing multiple ScriptProcessor and Analyser nodes
type: AnsweredQuestion
upvote count: 1
tagged with: google-chrome
accepted answer: http://stackoverflow.com/a/28244781
type: Question
score: 1
tagged with: scriptprocessor
tagged with: crash
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/28244781

http://stackoverflow.com/comment/41987252
score: 2
comment on: http://stackoverflow.com/q/26696225
has text: Your question is not that clear, at least for me. Are you asking how to find the nearest "Monday" in the future to a give date?
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/115365717
type: AnswerComment
has text: please fix a syntax error on the second code , it should be 'HH:mm' instead of HH.mm
type: Comment
score: 1
comment on: http://stackoverflow.com/a/58930337

http://stackoverflow.com/a/26748408
answers question: http://stackoverflow.com/q/26747759
has comment: http://stackoverflow.com/comment/42101220
has body: Use logarithmic depth buffer instead of the linear one. This is a very simple change, just enable logarithmicDepthBuffer when you create your THREE.WebGLRenderer like so: var renderer = new THREE.WebGLRenderer({ antialias: true, logarithmicDepthBuffer: true}); Here's an example you can have a look at: http://threejs.org/examples/#webgl_camera_logarithmicdepthbuffer Using polygonOffset as suggested by LJ_1102 is a possibility, but it shouldn't be necessary.
score: 5
has comment: http://stackoverflow.com/comment/128347876
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42092700
has comment: http://stackoverflow.com/comment/42098284
type: Answer
has comment: http://stackoverflow.com/comment/42407313
has comment: http://stackoverflow.com/comment/42093159
accepted answer of: http://stackoverflow.com/q/26747759
upvote count: 5

http://stackoverflow.com/comment/42117988
type: Comment
comment on: http://stackoverflow.com/a/26723960
has text: Thank you, your solution is working but it seems to be doing the opposite. The images with a height higher than 300px are being effected and only image with a height less than 300px is not being effected.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41988006
type: AnswerComment
has text: Is there a way that I could shorten even more using the javascript map and filter functions? Sorry I should have mentioned this earlier but my friend pointed out that these functions might make it more easy.
comment on: http://stackoverflow.com/a/26693234
score: 0
type: Comment

http://stackoverflow.com/q/26809688
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I have a form inside a page A, with 2 fields, user and password, the action of my form is a page B. I would like to get the form values of the request header using javascript when the page B is loaded. Is this possible? Or something similar? Thanks.
tagged with: request
has answer: http://stackoverflow.com/a/26811647
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26811647
type: Question
tagged with: javascript
has title: Get form values (regular post form submit) using jquery
score: 0

http://stackoverflow.com/comment/42050837
type: QuestionComment
has text: Dont add 100 event listeners. Instead use data attribute . Give all links a data-url attribute then give them the urls . And open them accordingly when clicked
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26731653

http://stackoverflow.com/comment/42111614
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26765381
has text: when using javascript, you need ` ` tags, but there's a lot more wrong with this code than just that.
score: 1

http://stackoverflow.com/comment/42116399
comment on: http://stackoverflow.com/q/26767604
score: 0
type: Comment
type: QuestionComment
has text: @PeterKA already help with that! look his answer, thanks guys!

http://stackoverflow.com/comment/42163430
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26794305
has text: With quite a bit of difficulty, I would imagine. I believe this question amounts to "Do this complicated thing for me. Please." StackOverflow is not that sort of site. Instead, show us what you have tried, what didn't work, etc.
type: Comment

http://stackoverflow.com/a/26824905
upvote count: 1
has body: You can just loop through all subordinate objects with an id attribute starting from any point in the DOM: $("#a").find("[id]").addBack().each(function() { this.id += "1"; }); This starts with the root object of id="a". Finds all subordinates with an id attribute Adds back the root object Then, adds a "1" to the end of each id in that set
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26824889

http://stackoverflow.com/comment/42231072
type: Comment
comment on: http://stackoverflow.com/a/26826968
has text: that is really not a cool attitude. we are honest and serious developers here :/
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42156764
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26790204
has text: are you trying to access the ID from the UI.Router parameter in the URL?

http://stackoverflow.com/comment/42056192
score: 0
type: AnswerComment
has text: @Chris The problem is I need to refresh the clients websites to connect to the hub. THIS IS THE SCENARIO: If a go to a clients website and the hub is offline, then ofcourse I'm not getting connected. While still on the clients website, adn then start the supportSite(hub starts). Then I want to show a msg on the clients website that hub is online. Without the need of refreshing the page!
type: Comment
comment on: http://stackoverflow.com/a/26734449

http://stackoverflow.com/comment/83572438
has text: Possible duplicate of [Identify if point is in the polygon](https://stackoverflow.com/questions/26014312/identify-if-point-is-in-the-polygon)
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26710874

http://stackoverflow.com/comment/41960679
score: 0
type: Comment
has text: Yes i do , I need it to subtract from the total price
comment on: http://stackoverflow.com/a/26680913
type: AnswerComment

http://stackoverflow.com/a/26726664
type: Answer
answers question: http://stackoverflow.com/q/26674684
score: 1
upvote count: 1
has body: This could be because the Microsoft Office plugin is disabled in your web browser for some reason. To enable the plugin: In case of Google Chrome plugins could be found here: chrome://plugins: In case of FireFox they are in Options Menu -> Addons -> Plugins tab: In case of IE they are under Tools Menu -> Manage Add-ons. Make sure you select 'All add-ons' in Show dropdown:
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26674684

http://stackoverflow.com/comment/42064567
comment on: http://stackoverflow.com/q/26739305
score: 1
has text: Not really - you'd need to do a call to an authoritative server that you trust to have the right time
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42152486
score: 0
type: QuestionComment
has text: yeah, my bad. @Stuart. Quotes is always defined because is on another file. I found that classes was returning null because it was not a number and now I converted it to a number with Number().
type: Comment
comment on: http://stackoverflow.com/q/26787634

http://stackoverflow.com/comment/42149629
has text: @SterlingArcher For example, think of objects as a generalised tree in this case. Why enforce a structural schema? Case in point, the trie data structure. http://en.wikipedia.org/wiki/Trie
type: QuestionComment
comment on: http://stackoverflow.com/q/26786325
score: 0
type: Comment

database
tags question: http://stackoverflow.com/q/26734509
type: Tag
tags question: http://stackoverflow.com/q/26690645
tags question: http://stackoverflow.com/q/26810103
tag name: database
tags question: http://stackoverflow.com/q/26707327
tags question: http://stackoverflow.com/q/26692738
tags question: http://stackoverflow.com/q/26683442
tags question: http://stackoverflow.com/q/26811812
tags question: http://stackoverflow.com/q/26765488

http://stackoverflow.com/a/26713892
has body: Use jQuery noConflict mode to create a unique jQuery reference and use it instead of $ sign. Something like this: var j$ = jQuery.noConflict(); As far as Bootstrap is concerned, you don't have to worry about it. Bootstrap jQuery plugins are properly wrapped into IIFE like +function($) { ... }(jQuery) so there will be no issue because jQuery is still left unchanged.
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26713773
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26713773

http://stackoverflow.com/comment/42027837
score: 0
comment on: http://stackoverflow.com/q/26717400
type: Comment
type: QuestionComment
has text: Wed Dec 31 1969 23:00:00 GMT+0000 (BST)

http://stackoverflow.com/a/26815929
type: Answer
has body: Promise.some() expects an array of promises as its first argument. You are passing the results of data.map() to it, but your callback to data.map() never returns anything so therefore .map() doesn't construct an array of promises and therefore Promise.some() has nothing to wait on so it calls it's .then() handler immediately. Also, if you're going to wait for all the promises, then you might as well use Promise.all() instead. This is what I think you want. Changes: Switch to Promise.all() since you want to wait for all the promises. Return the new Promise so .map() will create the array of promises. Moved the output check into the original promise so it can reject rather than throw and it just seems like that moves all the result checking into one place. Added all missing semi-colons. Changed cry and yell to resolve and reject so code would be more familiar to outsiders expecting normal promise names. Here's the code: var Promise = require('bluebird'); var exec = require('child_process').exec; // Array with input/output pairs var data = [ ['input1', 'output1'], ['input2', 'output2'] ]; var PROGRAM = 'cat'; Promise.all(data.map(function(v) { var input = v[0]; var output = v[1]; return new Promise(function(resolve, reject) { exec('echo "' + input + '" | ' + PROGRAM, function(err, stdout) { if(err) { reject(err); } else if (stdout !== output) { reject(new Error('Output did not match!')); } else { resolve(stdout); } }); }); })).then(function() { // Send succes to user if all input-output pair matched }).catch(function() { // Send failure to the user if any one pair failed to match });
answers question: http://stackoverflow.com/q/26814680
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26814680
score: 3
upvote count: 3
type: AcceptedAnswer

http://stackoverflow.com/comment/42126798
has text: have you tried running the page in your browser directly yoururl/Check_events.php?y=2014-11-6
type: Comment
comment on: http://stackoverflow.com/a/26773498
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42194936
has text: Specifically, even after the function is written, how would it interact with the form?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26811026
type: QuestionComment

http://stackoverflow.com/q/26755686
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/26755754
has answer: http://stackoverflow.com/a/26756723
accepted answer: http://stackoverflow.com/a/26756723
type: Question
tagged with: javascript
tagged with: jquery
has title: How to get the second data of this JSON in jQuery?
score: 0
answer count: 3
has body: How can I get the second data of this JSON - I am beta. in jQuery? {"alpha":["I am alpha"],"beta":["I am beta."]}
has answer: http://stackoverflow.com/a/26755754
has answer: http://stackoverflow.com/a/26755760
type: AnsweredQuestion

http://stackoverflow.com/a/26699615
type: AcceptedAnswer
downvote count: 0
has body: Simply add white-space: nowrap; to #list Since your .img images are correctly set to inline-block you can now control the parent element's whitespace with https://developer.mozilla.org/en-US/docs/Web/CSS/white-space (which applies to the inner inline, inline-block children.) nowrap Collapses whitespace as for normal, but suppresses line breaks (text wrapping) within text.
type: Answer
upvote count: 5
accepted answer of: http://stackoverflow.com/q/26699589
score: 5
answers question: http://stackoverflow.com/q/26699589
has comment: http://stackoverflow.com/comment/42014178

http://stackoverflow.com/comment/42229427
has text: Are you running this from a web server, or just loading a local HTML file? If it's local, you'll need to prefix the JS URLs with `http://`, not just `//`.
comment on: http://stackoverflow.com/q/26831324
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/26787634
has comment: http://stackoverflow.com/comment/42151908
accepted answer: http://stackoverflow.com/a/26788547
has comment: http://stackoverflow.com/comment/42151751
has comment: http://stackoverflow.com/comment/42152039
score: 0
has comment: http://stackoverflow.com/comment/42152143
answer count: 1
has comment: http://stackoverflow.com/comment/42152370
has comment: http://stackoverflow.com/comment/42151673
has comment: http://stackoverflow.com/comment/42151710
has comment: http://stackoverflow.com/comment/42151736
has comment: http://stackoverflow.com/comment/42151870
has comment: http://stackoverflow.com/comment/42151746
has comment: http://stackoverflow.com/comment/42151650
has comment: http://stackoverflow.com/comment/42152068
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26788547
type: Question
has comment: http://stackoverflow.com/comment/42152486
has title: Issues with arrays that says undefined
has comment: http://stackoverflow.com/comment/42153098
has comment: http://stackoverflow.com/comment/42151672
has body: I have a little project with some quotes and I want to output them on a div and the console keeps throwing me "cannot read property "null" of undefined" and I don't know why or where is the error. My current code is this: var daHash = location.hash.substring(1), wrapper = document.getElementById("wrapper"), favs = localStorage.getItem("quoteLoved"), favA = favs.split(","), modal = document.getElementById("modal"), overlay = document.getElementById("overlay"); modal.style.display = "block"; overlay.style.display = "block"; for (var i = 0; i < (favA.length - 1); i++) { var favQ = favA[i]; modal.innerHTML = modal.innerHTML + " " + "arroz" + "" + " queso" + "" + " " + " "; }; for (var i = 0; i < (favA.length - 1); i++) { var classes = Number(modal.getElementsByClassName("id")[i].classList.item(2)); modal.getElementsByClassName("id")[i].innerHTML = quotes[classes]; }; location.hash = ""; The problem that Chrome throws is on modal.getElementsByClassName("id")[i].innerHTML = quotes[classes]; quotes[classes] is an array with various texts inside. EDIT: The quotes array is something like this: var quotes = [ "Some text blah", "Some text blah blah", "Some text blah blah and blah blah, you know.." ]; When I do all this on console no error is thrown and I don't know why it throws when it executes the script.
has comment: http://stackoverflow.com/comment/42151822
has comment: http://stackoverflow.com/comment/42153494
tagged with: javascript
has comment: http://stackoverflow.com/comment/42151824

http://stackoverflow.com/comment/42104095
has text: does this help http://stackoverflow.com/a/6525602/20126 ?
comment on: http://stackoverflow.com/q/26761291
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/123757466
comment on: http://stackoverflow.com/a/40929309
type: AnswerComment
score: 0
has text: This only works if base64encoded is a string. If it's already a buffer you get the same encoded value out as what went in. Only thing I've found is to dump the already-encoded buffer to a base64, read it back into the Buffer.from(), and dump it back out as, finally, the plaintext string.
type: Comment

http://stackoverflow.com/a/26758269
type: Answer
answers question: http://stackoverflow.com/q/26744878
upvote count: 2
score: 2
downvote count: 0
has body: Although @MC ND is right with their answer it lacks a bit of detail as to why this is the case. Server-Side / Client-Side Classic ASP is a server side processing technology, in basic terms what you write to the client (Internet Browser or other client that consumes HTML over HTTP) using &lt;% Response.Write() %&gt; or it's shorthand equivalent &lt;%= %&gt; is being sent exactly as it was typed. Take the example of your question, the server side variable b = "someId=1&amp;another=29" If you used &lt;%= b %&gt; or &lt;% Response.Write b %&gt; the output would be the same someId=1&another=29 This is because the Classic ASP sends the result of the literal string someId=1&amp;another=29. The quotes (") that make up a string in VBScript are nothing to do with the outputted result. Debugging the Problem Usually a good way of checking this is using View Page Source or equivalent function on your client, to view the raw output sent by the Web server. If you had you would have seen something like this; &lt;script language='javascript'&gt; var urlParamsJS = someId=1&amp;another=29 alert(urlParamsJS); var params = 'dependent=yes,directories=no,hotkeys=no,menubar=no,personalbar=no,scrollbars=yes,status=no,titlebar=yes,toolbar=no'; var fullurl = 'page.asp?p=' + urlParamsJS var wcontainer2 = open ( fullurl, 'otherThings', params); wcontainer2.resizeTo (900,470); wcontainer2.moveTo (100,220); &lt;/script&gt; In JavaScript this assignment (var urlParamsJS = someId=1&amp;another=29) is incorrect and will trigger an exception (depending on your client settings this may not be obvious) and your client-side code will not run as intended. Tell the Client-Side Your Dealing with a String The easiest way to accomplish this is by forcing it in your client-side code. &lt;script language='javascript'&gt; // Surrounding with "" or '' tells the client this is a string. var urlParamsJS = '&lt;%= b %&gt;'; alert(urlParamsJS); var params = 'dependent=yes,directories=no,hotkeys=no,menubar=no,persona…

http://stackoverflow.com/comment/41997021
comment on: http://stackoverflow.com/q/26699628
type: Comment
type: QuestionComment
has text: Also, elements without are proper closing tag, are called self-closing, they need a slash at the end to close themselves: ` `. (The space before the closing tag is no accident, that is the proper way.)
score: 0

http://stackoverflow.com/comment/41962880
score: 0
has text: So in fact you want to detect scrolling way, up or down???
type: Comment
comment on: http://stackoverflow.com/q/26681881
type: QuestionComment

http://stackoverflow.com/comment/42191363
type: Comment
comment on: http://stackoverflow.com/q/26807313
score: 0
type: QuestionComment
has text: In reality, I'm persisting the value in the sessionStorage object when an item in a list is tapped. I use it later when the user comes back to the list as I set the scrollPostion to that value. That way the users can start from where they left off. This seems to be working fine on the app itself. I did set a spy on it and it is working correctly (updated the example code as well). You may be right that I’m overdoing it, but I’m still curious to know why this test fails.

http://stackoverflow.com/a/26683613
has comment: http://stackoverflow.com/comment/41966352
has comment: http://stackoverflow.com/comment/41966291
has comment: http://stackoverflow.com/comment/41966323
score: 0
has comment: http://stackoverflow.com/comment/41965814
has body: Your button is a submit button, so if you don't cancel the default event, the form will be submitted the regular way as well. You need to capture the event and cancel it: $("#firstConfirmButton").click(function(e) { var content = $('#orderList').html(); e.preventDefault(); // the rest of your code Or in modern versions of jQuery: $("#firstConfirmButton").on('click', function(e) { var content = $('#orderList').html(); e.preventDefault(); // the rest of your code
answers question: http://stackoverflow.com/q/26683460
has comment: http://stackoverflow.com/comment/41966050
has comment: http://stackoverflow.com/comment/41975982
type: Answer
accepted answer of: http://stackoverflow.com/q/26683460
has comment: http://stackoverflow.com/comment/41965872
has comment: http://stackoverflow.com/comment/41966022
has comment: http://stackoverflow.com/comment/41966114
has comment: http://stackoverflow.com/comment/41966080
type: AcceptedAnswer

http://stackoverflow.com/comment/55335974
comment on: http://stackoverflow.com/a/26751859
score: 0
has text: I would hate for this to sound like a "me too" thank you however this actually solved a **completely different problem** I'm having with play's SBT submodule setup versus static assets. I now no longer have to solve *that* problem as this is all I need to work-around the challenge. So thank you :)
type: Comment
type: AnswerComment

http://stackoverflow.com/a/26755552
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42094397
has comment: http://stackoverflow.com/comment/42094934
answers question: http://stackoverflow.com/q/26755291
has comment: http://stackoverflow.com/comment/42093553
has comment: http://stackoverflow.com/comment/42093606
downvote count: 0
has body: Check this : http://jsfiddle.net/9cdoz896/2/ JS $('.myCheckbox').on('click',function(){ if ($('.myCheckbox').is(':checked')) { $("div#text_div").show(); $("div#text_div").children().prop('disabled', false); $("div#select_div").hide(); $("div#select_div").children().prop('disabled', true); } else { $("div#select_div").show(); $("div#select_div").children().prop('disabled', false); $("div#text_div").hide(); $("div#text_div").children().prop('disabled', true); } }); CSS #text_div{ display:none; } HTML Text Input? Employee ID: Employee ID: --Select-- INCB001 INCB002 INCB003
type: Answer
has comment: http://stackoverflow.com/comment/42094582

http://stackoverflow.com/comment/42183760
score: 0
has text: @T.J.Crowder thank you so much. I did declare a Box object without the arguments. Working fine now.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26805176

http://stackoverflow.com/comment/42007000
type: AnswerComment
comment on: http://stackoverflow.com/a/26707102
has text: Hmmm yea i worded that very poorly. I am wondering if I can constantly access the top level self even from within a closured function. Ive realized from testing on jsfiddle that i can without needing to pass self.
type: Comment
score: 0

http://stackoverflow.com/a/26747342
answers question: http://stackoverflow.com/q/26747171
upvote count: 7
type: AcceptedAnswer
has body: You can't edit the authentication login box itself, it's different for every browser and its implemented as part of the browser's internals (for example, a snippet of Chrome's Code dealing with the Login Title: https://code.google.com/p/chromium/codesearch#chromium/src/chrome/app/generated_resources.grd&q=%22Authentication%20Required%22&sq=package:chromium&type=cs&l=3552). What you can do is to create a custom php login page (with popover if you want) to display: Redirect 401 "authorization required page" to custom page Custom Login with htaccess through HTML/PHP Replace Htaccess popup box with a html form?
type: Answer
downvote count: 0
score: 7
has comment: http://stackoverflow.com/comment/42080354
accepted answer of: http://stackoverflow.com/q/26747171

http://stackoverflow.com/a/27512306
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26785268
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/50764177
has body: I ended up using 'grunt-contrib-connect' and 'grunt-connect-proxy' with 'webpack-dev-middleware'. So, I can have proxy middleware to handle all my data requests and webpack middleware to handle static bundle file requests. var proxySnippet = require('grunt-connect-proxy/lib/utils').proxyRequest; var mountFolder = function (connect, dir) { return connect.static(require('path').resolve(dir)); }; var prepareDevWebpackMiddleware = function() { webpackConfig.devtool = "eval-source-map"; var compiler = webpack(require("./webpack.config.js")); return webpackDevMiddleware(compiler, { publicPath : "/assets" }); }; ---- GRUNT TASK ---- connect: { options: { port: 8080, hostname: 'localhost', livereload : true }, proxies: [{ context: '/api', host: 'localhost', port: 8000 }], livereload: { options: { middleware: function (connect) { return [ prepareDevWebpackMiddleware(), proxySnippet, mountFolder(connect, 'src') ]; } } } }

http://stackoverflow.com/comment/41984993
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26694815
has text: I would suggest creating the things happening in the inner for loop as a separate function you can pass the variables to. You could accomplish the same using closure but it's not recommended to create functions in loops. here's some info about it http://tobyho.com/2011/11/02/callbacks-in-loops/

http://stackoverflow.com/a/26757206
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26756461
answers question: http://stackoverflow.com/q/26756461
has body: yes you can achive it by using ajax cascading drop -down by using it you can achive the binding without any postback firing up follow up this link http://www.ajaxcontroltoolkit.com/CascadingDropDown/CascadingDropDown.aspx
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/26796312
favorite count: 0
has comment: http://stackoverflow.com/comment/42295081
has body: I'm a big fan of Exception Driven Development. Because the big amount of client-side JavaScript in modern day applications, this means we also collect JavaScript exceptions by sending them to the server. But as far as I can think of this excludes the use of a minifier? It destroys all the useful information by showing errors like: k is undefined, line 2 column 23489 in function l() Are there any workarounds for that? More info Maybe one option would be to create a metadata file at the moment you're minimizing. When this meta data lives on the server, it can remap the minimized error to the original variables and linenumbers with the metadata. Sounds like a lot of work though.
type: Question
tagged with: exception
has comment: http://stackoverflow.com/comment/42167146
has comment: http://stackoverflow.com/comment/42166889
upvote count: 7
has comment: http://stackoverflow.com/comment/42167208
answer count: 1
has answer: http://stackoverflow.com/a/26868136
has title: How to collect useful JavaScript exceptions when using a minifier?
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26868136
type: AnsweredQuestion
tagged with: minify
score: 7

http://stackoverflow.com/q/26784268
has title: JavaScript runtime error: Object doesn't support property or method 'on'
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26784971
has comment: http://stackoverflow.com/comment/42146382
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/42145434
tagged with: jcrop
type: AnsweredQuestion
downvote count: 0
type: Question
score: 3
has comment: http://stackoverflow.com/comment/42145678
has comment: http://stackoverflow.com/comment/42145817
tagged with: jquery-ui
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26784971
has body: I am getting error message "Object doesn't support property or method 'on'". I think it is to do with this in my script. $('#<%=filBrowse.ClientID%>').on('change', function () { $('#<%=btnSaveImage.ClientID%>').click(); }); Page script <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanelCanvass" runat="server" UpdateMode="conditional"> <asp:Panel ID="panelCanvass" Visible="false" runat="server"> Crop Image <asp:ImageButton ID="btnClose" CausesValidation="false" ImageUrl="~/images/icons/red-cross.png" runat="server" /> <asp:Image ID="imgCanvass" runat="server" Width="300" Height="300" /> <asp:Button ID="btnCrop" runat="server" Text="Done Cropping" CausesValidation="false" /> </asp:Panel> <asp:Button ID="btnSaveImage" runat="server" Text="Browse" CausesValidation="false" /> <asp:FileUpload ID="filBrowse" runat="server" Width="80" class="upload" /> <asp:Button ID="btnRemove" runat="server" Text="Remove" ToolTip="Remove image" CausesValidation="false" OnClientClick="javascript: return confirm('Are you sure you want to remove this image?');" /> <asp:HiddenField ID="hfX" runat="server" /> <asp:HiddenField ID="hfY" runat="server" /> <asp:HiddenField ID="hfHeight" runat="server" /> <asp:HiddenField ID="hfWidth" runat="server" /> <asp:PostBackTrigger ControlID="btnSaveImage" /> <asp:PostBackTrigger ControlID="btnCrop" /> <asp:PostBackTrigger ControlID="btnClose" /> <asp:PostBackTrigger ControlID="btnRemove" /> </asp:UpdatePanel> Script Sent to Browser $('#photoUploadCoor_filBrowse').on('change', function () { $('#photoUploadCoor_btnSaveImage').click(); });
upvote count: 3
has comment: http://stackoverflow.com/comment/42145807

http://stackoverflow.com/comment/42117334
comment on: http://stackoverflow.com/a/26767814
type: AnswerComment
score: 0
has text: Thanks, works great! I really wish there was a way to pass a rails variable directly though.
type: Comment

http://stackoverflow.com/q/26691487
has title: The javascript code I'm using is not working
favorite count: 0
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/26691542
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26691575
tagged with: javascript
tagged with: jquery
score: -1
has body: I have the following code fragment that is asking to fade out in 2 seconds: Question 2 Make the word "Disappear" disappear after two seconds. Disappear Question 3 Make the word "Fade" fade after two seconds. Fade I used this to fade out the targeted words: $("#question-2.target").fadeOut(2000); $("#question-3.target").fadeOut(2000); This is not working. Please help!!
answer count: 2

http://stackoverflow.com/comment/42003081
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26704950
has text: Maybe I didn't explain the question clear enough: I'm wondering why myMethod is both a key in the object definition, as well as a named function through function definition. Is there an advantage to this?

http://stackoverflow.com/q/26763628
favorite count: 0
has comment: http://stackoverflow.com/comment/42151946
type: UnansweredQuestion
tagged with: jsdoc
has comment: http://stackoverflow.com/comment/63937258
has comment: http://stackoverflow.com/comment/79232492
score: 3
downvote count: 0
has title: How to correctly document require module.exports so that documentation isn't lost?
has comment: http://stackoverflow.com/comment/42142624
has comment: http://stackoverflow.com/comment/42111739
has comment: http://stackoverflow.com/comment/42151572
has comment: http://stackoverflow.com/comment/63930501
has comment: http://stackoverflow.com/comment/42189830
type: Question
has body: I've tried to correctly follow JSDoc guidelines for all of my code and it looks like I've properly documented my constructors so that editors are able to recognize arguments: But for some reason, when I export the classes as so that they can be required elsewhere, they are no longer recognized anywhere for what they are: Am I missing something in the way I should be exporting the class or documenting the export that's confusing editors when a user requires my library? The require statement itself is working, and editors have no trouble navigating to the source file referenced in the require statement ('./YLTProfile'), but the definition information is completely lost for some reason. Here's another example, illustrating how it can see the class definition and I can ctrl+click to navigate to it (definition seen on the right), but it's highlighted white and offers no context or constructor parameter information about the class.
has comment: http://stackoverflow.com/comment/63936567
answer count: 1
tagged with: javascript
tagged with: webstorm
has comment: http://stackoverflow.com/comment/42111583
upvote count: 3
tagged with: require
has answer: http://stackoverflow.com/a/27187642
tagged with: browserify
has comment: http://stackoverflow.com/comment/42185153

http://stackoverflow.com/q/26673918
has answer: http://stackoverflow.com/a/27017980
score: 0
has comment: http://stackoverflow.com/comment/41947551
answer count: 2
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27017980
type: AnsweredQuestion
has title: tablesorter does not sort currency as I want
tagged with: tablesorter
type: Question
has body: I am currently using the tablesorter jquery plugin created by Christian Bach. It works great, however I have one little problem. In my table I have a column with that contains a currency as data. This currency is in euro. The problem is that the plugin sorts my values wrong. For example tabelsort sorts de values in this order €33,00 €2,00 €1.000,99 while it should be €1.000,99 €33,00 €2,00 So the comma and dot should be ordered differently. Does someone know how I can fix this? https://github.com/christianbach/tablesorter
possible better answer: http://stackoverflow.com/a/26674042
has comment: http://stackoverflow.com/comment/41947643
tagged with: javascript
has answer: http://stackoverflow.com/a/26674042

http://stackoverflow.com/comment/41956935
comment on: http://stackoverflow.com/q/26678572
type: Comment
type: QuestionComment
has text: @LShetty: They already mentioned the horrors of `async: false`. Do not recommend that as a fix :)
score: 0

http://stackoverflow.com/q/26790952
upvote count: 0
answer count: 1
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42157908
has comment: http://stackoverflow.com/comment/42157757
has body: I have input from the user for the following family members Mothersname, Fathersname, Childsname, Sibling1name, Sibling2name Some of these can be skipped and will be blank. What I want to do is concatenate the non blank entries with a comma but the last one concatenated with the word "and" e.g. Mary, Bob, Peter and Ellie What would be the easiest way to achieve this?
has answer: http://stackoverflow.com/a/26792939
type: AnsweredQuestion
downvote count: 2
type: Question
accepted answer: http://stackoverflow.com/a/26792939
score: -2
has title: Best way to concatenate multiple strings ignoring blank
tagged with: javascript

http://stackoverflow.com/q/26810825
has title: basic function in javascript not working
answer count: 3
upvote count: 0
has answer: http://stackoverflow.com/a/26810897
favorite count: 0
has answer: http://stackoverflow.com/a/26810843
tagged with: jscript
has body: Hi this is my very first time here and I'm struggling since I'm first timer learning to code. I presume when I try to pass the arguments to the parameters, it gets confused, or maybe I'm missing something very simple. Where am I missing or failing here? I just doesn't work... function adultCheck(age,name) { if (age &lt;= 17) { alert("Sorry " + name ", you are not allowed to see this, you are too young."); } else { alert("Welcome " + name ", you are " + age " visit our lounge!"); } } adultCheck(15,Tami);
has comment: http://stackoverflow.com/comment/42194319
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26810897
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42194266
has answer: http://stackoverflow.com/a/26810955
tagged with: function
tagged with: javascript
score: -1
possible better answer: http://stackoverflow.com/a/26810955

http://stackoverflow.com/a/26695931
has body: this won't refere to your element, you should keep a reference to it: // loop through your elements $("[id^='renable']").each(function () { // keep reference to it var $elem = $(this); // make it editInplace $elem.editInPlace({ url: 'save.php', params: 'pos='+$elem.attr('role') }); });
answers question: http://stackoverflow.com/q/26695902
score: 0
type: Answer

http://stackoverflow.com/comment/42058385
comment on: http://stackoverflow.com/q/26733356
type: Comment
has text: @YusufAliBozkır So you already solve this problem~? If not, I suggest post your code to plunker or jsfiddle.(include the angular library)
score: 0
type: QuestionComment

google-app-engine
tag name: google-app-engine
tags question: http://stackoverflow.com/q/26810838
type: Tag
tags question: http://stackoverflow.com/q/26776939
tags question: http://stackoverflow.com/q/26776576

http://stackoverflow.com/comment/46771315
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26828123
has text: I know this is old, but I'll write it anyway as a reference. Angular features `angular.bind`, which does the same thing ad ES5, but works also on older browsers.
score: 1

http://stackoverflow.com/a/27864033
type: Answer
answers question: http://stackoverflow.com/q/26830583
score: 0
has body: io.nsps[yourNamespace].adapter.rooms[roomName] // default namespace is '/' returns the object of clients with a boolean value or undefined if there is no clients. In the most of the cases you can get the length of this object with Object.keys(io.nsps[yourNamespace].adapter.rooms[roomName]).length but it only will work if there is at least one client connected, due to the undefined returned. If you're not using any specific namespace, you can use io.sockets.adapter.rooms[roomName] instead. By default, when a client disconnects, it leaves the room, then this way has worked for me.

http://stackoverflow.com/comment/42182571
has text: Ok it was a bad example, but sometimes I realy don't need to wait for a server response before sending data.
type: QuestionComment
comment on: http://stackoverflow.com/q/26804581
score: 0
type: Comment

http://stackoverflow.com/a/26694761
answers question: http://stackoverflow.com/q/26694467
type: Answer
has comment: http://stackoverflow.com/comment/41984925
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41984762
has body: I think you can't do it on promise level - a promise isn't an operation, but is just a value that's going to arrive in the future, so you can't define a function typed Promise -&gt; Promise that will achieve it. You'd need to go one level down and define a function typed Operation -&gt; Promise where Operation is itself typed () -&gt; Promise. I assume the operation doesn't take any parameters - you can partially-apply them beforehand. Here's a recursive approach that doubles the timeout on every run: function RepeatUntilSuccess(operation, timeout) { var deferred = Q.defer(); operation().then(function success(value) { deferred.resolve(value); }, function error(reason) { Q.delay(timeout .then(function() { return RepeatUntilSuccess(operation, timeout*2); }).done(function(value) { deferred.resolve(value); }); }); return deferred.promise; } Demo: http://jsfiddle.net/0dmzt53p/
upvote count: 2
has comment: http://stackoverflow.com/comment/41984891

http://stackoverflow.com/q/26735616
has comment: http://stackoverflow.com/comment/42057649
upvote count: 4
has comment: http://stackoverflow.com/comment/42057701
accepted answer: http://stackoverflow.com/a/26971321
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42057613
has body: I'm trying to run an AngularJS Application in an iFrame in IE8. I get a blank page. Observed Behavior: 1. Works fine in normal browser window of IE8. 2. Works fine in iFrame of Chrome and FireFox. 3. Works fine if I right click and refresh the iFrame. 4. HTML is fully loaded (Checked in view source). The AngularJS controller is not triggered. None of the alerts and console.logs are displayed. 5. No JS errors are thrown How do I enable trigger of AngularJS controller, can I manually trigger it on window.onload ? Any insights and suggestions would help. Unfortunately I have to run the application inside an iframe in IE8 ? Upgrading the browser or choosing different browser is not an option. Thanks! SKR
type: AnsweredQuestion
tagged with: iframe
has answer: http://stackoverflow.com/a/26971321
type: Question
linked to: http://stackoverflow.com/q/6985507
tagged with: internet-explorer-8
has title: Blank page on running AngularJS Application in iFrame in IE8
tagged with: javascript
score: 4

http://stackoverflow.com/q/26744790
has answer: http://stackoverflow.com/a/26745497
accepted answer: http://stackoverflow.com/a/26745497
has comment: http://stackoverflow.com/comment/42075150
has body: I have a large array containing various data, and a function that performs some basic but somewhat time-consuming analysis on the array. I use a forEach loop to iterate over the array. I want the function to return a specific element if a condition is met, otherwise false, using Promises since the function could take a considerable amount of time to complete: var analyzeData = function (arr) { return new Promise(function (resolve, reject) { var answer = false; arr.forEach(function (elm) { if (elm.foo == true) { answer = elm; } }); resolve(answer); }); } The issue I'm encountering is that I suspect that answer is being resolved before the forEach loop completes; i.e. before the forEach loop can finish checking every element's foo property, the function resolves to answer, which is by default false. Is there a way to ensure that the code following the forEach loop waits for the loop to finish iterating, or loop through the array in some other manner?
type: Question
tagged with: arrays
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42075148
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42075069
tagged with: promise
upvote count: 2
has title: Does following code wait for forEach to finish
has comment: http://stackoverflow.com/comment/42075127
tagged with: node.js
tagged with: foreach
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/42199036
comment on: http://stackoverflow.com/a/26813563
has text: Yes you are right, the closure is needed here, I've also updated my answer to keep it correct, and also **`+1`** :)
type: AnswerComment
type: Comment
score: 2

http://stackoverflow.com/a/26791809
has body: There is a relevant URL parameter chddi that controls the used interval: https://www.google.com/finance?chdnp=1&amp;chdd=1&amp;chds=1&amp;chdv=1&amp;chvs=Linear&amp;chdeh=0&amp;chfdeh=0&amp;chdet=1415318689290&amp;chddm=5210&amp;chddi=1800&amp;chls=CandleStick&amp;q=EPA:RNO&amp;ntsp=0&amp;ei=hgxcVIDZDIuMqQHDmYDoCg How I've got this URL? I've just set the desired chart settings and clicked "Link to this view" button that generated the URL. You can though utilize selenium and control the chart settings, example: from selenium import webdriver from selenium.webdriver.support.select import Select url = 'http://www.google.com/finance?q=EPA:RNO' driver = webdriver.Firefox() driver.get(url) settings = driver.find_element_by_class_name('settings-link') settings.click() candlestick = driver.find_element_by_xpath('//input[@value="CandleStick"]') candlestick.click() select = Select(driver.find_element_by_name('defaultInterval')) select.select_by_value('1800')
answers question: http://stackoverflow.com/q/26791615
type: Answer
score: 0

http://stackoverflow.com/a/26814301
has comment: http://stackoverflow.com/comment/42200125
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42200519
has comment: http://stackoverflow.com/comment/42200803
has comment: http://stackoverflow.com/comment/42200461
has comment: http://stackoverflow.com/comment/42200633
type: Answer
has comment: http://stackoverflow.com/comment/42200653
has comment: http://stackoverflow.com/comment/42201142
answers question: http://stackoverflow.com/q/26814282
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42200266
accepted answer of: http://stackoverflow.com/q/26814282
has body: I think there is no method like addDays() - you need to use setDate(): datefrom.setDate(now3.getDate() - 4); Use dd/MM/yyyy dateto.format("dd/MM/yyyy"); Just Change Your Loop like this while (datefrom &lt;= dateto) { dates.push(new Date(datefrom)); datefrom = new Date(datefrom.setDate(datefrom.getDate() + 1)); } JSFIDDLE REFER DOCS DATE documentation

http://stackoverflow.com/a/26717613
answers question: http://stackoverflow.com/q/26717408
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/26717408
type: Answer
has body: HTML5, JavaScript and CSS3 don't define any manifest. The manifest is usually a XML file. If you use PhoneGap, for example, you have to make a manifest, but there is not part of the HTML5 technology

http://stackoverflow.com/q/26806941
has body: in Python, if you use set() and in operator, you can see whether an exists in a set in O(1). However, in javascript, is it possible to do the same with the same time complexity? I have usually done var arr = [1,2,3,4,5]; if (arr.indexOf(3) != -1) return true; // element exists! without being really sure about its efficiency.
tagged with: javascript
has comment: http://stackoverflow.com/comment/42186844
score: 0
has comment: http://stackoverflow.com/comment/42186960
has title: Finding if element exists in array
linked to: http://stackoverflow.com/q/19287033
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/19287033
answer count: 0
has comment: http://stackoverflow.com/comment/42186898
has comment: http://stackoverflow.com/comment/42186899
has comment: http://stackoverflow.com/comment/42189223
type: Question

http://stackoverflow.com/a/26763723
type: AcceptedAnswer
type: Answer
has body: How i handled this was simply added a tag with a class name below the images and then position them with CSS. HTML: Place Hold It Image CSS: /*Caption Text*/ .flex-caption { bottom:50px; color: white; font-size: 16px; line-height: 20px; left:0; padding:0 20px; position:absolute; right:0; text-transform: uppercase; z-index:1; } My flexslider had a black gradient at the bottom so I make my text white so you could read it properly. Hope that helps.
answers question: http://stackoverflow.com/q/26763285
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26763285
downvote count: 0
score: 4

http://stackoverflow.com/comment/41965738
has text: @lordterrin, Why do you want to "refresh" getuser.php? Is this another tab the user is looking at, or is this something only being called in the backend? Either way, you can't "refresh" it this way. If its only being used in the backend by ajax, you don't need to "refresh" it, just to "call" it with ajax, as shown above.
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26683263

http://stackoverflow.com/q/26735645
has title: Error While Deploying AngularJS Project which communicates with a Spring RESTful web service returning JSON data
has answer: http://stackoverflow.com/a/26735980
tagged with: java
type: Question
tagged with: javascript
tagged with: eclipse
score: 0
answer count: 1
tagged with: rest
tagged with: angularjs
type: UnansweredQuestion
has body: I am Creating AngularJS Project in Eclipse with The Following Project Structure : The index.html is as follows : Question & Answer The app.js is as follows : var urlBase="http://LocalHost:8080/FetchQuestions/"; var ToDoApp = angular.module("ToDoApp", ['ngRoute','ngResource']). config(function($routeProvider) { $routeProvider. when('/service/question/', { controller: 'ListQuestionCtrl', templateUrl: urlBase+'ListQuestions.html' }).when('/service/question/:tag1,:tag2,:tag3', { controller: 'ListQuestionByTagsCtrl', templateUrl: urlBase+'ListQuestions.html' }).when('/service/question/insert/:user_id/:qtn_id/:answer', { controller: 'InsertQuestionAnswerCtrl', templateUrl: urlBase+'InsertAnswer.html' }).otherwise({ redirectTo: '/' }); }); ToDoApp.controller("ListQuestionCtrl", function ($scope, $http) { $http.get('http://LocalHost:8080/FetchQuestions/service/question/'). success(function (data) { $scope.items = data; }); }); ToDoApp.controller("ListQuestionByTagsCtrl", function ($scope, $routeParams, $http) { var Tag1 = $routeParams.tag1, Tag2 = $routeParams.tag2, Tag3 = $routeParams.tag3; $http.get('http://LocalHost:8080/FetchQuestions/service/question/'+Tag1+','+Tag2+','+Tag3). success(function (data) { $scope.items = data; }); }); ToDoApp.controller("InsertQuestionAnswerCtrl",function($scope, $routeParams, $http){ var userid = $routeParam.user_id, qtnid = $routeParams.qtn_id, ans = $routeParam.answer; $http.get('http://LocalHost:8080/FetchQuestions/service/question/insert/'+userid+'/'+qtnid+'/'+ans). success(function (data){ $scope.items = data; }); }); The Controller Invokes a RESTful Webservice (FetchQuestions) That returns Data in JSON Format. The ListQuestion.html simply uses ng-repeat on scope variable items and displays data in tabular format as follows : {{item.Question_id}} {{item.Question_Text}} When I am deploying the Project (FetchQuestionAngularJS) on WAMP server, I am getting the following error message : -Error: [$injector:unpr] Unknown provider: $templat…

http://stackoverflow.com/comment/53906823
comment on: http://stackoverflow.com/a/30590270
score: 1
type: AnswerComment
type: Comment
has text: adding every object to the array `content` with the `push` function, and divide every page at the end of the for cycle whit the pagebreak option. `var foo[0]={ name:"hello" }; foo[1]={ name:"world" }; for(var i=0;i<data.length;i++) { dd.content.push({ text: foo[i].name}); /*other things*/ dd.content.push({text:''; pagebreak:'after'}); }`

http://stackoverflow.com/a/26772352
has body: Try to trigger click event with elm.onclick(). Complete bookmarklet code (a little optimized) will become: (function () { var s = document.querySelectorAll(".phraseCode"); for (var i = 0; i &lt; s.length; i++) { if (s[i].innerText == "EUH 201/201A") { var elm = s[i].parentNode.querySelector("input"); elm.checked = true; elm.onclick(); break; } } })(); Since elm.onchange didn't work for your case, toggling effect is very likely set up with click event on the checkboxes. Also if you are wondering why typeof elm.onchange is an object, this is because there are no onchange event bound and then elm.onchange is null, for which typeof returns object. If the event is bound using addEventListener you may need to create an event and dispatch it manually like in this example http://jsfiddle.net/mx1o3579/.
has comment: http://stackoverflow.com/comment/42124828
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42126354
has comment: http://stackoverflow.com/comment/42153103
has comment: http://stackoverflow.com/comment/42163577
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42157435
accepted answer of: http://stackoverflow.com/q/26771968
has comment: http://stackoverflow.com/comment/42126704
answers question: http://stackoverflow.com/q/26771968

http://stackoverflow.com/comment/42129233
type: Comment
has text: Because I will need to integrate the iFrame in my later main page. I just need to make sure the the content of the iframe is loaded correctly. I had notice that mylink is sent to the iFrame with this.click
comment on: http://stackoverflow.com/q/26774514
score: 0
type: QuestionComment

http://stackoverflow.com/a/26820302
type: Answer
answers question: http://stackoverflow.com/q/26820097
score: 0
has body: A plugin like this is probably what you're looking for. http://visionmedia.github.io/move.js/

http://stackoverflow.com/a/26682655
score: 0
type: Answer
has body: ok this can be done with the help of global variable or flag in order to see the effect first put lots of data into the page so that you can see vertical scroll. &lt;script&gt; var flag = 0; $(document).ready(function() { $(window).scroll(function() { if (flag == 0) { if ($(window).scrollTop() &gt; 100) { alert('1st time'); flag = 1; } } else if (flag == 1) { alert('second time and u can comment this alert'); } }); }); &lt;/script&gt;
answers question: http://stackoverflow.com/q/26682167

http://stackoverflow.com/comment/42193693
type: QuestionComment
has text: @Robbert thats what i did :)
comment on: http://stackoverflow.com/q/26810518
score: 0
type: Comment

http://stackoverflow.com/q/26720722
linked to: http://stackoverflow.com/q/386845
tagged with: javascript
upvote count: 2
has body: I searched online about this meta refresh code in html &lt;META HTTP-EQUIV='REFRESH' CONTENT='5;URL=http://www.example.com/test.txt'&gt; this code redirects the page to http://www.example.com/test.txt after 5 seconds.. i wanted it to download the file! not opening it in the browser!, some extensions doesn't download using this code, like ( js jpg html css.. etc.. ), the browser just open them!, well i want the browser to download not to open, Does anybody know how?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42040281
favorite count: 0
has comment: http://stackoverflow.com/comment/42031318
has title: Meta refresh download (txt, ini, css or html) file
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26720965
linked to: http://stackoverflow.com/q/20080341
score: 1
has comment: http://stackoverflow.com/comment/42031685
type: Question

http://stackoverflow.com/q/26679940
has comment: http://stackoverflow.com/comment/41958913
type: UnansweredQuestion
has body: I am stumped! My PHP echos "result~~&lt;File Uploaded OK&gt;~~\n". "result" gets added as a key to xhrData with a value of "File Uploaded OK". Using the for-in loop logs the data I expect, but when I try to log xhrData.result, it returns undefined. console.log(JSON.stringify(xhrData)) also logs what I expect. I am so confused! Any help would be appreciated. xhr.onreadystatechange = function(e) { if ( 4 == this.readyState &amp;&amp; 200 == this.status ) { // PHP returns "result~~&lt;File Uploaded OK&gt;~~\n" response = xhr.responseText.split("&gt;~~\n"); var xhrData = {}; for(j=0;j&lt;response.length-1;j++) { splt = response[j].split("~~&lt;"); key = splt[0]; data = splt[1]; xhrData[key] = data; } for(key in xhrData) { console.log("Key: "+key+"\nData: "+xhrData[key]); //Key: result //Data: File Uploaded OK } console.log(xhrData.result); //undefined console.log(xhrData['result']); //undefined } };
tagged with: xmlhttprequest
tagged with: php
has comment: http://stackoverflow.com/comment/41958891
answer count: 0
has comment: http://stackoverflow.com/comment/41959142
has title: Javascript object exists but returns undefined
has comment: http://stackoverflow.com/comment/41958955
type: Question
has comment: http://stackoverflow.com/comment/41959026
tagged with: javascript
has comment: http://stackoverflow.com/comment/41959165
score: 0
has comment: http://stackoverflow.com/comment/41958752
has comment: http://stackoverflow.com/comment/41959143
has comment: http://stackoverflow.com/comment/41959183
has comment: http://stackoverflow.com/comment/41959582
has comment: http://stackoverflow.com/comment/41959064
tagged with: undefined
has comment: http://stackoverflow.com/comment/41960981
has comment: http://stackoverflow.com/comment/41958797
has comment: http://stackoverflow.com/comment/41959112
has comment: http://stackoverflow.com/comment/41959253

http://stackoverflow.com/q/26732483
answer count: 1
tagged with: jquery
tagged with: asp.net
type: UnansweredQuestion
has body: .I do an example embled video: http://sachinchoolur.github.io/lightGallery/examples.html and i have a problem with json! I can't load video when click image(div json) on website!! But when I click image(div) slide video load complete and on this slide I can load all video(div and div json) !! Please help me when I click image(div json) video must be load. this my code: &lt;script type="text/javascript"&gt; $(document).ready(function () { $.post("listvideojson.aspx", function (response) { var listlinks = JSON.parse(response); for (var i = 0; i &lt; listlinks.length; i++) { $("#video").append("&lt;div data-src='" + listlinks[i].link + "'&gt;&lt;img class='hinh' src='Images/149712_133340426820507_1784820870_n.jpg' /&gt;&lt;/div&gt;"); } }); }); &lt;/script&gt; &lt;link href="CSS/lightGallery.css" rel="stylesheet" /&gt; &lt;script src="Scripts/lightGallery.js"&gt;&lt;/script&gt;
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26732536
score: 0
has title: How to load video with json using lightGallery.js?

http://stackoverflow.com/q/26777749
favorite count: 0
type: UnansweredQuestion
tagged with: store
tagged with: combobox
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26778153
has title: Ext Js 2.1 Combobox Anymatch filter not working
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26779671
has body: This is my store. var studentStore = new Ext.data.SimpleStore ({ fields :['value','name'], data :studentArray }) This is my ext js combobox. ddlStudentCombo = new Ext.form.ComboBox({ id:'ddlDocCat', emptyText:'Type..', hideTrigger:true, width:140, store: studentStore, applyTo:'ddlStudent', displayField :'name', forceSelection:true, selectOnFocus: true, listWidth:320, mode: 'local', listClass: 'x-combo-list-small', typeAhead:true }); I tried adding listeners, doQuery ,method overriding. But these are not working.
tagged with: javascript
tagged with: extjs2
tagged with: extjs
upvote count: 1

http://stackoverflow.com/a/26795232
type: Answer
answers question: http://stackoverflow.com/q/26795140
has comment: http://stackoverflow.com/comment/42164884
has body: Instead of getting entire css content just get the dynamic class name from backend json . Keep the class definition in your local file , then apply it dynamically through ng-class directive
score: 0

http://stackoverflow.com/q/26689470
has answer: http://stackoverflow.com/a/26776768
score: 6
accepted answer: http://stackoverflow.com/a/26776768
has answer: http://stackoverflow.com/a/26787454
has comment: http://stackoverflow.com/comment/42153220
has comment: http://stackoverflow.com/comment/41980507
type: AnsweredQuestion
tagged with: performance
has answer: http://stackoverflow.com/a/26775378
type: Question
has comment: http://stackoverflow.com/comment/42158138
has body: I'm creating a web app which has an interactive background with particles bouncing around. At all times there are about 200 circular particles on the screen and at most around 800 particles. Some of the collisions and effects that are being run for the particles are the following prototypes. I wonder if I could improve the performance by using web workers to do these calculations? /** * Particles */ Jarvis.prototype.genForegroundParticles = function(options, count){ count = count || this.logoParticlesNum; for (var i = 0; i &lt; count; i++) { this.logoParticles.push(new Particle()); } } Jarvis.prototype.genBackgroundParticles = function(options, count){ count = count || this.backgroundParticlesNum; for (var i = 0; i &lt; count; i++) { this.backgroundParticles.push(new Particle(options)); } } Jarvis.prototype.motion = { linear : function(particle, pIndex, particles){ particle.x += particle.vx particle.y += particle.vy }, normalizeVelocity : function(particle, pIndex, particles){ if (particle.vx - particle.vxInitial &gt; 1) { particle.vx -= 0.05; } else if (particle.vx - particle.vxInitial &lt; -1) { particle.vx += 0.05; } if (particle.vy - particle.vyInitial &gt; 1) { particle.vy -= 0.05; } else if (particle.vx - particle.vxInitial &lt; -1) { particle.vy += 0.05; } }, explode : function(particle, pIndex, particles) { if (particle.isBottomOut()) { particles.splice(pIndex, 1); } else { particle.x += particle.vx; particle.y += particle.vy; particle.vy += 0.1; } if (particles.length === 0){ particles.motion.removeMotion("explode"); this.allowMenu = true; } } } Jarvis.prototype.collision = { boundingBox: function(particle, pIndex, particles){ if (particle.y &gt; (this.HEIGHT - particle.radius) || particle.y &lt; particle.radius) { particle.vy *= -1; } if(particle.x &gt; (this.WIDTH - particle.radius) || particle.x &lt; particle.radius) { particle.vx *= -1; } }, boundingBoxGravity: function(particle, pIndex, particles){ // TODO: FIX GRAVITY TO WORK PROPERLY IN COMBINATION W…
has answer: http://stackoverflow.com/a/26774930
upvote count: 6
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41979080
possible better answer: http://stackoverflow.com/a/26775378
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has title: Canvas particles, collisions and performance
favorite count: 0
tagged with: particles

http://stackoverflow.com/q/26787952
has comment: http://stackoverflow.com/comment/42152331
has body: When I first load my webpage, it loads to this URL: /default/ Now, when I click the "nextPost" button on the screen (which has an attribute called data-nextPostNumber), this is the code which I have: event.preventDefault(); var nextPost = $(this).attr('data-nextPostNumber'); $("body").load("/default/?postNumber=" + nextPost); So this loads the URL (assuming that nextPost=2) /default/?postNumber=2 However, this was loaded using ajax so the actual URL in the URL bar is still /default/ What I want to do is get the GET variables in the URL which was loaded through ajax. I have this code (which gets the GET variables in the URL and puts them in a dictionary called params): function getQueryParams(qs) { qs = qs.split("+").join(" "); var params = {}, tokens, re = /[?&amp;]?([^=]+)=([^&amp;]*)/g; while (tokens = re.exec(qs)) { params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]); } return params; } But this code just gets the GET variables in the URL which is in the URL bar - not the URL which was loaded using Ajax. So, is there a way for me to take the URL which was loaded using Ajax and place that URL in the URL bar? If not, is there any way for me to solve my issue? Please note that I need it to be compatible with IE8 and IE9.
has comment: http://stackoverflow.com/comment/42152432
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26788215
has title: JQuery / Ajax - update URL without refreshing the webpage - should be compatible with IE8 and IE9
type: Question
accepted answer: http://stackoverflow.com/a/26788215
answer count: 1
tagged with: url
tagged with: javascript
tagged with: jquery
tagged with: ajax
tagged with: get
score: 0
has comment: http://stackoverflow.com/comment/42152320

http://stackoverflow.com/q/26769542
has comment: http://stackoverflow.com/comment/42119856
has comment: http://stackoverflow.com/comment/75889393
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/44445788
favorite count: 0
has title: ie11 window.location relative paths
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I have a bit of javascript... function genURL() { var searchSubmit = document.getElementById("search").value; if(searchSubmit == ""){ window.location = "webpage/view"; } else{ window.location = "webpage/view/generate/" + searchSubmit; } So this seems to work fine in chrome and Mozilla, however I tested in IE11 and it decided to change the pathing on me. So the redirect looks like this on Mozilla and Chrome... www.mywebsite.com/webpage/view/generate However on IE11 is decides to go... www.mywebsite.com/webpage/webpage/view/generate The page I am running it from is... www.mywebsite.com/webpage/view Any ways around this? Cheers
has comment: http://stackoverflow.com/comment/75889302
has comment: http://stackoverflow.com/comment/42119537
upvote count: 3
linked to: http://stackoverflow.com/q/22666166
type: Question
score: 3
tagged with: javascript

http://stackoverflow.com/comment/87622229
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/32506597
has text: I'm trying to use it but it's not working for me, https://jsfiddle.net/wzshpjb1/ For me only one value is getting pre populated, I'm using select2 v4.0.6

http://stackoverflow.com/comment/41992854
type: Comment
has text: Is there a particular reason you are storing circle attributes as data ?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26699507

http://stackoverflow.com/comment/42113816
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26763500
has text: Thanks for your help, but this will only make a simple input field not a x-editable popup.

http://stackoverflow.com/q/26814434
has answer: http://stackoverflow.com/a/27301632
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27310562
score: 3
tagged with: jsdoc3
upvote count: 3
has title: How to annotate "@readonly-but-modified-internally" members / properties in JSDoc?
type: Question
answer count: 2
tagged with: readonly
downvote count: 0
has body: JSDoc has a @readonly doclet tag: The @readonly tag indicates that a symbol is intended to be read-only. For example: /** * The name of the represented principal * @member {string} * @readonly */ this.name = primaryName; However, what I really want to communicate and document is that public consumers should treat the property as read-only - but the member is not constant. Internal code can, and does, modify such members: the read-only doclet tag is for the API consumers. (And if the API is used incorrectly, shame on them! - but not my concern.) /** * Update the security token information. * (This is a made-up example!) */ this.updateToken = function (token) { this.name = token.name; } Is there a good way to express this concept in JSDoc (tags)? In particular, What is a good way to express "it is expected that internal code modifies this read-only member"? Without writing such explicitly, aside from doclet tags, in the documentation of course. I was originally hoping JSDoc would trivially accept "@readonly private" or similar, but such is not the case.. The issue with using a custom tag is that such is introduced locally, having no imminent external meaning or application in the standard templates.
tagged with: javascript
tagged with: documentation
tagged with: jsdoc

http://stackoverflow.com/comment/42113944
comment on: http://stackoverflow.com/q/26762697
type: Comment
type: QuestionComment
has text: @MarcusPrice If you solved the problem, post an answer. Do not add [solved] to your title, that's not how this site works.
score: 1

http://stackoverflow.com/a/26828244
has comment: http://stackoverflow.com/comment/42233242
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26826077
has body: If you are referring to Selenium like your tags imply, I guess you're trying to use driver.findElements(By.className("..")); or something similar, you need to be familiar with CSS Selectors. for example if we inspect the stackoverflow logo we will see: &lt;div id="hlogo"&gt; &lt;a href="/"&gt; Stack Overflow &lt;/a&gt; &lt;/div&gt; So in this case we will use: driver.findElements(By.id("hlogo")); Or we can use a cssSelector by doing: driver.findElements(By.cssSelector("#hlogo"));
score: 1
upvote count: 1

http://stackoverflow.com/comment/42074545
has text: If < 10, pad with a leading zero.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26744521

http://stackoverflow.com/comment/42232814
type: Comment
comment on: http://stackoverflow.com/a/26831528
type: AnswerComment
has text: oh sorry, i expect to be created `[ { group: 1, activities: [ [Object] ]` even if its just for one entry... welp i just fixed it myself heheh changing `return (es.length > 1)` to `return (as[0].idGroup)` thank you anyways! i still have much to learn on javascript hehehe.
score: 0

http://stackoverflow.com/comment/41996490
has text: I am trying to trigger the event profileUpdated when I click on the link. When I click the link I want Updated to appear in the output div. Thanks
comment on: http://stackoverflow.com/q/26701334
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/50630011
downvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26786756
has body: This works: router.get('/', passport.authenticate('google', { scope: ['https://www.googleapis.com/auth/userinfo.email','https://www.googleapis.com/auth/userinfo.profile'], }));
score: 0
upvote count: 1

http://stackoverflow.com/comment/42089717
type: QuestionComment
has text: I installed extension 43889 on IE 11/Win 8.1 and received the alert as expected ([43889-Alert](http://content.screencast.com/users/CrossriderSupport/folders/Snagit/media/612468c3-5d02-408e-ba8b-d0f579092d44/11.05.2014-11.05.png">), [43889-Manage-AddOns](http://content.screencast.com/users/CrossriderSupport/folders/Snagit/media/00f105af-deed-45a0-b01f-2b5249970ada/11.05.2014-11.00.png">)). Can you try on another computer?
type: Comment
comment on: http://stackoverflow.com/q/26734191
score: 0

http://stackoverflow.com/comment/42070302
has text: Well what I am trying to do is when the image was clicked, it would compared the random number generated to my selection. Based upon the win or loss in the if/else statement, it would then produce a statement stating you won or lost, THEN add one to the corresponding variable. So the If/else statement would add +1 to the variable. Upon reaching 2, an alert would pop saying you've won or lost the best of three. Clearly that is not working. I am kind of piecing this together from what I googled since this is new to me.
comment on: http://stackoverflow.com/a/26742045
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42092903
type: QuestionComment
comment on: http://stackoverflow.com/q/26754734
has text: [The HTML5 placeholder attribute is not a substitute for the label element](http://www.456bereastreet.com/archive/201204/the_html5_placeholder_attribute_is_not_a_substitute_for_the_label_element/). The default value isn't either.
score: 0
type: Comment

http://stackoverflow.com/a/26739923
type: Answer
answers question: http://stackoverflow.com/q/26696193
score: 0
has body: It's a bit difficult to tell with this amount of information, but as a guess, if your code can't find the grid itself then it might be a timing issue. A lot of the Telerik controls aren't ready until pageLoad, so give it a try in there and see if you at least get the grid object: function pageLoad() { var grid = $find("&lt;%=RadGrid1.ClientID %&gt;"); var MasterTable = grid.get_masterTableView(); var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()]; var cell = MasterTable.getCellByColumnUniqueName(row, "CategoryID"); }

http://stackoverflow.com/q/26795709
has answer: http://stackoverflow.com/a/26796015
type: Question
has title: Resolve JavaScript variable inside Jsp function calling
tagged with: javascript
tagged with: struts2
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26796015
type: AnsweredQuestion
has body: 1) this is fine work and resolve the value but 2)onclick="cancelEvent( );" this is not working single and double quotes also apply on it but still not working. any one can solve this.

http://stackoverflow.com/q/26693360
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/41982375
tagged with: javascript
has body: I am trying to create a basic d3.js chart by using Visual Studio 2013 and a csv file. This is the first time I am playing with Visual Studio and not able to understand the reason for data binding not happening. after running the following code, I am getting no result. I believe its because the csv or json file should be in same folder. but even after that I am not getting desired results. HTML Code D3 Tutorial Please find below the screen shot of my Solution explorer Also mydata.csv "name","age" "Maria",30 "Fred",50 "Francis",12 Error XMLHttpRequest cannot load file:///C:/xampp/htdocs/mydata.csv. Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https, chrome-extension-resource. Uncaught TypeError: Cannot read property 'length' of null Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'file:///C:/xampp/htdocs/mydata.csv'.
has comment: http://stackoverflow.com/comment/41983130
has comment: http://stackoverflow.com/comment/41983207
score: 0
tagged with: http://stackoverflow.com/tag/csv
has comment: http://stackoverflow.com/comment/41982959
answer count: 1
tagged with: asp.net
tagged with: d3.js
type: UnansweredQuestion
has title: Adding CSV to ASP.NET Web Application
has answer: http://stackoverflow.com/a/28285693
has comment: http://stackoverflow.com/comment/41982299

http://stackoverflow.com/comment/42072841
has text: Fair enough, I just wanted to make sure that a comment existed with further reading in case OP needed greater robustness in his/her email validation regex.
comment on: http://stackoverflow.com/a/26743560
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26783625
has comment: http://stackoverflow.com/comment/42144171
score: 0
type: Answer
has body: Change your jquery .mouseenter() for .mousemove() on the fade ins.
has comment: http://stackoverflow.com/comment/42144430
has comment: http://stackoverflow.com/comment/42145751
has comment: http://stackoverflow.com/comment/42145399
answers question: http://stackoverflow.com/q/26783147
has comment: http://stackoverflow.com/comment/42144261

http://stackoverflow.com/q/26764868
has answer: http://stackoverflow.com/a/26790347
accepted answer: http://stackoverflow.com/a/26790347
downvote count: 0
tagged with: codemirror
type: AnsweredQuestion
score: 1
tagged with: codemirror-modes
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
has title: CodeMirror and Brackets, Custom Mode with CSS Quick Edit
has body: I'm making a Adobe Brackets Extension to add support for Laravel Blade syntax highlight. Blade is a template system that runs on top of HTML (more specifically a .php file), without my extension active I can do CTRL+E Quick Edit on a css rule name to quickly find that rule on the stlye.css file. But when I activate the extension, the CTRL+E is not working anymore, but the HTML syntax is working perfectly. I'm using overlay mode over text/html. Here is the main.js extension code: define(function (require, exports, module) { 'use strict'; var LanguageManager = brackets.getModule("language/LanguageManager"); CodeMirror.defineMode("laravelblade", function (config, parserConfig) { var mustacheOverlay = { token: function (stream, state) { var ch; //Highlight Comments {{-- --}} if (stream.match("{{--")) { while ((ch = stream.next()) != null) if (ch == "}" &amp;&amp; stream.next() == "}") break; stream.eat("}"); return "comment"; } //-- //Highlight {{ $var }}) if (stream.match("{{")) { while ((ch = stream.next()) != null) if (ch == "}" &amp;&amp; stream.next() == "}") break; stream.eat("}"); return "def"; } //Highlight {% $var %} (Laravel 5) else if (stream.match('{%')) { while ((ch = stream.next()) != null) if (ch == "%" &amp;&amp; stream.next() == "}") break; stream.eat("}"); return "def"; } //Highlight {% $var %} (Laravel 5) else if (stream.match('{%')) { while ((ch = stream.next()) != null) if (ch == "%" &amp;&amp; stream.next() == "}") break; stream.eat("}"); return "def"; } //Return Null if no condition was met. else if (stream.next() != null) { return null; } } }; return CodeMirror.overlayMode(CodeMirror.getMode(config, parserConfig.backdrop || "php"), mustacheOverlay); }); LanguageManager.defineLanguage("laravelblade", { "name": "Laravel Blade", "mode": "laravelblade", "fileExtensions": ["blade.php"], "blockComment": ["{{--", "--}}"] }); }); The real question is: How can I add support for Quick Edit on my custom mode and *blade.php files?
favorite count: 0
tagged with: adobe-brackets

http://stackoverflow.com/comment/42217482
score: 0
comment on: http://stackoverflow.com/q/26810359
type: Comment
type: QuestionComment
has text: _“I can't use `setInterval()` because the function continue to be executed after an interval”_ – that’s why `clearInterval` exists …

http://stackoverflow.com/comment/42175013
has text: How is Java relevant here?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26800471
score: 0

regex
tags question: http://stackoverflow.com/q/26672966
tags question: http://stackoverflow.com/q/26769306
tags question: http://stackoverflow.com/q/26782083
tags question: http://stackoverflow.com/q/26692299
tags question: http://stackoverflow.com/q/26699810
tags question: http://stackoverflow.com/q/26796775
tags question: http://stackoverflow.com/q/26730317
tags question: http://stackoverflow.com/q/26752993
tag name: regex
tags question: http://stackoverflow.com/q/26798304
tags question: http://stackoverflow.com/q/26712064
tags question: http://stackoverflow.com/q/26693820
tags question: http://stackoverflow.com/q/26730343
tags question: http://stackoverflow.com/q/26695954
tags question: http://stackoverflow.com/q/26725188
tags question: http://stackoverflow.com/q/26699534
tags question: http://stackoverflow.com/q/26674069
tags question: http://stackoverflow.com/q/26809942
tags question: http://stackoverflow.com/q/26683343
tags question: http://stackoverflow.com/q/26775693
tags question: http://stackoverflow.com/q/26806516
tags question: http://stackoverflow.com/q/26709839
tags question: http://stackoverflow.com/q/26812294
tags question: http://stackoverflow.com/q/26775995
tags question: http://stackoverflow.com/q/26745708
tags question: http://stackoverflow.com/q/26673586
tags question: http://stackoverflow.com/q/26750252
tags question: http://stackoverflow.com/q/26790132
tags question: http://stackoverflow.com/q/26762907
tags question: http://stackoverflow.com/q/26696737
tags question: http://stackoverflow.com/q/26717894
tags question: http://stackoverflow.com/q/26821701
tags question: http://stackoverflow.com/q/26811155
tags question: http://stackoverflow.com/q/26786602
tags question: http://stackoverflow.com/q/26743539
tags question: http://stackoverflow.com/q/26762474
tags question: http://stackoverflow.com/q/26770154
tags question: http://stackoverflow.com/q/26728536
tags question: http://stackoverflow.com/q/26781055
tags question: http://stackoverflow.com/q/26739748
tags question: http://stackoverflow.com/q/26810126
tags question: http://stackoverflow.com/q/26684946
tags question: http://stackoverflow.com/q/26686484
tags question: http://stackoverflow.com/q/26809811
tags question: http://stackoverflow.com/q/26696211
tags question: http://stackoverflow.com/q/26807319
tags question: http://stackoverflow.com/q/26711878
tags question: http://stackoverflow.com/q/26831105
tags question: http://stackoverflow.com/q/26819190
tags question: http://stackoverflow.com/q/26736270
tags question: http://stackoverflow.com/q/26791390
tags question: http://stackoverflow.com/q/26731220
tags question: http://stackoverflow.com/q/26766484
tags question: http://stackoverflow.com/q/26808137
tags question: http://stackoverflow.com/q/26715342
tags question: http://stackoverflow.com/q/26780268
tags question: http://stackoverflow.com/q/26750329
tags question: http://stackoverflow.com/q/26723568
tags question: http://stackoverflow.com/q/26777423
tags question: http://stackoverflow.com/q/26754739
tags question: http://stackoverflow.com/q/26748035
tags question: http://stackoverflow.com/q/26728087
tags question: http://stackoverflow.com/q/26686096
tags question: http://stackoverflow.com/q/26818551
tags question: http://stackoverflow.com/q/26817220
tags question: http://stackoverflow.com/q/26703561
tags question: http://stackoverflow.com/q/26762880
tags question: http://stackoverflow.com/q/26721818
tags question: http://stackoverflow.com/q/26760523
tags question: http://stackoverflow.com/q/26764850
tags question: http://stackoverflow.com/q/26782629
tags question: http://stackoverflow.com/q/26721746
tags question: http://stackoverflow.com/q/26738172
tags question: http://stackoverflow.com/q/26805396
tags question: http://stackoverflow.com/q/26765095
tags question: http://stackoverflow.com/q/26696738
tags question: http://stackoverflow.com/q/26717396
tags question: http://stackoverflow.com/q/26711098
tags question: http://stackoverflow.com/q/26789951
type: Tag

http://stackoverflow.com/comment/41986988
has text: @MarkTHarris depending on what you are trying to achieve , using animate keyframes + less or sass , you can do it http://www.w3schools.com/css/tryit.asp?filename=trycss3_animation3
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26695907
type: Comment

http://stackoverflow.com/comment/42098399
type: AnswerComment
comment on: http://stackoverflow.com/a/26758170
score: 0
type: Comment
has text: @RutwickGangurde can you please tell me where exactly ?

http://stackoverflow.com/q/26787168
possible better answer: http://stackoverflow.com/a/26788376
score: 0
answer count: 2
tagged with: javascript
tagged with: share
has comment: http://stackoverflow.com/comment/42152997
tagged with: sdk
tagged with: facebook
has body: This is not rocket science. It seems like it should be SO SIMPLE and I've followed the docs explicitly and modified it 100 different ways. But I can't for the life of me get all the right moves in all the right places and every tutorial or SO post I can find is now deprecated. I have a Facebook app set up. I have this at the opening of my body: &lt;div id="fb-root"&gt;&lt;/div&gt; &lt;script&gt; window.fbAsyncInit = function() { FB.init({ appId : '722388634521999', 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; I have every meta tag you can imagine. I have the share button code where I want my share button: &lt;div class="fb-share-button" data-href="http://gd-web.brooklynunited.com" data-layout="button"&gt;&lt;/div&gt; I only have Facebook share on two templates, but one shares the explicit page the user is on (individual blog posts) and the other shares the global site url (i.e. NOT the page the user is on). The user should be able to click the FB share button and get the title, description and image that I populate in the meta tags to post to their profile. Right?! I feel like I'm taking crazy pills. Of note, want this in a modal. And what I have will activate share, but doesn't pull any meta. No description, no image, nada. Sorry, should have offered a more thorough explanation. Any help is MUCH appreciated and you are a BFD (big effing deal) on the internet, PLEASE make this a blog post or go work for Facebook and help them write their docs. The end.
type: AnsweredQuestion
has title: The simplest explanation of integrating a Facebook share button with dynamic content
has answer: http://stackoverflow.com/a/26788376
has answer: http://stackoverflow.com/a/26787804
accepted answer: http://stackoverflow.com/a/26787804
type: Question
tagged with: facebook-social-plugins

http://stackoverflow.com/comment/42106459
type: QuestionComment
comment on: http://stackoverflow.com/q/26761151
has text: Sure, although you could've written it as well. I don't care much about the points. :)
score: 0
type: Comment

http://stackoverflow.com/a/26692719
has comment: http://stackoverflow.com/comment/41984024
answers question: http://stackoverflow.com/q/26692298
has body: See if you can right click on the softkeyboard element in the browser. If so click on inspect element and see if you can find the element that contains the smiley or the number/special character key. Then you can construct a script to hide it or remove it when the page loads. Using JQuery it might look something like this: //note: You must place this code in a script tag after you have loaded JQuery. $(document).ready(function(){//begin document ready function //store the id or the class of the key to hide var key = $("#nameOfKeyID"); //hide the key $(key).hide(); //or remove the key //this will remove it from the page //and you will not be able to perform operations on it $(key).remove(); });//end document ready function
type: Answer
score: 0

http://stackoverflow.com/comment/42105226
comment on: http://stackoverflow.com/a/26761374
type: AnswerComment
score: 0
type: Comment
has text: I would write separate controllers for each view. Then if you want these controllers to share certain values in the scope, you can either write a third 'parent' controller, or use $rootScope.

http://stackoverflow.com/a/26728927
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26728896
has body: I tried your code and found that console.log(remainingChars); is causing problem as it gives error : console is undefined. Remove this line and your code will work. $(document).ready(function(){ $('#message1').on("keyup keydown", function () { var limit = $(this).data("limit"); var remainingChars = limit - $(this).val().length; /*console.log(remainingChars);*/ if (remainingChars &lt;= 0) { $('#message1').val($('#message1').val().substring(0,limit)); } $("#remLen1").html(remainingChars&lt;=0?0:remainingChars); }); }); And if you still want to use console, then see this for solution.
answers question: http://stackoverflow.com/q/26728896
has comment: http://stackoverflow.com/comment/42046337
has comment: http://stackoverflow.com/comment/42046653
has comment: http://stackoverflow.com/comment/42046606
type: Answer
has comment: http://stackoverflow.com/comment/42047244
has comment: http://stackoverflow.com/comment/42046487
downvote count: 1
score: 0
upvote count: 1

http://stackoverflow.com/comment/42396634
comment on: http://stackoverflow.com/a/26919271
type: AnswerComment
score: 0
type: Comment
has text: it looks like an interesting approach, I will take a look at it.

http://stackoverflow.com/comment/42179841
comment on: http://stackoverflow.com/q/26803224
type: Comment
type: QuestionComment
score: 1
has text: If the browser can see it the user can see it.

http://stackoverflow.com/comment/42213120
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26821855
type: Comment
has text: It's more likely there is a JS error in the new script you have included in the page. Have you checked the console for errors?

http://stackoverflow.com/q/26743966
tagged with: html5-canvas
answer count: 1
downvote count: 0
tagged with: paperjs
favorite count: 0
type: UnansweredQuestion
score: 2
upvote count: 2
has body: I have an item that is rotated and I want to change the width and height base on no rotation. When I rotate the item the width and height totally change and the re-size direction remain north and south. How do it make sure the width is updated base on the new rotation Is their a setting I need change or anyone know a math formula I can use to calculate the new size base on the rotation. Thank you any help or reference is greatly appreciated.
type: Question
has answer: http://stackoverflow.com/a/29463135
tagged with: math
tagged with: javascript
has title: PaperJs Adjusting width and height after rotation

http://stackoverflow.com/a/26749384
accepted answer of: http://stackoverflow.com/q/26749284
answers question: http://stackoverflow.com/q/26749284
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42083315
has comment: http://stackoverflow.com/comment/42083287
has comment: http://stackoverflow.com/comment/42083128
type: Answer
has comment: http://stackoverflow.com/comment/42083115
has body: transitionToRoute is a controller method. The method on routes is transitionTo. I think your line numbers may be off because of the transpilation. You can see from the stack trace that the error is being thrown inside setupController. By the way, if you define your functions like setupController: function Insights$setupController() ... you'll get nicer traces. Minor points: First, I don't know why your're bothering to define _this. Second, don't do this kind of check in setupController; beforeModel would be better. Third, I'm not a big fan of the redundant === true. SEE COMMENTS FOR FIX Essentially, changing setupController to beforeModel fixed the bug.
has comment: http://stackoverflow.com/comment/42083067

http://stackoverflow.com/comment/42163300
has text: it's php printing javascript, perhaps I should have labeled it differently
score: 1
type: Comment
comment on: http://stackoverflow.com/q/26794254
type: QuestionComment

http://stackoverflow.com/q/26797603
tagged with: php
has title: Embedly API returns String instead JSON
has comment: http://stackoverflow.com/comment/42169212
has comment: http://stackoverflow.com/comment/42169397
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26885952
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
tagged with: embedly
type: Question
score: 0
has comment: http://stackoverflow.com/comment/42170221
has body: I'm testing the embedly API and I have a problem with what is returning. My code in Javascript is the followig which send the URL to PHP. JAVASCRIPT $.post('../../../services/rpc.php', {functionName: 'getEmbed', url: $('#story-post-new').val()}, function(response){ $.each(response, function(index, val){ ... }); }) PHP $url = 'http://api.embed.ly/1/extract?url='.$_POST['url'].';key=xxx;'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); echo json_encode(curl_exec($ch)); So in PHP I call the api using extract, execute this url and finally do json_encode to the string returned. In Javascript the response is not a JSON Object and still being a String, so the $.each funcion doesn't work. How can I return a JSON from PHP?? Thanks.
answer count: 1
has comment: http://stackoverflow.com/comment/42175392
has comment: http://stackoverflow.com/comment/42171345
has comment: http://stackoverflow.com/comment/42170505
has answer: http://stackoverflow.com/a/26885952

http://stackoverflow.com/comment/42064112
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/64253/discussion-between-radiovisual-and-vicki).
comment on: http://stackoverflow.com/a/26737995
score: 0
type: AnswerComment

http://stackoverflow.com/q/26677187
has answer: http://stackoverflow.com/a/26677330
type: Question
possible better answer: http://stackoverflow.com/a/26677330
has title: how to call angular factory method from module setup?
has answer: http://stackoverflow.com/a/26677651
accepted answer: http://stackoverflow.com/a/26677651
has comment: http://stackoverflow.com/comment/41953475
has body: I have a module App and factory i18n, what is the best way to call i18n.load method form App (config? run? etc?) angular .module('App', [ 'ngRoute', 'service.i18ndb' ]) .config(function ($routeProvider) { //want to i18n.load() here somehow $routeProvider .when('/signin', { templateUrl: '../views/sign-in.html', controller: 'SigninCtrl' }) .when('/mix', { templateUrl: '../views/mix.html', controller: 'MixCreateCtrl' }) .otherwise({ redirectTo: '/signin' }); }); angular.module('App') .factory('service.i18ndb', function() { return { load: function() { console.log("Busy"); } } } );
tagged with: javascript
has answer: http://stackoverflow.com/a/26677629
score: 0
answer count: 3
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/comment/84146011
has text: This actually helped me. $emit wasn't working. Changed to $broadcast. And I'm using $rootScope
comment on: http://stackoverflow.com/a/26766885
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26801844
tagged with: jquery
tagged with: php
type: UnansweredQuestion
type: Question
tagged with: jquery-ui-autocomplete
tagged with: jquery-ui
tagged with: javascript
has title: JQuery UI Autocomplete is not returning any results to the page
has answer: http://stackoverflow.com/a/26801905
score: 0
has body: I'm using the JQuery UI Autocomplete Widget to show suggested searches to users as they type into my search bar. However I'm getting a problem whereby the results are not appearing to the user as they type. This is my script: var $j = jQuery.noConflict(); $j(document).ready(function(){ $j("#tag_search").autocomplete({ source:'autocomplete_tags.php', dataType: 'json', minLength:1 }); }); This is the autocomplete_tags.php: require_once '../includes/preheader.php';//connects to db $term = $_GET["term"];//Get the search terms. //Select tags from the database based on the specified search keyword $query = "SELECT * FROM tag WHERE NAME LIKE '".$term."%' ORDER BY NAME ASC"; $json=array(); $db-&gt;query($query);//Query the DB. //Parse through the results and store in an array while($db-&gt;next()){ $json[]=array( 'id' =&gt; $db-&gt;get('id'), 'value'=&gt;$db-&gt;get("name"), 'label'=&gt;$db-&gt;get("description") ); } //Autocomplete JQuery UI expects a Json Array so encode and echo. echo json_encode($json); If I visit this url I can see a json array in the browser with the results, which makes me believe that it is working as it should, but for some reason the results are not showing. http://my-site.tld/includes/autocomplete_tags.php?term=ag Output: [{"id":"29","value":"Agriculture","label":"This is a tag about agriculture and farming"}] Also, I've checked in my console that the file is being found correctly when the user is typing and I am getting a 200 response code. Does anyone know what might be causing this? I've implemented a similar feature on another site and it worked no problem. Could it be a styling issue?
answer count: 1

http://stackoverflow.com/q/26672966
type: Question
has comment: http://stackoverflow.com/comment/41948259
has comment: http://stackoverflow.com/comment/41946072
has body: I try this regex: ^(?:https?://)?(?:www.)?((?:(?!www.|.).)+.[a-zA-Z0-9.]+) in the validator here: regexplanet.com and the results are fine for the inputs provided but it fails in this fiddle:jsfiddle &lt;input type="text" id="domain"&gt; $(document).ready(function(){ $('#domain').blur(function(){ var str = $.trim($(this).val()); var pat = /^(?:https?:\/\/)?(?:www\.)?((?:(?!www\.|\.).)+\.[a-zA-Z0-9.]+)/mg; if (pat.test(str)){ var match = str.match(pat); $(this).val(match); } else{ $(this).val('Validation failed'); } }); What i try to do is to give: www.gmail.com, http://www.gmail.com, gmail.com/example etc and just get gmail.com
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41945936
has comment: http://stackoverflow.com/comment/41946115
has answer: http://stackoverflow.com/a/26674660
score: 0
has comment: http://stackoverflow.com/comment/41950476
answer count: 3
tagged with: validation
linked to: http://stackoverflow.com/q/5885706
possible better answer: http://stackoverflow.com/a/26674660
has comment: http://stackoverflow.com/comment/41946139
has answer: http://stackoverflow.com/a/26678227
has title: Javascript regex works on online validator but fails in code
has comment: http://stackoverflow.com/comment/41947036
tagged with: regex
linked to: http://stackoverflow.com/q/1520800
accepted answer: http://stackoverflow.com/a/26678227
has comment: http://stackoverflow.com/comment/41946015
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41947703
has answer: http://stackoverflow.com/a/26679654
linked to: http://stackoverflow.com/q/8498592
has comment: http://stackoverflow.com/comment/41946304

http://stackoverflow.com/a/26682385
answers question: http://stackoverflow.com/q/26681071
upvote count: 1
type: Answer
has body: First check if you have all packages, to do so simply type meteor list and your packages should be something like this(plus the ones you added) accounts-base accounts-facebook accounts-password accounts-ui mizzao:bootstrap-3 If they aren't there, delete them using mrt(mrt delete accounts-ui for example), and then add them using meteor(as in answer above). After that loginButtons and bootstrap should be working fine
downvote count: 0
score: 1

http://stackoverflow.com/a/26809457
has comment: http://stackoverflow.com/comment/42191742
type: Answer
has comment: http://stackoverflow.com/comment/42191617
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42192046
has body: You already have it wrapped in a link. Just set the href: Please separate your UI from your functionality. It iwll make your code a lot more readable and easier to maintain. That said, you could stick the link in a data attribute inside the img - something like this: JQuery: $(".RedirectImage").click(function(e){ document.location.href = $(this).data("url"); });
accepted answer of: http://stackoverflow.com/q/26809341
answers question: http://stackoverflow.com/q/26809341
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42191691

http://stackoverflow.com/a/26788031
accepted answer of: http://stackoverflow.com/q/26787566
answers question: http://stackoverflow.com/q/26787566
score: 0
has comment: http://stackoverflow.com/comment/42154466
has comment: http://stackoverflow.com/comment/42154613
has body: You'll need to pass a string to the function. Otherwise, it will continuously test for undefined. Within the function, you could test for the object's existence within window using bracket notation. You could test for dynamically-created elements with IDs using document.getElementById: var onElementReady = function(obj, callback) { if(window[obj] || document.getElementById(obj)) { if(typeof window[obj] === 'function') { window[obj](); } if(callback) { callback(); } } else { setTimeout(function(){ onElementReady(obj, callback) },1000); } } //onElementReady onElementReady('newfunc'); onElementReady('newelement', function(){alert('New paragraph created!')} ); onElementReady('globvar', function(){alert('New global variable:\rglobvar = '+globvar)} ); var newfunc = function() { alert('It lives!'); } document.body.innerHTML= ' Some paragraphs are dynamic. '; setTimeout(function() { globvar = Math.random(); },2000);
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/42083521
type: AnswerComment
comment on: http://stackoverflow.com/a/26749134
score: 0
type: Comment
has text: Great thanks! So how do I still send the clicker to a certain URL if the href is taken by `javascript:myButtonClicked(val, curr);`?

http://stackoverflow.com/comment/42083426
type: AnswerComment
comment on: http://stackoverflow.com/a/26727398
score: 0
type: Comment
has text: when are you facing issue when you open home controller using `doClick` method or `onclick of loginBtn` in index.js ?

http://stackoverflow.com/comment/42068297
has text: Same problem persists. When it hits the "return RedirectToAction("Verify", newData);" The "Verify" ActionResult is called but the page does not redirect
type: AnswerComment
comment on: http://stackoverflow.com/a/26741155
score: 0
type: Comment

http://stackoverflow.com/q/26749790
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I'm building a event tracking api and need to provide a JS class with a list of properties of which some of them will be required and some optional. Also, no new properties should be added. Once the client instantiates and passes the object based on the class, I will be serializing the object and sending it as query string. I already have this part but not sure how to restrict the client from creating new properties. How do I go about designing the class in JS?
accepted answer: http://stackoverflow.com/a/26749839
upvote count: 2
type: Question
has title: Javascript class - how to make properties required and optional
tagged with: object
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/70578560
has answer: http://stackoverflow.com/a/70578560
answer count: 2
score: 2
has answer: http://stackoverflow.com/a/26749839
tagged with: function

http://stackoverflow.com/q/26813081
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42198199
has comment: http://stackoverflow.com/comment/42198184
has comment: http://stackoverflow.com/comment/42199070
has title: Distored Image Appears During Social Icon on Image Hover
type: UnansweredQuestion
tagged with: css
answer count: 0
has comment: http://stackoverflow.com/comment/42199112
type: Question
tagged with: hover
has body: I have successfully applied social icons to my image, so that they appear inline using CSS. My goal is for them to appear once a user hover over the associated image. However, my problem is that when I try to write the CSS fire the hover, I get a distorted version of the icon appearing on the image, yet the smaller version of the icon does appear on hover. Here's my CSS: #share-icon img:hover { width: 35px; padding: 5px; border: 0; box-shadow: 0; margin-left: 75px; display: inline; visibility: visible; } And here is an example of the code I have applied to the image: &lt;div id="share-icon"&gt; &lt;!-- Facebook Share --&gt; &lt;a href="https://www.facebook.com/sharer.php?u=http://example.com" target="_blank"&gt; &lt;img src="http://www.simplesharebuttons.com/images/somacro/facebook.png" alt="Facebook" /&gt;&lt;/a&gt; &lt;/div&gt; If I remove the :hover, then of course I lose the appear on image hover. Can anyone help me figure out why the distorted icon appears, while the smaller icon does appear on hover? I would write an inline for the, but I know you can only use either CSS or JS for this. If anyone can help with a solution, I would appreciate it.
tagged with: image
score: 0

http://stackoverflow.com/a/26737069
type: AcceptedAnswer
has body: A few changes A variation on this should work in modern browsers, if you know the colors and the number of colors in advance: .animate-me { -webkit-animation: bgcolorchange 4s infinite; /* Chrome, Safari, Opera */ animation: 4s infinite bgcolorchange; } @keyframes bgcolorchange { 0% { background-color: red; } 25% { background-color: green; } 50% { background-color: yellow; } 75% { background-color: yellow; } 100% { background-color: red; } } /* Chrome, Safari, Opera */ @-webkit-keyframes bgcolorchange { 0% {background: red;} 25% {background: yellow;} 75% {background: green;} 100% {background: blue;} } Trippy! Give me a headache! http://jsfiddle.net/nnw7xza2/1/ Click to demohere!
downvote count: 0
score: 8
upvote count: 8
type: Answer
accepted answer of: http://stackoverflow.com/q/26736578
answers question: http://stackoverflow.com/q/26736578

http://stackoverflow.com/comment/42009038
comment on: http://stackoverflow.com/q/26708420
has text: NO @SterlingArcher, i did not copy this string from anywhere.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26711196
has body: I'm starting out php. I'm wondering how many ajax files should I have. Should I have a seperate one for each operation I want to do? each query insert etc, Or do I like send something in the data, or maybe request that ID's the request so that the server knows what to do? Is there a good example for that? I don't know if it matters but I'm using jQuery.
answer count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/42013770
has answer: http://stackoverflow.com/a/26711303
has comment: http://stackoverflow.com/comment/42013909
tagged with: javascript
type: UnansweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/26711422
has comment: http://stackoverflow.com/comment/42013743
tagged with: jquery
favorite count: 0
has title: How many ajax files should I have?
tagged with: ajax
type: Question
score: -2
tagged with: php

http://stackoverflow.com/q/26793176
upvote count: 1
answer count: 1
has body: I have a small grid that only has vertical space to display 10 records. A vertical scroll bar should be able to be used to navigate beyond the first 10 records. I do not want a pager in the grid. I am having trouble getting it to work (the grid is not scrollable): $(document).ready(function() { $("#grid").kendoGrid({ dataSource: { type: "odata", transport: { read: "http://demos.kendoui.com/service/Northwind.svc/Orders" }, schema: { model: { fields: { OrderID: { type: "number" }, Freight: { type: "number" }, ShipName: { type: "string" }, OrderDate: { type: "date" }, ShipCity: { type: "string" } } } }, pageSize: 10, }, pageable: false, scrollable: true, columns: [{ field:"OrderID", filterable: false }, "Freight", { field: "OrderDate", title: "Order Date", width: 120, format: "{0:MM/dd/yyyy}" }, { field: "ShipName", title: "Ship Name", width: 260 }, { field: "ShipCity", title: "Ship City", width: 150 } ] }); }); As you can see, I am setting pageable to false and scrollable to true, but again, there is no way to scroll the grid. Here is a plunker: http://plnkr.co/edit/JlMsPa4tey4NBsQbsNp5?p=preview
tagged with: kendo-grid
has title: Kendo UI Grid, scrollable without pager
tagged with: javascript
type: UnansweredQuestion
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: kendo-ui
type: Question
has answer: http://stackoverflow.com/a/26793240

http://stackoverflow.com/q/26819331
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26819403
tagged with: javascript
has answer: http://stackoverflow.com/a/26819403
answer count: 1
downvote count: 0
has body: In the linked fiddle, I have set up a checkbox filter in jQuery to filter people by company name and job title. I would like to have a total count of visible elements that dynamically changes when elements are shown/hidden. In the fiddle, I have the total element count highlighted, but it currently does not change when checkboxes are checked/unchecked. I have found several questions that are similar, but I haven't been able to figure out a way to implement those suggestions into my code to make the count dynamic. Any help would be greatly appreciated. http://jsfiddle.net/point71echo/fnzag0pp/6/ Here's the jQuery code I am using: $(function() { $('.peoples, .companies').on('click', function() { var checkedPeoples = $('.peoples:checked'); var checkedCompanies = $('.companies:checked'); if (checkedPeoples.length || checkedCompanies.length) { if (checkedCompanies.length === 0) { $('.row &gt; div').hide(); $.each(checkedPeoples, function() { var prdId = $(this).attr('data-id'); $('.row &gt; div[data-category="' + prdId + '"]').show(); }); } else if (checkedPeoples.length === 0) { $('.row &gt; div').hide(); $.each(checkedCompanies, function() { var brandId = $(this).attr('data-id'); $('.row &gt; div[company="' + brandId + '"]').show(); }); } else { $('.row &gt; div').hide(); $.each(checkedPeoples, function() { var prdId = $(this).attr('data-id'); $.each(checkedCompanies, function() { var brandId = $(this).attr('data-id'); $('.row &gt; div[data-category="' + prdId + '"][company="' + brandId + '"]').show(); }); }); } } else { $('.row &gt; div').show(); } }); }); // Total count of elements (visible and invisible)... var x = $('.people:visible').length; $('#count').append( x );
has comment: http://stackoverflow.com/comment/42208440
has title: Get dynamic count of visible elements by class name in jQuery
tagged with: jquery
favorite count: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42208490
score: 1

http://stackoverflow.com/comment/42044665
score: 0
type: AnswerComment
type: Comment
has text: @DonnyP You can use `_.filter` as shown in other answers, which will give a new array without the unwanted elements. So, we can ditch the old array and start using the new array.
comment on: http://stackoverflow.com/a/26728071

http://stackoverflow.com/q/26692848
has answer: http://stackoverflow.com/a/26693093
has body: I just learnt about bxslider and made my first slideshow by reading the docs. But I cant see the right and left arrows on the images so that the next image can be shown by a click as shown in this example at: This Link Here is my code: New seven Wonders of the world Any reason why I can't see those 2 arrows which, when clicked, give the next or previous slide? I couldn't really find out anything different that I may have written or anything that I may have forgot.
has title: No arrow on images when using bxslider
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/33227800
accepted answer: http://stackoverflow.com/a/26693093
tagged with: css
has answer: http://stackoverflow.com/a/33227800
type: AnsweredQuestion
score: 3
upvote count: 3
tagged with: bxslider
type: Question
tagged with: javascript

http://stackoverflow.com/q/26711243
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26711782
favorite count: 0
upvote count: 138
possible better answer: http://stackoverflow.com/a/53953341
has comment: http://stackoverflow.com/comment/42014358
has answer: http://stackoverflow.com/a/26711782
tagged with: promise
has comment: http://stackoverflow.com/comment/85315843
has comment: http://stackoverflow.com/comment/84055323
type: Question
has title: Promise.resolve vs new Promise(resolve)
type: AnsweredQuestion
score: 138
tagged with: bluebird
has comment: http://stackoverflow.com/comment/42014422
has answer: http://stackoverflow.com/a/53953341
has body: I'm using bluebird and I see two ways to resolve synchronous functions into a Promise, but I don't get the differences between both ways. It looks like the stacktrace is a little bit different, so they aren't just an alias, right? So what is the preferred way? Way A function someFunction(someObject) { return new Promise(function(resolve) { someObject.resolved = true; resolve(someObject); }); } Way B function someFunction(someObject) { someObject.resolved = true; return Promise.resolve(someObject); }
answer count: 2

http://stackoverflow.com/comment/42106463
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26762375
has text: I also need to do basically the same thing on create actions; different header and the value will come from the model config.
score: 0

http://stackoverflow.com/comment/42062798
has text: OP is not responding. He can call validation method onsubmit or onchange event whatever he wish.
comment on: http://stackoverflow.com/a/26737485
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42111312
score: 0
has text: Make one site, and hide and show when user is logged in and has a certain role assigned to them (admin/not admin). In point 2) you presume wrong. You can show and hide features using sessions in php. Javascript is sort of icing on the cake but not a driving force for concealing extra functions and visuals to different user groups.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26764970

http://stackoverflow.com/a/26803941
upvote count: 1
score: 1
has body: You could use setTimeout. Make an element show up after 3 seconds http://jsfiddle.net/1cv9xsn5/1/ CSS .hidden { display:none; } HTML Won't show up for 3 seconds Javascript // attach to window.onload setTimeout(function(){ var modifiedClass = document.getElementById('threeSeconds').className.replace(/\bhidden\b/, ''); document.getElementById('threeSeconds').className = modifiedClass; }, 3000); Make an element disappear up after 3 seconds http://jsfiddle.net/1cv9xsn5/ CSS .hidden { display:none; } HTML Here I am, for three seconds JS: // attach to window.onload setTimeout(function(){ document.getElementById('threeSeconds').className += ' hidden'; }, 3000); You should attach the setTimeout to the window.onload event. If you attach to document.onload as suggested by davidkonrad, images and external content may not be loaded yet.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26803859
answers question: http://stackoverflow.com/q/26803859
type: Answer

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

http://stackoverflow.com/a/26762528
type: Answer
has body: A switch case may suit your needs: switch (parseInt($("#field_1_select_value").val(), 10)) { case 1: case 4: case 10: case 20: // do stuff break; default: // do something else break; }
downvote count: 0
score: 8
answers question: http://stackoverflow.com/q/26762467
upvote count: 8

http://stackoverflow.com/a/26834894
type: Answer
has body: You've got the right idea, but you've got your args to your callback backwards. router.param('user_id', function(res, req, next, user_id) { should be router.param('user_id', function(req, res, next, user_id) { The mixup results in you setting your fished out user object on the response object instead of the request object.
score: 0
answers question: http://stackoverflow.com/q/26831643

http://stackoverflow.com/a/26695176
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41999216
type: Answer
accepted answer of: http://stackoverflow.com/q/26694939
has comment: http://stackoverflow.com/comment/41997823
answers question: http://stackoverflow.com/q/26694939
downvote count: 0
has comment: http://stackoverflow.com/comment/41994195
has body: You can set the keypath via the array index and the property: function onItemChanged(id, newContet) { var posts = r.get('Posts'), index = -1 for(var i = 0; i &lt; posts.length; i++){ if(post[i].Id === id){ index = i break } } if(index !== -1){ r.set('Posts.' + index + '.Content', newContent) } // or if using "magic: true"** Posts[index].Content = newContent } See http://jsfiddle.net/pj6myzch/ for working example. ** http://docs.ractivejs.org/latest/magic-mode
score: 1
has comment: http://stackoverflow.com/comment/42056350

http://stackoverflow.com/q/26732195
answer count: 2
has comment: http://stackoverflow.com/comment/42052381
tagged with: internet-explorer-8
accepted answer: http://stackoverflow.com/a/26773571
tagged with: javascript
has title: Media Queries with Internet Explorer 8
has comment: http://stackoverflow.com/comment/42052659
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/42051772
favorite count: 0
tagged with: respond.js
has body: I'm trying to make media queries work on IE8 (Because my company use it, sad I know.) and I already found things like respond.js. The irritating thing is, when I use this link : http://scottjehl.github.io/Respond/test/test.html on IE8, it works perfectly...BUT ! When I download the lastest version of respond.js, and try to launch this exact same test.html page, it doesn't work ! I didn't edited anything, and even the test page written by Scott Jehl doesn't work. Some help please, before I go nuts. :|
upvote count: 1
has comment: http://stackoverflow.com/comment/42051685
has comment: http://stackoverflow.com/comment/42052102
possible better answer: http://stackoverflow.com/a/26759280
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26759280
score: 1
tagged with: media-queries
has answer: http://stackoverflow.com/a/26773571
type: Question

http://stackoverflow.com/comment/42010006
has text: is there a work around for me to get the data while working locally?
comment on: http://stackoverflow.com/a/26708610
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26793629
answer count: 1
tagged with: google-maps
has title: Displaying user location in a paragraph
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26793985
tagged with: jquery
has comment: http://stackoverflow.com/comment/42162481
type: Question
has comment: http://stackoverflow.com/comment/42162559
has body: When this page is loaded, an alert asks you if you would like to let the website use your current address. I want to change this code so that when the user clicks okay, the address is posted to a paragraph tag in the body instead of the alert. How would one go about this? Reverse Geocoding this is whats in my body section
has comment: http://stackoverflow.com/comment/42162253
score: 0
has comment: http://stackoverflow.com/comment/42162495

http://stackoverflow.com/q/26805726
has comment: http://stackoverflow.com/comment/42184636
type: Question
possible better answer: http://stackoverflow.com/a/26805779
answer count: 2
tagged with: javascript
tagged with: jquery
has title: OnClick event to change cell background
has comment: http://stackoverflow.com/comment/42185413
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26805782
accepted answer: http://stackoverflow.com/a/26805782
has answer: http://stackoverflow.com/a/26805779
has comment: http://stackoverflow.com/comment/42184588
tagged with: css
has body: Link to JsFiddle I'm having the need to change the cell's background color everytime the user click on it, but I can't get it to work! This is my script : $( function() { $('.tk099 td').click( function() { $(this).toggleClass("red-cell"); } ); } ); in which tk099 is the table's class, and I don't want any td tag which has a class be affected by the event. Is this possible? Thanks alot!
has comment: http://stackoverflow.com/comment/42185573
type: AnsweredQuestion
tagged with: onclick

http://stackoverflow.com/q/26675688
has answer: http://stackoverflow.com/a/57721671
has title: Best way to group adjacent array items by value
type: Question
has answer: http://stackoverflow.com/a/26675775
has body: Assume we have an array of values: [5, 5, 3, 5, 3, 3] What is the best way to group them by value and adjacency. The result should be as follows: [ [5,5], [3], [5], [3,3] ] Of course, I can loop through the source array and look for the next/previous item, and if they are the same, push them to a temporary array that will be then pushed to the resulting array. But I like to write code in functional way. So maybe there could be a better way?
upvote count: 5
tagged with: javascript
score: 5
tagged with: functional-programming
tagged with: arrays
downvote count: 0
accepted answer: http://stackoverflow.com/a/26675775
possible better answer: http://stackoverflow.com/a/26676135
favorite count: 0
has answer: http://stackoverflow.com/a/26676135
has answer: http://stackoverflow.com/a/57731664
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/q/26698282
type: Question
tagged with: javascript
tagged with: get
tagged with: rest
tagged with: api
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/43572358
type: UnansweredQuestion
score: 6
duplicate of: http://stackoverflow.com/q/2669690
upvote count: 6
answer count: 0
tagged with: http://stackoverflow.com/tag/json
has title: Why does Medium's API prepend while(1) to the JSONP response?
has body: just curious about https://medium.com I see that on their search page they make an automatic ajax GETrequest, I opened up my firebug(cause of curiosity) and get results as follows: (I typed the search phrase sen to trigger GET request to https://medium.com/search/all?q=sen. Note if you opened it, it won't work since it only expects ajax request) ])}while(1);&lt;/x&gt;{"success":true,"payload":{"value":{"posts":[{"id":"748b78360917","versionId":"9fbac25a3c7c","creatorId":"29fed3d34b82","homeCollectionId":"e196dfdf4b5d","title":"Nous sommes des clients, pas des usagers. Et ça change tout" // MORE JSON RESPONSE FROM SERVER.... now the question is not about the JSON part, I want to know what does ])}while(1);&lt;/x&gt; mean in the response? What's the purpose of this? Updated I know that while(1) is for infinite loop, but why doing this? Update I read the similar question, now I know the use of 'while(1)' is to prevent json hijacking, but the ' ])}while(1);' part is still confusing, why use '])}' and '' ? Isn't 'while(1)' enough?

http://stackoverflow.com/q/26743356
has comment: http://stackoverflow.com/comment/42072533
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42078686
has body: I'am trying to use a advent-calendar I found here: https://github.com/tpowell/jsadvent . It is set up for demo use, so that the the first door can be opened even if its not December. I got that working well. But when I try to make it check the date itself, all doors gets available what ever I try. Below is the code that (I think) checks the date: (function($) { /** CALENDAR ACTION **********/ // Sets Action on calendar click // Example with default overrides: $('ul.component-calendar').PINT_calendar({date:12 }); $.fn.PINT_calendar = function(options) { /** USER ADDED SETTINGS ( Pass into function/method call init ) **/ var settings = $.extend({ // Defaults date: 1, //new Date().getDate(); Set Limit Day ( all days before this selectable ) month: 12, //new Date().getMonth()+1; Sets which month to set this up for (i.e. December) fadeTiming: 300, // When you hover on a calendar day, this is the 'fade' animation speed daySlideDuration: 500 // When you click a calendar day, this is the 'slide' animation speed }, options); return this.each(function() { var calendar = $(this); calendar.find('li').each(function() { if (settings.month == 12 &amp;&amp; settings.date &gt;= parseInt($(this).find('.day').text(), 10)) { $(this).addClass('active'); } else { $(this).removeClass('active'); } }); The 2 lines where it says date:1 and month12 is where I think I'm supposed to remove the 2 slashes and the date:1 and month12, so that those lines begins with new Date().getDate() and new Date().getMonth(). Well, I tried this and it does not work. The code is originally from 2011, could it be that the script opens all doors because it is 2014 now? I've tried to find anything about the year, but can't find anything. Or am I just doing things wrong? Is there someone out there that knows what schould be done to make this code check date itself?
has title: Javascript advent calendar, trouble with finding date/month
tagged with: date
type: Question
has answer: http://stackoverflow.com/a/26774888

http://stackoverflow.com/a/26796154
score: 0
answers question: http://stackoverflow.com/q/26796090
has body: You must have all unique ids. Something like this will give you unique id's: <?php $i = 0; foreach($result as $row) { ?> '.$date.' <input type="hidden" id="message_id<?php echo $i; ?>" value="'.$row['mes_id'].'"> FROM: '.$row['firstname'].' '.$row['lastname'].' SUBJECT: '.$row['subject'].' '.$row['message'].' <?php $i++; } ?>
type: Answer

http://stackoverflow.com/a/26705473
type: Answer
has body: I think, direct print() method is disabled on devices by default. I not saw so many phones or other Android devices with printer, however by USB it should be possible of course. Instead, recommended is saving content/page as pdf and print it via some cloud print service.
answers question: http://stackoverflow.com/q/26684190
has comment: http://stackoverflow.com/comment/42004567
has comment: http://stackoverflow.com/comment/42004322
score: 0

http://stackoverflow.com/q/26754173
tagged with: mysql
type: Question
accepted answer: http://stackoverflow.com/a/26754281
answer count: 2
has title: Passing variables to Ajax requesting customer profile details
has body: Hi I am trying to create a system where a list of customers is being generated dynamically from a database. display_records.php while($row = $result-&gt;fetch(PDO::FETCH_ASSOC)){ $id = $row[‘id’]; &lt;a href=”#id=”&lt;?php echo $id ?&gt;” onclick="saveData(this.value)" id=”&lt;?php echo $id ?”&gt;view details&lt;/a&gt; } Within my button I have called a function to then pass on the id variable to an ajax request which carry’s over the variable id to get_customer_profile.php page which requested to query the database for the customer profile. function.js function saveData(url) { $(document).ready(function(){ $('.click').click(function(){ var target = $(this).attr("id"); var tag = $("&lt;div&gt;&lt;/div&gt;"); $.ajax({ url: "url", type: 'post', data: ({ mydata: target }), success: function(data) { tag.html(data).dialog({modal: true}).dialog('open'); } }); }); }); } The issue am having and if anyone can help is the id is not being picked up in my sql query I want the query to use the id and retrieve all the customer profile details by using the id of a single customer profile details to be displayed in a pop up box get_cusomer_profile.php $id = $_GET['mydata']; $query1 ="SELECT * FROM table WHERE id = $id"; However if I replace the $id to a value this would work. What am I doing wrong? Many Thanks
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42091312
score: 0
has answer: http://stackoverflow.com/a/26754281
has answer: http://stackoverflow.com/a/26754473
tagged with: php
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26754473

http://stackoverflow.com/comment/42105823
type: AnswerComment
comment on: http://stackoverflow.com/a/26761307
type: Comment
score: 0
has text: @MatthewHarwood: Yes, it will.

http://stackoverflow.com/comment/42134724
score: 0
has text: i have wrapped it to that div, but i dont rly know how to change that JS code, as i said, i am newbie with JS
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26778023

function-composition
type: Tag
tag name: function-composition
tags question: http://stackoverflow.com/q/26777671

http://stackoverflow.com/comment/41955810
type: QuestionComment
has text: Could you limit the height of the containers, then user `overflow: scroll` so that users can scroll within each container to see all of the content?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26678345

http://stackoverflow.com/a/26770684
has comment: http://stackoverflow.com/comment/42121722
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42124077
answers question: http://stackoverflow.com/q/26770598
has comment: http://stackoverflow.com/comment/42124096
has body: The continue is confusing used like this, but I have a feeling your code is probably throwing an error because the cont might exceed the array length. Regardless of whether this fixes it or not I'd at least add a check to ensure that it doesn't throw an exception. Please check for exceptions being thrown through web dev tools (F12 in Chrome). for(var i = 0; i &lt; childArray.length; i++) { var check = document.getElementById(pasos+ "-CheckBox-" +j); if(check.type == 'checkbox' &amp;&amp; check.checked==true &amp;&amp; arrayp.length &lt;= cont) { arrayp[cont] = check.value; var algo = arrayp[cont]; alert(arrayp[cont]); alert(arrayp); cont++; continue; }; }
has comment: http://stackoverflow.com/comment/42124250

http://stackoverflow.com/q/26725334
has title: JavaScript - Using selenium-webdriver what returns the inner html to a variable?
accepted answer: http://stackoverflow.com/a/26748530
has body: Here are a few examples I have tried based on my past Python projects (here I am using JavaScript)... var eltext = driver.findElement(webdriver.By.className('el')).text; console.log(elname); var eltext = driver.findElement(webdriver.By.className('el')).innerText; console.log(elname); var eltext = driver.findElement(webdriver.By.className('el')).innerHTML; console.log(elname); I have also tried a few other ways using String(), JSON.stringify(), and various for loops, spinning out on my options. I can do a .click() and this object is clickable, so I know my selector is right, but the accessing the inner text in JavaScript is an issue.
has answer: http://stackoverflow.com/a/26725364
tagged with: selenium-webdriver
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26725364
tagged with: selenium
type: Question
has answer: http://stackoverflow.com/a/26748530
tagged with: javascript
score: 0
answer count: 2

http://stackoverflow.com/q/26767696
has comment: http://stackoverflow.com/comment/42116818
has comment: http://stackoverflow.com/comment/42117234
has comment: http://stackoverflow.com/comment/42117796
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42117409
has comment: http://stackoverflow.com/comment/42116910
tagged with: http://stackoverflow.com/tag/html
tagged with: web
has title: HTML CSS Footer does something weird when positioning
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26767832
tagged with: css
has comment: http://stackoverflow.com/comment/42116567
has body: I am trying to make the footer move with the content. It works, but it does something very weird. When I set the position of the footer to "relative" it moves with the content as it should, but it ruins the background image as seen in the image below. If I set it back to absolute, it will be back to normal but it won't move with the content. Seems like the bottom div won't float over the other content. HTML: Hello there! CSS: div.wrapper { min-height:100%; min-width: 1280px; position:relative; /*most likely the problem. There's a dispute between this and the footer attribute*/ } div.top { height:100px; background-color:grey; background-repeat: repeat-x; background: url('images/top.png'); } div.middle { background-color:blue; background-repeat: repeat; background: url(images/bg_middle.png); height: 100%; width: 100%; } div.content { background: url(images/content.png); width: 800px; padding: 10px; border: 1px solid #373737; margin: 0; word-wrap: break-word; margin-left: auto ; margin-right: auto ; box-shadow: 2px 2px 2px #000000; } div.bottom { height:78px; width: 100%; background-color:white; background-repeat: repeat-x; background: url(images/bottom.png); position:relative; /* Conflicts with the wrapper. */ bottom:0; left:0; } Image with position:absolute Image with position: relative
has answer: http://stackoverflow.com/a/26767802
has comment: http://stackoverflow.com/comment/42116689
type: Question
has comment: http://stackoverflow.com/comment/42116345
tagged with: javascript
has comment: http://stackoverflow.com/comment/42116893

http://stackoverflow.com/comment/42116558
type: Comment
comment on: http://stackoverflow.com/a/26764665
score: 1
type: AnswerComment
has text: In case you're interested here's the commit that made the change... https://github.com/angular/angular.js/commit/bdfc9c02d021e08babfbc966a007c71b4946d69d

http://stackoverflow.com/q/26741445
type: Question
has comment: http://stackoverflow.com/comment/42068829
upvote count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/12506329
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: How to change title of page based on drop down menu items in AngularJS
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: php
has body: I have an html file that displays a drop down menu of categories that I am getting from a remote database using a php script via an Ajax call. I want to be able to change the title of this html page to the name of the item that I click in the drop down menu. For example, if I click on Heating and cooling in the drop down menu, I want it to change the title of the page to 'Heating and cooling'. I have been googling around for answers, but so far I am only left with more confusion. Btw I am doing this in angularJS. Here is my html file: Awesome things Click me to see some awesome things! <a href>{{category}} Here is my MainController file 'main.js': angular.module('yostartupApp') .controller('MainCtrl', function ($scope, $http) { $scope.awesomeThings = [ 'HTML5 Boilerplate', 'AngularJS', 'Karma', 'SitePoint' ]; $scope.status = { isopen: false }; $scope.toggled = function(open) { console.log('Dropdown is now: ', open); }; $scope.toggleDropdown = function($event) { $event.preventDefault(); $event.stopPropagation(); $scope.status.isopen = !$scope.status.isopen; }; //making ajax calls -- current step I'm working on DOES NOT WORK!!!! $http.get('http://test.s17.sevacall.com/abhas/index.php'). success(function(data, status, headers, config) { console.log(data);//debug $scope.categories = data; }). error(function(data, status, headers, config) { //log error }); }); Any help would be greatly appreciated! Thanks in advance!
has answer: http://stackoverflow.com/a/26742453
score: 1

http://stackoverflow.com/comment/42161633
has text: @ShawnErquhart : you could check http://javascriptissexy.com/understand-javascript-closures-with-ease/
comment on: http://stackoverflow.com/a/26793169
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42068656
score: 0
type: Comment
type: QuestionComment
has text: Similar question here: http://stackoverflow.com/questions/26660495/can-i-get-the-compiled-html-of-an-angular-element/26660649#26660649
comment on: http://stackoverflow.com/q/26741201

http://stackoverflow.com/comment/42019304
comment on: http://stackoverflow.com/q/26714390
has text: I have found this question, but it works with Grunt (http://stackoverflow.com/questions/20337819/change-link-or-script-filename-in-html-after-gruntjs-minify-uglify)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26692485
favorite count: 0
tagged with: video.js
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/mp4
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26763524
has body: This works fine in Chrome and Opera, but not in Firefox and IE. I don't know the problem, I have no errors in console. After clicking on Play button there is nothing happend (play button disappears and thats all). Style: .vjs-default-skin .vjs-playtoggle-control, .vjs-default-skin .vjs-progress-control, .vjs-default-skin .vjs-time-controls, .vjs-default-skin .vjs-time-divider, .vjs-default-skin .vjs-captions-button, .vjs-default-skin .vjs-volume-control, .vjs-default-skin .vjs-play-control, .vjs-default-skin .vjs-fullscreen-control { display: none; } .vjs-control-bar { visibility: visible !important; opacity: 1 !important; transition-duration: 0s!important; } HTML &lt;div id='container'&gt; &lt;video id='movie_container' class='video-js vjs-default-skin vjs-big-play-centered' data-setup='{}' preload='none' controls height='360px' width='640px'&gt; &lt;/video&gt; &lt;/div&gt; JS _V_.options.flash.params = { allowfullscreen: "true", wmode: "transparent", allowscriptaccess: "always" }; var videojs_player; window.player = videojs("movie_container", { techOrder: ["flash", "html5"] }, function() { videojs_player = this; videojs_player.src({ src: "http://video-js.zencoder.com/oceans-clip.mp4", type: 'video/mp4'}) videojs_player.pause = function() {}; function myFunc() { //finish } function myFunc2() { //start } videojs_player.on('ended',myFunc); videojs_player.on('play',myFunc2); });
tagged with: javascript
has title: Video.js doesn't work in FF, IE
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42031910

http://stackoverflow.com/a/26699513
has comment: http://stackoverflow.com/comment/41993101
has comment: http://stackoverflow.com/comment/41995770
has comment: http://stackoverflow.com/comment/41992825
score: 1
upvote count: 1
has body: do not use the selector element , on assignment: Change is: var input = document.getElementById('discountvalue'), discount12 = parseInt(input.value); To: var input = document.getElementById('discountvalue'); discount12 = input.value; There are also two statement, line 4, 83. Simplified: function recordToFilename() { discount12 = parseInt(document.getElementById('discountvalue').value, 10); };
accepted answer of: http://stackoverflow.com/q/26699351
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26699351
has comment: http://stackoverflow.com/comment/42213934
type: Answer

http://stackoverflow.com/comment/42101364
score: 0
type: AnswerComment
type: Comment
has text: @RutwickGangurde now I'm completely confused what are you looking for
comment on: http://stackoverflow.com/a/26758170

http://stackoverflow.com/comment/42120201
comment on: http://stackoverflow.com/q/26769790
has text: I posted an answer below. Hopefully that works for you.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42063744
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26738943
has text: No exception involved; `nodal = (typeof window === 'undefined');`

http://stackoverflow.com/q/26715897
duplicate of: http://stackoverflow.com/q/500504
has comment: http://stackoverflow.com/comment/42022110
score: 0
tagged with: javascript
tagged with: jquery
has title: Uncaught type error when looping through objects
type: UnansweredQuestion
has body: My code is like var persons = []; function Person(id, name) { this.id = id; this.name = name; } When I am trying to loop throught all persons, I'm getting an uncaught TypeError: Cannot read property "name" of undefined. for (var person in persons) { console.log(persons[person]); } I noticed that my console is logging all persons and adding an property values after them [Person, $family: function, $constructor: function, each: function, clone: function, clean: function…] I'm pretty sure that that the code is breaking after looping the first person. I'm using jquery-1.11.1.js Any ideas how to get rid of this error? Thank you in advance.
has comment: http://stackoverflow.com/comment/42022178
linked to: http://stackoverflow.com/q/500504
answer count: 0
type: Question

http://stackoverflow.com/comment/42046454
has text: set the width and height of the canvas using js. canvas element won't consider % value while drawing..The width attribute defaults to 300, and the height attribute defaults to 150..
comment on: http://stackoverflow.com/q/26729057
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42208840
comment on: http://stackoverflow.com/a/26819346
has text: Thank you so much! But I want an Image to be on the bottom of the page, so visitors can read 'ADS' so when they hover the image, the AD appears. How can I do that? Thanks again
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26798365
tagged with: javascript
has body: Here in below script if i run the part 2 which is current commented it will load static data and chart is displayed fine, but when i call the function delivery_by_owner() to load data dynamically i can't do it why??? data is coming exactly as i needed from ajax call. i can't update morris chart. &lt;script&gt; function delivery_by_owner() { var from_date=$('#from_owner').val(); var to_date=$('#to_owner').val(); var transporter=$('#transporter').val(); var vehicle=$('#vehicle').val(); var response; console.log(vehicle); //alert(from_date+to_date+transporter+vehicle); $.post("ajax_handler.php",{"operation":"owner_graph","from":from_date,"to":to_date,"transporter":transporter, "vehicle":vehicle},function(data){ response=$.parseJSON(data); }); { Morris.Line({ element: 'report2', data: [ for(var i=0;i&lt;response.length;i++) { { y: response[i][0], a: response[i][1]}, } ], xkey: 'y', ykeys: ['a'], labels: ['Total'], lineColors:['#1FB5AD'] }); } } ////////////////// part 2 ////////////////////////// /*{ Morris.Line({ element: 'report2', data: [ { y: '23 Feb', a: 200, b: 160, c: 133}, { y: '24 Feb', a: 200, b: 160, c: 133}, { y: '25 Feb', a: 200, b: 160, c: 133}, { y: '26 Feb', a: 200, b: 160, c: 133}, { y: '27 Feb', a: 200, b: 160, c: 133}, { y: '28 Feb', a: 200, b: 160, c: 133}, { y: '29 Feb', a: 225, b: 200, c: 147}, { y: '1 Mar', a: 231, b: 170, c: 160}, { y: '2 Mar', a: 235, b: 175, c: 150}, { y: '3 Mar', a: 228, b: 160, c: 130}, { y: '4 Mar', a: 230, b: 130, c: 140}, { y: '5 Mar', a: 245, b: 140, c: 160}, { y: '6 Mar', a: 225, b: 150, c: 130}, ], xkey: 'y', ykeys: ['a', 'b', 'c'], labels: ['Total', 'Total', 'Total'], lineColors:['#1FB5AD', '#fc8675', '5ab6df'] }); } */&lt;/script&gt;
score: 0
type: AnsweredQuestion
has title: Morris Chart not working for data returned by ajax
linked to: http://stackoverflow.com/q/24768721
has answer: http://stackoverflow.com/a/26799571
accepted answer: http://stackoverflow.com/a/26799571
type: Question
tagged with: charts
answer count: 1

http://stackoverflow.com/comment/42178255
score: 0
comment on: http://stackoverflow.com/q/26801781
type: Comment
type: QuestionComment
has text: I don't want my competitors to copy my database. The information is not private, I just spend a great deal of time building the database and I'm not intereated in someone just grabbing the raw data

http://stackoverflow.com/comment/42132432
comment on: http://stackoverflow.com/q/26761560
score: 0
has text: @jrummell at the bottom of the page body section?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26713006
tagged with: javascript
has answer: http://stackoverflow.com/a/26715953
score: 0
answer count: 1
has body: I am designing contact list which is ordered in alphabetic order. {{user.name}} {{user.cellPhone}} - It is showing a a1 b c d . . z I want this details shown as a a1 ---- b ---- c ---- . . For every starting of alphabetic order, I need one border and First letter of that word shown in Top. It will be like Android Phone Contact List
tagged with: angularjs
has title: Contact list separation on Angular JS
type: UnansweredQuestion
type: Question

http://stackoverflow.com/q/26687069
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26687153
score: -1
downvote count: 1
has body: I can not replace option tag to optgroup tag using Jquery replaceWith. The code i tried so far, India Bombae Chennai US California Delaware var oSrc = document.getElementById('SelectboxId') for (var i = 0; i < oSrc.options.length; i++) { if (oSrc.options[i].text=="India" | oSrc.options[i].text=="US") { $("#SelectboxId").find('option[value="India"]').replaceWith(' India '); $("#SelectboxId").find('option[value="US"]').replaceWith(' US '); } } Note : There is a way India but i want to do using replaceWith dynamically. Tell me where i am wrong in my code?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26687153
has title: replaceWith not working for option to optgroup
type: Question
possible better answer: http://stackoverflow.com/a/26687158
answer count: 2
has answer: http://stackoverflow.com/a/26687158
upvote count: 0

http://stackoverflow.com/comment/42203493
type: Comment
type: QuestionComment
has text: The interpreter doesn't even reach to the `if` statements. If you want to use jQuery methods you should at first create a jQuery object.
comment on: http://stackoverflow.com/q/26816415
score: 0

visual-studio-2012
type: Tag
tags question: http://stackoverflow.com/q/26733729
tags question: http://stackoverflow.com/q/26817505
tag name: visual-studio-2012

http://stackoverflow.com/q/26764850
type: Question
possible better answer: http://stackoverflow.com/a/26764996
linked to: http://stackoverflow.com/q/2901102
downvote count: 0
accepted answer: http://stackoverflow.com/a/26764980
tagged with: javascript
tagged with: regex
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/42110750
has title: Add Comma Function in JavaScript is Too Greedy
has answer: http://stackoverflow.com/a/26764980
has comment: http://stackoverflow.com/comment/42110664
answer count: 4
score: 2
has body: How can I modify the function below to make it stop adding commas once we hit the decimal marker? addCommas = function(number) { if(number === undefined) { return ''; } while(/(\d+)(\d{3})/.test(number.toString())) { number = number.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2'); } return number; } addCommas(0.123456); // Outputs 0.123,456, should output 0.123456
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26765338
has answer: http://stackoverflow.com/a/26764985
has comment: http://stackoverflow.com/comment/42110776
has answer: http://stackoverflow.com/a/26764996

http://stackoverflow.com/a/26731143
has body: I usually use this gem - https://github.com/fnando/i18n-js. It behaves much like native Rails I18n. After configuring the gem (check the readme at github) you add to the end of your layout (example is in Haml) = javascript_tag do I18n.defaultLocale = "#{I18n.default_locale}" I18n.locale = "#{I18n.locale}" to set default and current locales and then you can use I18n in javascript (and coffeescript) as follows (some examples from the readme): I18n.t("some.scoped.translation") I18n.l("time.formats.short", "2009-09-18 23:12:43") Also passing parameters to translations is supported. Considering you have a translation en: users: greet: "Hello %{name}!" you can do this I18n.t("users.greet", {name: 'Nick'}) and you'll get as a result Hello Nick! You'll find much more examples following the link above.
type: AcceptedAnswer
type: Answer
score: 8
downvote count: 0
answers question: http://stackoverflow.com/q/26710122
upvote count: 8
accepted answer of: http://stackoverflow.com/q/26710122

http://stackoverflow.com/comment/42152153
type: Comment
comment on: http://stackoverflow.com/a/26787746
has text: @Ragnar — That overrides the content-type of the response. It should be avoided in having the response send the correct content type. It certainly won't help when the response is Bad Request.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42230433
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26831923
has text: Ahhh, ok. So I could either put it in the ` ` or I can put it in this part of the HTML? (Are they the same thing)?
type: AnswerComment

http://stackoverflow.com/a/26702652
has body: There are multiple downsides, but performance is not likely to be one of them. What if two libraries have a map() function and the behaviors are slightly different? If they both put their map() in the global space, you won't be able to access one of them. And you might not be able to easily know that the map() you actually want has been overwritten. By the way, map() and filter() are part of recent-ish JS implementations, but even there, they are part of the prototype of the objects that use them. So you have Array.prototype.map() and Array.prototype.filter().
downvote count: 0
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/26702562
has comment: http://stackoverflow.com/comment/41999070
score: 2

http://stackoverflow.com/comment/42124510
type: AnswerComment
has text: Thanks this was the precise thing i was wanting...
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26742670

http://stackoverflow.com/q/26793770
has answer: http://stackoverflow.com/a/26793790
has title: Javascript inheritance - overlapping base class variables
type: Question
score: 0
has body: I am trying to create a custom javascript form validator. I am starting by creating an input validator base class, and I am extending this base class to handle more specific input types. For example, income and zipcode. Current structure is as follows: Base Class = InputValidator, Sub Classes: Income, ZipCode Things are working as expected when I create only one instance of Income. However, if I also create an instance of ZipCode, it appears to overwrite the base class of Income. To see this in action, I have created a JSFiddle. http://jsfiddle.net/tpdietz/wy274ymb/3/ If you type in anything other than a digit for the annual income input, you should see a warning drop down above the income input. This is what I want. However, if you uncomment line 48 in the jsfiddle, re run it, and try the same thing. You will see that typing in something incorrect for the annual income, invokes the zip code warning. As expected, typing in something other than a digit for the zip code does the same thing. Here is how I am declaring the sub classes: var Income = function (incomeElement, warningElement) { InputValidator.call(this, incomeElement, warningElement, isInteger); this.isValid = function() { return valid; } } var ZipCode = function (zipCodeElement, warningElement) { InputValidator.call(this, zipCodeElement, warningElement, isInteger); this.isValid = function() { return valid &amp;&amp; ele.val().length &lt; 6 &amp;&amp; ele.val().length &gt; 2; } } and here is how I declare the base class: var InputValidator = function (element, warningElement, validatorIn) { this.name = name; ele = element; warning = warningElement; validator = validatorIn; valid = false; ele.keyup(function() { if(!validator($(this).val())) { showWarning(); valid = false; } else { hideWarning(); valid = true; } }); function showWarning() { warning.slideDown(); } function hideWarning() { warning.slideUp(); } } Does anybody have any idea why this is happening? I thought I had a grasp on how this should work. T…
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: inheritance
accepted answer: http://stackoverflow.com/a/26793790
tagged with: subclass
type: AnsweredQuestion

http://stackoverflow.com/q/26795766
tagged with: express
tagged with: cassandra
score: 0
has answer: http://stackoverflow.com/a/26795855
tagged with: node.js
answer count: 4
accepted answer: http://stackoverflow.com/a/26795884
has body: I am reading a row from a table(emp) in cassandra. I am trying to pass the result from js file to jade file to present the data on the user interface. I have the js function as below router.get('/cassandra', function (req, res) { client.connect(function(err){ }); client.execute('SELECT * FROM monica.emp WHERE empid= 324;', function (err, result) { var user = result.rows[0]; console.log("here is the user", user.empid, user.firstname); res.render('cassandra',{"cassandra":user}); }); }); my log is reading the result. But i am unable to pass the same to the UI from the jade file. Below is my Jade File extends layout block content p Cassandra for i in cassandra .c=i.empid+" "+i.deptid I am getting a display something like below Can someone please help me with where I am going wrong over here?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26809032
has answer: http://stackoverflow.com/a/26795828
has title: unable to pass data from js to jade in node.js
type: Question
possible better answer: http://stackoverflow.com/a/26795828
has answer: http://stackoverflow.com/a/26795884
tagged with: pug
tagged with: javascript

http://stackoverflow.com/q/26695593
tagged with: javascript
has body: JSBin here: http://jsbin.com/cusisidoja/1/edit?html,js,output I'm trying to POC a context menu that will pop up given certain keywords are entered in a textarea element. The idea is to implement functionality similar to the way code completion drop-downs work in an IDE. I realize the scope of this project so the details of the keywords and menu contents aren't important right now. What I'm trying to figure out is how to locate the caret position as the user is typing. So stepping back and breaking the problem down into its most fundamental component: How can I get the caret position of a textarea in terms of x,y coordinates that are meaningful to CSS styling? I threw together a JSBin with (what I believe to be) a decent shell for watching/updating the scope of a div when text is changed in the textarea: http://jsbin.com/cusisidoja/1/edit?html,js,output I know this is a far cry from what I'm trying to do, but it's as far as I can get given what I currently understand. I'm also open to the possibility that the only way to accomplish this would be either through external libraries or by use of jQuery, but I don't even know where to begin.
upvote count: 1
has answer: http://stackoverflow.com/a/26695859
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41986234
tagged with: http://stackoverflow.com/tag/html
has title: Make a div follow caret position in a textarea?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41986425
downvote count: 0
score: 1
type: Question
accepted answer: http://stackoverflow.com/a/26695859

http://stackoverflow.com/a/26825410
type: AcceptedAnswer
has body: Most mobile browsers do not allow .focus() to behave as expected unless called from a user-interaction event. For example if you called it in an onclick event it would work but if called in onload it will not. This is not specific to Kik but rather mobile browsers in general.
answers question: http://stackoverflow.com/q/26825115
type: Answer
accepted answer of: http://stackoverflow.com/q/26825115
has comment: http://stackoverflow.com/comment/42219830
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/a/26762678
answers question: http://stackoverflow.com/q/26761875
score: 0
has body: This worked perfectly for me location.href = "@Url.Action("Action","Controller")?param1=" + value1+ "&amp;param2=" + value2;
has comment: http://stackoverflow.com/comment/42140779
type: Answer

http://stackoverflow.com/a/26788731
answers question: http://stackoverflow.com/q/26786460
type: Answer
accepted answer of: http://stackoverflow.com/q/26786460
score: 18
upvote count: 18
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/103572885
has body: Print Dialog After playing around (and some googling), I came out with this solution: I added a non-printable class to the current view and a printable class to the printable container element. In my CSS, I used css media queries where @media screen and @media print states contains the corresponding display behavior: @media screen { .printable { display: none; } .non-printable { display: block; } } @media print { .printable { display: block; } .non-printable { display: none; } } Now, I can print new content from my current view without opening a new tab or changing my current view. Check out this jsFiddle and the supported browser's list.

http://stackoverflow.com/comment/41981959
score: 0
comment on: http://stackoverflow.com/q/26692629
type: Comment
type: QuestionComment
has text: Several tips: 1. Try putting console.log statements to see that the lat/lng values are indeed what you expect them to be. 2. Try use the `parseFloat` function, since the values you get from the request are probably strings, and it could be that the $near operator expects numbers.

http://stackoverflow.com/comment/42226664
has text: See my entire file `dialog.js` here: http://pastebin.com/0SNLmJkw
score: 0
comment on: http://stackoverflow.com/q/26829686
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26805396
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26813211
tagged with: regex
has comment: http://stackoverflow.com/comment/42198313
type: UnansweredQuestion
upvote count: 1
has body: A function I put together (which runs but doesn't validate under JSLint) is as follows: function toNumber(str) { str = str.toString().replace(/[^0123456789.-]/g,''); if (str == "") {return 0;} return parseFloat(str); } This is intended to take any given string and convert it to a number for use elsewhere in my javascript. Example runs as follows: toNumber("5") => 5 toNumber("3,276") => 3276 toNumber("-14b396Z") => -14396 The problem here is when I try to validate it with JSLint I get two errors I cannot resolve. line 25 character 36 str = str.toString().replace(/[^0123456789.-]/g,''); Insecure '^'. line 25 character 48 str = str.toString().replace(/[^0123456789.-]/g,''); Unescaped '-'. I know I can turn on the "and [^...] in /RegExp/" to ignore the first error, but that still leaves me with the second. What would be the best way to solve both errors? I figure if I'm going to rewrite this anyway I might as well do so for both errors instead of just turning a blind eye to the 'Insecure' nature of using ^. Thank you, - Aaron Nichols
has comment: http://stackoverflow.com/comment/42184888
has title: JSLint and my Javascript - Best practices on making this script conform
score: 1
type: Question
downvote count: 0
tagged with: jslint
answer count: 1

http://stackoverflow.com/a/26710068
downvote count: 0
answers question: http://stackoverflow.com/q/26709848
accepted answer of: http://stackoverflow.com/q/26709848
upvote count: 2
type: Answer
has body: When you called loadToolBar.addImgBtn() the funciton, addImgBtn, is not yet assigned to loadToolBar.prototype. You need to run your class declaration then execute it. I'll write like: var jQuery = jQuery.noConflict(); function loadToolBar(fileBody) // Class definition { var toolBar = document.createElement("div"); toolBar.className = "oasys-toolbar"; toolBar.id = "oasys-toolbar"; jQuery(toolBar).insertBefore("#" + fileBody); } /*--------------------- Prototypes------------------------*/ loadToolBar.prototype.addImgBtn = function(itemID, itemPath) { var newIcon = document.createElement("img"); newIcon.id = itemID; newIcon.src = itemPath; newIcon.className = "oasys-toolbar-item oasys-toolbar-btn"; document.getElementById('oasys-toolbar').appendChild(newIcon); }; loadToolBar.prototype.zoom = function(containerID, size) { jQuery("#" + containerID + " *").css("font-size", size); }; jQuery(function() { // This function runs after `document.ready`. But your constrator don't need to declare after dom ready var sampTool = new loadToolBar('pageContent'); sampTool.addImgBtn("fontMore", "img/plus.png"); // Uncaught TypeError: undefined is not a function sampTool.addImgBtn("fontLess", "img/minus.png"); sampTool.addImgBtn("printPage", "img/printer.png"); jQuery('#fontMore').click(function() { sampTool.zoom('pageContent', '+=2px'); }); jQuery('#fontLess').click(function() { sampTool.zoom('pageContent', '-=2px'); }); });
score: 2
type: AcceptedAnswer

http://stackoverflow.com/q/26728964
has title: AmChart is not working in safari
has body: I have json object which i pass to AmCharts.makeChart() function as a data provider and it shows proper graph in firefox, chrome and ie but not in safari I also see that json data in console but still graph not comes I had used amchart.js, serial.js Thanks in advance...
tagged with: amcharts
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26795224
has answer: http://stackoverflow.com/a/72161720
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/26702212
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
tagged with: cordova
has title: jQuery Mobile Windows Store App: JavaScript runtime error: Unable to get property 'indexOf' of undefined or null reference
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26707737
has body: I am porting an existing app to the new windows-plattform in Cordova. Or am trying. My problem now is, that while jquery runs fine - thanks to winstore.js - I always get a jquery Mobile error. JavaScript runtime error: Unable to get property 'indexOf' of undefined or null reference This leads to a crash of my app, which is kind of annoying, because this error is not mine and on the old wp8-platform it was running just fine. Any ideas?
tagged with: windows-phone-8
type: Question

http://stackoverflow.com/comment/41964166
score: 0
has text: @diggy Its using Yoast's SEO plugin
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26678260

http://stackoverflow.com/comment/42206730
score: 1
has text: Can you create all your classes before-hand and simply use javascript to change the class instead of CSS properties?(to avoid inline styles)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26818300

http://stackoverflow.com/a/26745527
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26745473
has body: your code would be something like this (open to modifications) $(document).ready(function() { $(".thumb").hide(); $(".thumb").first().show(); $(document).on('mouseenter',".text",function(){ $(this).prev(".thumb").show(); }) $(document).on('mouseleave',".text",function(){ $(this).prev(".thumb").hide(); }) });
accepted answer of: http://stackoverflow.com/q/26745473
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/q/26739815
accepted answer: http://stackoverflow.com/a/26740174
has comment: http://stackoverflow.com/comment/42066065
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26740197
answer count: 2
has answer: http://stackoverflow.com/a/26740197
has body: I'm reading off an xml file with the following script: var varReverse = false; $(xmlData).find('localoffer').each(function(){ // .... }); Based on the variable varReverse being true or false how do I update the above so it dynamically changes the script as below: var varReverse = true; $(xmlData).find('localoffer').reverse().each(function(){ // ... }); I have already got the plugin: jQuery.fn.reverse = [].reverse; To handle the reversing of the xml Thank you in advance
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26740174
has title: Adding in a function to my xml call
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42065936
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/a/26811297
type: Answer
upvote count: 6
has body: When you use [] to index into a jQuery set, what you get back is a DOM element, not a jQuery set. But attr is a jQuery function, not a DOM function. Either use eq so you're getting a jQuery set containing just that one element, and can use attr: $( ".icon-image" ).eq(index).attr('src', '/folder/newimage.jpg'); (Or .prop('src', ...), in this particular case it comes to the same thing.) ...or use [] and use the reflected DOM property src on the resulting DOM element: $( ".icon-image" )[index].src = '/folder/newimage.jpg';
score: 6
answers question: http://stackoverflow.com/q/26811224
accepted answer of: http://stackoverflow.com/q/26811224
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42143376
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26782642
type: Comment
has text: Yes you solution will work. But `autoplay` can be `false` for other ID. @diggy

http://stackoverflow.com/comment/42504958
score: 0
comment on: http://stackoverflow.com/a/26965503
type: Comment
has text: I am keeping all of the html tags on the same line. It is breaking it up once rendering after the first tick ' before the .. See anything above that seems incorrect? Thanks!
type: AnswerComment

http://stackoverflow.com/comment/49465458
has text: Try to avoid triggering $apply on every item. When you will have alot data this will trigger many digest cycles and as your watchers increase you will end up with an unresponding app.You can trigger apply on every 1000(or more) items you get or something like that.
comment on: http://stackoverflow.com/q/26828571
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26751555
tagged with: google-chrome-app
tagged with: file-io
has title: <Chrome App> How can I create a FileEntry without picking a file/directory from dialog?
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26766275
upvote count: 1
has comment: http://stackoverflow.com/comment/42087908
type: AnsweredQuestion
score: 1
tagged with: google-chrome
type: Question
accepted answer: http://stackoverflow.com/a/26766275
has body: So far, I know I can get a fileEntry for read/write through chrome.fileSystem.chooseEntry, but this will popup a fileManager to let user choose a file/directory. What I want is I can give a path to chooseEntry or other way to create a fileEntry using code, not a entry provided by fileManager Dialog. var entry; chrome.fileSystem.chooseEntry({type: 'openDirectory'}, function(fe){entry=fe;}); // This will call a file manager to let user select file which I want avoid // instead I want to create a entry using a path string, like 'D:\test' dirReader = entry.createReader() dirReader.readEntries(function(r){ console.log(r); }, function(){console.error(' ')});
tagged with: javascript

http://stackoverflow.com/q/26715230
score: 2
type: AnsweredQuestion
tagged with: less
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26715351
has comment: http://stackoverflow.com/comment/44473026
tagged with: asynchronous
tagged with: gulp
favorite count: 0
has body: How can I tell Gulp to run a task first before another? For instance, I need to crunch .less file into a .css first, // Crunch less into css. gulp.task('less', function () { return gulp.src([ 'css/myless.less' ]) .pipe(less().on('error', function (err) { console.log(err); })) .pipe(cssmin().on('error', function(err) { console.log(err); })) .pipe(rename({suffix: '.less'})) .pipe(gulp.dest('css/')); }); Then concat it with other normal .css files, var concat = require('gulp-concat'), minifyCSS = require('gulp-minify-css'), clean = require('gulp-clean'); // CSS concat, auto-prefix and minify gulp.task('styles', function() { gulp.src([ 'css/myless.less.css', 'css/normal.css' ]) .pipe(concat('main.css')) .pipe(minifyCSS()) .pipe(gulp.dest('css/')); }); Run task, gulp.task('default', ['less', 'styles'], function() { }) It only optimise 'css/normal.css', but not does not concat it with 'css/myless.less.css'. What should I do?
upvote count: 2
has title: Gulp callback - How to tell Gulp to run a task first before another?
tagged with: css
accepted answer: http://stackoverflow.com/a/26715351

http://stackoverflow.com/q/26794973
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26795183
tagged with: javascript
score: 0
has body: I want to put value from db to anchor tag in Bound field of GridView Here is my code. <asp:BoundField DataField="u_id" ControlStyle-CssClass="bg-darkGreen" HeaderText="ID" ReadOnly="True" SortExpression="u_id" HtmlEncode="false" DataFormatString=" u_id" > But it is not showing value from db , it just showing U_id throughout the column.Is there any logic exists which take value from DataField and put in anchor tag.
answer count: 1
tagged with: asp.net
has title: Bound Field anchor tag
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26795183
tagged with: gridview

http://stackoverflow.com/a/26746685
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26746538
score: 1
has body: I would say that you set a global variable in the window.open_procs = 0; then at the beginning of each ajax call you increment it, then in the function you execute as the result of each ajax call, decrement it. After you kick off the last ajax call then start your watcher process in a timeout that checks the window.open_procs to equal 0 before doing anything.

http://stackoverflow.com/comment/41955930
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26678435
has text: The code doesn't work if I don't remove the white space.

http://stackoverflow.com/comment/42054767
type: AnswerComment
score: 1
has text: As I wrote - there are good reasons why CKEditor has its own styles system. Native commands are implemented differently in every browser (it doesn't make any difference if it's modern or not). Check for example what elements are used to create bold.
type: Comment
comment on: http://stackoverflow.com/a/26717966

http://stackoverflow.com/comment/42002527
score: 0
type: AnswerComment
has text: Yeah unfortunately when I send my JSON data from PHP, I have to break the assoc array and rebuild it (so I can encode BLOBs). So it ends up coming back nested like that.. [ {}, {}... ]
type: Comment
comment on: http://stackoverflow.com/a/26704443

http://stackoverflow.com/comment/42109718
comment on: http://stackoverflow.com/q/26764399
type: Comment
type: QuestionComment
has text: Change the 1 tot 1000. You'll see that it won't go in sequence. It's due to the processing speed.
score: 1

http://stackoverflow.com/q/26740737
has title: In javascript how to add or remove 's' from a quantity string
has comment: http://stackoverflow.com/comment/42067582
type: Question
tagged with: replace
has comment: http://stackoverflow.com/comment/42067508
has answer: http://stackoverflow.com/a/26740848
downvote count: 0
tagged with: javascript
tagged with: string
accepted answer: http://stackoverflow.com/a/26740845
has answer: http://stackoverflow.com/a/26740822
answer count: 4
possible better answer: http://stackoverflow.com/a/26740822
favorite count: 0
has comment: http://stackoverflow.com/comment/42067519
upvote count: 1
has body: I have a string that's returned from the database such as 7 Months 5 Days. The issue is when it's 1 Month 1 Day, it's still showing as 1 Months 1 Days, notice the letter s in Months and Days. And I'm not allowed to use brackets like this 1 Month(s) 1 Day(s). Please how can I make a condition that if it's less than 2 Days then remove the s? The below is not working. What do I do? JS var YYMM = '1 Months 1 Days'; // simulated data. if (YYMM.indexOf('1') &gt; -1) { YYMM.replace('s', ''); console.log('YYMM is: ', YYMM); } Many Thanks
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26740845
tagged with: conditional-statements
score: 1
has answer: http://stackoverflow.com/a/26740800

http://stackoverflow.com/q/26812620
tagged with: hammer.js
has answer: http://stackoverflow.com/a/26813392
accepted answer: http://stackoverflow.com/a/26813392
has body: I am using jQuerys plugin with Hammerjs. $('.grab').hammer().on('pan', function(ev){console.info(ev)); //(44) pan This will always return "pan" How can I get it to return the different events as given here from ev.type panstart panmove panend pancancel panleft panright panup pandown
type: AnsweredQuestion
has title: Hammerjs pan return all events
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1

http://stackoverflow.com/comment/42452812
comment on: http://stackoverflow.com/q/26826899
score: 0
type: Comment
type: QuestionComment
has text: Did they make any mention of FTP/SSH when you received the username and password?

http://stackoverflow.com/comment/42155370
score: 0
type: Comment
type: QuestionComment
has text: yes, the ajax request completes successfully. it's just a $("#refresh).load("page.php #refresh);
comment on: http://stackoverflow.com/q/26789582

http://stackoverflow.com/comment/42266855
type: Comment
score: 2
has text: Ok, this is really strange. I've spent a couple hours on this and their method of drawing the tooltips is very strange to me. There's no way to affect the tooltip text directly. Every time you hover over a point and the tooltip is displayed, the entire chart is re-drawn. Also, they are using a very odd micro template that has no documentation that I can find. I'm still working on it, but it's not looking promising as far as adding commas. I did find out how to add in other characters, like units of measure or dollar signs, etc... but not a comma for the thousands separator.
comment on: http://stackoverflow.com/a/26809328
type: AnswerComment

http://stackoverflow.com/q/26748322
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42198993
has title: how to unfolding a box with 8 Sides with CSS3 accurate?
answer count: 1
has answer: http://stackoverflow.com/a/26878827
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 2
score: 1
has body: Since a week I try to open a box with html5 css3 and some javascript. The final result should be in the first step (button1) "open the box" (like a package) the second should be the "unfolding effect". It work almost close in this example: http://jsfiddle.net/Rases/wprt40nr/ Cover TOP! Back R1 R2 Left1 Left2 Bottom but as i learned some parts are not really connected. That's the reason why it's overlap to the step3 So I connected the parts in each other and replace the figure with div tags as you see here.: http://jsfiddle.net/Rases/71gy2qu9/ TOP! Cover back Right1 Right2 left1 Left2 bottom But this one didn't worked very well and I googled about the diffrent between div and figure and find out the coordinate System woks diffrent My next idea was to replace the div-tags with the span-tag, because i saw it in section 6: http://rupl.github.io/unfold/ Here you can see the folding effect in the second part of section 6 so I try this version: http://jsfiddle.net/Rases/1b6a87t0/ TOP!Front BACK Right1Right2 Left1L2 Bottom In the last version of the box is connected but the unfolding effect from step1 to step2 looks wacky. I can't find the mistake and the css have diffrent coordinates the rest ( box and cube is the same ) here is the CSS - Code from my last example /******* cube-Style *******/ .box { width: 248px; height: 234px; position: relative; margin: 0 auto 40px; border: 1px solid #000; -webkit-perspective: 1000px; -moz-perspective: 1000px; -o-perspective: 1000px; perspective: 1000px; } #cube { width: 100%; height: 100%; position: absolute; -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; -o-transform-style: preserve-3d; transform-style: preserve-3d; -webkit-transform: rotateX(0deg) translateZ(-116px); -moz-transform: rotateX(0deg) translateZ(-116px); -o-transform: rotateX(0deg) translateZ(-116px); transform: rotateX(0deg) translateZ(-116px); -webkit-transition: -webkit-transform 3s; -moz-transition: -moz-transform 3s; -o-transition: -o-transfo…
has comment: http://stackoverflow.com/comment/42262721
has comment: http://stackoverflow.com/comment/42310398
downvote count: 1

http://stackoverflow.com/comment/42180643
type: AnswerComment
comment on: http://stackoverflow.com/a/26802645
type: Comment
has text: that could be, but the weird thing is that i can set a breakpoint in main_import.php script which it will hit and stop (using netbeans with xdebug) but the ajax.php script it will not stop. I tested the ajax.php script and there are no errors (just a queury and a print of the percentile). The import script uses a lot of memory and is time consuming (using phpexcel to read excel file) but the whole point is that i could update the progress asynchronously
score: 0

http://stackoverflow.com/comment/42197120
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26812315
has text: Can you add your html code?
score: 0

http://stackoverflow.com/q/26765311
has body: I want to make a Greasemonkey script that, while you are in URL_1, the script parses the whole HTML web page of URL_2 in the background in order to extract a text element from it. To be specific, I want to download the whole page's HTML code (a Rotten Tomatoes page) in the background and store it in a variable and then use getElementsByClassName[0] in order to extract the text I want from the element with class name "critic_consensus". I've found this in MDN: HTML in XMLHttpRequest so, I ended up in this unfortunately non-working code: var xhr = new XMLHttpRequest(); xhr.onload = function() { alert(this.responseXML.getElementsByClassName(critic_consensus)[0].innerHTML); } xhr.open("GET", "http://www.rottentomatoes.com/m/godfather/",true); xhr.responseType = "document"; xhr.send(); It shows this error message when I run it in Firefox Scratchpad: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://www.rottentomatoes.com/m/godfather/. This can be fixed by moving the resource to the same domain or enabling CORS. PS. The reason why I don't use the Rotten Tomatoes API is that they've removed the critics consensus from it.
upvote count: 3
tagged with: cross-domain
answer count: 3
possible better answer: http://stackoverflow.com/a/26765422
has comment: http://stackoverflow.com/comment/42112576
has comment: http://stackoverflow.com/comment/42111445
favorite count: 0
has answer: http://stackoverflow.com/a/26765422
tagged with: tampermonkey
has answer: http://stackoverflow.com/a/26766006
tagged with: xmlhttprequest
has answer: http://stackoverflow.com/a/26770980
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26770980
score: 3
has title: How to use XMLHttpRequest to download an HTML page in the background and extract a text element from it?
has comment: http://stackoverflow.com/comment/42114066
type: Question
tagged with: greasemonkey
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/26752093
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26751144
answers question: http://stackoverflow.com/q/26751144
type: Answer
has body: If you want validatelink3() to submit the form, you can use the HTMLFormElement.submit method: function validatelink3(returnpartid){ alert("test"); var theform = document.partsform; theform.action="process_quickedited.asp?returnpartid="+returnpartid; theform.submit(); }
has comment: http://stackoverflow.com/comment/42087760
upvote count: 1
score: 1

http://stackoverflow.com/comment/42026478
type: QuestionComment
has text: I am not quite sure how I would achieve the slide effect and have the content appear just using onclick?
comment on: http://stackoverflow.com/q/26684682
score: 0
type: Comment

http://stackoverflow.com/a/26800558
type: Answer
score: 1
upvote count: 1
has body: You need to use parseInt() in order to be able to convert it into an interger. You can read something about it here Also take a look at your $.post("/getvalue",$("#info1").val Your missing the () at the end of .val It shall look like .val()
answers question: http://stackoverflow.com/q/26800471
downvote count: 0

http://stackoverflow.com/comment/42081321
type: Comment
comment on: http://stackoverflow.com/a/26748059
has text: The problem seems to be that the word I originally use there instead of "Abcde" is only three characters long and then the width has to change when the submenu slides down because some words are longer there.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42039073
comment on: http://stackoverflow.com/q/26724628
has text: @APAD1 My lecturer told me it was the standard way of writing the Javascript and we are required to do it that way.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42452756
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26744163
has text: may you add your html code? or use http://jsfiddle.net/ so I can try fix your code, save our minutes to save your days.