http://stackoverflow.com/comment/40806749
type: AnswerComment
has text: I see what you are talking about. It was mostly to reduct columns in the database, but I think i'm just going to go the route that I have it as. Seems like a waste of time for something that works descent
type: Comment
comment on: http://stackoverflow.com/a/26048488
score: 0

http://stackoverflow.com/a/26136867
accepted answer of: http://stackoverflow.com/q/26136782
has comment: http://stackoverflow.com/comment/40967517
has comment: http://stackoverflow.com/comment/40975986
downvote count: 0
answers question: http://stackoverflow.com/q/26136782
has comment: http://stackoverflow.com/comment/40972663
has body: EDIT: Editing my whole answer as the problem has been altered. As you only want to give the user the choice to select options based on another selects current value. Firstly, I have put the terrSelect and locSelect to disabled as default. Thus the user must first select an orgSelect. When orgSelect changes, we will enable terrSelect. Then, we loop through all of terrSelect child elements, and disable those not matching the value of locSelect. The same procedure is then repeated for locSelect: Organization: Select an Organization Organization 1 Organization 2 Organization 3 Territory: - All Territories - Organization 1 - Territory 1 Organization 1 - Territory 2 Organization 2 - Territory 1 Organization 2 - Territory 2 Organization 3 - Territory 1 Organization 3 - Territory 2 Organization 3 - Territory 3 Location: - All Locations - Organization 1 - Territory 1 - Location 1 Organization 1 - Territory 1 - Location 2 Organization 1 - Territory 2 - Location 1 Organization 1 - Territory 2 - Location 2 Organization 2 - Territory 1 - Location 1 Organization 2 - Territory 1 - Location 2 Organization 2 - Territory 2 - Location 1 Organization 3 - Territory 1 - Location 1 Organization 3 - Territory 2 - Location 1 Organization 3 - Territory 3 - Location 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40973656
has comment: http://stackoverflow.com/comment/40973634
has comment: http://stackoverflow.com/comment/40967537
has comment: http://stackoverflow.com/comment/40974667
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40973403
score: 1
has comment: http://stackoverflow.com/comment/40967713
has comment: http://stackoverflow.com/comment/40972769

http://stackoverflow.com/q/26109043
has comment: http://stackoverflow.com/comment/40917938
has comment: http://stackoverflow.com/comment/40917450
has answer: http://stackoverflow.com/a/26121879
has comment: http://stackoverflow.com/comment/40917942
has comment: http://stackoverflow.com/comment/40917982
type: Question
has title: Why ng-if is not working inside ng-repeat
tagged with: angularjs-ng-if
has comment: http://stackoverflow.com/comment/40939682
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40939572
score: 0
has comment: http://stackoverflow.com/comment/40917359
has body: I cannot properly use my ng-if inside an ng-repeat. I've updated my AngularJS to the newest version (09/27/2014) and I still can not get it to work right. I have code that works fine outside of the ng-repeat and I also have code that works inside ng-repeat fine when I ng-if="vm.detail == false". However ng-if="vm.detail == true" does NOT work. I even have printed the value of vm.detail to the console and it's correct, as it should be. But, the block of code that evaluates ng-if="vm.detail == true" as "true" does NOT execute. It's nuts. Here is my code: Division Pool Subpool RenewalGroup MCH Contract PlanCode Trust MCH Contract Plan Code Status Date Status Effective Date MCP Rates State Availability {{vm.TrusteeCustNum}} {{vm.CustomerNumber}} {{vm.ContractNumber}} {{vm.PlanCode}} {{vm.PlanStatusDate}} {{vm.PlanStatus}} {{vm.PlanEffectiveDate}} {{vm.Mcp}} Rates State Availability {{plan.ExperienceGroup.RenewalGroup.Subpool.Pool.Division.DivisionName}} {{plan.ExperienceGroup.RenewalGroup.Subpool.Pool.PoolName}} {{plan.ExperienceGroup.RenewalGroup.Subpool.SubpoolName}} {{plan.ExperienceGroup.RenewalGroup.RenewalGroupName}} {{plan.MchNumber}} {{plan.PlanDesign.ContractNumber}} {{plan.PlanDesign.PlanCode}} {{plan.Mcp}} And the controller: function getPlans(searchParameters) { vm.loadingPlans = true; vm.search = searchParameters; mchService.searchParameters = searchParameters.MchNumber; datacontext.getAssignedPlans(searchParameters, vm.pageSize).then(function (plans) { vm.plans = plans; //Compares which columns are being populated for choosing which headings to show if (vm.search.MchNumber != null ||vm.search.ContractNumber != null || vm.search.PlanCode != null) { vm.detail = true; vm.test = !vm.test; alert("vm.detail is: " + vm.detail) //vm.detail = !vm.detail; //If users enter JUST a MCH number then display those results if (vm.search.ContractNumber == null & vm.search.PlanCode == null) { vm.getEntityInformation(); } } if (vm.search.DivisionName != null || vm.search.Pool…
has comment: http://stackoverflow.com/comment/40917802
has comment: http://stackoverflow.com/comment/40918254
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40917651
type: UnansweredQuestion

http://stackoverflow.com/q/26058178
has answer: http://stackoverflow.com/a/26058679
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has title: how to read excel file using servlet jsp
has body: I had tried to read excel file from jsp to servlet in apache tomcat. The below code has been receive excel file from apache folder after write the file and get that file.I need to dont write in apache tomcat.How to directly read excel file values. The following code is MyServletUpload.java . import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.net.URL; import java.sql.Connection; import java.text.SimpleDateFormat; import java.util.Iterator; import java.util.List; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileUploadException; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.servlet.ServletFileUpload; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import com.mysql.jdbc.Statement; import com.ppts.webwatcher.Validation.Urlvalidation; import com.ppts.webwatcher.setting.DBConnector; import com.ppts.webwatcher.webdownload.Webpagedownload; @WebServlet("/MyservletUpload") public class MyservletUpload extends HttpServlet { private static final long serialVersionUID = 1L; private static final String DATA_DIRECTORY = "data"; private static final int MAX_MEMORY_SIZE = 1024 * 1024 * 2; private static final int MAX_REQUEST_SIZE = 1024 * 1024; /** * @see HttpServlet#HttpServlet() */ public MyservletUpload() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse * response) */ protected void doGet(HttpServletRequest request, HttpServletRe…
type: UnansweredQuestion
upvote count: 1
score: 1
tagged with: java
has answer: http://stackoverflow.com/a/26058319

http://stackoverflow.com/q/26129781
has body: I've written the functions below as part of a much larger application for processing FASTA formatted files via a web interface. For some reason it decided to run into infinity when call upon my baseCounts() function from within makePretty(). It might be worth noting that both functions are encapsulated by the same parent function. The function baseCounts() returns valid data in the form of a 100+ long array, console.log confirms that it is not to blame so the problem has to be with makePretty(). Any help is welcome. function baseCount(records){ // Count instances of Bases in array var basecounts = Array(); for (i=0; i &lt; records.length; i++){ var record = records[i]; console.log(record); var count = [record.match(/A/g), record.match(/T/g), record.match(/C/g), record.match(/G/g)]; var basecount = Array(); for (i=0; i &lt; count.length; i++){ basecount.push(count[i].length); } // return array of occurance basecounts.push(basecount); } } function makePretty(fasta){ // Make FASTA more human friendly var data = Array(); var basecounts = Array(); var bases = Array(); console.log(fasta.length); // Generate base array for (i=1; i &lt; fasta.length; i++){ bases.push(fasta[i][2]) } basecounts = baseCount(bases); // RUNS INTO INFINITY for (i=0; i &lt; fasta.length; i++){ var record = Array(); record.push(i); // Add protein number record.push(fasta[i][0]); // Add NC_# record.push(fasta[i][1]); // Add base index _record = fasta[i][2]; var l_record = _fasta.length; // Protein length //var basecount = baseCount(_record); var cg_content; } }
has answer: http://stackoverflow.com/a/26130014
has comment: http://stackoverflow.com/comment/40955234
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40955281
possible better answer: http://stackoverflow.com/a/26130014
type: Question
score: 0
answer count: 2
tagged with: for-loop
has answer: http://stackoverflow.com/a/26129910
accepted answer: http://stackoverflow.com/a/26129910
tagged with: javascript
has title: JavaScript For Loop Keeps Looping Infinity

http://stackoverflow.com/a/26096845
score: 1
downvote count: 0
type: Answer
has body: Try using this to refer to the global object for your frame. In other words, do listScopeVars(this); inside the iframe.
upvote count: 1
has comment: http://stackoverflow.com/comment/40897058
answers question: http://stackoverflow.com/q/26064605

http://stackoverflow.com/a/26186648
answers question: http://stackoverflow.com/q/26180550
type: Answer
has body: try the following jQuery code: @var id; // declare id as global first @if(ViewBag.ItemId!=null) { id = ViewBag.ItemId; } else { id=-1; } var itemID ="@id"; //then save razor id in javascript var itemID itemID = parseInt(itemID) // for any further clearance hope this helps
score: 0
accepted answer of: http://stackoverflow.com/q/26180550
type: AcceptedAnswer

javascript
tags question: http://stackoverflow.com/q/26099790
tags question: http://stackoverflow.com/q/26166525
tags question: http://stackoverflow.com/q/26111313
tags question: http://stackoverflow.com/q/26036488
tags question: http://stackoverflow.com/q/26052530
tags question: http://stackoverflow.com/q/26142052
tags question: http://stackoverflow.com/q/26123075
tags question: http://stackoverflow.com/q/26170810
tags question: http://stackoverflow.com/q/26191770
tags question: http://stackoverflow.com/q/26061907
tags question: http://stackoverflow.com/q/26118700
tags question: http://stackoverflow.com/q/26164405
tags question: http://stackoverflow.com/q/26128083
tags question: http://stackoverflow.com/q/26103579
tags question: http://stackoverflow.com/q/26120789
tags question: http://stackoverflow.com/q/26077241
tags question: http://stackoverflow.com/q/26119108
tags question: http://stackoverflow.com/q/26042235
tags question: http://stackoverflow.com/q/26069829
tags question: http://stackoverflow.com/q/26070397
tags question: http://stackoverflow.com/q/26105069
tags question: http://stackoverflow.com/q/26059006
tags question: http://stackoverflow.com/q/26170505
tags question: http://stackoverflow.com/q/26135101
tags question: http://stackoverflow.com/q/26145813
tags question: http://stackoverflow.com/q/26091559
tags question: http://stackoverflow.com/q/26061258
tags question: http://stackoverflow.com/q/26108660
tags question: http://stackoverflow.com/q/26143747
tags question: http://stackoverflow.com/q/26187019
tags question: http://stackoverflow.com/q/26182870
tags question: http://stackoverflow.com/q/26107033
tags question: http://stackoverflow.com/q/26141229
tags question: http://stackoverflow.com/q/26183494
tags question: http://stackoverflow.com/q/26147136
tags question: http://stackoverflow.com/q/26111713
tags question: http://stackoverflow.com/q/26139341
tags question: http://stackoverflow.com/q/26124290
tags question: http://stackoverflow.com/q/26099599
tags question: http://stackoverflow.com/q/26151531
tags question: http://stackoverflow.com/q/26155232
tags question: http://stackoverflow.com/q/26180057
tags question: http://stackoverflow.com/q/26041770
tags question: http://stackoverflow.com/q/26149258
tags question: http://stackoverflow.com/q/26074431
tags question: http://stackoverflow.com/q/26165830
tags question: http://stackoverflow.com/q/26053462
tags question: http://stackoverflow.com/q/26074289
tags question: http://stackoverflow.com/q/26192037
tags question: http://stackoverflow.com/q/26129014
tags question: http://stackoverflow.com/q/26047844
tags question: http://stackoverflow.com/q/26143436
tags question: http://stackoverflow.com/q/26048791
tags question: http://stackoverflow.com/q/26105595
tags question: http://stackoverflow.com/q/26086777
tags question: http://stackoverflow.com/q/26045942
tags question: http://stackoverflow.com/q/26104032
tags question: http://stackoverflow.com/q/26078651
tags question: http://stackoverflow.com/q/26107632
tags question: http://stackoverflow.com/q/26119961
tags question: http://stackoverflow.com/q/26130701
tags question: http://stackoverflow.com/q/26128274
tags question: http://stackoverflow.com/q/26056275
tags question: http://stackoverflow.com/q/26101435
tags question: http://stackoverflow.com/q/26077283
tags question: http://stackoverflow.com/q/26071778
tags question: http://stackoverflow.com/q/26163422
tags question: http://stackoverflow.com/q/26106352
tags question: http://stackoverflow.com/q/26042927
tags question: http://stackoverflow.com/q/26109649
tags question: http://stackoverflow.com/q/26095660
tags question: http://stackoverflow.com/q/26115412
tags question: http://stackoverflow.com/q/26124576
tags question: http://stackoverflow.com/q/26053329
tags question: http://stackoverflow.com/q/26089101
tags question: http://stackoverflow.com/q/26146405
tags question: http://stackoverflow.com/q/26182481
tags question: http://stackoverflow.com/q/26135223
tags question: http://stackoverflow.com/q/26183337
tags question: http://stackoverflow.com/q/26039375

http://stackoverflow.com/comment/40913597
type: Comment
has text: What is buggy? The jQuery ui highlight effect?
comment on: http://stackoverflow.com/a/26106891
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40786005
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26037588
type: QuestionComment
has text: Yeah. What have you tried?

php
tags question: http://stackoverflow.com/q/26091016
tags question: http://stackoverflow.com/q/26118697
tags question: http://stackoverflow.com/q/26108487
tags question: http://stackoverflow.com/q/26123001
tags question: http://stackoverflow.com/q/26046503
tags question: http://stackoverflow.com/q/26140533
tags question: http://stackoverflow.com/q/26166403
tags question: http://stackoverflow.com/q/26107500
tags question: http://stackoverflow.com/q/26132327
tags question: http://stackoverflow.com/q/26111838
tags question: http://stackoverflow.com/q/26155764
tags question: http://stackoverflow.com/q/26159359
tags question: http://stackoverflow.com/q/26158518
tags question: http://stackoverflow.com/q/26189884
tags question: http://stackoverflow.com/q/26039637
tags question: http://stackoverflow.com/q/26176677
tags question: http://stackoverflow.com/q/26097407
tags question: http://stackoverflow.com/q/26105500
tags question: http://stackoverflow.com/q/26082954
tags question: http://stackoverflow.com/q/26121039
tags question: http://stackoverflow.com/q/26136038
tags question: http://stackoverflow.com/q/26061303
tags question: http://stackoverflow.com/q/26074755
tags question: http://stackoverflow.com/q/26101758
tags question: http://stackoverflow.com/q/26134706
tags question: http://stackoverflow.com/q/26065161
tags question: http://stackoverflow.com/q/26186765
tags question: http://stackoverflow.com/q/26192558
tags question: http://stackoverflow.com/q/26044097
tags question: http://stackoverflow.com/q/26067408
tags question: http://stackoverflow.com/q/26050109
tags question: http://stackoverflow.com/q/26147662
tags question: http://stackoverflow.com/q/26085986
tags question: http://stackoverflow.com/q/26190989
tags question: http://stackoverflow.com/q/26192152
tags question: http://stackoverflow.com/q/26179002
tags question: http://stackoverflow.com/q/26080615
tags question: http://stackoverflow.com/q/26139270
tags question: http://stackoverflow.com/q/26091447
tags question: http://stackoverflow.com/q/26084733
tags question: http://stackoverflow.com/q/26104398
tags question: http://stackoverflow.com/q/26174403
tags question: http://stackoverflow.com/q/26050128
tags question: http://stackoverflow.com/q/26063109
tags question: http://stackoverflow.com/q/26159665
tags question: http://stackoverflow.com/q/26114164
tags question: http://stackoverflow.com/q/26175299
tags question: http://stackoverflow.com/q/26045313
tags question: http://stackoverflow.com/q/26142081
tags question: http://stackoverflow.com/q/26106138
tags question: http://stackoverflow.com/q/26133382
tags question: http://stackoverflow.com/q/26117691
tags question: http://stackoverflow.com/q/26158493
tags question: http://stackoverflow.com/q/26143371
tags question: http://stackoverflow.com/q/26129742
tags question: http://stackoverflow.com/q/26049608
tags question: http://stackoverflow.com/q/26089038
tags question: http://stackoverflow.com/q/26081791
tags question: http://stackoverflow.com/q/26140616
tags question: http://stackoverflow.com/q/26071181
tags question: http://stackoverflow.com/q/26130342
tags question: http://stackoverflow.com/q/26034262
tags question: http://stackoverflow.com/q/26121544
tags question: http://stackoverflow.com/q/26149885
tags question: http://stackoverflow.com/q/26060275
tags question: http://stackoverflow.com/q/26194473
tags question: http://stackoverflow.com/q/26116800
tags question: http://stackoverflow.com/q/26058839
tags question: http://stackoverflow.com/q/26155731
tags question: http://stackoverflow.com/q/26183307
tags question: http://stackoverflow.com/q/26069544
tags question: http://stackoverflow.com/q/26052259
tags question: http://stackoverflow.com/q/26133581
tags question: http://stackoverflow.com/q/26123140
tags question: http://stackoverflow.com/q/26044577
tags question: http://stackoverflow.com/q/26154574
tags question: http://stackoverflow.com/q/26067822
tags question: http://stackoverflow.com/q/26114599
tags question: http://stackoverflow.com/q/26160963
tags question: http://stackoverflow.com/q/26191433

http://stackoverflow.com/a/26174846
has comment: http://stackoverflow.com/comment/41038301
has comment: http://stackoverflow.com/comment/41038528
has comment: http://stackoverflow.com/comment/41038574
downvote count: 0
has comment: http://stackoverflow.com/comment/41039713
has comment: http://stackoverflow.com/comment/41038509
has body: Well based on that premise you could devise something like this: On a sample request like this: xmlhttp.open("GET","server.php?action=save",true); Then in PHP: if(isset($_GET['action'])) { $action = $_GET['action']; switch($action) { case 'save': saveSomething(); break; case 'get': getSomething(); break; default: // i do not know what that request is, throw an exception, can also be break; } }
score: 5
accepted answer of: http://stackoverflow.com/q/26174796
has comment: http://stackoverflow.com/comment/41039274
answers question: http://stackoverflow.com/q/26174796
type: AcceptedAnswer
upvote count: 5
type: Answer

http://stackoverflow.com/q/26070783
answer count: 2
tagged with: javascript
score: 15
has comment: http://stackoverflow.com/comment/40848737
favorite count: 0
has answer: http://stackoverflow.com/a/26107593
accepted answer: http://stackoverflow.com/a/26107593
has comment: http://stackoverflow.com/comment/49896877
has comment: http://stackoverflow.com/comment/40847633
upvote count: 15
tagged with: asp.net
has title: Invalid value for <path> attribute
has comment: http://stackoverflow.com/comment/50686813
downvote count: 0
tagged with: d3.js
has comment: http://stackoverflow.com/comment/40848315
has body: I see other posts with this problem but I just can't seem to solve it. I am new to d3 and am trying to load some data into a line graph, but i keep getting the error Invalid value for &lt;path&gt; attribute d="MNaN,250LNaN,71.05263157894737LNaN,55.26315789473685 I have setup everything like in an example (which worked), but this isn't working for some reason. I am getting data back from a webservice as a list of the following form: Date="1/1/2014" NumberOfActive=1 (Example). I have tried using the parse functions but they don't really work. Here is my code: var data; var margin = { top: 20, right: 20, bottom: 30, left: 50 }, width = 1000 - margin.left - margin.right, height = 300 - margin.top - margin.bottom; function parseDateForViewing(d) { return d3.time.format('%b %Y')(d3.time.format('%m/%d/%Y').parse(d)); } function parseDate(d) { return d3.time.format('%c')(d3.time.format('%m/%d/%Y').parse(d)); } var x = d3.time.scale() .range([0, width]); var y = d3.scale.linear() .range([height, 0]); var xAxis = d3.svg.axis() .scale(x) .orient("bottom"); var yAxis = d3.svg.axis() .scale(y) .orient("left"); var line = d3.svg.line() .x(function (d) { return x(d.Date); }) .y(function (d) { return y(d.NumberOfActive); }); var svg = d3.select("body").append("svg") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.top + margin.bottom) .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); $.ajax({ type: "POST", url: "Dashboard.aspx/GetActiveLoansData", data: '', contentType: "application/json; charset=utf-8", dataType: "json", success: function (thedata) { var d = thedata.d; data = thedata.d; var _len = d.length; var post, i; for (i = 0; i &lt; data.length; i++) { d = data[i]; var t = parseDate(d.Date); var s = d.Date; x.domain(d3.extent(data, function (d) { return d.Date; })); y.domain(d3.extent(data, function (d) { return d.NumberOfActive; })); svg.append("g") .attr("class", "x axis") .attr("transform", "translate(0…
possible better answer: http://stackoverflow.com/a/31541297
type: AnsweredQuestion
tagged with: date
has answer: http://stackoverflow.com/a/31541297
type: Question
tagged with: c#

http://stackoverflow.com/comment/40855880
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26075579
has text: Shouldn't your `href` be the `action` of the `form`? I mean something like ` ... `

http://stackoverflow.com/a/26072733
has body: here is one example Js Fiddle $('html, body').stop().animate({ 'scrollTop': 0 // or any specific offset postion }, 1000)
accepted answer of: http://stackoverflow.com/q/26072428
answers question: http://stackoverflow.com/q/26072428
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41011114
comment on: http://stackoverflow.com/q/26159032
score: 0
type: QuestionComment
has text: Sorry, I would do this completely the other way, and as you are not a developer it wont help , as you would need to change a code to suite your needs.
type: Comment

http://stackoverflow.com/comment/41040307
type: Comment
type: QuestionComment
has text: I don't know what you've wrong. What have you wrong? Does it not work? What happens instead? Do you see errors in the browser's error console?
comment on: http://stackoverflow.com/q/26175889
score: 0

http://stackoverflow.com/comment/40912548
comment on: http://stackoverflow.com/q/26106220
score: 0
type: Comment
type: QuestionComment
has text: Are you sure *"turning the scroll off"* is going to give a pleasant user experience...? 0.o just asking...

http://stackoverflow.com/comment/40783594
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26035561
has text: var callNow = immediate && !timeout; When you call debounce you add the time of wait also. And a timer is created in the code which will execute after "wait". So the code is checking whether a timer is already present or not. If the timer is already present then the call now becomes false and func will not get executed.

select-to-slider
type: Tag
tag name: select-to-slider
tags question: http://stackoverflow.com/q/26160112

http://stackoverflow.com/comment/40844371
type: Comment
comment on: http://stackoverflow.com/a/26068880
type: AnswerComment
has text: But that's why I said to render a fragment, not the whole page. Each table can still be a separate Ajax call, but the server returns a block of HTML which you insert.
score: 0

http://stackoverflow.com/comment/40944833
score: 0
type: Comment
has text: Prevent how? Just don't show the ones that go off screen?
type: QuestionComment
comment on: http://stackoverflow.com/q/26124349

http://stackoverflow.com/q/26131885
has comment: http://stackoverflow.com/comment/40988879
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40958742
has comment: http://stackoverflow.com/comment/40976590
has comment: http://stackoverflow.com/comment/40976620
has comment: http://stackoverflow.com/comment/40959411
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/40958804
has comment: http://stackoverflow.com/comment/40959876
type: Question
has comment: http://stackoverflow.com/comment/40961050
answer count: 2
has comment: http://stackoverflow.com/comment/40959694
has comment: http://stackoverflow.com/comment/40959398
has answer: http://stackoverflow.com/a/54598289
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40959350
has answer: http://stackoverflow.com/a/26132647
tagged with: ajax
score: 0
possible better answer: http://stackoverflow.com/a/54598289
has comment: http://stackoverflow.com/comment/40959977
has comment: http://stackoverflow.com/comment/40959603
has body: I'm currently working with an MVC page where I'm using Grid.Mvc table. I also have some search fields where I can update the table via Ajax Post, once I use the search fields and submit for sorting the html gets replaced on post-back, once replaced, the grid rows can NOT be clicked like before the Ajax call, is like the ajax call is killing the javascript or Jquery or both, here is code for the Ajax call for the grid: $(function() { $(document) on.("click", "#buscar", function() { $.ajax({ url: '/MainPage/Grid', type: 'POST', async: false, datatType: 'html', processData: true, data: { url: $('#url').val(), isInternal: ('#isInternal').val() }, success: function(data) { $('#grid').html(data); } }) }); }); Here is the code for when I click the rows I send another Ajax call, but after the first code post the grid becomes unclickable; $(function() { pagesGrids.linksgrid.onRowSelect(function() { $.ajax({ url: '/mainpage/getlinkdetails', type: 'POST', async: false, dataType: 'html', processData: true, data: { id: e.row.BrokenId }, success: function(data) { $('#linkdetails').html(data); }, error: function() { alert('something went wrong') } }) }); }) Any help or hint that can point me in the right direction will greatly appreciated, thanks UPDATE The the grid it self is a partial view rendering at Index on MVC &lt;div id="grid"&gt; @Html.Action"Grid" &lt;/div&gt;
has comment: http://stackoverflow.com/comment/40959492
has title: jQuery not working after Ajax post
accepted answer: http://stackoverflow.com/a/26132647
has comment: http://stackoverflow.com/comment/40959405

swfobject
tags question: http://stackoverflow.com/q/26149670
tag name: swfobject
type: Tag

http://stackoverflow.com/q/26141713
answer count: 1
has title: How to write cron expression for specific weeks?
has answer: http://stackoverflow.com/a/26142139
has comment: http://stackoverflow.com/comment/40976705
type: UnansweredQuestion
has body: How do I write a cron expression for specific weeks? say If I want a job to execute on mon, Tue and Sunday of 1st and 3rd week OR say the last week of the month of the say 1st and 9th Month? Days will range from mon to sunfday i.e. all days in a week. One day or any combination of the days. e.g. Mon,tue or only mon Months can range from jan to dec. One or multiple months. Weeks will range from 1 to 4 or last week. Single or multiple weeks. Thanks.
tagged with: java
tagged with: javascript
has comment: http://stackoverflow.com/comment/40976617
type: Question
score: 0
has comment: http://stackoverflow.com/comment/40976656
tagged with: cronexpression

http://stackoverflow.com/a/26036584
type: Answer
score: 2
upvote count: 2
has body: Try this, http://jsfiddle.net/Dripple/AGGrv/. This makes a fine animation of bursting a balloon. $("#bubble1").click(function() { $("#bubble1").stop(true, false); $(this).hide("explode", { pieces: 50 }, 250); }); function animate1() { $("#bubble1").animate({ "-moz-border-radius": "110px/100px", "-webkit-border-radius": "110px 100px", "border-radius": "110px/100px", height: '100px', width: '110px', top: '240px' }, 1500, animate2()); } function animate2() { $("#bubble1").animate({ "-moz-border-radius": "100px/110px", "-webkit-border-radius": "100px 110px", "border-radius": "100px/110px", height: '110px', width: '100px', top: '235px' }, 1500, function() { $('#bubble1').trigger('mouseover'); }); } $("#bubble1").mouseover(function() { animate1(); }); $("#bubble1").mouseout(function() { $("#bubble1").stop(true, false); });
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26036425
answers question: http://stackoverflow.com/q/26036425

http://stackoverflow.com/a/26201247
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/41106676
type: Answer
accepted answer of: http://stackoverflow.com/q/26177776
answers question: http://stackoverflow.com/q/26177776
upvote count: 4
has body: The following works in Chrome 37 (current Chrome) with the Experimental JavaScript flag enabled: (function () { "use strict"; for (let i = 0; i &lt; 10; i++) { console.log(i); } })() Outside strict mode, you should see SyntaxError: Illegal let declaration outside extended mode or SyntaxError: Unexpected identifier if you're not in strict mode, or possibly SyntaxError: Unexpected strict mode reserved word if the Experimental JavaScript flag is not enabled. You can also compile your code with with Babel or with Traceur and the --block-binding flag enabled. See kangax's ES6 compatibility table for more.
has comment: http://stackoverflow.com/comment/41109070
type: AcceptedAnswer

http://stackoverflow.com/comment/40787810
score: 0
type: Comment
has text: One further question. What should I return at the end of this function if I wish to chain it afterwards?
comment on: http://stackoverflow.com/a/26037922
type: AnswerComment

http://stackoverflow.com/comment/41060004
comment on: http://stackoverflow.com/q/26186308
type: Comment
type: QuestionComment
has text: You have to use something like `document.getElementById('answer').innerHTML = this.answer[0];`
score: 2

http://stackoverflow.com/comment/40921780
type: Comment
score: 0
has text: @user2864740 'null' means will not be called as a function.
comment on: http://stackoverflow.com/q/26111564
type: QuestionComment

http://stackoverflow.com/comment/41040550
score: 0
type: Comment
type: QuestionComment
has text: Please add some code for the search post back
comment on: http://stackoverflow.com/q/26176064

http://stackoverflow.com/comment/40828749
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26056763
type: QuestionComment
has text: What browser are you running your script on? It isn't working on Chrome using a jsfiddle.

http://stackoverflow.com/q/26058841
favorite count: 0
type: UnansweredQuestion
score: 5
has comment: http://stackoverflow.com/comment/40825549
has answer: http://stackoverflow.com/a/26058955
upvote count: 6
has answer: http://stackoverflow.com/a/26058913
has comment: http://stackoverflow.com/comment/40825274
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40825055
has answer: http://stackoverflow.com/a/26059094
tagged with: javascript
has body: I have a html page with n numbers of anchor tags throught the body and a button tag john is brilliant human..... john is brilliant human..... john is brilliant human..... john is brilliant human..... john is brilliant human..... The id attribute of all anchor tags is same Now i just want that when clicking on button the focus on anchor tags should get change one by one for this i have tried this jquery code but the focus is not changing from first tag $("#btn1").on("click", function () { $(this).next("#abc1").focus(); }); if possible the solution would need to be based using Javascript and not something like JQuery. Any help greatly appreciated
answer count: 3
has comment: http://stackoverflow.com/comment/40825143
tagged with: http://stackoverflow.com/tag/html
has title: On button click how to change focus

http://stackoverflow.com/comment/40991038
has text: In your bottom example, it should be `Car.prototype.Year = 2014` - you set the prototype on the object function - not the created instance.
comment on: http://stackoverflow.com/q/26149364
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/26039500
downvote count: 0
has answer: http://stackoverflow.com/a/26039666
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/26039628
accepted answer: http://stackoverflow.com/a/26039628
tagged with: search
answer count: 4
has comment: http://stackoverflow.com/comment/40789655
favorite count: 0
has body: I'm trying to filter an Array named products which is filled with one string per product. var products = [ 'canadian black angus beef fresh', 'canadian black angus beef frozen', 'american black angus beef frozen' ]; The search starts by splitting an form input element by spaces in an array named keywords which contains an variable length of strings. var keywords = ['angus', 'fresh']; Actually I'm for-looping the product_array and make an 2nd (inner) for-loop for the keyword_array. Till now its all fine. here is my shorten code which shows the issue: function test() { var products = [ 'canadian black angus beef fresh', 'canadian black angus beef frozen', 'american black angus beef frozen' ]; var keywords = ['angus', 'fresh']; var hits = []; for (var i = 0; i &lt; products.length; i++) { for (var j = 0; j &lt; keywords.length; j++) { if (products[i].indexOf(keywords[j]) != -1) { /* a if case for looped '&amp;&amp;' operator would be great - or something like that looped because of the variable length of keywords */ hits.push(products[i]); } } } console.log(hits); /* all products :/ - because all product matches with 'angus' but I'm searching for an product that contains 'angus' &amp;&amp; 'fresh' */ } How can I fix this?
has answer: http://stackoverflow.com/a/26039709
tagged with: keyword
has title: Javascript filter array by multiple strings
type: AnsweredQuestion
type: Question
upvote count: 4
tagged with: for-loop
tagged with: arrays
possible better answer: http://stackoverflow.com/a/26039709
has answer: http://stackoverflow.com/a/58432237

http://stackoverflow.com/a/26055807
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26055652
has body: You need to check that the trigger isnt the hamburger button either like in this fiddle $(document).ready(function () { var container = $(".responsive-menu"); var hamburger = $(".hamburger"); hamburger.on('click', function () { container.slideToggle(); container.addStyle('display:block'); }); $(document).on('mouseup', function (e) { if (!container.is(e.target) &amp;&amp; !hamburger.is(e.target) &amp;&amp; container.has(e.target).length === 0) // ... nor a descendant of the container { container.hide('slow'); } }); });
answers question: http://stackoverflow.com/q/26055652

http://stackoverflow.com/q/26068346
type: Question
score: 1
tagged with: module
favorite count: 0
answer count: 2
has title: Substitude one module for another in node.js
has answer: http://stackoverflow.com/a/26068525
upvote count: 1
has body: If I have a node.js application that has hundreds of files that reference a module (say underscore) and I want to replace that module with another (say lodash) then the obvious way to do this substitution would be a global name replace and switch out the modules in the package.json file. Is there anyway to just change the module that a name refers to so that when node.js sees require('moduleA') it actually loads 'moduleB' instead? Now I know that this would cause naming hell because anyone working on the project would see require('moduleA') and wouldn't know that the real module being loaded was 'moduleB' so ultimately you'd probably want to go with the first solution. The use case that I'm thinking of is if you want to try a few alternatives for API compatible modules to measure your application's performance (for example) with each module.
tagged with: node.js
accepted answer: http://stackoverflow.com/a/26068525
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/39974567
has answer: http://stackoverflow.com/a/39974567
tagged with: require

http://stackoverflow.com/q/26087407
tagged with: javascript
tagged with: jquery
score: 0
has body: Hey guys sorry for the title being a bit misleading it's a bit of tricky question. So anyway I will first go over my current setup of my two web pages. Basically I have this form on my homepage: Make (Any) <?php while($make = $makeFilter->fetch(PDO::FETCH_ASSOC)) { echo ' '.$make["Make"].' '; } ?> The select element just loops a column of my SQL table to create the options, it's then using GET to select the same option that has been selected by the user on the used-cars.php page. Here is the second page form code: Make (Any) <?php while($make = $makeFilter->fetch(PDO::FETCH_ASSOC)){ $selected = $make['Make'] == $_GET['make']?'selected="selected"':''; echo ' '.$make["Make"].' '; } ?> This part of the code is working fine it selects the option selected based on GET, I do have one issue though. The form is used to filter what div's are shown on my page, all of the div's are in a list and the form simply uses jQuery to hide classes that don't have the same value. This is the jQuery I am using: The jQuery hides classes when the user selects an option, any div's that don't have the same class are hidden. The issue I am having is that when the page loads div's are showing even if they don't match the value that the user selected on page one, the select element has the option the user selected on page one but all the values that don't match it aren't hidden. Any idea why this might be happening? Here is a live example so you can take a look: http://www.drivencarsales.co.uk/index.php Simply pick a 'Make' and press 'Search cars' and you will notice that listed div's aren't hidden yet if you press the 'Make' tab you will notice that the 'Make' from page one is selected.
has answer: http://stackoverflow.com/a/26087470
accepted answer: http://stackoverflow.com/a/26087470
type: AnsweredQuestion
type: Question
has title: jQuery hide function doesn't work when using GET form
answer count: 1

http://stackoverflow.com/q/26079353
score: 0
answer count: 1
has body: var arrayTest; function handleFiles(files) { arrayTest = new Array(); for(var i = 0; files[i]; i++) { var reader = new FileReader(); reader.onload = function(e) { var binary = e.target.result; var parentSelector = '#output_' + i; $(parentSelector).html(binary); arraytest.push({ 'bin' : binary, 'parentSelector' : parentSelector }); }; reader.readAsBinaryString(files[i]); } } function buttonClick() { var files = [file1, file2]; handleFiles(files); console.log(arrayTest); // I got the objects inserted at async function here, length != 0 console.log(arrayTest.length); // 0 console.log(arrayTest[0]); //undefined // accesing any member of arrayTest returns undefined } FireFox Console output. The code above shows a Js that converts files into binary string that is ran after a button event and I am having issues with being unable to access the global variable arrayTest that is updated with newly pushed value from the filereader onload event.Is there anyway to fix this problem?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40863196
has answer: http://stackoverflow.com/a/26081509
type: Question
has title: Javascript global array accessing member undefined
tagged with: arrays
tagged with: javascript
tagged with: scope

http://stackoverflow.com/a/26107515
has comment: http://stackoverflow.com/comment/40944188
score: 2
upvote count: 2
has body: Your selector doesn't point to anything. There is no draggableField that has a child ui-draggable that has a child droppedField. Do you mean a div that has all three classes? $('.draggableField.ui-draggable.droppedField').on('click', function () { $(this).hide(); alert("hi"); }); UPDATED CODE: Removed the OP code to remove() element and replaced with hide()
answers question: http://stackoverflow.com/q/26107255
has comment: http://stackoverflow.com/comment/40914864
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40914779
accepted answer of: http://stackoverflow.com/q/26107255
type: Answer

jquery
tags question: http://stackoverflow.com/q/26178999
tags question: http://stackoverflow.com/q/26085293
tags question: http://stackoverflow.com/q/26064414
tags question: http://stackoverflow.com/q/26165639
tags question: http://stackoverflow.com/q/26053378
tags question: http://stackoverflow.com/q/26110188
tags question: http://stackoverflow.com/q/26109171
tags question: http://stackoverflow.com/q/26158141
tags question: http://stackoverflow.com/q/26113263
tags question: http://stackoverflow.com/q/26147113
tags question: http://stackoverflow.com/q/26094940
tags question: http://stackoverflow.com/q/26053679
tags question: http://stackoverflow.com/q/26189786
tags question: http://stackoverflow.com/q/26110142
tags question: http://stackoverflow.com/q/26193111
tags question: http://stackoverflow.com/q/26056122
tags question: http://stackoverflow.com/q/26146313
tags question: http://stackoverflow.com/q/26066634
tags question: http://stackoverflow.com/q/26134652
tags question: http://stackoverflow.com/q/26057166
tags question: http://stackoverflow.com/q/26113041
tags question: http://stackoverflow.com/q/26115162
tags question: http://stackoverflow.com/q/26186315
tags question: http://stackoverflow.com/q/26074441
tags question: http://stackoverflow.com/q/26128403
tags question: http://stackoverflow.com/q/26044020
tags question: http://stackoverflow.com/q/26188642
tags question: http://stackoverflow.com/q/26051832
tags question: http://stackoverflow.com/q/26161693
tags question: http://stackoverflow.com/q/26141250
tags question: http://stackoverflow.com/q/26093359
tags question: http://stackoverflow.com/q/26171456
tags question: http://stackoverflow.com/q/26083680
tags question: http://stackoverflow.com/q/26135380
tags question: http://stackoverflow.com/q/26044342
tags question: http://stackoverflow.com/q/26097917
tags question: http://stackoverflow.com/q/26036784
tags question: http://stackoverflow.com/q/26150526
tags question: http://stackoverflow.com/q/26067284
tags question: http://stackoverflow.com/q/26144738
tags question: http://stackoverflow.com/q/26130550
tags question: http://stackoverflow.com/q/26092223
tags question: http://stackoverflow.com/q/26106844
tags question: http://stackoverflow.com/q/26140988
tags question: http://stackoverflow.com/q/26097991
tags question: http://stackoverflow.com/q/26072754
tags question: http://stackoverflow.com/q/26108331
tags question: http://stackoverflow.com/q/26148856
tags question: http://stackoverflow.com/q/26168938
tags question: http://stackoverflow.com/q/26125076
tags question: http://stackoverflow.com/q/26176298
tags question: http://stackoverflow.com/q/26050682
tags question: http://stackoverflow.com/q/26151380
tags question: http://stackoverflow.com/q/26187370
tags question: http://stackoverflow.com/q/26151121
tags question: http://stackoverflow.com/q/26109717
tags question: http://stackoverflow.com/q/26078230
tags question: http://stackoverflow.com/q/26149455
tags question: http://stackoverflow.com/q/26093266
tags question: http://stackoverflow.com/q/26145509
tags question: http://stackoverflow.com/q/26177446
tags question: http://stackoverflow.com/q/26069889
tags question: http://stackoverflow.com/q/26060255
tags question: http://stackoverflow.com/q/26056406
tags question: http://stackoverflow.com/q/26151388
tags question: http://stackoverflow.com/q/26190168
tags question: http://stackoverflow.com/q/26090467
tags question: http://stackoverflow.com/q/26138871
tags question: http://stackoverflow.com/q/26115402
tags question: http://stackoverflow.com/q/26047049
tags question: http://stackoverflow.com/q/26079927
tags question: http://stackoverflow.com/q/26124092
tags question: http://stackoverflow.com/q/26124068
tags question: http://stackoverflow.com/q/26097060
tags question: http://stackoverflow.com/q/26052492
tags question: http://stackoverflow.com/q/26163467
tags question: http://stackoverflow.com/q/26125359
tags question: http://stackoverflow.com/q/26068692
tags question: http://stackoverflow.com/q/26160066
tags question: http://stackoverflow.com/q/26054485

http://stackoverflow.com/comment/40894694
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26096448
has text: I am not an expert in Jquery, but will try to do a logical explanation. For a simple App normally HTML fragments ( `div element`) are added to the HTML DOM ( HTML document). The DIVs are hidden and only one of them are visible at any given time. So when a user moves from a view to another view, the previous view is hidden and the new view is displayed with some transition logic ( slide/fade). In a large App containing many views the HTML fragments are added and removed dynamically to reduce the DOM document size. I hope you have understood what I am trying to convey.

http://stackoverflow.com/a/26127421
answers question: http://stackoverflow.com/q/26123698
has body: hi have got this working and code posted bellow for anyone else that may need it $("#demo").load("login.php",function(responseTxt,statusTxt,xhr){ if(statusTxt=="success") $("#demo").fadeToggle("slow"); if(statusTxt=="error") alert("Error: "+xhr.status+": "+xhr.statusText); });
type: Answer
score: 0

http://stackoverflow.com/a/72539883
downvote count: 2
has comment: http://stackoverflow.com/comment/139222050
upvote count: 1
has comment: http://stackoverflow.com/comment/139221985
score: -1
type: Answer
answers question: http://stackoverflow.com/q/26150232
has comment: http://stackoverflow.com/comment/139216036
has body: If (like me) you don't like augmenting native instances, nor unwieldy ".promise" properties ... but do love proxies and mangling classes, then this one is for you: class GroovyPromise { constructor() { return new Proxy(new Promise((resolve, reject) => { this.resolve = resolve; this.reject = reject; }), { get: (target, prop) => this[prop] || target[prop].bind(target), }); } } Used like so: const groovypromise = new GroovyPromise(); setTimeout(() => groovypromise.resolve('groovy'), 1000); console.log(await groovypromise); Of course you can also rename the class to something dull like "Deferred"

http://stackoverflow.com/q/26052194
tagged with: css
has comment: http://stackoverflow.com/comment/40818335
has body: I am new here and wondering if someone can share some insight for me. Lately I've been noticing that more websites are incorporating JavaScript or Jquery events that trigger a full screen overlay dialogue box. Some sites have the trigger based on time, scrolling patterns, login status, and even mouse focus within the webpage. It has become a bit of a pet peeve of my own that I am being interrupted by what I feel is a popup 2.0. The only solution that I know is disabling JS all together in my browser, which in today's world is something that significantly degrades the operation of the website. A perfect example would be marketizator.com when the focus of the mouse leaves the body it will trigger the full screen overlay. Another example would be Twitter when you visit a profile without being logged in and are prompted to signup. I'm wondering if someone can directly me to a way of how I can develop my own or discover an already existing method to prevent such events from being executed by websites within my own browser. Or even could someone identify the exact focus event that is being triggered. My skills and knowledge level with JS is very little, but I am open to learning more to solve my problem. Thanks for any help Dave
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40847982
score: 3
type: Question
has title: Disabling a JavaScript or Jquery full screen overlay event
tagged with: greasemonkey
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
upvote count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26052325
linked to: http://stackoverflow.com/q/26052042

http://stackoverflow.com/comment/40913954
has text: Thanks for your time and patience on this. We've changed it on the server side so it takes callback=cbAddBlog. In the ajax I have ''dataType: 'jsonp', jsonpCallback : 'cbAddBlog'' The response is wrapped in the function name. Is that correct? It does call get into the ajax success function now but still not getting to the $.when. I understand what you mean about overriding JSONPs implementation by specifying a function - just not sure how to structure this so I don't do that.. Latest code here: JS fiddle: http://jsfiddle.net/k89s0qca/
comment on: http://stackoverflow.com/a/26078120
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40861843
type: QuestionComment
comment on: http://stackoverflow.com/q/26078424
score: 0
type: Comment
has text: I'm doing this on a online course and when I put that in it gives me a error saying this "It looks like sleepCheck() isn't returning "You're getting plenty of sleep! Maybe even too much!" when numHours is 10. Check your if / else syntax and whether you're using the correct comparison operator."

http://stackoverflow.com/comment/136910671
type: AnswerComment
has text: Warning: This implementation will not work with combined Unicode characters. See [this](https://stackoverflow.com/a/16776380/443523) post for an explanation about this.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26100347

http://stackoverflow.com/comment/132948366
score: 1
comment on: http://stackoverflow.com/a/26120353
type: AnswerComment
type: Comment
has text: More details have been given in the following link for the questions of @AllenS: https://stackoverflow.com/questions/4844643/is-it-possible-to-trap-cors-errors

http://stackoverflow.com/q/26182700
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26182731
has comment: http://stackoverflow.com/comment/41052924
downvote count: 0
answer count: 1
favorite count: 0
has title: Add data-attribute to appended object src
has body: I would like to append a link to multiple list-items that passes the data-attribute to the end of the URL. However I don't understand how to make the variable "storyId" hold a different value for each instance of .Story Text for Link 1 Text for Link 2 Should result in: Text for Link 1 Split View Text for Link 2 Split View http://jsfiddle.net/s3wtsxw5/
accepted answer: http://stackoverflow.com/a/26182731

http://stackoverflow.com/q/26154763
tagged with: facebook
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41001772
linked to: http://stackoverflow.com/q/5587784
type: AnsweredQuestion
tagged with: iframe
linked to: http://stackoverflow.com/q/8311525
has answer: http://stackoverflow.com/a/26156012
accepted answer: http://stackoverflow.com/a/26156012
linked to: http://stackoverflow.com/q/21887687
type: Question
linked to: http://stackoverflow.com/q/23776809
tagged with: javascript
score: 0
answer count: 1
has title: How to get Page ID from Facebook Iframe
has body: After I installed the iframehost app and edited content. The app how to know my page id and render the content successfully. I want to make an app such as it. My problem is: Assume many users installed my App for their page, but I don't know how to get the page id from different Iframe for each request the page. Please, who can explain how to get page id from iframe when users enter the Facebook page tab.

http://stackoverflow.com/a/26121775
type: Answer
accepted answer of: http://stackoverflow.com/q/26121402
answers question: http://stackoverflow.com/q/26121402
has body: Have you tried with stopPropagation ... Try : $(".lock").click(function(e) { e.stopPropagation(); console.log("click"); }); Check this Demo Fiddle ... Check what happens if you remove the stopPropagation
type: AcceptedAnswer
score: 0

http://stackoverflow.com/comment/41047599
has text: Yes, and the error is : jmeter.extractor.BeanShellPostProcessor: Problem in BeanShell script org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval In file: inline evaluation of: ``FileWriter fstream = new FileWriter("resultcsv-20141003-163823.csv",true); Buffe . . . '' Encountered "( 2c92c05698458bfcf0c0148d63ba63a21e0" at line 3, column 10.
comment on: http://stackoverflow.com/q/26179894
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26175770
type: Question
has comment: http://stackoverflow.com/comment/41040041
tagged with: highcharts
answer count: 1
tagged with: javascript
tagged with: alignment
tagged with: jquery
score: 0
linked to: http://stackoverflow.com/q/15277405
has title: Hide Series without hiding y-Axis
tagged with: css
has answer: http://stackoverflow.com/a/26178311
accepted answer: http://stackoverflow.com/a/26178311
type: AnsweredQuestion
has body: There are plenty examples of hiding an Y-Axis without hiding the series - But i need the opposite of that. I want to make a series invisible while still displaying the y-axis and i dont know how! Why? Because i have 2 diagrams which are perfectly aligned by their x-Axis: But when i disable both Temperature fields, the axis will be lost, and the diagrams are incorrect in size: I also don't like the idea, of disabling all and loosing whole diagram style: There is no problem by having an empty diagram, but having a blank box isn't the style i want to reach. I tried to manipulate the axis in within the legendItemClick event, but selecting the correct axis and set their value visible didn't work out. How can I solve this problem?

http://stackoverflow.com/comment/40835600
comment on: http://stackoverflow.com/q/26064076
has text: i need this done only using javascript and not jquery
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26179160
downvote count: 0
possible better answer: http://stackoverflow.com/a/26179236
score: 1
has answer: http://stackoverflow.com/a/26179236
has answer: http://stackoverflow.com/a/26179225
accepted answer: http://stackoverflow.com/a/26179225
has comment: http://stackoverflow.com/comment/41046072
type: Question
has comment: http://stackoverflow.com/comment/41046849
tagged with: javascript
has comment: http://stackoverflow.com/comment/41045969
has title: How to use named Array element in javascript?
answer count: 3
upvote count: 1
tagged with: arrays
has comment: http://stackoverflow.com/comment/41045988
favorite count: 0
has answer: http://stackoverflow.com/a/26179256
has comment: http://stackoverflow.com/comment/41046006
has body: ['a', 'b', 'c'].join([separator = ',']) results in "a,b,c" [separator=','] is obviously valid. How can I create myjoin that uses myseparator as some kind of parameter. How can one use this named array parameter, how to access it and where it can be usable? My primary intention isn't really crating myseparator but trying to understand this construction since I didn't bump into it before. Sorry if duplicating question, I just haven't found any other resource.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41046927

http://stackoverflow.com/comment/41055231
score: 0
has text: There is nothing particularly "harmful" about the above, *assuming* the script source is secured - *however*, the script will be loaded asynchronously which should be taken into consideration. In any case, I recommend using an "AMD" module loader in such cases such as RequireJS. There are *many* different module loaders, and one or multiple already handle this case. Also, with correct (or more aggressive versioned) caching the download penalty is effectively only payed once, so it may not be worth "optimizing".
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26183649

http://stackoverflow.com/a/26184514
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26184415
type: Answer
answers question: http://stackoverflow.com/q/26184415
downvote count: 0
score: 1
has body: Try eliminating the td with the checkbox from the selection in the first place. Assign class="checkbox" to the td, then call $(this).find('td').not('.checkbox').each(function() {...}); This way, you'll only be selecting the non-checkbox tds Hope this helps!

http://stackoverflow.com/comment/40835603
type: AnswerComment
type: Comment
has text: Thanks for your answer. Although Firebug shows the AJAX call in red when I right click on that red URL within Firebug and select Open in New Tab then that AJAX call executes correctly. Doesn't that suggest that the path is correct?
comment on: http://stackoverflow.com/a/26064124
score: 0

record
type: Tag
tag name: record
tags question: http://stackoverflow.com/q/26185495

http://stackoverflow.com/q/26171247
favorite count: 0
has answer: http://stackoverflow.com/a/26171276
possible better answer: http://stackoverflow.com/a/26171366
has comment: http://stackoverflow.com/comment/41031797
has answer: http://stackoverflow.com/a/26171366
has title: How to find the indexOf the first paramater in the URL.Javascript
upvote count: 1
accepted answer: http://stackoverflow.com/a/26171276
type: Question
type: AnsweredQuestion
score: 1
answer count: 2
has body: I have a url: '#tests/12345678/lists' and Im looking to return only the value of the 'id' here which is '12345678'. i tried: getIdLocation = $(location).attr("href"); userid = getIdLocation.substring(getIdLocation.lastIndexOf("/") + 1); that returns users, but m looking to return on the value of the id from the url? any ideas how can I achieve this? Thanks!
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41031890

http://stackoverflow.com/q/26178456
has comment: http://stackoverflow.com/comment/41044845
has comment: http://stackoverflow.com/comment/41145310
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41044731
has comment: http://stackoverflow.com/comment/41044605
has body: How can I delegate keyboard events from a popup to its opener, please? (I would like to enable application shortcuts even in its popup.) The following does not work: $(document).on('keydown keypress keyup', function (event) { $(opener.document).trigger(event); });
answer count: 0
type: UnansweredQuestion
score: 0
type: Question
has title: Delegate keyboard events from popup to opener in JS

http://stackoverflow.com/a/26039340
has comment: http://stackoverflow.com/comment/40789444
score: 4
has comment: http://stackoverflow.com/comment/40789300
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26039075
has comment: http://stackoverflow.com/comment/40789240
accepted answer of: http://stackoverflow.com/q/26039075
type: Answer
upvote count: 4
downvote count: 0
has body: You need to include a reference to the 'knockout.validation.js' library. knockout.validation.js https://rawgit.com/ericmbarnard/Knockout-Validation/master/Src/knockout.validation.js GitHub reference https://github.com/Knockout-Contrib/Knockout-Validation

http://stackoverflow.com/comment/40840056
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26066528
has text: @Rasclatt yes but my question is, how to solve this issue
score: 0

http://stackoverflow.com/comment/40973103
score: 0
type: QuestionComment
type: Comment
has text: here is the plunker I created: http://plnkr.co/edit/qSBtEG3yRPxZKmkxsyZ7?p=preview
comment on: http://stackoverflow.com/q/26139245

http://stackoverflow.com/q/26095142
has comment: http://stackoverflow.com/comment/40892278
has body: How will the code look after hoisting is done by js? jsFiddle shows it prints 1, but how is that true? var a = 1; function b() { a = 10; return; function a() {} } b(); alert(a); This is what I have come up with: var a; //hoisted var declaration function b() { //hoisted function declaration function a() {} //hoisted function declaration a = 10; return; } a=1; b(); alert(a);
tagged with: javascript
score: 0
has title: Working with hoisting in Javascript
has comment: http://stackoverflow.com/comment/40892359
has answer: http://stackoverflow.com/a/26095900
possible better answer: http://stackoverflow.com/a/26095352
has answer: http://stackoverflow.com/a/26095520
accepted answer: http://stackoverflow.com/a/26095520
has answer: http://stackoverflow.com/a/26095460
answer count: 4
has answer: http://stackoverflow.com/a/26095352
has comment: http://stackoverflow.com/comment/40892663
linked to: http://stackoverflow.com/q/336859
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/40965942
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26121745
has text: Yes, i have seen it davidkonrad. But, i'm not asking for a specific format MM/DD/YYYY. Anyway, i need to get the correct date. I didn't want any incorrect date like 98/99/1099.
score: 0

http://stackoverflow.com/comment/40944062
has text: @Ben I know number 1,2 isn't a number but I need to treat this to replace comma with point. Or do you know any other method to do that?
comment on: http://stackoverflow.com/q/26123810
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41003651
comment on: http://stackoverflow.com/q/26156245
score: 0
type: Comment
has text: Where do these `tagged-interesting` come from?
type: QuestionComment

http://stackoverflow.com/comment/41083413
type: Comment
has text: You can also do `1..foo` but that just looks even weirder
comment on: http://stackoverflow.com/a/26192611
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40994566
type: AnswerComment
has text: Some kind of IPC is the easiest solution and is a valid answer. Although, the javabindings seems interesting. Could you write up an answer with sample code (how to use), maybe even how to build? You can add this to your existing answer, but can also post a separate answer.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26137873

http://stackoverflow.com/a/26121277
answers question: http://stackoverflow.com/q/26121129
score: 0
has body: Please note that it is a server-side redirect but you can use in cfscript: location("url", addtoken, statusCode); or &lt;cflocation url = "URL" addToken = "yes|no" statusCode = "300|301|302|303|304|305|307"&gt;
has comment: http://stackoverflow.com/comment/40938791
type: Answer

http://stackoverflow.com/comment/40807893
type: AnswerComment
comment on: http://stackoverflow.com/a/26038656
type: Comment
has text: Hi taras, yes you are right ,i want to store the userName after it is authenticated with github, and as services are already loaded it will loss its objective of being singleton.then how can i store userName after it is authenticated so every other controllers can see it ? Thanks
score: 0

http://stackoverflow.com/comment/41048351
comment on: http://stackoverflow.com/a/26180290
score: 0
type: Comment
has text: im wanting to add multiple of these directives containing unique data loaded from the controller. i dont really understand your solution
type: AnswerComment

http://stackoverflow.com/q/26189203
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41074497
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26310111
has comment: http://stackoverflow.com/comment/41131959
tagged with: file-upload
has comment: http://stackoverflow.com/comment/41132411
has title: Browser-based local file-system to SVG base64 data string
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/41131606
tagged with: angularjs
upvote count: 2
score: 2
type: AnsweredQuestion
has body: The use case is storing resized svg in database. This question has 2 parts. How to get a data string from loaded image file. How to resize the data string image via canvas. I've been able to use the following code with window.URL.createObjectURL() to get a nice string but in Angular, I might have the states (ui-router) mixed wrong. So when I click on the link created by console.log function createObjectURL() { console.log('file',file); return (window.URL) ? window.URL.createObjectURL(file) : window.webkitURL.createObjectURL(file); }; function revokeObjectURL(url) { console.log('url',url); return (window.URL) ? window.URL.revokeObjectURL(url) : window.webkitURL.revokeObjectURL(url); }; (function myUploadOnChangeFunction() { console.log('file',file); var src = createObjectURL(file); console.log('src',src); var image = new Image(); console.log('image',image); src = src.toLowerCase().replace(/'+/g, '').replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "-").replace(/^-+|-+$/g, ''); image.src = src; console.log('image.src',image.src); api.testMe = image.src; return api.testMe; // Do whatever you want with your image, it's just like any other image // but it displays directly from the user machine, not the server! })(); blob:http%3A//%3A9000/66705b7a-148a-4921-a48b-090fd2ceba52 is the link it gives.
accepted answer: http://stackoverflow.com/a/26310111
has comment: http://stackoverflow.com/comment/41131443
type: Question
answer count: 1

http://stackoverflow.com/q/26160066
has answer: http://stackoverflow.com/a/26160783
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Portrait screen with 2 pages but only one of them should show
type: Question
has comment: http://stackoverflow.com/comment/41010433
tagged with: css
answer count: 1
accepted answer: http://stackoverflow.com/a/26160783
score: 0
has body: The screen is always portrait and the size is variable. The page will load 2 pages next to each other like a book, but only one of them gets shown, the other one should be hidden on the left or right side depending on which page gets displayed right now. If the left page shows, there should be a way to move to the right page with a button. After you push that button to show the right page, the screen will move in that direction and will display the other page. Does anybody have an idea how to implement that with JavaScript or CSS.
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26088372
has comment: http://stackoverflow.com/comment/40879543
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26088309
answers question: http://stackoverflow.com/q/26088309
type: Answer
upvote count: 1
has body: $('#thumbs a').attr('rel' + firstThumb); returns the value of attribute which matches 'rel' + firstThumb To access the element, you should use $('#thumbs a[rel="'+firstThumb+'"]');
score: 1

http://stackoverflow.com/a/26127492
score: 0
has body: I think this is because you didn't check is your document ready. I added few improvements: caching jquery object in variables, makes your code a bit faster (you don't look for it everytime select is beeing changes). used recommended way of binding events - 'on' function 'disabled' is property not an attribute, jQuery has dedicated method to use on select change - check all selects if there is any not selected, it there is - set prop disabled to true, otherwise set false. instead of disabling submit at initialization, trigger same action you do when selected is beeing changed (if you start with option selected in all select initial state won't be disabled). $(document).ready(function () { var $submit = $('#submit'); var $selects = $('select.require_one'); $submit.on("click", function() { $('#searchform').submit(); }); $selects .on("change", function(){ var $not_selected = $selects.filter(function() { return !$(this).val(); }); $submit.prop('disabled', $not_selected.length ? true : false); }) .first() .triggerHandler('change'); });
has comment: http://stackoverflow.com/comment/40955648
answers question: http://stackoverflow.com/q/26126429
type: Answer

http://stackoverflow.com/q/26158141
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26159314
score: 0
has title: Featherlight Lightbox JS issue
type: Question
tagged with: javascript
tagged with: jquery
has body: Im implementing Featherlight's Lightbox in my WP theme.here's the Github page for anybody interested Seems like a really nice lightbox right? (if you guys advice any others, please let me know. I enqueued all css &amp; js files nicely in my functions.php and it works. in the documentation is stated that I can create galleries by adding this in my theme.js (for example): $('a.gallery').featherlightGallery({ gallery: { previous: '«', next: '»', fadeIn: 300 }, openSpeed: 300 }); This should mean that every a on a page with the class gallery will be combined into a clickable lightbox gallery, cool! however when I do this, my Owl-carousel breaksI embedded this beautiful slider in my theme as well and would like to use this slider in combination with the lightbox! What I found out so far: When the code above is not included in my js file, Owl carousel has the following classes assigned: owl-carousel owl-theme owl-responsive-1199 owl-loaded note the owl-loaded When the code above is included in my js file, the owl carousel only has the class owl-carousel, meaning is it hidden, and not loaded. It is there in my DOM, but it does not show up due to the missing classes. I have no idea what's causing this and what else to tell you guys. I can understand you have more questions, so please ask so I can give you more info. Thanks!
answer count: 1
has answer: http://stackoverflow.com/a/26159314
tagged with: conflict

http://stackoverflow.com/q/26049038
type: UnansweredQuestion
score: 2
has body: I know that there is a way to set up this the way I like, once you put the required attribute, you know that if the input isn't filled out, then a message will come up, If er the Browser is in Spanish, the HTML5 error message will be in Spanish, or if the Browser is in English, then the error will be in English. My question: how can I do to set up the language of those messages in Spanish by default? I am aware of the setCustomValidity of JavaScript, but I also checked this before http://www.w3schools.com/tags/ref_language_codes.asp but anyways applying the lang="es" it doesn't work. Now my simple form: &lt;form&gt; &lt;input type="text" pattern="\d{1,15}" required /&gt; &lt;input type="submit" /&gt; &lt;/form&gt;
downvote count: 0
tagged with: javascript
has title: Set up a language by default on HTML5 alerts
type: Question
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
answer count: 0
upvote count: 2

internet-explorer-9
tag name: internet-explorer-9
tags question: http://stackoverflow.com/q/26056167
tags question: http://stackoverflow.com/q/26056274
tags question: http://stackoverflow.com/q/26172973
tags question: http://stackoverflow.com/q/26163212
type: Tag
tags question: http://stackoverflow.com/q/26103091
tags question: http://stackoverflow.com/q/26185399

http://stackoverflow.com/q/26132328
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40959553
type: Question
has answer: http://stackoverflow.com/a/26132740
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26132377
has body: I have an HTML page, which contains a few different children in the body. I want the body to be the parent of only a single wrapper element, which will contain all of the previous children of the body. How would I go about doing this?
tagged with: javascript
has title: How can I place all children of document.body into a wrapper?
possible better answer: http://stackoverflow.com/a/26132377
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26132740

http://stackoverflow.com/a/26089623
has body: You have defined the thumbRel as 02 and you are not updating it directly anywhere. It is not referenced, but read&amp;used. In order to update both, could this help? function thumbIncrease() { firstThumb++; thumbRel = "0" + firstThumb; };
downvote count: 0
answers question: http://stackoverflow.com/q/26089607
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/26130069
has comment: http://stackoverflow.com/comment/40955722
has comment: http://stackoverflow.com/comment/40956195
has comment: http://stackoverflow.com/comment/40993561
has comment: http://stackoverflow.com/comment/40955898
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/40956957
answer count: 1
tagged with: javascript
favorite count: 0
has title: prototype programmatic style sheet
has comment: http://stackoverflow.com/comment/40956884
tagged with: css
type: UnansweredQuestion
downvote count: 2
type: Question
tagged with: prototypejs
has answer: http://stackoverflow.com/a/26150751
has body: Excuse the naivete of this but I have defined styles and upon a button click I would like to assign a style to an element. The target element is "msg00" and I cannot determine what attribute of that to pick to assign the desired style sheet. $$('id="msg00"').style="start"; knowable wrong. Also how would this be different in jQuery? Which I could migrate to.

http://stackoverflow.com/q/26117534
type: Question
has comment: http://stackoverflow.com/comment/41574314
tagged with: android
tagged with: events
upvote count: 2
type: UnansweredQuestion
has title: Javascript events for selections on tablets
tagged with: touch
score: 2
answer count: 0
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I'm currently trying to get rid of a problem within an application that is supposed to highlight selected textpassages in a document. The application is working fine in desktop browsers but is currently having trouble with mobile versions because the browsers(IE 11 mobile) text-selection works differently. The problem seems to be that the actual selection in the mobile version comes after the mouseup-event that is used to catch the selections. Because of this, the selections aren't updated properly until the next mouseup-event on the document and aren't updated at all if the next mouseup-event happens to take place outside of the document-area. Right now I'm looking for something like an event that is triggered after the selection or an event that is triggered before a textpart is losing its selection. So far I've tried most pointer- and touch-events (mostly variations like touchstart, -end, -leave, pointerdown, -out and -up). Further researches only led to selection-events for forms and input-fields which isn't what I'm looking for. Are there any suggestions for events or workarounds that suit my problem?

http://stackoverflow.com/a/26185813
has body: If you can't use jQuery set id on that inputs Voor een project Als stagebedrijf and use script function $(id){ return document.getElementById(id); } var fieldset = [ $('fProject'), $('fStage') ]; fieldset[0].style.display = 'none'; fieldset[1].style.display = 'none'; $('Project').onclick = function() { fieldset[0].style.display = 'block'; fieldset[1].style.display = 'none'; }; $('Stage').onclick = function() { fieldset[1].style.display = 'block'; fieldset[0].style.display = 'none'; };
type: Answer
answers question: http://stackoverflow.com/q/26185014
score: 0

http://stackoverflow.com/q/26043196
has comment: http://stackoverflow.com/comment/40799696
has answer: http://stackoverflow.com/a/26051546
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26045045
has title: Form validation onkeyup
answer count: 3
has comment: http://stackoverflow.com/comment/40801277
accepted answer: http://stackoverflow.com/a/26051546
tagged with: validation
upvote count: 0
tagged with: jquery
has body: I am using this code to send value when user hits enter. What I want is if user hits enter without entering any value, he gets an error <textarea class="auto-grow-input" onfocus="SK_focusChat();" onkeyup="SK_sendChatMessage(this.value,<?php echo $sk['chat']['recipient']['id']; ?>,event);"> // Send chat message function SK_sendChatMessage(text,recipient_id,e) { document.title = document_title; textarea_wrapper = $('.chat-textarea'); chat_messages_wrapper = $('.chat-messages'); if (e.keyCode == 13 && e.shiftKey == 0) { e.preventDefault(); textarea_wrapper.find('textarea').val(''); chat_messages_wrapper.append(' ' + text + ' '); $.post(SK_source() + '?t=chat&a=send_message', {text: text, recipient_id: recipient_id}, function (data) { chat_messages_wrapper .append(data.html) .scrollTop(chat_messages_wrapper.prop('scrollHeight')) .find('.temp-text') .remove(); }); } }
favorite count: 0
has answer: http://stackoverflow.com/a/26043681
has comment: http://stackoverflow.com/comment/40797363
possible better answer: http://stackoverflow.com/a/26043681
tagged with: php
has comment: http://stackoverflow.com/comment/40796803
has comment: http://stackoverflow.com/comment/40800127
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40796766
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40798600
has comment: http://stackoverflow.com/comment/40798929

http://stackoverflow.com/a/26046737
score: 3
upvote count: 3
has body: There is no need for the onkeyup attributes, since they original code from W3Schools was designed to instantly update values as they were entered. I did modify the functionality to clear of original value, that way the conversion button can work both ways with a simple code. Here's a quick JavaScript to do the job: function convertTemp() { // Set the initial variables for c (Celsius) and f (Fahrenheit) var c = document.getElementById('c'), f = document.getElementById('f'); // Test if there is a value for Celsius if(c.value != '') { // Set the value for Fahrenheit f.value = Math.round(c.value * 9 / 5 + 32); // Clear the value for Celsius c.value = ''; // If there isn't a value for Celsius } else { // Set the value for Celsius c.value = Math.round((f.value - 32) * 5 / 9); // Clear the value for Fahrenheit f.value = ''; } } And its accompanying HTML: Celcius:&lt;input id="c"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fahrenheit:&lt;input id="f"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;button type="button" id="convert" onclick="convertTemp()"&gt;Convert&lt;/button&gt; It can be tested at: http://jsfiddle.net/bhz6uz54/ Something to remember about simple code, like this, there is nothing to verify the supplied values are acceptable. A little regex can act as validation, but how it would be implemented depends on how you want to flag the problem.
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/26046474

http://stackoverflow.com/comment/40862631
type: QuestionComment
comment on: http://stackoverflow.com/q/26079203
has text: you could use the javascript abs() to make sure it's always positive in any event like: for(i=0;i<=abs(negativeorpositivenumber);i++){
score: 1
type: Comment

http://stackoverflow.com/comment/40969115
type: AnswerComment
comment on: http://stackoverflow.com/a/26136426
type: Comment
has text: No problem @jasmeet you don't have to edit them you can parse it. You can check where that value exists. Could you provide me some example where that value in html? like `your_value`.
score: 0

http://stackoverflow.com/q/26078681
tagged with: jquery
has title: Appending back in to the DOM after detaching
type: UnansweredQuestion
has body: I have a typical html structure of &lt;li&gt; &lt;div class="holder"&gt; &lt;img src="imgSrc" class="masterImage" height="200" width="100"&gt; &lt;/div&gt; &lt;/li&gt; The heights differ, its a masonry layout. What I want to do it detach the image from the DOM when the page scrolls and it goes out iof the viewport, then reattach it when its in the viewport again or for the first time. Whats happening is that the images are detaching ok but not reattaching This is the JQuery library code: (function($) { $.belowthefold = function(element, settings) { var fold = $(window).height() + $(window).scrollTop(); return fold &lt;= $(element).offset().top - settings.threshold; }; $.abovethetop = function(element, settings) { var top = $(window).scrollTop(); return top &gt;= $(element).offset().top + $(element).height() - settings.threshold; }; $.inviewport = function(element, settings) { return !$.rightofscreen(element, settings) &amp;&amp; !$.leftofscreen(element, settings) &amp;&amp; !$.belowthefold(element, settings) &amp;&amp; !$.abovethetop(element, settings); }; $.extend($.expr[':'], { "below-the-fold": function(a, i, m) { return $.belowthefold(a, {threshold : 0}); }, "above-the-top": function(a, i, m) { return $.abovethetop(a, {threshold : 0}); }, "in-viewport": function(a, i, m) { return $.inviewport(a, {threshold : 0}); } }); })(jQuery); And this is how I'm calling the above but as I said, they're not reattaching: $(window).bind("scroll", function(event) { $(".masterImage:below-the-fold").each(function() { $(this).detach(); }); $(".masterImage:above-the-top").each(function() { $(this).detach(); }); $(".masterImage:in-viewport").each(function() { $(this).appendTo($(this).parent()); }); }); Any ideas why this is failing? Is there a better way to do this?
type: Question
has answer: http://stackoverflow.com/a/26078752
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26111788
has title: Check the availability of a javascript funcion in a page
tagged with: function
has comment: http://stackoverflow.com/comment/41443601
has body: What I want is very simple, I want the Expand All button to be auto clicked when I open this pluralsight course page. Its HTML is: &lt;a id="expandAll" ng-click="expandAllModules()" ng-hide="allModulesExpanded()"&gt; Expand All &lt;/a&gt; So it seems easy and we just need to call the function expandAllModules(). However I don't know why it give me undefined when I check its type: typeof expandAllModules =&gt; "undefined" Generally typeof a function should give me "function" like this: function a(){} =&gt; undefined typeof a =&gt; "function" Since the function expandAllModules() is not available, I can't call it. Anyone can give me a hand on this issue? Edit Perhaps I need to elaborate on my question. I'm not the author of that page. I just want to make a simple greasemonkey or tempermonkey script and expand the modules automatically when I enter the page.
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40922101
linked to: http://stackoverflow.com/q/86513
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26406022
upvote count: 2
has comment: http://stackoverflow.com/comment/41449436
score: 1
has comment: http://stackoverflow.com/comment/41443626
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41450628
linked to: http://stackoverflow.com/q/25271393
possible better answer: http://stackoverflow.com/a/26396471
has answer: http://stackoverflow.com/a/26399445
has comment: http://stackoverflow.com/comment/40922114
has answer: http://stackoverflow.com/a/26396471
tagged with: javascript
has comment: http://stackoverflow.com/comment/41447464
accepted answer: http://stackoverflow.com/a/26406022
has comment: http://stackoverflow.com/comment/41443610
answer count: 3
has comment: http://stackoverflow.com/comment/40922280

http://stackoverflow.com/comment/40838762
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26064843
has text: ok, I just need to read more carefully.. I grabbed moment.js and now its formatting the date.. but, I get an error now: JavaScript runtime error: Object doesn't support property or method 'join' I'll post the code here..
type: AnswerComment

http://stackoverflow.com/comment/47245798
comment on: http://stackoverflow.com/q/26184381
has text: Not at all. Have had to suck it up for the past year and try rebuild the likes we lost unfortunately!
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26050686
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26073808
type: Question
has answer: http://stackoverflow.com/a/26051785
accepted answer: http://stackoverflow.com/a/26051785
possible better answer: http://stackoverflow.com/a/26072913
tagged with: closures
tagged with: javascript
has title: How do I program a shared state without closures?
has answer: http://stackoverflow.com/a/26072913
has body: var state = 0; var interval = setInterval(function() { // Do something depending on state }, 1000) Since everything can be done without closures, this is more of an intellectual exercise as I cannot see how to program something like this without closures. Do I pass state by reference into the anonymous function? (JavaScript doesn't support passing by reference)
score: 0
answer count: 4
has answer: http://stackoverflow.com/a/26050736

http://stackoverflow.com/comment/47673080
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26596085
type: AnswerComment
has text: Perfect. That was my problem! I was using AngularJS v1.2.9 with http://..../1.3.3/angular-animate.min.js so I changed to http://..../1.2.9/angular-animate.min.js and with this change worked like a charm

http://stackoverflow.com/comment/40873382
score: 0
has text: thx, will try to do like this..
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26084874

http://stackoverflow.com/a/26270022
accepted answer of: http://stackoverflow.com/q/26094486
has body: Thanks for the help. My instructor finally emailed me back and said to use a tab group and now the buttons are working fine.
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26094486

http://stackoverflow.com/comment/40948659
comment on: http://stackoverflow.com/q/26126269
type: Comment
type: QuestionComment
score: 0
has text: @JRulle, yep he is right, didn't notice the $this. any operation which is asynchronous like timeout or an ajax call will have window as the object in focus

http://stackoverflow.com/comment/41874078
has text: Nice one :) Worth mentioning that bower's own install of angular-animate allows suffixing of @[ng-version], which is recommended. I'd have avoided this issue if I'd used it.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26596085
type: AnswerComment

http://stackoverflow.com/comment/40978283
has text: KO uses jQuery, if it is available, to bind to events. Here is a sample that you could tweak: http://jsfiddle.net/rniemeyer/Lf53moaa/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26140774

http://stackoverflow.com/q/26052485
tagged with: http
tagged with: https
type: Question
tagged with: nginx
tagged with: javascript
has body: I have a node.js app running on a server behind a nginx reverse proxy. Nginx is setup to handle both HTTP and HTTPS and forward both to the same node.js app. Is it possible for the node.js app to figure out if the request came from http or https? Also, is it possible for the JS on the client side to figure out if its on http or https? EDIT: found one solution for client side: if (window.location.protocol != "https:") is there a better way than this?
has answer: http://stackoverflow.com/a/26053170
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26053170
has title: node.js app behind nginx can the node app figure out if the connection is http or https
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/q/26069151
accepted answer: http://stackoverflow.com/a/26109989
score: 0
answer count: 1
has body: When I go to the Heroku dashboard, the options for creating an app includes Node.js but no JavaScript. Does it mean to upload my locally created JavaScript/HTML5 app to Heroku, I have to select Node.js or there is another way to go about it?
tagged with: node.js
tagged with: heroku
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26109989
has title: Upload JavaScript/HTML based app to Heroku
type: Question
tagged with: javascript

http://stackoverflow.com/comment/40820976
comment on: http://stackoverflow.com/q/26056613
score: 0
type: Comment
type: QuestionComment
has text: `var howmany=longText.split("su").length` or `var res =longtext.match(/su/g);`

http://stackoverflow.com/q/26106736
favorite count: 0
has body: I have a button group that acts like a radio button group like the following: Option 1 Option 2 When I submit the form, the selected "radio" goes to the input hidden and it works as expected. The problem is if the user uses the back button. Let's say the user is on the page containing the code above, then the page navigates to another one, then if the user clicks the back button, the "state" of the button group is not kept. It resets making the UX not cool. So how do I keep the value if the user leaves the page and comes back using the back button? I had this same problem in a different project that I could easily fix by triggering the functions that handle the "change" event using jQuery. I would just check the value of the hidden and set the control state accordingly. But now I'm not using jQuery anymore and I don't think I should manipulate the DOM from within my controller. I'm using Angular and this site is not a SPA, using ajax to get the values is not the case here.
tagged with: angularjs
answer count: 0
downvote count: 0
type: UnansweredQuestion
score: 1
has title: Keeping AngularJS controls states on back button
type: Question
upvote count: 1
tagged with: javascript

http://stackoverflow.com/q/26154445
score: 0
has body: I am using on click method onclick example am using I am using two step Onclick method when I click 2nd Onclick a HTML form should open in same page how do I do that since I am using many sub categories Like ,mobile, computer, etc,... so I have many sub form when user click sub form the linked form should open in same page here is the working example Onclick method what I need is how to open html form file below
type: Question
accepted answer: http://stackoverflow.com/a/26155958
has comment: http://stackoverflow.com/comment/41000270
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/26147276
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Open html form below home page Onclick
has answer: http://stackoverflow.com/a/26155958
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41000933
tagged with: onclick

http://stackoverflow.com/comment/45544290
type: Comment
has text: I realize initially I had wanted a solution without a timeout, but in practice, this does seem to be the simplest approach. I've had it running in production quite a while now with no complaints from users.
type: AnswerComment
comment on: http://stackoverflow.com/a/26090282
score: 0

http://stackoverflow.com/a/31841099
has body: Just click the desired option. driver.findElement(webdriver.By.css('#mySelection &gt; option:nth-child(4)')) .click(); or by value driver.findElement(webdriver.By.css('#mySelection &gt; option[value=apple]')) .click(); Note that I've changed your 'By' to a css selector. I'm lazy and like to just drill into the option from developer tools and select Copy CSS Path (chrome) or Copy Unique Selector (firefox).
downvote count: 0
score: 13
answers question: http://stackoverflow.com/q/26041791
upvote count: 13
type: Answer

http://stackoverflow.com/comment/105064939
type: AnswerComment
has text: yea this is terrible, completely disregarding request headers and effectively tracking a users history
type: Comment
comment on: http://stackoverflow.com/a/54873384
score: 2

http://stackoverflow.com/comment/41701197
type: Comment
comment on: http://stackoverflow.com/a/26085656
type: AnswerComment
score: 1
has text: there's no "simple" way to do this.. it's one of the weak points of google extensions

http://stackoverflow.com/comment/40808654
score: 0
type: AnswerComment
type: Comment
has text: Thanks for the long and detailed answer! That's a cool solution but I think that will be an overkill for my small need, both in terms of complexity and costs (for the Node server). If that's the state of things I fear I'll have to rewrite my component in something that allow me to inject it in existing DOM elements, like Marionette. That's too bad anyway, I really liked React :(
comment on: http://stackoverflow.com/a/26049289

http://stackoverflow.com/comment/40887884
type: Comment
comment on: http://stackoverflow.com/a/26092626
type: AnswerComment
has text: So instead of the literal space, put a `&nbsp;` inside the ``.
score: 0

http://stackoverflow.com/q/26114732
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40927498
tagged with: asp.net-mvc-4
has answer: http://stackoverflow.com/a/26136164
has body: I am copying the selcted data from on grid to another on the click of a button. I am using postgre SQl for my apllication. Here is the link for the HTML. I am binding the data in as NpgsqlDataAdapter adp; NpgsqlConnection conn = new NpgsqlConnection(ConfigurationManager.ConnectionStrings["projop"].ConnectionString); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindPrimaryGrid(); BindSecondaryGrid(); } } private void BindSecondaryGrid() { DataTable dt = (DataTable)ViewState["SelectedRecords"]; gvSelected.DataSource = dt; gvSelected.DataBind(); } private void BindPrimaryGrid() { DataTable dt = new DataTable(); adp = new NpgsqlDataAdapter("select user_id, username,screen_name from users", conn); dt = new DataTable("users"); adp.Fill(dt); gvAll.DataSource = dt; gvAll.DataBind(); After the selection of the data &amp; button click as protected void btnSubmit_Click(object sender, EventArgs e) { GetData(); SetData(); BindSecondaryGrid(); } private void GetData() { DataTable dt; if (ViewState["SelectedRecords"] != null) dt = (DataTable)ViewState["SelectedRecords"]; else dt = CreateDataTable(); CheckBox chkAll = (CheckBox)gvAll.HeaderRow .Cells[0].FindControl("chkAll"); for (int i = 0; i &lt; gvAll.Rows.Count; i++) { if (chkAll.Checked) { dt = AddRow(gvAll.Rows[i], dt); } else { CheckBox chk = (CheckBox)gvAll.Rows[i] .Cells[0].FindControl("chk"); if (chk.Checked) { dt = AddRow(gvAll.Rows[i], dt); } else { dt = RemoveRow(gvAll.Rows[i], dt); } } } ViewState["SelectedRecords"] = dt; } private void SetData() { CheckBox chkAll = (CheckBox)gvAll.HeaderRow.Cells[0].FindControl("chkAll"); chkAll.Checked = true; if (ViewState["SelectedRecords"] != null) { DataTable dt = (DataTable)ViewState["SelectedRecords"]; for (int i = 0; i &lt; gvAll.Rows.Count; i++) { CheckBox chk = (CheckBox)gvAll.Rows[i].Cells[0].FindControl("chk"); if (chk != null) { DataRow[] dr = dt.Select("CustomerID = '" + gvAll.Rows[i].Cells[1].Text + "'"); chk.Checked = dr.Length &gt; 0; if …
has title: While binding the gridview throwing an error in a process?
type: Question
has comment: http://stackoverflow.com/comment/40927247
tagged with: c#
tagged with: javascript
score: 0
answer count: 1
tagged with: asp.net

http://stackoverflow.com/q/26081214
type: Question
downvote count: 0
has title: How to run a script file that opens localhost:3000 or ipAddress:3000 from PhantomJs
has body: I use localhost:3000 for browser testing (via browser-sync in Grunt). This address or ipAddress:3000 is the only address that Browsersync uses to synchronize user interactions in multiple browsers, e.g. click, scroll etc. My goal is to create these "interactions" in PhantomJs hence automating these interactions across the real opened browsers. (I tried imacro chrome/firefox plugin but input interaction does not sync). This is a bit like end-to-end testing except I will be able to see how the webpage behaves. The current problem is when I try to do a simple test, i.e. capture a screen shot, it cannot access that Url address and there is not screenshot file generated. However if I were to use for example page.open(file:///d:/index.html) it works but it will not sync user interactions with other browsers. How should I solve this?
tagged with: javascript
favorite count: 0
tagged with: node.js
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/40870390
score: 1
has comment: http://stackoverflow.com/comment/40872941
tagged with: gruntjs

http://stackoverflow.com/comment/40922139
type: AnswerComment
type: Comment
score: 0
has text: Thank you very much. It did not fix the issue, however none the less you did point out a big mistake of mine.
comment on: http://stackoverflow.com/a/26111590

http://stackoverflow.com/comment/40888252
type: QuestionComment
score: 2
has text: How is `compare()` called?
comment on: http://stackoverflow.com/q/26092906
type: Comment

http://stackoverflow.com/q/26150735
has comment: http://stackoverflow.com/comment/40993742
has answer: http://stackoverflow.com/a/26156129
has comment: http://stackoverflow.com/comment/40994000
score: 0
tagged with: datetime
has comment: http://stackoverflow.com/comment/40994570
answer count: 1
has comment: http://stackoverflow.com/comment/40994205
has comment: http://stackoverflow.com/comment/40993906
tagged with: cross-browser
favorite count: 0
has title: Javascript difference in seconds between two datetime cross browser
type: UnansweredQuestion
has body: I have a function where i need to calculate the difference in seconds between two datetime. I do something like this: var sData = new Date(Date.parse(sData)); var tData = new Date(Date.parse(response.scroll.datain)); var timeDiff = Math.abs(tData.getTime() - sData.getTime()); timeDiff = parseInt(timeDiff)/1000; Chrome return the correct difference in seconds between the two datetime fields, firefox and opera return 0. How can achieve this result in cross browser mode? Thanks in advance
has comment: http://stackoverflow.com/comment/40994234
upvote count: 1
has comment: http://stackoverflow.com/comment/40993709
downvote count: 1
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26046685
type: AnsweredQuestion
upvote count: 0
score: -1
type: Question
has answer: http://stackoverflow.com/a/26046904
has comment: http://stackoverflow.com/comment/40803413
has title: Issue on Setting HTML Select Option Using jQuery
has answer: http://stackoverflow.com/a/26046871
has body: I am trying to change selected item from the list options dynamically at This Demo but it is not working. Select From List Mustard Ketchup Relish Set Default can you please let me know what I am doing wrong?
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/14804253
has answer: http://stackoverflow.com/a/26046837
linked to: http://stackoverflow.com/q/5874652
downvote count: 1
tagged with: bootstrap-select
favorite count: 0
possible better answer: http://stackoverflow.com/a/26046871
has comment: http://stackoverflow.com/comment/40803731
answer count: 5
has answer: http://stackoverflow.com/a/26046915
has comment: http://stackoverflow.com/comment/40803287
has answer: http://stackoverflow.com/a/26046885
accepted answer: http://stackoverflow.com/a/26046904

http://stackoverflow.com/comment/68516126
has text: When I'm using this to update the entire subdoc (rather than just one field) this seems to be removing the `_id` property of the subdocument that MongoDB gave it for being part of an array. This is probably because I removed the `_id` property from the postman request body, so maybe I just need to make sure it's in the request body? Seems weird that MongoDB is letting me completely overwrite the whole object, including removing the `_id` property. It doesn't do that on parent objects (effectively a PATCH request instead of PUT). Any workaround?
type: Comment
comment on: http://stackoverflow.com/a/26157458
score: 2
type: AnswerComment

http://stackoverflow.com/q/26095242
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26113080
score: 0
answer count: 1
tagged with: file-upload
has title: dojox/form/Uploader processing onclick events in disabled state
has body: I'm using the dojox/form/Uploader that's initially in disabled state: Upload require(["dojox/form/Uploader"], function(){ var u = new dojox.form.Uploader({ label:"Uploader", multiple:false, uploadOnSelect:false, disabled: true}, "uploadNode"); u.startup() }) The widgit is obviously displayed as disabled, but you can still click on it and make the upload. It is reproduced on FireFox and IE (11). I've made JsFiddle for that. JsFiddle is for version 1.9.3, but it's happening in version 1.10.0. How can I functionally (not only visually) disable dojox/form/Uploader? Is there any workaround or codefix I can apply?
tagged with: dojo
has answer: http://stackoverflow.com/a/26113080
type: AnsweredQuestion
type: Question

http://stackoverflow.com/q/26102239
tagged with: aem
score: 4
upvote count: 4
has answer: http://stackoverflow.com/a/26118267
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has title: AEM/CQ: Conditional CSS class on decoration tag
has body: How can I dynamically set a CSS class on the wrapping decoration tag of an AEM6 Sightly component? I cannot set this CSS class on the component as it depends on the instance of the component, and I can't set it on the resource as the resource can be rendered on multiple pages and the CSS class differs depending on which page it is on. I've tried the following 3 techniques inside the JavaScript Use-API with no success: componentContext.getCssClassNames().add('test-class-1'); component.getHtmlTagAttributes().set('class', 'test-class-2');//throws an exception currentNode.setProperty('cq:cssClass', 'test-class-3');
favorite count: 0
has answer: http://stackoverflow.com/a/48503636
type: Question
answer count: 2

http://stackoverflow.com/q/26188333
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26188393
has title: how to search in table?
favorite count: 0
has body: How do i search using the table below as well as lower and uppercase search filters any help on JavaScript will be appreciated thank you :) Products List A List B apple 100 snapple 200
upvote count: 1
downvote count: 1
possible better answer: http://stackoverflow.com/a/26188351
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26188351
accepted answer: http://stackoverflow.com/a/26188393

http://stackoverflow.com/q/26074776
possible better answer: http://stackoverflow.com/a/26074948
score: 0
answer count: 3
tagged with: jquery
has body: I have an Add More Attachments function. Every time I click the button, one more attachment shows up, which causes the page getting longer. I write a syntax to detect the body's height after the attachments show up, but somehow it doesn't work. Please help. Live Code HTML Add JS var i=0; $('#addNew').click( function() { if( i < 10) { i++; $('.attachField').append( ' ' ); } $('body').on('load', function() { var bodyAfterClick = $(this).contents().height(); alert(bodyAfterClick); $('body').height(bodyAfterClick); }); }); //end click
linked to: http://stackoverflow.com/q/11023183
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26074948
has answer: http://stackoverflow.com/a/26074970
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40854431
has title: Detect the Body's Height
type: Question
has answer: http://stackoverflow.com/a/26074890
accepted answer: http://stackoverflow.com/a/26074890
tagged with: javascript

http://stackoverflow.com/q/26182640
has title: how can I load the cookies from diff browsers to asp.net?
has comment: http://stackoverflow.com/comment/41052852
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: asp.net
favorite count: 0
type: UnansweredQuestion
has body: I logged in my facebook and saved my username/password (firefox) and I want to know how can I access it from asp.net?
score: -3
downvote count: 3
type: Question
tagged with: cookies
has answer: http://stackoverflow.com/a/26182665
tagged with: browser

http://stackoverflow.com/q/26067613
answer count: 2
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
duplicate of: http://stackoverflow.com/q/15519527
tagged with: css
has body: I know that you can select a particular id'd element and change it's style with JavaScript using GetElementById, and I know there's a way to do this with classes as well. But is there a way to change styles associated with the html tag, the body tag, or the p tag? In other words, can you change an element's CSS using JavaScript, and if so, how? This is in contrast to changing an element by selecting it by id or class. In particular, I'm looking to see the following accomplished through JavaScript after the page loads. &lt;style&gt; html { height: 100%; // Just looking to add this height attribute } &lt;/style&gt; Thanks for your help. I am struggling to find the solution to this.
possible better answer: http://stackoverflow.com/a/26067714
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/15519527
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/26067629
has title: Can an element, such as 's, style be changed through JavaScript?
type: Question
has answer: http://stackoverflow.com/a/26067629
tagged with: javascript
has answer: http://stackoverflow.com/a/26067714

http://stackoverflow.com/q/26085833
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40892720
has answer: http://stackoverflow.com/a/26085927
tagged with: jquery
tagged with: file-upload
tagged with: ajax
type: Question
has comment: http://stackoverflow.com/comment/40987873
score: 0
has comment: http://stackoverflow.com/comment/40875709
answer count: 1
has body: I get a very weird problem when I want to use jQuery ajaxForm. I want to set form and upload file with having progress percent. my ajaxForm function is not fire at all. here is my code but I cant find out where is the problem because I get no error. function recieve(res,obj) { var frm = res.substr(1,res.length-8); $('#'+frm).find('.error').each(function(){ $(this).remove(); }); if(obj['alert']!=undefined) $(res).html(obj['alert']); if(obj['field']!=undefined) { for(var i in obj['field']) { /*$("#"+i).next('.error').remove();*/ if(obj['field'][i]!='') $("#"+i).after(' '+obj['field'][i]+' '); } } if(obj['msgbox']!=undefined) alert(obj['msgbox']); if(obj['location']!=undefined) document.location = obj['location']; } function sendAjax(form,response,loader,progress) { var frm = $(form); frm.ajaxForm({ dataType: 'json', data: frm.serialize()+'&_ajax=1', beforeSend: function(){ $("input[type='submit']").attr('disabled','disabled'); $(progress).width('0%').parent('.progress').removeClass('hidd'); }, uploadProgress: function(event, position, total, percentComplete){ var pVel = percentComplete + '%'; $(progress).width(pVel); }, complete: function(data){ recieve(response,unserialize(data)); $(progress).parent('.progress').addClass('hidd'); $("input[type='submit']").attr('disabled',null); } }); return false; }
has title: ajaxForm is not working and not returning error
tagged with: ajaxform

http://stackoverflow.com/q/26045017
type: AnsweredQuestion
tagged with: data-binding
tagged with: knockout.js
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26045601
accepted answer: http://stackoverflow.com/a/26045601
score: 0
answer count: 1
has title: How to properly apply KO binding the following example
has body: Basicaly, I have viewModel in KO having array of 2 values, I need to change css class prop of element (main) when elemets are being clicked (when 1st li>a "Val1" clicked, ... and so on). Strangely , nothing happends to : Val1 Val2
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/78999023
has text: You should mention other popular flux-based state handling solutions such as Redux
comment on: http://stackoverflow.com/a/26168981
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/26164251
downvote count: 2
accepted answer of: http://stackoverflow.com/q/26164210
has comment: http://stackoverflow.com/comment/41018695
type: Answer
answers question: http://stackoverflow.com/q/26164210
has comment: http://stackoverflow.com/comment/41018627
has comment: http://stackoverflow.com/comment/41044990
upvote count: 5
score: 3
has comment: http://stackoverflow.com/comment/41019083
has comment: http://stackoverflow.com/comment/41019429
has comment: http://stackoverflow.com/comment/41019508
type: AcceptedAnswer
has body: FIDDLE var formIndex=0; var inputName="txtbox"; vall= $("form:eq("+ formIndex+") input[name= "+ inputName +" ]").val(); alert(vall); your order was wrong

http://stackoverflow.com/a/26189048
has body: You have to just say like this onsubmit="return validateForm();" instead of onsubmit="validateForm();" updated demo That was because you were checking the value of selected in for loop, so for first time it's value is "" second time it's become No.
has comment: http://stackoverflow.com/comment/41065281
score: 4
has comment: http://stackoverflow.com/comment/41065228
has comment: http://stackoverflow.com/comment/41065253
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41065162
answers question: http://stackoverflow.com/q/26189025
type: Answer
has comment: http://stackoverflow.com/comment/41065294
accepted answer of: http://stackoverflow.com/q/26189025
upvote count: 4

ember.js
tags question: http://stackoverflow.com/q/26094799
tags question: http://stackoverflow.com/q/26063895
tags question: http://stackoverflow.com/q/26086667
tags question: http://stackoverflow.com/q/26161686
tags question: http://stackoverflow.com/q/26163402
tags question: http://stackoverflow.com/q/26088553
tags question: http://stackoverflow.com/q/26138037
tags question: http://stackoverflow.com/q/26110420
type: Tag
tag name: ember.js
tags question: http://stackoverflow.com/q/26140787
tags question: http://stackoverflow.com/q/26107004
tags question: http://stackoverflow.com/q/26099103
tags question: http://stackoverflow.com/q/26173092
tags question: http://stackoverflow.com/q/26117126
tags question: http://stackoverflow.com/q/26132392
tags question: http://stackoverflow.com/q/26074994
tags question: http://stackoverflow.com/q/26040271
tags question: http://stackoverflow.com/q/26079799
tags question: http://stackoverflow.com/q/26133135
tags question: http://stackoverflow.com/q/26151680
tags question: http://stackoverflow.com/q/26088172
tags question: http://stackoverflow.com/q/26055766
tags question: http://stackoverflow.com/q/26104288
tags question: http://stackoverflow.com/q/26182195
tags question: http://stackoverflow.com/q/26140710
tags question: http://stackoverflow.com/q/26188461
tags question: http://stackoverflow.com/q/26151229
tags question: http://stackoverflow.com/q/26163936
tags question: http://stackoverflow.com/q/26128810
tags question: http://stackoverflow.com/q/26152478
tags question: http://stackoverflow.com/q/26142345
tags question: http://stackoverflow.com/q/26069739
tags question: http://stackoverflow.com/q/26096256
tags question: http://stackoverflow.com/q/26190863
tags question: http://stackoverflow.com/q/26165642
tags question: http://stackoverflow.com/q/26186669

http://stackoverflow.com/a/26114392
has comment: http://stackoverflow.com/comment/40926729
has comment: http://stackoverflow.com/comment/40926858
has comment: http://stackoverflow.com/comment/40927222
has body: If you want to use TinyBox, you need to serialize your form before you post it. One of the fastest and nonpainful way to do this to use jQuery (Just add reference if you haven't done this.) TINY.box.show({url: $("form").prop("action"), post:$('form').serialize(),width:200,height:100,opacity:20,topsplit:3}) First one grabs the "action" url from your form, and the second method makes your form to be posted with TinyBox. This code should display a tinybox when user submits the form: $("form").submit(function( event ) { event.preventDefault(); TINY.box.show({ url: $("form").prop("action"), post: $('form').serialize(), width:200, height:100, opacity:20, topsplit:3 }); return; }); Just put this inside &lt;script type="text/javascript"&gt; $(document).ready(function () { // Here. } &lt;/script&gt; block.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26114164
has comment: http://stackoverflow.com/comment/40928001
score: 0
accepted answer of: http://stackoverflow.com/q/26114164
type: Answer
has comment: http://stackoverflow.com/comment/40928059

http://stackoverflow.com/comment/40876372
score: 0
type: Comment
type: QuestionComment
has text: Oh I see. I had remembered it the other way around.
comment on: http://stackoverflow.com/q/26086663

http://stackoverflow.com/a/26147818
has body: Give the a class ( echo " ... ), create a named table with tbody and stuff and by using jQuerys closest() function you should then be able to find the values: $('#name_of_table tbody').on( 'click', 'tr', function () { alert($(this).closest('tr').find('.whatever').html()); }); Create table like: <?php while ($row = db2_fetch_array($result)) { echo" "; echo " $row[2] "; echo" "; } ?>
type: Answer
accepted answer of: http://stackoverflow.com/q/26145489
answers question: http://stackoverflow.com/q/26145489
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40989566
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26133001
type: Question
answer count: 2
upvote count: 0
tagged with: javascript
score: -1
has title: How do I reuse a random result?
has answer: http://stackoverflow.com/a/26133048
has body: &lt;script type="text/javascript"&gt; var a = new Array( "Jane", "Tom,", "Alan,", "Mary"); &lt;/script&gt; &lt;script type="text/javascript"&gt; document.write(a[Math.floor(Math.random()*a.length)]); &lt;/script&gt; ate an apple Is there away of reusing the answer to (a[Math.floor(Math.random()*a.length)]) later on in a script? So for example I could later use text along the lines of Harry asked "answer" if they had enjoyed the apple
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26133033
downvote count: 1
linked to: http://stackoverflow.com/q/363681

http://stackoverflow.com/comment/41021287
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26165417
has text: Well, if all you tried was to change the selector then that won't work. You can't set the `.text()` of an `input` because it doesn't have a "text" to set. It has a "value". It's a subtle semantic difference, but an important one. So to set the value you would use the `.val()` function.

http://stackoverflow.com/comment/41104975
comment on: http://stackoverflow.com/a/26183336
score: 0
type: AnswerComment
has text: That makes sense. I've taken a look at this tutorial, but I could not see anything about javascript calling webservices. Is this possible natively with javascript, or should I use tierce lib, as JQuery for example?
type: Comment

http://stackoverflow.com/q/26145616
tagged with: javascript
tagged with: variables
tagged with: console
favorite count: 0
accepted answer: http://stackoverflow.com/a/26145761
has comment: http://stackoverflow.com/comment/40984048
score: -1
has title: Why changing array variables item affects the array it has been inserted to in Javascript?
has comment: http://stackoverflow.com/comment/40984011
has comment: http://stackoverflow.com/comment/40983799
downvote count: 1
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/7486085
linked to: http://stackoverflow.com/q/6612385
has body: Here's some code: var a = [1,2,3]; var b = [5,4]; var c = 6; a.push(b); console.log(a); b[0] = 1; console.log(a); console.log(b); a.push(c); console.log(a); c = 7; console.log(a); Here's the result in console: [ 1, 2, 3, [ 5, 4 ] ] [ 1, 2, 3, [ 1, 4 ] ] [ 1, 4 ] [ 1, 2, 3, [ 1, 4 ], 6 ] [ 1, 2, 3, [ 1, 4 ], 6 ] Can someone tell me why changing the first item of b array after pushing it to the a array also affects the a array here? For example when I change the value of c variable pushed to a array it doesn't affect the a array and that's what I want to happen with b as well.
type: Question
linked to: http://stackoverflow.com/q/4057440
upvote count: 0
duplicate of: http://stackoverflow.com/q/6612385
has answer: http://stackoverflow.com/a/26145761
tagged with: arrays
answer count: 1

http://stackoverflow.com/q/26179214
favorite count: 0
has answer: http://stackoverflow.com/a/26179329
has title: Javascript Regular Expressions are not working; always returns false
tagged with: regex
has comment: http://stackoverflow.com/comment/41046003
has body: I need to write a regular expression that will check that the strings matches the format 'ACT' followed by 6 digits eg. 'ACT123456' Though it looks quite simple, none of my options work; the function always returns false. I tried the following combinations: Pure regexpression literals var format = /^ACT\d{6}$/; var format = /^ACT[0-9]{6}$/; Or using RegExp object with double escaping (eg. \\d) and with single escaping (\d) var format = new RegExp("^ACT\\d{6}$"); var format = new RegExp("^ACT[0-9]{6}$"); My function for testing is: function testPattern(field, pattern) { if (!pattern.test(field)) { return false;} else { return true; }}
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26179604
has answer: http://stackoverflow.com/a/26179402
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41046088
tagged with: javascript
score: -1
answer count: 3
has comment: http://stackoverflow.com/comment/41046577
upvote count: 0

http://stackoverflow.com/comment/41131941
comment on: http://stackoverflow.com/a/26188330
type: Comment
has text: Thanks, you saved my weekend. I apologize I had the wrong version of the fiddle listed in the post, it was one I was playing around with. That's why there was some oddities in there. Ultimately what ended up being the solution was that I needed to change my Jquery loader to $(function() {} instead of window.onload = function() {} After I changed that it worked in IE. I am going to try to research why that is.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41047805
type: Comment
comment on: http://stackoverflow.com/a/26168981
score: 0
type: AnswerComment
has text: Absolutely agree with this answer, flux is the way to go once things start getting very nested and complex. Loving it at the moment personally.

http://stackoverflow.com/q/26144013
tagged with: css
has answer: http://stackoverflow.com/a/26144561
accepted answer: http://stackoverflow.com/a/26145181
has title: jQuery/JS – scroll to next element on click (scrollable div issues)
has comment: http://stackoverflow.com/comment/40981901
has body: I have a simple blog, and each blog post has a number of images ranging from 1 to 10. If you click on any of the images in the post, it should scroll you down to the next post. I thought something as simple as this would've worked: $('.each-journal-entry .slider-container .journal-slider .each-slide img').on('click', function () { var $this = $(this); $('.journal-container').animate({ scrollTop: $this.closest('.each-journal-entry').next().offset().top }, 500); }); But when I click another image, except for the first one, it just scrolls to an odd position. I managed to achieve this with some help, and you can see the output here: http://jsfiddle.net/w7rtcmp0/3/ which works great, but the difference for me is that my content is in a scrollable div (hence .journal-container and not html, body. Any ideas why I am having this issue? I have created a jsFiddle with the scrollable div, and if you click an image further down... it replicates this issue... so hopefully this helps. http://jsfiddle.net/w7rtcmp0/5/ Thanks.
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40982203
has answer: http://stackoverflow.com/a/26145181
has comment: http://stackoverflow.com/comment/40981076
has comment: http://stackoverflow.com/comment/40982822
has comment: http://stackoverflow.com/comment/40981141
tagged with: javascript
has answer: http://stackoverflow.com/a/26144566
tagged with: jquery
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/26144561
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26063109
has answer: http://stackoverflow.com/a/26063185
tagged with: jquery
has comment: http://stackoverflow.com/comment/40833530
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: wordpress
has title: Disable opening of popup when downloading a file
tagged with: php
score: 2
has comment: http://stackoverflow.com/comment/40833558
type: Question
has body: I am creating a wordpress page that allows users to downloads a zip file after 5 secs. In it, I am calling a second page and pass POST parameters ( zip id :: to fetch zip path). The page is called but always as a pop up. I am looking for a clean download options, where without opening tabs or new window, download begins. Bypasses popup - blockers also. I have tried two methods A) Method 1 ( Jquery Post) $.post( "&lt;?php echo get_permalink(get_page_by_title('Download Page')); ?&gt;", {attachment_path: "&lt;?php echo $attachment[0]-&gt;ID ; ?&gt;" } B) Method 2 (Submitting a form) $( '&lt;form action="" method="post" target="_parent" class="hide"&gt; &lt;input type="hidden" name="attachment_path" value="&lt;?php echo $attachment[0]-&gt;ID ; ?&gt;" /&gt; &lt;input type="submit" name="submit" value="submit" id="target-counter-button"/&gt; &lt;/form&gt;' ).submit(); Edit 1) Looking for a POST method to implement the logic 2) Due to server restrictions, direct access to *.php files and *.zip files have been blocked 3) Parent Download Page should remain open in the process Looking for a expert advice on this issue. Thanks
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40833295
tagged with: javascript

http://stackoverflow.com/a/26156526
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41004239
has body: How do i make it adjusted You can make your function take a parameter object, like this: CommonManager.displayWizard({ attributeForm : $('#attributeForm'), wizard: $('#wizard') }); You could combine both approaches. For instance, in jQuery these lines are equivalent: $(this).css("color", "red"); $(this).css({ color: "red" }); This is because the css function checks if its first parameter is an object and acts accordingly. if 1 isn't possible then How do i skipped passing You already can use the following: CommonManager.displayWizard($('#wizard'), $('#attributeForm') /* no undefined here */); If you skip a parameter at the end of the argument list, the default value passed to the function will be undefined. Lastly i wanna know, if i am following the right way of doing or handling this optional parameters If I know I may want to expand on a function's parameters in the future and some of them are/will be optional, I often create the function so that it accepts a single parameter: an object containing all the values I need to pass to the function. This way, I can add parameters with default values, and still have calls that skip some values without breaking anything.
has comment: http://stackoverflow.com/comment/41004171
upvote count: 1
answers question: http://stackoverflow.com/q/26156397
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26156397
has comment: http://stackoverflow.com/comment/41004102
has comment: http://stackoverflow.com/comment/41004134
type: Answer

http://stackoverflow.com/a/26036980
type: Answer
answers question: http://stackoverflow.com/q/26036797
has body: Please check the fiddle &lt;div class="container"&gt; &lt;div class="content"&gt; content content content &lt;br/&gt; moooooooooooooooore content &lt;br/&gt; another content &lt;/div&gt; &lt;/div&gt; html, body { margin: 0; padding: 0; width: 100%; height: 100%; display: table; } .container { display: table-cell; text-align: center; vertical-align: middle; } .content { background-color: red; display: inline-block; text-align: left; } fiddle here
score: 0

http://stackoverflow.com/comment/41064604
comment on: http://stackoverflow.com/q/26188791
score: 0
type: Comment
has text: Why not just not allow controls for seeking?
type: QuestionComment

http://stackoverflow.com/q/26103471
favorite count: 0
has answer: http://stackoverflow.com/a/26103523
has comment: http://stackoverflow.com/comment/40907063
upvote count: 1
linked to: http://stackoverflow.com/q/1938294
linked to: http://stackoverflow.com/q/3338680
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40907078
score: 1
has comment: http://stackoverflow.com/comment/40906979
has body: Hey guys need a bit of help here. I'm trying to find all class names that start with the same naming convention in the DOM and put them all in to an array. so for example. John Doe Bob David I need help making the above code with a little bit of JavaScript to the array below. var classArr = ["userName_342","userName_366","userName_234","userName_873"]; Any help on how to even get started would be greatly appreciated. Thank you.
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40907227
accepted answer: http://stackoverflow.com/a/26103523
has answer: http://stackoverflow.com/a/26103696
downvote count: 0
linked to: http://stackoverflow.com/q/2178416
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26103696
has title: How to find all class names with same name convention and put to arrary using Javascript
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40907114

http://stackoverflow.com/comment/40874612
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26085181
has text: you are right to be looking at the default event of the submit button. I already tried and solved my question :) thank for helping me :)

http://stackoverflow.com/comment/47966489
type: Comment
type: QuestionComment
has text: If you add nodes or links then you will probably have this exact problem if you don't stop the layout first. This is because there are arrays closured inside the layout that are assumed to have lengths matching the nodes and links. Not sure about removing elements, but anyway, all of this is re-aligned in `force.start()`... Calculations on missing elements will error in the next tick, so you should always stop the layout, change its structure and then call `force.start()`. This way the internal structures will always be aligned with the nodes and links...
comment on: http://stackoverflow.com/q/26149714
score: 1

http://stackoverflow.com/a/26071714
answers question: http://stackoverflow.com/q/26071680
score: 5
type: AcceptedAnswer
upvote count: 5
type: Answer
has body: This is because you did not include resA in your array notation, it should be like this: .controller('introController', ['$scope', 'resA', function($scope, resA) { $scope.resA = resA.value; }]);
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26071680

http://stackoverflow.com/q/26156536
downvote count: 0
has comment: http://stackoverflow.com/comment/115111416
score: 1
type: Question
tagged with: ecmascript-6
answer count: 2
has answer: http://stackoverflow.com/a/26156638
tagged with: javascript
tagged with: event-handling
tagged with: dom-events
favorite count: 0
has answer: http://stackoverflow.com/a/26156586
accepted answer: http://stackoverflow.com/a/26156586
possible better answer: http://stackoverflow.com/a/26156638
linked to: http://stackoverflow.com/q/17604497
upvote count: 1
has title: Using `new` and `()` with require
tagged with: node.js
has body: What is the difference between: var events = require('events'), emitter = new events.EventEmitter(); and var emitter = require('events').EventEmitter; or EventEmitter is pretty forgiving in using/not using new and ()?
type: AnsweredQuestion

http://stackoverflow.com/q/26087280
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: openlayers-3
accepted answer: http://stackoverflow.com/a/26379972
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
type: Question
has body: I've adapted the OpenLayers 3 select features example to get hover effect when the user points a feature (taken from a GeoJSON FeatureList), but I've lost the drag map interaction. // Mouse over var seleccion = new ol.interaction.Select({ condition: ol.events.condition.mouseMove, style: function (feature, resolution) { // Style Manager handles Style Creation return [StyleManager.getStyle(feature, true)]; } }); map.addInteraction( seleccion ); Is there a way to produce a feature style change on hover without sacrificing the drag/pan interaction? You can see the same problem in the linked example when you set the action type to Hover. There's an unanswered question in openlayers 3 mailing list
has answer: http://stackoverflow.com/a/26379972
has title: Drag map lost in OpenLayers 3 when using hover SelectInteraction with ol.events.condition.mouseMove

http://stackoverflow.com/a/39124967
type: Answer
answers question: http://stackoverflow.com/q/26099709
upvote count: 1
downvote count: 0
score: 1
has body: A good solution could be to mix @uzb answer and this. It was posted here as well: resizing flipclock.js not resizing as expected Use these media queries as suggested by @uzb but adjust only these variables $clock-flip-font-size: 120px $clock-flip-border-radius: 8px $clock-digit-gap: 20px $clock-dot-size: 20px $clock-height: ($clock-flip-font-size * 1.2) $clock-flip-width: ($clock-flip-font-size * 0.8) $clock-flip-margin: ($clock-digit-gap / 2) $clock-flip-section-width: (2 * ($clock-flip-width + 2 * $clock-flip-margin)) $clock-flip-bg: #607D8B $clock-flip-shadow: 0 2px 5px rgba(0, 0, 0, 0.7) $clock-flip-font-color: #F44336 $clock-flip-font-shadow: 0 1px 2px #000 This is a solution adapted from one of the repo's closed issue (unsolved). It seems that the dev's promised a new API but that was more than 1 year ago. It's not perfect as there are some issues when setting $clock-flip-font-size: 120px. Also, when minutes are being displayed as 3 digits, the "Minutes" text is not centered. Here is the codepen: https://codepen.io/jimasun/pen/PzAqVw/ // // ------------------------- FlipClock // $clock-flip-font-size: 120px $clock-flip-border-radius: 8px $clock-digit-gap: 20px $clock-dot-size: 20px $clock-height: ($clock-flip-font-size * 1.2) $clock-flip-width: ($clock-flip-font-size * 0.8) $clock-flip-margin: ($clock-digit-gap / 2) $clock-flip-section-width: (2 * ($clock-flip-width + 2 * $clock-flip-margin)) $clock-flip-bg: #607D8B $clock-flip-shadow: 0 2px 5px rgba(0, 0, 0, 0.7) $clock-flip-font-color: #F44336 $clock-flip-font-shadow: 0 1px 2px #000 .countdown-wrapper left: 50% position: absolute top: 50% transform: translate(-50%, -50%) .countdown.flip-clock-wrapper ul height: $clock-height margin: 0 $clock-flip-margin width: $clock-flip-width box-shadow: $clock-flip-shadow .countdown.flip-clock-wrapper ul li line-height: $clock-height .countdown.flip-clock-wrapper ul li a div div.inn background-color: $clock-flip-bg color: $clock-flip-font-color font-size: $clock-flip-font…

http://stackoverflow.com/a/26150818
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26127443
type: Answer
answers question: http://stackoverflow.com/q/26127443
score: 1
has body: One issue is this: function c2p_p(r) { return r.type == vType.Cartesian ? { r: Math.sqrt(r.x ^ 2 + r.y ^ 2 + r.z ^ 2), theta: Math.acos(r.z / Math.sqrt(r.x ^ 2 + r.y ^ 2 + r.z ^ 2)), phi: Math.atan2(r.y / r.x), type: vType.Polar } : r } In JavaScript, the ^ operator is bitwise XOR, not exponentiation. Just write r.x*r.x + r.y*r.y + r.z*r.z instead.
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/26150346
score: 0
answers question: http://stackoverflow.com/q/26150084
type: Answer
has body: I would say load the initial page and append the data to the wall as you get it. No need to send objects. All the data you need will be in the responseText of the request object var request = new XMLHttpRequest(); var form = new FormData(); form.append('param_1',val_1); form.append('param_2',val_2); request.open("http://example.com/getPostsForWall.php","POST",true); request.send(form); request.onreadystatechange = function(){ if(request.status==200 &amp;&amp; request.readyState == 4){ //Successful request response = JSON.parse(request.responseText); //Want to append a title using jquery to your wall that has an id of wall? $("#wall").append("&lt;h2 class='wall-post-title'&gt;"+response.post_title+"&lt;h2&gt;"); } }; This is assuming you have your server side code returning a variable with the key 'post_title' when you send your response

http://stackoverflow.com/a/26191048
upvote count: 3
has body: In this case your problem is with the Jquery FullPage plugin. The problem is that the script is not making changes onload and doesn't work well with your design. You should add this line on your &lt;script&gt; tag: $(document).ready(function(){ $.fn.fullpage.reBuild() }); Also if you want to do a responsive page that adapt depending on size you should really look at CSS media queries
score: 3
accepted answer of: http://stackoverflow.com/q/26190917
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26190917
type: Answer

http://stackoverflow.com/comment/40940052
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26121776
has text: But why bother when the user can still zoom via the menu or with CTRL + mousewheel?
score: 0

http://stackoverflow.com/q/26125499
has comment: http://stackoverflow.com/comment/40955700
has comment: http://stackoverflow.com/comment/40950368
score: 0
has comment: http://stackoverflow.com/comment/40950936
has body: This layout has an ordinal scale: http://bl.ocks.org/mbostock/1804919 var x = d3.scale.ordinal() .domain(d3.range(m)) .rangePoints([0, width], 1); But, nothing changes when "x" is included in the data e.g. var nodes = [ { "radius": 50, "color": "#17becf", "cx": 800, "cy": 250, "x": 100}, { "radius": 50, "color": "#17becf", "cx": 800, "cy": 250, "x": 200}, { "radius": 50, "color": "#17becf", "cx": 800, "cy": 250, "x": 300}, { "radius": 50, "color": "#17becf", "cx": 800, "cy": 250, "x": 400},]; What am I doing wrong?
answer count: 0
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40951185
tagged with: force-layout
has title: Multi-Foci Force Layout with ordinal scale
type: Question
has comment: http://stackoverflow.com/comment/40953623
has comment: http://stackoverflow.com/comment/40951057
tagged with: javascript

http://stackoverflow.com/a/26037257
score: 1
has comment: http://stackoverflow.com/comment/40785822
type: Answer
upvote count: 1
has body: The crudest of methods is 2 for loops one inside the other: for (var i = 0; i &lt; currentstat.length; i++) { for (var j = 0; j &lt; chapters.length; j++) { if (currentstat[i] === chapters[j]._id){ alert('found it at: ' + i + ' ' + currentstat[i]); } } } check this fiddle a bit less crude method would be: for (var i = 0; i &lt; chapters.length; i++) { if (currentstat.indexOf(chapters[i]._id) &gt;= 0) { alert('found ' + currentstat[i] + ' at index ' + i); } } fiddle here.
has comment: http://stackoverflow.com/comment/40785534
has comment: http://stackoverflow.com/comment/40786081
answers question: http://stackoverflow.com/q/26037093
downvote count: 0

http://stackoverflow.com/a/26095520
has comment: http://stackoverflow.com/comment/40893158
answers question: http://stackoverflow.com/q/26095142
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26095142
upvote count: 2
has body: This is expected behaviour. var a = 1; function b() { a = 10; return; function a() {} } b(); alert(a); This all has to do with the scope and when a function is defined. Declaring a function with the codeword function first function a(){}; will add the function to the scope at parse time. I.E It is defined before the first line in b(). What is happeing is that you define a to be a loal variable inside b. This will make the global variable a unreachable from within b. a will be defined and manipulated locally within the scope of b and leave the global a untouched. Equivalient code will be var a = 1; function b() { var a = function() {} a = 10; return; } b(); alert(a);
score: 2

http://stackoverflow.com/comment/40813130
type: Comment
comment on: http://stackoverflow.com/a/26051944
type: AnswerComment
score: 0
has text: will you please add a complete example.

http://stackoverflow.com/q/26168295
has comment: http://stackoverflow.com/comment/41026503
tagged with: jquery
has answer: http://stackoverflow.com/a/26168499
has answer: http://stackoverflow.com/a/26168719
favorite count: 0
has title: Advanced jQuery selector that needs a jQuery ninja to answer
has answer: http://stackoverflow.com/a/26168563
has comment: http://stackoverflow.com/comment/41026207
answer count: 4
score: -1
type: AnsweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/26168840
tagged with: wordpress
upvote count: 1
accepted answer: http://stackoverflow.com/a/26168719
type: Question
has body: I am looking for a jQuery guru to help me out on this. I have limited access to the code because it is a WordPress theme. My script has to go in the indicated area and if this can't be done with just jQuery, I would love suggestions that use JavaScript as well. Here is the problem I am trying to solve: I need to grab the "href" link that is on EACH button of class 'gdlr-button' and wrap the href around the image that is inside EACH div.personnel-author-image My Name My Position Learn More ... And Repeat
has comment: http://stackoverflow.com/comment/41026391
has comment: http://stackoverflow.com/comment/41026322
tagged with: javascript
has comment: http://stackoverflow.com/comment/41026116
possible better answer: http://stackoverflow.com/a/26168499

http://stackoverflow.com/a/26113800
answers question: http://stackoverflow.com/q/26113248
score: 0
has body: If I've understood you correctly, you just want it to add to each section in stead of overwriting? Then all you have to do is "+=" instead of "=" document.getElementById("logdescricao").innerHTML += "ONS: " + textons However, this is probably not the best way of doing this. You could try: var logdescricaoText = document.createTextNode("ONS: "+textons); document.getElementById("logdescricao").appendChild(logdescricaoText); But, really, if you want to make a list of things, then you should be using a table. This will allow for much neater and structured styling. In your HTML: Descricao LogMessage Then you can use the javascript (inside your 'if' block, instead of all your ".innerHTML =" stuff) var logLine = document.createElement("tr"); document.getElementById("logs").appendChild(logLine); var descricao = document.createElement("td"); descricao.appendChild(document.createTextNode("ONS: "+textons)); logLine.appendChild(descricao); var logArea = document.createElement("td"); logArea.appendChild(document.createTextNode(areaons); logLine.appendChild(logArea); etc.. Additionally, you might want to apply a CSS styling to the 'thead' part of the HTML eg. in your CSS file: thead { font-weight: bold; }
type: Answer

http://stackoverflow.com/comment/40884521
type: AnswerComment
type: Comment
has text: It looks to me like just setting the position of the textarea as absolute causes it to work. See this stripped down test: http://jsfiddle.net/JdA6L/46/ That's still working for me on Chrome/Linux. So all it's doing, is preventing the other page elements from moving when the expand/collapse is performed.
comment on: http://stackoverflow.com/a/26090221
score: 0

http://stackoverflow.com/comment/40875762
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26086081
score: 0
has text: I find it difficult to understand what you are trying to do with that code.

http://stackoverflow.com/q/26036776
has comment: http://stackoverflow.com/comment/40803673
has title: how to save the offset of current scroll position for Jquery Mobile page
has comment: http://stackoverflow.com/comment/40798385
has comment: http://stackoverflow.com/comment/40785245
has comment: http://stackoverflow.com/comment/40799927
has comment: http://stackoverflow.com/comment/40814105
has comment: http://stackoverflow.com/comment/40799074
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40788600
has comment: http://stackoverflow.com/comment/40817299
has comment: http://stackoverflow.com/comment/40784799
has comment: http://stackoverflow.com/comment/40788547
score: 2
has comment: http://stackoverflow.com/comment/40784944
type: Question
has comment: http://stackoverflow.com/comment/40784533
has comment: http://stackoverflow.com/comment/40800536
has comment: http://stackoverflow.com/comment/40800405
tagged with: jquery-mobile
answer count: 1
downvote count: 0
has body: I am trying to save the offset of the current value of the page in a global variable and trying to use it for scrolling back to the same position when page is reloaded . Here is my code &lt;script&gt; $(document).on("pagebeforeshow", '#outerPage', function(){ $(document).on('vclick','#outerPage',function(e){ //alert('yo i am clickable now'); var parentOffset = $(this).parent().offset(); //or $(this).offset(); if you really just want the current element's offset var relX = e.pageX - parentOffset.left; var relY = e.pageY - parentOffset.top; storePosition.topCoordinate = relY; }); var positionY = storePosition.topCoordinate ; if(positionY !== null) { setTimeout(function () { $.mobile.defaultHomeScroll = positionY; }, 10); } }); var storePosition = { topCoordinate : null } &lt;/script&gt; Here I am trying to store the offset in storePosition.topCoordinate then use it in the function to set the page scroll . but my variable is always set to null I dont understand why this is happening . UPDATE For now I am using the a script something like this $(document).on('pageinit', '#outerPage', function () { $('a').on('vclick', function () { console.log('its done Boy'); localStorage.setItem('scrolls', 0); }); }); /*$(window).on('unload', function() { console.log(window.location.pathname); console.log(window.location.pathname); console.log( "Bye now!" ); })*/ $(document).on('pageinit', '#outerPage', function () { $(document).on("scrollstop", function () { var parentOffset = $(this).parent().offset(); var relY = window.scrollY; localStorage.setItem('scrolls', relY); console.log(localStorage.getItem("scrolls")); }); }); $(document).on("pagebeforeshow", '#outerPage', function () { var positionY = localStorage.getItem("scrolls"); if (positionY != null) { $.mobile.defaultHomeScroll = positionY; } }); So I am saving the value in a localStorage and clearing it up when I change page like when I click on link tag I know this is not the right solution :P. I was trying to use .unload() but it…
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40800434
favorite count: 0
has comment: http://stackoverflow.com/comment/40813998
has answer: http://stackoverflow.com/a/26043827

http://stackoverflow.com/q/26182839
has body: I have a javascript page which submits as it loads using Now I want to insert a spinning-wheel or hourglass while it loads as it takes few seconds to call the service at 'myUrl' above. How do I do that? Something like this didn't fix it. / Any ideas?
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41053522
has comment: http://stackoverflow.com/comment/41053672
has comment: http://stackoverflow.com/comment/41053697
has comment: http://stackoverflow.com/comment/41053875
answer count: 0
type: UnansweredQuestion
has title: spinning-wheel in javascript with no Submit button
has comment: http://stackoverflow.com/comment/41053571
has comment: http://stackoverflow.com/comment/41053799
tagged with: javascript
has comment: http://stackoverflow.com/comment/41054179

http://stackoverflow.com/a/26260266
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26123281
type: Answer
has body: ok, I found a way to add intellisense to function parameters without param annotations. If the function has been called during intellisense runtime life cycle, it stores the type of the value passed into parameter. Here I call my method with number 5, the completion behaves as if toto was of type Number. Moreover, I found this: from msdn: http://msdn.microsoft.com/en-us/library/hh395059.aspx A parameter is declared, but it has not been called elsewhere in the active document, as shown in the following example. function illuminate(light) { light. // Accurate statement completion is not available // unless illuminate is called elsewhere with a // parameter that has a value. If it is called only // in a function that is a sibling to // illuminate(light) in the call hierarchy, the // IntelliSense engine also cannot determine the // parameter type. }
answers question: http://stackoverflow.com/q/26123281

http://stackoverflow.com/q/26120210
has comment: http://stackoverflow.com/comment/40936943
answer count: 1
has comment: http://stackoverflow.com/comment/40936588
favorite count: 0
linked to: http://stackoverflow.com/q/9666471
type: UnansweredQuestion
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26120276
upvote count: 0
has title: Jquery get data and trigger input file button
tagged with: javascript
tagged with: jquery
score: -1
has body: $('button').click(function(){ $.get('foo.php', function(data){ $('body').append(data); $('.f').trigger('click'); }); }); //foo.php &lt;input class="f" type="file" &gt; I have a button, when it clicked, it will get data from another page and append data on body. after get() append() the data, I want to trigger input file, but its not working I have try only append without get() and it works. anyone know why its not working when I use get()?

http://stackoverflow.com/comment/41052332
has text: Ok use whatever you want. The idea is to show the div before calling the AJAX call, and to hide it when "onsuccess" and "onerror".
comment on: http://stackoverflow.com/a/26181254
type: AnswerComment
score: 3
type: Comment

http://stackoverflow.com/q/26065602
has answer: http://stackoverflow.com/a/26065664
has comment: http://stackoverflow.com/comment/40838236
has answer: http://stackoverflow.com/a/26065649
has answer: http://stackoverflow.com/a/26065655
accepted answer: http://stackoverflow.com/a/26065655
answer count: 5
type: AnsweredQuestion
has body: Good day to everyone. I'm having a problem how to get a value of my radio button using javascript. Here is the html code. &lt;input type="radio" name="gender" id="gender" value="male"&gt; Male&lt;/label&gt; &lt;input type="radio" name="gender" id="gender" value="female"&gt; Female&lt;/label&gt; and my script goes this way. &lt;script&gt; function submit_member(){ $.post('&lt;?php echo site_url('admin/submit'); ?&gt;', { gender : $('#gender').val() }, function(data){ if(data.result=='SUCCESS'){ $('#gender').val(''); } },'json' ); } &lt;/script&gt; for other value like my firstname and lastname field I was able to get the value. Can anybody give me a sample code how to get a selected gender.
has answer: http://stackoverflow.com/a/26065935
type: Question
has title: how get radio button value in javascript
tagged with: javascript
tagged with: jquery
score: 0
possible better answer: http://stackoverflow.com/a/26065935
has answer: http://stackoverflow.com/a/26065799

http://stackoverflow.com/comment/40893869
score: 0
type: Comment
type: QuestionComment
has text: @helpermethod: I am looking for more than just opinion. A reason for going with one or other framework
comment on: http://stackoverflow.com/q/26094535

http://stackoverflow.com/a/26183588
type: Answer
downvote count: 1
score: -1
upvote count: 0
has body: Since this is async, you're gonna need an event or callback. Try something like this: $('table').contentChange( function(){ // do something console.log('table length: '+this.length); });
answers question: http://stackoverflow.com/q/26183494

http://stackoverflow.com/a/26170076
upvote count: 3
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26170021
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26170021
score: 3
has body: When you attach the click event you attach it to the existent elements in the DOM, when the ajax content comes, new DOM elements are created and the event wasn't attached to them. One option is to use events delegation a way (but not recommended) to do it is using the document to read the event $(document).on('click', 'button#submit', function(){ //do something }); A better way is put the delegation to the element which gets the new content, lets assume is a form with an id formElement, It would be something like $("#formElement").on('click', 'button#submit', function(){ //do something }); Using that event delegation the new content from ajax will fire the click event. PD if you have an ID in a element just use the id, like #submit, It makes a faster selector than tag#id because It used getElementById internaly

http://stackoverflow.com/a/26040207
accepted answer of: http://stackoverflow.com/q/26039457
type: AcceptedAnswer
downvote count: 0
has body: Simplest thing to do would be to just move the distance calculation inside the callback: googleMapsFunctions.prototype.setLatLng = function() { var that = this; this.geocoder.geocode({'address' : this.location}, function(results, status) { if(status === "OK") { that.latLngArray.push(parseFloat(results[0].geometry.location.lat())); that.latLngArray.push(parseFloat(results[0].geometry.location.lng())); // now it's safe to check the distances that.calculateDistances(); } }); }
answers question: http://stackoverflow.com/q/26039457
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/37208280
type: Answer
score: 0
has body: I have done this I believe you're right and your issue is to do with refreshing, I use the following to refresh it. var scheduler = $("#scheduler").data("kendoScheduler"); scheduler.view(scheduler.view().name); hope this helps through it is stupidly late (I'm currently looking up how to do this lazerly
answers question: http://stackoverflow.com/q/26116120

http://stackoverflow.com/q/26064201
tagged with: jquery
tagged with: removechild
favorite count: 0
tagged with: element
has title: Removing next Element - Javascript
has answer: http://stackoverflow.com/a/26064226
type: AnsweredQuestion
has body: The button is on this TR and i can easily remove it with the following code. How do i remove the NEXT TR E.g. &lt;TR&gt;&lt;/TR&gt; --&gt; Code works with removing this &lt;TR&gt;&lt;/TR&gt; --&gt; Remove the next TR THis one var $this = $(this), orderTr = $this.parents('tr'); orderTr.remove();
type: Question
score: -2
has comment: http://stackoverflow.com/comment/40835473
tagged with: javascript
downvote count: 3
tagged with: removeclass
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/26064226

http://stackoverflow.com/q/26156477
has comment: http://stackoverflow.com/comment/41006303
tagged with: indexing
score: 2
tagged with: http://stackoverflow.com/tag/json
has body: I'm looking for a way to take a bunch of JSON objects and store them in a data structure that allows both fast lookup and also fast manipulation which might change the position in the structure for a particular object. An example object: { name: 'Bill', dob: '2014-05-17T15:31:00Z' } Given a sort by name ascending and dob descending, how would you go about storing the objects so that if I have a new object to insert, I know very quickly where in the data structure to place it so that the object's position is sorted against the other objects? In terms of lookup, I need to be able to say, "Give me the object at index 12" and it pulls it quickly. I can modify the objects to include data that would be helpful such as storing current index position etc in a property e.g. {_indexData: {someNumber: 23, someNeighbour: Object}} although I would prefer not to. I have looked at b-trees and think this is likely to be the answer but was unsure how to implement using multiple sort arguments (name: ascending, dob: descending) unless I implemented two trees? Does anyone have a good way to solve this?
has title: Efficient Sorted Data Structure in JavaScript
has comment: http://stackoverflow.com/comment/41006378
type: Question
has comment: http://stackoverflow.com/comment/41004253
tagged with: javascript
tagged with: sorting
linked to: http://stackoverflow.com/q/881510
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26156738
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/a/26061020
accepted answer of: http://stackoverflow.com/q/26059800
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26059800
has comment: http://stackoverflow.com/comment/58275682
has body: It will be either a gradient fill or a pattern fill. Somewhere else in the file - probably in a &lt;defs&gt; section - will be one of the following elements with an id attribute that matches that string: &lt;linearGradient&gt; &lt;radialGradient&gt; &lt;pattern&gt;
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/58297904
type: Answer

http://stackoverflow.com/comment/41045774
type: Comment
comment on: http://stackoverflow.com/a/26178647
has text: @gaitat I don't know becuase I just found this more detailed answer ;D http://stackoverflow.com/a/23641906/239036
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40870739
comment on: http://stackoverflow.com/a/26083547
score: 0
type: Comment
has text: take out the `return;` else it will never reach the if statement or change the logic there. This whole function/statement doesn't make sense.
type: AnswerComment

http://stackoverflow.com/a/26153797
answers question: http://stackoverflow.com/q/26153487
accepted answer of: http://stackoverflow.com/q/26153487
type: AcceptedAnswer
score: 0
type: Answer
has body: As I said in my comment, without knowing where your system will go in the future, it's a little hard to know exactly how to code this. With links that are solely hash symbols, it's unclear whether or not the links will be on the page or to another webpage. Normally if your pages are being generated in PHP, you would simply put code to check the file being displayed and add a class of "active", which contains all of your CSS rules for the active element, to that particular element. But without that knowledge, I've got something working below. If you click on any of the links, it should display a block, like it does for the hover effect, on that element until another element is clicked. I used the hashtag formatting and the CSS :target attribute. With a bit more information I could probably help you more, but with only the given HTML, I got working what I could. Downsides of this method It is going to keep scrolling the user up to the top, due to the usage of hash links. This may or may not result in a noticable sort of "jump" upon interaction, depending on the rest of the contents of your web page. img { left: 10px; } body { width: 100%; max-width: 960px; margin: 0 auto; } nav { width: 100%; margin: 0px 0; } nav ul { list-style: none; overflow: hidden; } nav ul li { float: left; width: 20%; } nav ul li a { text-align: center; padding: 8px 0; display: block; width: 100%; background: #fff; /* Old browsers */ background: -moz-linear-gradient(top, #fff 0%, #fff 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #fff)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, #fff 0%, #fff 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, #fff 0%, #fff 100%); /* Opera 11.10+ */ background: linear-gradient(to bottom, #fff 0%, #fff 100%); /* W3C, IE10+ */ filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#fff', endColorstr='#fff', GradientType=0); /* IE6-9 */ } nav…

http://stackoverflow.com/comment/40870516
has text: @doniyor: `obj.fields.attribute`, where `obj` is one of the objects in the `data` list.
comment on: http://stackoverflow.com/a/26083378
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41038637
type: QuestionComment
has text: You haven't declared a service (provider) called `$pagination`. Where is that? You can't inject something that doesn't exist. Why are you creating a controller in the pagination module, only to be injected into another controller?
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26175005

http://stackoverflow.com/q/26056808
tagged with: java
type: Question
tagged with: javascript
tagged with: eclipse
score: 0
has title: Eclipse doesn't start after plugin installation
answer count: 1
has comment: http://stackoverflow.com/comment/40871791
has body: I installed a plugin for JavaScript editor in Eclipse, and after a restart, it doesn't start anymore. This is the trace !ENTRY org.eclipse.equinox.p2.artifact.repository 4 0 2014-09-26 11:40:17.156 !MESSAGE Unexpected error loading extension: org.eclipse.equinox.p2.artifact.repository.simpleRepository !STACK 0 java.lang.NoClassDefFoundError: org.eclipse.equinox.internal.p2.repository.RepositoryTransport at java.lang.J9VMInternals.verifyImpl(Native Method) at java.lang.J9VMInternals.verify(J9VMInternals.java:72) at java.lang.J9VMInternals.initialize(J9VMInternals.java:134) at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepositoryFactory.getLocalFile(SimpleArtifactRepositoryFactory.java:45) at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepositoryFactory.load(SimpleArtifactRepositoryFactory.java:83) at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.factoryLoad(ArtifactRepositoryManager.java:68) at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:768) at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:668) at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.loadRepository(ArtifactRepositoryManager.java:99) at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.loadRepository(ArtifactRepositoryManager.java:95) at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.restoreSpecialRepositories(ArtifactRepositoryManager.java:122) at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.restoreRepositories(AbstractRepositoryManager.java:1014) at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.basicGetRepository(AbstractRepositoryManager.java:181) at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRep…
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/32502598

http://stackoverflow.com/comment/40939287
type: Comment
type: QuestionComment
score: 0
has text: @Dilip: That description isn't very clear. Can you elaborate more in the question?
comment on: http://stackoverflow.com/q/26121276

http://stackoverflow.com/q/26109488
has body: I am trying to get the Meet Some of Our Staff section to only show once the text "Meet Some of Our Staff" is clicked. I have used code that has gotten it to hide the section when "Meet Some of Our Staff" is clicked, but cannot figure out how to reverse it to where it is already hidden upon page load and then appears when "Meet Some of Our Staff" is clicked. Script: HTML: Meet Some of Our Staff Kami Barron Director of Education
has title: How do I make an element hide until a link is clicked?
score: 0
upvote count: 1
tagged with: javascript
tagged with: show-hide
favorite count: 0
accepted answer: http://stackoverflow.com/a/26109775
possible better answer: http://stackoverflow.com/a/26109549
answer count: 3
has answer: http://stackoverflow.com/a/26109566
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40918213
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26109775
downvote count: 1
has comment: http://stackoverflow.com/comment/40918165
type: Question
has answer: http://stackoverflow.com/a/26109549

http://stackoverflow.com/comment/40921561
score: 0
comment on: http://stackoverflow.com/q/26111413
has text: @jazzurro Thanks for the welcoming. I honestly don't know what code snippets to post here. I've been trying to track down the event that is causing the scroll.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40985837
type: QuestionComment
type: Comment
has text: Please only include the shortest code necessary to reproduce your problem.
score: 3
comment on: http://stackoverflow.com/q/26146701

http://stackoverflow.com/a/26143442
upvote count: 2
answers question: http://stackoverflow.com/q/26143304
score: 2
downvote count: 0
has body: You can do it like this: var div = document.createElement('div'), //Create a "container" for the html elements, classes = []; // Insert the HTML into the container, allowing the browser to parse it's DOM div.innerHTML = ' some text about class="class4" ' then. var elements = div.querySelectorAll('*'); // Get an array of all elements for(var i = 0; i < elements.length; i++){ classes = classes.concat(elements[i].className.split(' ')) // Concat an array of classnames for each element in there. } classes = classes.filter(function(element){return element !== ''}) // Filter out empty class names. console.log(classes) alert(JSON.stringify(classes)) Please note that this uses both: forEach And querySelectorAll, which are both only fully supported from IE 9 up.
type: Answer

http://stackoverflow.com/comment/41053080
has text: use `document.title` not `document.write`.
comment on: http://stackoverflow.com/q/26182755
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/40797191
has text: As @Tommy implies, you really do not want to send unwanted data to the client. That is a waste of bandwidth and a potential security risk. You want to pass a unique key that represents the model and store that in the page as a `@Html.HiddenFor(x=>x.ID)`
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26042938

http://stackoverflow.com/a/26081922
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26081885
answers question: http://stackoverflow.com/q/26081885
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You need to instantiate your module, like this: &lt;html ng-app='docsSimpleDirective'&gt; Example

http://stackoverflow.com/a/26102711
answers question: http://stackoverflow.com/q/26102581
type: Answer
accepted answer of: http://stackoverflow.com/q/26102581
score: 2
downvote count: 0
type: AcceptedAnswer
has body: Because the browser can use whatever native OS methods it wants because it only has to work within it's own environment. Your Javascript code on the other hand is constrained by the functionality the browser decided to expose to external (i.e. your) code. This is usually constrained to what's in the published standards (give or take a little...or sometimes a lot). Your code needs to run everywhere, all browsers, all OS's, all devices. The browser code only needs to run on one OS, and often on a small subset of devices. But - you might say - I can run Chrome, or Safari, or Firefox on different OS's and different devices. Yes, you can, but it's not the same code. They are different versions of the browser optimized for each environment. They may share a lot of code, but they also have significant differences, especially the parts that interact directly with the underlying OS.
upvote count: 2

http://stackoverflow.com/q/26139898
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40976778
answer count: 0
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40976690
has comment: http://stackoverflow.com/comment/40976090
has body: I have created one simple chart from d3js library example but when i am using that chart in portlet and when i am resizing portlet chart doesnt resize. it remain in default size. Below is my example: D3js Code: var m = [30, 50, 10, 30], w = 600 - m[1] - m[3], h = 400 - m[0] - m[2]; var format = d3.format(",.0f"); var x = d3.scale.linear().range([0, w]), y = d3.scale.ordinal().rangeRoundBands([0, h], .1); var xAxis = d3.svg.axis().scale(x).orient("top").tickSize(-h), yAxis = d3.svg.axis().scale(y).orient("left").tickSize(0); var svg = d3.select(".portlet-content").append("svg") .attr("width", w + m[1] + m[3]) .attr("height", h + m[0] + m[2]) .append("g") .attr("transform", "translate(" + m[3] + "," + m[0] + ")") .attr("preserveAspectRatio", "xMinYMin meet") .attr("viewBox", "0 0 600 400") .classed("svg-content-responsive", true); // Parse numbers, and sort by value. data.forEach(function(d) { d.value = +d.value; }); data.sort(function(a, b) { return b.value - a.value; }); // Set the scale domain. x.domain([0, d3.max(data, function(d) { return d.value; })]); y.domain(data.map(function(d) { return d.name; })); var bar = svg.selectAll("g.bar") .data(data) .enter().append("g") .attr("class", "bar") .attr("transform", function(d) { return "translate(0," + y(d.name) + ")"; }); bar.append("rect") .attr("width", function(d) { return x(d.value); }) .attr("height", y.rangeBand()); bar.append("text") .attr("class", "value") .attr("x", function(d) { return x(d.value); }) .attr("y", y.rangeBand() / 2) .attr("dx", 50) .attr("dy", ".35em") .attr("text-anchor", "end") .text(function(d) { return format(d.value); }); svg.append("g") .attr("class", "x axis") .call(xAxis); svg.append("g") .attr("class", "y axis") .call(yAxis); html code: Header
type: Question
has title: How to resize d3js charts on resizing of ui-portlet

http://stackoverflow.com/q/26045378
tagged with: grid
type: Question
tagged with: javascript
tagged with: extjs
score: 0
answer count: 1
type: UnansweredQuestion
has body: Want to fire a method on header column selector on hide so that I can capture and save the selected items to display when user returns to the page. Tried following things which did NOT WORK Ext.getCmp("gridBox").headerCt.getMenu().on('hide', this.addUpdateAnalysisSetting, this); Ext.getCmp("gridBox").column.menu.on('hide', this.addUpdateAnalysisSetting, this); Even tried to capture the event of second menu as below but even that didnt work Ext.getCmp("gridBox").headerCt.getMenu().items.last().menu.on('hide', this.addUpdateAnalysisSetting, this); Any help is appreciated
has answer: http://stackoverflow.com/a/26046420
tagged with: menu
has title: how to call a method on grid column selector menu's hide evnet in ExtJS

http://stackoverflow.com/q/26077023
type: UnansweredQuestion
tagged with: request
has answer: http://stackoverflow.com/a/26084090
linked to: http://stackoverflow.com/q/24657004
has title: Missing draft message - javascript Gmail API - how to structure body of the request?
has comment: http://stackoverflow.com/comment/40871596
type: Question
score: 0
has body: At the recent Google IO conference new Gmail APIs were announced. Client libraries are missing examples and documentation which is understandable given the short time that has gone by. UPDATE: It wasn't clear in the original question - I've already tried encoding the whole message as Base64 string. I'm trying to create a new draft message: var request = gapi.client.gmail.users.drafts.create({ 'message' : { 'raw' : Base64.encode("To: someguy@example.com\r\nFrom: myself@example.com\r\nSubject: my subject\r\n\r\nBody goes here") // 'raw' : "VG86IHNvbWVndXlAZXhhbXBsZS5jb20KRnJvbTogbXlzZWxmQGV4YW1wbGUuY29tClN1YmplY3Q6IG15IHN1YmplY3QKCkJvZHkgZ29lcyBoZXJl" // 'raw' : "From: me@example.com\nTo:you@example.com\nSubject:Ignore\n\nTest message\n" } }); request.execute(function(response) { }); Can you please provide me with the correct syntax to do that? (Base64.encode is coming from http://www.webtoolkit.info/javascript-base64.html - tried using plain text, encoded version on the fly and hardcoded values from other question) Related questions: Gmail api with .Net CLient library: Missing draft message [400] Creating a Gmail Draft with Recipients through Gmail API Creating draft via Google Gmail API Handy links just for reference: Google Developers Console: https://console.developers.google.com/project?authuser=0 Gmail API nodejs: https://github.com/google/google-api-nodejs-client/blob/master/apis/gmail/v1.js Gmail API overview: https://developers.google.com/gmail/api/overview Quickstart: https://developers.google.com/api-client-library/javascript/start/start-js Sample code from repo: https://code.google.com/p/google-api-javascript-client/source/browse/samples/simpleRequest.html So I'm trying to find a solution in related questions addressing Ruby and C# by recreating JSON structure but I've reached the point that I need a Rubber Duck or Stack Overflow. Thank you in advance for providing a hint on how to structure the object passed to the API method.
tagged with: javascript
linked to: http://stackoverflow.com/q/25493213
linked to: http://stackoverflow.com/q/25494664
has answer: http://stackoverflow.com/a/26089332
tagged with: gmail-api
answer count: 3
tagged with: gmail
has answer: http://stackoverflow.com/a/26125653

http://stackoverflow.com/q/26149379
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26149552
accepted answer: http://stackoverflow.com/a/26151187
type: Question
has body: Sorry about the noob question, I'm new to AngularJS. I have a Service and 2 Controllers , one for my home page and the second for the page that I want to create dynamically. I want to set an object from my first controller(home page) in my service, and get this object in my second controller(on a new html page that I'll call with form action) and display some attributes of this object. How can I do that? Thanks! EDIT Sample of what I need : index.html First Controller add {{data.value}} Aqui! Second Controller add {{data.value}} http://plnkr.co/edit/sSBnE7gllFc0F6197cUD?p=info
has title: angularjs set and get a value from a service
tagged with: javascript
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/40991105
has answer: http://stackoverflow.com/a/26151187
tagged with: angularjs
has answer: http://stackoverflow.com/a/26149478
possible better answer: http://stackoverflow.com/a/26149552

http://stackoverflow.com/a/28055162
downvote count: 0
has body: Just FYI, we are working to make FlipClock.js inherently responsive and themeable without any hacks. You can checkout the details here. The work is still in progress which you can always check here: https://github.com/objectivehtml/FlipClock/issues/161.
type: Answer
answers question: http://stackoverflow.com/q/26099709
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/67284748

http://stackoverflow.com/comment/40872964
type: QuestionComment
comment on: http://stackoverflow.com/q/26084427
has text: The problem is that PHP is executed on the server side, and the HTML output being sent to the user (client) which JS will work. In your example, there is no way that JS can communicate with your server and say "hey, I'm changing `$main` and would like to load, for example `omos.php`", except when using AJAX. Here is a way to learn to distinction between client-side and server-side languages: http://programmers.stackexchange.com/questions/171203/what-are-the-difference-between-server-side-and-client-side-programming
score: 0
type: Comment

http://stackoverflow.com/comment/41002270
score: 2
has text: A trailing comma is valid, think of `[1,2,].length`
comment on: http://stackoverflow.com/q/26155529
type: Comment
type: QuestionComment

windows
tags question: http://stackoverflow.com/q/26048451
tags question: http://stackoverflow.com/q/26105384
tags question: http://stackoverflow.com/q/26102043
type: Tag
tag name: windows

http://stackoverflow.com/q/26052259
has comment: http://stackoverflow.com/comment/40813707
score: 0
answer count: 3
has body: Here is my JQuery : What i have is While i click the chekcbox, It will show the alert and it willsend the value $name to the b.php file and it will show the values that is thrown by the b.php in the div #stage in the source file. But what the issue is, It is showing the result, but it is not showing the values that is returned by the b.php file. What is the mistake i am doing ? &lt;form id="myform"&gt; &lt;input type="checkbox" name="check1" value="check1" onClick="cbChanged(this);" /&gt; &lt;input type="checkbox" name="check2" value="check2" onClick="cbChanged(this);" /&gt; &lt;/form&gt; &lt;script&gt; cbChanged = function(checkboxElem) { if (checkboxElem.checked) { var name=$("#txt").val(); $.post("b.php", {name: name}).done(function(data){ $('#stage').html(data); } ); alert("That box was checked."); } else { alert("That box was unchecked."); } } &lt;/script&gt; &lt;div id='stage'&gt;&lt;/div&gt; Here is the code of b.php &lt;?php $name=$_REQUEST['$name']; echo $name.'is updated'; ?&gt; What is the mistake i am doing. And how can i fix this ? Please help me.
has comment: http://stackoverflow.com/comment/40813555
has answer: http://stackoverflow.com/a/26052856
has comment: http://stackoverflow.com/comment/40813763
has comment: http://stackoverflow.com/comment/40813318
has comment: http://stackoverflow.com/comment/40813344
has comment: http://stackoverflow.com/comment/40813887
has comment: http://stackoverflow.com/comment/40813432
has comment: http://stackoverflow.com/comment/40814017
tagged with: php
has answer: http://stackoverflow.com/a/26052310
accepted answer: http://stackoverflow.com/a/26052310
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40813342
possible better answer: http://stackoverflow.com/a/26052357
type: Question
has answer: http://stackoverflow.com/a/26052357
has comment: http://stackoverflow.com/comment/40813542
tagged with: javascript
tagged with: jquery
has title: Jquery Action after Checkbox

http://stackoverflow.com/q/26158014
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26162377
score: 1
favorite count: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/41006850
has body: Group1 SubHeader1 SelectedValue value1 value2 value3 SubHeader2 SelectedValue value1 value2 value3 Group2 SubHeader1 SelectedValue value1 value2 value3 SubHeader2 SelectedValue value1 value2 value3 What is the best way to find every select SubHeader and Group value? For example the first one: Group value: 15 Subheader value: 10 Option value : 1 and second one: Group value: 15 Subheader value: 11 Option value : 1 I have a very robust way to get those values and i was wondering if there was any easier and more certain way. jQuery: function getHtmlAttributes(){ $.each($('#page_visit_reg_new_colds_2 option:selected'), function(key, value){ var optionParent = $(this).parent(); var selectParent = optionParent.parent(); var divParent1 = selectParent.parent(); var divParent2 = divParent1.parent(); var subheaderName = divParent1.parent().find('label[name=clsfName]').data('value'); var groupName = divParent2.parent().find('label[name=symptom]').data('value'); }); EDIT Changed label value to data-value
type: AnsweredQuestion
has title: Get HTML attribute values using jQuery
possible better answer: http://stackoverflow.com/a/26161890
has answer: http://stackoverflow.com/a/26161890
has comment: http://stackoverflow.com/comment/41011804
has answer: http://stackoverflow.com/a/26162377
type: Question

http://stackoverflow.com/a/26133895
downvote count: 0
score: 1
has body: Sorry to answer your question with another link. But it will help you :) Here is the link: Window.open and pass parameters by post method Look at this answer the most by Mercenary: var form = document.createElement("form"); form.setAttribute("method", "post"); form.setAttribute("action", "openData.do"); form.setAttribute("target", "view"); var hiddenField = document.createElement("input"); hiddenField.setAttribute("type", "hidden"); hiddenField.setAttribute("name", "message"); hiddenField.setAttribute("value", "val"); form.appendChild(hiddenField); document.body.appendChild(form); window.open('', 'view'); form.submit(); I hope you figure out! Let me know if you need more help!
answers question: http://stackoverflow.com/q/26133808
type: Answer
upvote count: 1

http://stackoverflow.com/q/26183415
downvote count: 0
tagged with: meteor
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41054373
has comment: http://stackoverflow.com/comment/41054514
has answer: http://stackoverflow.com/a/26184102
score: 1
upvote count: 1
type: Question
has body: Is there a meteor function that I can call when the entire app is done rendering, i.e ready? .rendered is only applicable for one template. But what about for all the templates. Something like Meteor.appReady()? Thanks. EDIT: I need to run: $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') &amp;&amp; location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('html,body').animate({ scrollTop: target.offset().top -90 }, 1000); return false; } } }) Which in essence is a jquery slide for a one page app on link events. It seems when I render it before all the templates that are using &lt;a&gt; (a link), the transitions fails, but if I render it after all have tempaltes have loaded, say with a wait in the first template's rendered function, the jquery slides work. However the wait doesn't feel like a good implementation.
tagged with: javascript
has title: Is there a meteor function that I can call when entire app is done rendering
answer count: 3
has answer: http://stackoverflow.com/a/26183514
has answer: http://stackoverflow.com/a/26183743
linked to: http://stackoverflow.com/q/20426951

http://stackoverflow.com/comment/40828326
type: AnswerComment
comment on: http://stackoverflow.com/a/26060190
type: Comment
score: 0
has text: oh thanks! but could it be any problems(reference error things) with this approach? for ex if I create multiple balls with ex posY from a param?

http://stackoverflow.com/a/26115661
accepted answer of: http://stackoverflow.com/q/26115398
has body: The error is in the remove button click event handler. You need to remove the closest form group rather than the immediate parent: $('.form-horizontal').on('click', '.remove-box', function(){ $(this).closest(".form-group").remove(); return false; }); check this bootply for a working example: http://www.bootply.com/x8n3dQ6wDf EDIT for animation on remove you can use jQuery slideUp like this: $('.form-horizontal').on('click', '.remove-box', function(){ var formGroup = $(this).closest(".form-group"); formGroup.slideUp(200, function() { formGroup.remove(); }); return false; });
has comment: http://stackoverflow.com/comment/40963071
answers question: http://stackoverflow.com/q/26115398
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/40930455
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40929888
type: Answer

http://stackoverflow.com/q/26132118
has title: Setting template variables from routes/index in express 4
tagged with: pug
has answer: http://stackoverflow.com/a/26145123
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has body: I'm new to node.js and express. I've installed express 4 using the "express myAppName" command from the terminal, which creates a default directory, and I'm using Jade templates by default. The main file, app.js, looks like this (standard express boilerplate): var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var routes = require('./routes/index'); var users = require('./routes/users'); var app = express(); // view engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); // uncomment after placing your favicon in /public //app.use(favicon(__dirname + '/public/favicon.ico')); app.use(logger('dev')); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.use(cookieParser()); app.use(express.static(path.join(__dirname, 'public'))); app.use('/', routes); app.use('/users', users); // catch 404 and forward to error handler app.use(function(req, res, next) { var err = new Error('Not Found'); err.status = 404; next(err); }); // error handlers // development error handler // will print stacktrace if (app.get('env') === 'development') { app.use(function(err, req, res, next) { res.status(err.status || 500); res.render('error', { message: err.message, error: err }); }); } // production error handler // no stacktraces leaked to user app.use(function(err, req, res, next) { res.status(err.status || 500); res.render('error', { message: err.message, error: {} }); }); // Here is my local variable assignment: app.locals.myVariable = "Hello this is a variable"; module.exports = app; I call my jade template from /routes/index.js: var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res) { res.render('index', { title: 'Express' }); }); /* GET home page. */ router.get('/help', function(req, res…
tagged with: node.js
score: 2
upvote count: 2
type: Question
tagged with: javascript
tagged with: express
has comment: http://stackoverflow.com/comment/40959345

http://stackoverflow.com/comment/40901347
type: Comment
comment on: http://stackoverflow.com/a/26099760
has text: but then what is the property of this.controller, I know those methods, but I found this method which always returns undefined, it is said in the docs, that it refers to the current controller, and why whould I use controllerFor in the current controller ?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41321507
has text: Perhaps the website returns different output to the browser and Parse. This could happen because the website may try to optimize for specific browsers. Try outputting the value of httpResponse.text somewhere and examine it manually. You may see that it does have malformed XML.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26074431
score: 0

http://stackoverflow.com/q/26120589
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26120673
score: 0
answer count: 1
tagged with: web
favorite count: 0
has title: Script fails to execute following prompt
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40937267
has comment: http://stackoverflow.com/comment/40937291
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40937493
has comment: http://stackoverflow.com/comment/40937294
has answer: http://stackoverflow.com/a/26120673
has body: I'm trying to execute a jQuery script but I'm encountering problems when certain segments are added to the script. For example, the script below works: var cNum = 16; var clickButton = function(opt){ cNum = prompt('Select a number from 1 to 128'); makeGrid(cNum); }; ... and calls a prompt as it's supposed to. However, adding a function for makeGrid results in the script not being executed at all: var cNum = 16; var clickButton = function(opt){ cNum = prompt('Select a number from 1 to 128'); makeGrid(cNum); }; var makeGrid = function(opt){ if (opt &gt;= 1 &amp;&amp; &lt;= 128) { alert("Inconsequential text"); } else { alert("Inconsequential text"); } }; The alerts above are just an example of how the script fails to execute.
has comment: http://stackoverflow.com/comment/40937265

http://stackoverflow.com/a/26094354
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26094309
type: Answer
upvote count: 1
has body: Two things: The line sum = sum + fruits[i][price]; should be sum = sum + fruits[i].price; or even sum += fruits[i].price; Your code was trying to use a variable called price, not the price property of the fruit entry. Your prices are strings, so we want to make sure they're converted to numbers when summing them up. You have lots of options there: Apply a unary + to them, pass them into Number(), or use parseInt(..., 10). Below I'll go with a unary +, but there are pluses (no pun!) and minuses to each. var fruits = [{"fruit":"banana","amount":"2","price":"1"},{"fruit":"apple","amount":"5","price":"2"},{"fruit":"kiwi","amount":"1","price":"5"}] function count(fruits) { var sum = 0; for (var i = 0; i &lt; fruits.length; i++) { sum += +fruits[i].price; // &lt;=== change is here } return sum; } display(count(fruits)); function display(msg) { var p = document.createElement('p'); p.innerHTML = String(msg); document.body.appendChild(p); } With ES5's array additions (which can be shimmed on older browsers), you can do this with either forEach or reduce: forEach: var fruits = [{"fruit":"banana","amount":"2","price":"1"},{"fruit":"apple","amount":"5","price":"2"},{"fruit":"kiwi","amount":"1","price":"5"}] function count(fruits) { var sum = 0; fruits.forEach(function(fruit) { sum += +fruit.price; }); return sum; } display(count(fruits)); function display(msg) { var p = document.createElement('p'); p.innerHTML = String(msg); document.body.appendChild(p); } reduce: var fruits = [{"fruit":"banana","amount":"2","price":"1"},{"fruit":"apple","amount":"5","price":"2"},{"fruit":"kiwi","amount":"1","price":"5"}] function count(fruits) { var sum = 0; sum = fruits.reduce(function(prev, fruit) { return prev + +fruit.price; }, 0); return sum; } display(count(fruits)); function display(msg) { var p = document.createElement('p'); p.innerHTML = String(msg); document.body.appendChild(p); }

http://stackoverflow.com/comment/40988723
type: AnswerComment
has text: See my edit above. The idea is the same but you need the right event: `shown.bs.tab` This event fires on tab show after a tab has been shown.
type: Comment
comment on: http://stackoverflow.com/a/26140127
score: 0

http://stackoverflow.com/comment/41063721
has text: OK, then we have understood the question differently. I can't say your're wrong but the string replacements seem to be central to the objective - anti-XSS.
type: Comment
comment on: http://stackoverflow.com/a/26188148
type: AnswerComment
score: 0

http://stackoverflow.com/q/26102581
linked to: http://stackoverflow.com/q/8128469
answer count: 1
accepted answer: http://stackoverflow.com/a/26102711
has title: How do browsers know where a user begins and ends text selection?
favorite count: 0
upvote count: 1
has body: According to an answer to this question, it is technically very difficult to create selection ranges from the user's mouse position. Why is this? How is it that selections can be created from the mouse position in the browser normally, but creating the same range using JavaScript is difficult?
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40905687
has answer: http://stackoverflow.com/a/26102711
type: Question
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40905605

http://stackoverflow.com/q/26048970
has comment: http://stackoverflow.com/comment/40808073
has body: I have a mongodb running (MEAN environment) with two collections (users and books). One of those collections (myusers) contains an array of Objectids (references to documents of books collection) as such: var UserSchema = new Schema({ [...], externalids: [{type: Schema.Types.ObjectId, ref: 'Books', required: false}] }, {collection: 'myusers'}); At runtime, I'd like to constantly fill that array (externalids) with ids of new book documents. This is how I do it: var newBook = new Book({ ... }); newBook.save(function (err){ if (err){ //whatever }else{ User.update({ _id: req.user._id }, { $set: { externalids: newBook._id }}, function(err){ //whatever }); } }); Unfortunately, I can't use something like: externalids: externalids.push(newBook._id) I even tried: User.update({ _id: req.user._id }, { $push: { externalids: newBook._id }} But it wouldn't help either. Thus, the array always only contains one value (the latest) and won't be filled up. Is there a quick way to append more values? Would be nice if there was a quicker way than reading the array content first, storing it to a local temporary array, append the new value and write the entire array back... Cheers Igor
has title: Mongodb/Mongoose: Filling Array of ObjectIds (references)
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40807829
type: Question
has comment: http://stackoverflow.com/comment/40807714
has comment: http://stackoverflow.com/comment/40808345
tagged with: mongodb
answer count: 1
has answer: http://stackoverflow.com/a/26049572
tagged with: arrays
tagged with: mongoose
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40807945
accepted answer: http://stackoverflow.com/a/26049572
has comment: http://stackoverflow.com/comment/40808504

http://stackoverflow.com/a/26343842
has comment: http://stackoverflow.com/comment/74444407
type: AcceptedAnswer
downvote count: 0
has body: Hi I solved my problem using the answer of @tieson-t in the question MVC4 Eonasdan Bootstrap 3 Date Time picker doesn´t open the picker screen. See recommended page.
type: Answer
score: 3
answers question: http://stackoverflow.com/q/26185694
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26185694

http://stackoverflow.com/a/26134973
has comment: http://stackoverflow.com/comment/40967678
has comment: http://stackoverflow.com/comment/40967410
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40998389
accepted answer of: http://stackoverflow.com/q/26133340
has body: from app/assets/javascripts/companies/companies.js.coffee Writtten in coffescript but I used cmd b to put into javascript $('document').ready(function() { if ($('#x_company_drill_interests').length === 1) { return $('#x_company_drill_interests').change(function(event) { var company_id; company_id = $('.form.companies_drill_interests').attr('data-companyid'); event.preventDefault(); return calculateResult(company_id); }); } }); calculateResult = function(company_id) { var data; data = $('#x_company_drill_interests').serialize(); return $.ajax({ url: "/companies/" + company_id + "/projection.json", type: "post", dataType: 'json', data: data, failure: function(data, success, xhr) { console.log(" -01- in calculateResult - Failure "); return console.log(data); }, success: function(data, success, xhr) { var company_listings_block, compare_name, drill_name, name, result, result_row, table, target_share_price, total_target_share_price, _i, _len; compare_name = ""; total_target_share_price = 0; company_listings_block = $('#x_company_listings_results .infogroup-body'); .... main screen which includes screen partial below &lt;% content_for :title, "Drill Investor" %&gt; &lt;% content_for :tab_group, "companies" %&gt; &lt;% content_for :tab_id, 'company_drill_interests' %&gt; &lt;div class="breadcrumbs"&gt; &lt;%= link_to 'Company Details', company_details_path %&gt; &amp;raquo; &lt;%= @company.name %&gt; &lt;/div&gt; &lt;section&gt; &lt;article class="single"&gt; &lt;div class="form"&gt; &lt;%= render 'company_info' %&gt; &lt;/div&gt; &lt;div class="form companies_drill_interests" data-companyid="&lt;%= @company.id %&gt;"&gt; company_id for navigation is set in the last line calculateResult = function(company_id) { var data; data = $('#x_company_drill_interests').serialize(); return $.ajax({ url: "/companies/" + company_id + "/projection.json", type: "post", dataType: 'json', data: data, failure: function(data, success, xhr) { console.log(" -01- in calculateResult - Failure ")…
type: Answer
answers question: http://stackoverflow.com/q/26133340
has comment: http://stackoverflow.com/comment/40967740
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40996971

http://stackoverflow.com/a/26884844
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26121934
answers question: http://stackoverflow.com/q/26121934
has body: I could resolve my problem now: I had an additional code in my javascript file where the user id was accidentally used as an integer instead as a string. Javascript have problems with very large integers, so it was a rounding problem. So the solution is to always use string type for the id.
type: AcceptedAnswer

http://stackoverflow.com/a/26162510
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41015430
has body: change your jquery part to $('.addTag').click(function() { $('.addTag').replaceWith('&lt;div class="btn btn-success addTag"&gt;&lt;form name="addTag"&gt;&lt;input placeholder="Enter new tag" type="text" class="addTagBody"&gt;&lt;input type="submit" value="Add"&gt;&lt;/form&gt;&lt;/div&gt;'); $("form[name='addTag']").on('submit', function(event) { event.preventDefault(); alert($(this).serialize()); }); }); so the form submition function is added every time the new form is created
upvote count: 3
downvote count: 1
answers question: http://stackoverflow.com/q/26162470
has comment: http://stackoverflow.com/comment/41015595
has comment: http://stackoverflow.com/comment/41015730

http://stackoverflow.com/q/26131251
has comment: http://stackoverflow.com/comment/40957929
type: UnansweredQuestion
has body: I have a "super" module in my Node.js application with a constructor and some prototype functions. var parser = function(options, util, cache, url) { this.options = options; this.util = util; this.cache = cache; this.url = url; } parser.prototype.start = function() { console.log("I am a default start function"); console.log(this.constructor.name); } module.exports = parser; I have a handful of other modules that inherit from this module. Now, when i invoke the start function i would like to get the name of that module's constructor. For some reason this is not working for me. var parser = require('../parser'); var util = require('util'); var DKAN = function(options, util, cache, url) { parser.apply(this,arguments); } util.inherits(DKAN, parser); DKAN.prototype.check = function($) { var DKANParser = this; if ($('meta[content*="Drupal"]').length !== 0 ) { DKANParser.start(); return true; } else return false; } module.exports = DKAN; When invoking the DKANParser.start() i only get the first console.log with "I am a default start function" and cannot get the name of constructor whih is supposed to be DKAN
has comment: http://stackoverflow.com/comment/40958162
tagged with: node.js
has title: How to get the constructor name in Node.js from super class
answer count: 0
type: Question
tagged with: dkan
has comment: http://stackoverflow.com/comment/40958178
tagged with: javascript
score: 0

http://stackoverflow.com/comment/40918897
type: QuestionComment
score: 0
has text: It's not clear what you want to do. If a single product can have lots of SKUs, do you want to return that product if *any* SKU has an item code that starts with "Q"?
comment on: http://stackoverflow.com/q/26109915
type: Comment

http://stackoverflow.com/comment/41029964
type: Comment
score: 0
has text: Try to rephrase you question. `ItemDataBound` is server-side event, javascript functions are executed client-side. When `dgrdConfirmedContinuedHearings_ItemDataBound` runs, there is nothing to run javascript. It will be long time still before html with javascript reaches the browser.
comment on: http://stackoverflow.com/q/26170208
type: QuestionComment

http://stackoverflow.com/comment/40792343
score: 0
type: Comment
type: QuestionComment
has text: @overule: I'm using aurora instead of firefox (which should be the same, as far as I know), and it is working.
comment on: http://stackoverflow.com/q/26040796

http://stackoverflow.com/comment/40926028
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26101949
has text: So far I've solved the problem with the ugly JSON-as-a-parameter. It's not nice, but at least readable and can be easily manipulated.

touch
tags question: http://stackoverflow.com/q/26161693
tags question: http://stackoverflow.com/q/26089240
type: Tag
tags question: http://stackoverflow.com/q/26117534
tag name: touch
tags question: http://stackoverflow.com/q/26056567

http://stackoverflow.com/comment/40896621
comment on: http://stackoverflow.com/q/26097281
has text: Edited now has JSFiddle
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/26116713
score: 0
has comment: http://stackoverflow.com/comment/40935325
accepted answer of: http://stackoverflow.com/q/26116627
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26116627
has body: Here you are $resultArray = array(); for($i=0;$i&lt;4;$i++){ $element = array("name"=&gt;"punith$i", "id"=&gt;"123$i"); array_push($resultArray, $element); } echo json_encode(array("result"=&gt;$resultArray));
type: Answer

http://stackoverflow.com/comment/41072121
has text: Can you provide a citation for this? I see no mention of header case-sensitivity in the W3c spec: http://www.w3.org/TR/cors/ Also, Chrome is automatically changing header names to lowercase in the pre-flight, so I would be very surprised if this is the case
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26186759
type: AnswerComment

http://stackoverflow.com/q/26065161
has body: I have one checkbox. I want when I checked the checkbox so I get the 1 and then update a mysql query through that get value. I also want if I unchecked the checkbox so I get a value 0 so then I again update the mysql query. Help me. it should be done with ajax call. code will be in PHP. HTML code &lt;input type="checkbox" name="action1" id="action1" title="Action 1" value="1" onclick="return Populat_Industry('set_home_vid.php');"/&gt; ajax call &lt;script&gt; function Populat_Industry(url){ var value=$(#action1).val(); $.ajax({ type: "POST", url: url, async: true, data: "value="+value, success: function(msg){ //alert('Success'); if(msg !='success'){ //alert('Fail'); } } }); } &lt;/script&gt; PHP code if($_POST['action1']=='1'){ $query= mysql_query("UPDATE homevideos SET is_active = '1 } else{ mysql_query("UPDATE homevideos SET is_active = '0') echo 'success';
score: 5
has title: checkbox on change ajax call
upvote count: 5
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40837224
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/26065543
has answer: http://stackoverflow.com/a/26065256
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26066137
tagged with: php
answer count: 4
has answer: http://stackoverflow.com/a/26065222
type: Question

http://stackoverflow.com/q/26183927
tagged with: visual-studio-2013
has title: Should TypeScript definition files be included in _references.js?
upvote count: 3
type: Question
tagged with: typescript
score: 3
tagged with: javascript
has answer: http://stackoverflow.com/a/26186157
answer count: 1
downvote count: 0
has body: Say, I include a Nuget package jquery.TypeScript.DefinitelyTyped, should it be added as a reference to Scripts/_references.js? And if so, should it be possible to remove jQuery, or specifically, say, jquery-2.1.1.js file from the Scipts directory? That is to say, would I have a need for plain .js nuget packages when a TypeScript one is available? In a broader context, I'm thinking how this process works or what could be the preferred way of working or what shoud work in Visual Studio 2013 with the latest updates. Many of the blog posts and tutorials I find elaborate on methods before TypeScript tooling was included within Visual Studio. &lt;edit: It looks like that one could let a lot of other resources with Javascript libraries, like pictures and css files. So, it would seem, both the .js file and optionally a d.ts files would be needed. But should the d.ts file be included in _references.js or perhaps both the .js and d.ts file?
favorite count: 0
accepted answer: http://stackoverflow.com/a/26186157
type: AnsweredQuestion

recursion
type: Tag
tags question: http://stackoverflow.com/q/26052170
tag name: recursion
tags question: http://stackoverflow.com/q/26070225
tags question: http://stackoverflow.com/q/26157898
tags question: http://stackoverflow.com/q/26093536
tags question: http://stackoverflow.com/q/26190211
tags question: http://stackoverflow.com/q/26087184

http://stackoverflow.com/comment/40843381
comment on: http://stackoverflow.com/q/26068330
type: QuestionComment
has text: afaik this is the best solution
score: 0
type: Comment

http://stackoverflow.com/a/29624775
score: 0
answers question: http://stackoverflow.com/q/26153382
has body: I had this issue and by reviewing the firefox/gecko source I realised this 'logic' (in quotes out of spite) was being invoked when an element in the DOM was being modified. Therefore I solved this issue by removing the code which modified the DOM and replacing it with a CSS only solution. I can't be more specific about how you could solve it in your particular case without knowing more about your code.
type: Answer

http://stackoverflow.com/comment/40841355
type: QuestionComment
score: 1
has text: This is not technically possible. Perhaps if you explain your use case we could suggest an alternate approach
comment on: http://stackoverflow.com/q/26067284
type: Comment

http://stackoverflow.com/comment/40825262
type: AnswerComment
comment on: http://stackoverflow.com/a/26058810
type: Comment
score: 0
has text: are you sure it has some value in it?

http://stackoverflow.com/q/26155321
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26155391
has title: javascript - Detect article tag content to assign article class automatically
tagged with: javascript
tagged with: jquery
has body: So, I'm using blogger.com as my blogging platform right now. As we know, blogger is a very simple platform without any advanced programming language supported. It's only possible to do any trick with Javascript. My post is about personal blog with some post format like Wordpress use, I have a standard post, audio post, and video post. I want to display post format icon based on my post format type, beside my post title. Video post will have video icon beside the title, audio post will have audio icon beside the title, etc... This is my post markup: Post title To make Javascript can identify my post format, I will add a tag inside my post like this: or , etc... Post title Then javascript will add a class to my post markup, so I can set the icon based on CSS class trick. For example, if my post format is audio (), Javascript will add audio-format "CSS class" to my post markup. Post title Unfortunately, my skill just HTML and CSS, I'm not fluent in Javascript or jQuery. Is it possible to do with Javascript trick? PS: Sorry for my English.
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26155391
type: AnsweredQuestion

http://stackoverflow.com/q/26096014
tagged with: jquery-selectors
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26096054
has title: jQuery select all nodes of a class but those in the current DOM branch
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26096054
type: AnsweredQuestion
score: 1
has body: I have a series of divs of class "foo" randomly nested. Using jQuery, I want to select all divs not in the ascending branch of a node. E.g. In the following structure, if the node considered is "1_1_1", the operation would select all "foo" divs except parent "bar1_1" and parent of parent "bar1": ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... (Note the ids reflecting the position of the node in the tree is just for exemplification. The actual nodes don't even have ids.) One solution would be to select all nodes, then remove the considered node and all its ascendants from the selection, but I don't know how to do that last part. Any ideas?

http://stackoverflow.com/comment/41048772
score: 1
comment on: http://stackoverflow.com/q/26180520
type: Comment
type: QuestionComment
has text: You should also try a service instead of `$rootScope`.

http://stackoverflow.com/comment/40872235
has text: Your script has nothing to do with that error.. if you are getting a 412 you're probably doing an XHR or something, but not a scroll to bottom
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26084380

bidi
tag name: bidi
tags question: http://stackoverflow.com/q/26074289
type: Tag

http://stackoverflow.com/q/26053727
tagged with: jquery
has comment: http://stackoverflow.com/comment/40816106
has comment: http://stackoverflow.com/comment/40815963
tagged with: ajax
has title: get id and value dynamically created element jquery
score: 0
has comment: http://stackoverflow.com/comment/40815946
possible better answer: http://stackoverflow.com/a/26053973
has answer: http://stackoverflow.com/a/26053973
answer count: 4
favorite count: 0
accepted answer: http://stackoverflow.com/a/26053821
has comment: http://stackoverflow.com/comment/40815989
upvote count: 2
downvote count: 2
tagged with: php
has comment: http://stackoverflow.com/comment/40815911
has body: I need the id(and other attributes such as value) of a span i previously created on an ajax event. Is there a way to do this? This is how the span is created on php post: echo "&lt;span class='non-skin-symptom-choice disease_option' ". "onclick='showinfo(".$var[0].");' id=".$var[0]."&gt;" .$var[1]." -- ".number_format($var[3]*100, 2, '.', '')."%&lt;/span&gt;"; and I want to get its id whenever a checkbox is clicked. $(".chb").click(function(){ var id= $(this).attr('id'); var list=[]; $('.disease_option').each(function (){ alert("this.val=="+ $(this).attr("val")); //i need the value here var str= $(this).attr("value").split(" -- ")[1]; alert(str); str=str.slice(0,str.length - 1); if(parseFloat(str) &gt;=support) list.push(id) //i need the id here }); the checkbox is not dynamically created, so $(".chb").click(function(){} works. somehow, $(this).attr("id") works but $(this).attr("val") returns undefined... i also tried $(this).attr("value") but same results. $(this).val returns empty.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40815905
has comment: http://stackoverflow.com/comment/40816121
linked to: http://stackoverflow.com/q/6658752
has answer: http://stackoverflow.com/a/26053988
type: Question
has comment: http://stackoverflow.com/comment/40815933
has answer: http://stackoverflow.com/a/26053821
has comment: http://stackoverflow.com/comment/40816125
has comment: http://stackoverflow.com/comment/40815844
has comment: http://stackoverflow.com/comment/40815949
has answer: http://stackoverflow.com/a/26053855
tagged with: javascript

http://stackoverflow.com/q/26116098
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: bxslider
has title: bxSlider adaptive height doesn't work on first load page
has body: i'm using bxSlider 4.1.2, each slide has different height (contains paragraphs and images), so i add the option adaptiveHeight:true based on bxSlider AdaptiveHeight. when first load page, the slider's height following the tallest slider, so it looks like a long gap between first slide and the controller buttons. like this : i want my slider in first load is looks like this : i'm calling the bxSlider in $(document).ready(); event , i was trying using event $(window).load(); but it brokes my slider :( this is my javascript now $(document).ready(function () { slider_custom1 = $('#slider_brand1').bxSlider({ controls: true, autoControls: true, adaptiveHeight: true, pagerCustom: '#custom_bullets1', nextSelector: '#slider-next1', prevSelector: '#slider-prev1', nextText: '&lt;img src="&lt;?php echo base_url('webroot/images/next_detail_product.png');?&gt;" /&gt;', prevText: '&lt;img src="&lt;?php echo base_url('webroot/images/prev_detail_product.png');?&gt;" /&gt;' }); });
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40930497
favorite count: 0
has comment: http://stackoverflow.com/comment/56572780
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41214835
score: 2
has comment: http://stackoverflow.com/comment/40929608

http://stackoverflow.com/comment/40952136
type: Comment
type: QuestionComment
has text: `features = JSON.parse('{"type":"FeatureCollection","features":[{"type":"Feature","property":"blah"}, {"type":"Feature","property":"blah2"}]}').features`
comment on: http://stackoverflow.com/q/26128274
score: 0

http://stackoverflow.com/comment/40951212
has text: Thanks for answer I need to load and attach stylesheet based on address like http://..../rtl.css I dont need to load class
type: Comment
comment on: http://stackoverflow.com/a/26127788
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40932081
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26116672
has text: @Unihedron, sorry I didn't provide a solution before, just updated my answer.
score: 0

http://stackoverflow.com/comment/41019903
score: 0
comment on: http://stackoverflow.com/a/26164612
type: Comment
has text: In the first solution, 'attr()' won't work. Use 'prop()' instead. I'd also like to add that in case of multiple options with same value, the first solution (with prop) will select the last appearing option while the second (with val) will select the first appearing option.
type: AnswerComment

http://stackoverflow.com/q/26168714
linked to: http://stackoverflow.com/q/22330542
type: Question
has answer: http://stackoverflow.com/a/26173029
tagged with: google-visualization
tagged with: javascript
tagged with: google-apps-script
score: 0
answer count: 1
type: UnansweredQuestion
has body: I'm using Google Apps Script HTMLService: function doGet(request) { var html = HtmlService.createTemplateFromFile('index').evaluate(); html.setTitle("CBN Producers' Dashboard"); html.setSandboxMode(HtmlService.SandboxMode.NATIVE); return html; } When I copy and paste the first example from Google Charts Timeline Visualisation API to a normal HTML file and test it, it works perfectly. However, when I do exactly the same with a blank project with Google Apps Script, I get nothing, not even an error. Does Google Apps Script not support Timeline or something or am I doing something wrong? Thanks in advance, guys! Regards, Vishal
has title: Timeline Visualization Not Working In Google Apps Script

http://stackoverflow.com/comment/41044169
score: 0
has text: Or even better, __[just iterate over the array with angular.](http://plnkr.co/edit/Csl0O8ixGkrLWorDameM?p=preview)__
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26178152

http://stackoverflow.com/comment/41053720
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26182870
has text: Why do you need the classes? There might be a better solution for the problem you are trying to solve with the classes.

http://stackoverflow.com/q/26105483
has answer: http://stackoverflow.com/a/26106159
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26106159
has answer: http://stackoverflow.com/a/26194101
score: 3
downvote count: 0
has title: How to chain sounds on howler.js
has answer: http://stackoverflow.com/a/75265660
favorite count: 0
tagged with: howler.js
answer count: 4
type: AnsweredQuestion
has body: I need to play some sounds in howler.js the thing is that I don't know how to chain it. For example, at string BCG would need to play b.ogg then c.ogg and finally g.ogg If I just use (after loading): sound.play('b'); sound.play('c'); sound.play('g'); All of them start and overlap which isn't what I need. I see there's a onend property, however can't figure out how to use it properly. Regards.
upvote count: 3
possible better answer: http://stackoverflow.com/a/45462913
has answer: http://stackoverflow.com/a/45462913
type: Question

http://stackoverflow.com/comment/40951388
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26127301
score: 0
has text: Do you want this to happen as the user types? Or is this just to hide some information in the database?

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

http://stackoverflow.com/q/26113582
accepted answer: http://stackoverflow.com/a/26113911
score: 0
has answer: http://stackoverflow.com/a/26113659
tagged with: javascript
tagged with: bookmarklet
possible better answer: http://stackoverflow.com/a/26113659
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26113911
has body: I am creating a bookmarklet and I have to avoid using double quotes ( " ) because I have to include the bookmarklet inside a HTML page and it's inside a string that uses double quotes: &lt;a href="javascript:..."&gt; In some places I have to use the code replace(/".*/, ''); In sed, I can escape double quotes using \x22 (22 is the ASCII hex code for double quotes) Is it possible to do something similar in JavaScript like replace(/\x22.*/, '');?
type: Question
answer count: 2
tagged with: escaping
has title: Escaping characters in JavaScript using their ASCII codes

tizen
tags question: http://stackoverflow.com/q/26138346
type: Tag
tag name: tizen

http://stackoverflow.com/comment/41010420
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26160094
type: Comment
has text: setInterval takes ms not seconds.

http://stackoverflow.com/a/26176310
has comment: http://stackoverflow.com/comment/41077440
has comment: http://stackoverflow.com/comment/41041056
answers question: http://stackoverflow.com/q/26172928
has comment: http://stackoverflow.com/comment/41068272
has comment: http://stackoverflow.com/comment/41058890
has comment: http://stackoverflow.com/comment/41076761
has comment: http://stackoverflow.com/comment/41076004
score: 0
has body: "accessibilityFeatures.read" and "accessibilityFeatures.modify" are currently only supported in Chrome OS, not on other operating systems, as seen in https://chromium.googlesource.com/chromium/src/+/7c61e0145f3e598ae7a9ac69159234d6ec7f6008/chrome/common/extensions/api/_permission_features.json: "accessibilityFeatures.modify": { "channel": "stable", "extension_types": ["extension", "platform_app"], "platforms": ["chromeos"] }, "accessibilityFeatures.read": { "channel": "stable", "extension_types": ["extension", "platform_app"], "platforms": ["chromeos"] },
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41074564
has comment: http://stackoverflow.com/comment/41074527
has comment: http://stackoverflow.com/comment/41058641
has comment: http://stackoverflow.com/comment/41058507
has comment: http://stackoverflow.com/comment/41056169
type: Answer
has comment: http://stackoverflow.com/comment/41040905
has comment: http://stackoverflow.com/comment/41064019
accepted answer of: http://stackoverflow.com/q/26172928

http://stackoverflow.com/a/26156185
has body: An undefined property has the undefined type and value, you can check against it like this: if (twitter.statuses[key].entities.media !== undefined) { // ... } or like this: if (typeof twitter.statuses[key].entities.media !== "undefined") { // ... }
has comment: http://stackoverflow.com/comment/41003478
has comment: http://stackoverflow.com/comment/41003995
downvote count: 0
answers question: http://stackoverflow.com/q/26156139
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/26068263
has comment: http://stackoverflow.com/comment/40843493
has body: I have banners that display on the side of my site. Firefox and I.E. pull these up just fine however in chrome I don't get them at all. If I inspect the element I can see the has the url of the image inside of it in chrome and in the resources it has the image but it just doesn't show up. if (drBanner.Length &gt; 0) { for (int iRowIndex = 0; iRowIndex &lt; drBanner.Length; iRowIndex++) { if (!CheckImageExist(drBanner[iRowIndex]["imgurl"].ToString())) continue; bannerValues += "{img class='right-banner' src='" + drBanner[iRowIndex]["imgurl"] + "' onclick=MoveWindow('" + drBanner[iRowIndex]["imgnavurl"] + "') alt='" + drBanner[iRowIndex]["imgalttxt"] + "'} $!$! " + (drBanner[iRowIndex]["ovrimgimp"].ToString() == "0" ? "1" : drBanner[iRowIndex]["ovrimgimp"].ToString()) + "!~!~"; } } The bannerValues result is as followed {img class='right-banner' src='../Banners/oms_contactussidebar_oms_contactussidebar.jpg' onclick=MoveWindow('') alt=''} $!$! 1!~!~ the right banner class is also as followed img { max-width:100%; width:auto\9; height:auto; vertical-align:middle; border:0; -ms-interpolation-mode:bicubic; } Any thoughts? EDIT 1: This is the HTML as it appears in the inspection when on the page in chrome and FF. &lt;div style="height: 620px; width: 160px;" id="divBanner"&gt; &lt;img img="" class="right-banner" src="../Banners/oms_orderingsidebar_oms_orderingsidebar_oms_orderingsidebar.jpg" onclick="MoveWindow('')" alt=""&gt; &lt;/div&gt; EDIT 2:
has comment: http://stackoverflow.com/comment/40843810
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40843383
type: UnansweredQuestion
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/40843454
type: Question
has comment: http://stackoverflow.com/comment/40843164
has comment: http://stackoverflow.com/comment/40853157
has title: Chrome VS Firefox img display compatibility
has answer: http://stackoverflow.com/a/26069661
answer count: 1
has comment: http://stackoverflow.com/comment/40843343
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40864339
has text: Are you sure $index is an int?
type: AnswerComment
comment on: http://stackoverflow.com/a/26080056
score: 0
type: Comment

http://stackoverflow.com/comment/40952677
has text: how can i loop through all array values? this returns only the first pair...if i have multiple how can access all elements?
comment on: http://stackoverflow.com/a/26128366
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40832424
type: AnswerComment
comment on: http://stackoverflow.com/a/26049063
score: 0
has text: Yes, it clears the bugs and it also solves a part my problem, where now I can drag a graph. But I am actually trying to move the graph along with its respective axis. Yes, I should figure out a right approach to solve it. Thanks a lot for helping me.
type: Comment

http://stackoverflow.com/comment/50989509
type: Comment
has text: This google group thread may answer the question differently : https://groups.google.com/forum/#!topic/sailsjs/8_e5CeHQjtY IMO Sails should allow API versioning OOB. Has there been any progress or is this still a valid method.
type: AnswerComment
comment on: http://stackoverflow.com/a/26497380
score: 0

http://stackoverflow.com/q/26048074
score: 0
has comment: http://stackoverflow.com/comment/40805980
accepted answer: http://stackoverflow.com/a/26048447
has comment: http://stackoverflow.com/comment/40805979
has comment: http://stackoverflow.com/comment/40805928
tagged with: innerhtml
has title: Javascript - Passing from a DOM element to array
has comment: http://stackoverflow.com/comment/40805989
possible better answer: http://stackoverflow.com/a/26048150
type: Question
has answer: http://stackoverflow.com/a/26048150
type: AnsweredQuestion
tagged with: getelementsbyclassname
has comment: http://stackoverflow.com/comment/40805934
tagged with: dom
has answer: http://stackoverflow.com/a/26048447
answer count: 2
has body: Hello and thank you for your time. Here is the code : &lt;script&gt; var names = document.getElementsByClassName('xx'); var ar = []; for (var i = 0, c = names.length ; i &lt; c ; i++) { ar[i] = names[i].innerHTML; alert(ar[i]);// the results are : undefined } &lt;/script&gt;` I've tried to use the method tostring, or to push the results into the array but without success. Thanks
tagged with: javascript
has comment: http://stackoverflow.com/comment/40805912
has comment: http://stackoverflow.com/comment/40805914

http://stackoverflow.com/q/26073810
answer count: 1
has answer: http://stackoverflow.com/a/26074874
has title: How to target localStorage key for login?
tagged with: local-storage
has body: Hello i have tried looking on the thread how to store objects in localStorage and have made the register user with JSON and localStorage and it is working (stores id, username and password) without reseting or overlapping users. I want to add a login function but I am having trouble looping through the array and targeting the localStorage key? (in this case User:number). Here is the code: var User = { index: window.localStorage.getItem("User:index"), $form: document.getElementById("userReg"), $button_register: document.getElementById("registerUser"), $button_login: document.getElementById("logIN"), init: function() { // initialize storage index if (!User.index) { window.localStorage.setItem("User:index", User.index = 1); } User.$form.addEventListener("submit", function(event) { var entry = { id: parseInt(this.id_entry.value), user_name: this.user_name.value, password: this.password.value }; if (entry.id == 0) { User.storeAdd(entry); } }, true); User.$button_login.addEventListener("click", function(event) { for (i = 0; i &lt; window.localStorage.length; i++) {} }, true); }, storeAdd: function(entry) { entry.id = User.index; window.localStorage.setItem("User:index", ++User.index); window.localStorage.setItem("User:" + entry.id, JSON.stringify(entry)); }, }; User.init();
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/26074874
type: Question
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40987379
type: QuestionComment
comment on: http://stackoverflow.com/q/26147506
score: 0
has text: A fiddle would help.
type: Comment

http://stackoverflow.com/q/26174520
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/26174552
has comment: http://stackoverflow.com/comment/41037679
tagged with: javascript
score: 4
possible better answer: http://stackoverflow.com/a/26174582
tagged with: scope
has answer: http://stackoverflow.com/a/26174552
tagged with: variables
favorite count: 0
has body: I recently started using PHP Storm (love it) and noticed that it flags declarations of "var i" in for loops as duplicate in JavaScript. I learned that apparently the scope of that variable exists outside of the loop. for (var i = 0; i &lt; 10; i++) { // Do anything } console.log(i); // i == 10 When I do my next for loop, should I declare var i again? Or, should I just say i = 0? I know I can do either, but one seems like bad style, the other like bad implementation. On one hand, you shouldn't re-declare a variable that's in scope, but if I, for instance, delete the first for loop that declares "i", then everything else will break.
has title: Reusing "i" for JavaScript for loops
tagged with: duplication
upvote count: 4
has answer: http://stackoverflow.com/a/26174582
type: AnsweredQuestion
tagged with: declaration
downvote count: 0

http://stackoverflow.com/comment/40873826
type: AnswerComment
comment on: http://stackoverflow.com/a/26082080
type: Comment
has text: this is just like the hover function, it will work fine except if the user accidentally hover over the caption, this will be considered moving out from the image and will apply the mouseout function
score: 0

http://stackoverflow.com/comment/40803803
has text: No, you are getting the value and storing it into a variable (which gets overwritten each time we finding a matching obj). From my below example, you can add or "push" that variable weights into the array.
comment on: http://stackoverflow.com/q/26046564
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41065127
has text: Your fix is correct but what ever code you placed inside that link does not work properly. haha I got my code to work anyway though, so thanks for the help!
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26188977

http://stackoverflow.com/comment/41339728
comment on: http://stackoverflow.com/q/26132552
has text: I'm having the same issues. Only on Apple. Did you find a solution?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26138346
has title: How to get IMEI no from tizen phone using javascript
tagged with: web-applications
type: Question
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26144174
has body: I am building an webapp for tizen but i am not able to readout The IMEI no from phone(tizen) . I have given this tizen:privilege http://tizen.org/privilege/systemmanager but i get this error "This privilege requires partner level signing key" so to resolve this Issue i gon through all these link and followe all steps , but still can't able to resolve this issue . https://developer.tizen.org/dev-guide/2.2.1/org.tizen.gettingstarted/html/tizen_overview/partner_privileges.htm https://developer.tizen.org/dev-guide/2.2.1/org.tizen.gettingstarted/html/tizen_overview/privilege.htm how do i set partner level signing key ?
type: UnansweredQuestion
tagged with: tizen

http://stackoverflow.com/comment/40880996
comment on: http://stackoverflow.com/a/26077820
has text: Is there a way to do this without jQuery, though?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40844233
comment on: http://stackoverflow.com/a/26068836
type: AnswerComment
score: 0
has text: What is good about your solution is that it does not depend on the dimensions of the two icon images. Wrapping the number in a `span` is a small price to pay for getting a lot of control over the design.
type: Comment

http://stackoverflow.com/q/26191971
has answer: http://stackoverflow.com/a/26192071
has body: I have a problem: I have an effect hover in one div, but I would like to trigger the effect when the cursor is hover another div. Something like: &lt;div id='mouse-hover-in-this-div'&gt; blablabla &lt;div id='should-trigger-mouse-hover-in-this-div'&gt;&lt;/div&gt; &lt;/div&gt; I see some solutions here but they did not work. In particular I tried to change the css property of the inner div with the jquery .css method but I did not succed in giving the following option: -webkit-transform: translateY(16px); transform: translateY(16px); -webkit-animation-name: hang; animation-name: hang; -webkit-animation-duration: 1.5s; animation-duration: 1.5s; -webkit-animation-delay: 0.3s; animation-delay: 0.3s; -webkit-animation-timing-function: linear; animation-timing-function: linear; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; -webkit-animation-direction: alternate; animation-direction: alternate; The hover I want to assing is from the library hover.css, I simply want that a bounce effect of an arrow is triggered when the whole div is hover, not just the little arrow. There is a solution to my problem?
possible better answer: http://stackoverflow.com/a/26191997
has comment: http://stackoverflow.com/comment/41069954
has answer: http://stackoverflow.com/a/26192051
tagged with: hover
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41069947
upvote count: 3
has title: hover in one div that trigger the effect hover in another
has answer: http://stackoverflow.com/a/26192005
accepted answer: http://stackoverflow.com/a/26192106
has comment: http://stackoverflow.com/comment/41069911
type: Question
has answer: http://stackoverflow.com/a/26192055
downvote count: 0
tagged with: javascript
answer count: 6
tagged with: jquery
has comment: http://stackoverflow.com/comment/41069996
score: 3
has answer: http://stackoverflow.com/a/26191997
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
has answer: http://stackoverflow.com/a/26192106

http://stackoverflow.com/a/26092148
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26084804
has comment: http://stackoverflow.com/comment/41007985
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26084804
score: 4
has comment: http://stackoverflow.com/comment/41046408
has comment: http://stackoverflow.com/comment/41515349
has comment: http://stackoverflow.com/comment/41128488
type: Answer
has body: Im not sure if you are talking about single page apps or not. On the FAQ there is a section of SPA and they suggest using flatiron-director to handle navigation. I followed an example I found and it was pretty simple. https://github.com/ebidel/polymer-change/blob/master/demos/spa.html https://www.polymer-project.org/resources/faq.html Nice article on how to create a SPA: https://www.polymer-project.org/articles/spa.html Example: vanilla polymer demo Polymer App - {{route}} Default page
upvote count: 4

http://stackoverflow.com/comment/40846424
score: 0
comment on: http://stackoverflow.com/q/26070078
has text: How do you think you should approach this problem?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26183514
has body: Not conventionally but an answer to a similar question suggests a template subsequently triggering a jquery document ready function. Template.layout.rendered = function () { $(document).ready(function(){console.log('ready')}); }
score: 0
has comment: http://stackoverflow.com/comment/41054586
type: Answer
answers question: http://stackoverflow.com/q/26183415

http://stackoverflow.com/comment/40781747
comment on: http://stackoverflow.com/q/26034735
has text: do you have an online example of this code?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40824718
has text: Sorry. Not working...
score: 0
comment on: http://stackoverflow.com/q/26057954
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26081791
answer count: 1
tagged with: encryption
tagged with: php
type: AnsweredQuestion
score: 0
has title: AES-256-CBC Mcrypt - Crypto-JS Encrypt and PHP Decrypt
type: Question
has body: Reference: AES-256-CBC Mcrypt-PHP decrypt and Crypto-JS Encrypt I tried using the code provided by Shurik to get a working example, but could not get this to work. Thanks for any help. Encrypt with javascript and decrypt using php <?php $mode = 'text'; // choices {"text", "hidden"} if(isset($_POST['submit'])) { echo(' '.print_r($_POST, true).' '); $input_value = $_POST['input_value']; $encrypted_value = $_POST['encrypted_value']; $decrypted_value = $_POST['decrypted_value']; $encrypted = base64_decode("data_base64"); // data_base64 from JS $iv = base64_decode("iv_base64"); // iv_base64 from JS $key = base64_decode("key_base64"); // key_base64 from JS $decrypted_value = rtrim( mcrypt_decrypt( MCRYPT_RIJNDAEL_128, $key, $encrypted_value, MCRYPT_MODE_CBC, $iv ), "\t\0 " ); echo ("\$decrypted_value : ".$decrypted_value." "); } else { $input_value = ""; $encrypted_value = ""; $decrypted_value = ""; $encrypted = ""; $iv = ""; $key = ""; $plaintext = ""; } ?> input_value : <input type="text" id="input_value" name="input_value" value="<?=$input_value?>" size="100"> encrypted_value : <input type="text" id="encrypted_value" name="encrypted_value" value="<?=$encrypted_value?>" size="100"> decrypted_value : <input type="text" id="decrypted_value" name="decrypted_value" value="<?=$decrypted_value?>" size="100"> data_base64 : <input type="<?=$mode?>" id="data_base64" name="data_base64" value="<?=$encrypted?>" size="100"> iv_base64 : <input type="<?=$mode?>" id="iv_base64" name="iv_base64" value="<?=$iv?>" size="100"> key_base64 : <input type="<?=$mode?>" id="key_base64" name="key_base64" value="<?=$key?>" size="100">
has answer: http://stackoverflow.com/a/26083593
tagged with: javascript
linked to: http://stackoverflow.com/q/21180721
has comment: http://stackoverflow.com/comment/40867864
accepted answer: http://stackoverflow.com/a/26083593

http://stackoverflow.com/a/27927015
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26126179
type: Answer
has body: This has been filed as a more general bug two years ago, and is still not solved : https://code.google.com/p/chromium/issues/detail?id=163851 Please go there and star the issue to have people take care of it.

css
tags question: http://stackoverflow.com/q/26067668
tags question: http://stackoverflow.com/q/26091671
tags question: http://stackoverflow.com/q/26169517
tags question: http://stackoverflow.com/q/26050495
tags question: http://stackoverflow.com/q/26046161
tags question: http://stackoverflow.com/q/26106816
tags question: http://stackoverflow.com/q/26070194
tags question: http://stackoverflow.com/q/26175530
tags question: http://stackoverflow.com/q/26061654
tags question: http://stackoverflow.com/q/26146373
tags question: http://stackoverflow.com/q/26159073
tags question: http://stackoverflow.com/q/26097284
tags question: http://stackoverflow.com/q/26126663
tags question: http://stackoverflow.com/q/26088568
tags question: http://stackoverflow.com/q/26078601
tags question: http://stackoverflow.com/q/26145638
tags question: http://stackoverflow.com/q/26091088
tags question: http://stackoverflow.com/q/26144942
tags question: http://stackoverflow.com/q/26137532
tags question: http://stackoverflow.com/q/26171644
tags question: http://stackoverflow.com/q/26057065
tags question: http://stackoverflow.com/q/26076103
tags question: http://stackoverflow.com/q/26110379
tags question: http://stackoverflow.com/q/26048781
tags question: http://stackoverflow.com/q/26083610
tags question: http://stackoverflow.com/q/26085774
tags question: http://stackoverflow.com/q/26085997
tags question: http://stackoverflow.com/q/26102304
tags question: http://stackoverflow.com/q/26137581
tags question: http://stackoverflow.com/q/26182539
tags question: http://stackoverflow.com/q/26130702
tags question: http://stackoverflow.com/q/26048601
tags question: http://stackoverflow.com/q/26170130
tags question: http://stackoverflow.com/q/26154497
tags question: http://stackoverflow.com/q/26061676
tags question: http://stackoverflow.com/q/26148581
tags question: http://stackoverflow.com/q/26150225
tags question: http://stackoverflow.com/q/26045408
tags question: http://stackoverflow.com/q/26038681
tags question: http://stackoverflow.com/q/26162974
tags question: http://stackoverflow.com/q/26068751
tags question: http://stackoverflow.com/q/26124396
tags question: http://stackoverflow.com/q/26095149
tags question: http://stackoverflow.com/q/26062643
tags question: http://stackoverflow.com/q/26074696
tags question: http://stackoverflow.com/q/26152214
tags question: http://stackoverflow.com/q/26071216
tags question: http://stackoverflow.com/q/26157279
tags question: http://stackoverflow.com/q/26110728
tags question: http://stackoverflow.com/q/26036591
tags question: http://stackoverflow.com/q/26044887
tags question: http://stackoverflow.com/q/26140252
tags question: http://stackoverflow.com/q/26175770
tags question: http://stackoverflow.com/q/26182597
tags question: http://stackoverflow.com/q/26043145
tags question: http://stackoverflow.com/q/26135451
tags question: http://stackoverflow.com/q/26087984
tags question: http://stackoverflow.com/q/26072138
tags question: http://stackoverflow.com/q/26181464
tags question: http://stackoverflow.com/q/26102692
tags question: http://stackoverflow.com/q/26062512
tags question: http://stackoverflow.com/q/26061252
tags question: http://stackoverflow.com/q/26066615
tags question: http://stackoverflow.com/q/26088145
tags question: http://stackoverflow.com/q/26173376
tags question: http://stackoverflow.com/q/26086007
tags question: http://stackoverflow.com/q/26056162
tags question: http://stackoverflow.com/q/26123410
tags question: http://stackoverflow.com/q/26035757
tags question: http://stackoverflow.com/q/26047448
tags question: http://stackoverflow.com/q/26062251
tags question: http://stackoverflow.com/q/26159705
tags question: http://stackoverflow.com/q/26106830
tags question: http://stackoverflow.com/q/26115535
tags question: http://stackoverflow.com/q/26105937
tags question: http://stackoverflow.com/q/26036741
tags question: http://stackoverflow.com/q/26104645
tags question: http://stackoverflow.com/q/26071405
tags question: http://stackoverflow.com/q/26080755
tags question: http://stackoverflow.com/q/26126392

http://stackoverflow.com/comment/41029757
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26169420
type: AnswerComment
has text: can we change the regex to get the values

http://stackoverflow.com/comment/40955844
type: Comment
has text: @agustin I will edit my answer to make it work. Can you give me a sample "target" array?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26103351

http://stackoverflow.com/comment/41034025
type: AnswerComment
score: 0
type: Comment
has text: Your new loop just runs one time. Why do you need a loop?
comment on: http://stackoverflow.com/a/26172531

http://stackoverflow.com/comment/40863551
score: 0
type: Comment
type: QuestionComment
has text: i dont believe this is duplicate as its angular arrays which add haskeys and their own id's and as stated below splicing reindexes the array. in addition i have the query of id as the indicator of uniqueness.
comment on: http://stackoverflow.com/q/26079216

http://stackoverflow.com/a/26193460
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26193409
type: Answer
answers question: http://stackoverflow.com/q/26193409
upvote count: 1
has comment: http://stackoverflow.com/comment/41073196
score: 1
has body: Even though it's just "two" functions, you could use a module like async to help organize them without deeply nesting. Example: var async = require('async'); // ... router.get('/newcastle/G400', function(req, res) { var db = req.db; async.parallel([ universityData: function(callback) { db.collection('universities', function(err, collection) { if (err) return callback(err); collection.findOne({'code': 'N21'}, callback); }); }, courseData: function(callback) { db.collection('courses', function(err, collection) { if (err) return callback(err); collection.findOne({'universitycode': 'N21', 'code': 'G400'}, callback); }); } ], function(err, results) { if (err) return res.send(500); // results === { universityData: { ... }, courseData: { ... } } res.render('course', results); }); });
has comment: http://stackoverflow.com/comment/41073848
type: AcceptedAnswer

http://stackoverflow.com/a/26125467
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40983492
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26124332
answers question: http://stackoverflow.com/q/26124332
has comment: http://stackoverflow.com/comment/40949864
has body: You can solve it by using box-sizing: border-box example:- * { padding: 0; margin: 0; } html { box-sizing: border-box; } *, *:before, *:after { box-sizing: inherit; } html,body { height:100%; } #framecontentTop{ top: 5px; left: 0px; /*Set left value to WidthOfLeftFrameDiv 220px*/ right: 200px; /*Set right value to WidthOfRightFrameDiv*/ width: 100%; height: 175px; overflow: hidden; /*Disable scrollbars. Set to "scroll" to enable*/ background-color: #8b45130; position:relative; z-index:1; } #maincontent{ padding: 10px; position: relative; top: -180px; /*Negative Set top value to HeightOfTopFrameDiv + position*/ padding-top: 180px /*Set padding-top value to HeightOfTopFrameDiv + position*/ height: 100%; left: 220px; /*Set left value to WidthOfLeftFrameDiv*/ right: 205px; /*Set right value to WidthOfRightFrameDiv*/ width: 500px; overflow: auto; background: #fff; } The important part is to set the top to negative value of the #framecontentTop and applying padding-top to shift the content of the #maincontent to the correct position. And since the elements are overlapping, it needs correction by applying z-index to the #framecontentTop This is a sample for reference:- http://jsbin.com/neweyozamiha/2
score: 2
type: AcceptedAnswer

http://stackoverflow.com/a/26062153
has body: Socket events have to be bound to the socket itself, not IO. Try something like this: io.on("connection", onSocketConnection); function onSocketConnection(socket) { io.sockets.emit('message', { messages: 'New user Connected' }); socket.emit('connected' { success: 1 }); socket.on('join', onClientJoined); }; function onClientJoined(data) { console.log('subscribing'); };
accepted answer of: http://stackoverflow.com/q/26061335
answers question: http://stackoverflow.com/q/26061335
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40832092
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/26077544
tagged with: jquery
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40859720
has comment: http://stackoverflow.com/comment/40859824
has title: How to get an in input value after a DOM injection
has comment: http://stackoverflow.com/comment/40859739
has body: i'm doing a function that inject some HTML to the dom after an ajax function this way. The function that inject HTML $.ajax({ type: "POST", url: base_url + "main/GetTheLastSeq" }) .done(function( msg1 ) { console.log(ii); $('#ch').append(msg1); ii++; }); 2nd function trying to manipulate the injected HTML $(".item").on("click","i", function(){ var id = $("#idh").val(); alert(id); $.ajax({ type: "POST", data : {id:id}, url: base_url + "main/Deleteseq" }) .done(function( msg) { alert(msg); }); }); The HTML : i'm trying to get the value of in input injected after this ajax function. ther alert(id); return me a blank value. Any help please Thanks
has comment: http://stackoverflow.com/comment/40859786
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40859680
has answer: http://stackoverflow.com/a/26077647
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40859605
has comment: http://stackoverflow.com/comment/40859803
has comment: http://stackoverflow.com/comment/40859779
upvote count: 0
answer count: 1

http://stackoverflow.com/a/26238038
type: Answer
score: 1
has body: Thats because the .on() event handler doesn't handle the dynamically added elements unless you specify it like this: $(document).on('ajax:success', 'a[data-remote]', function(){});". It works with "$(document)" because the event handler captures the event when it bubbles up to it's parent element, in this case 'document'. You should add the event handler to the parent element that contains all 'a[data-confirm]' so it doesn't filter each event, or you could specify like the code above. Here's more on event bubbling and capturing.
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26180422
type: AcceptedAnswer
downvote count: 1
answers question: http://stackoverflow.com/q/26180422

http://stackoverflow.com/comment/40889478
type: Comment
has text: jsfiddle.net/du5sazay/1
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26092602

http://stackoverflow.com/comment/40951102
type: QuestionComment
comment on: http://stackoverflow.com/q/26126796
score: 0
has text: I assume you use Mozilla's ES6 `Promise`?
type: Comment

http://stackoverflow.com/comment/40963006
type: AnswerComment
comment on: http://stackoverflow.com/a/26134045
type: Comment
has text: XmlHttpRequest loads data into your app via a second HTTP request. Inlining stuffs it in the first response. It's a good compromise for now. HTTP2 may render it obsolete but what changes is the mechanism of loading data and that does NOT a priori constitute blending of presentation logic and business logic. It's not really "javascript" logic, it's just JSON data.
score: 0

http://stackoverflow.com/comment/41027832
score: 1
has text: Totally agree. If I said something to make it seem like I was "scoffing" at the idea of learning fundamentals, I must have mispoke. I apologize that that was the message that came across. I don't use intricacies like this in my daily work enough for it to stick. I've gone back a few times to _really_ try to understand some of this stuff and for one reason or another, it doesn't stick. I wish were the result were different :( It's just a bummer to ask a question and then seemingly get chastized for asking it. While I'm sure that's not what you genuinely meant to do, that's how it came across :/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26167061

http://stackoverflow.com/a/26118076
has comment: http://stackoverflow.com/comment/40948266
has comment: http://stackoverflow.com/comment/42745889
has comment: http://stackoverflow.com/comment/92528396
has comment: http://stackoverflow.com/comment/40948841
has body: You need to setup your Express server to serve static files. At the moment, it appears to only serve the '/' route. Just before you setup your routing, add the line below. You can then serve up static assets from a 'public' folder relative to where your script it. app.use(express.static(path.join(__dirname, 'public'))); So if you put your myJS.js in public/js/myJS.js you can then reference it like so More info in the docs: http://expressjs.com/api.html#express.static
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/73712376
has comment: http://stackoverflow.com/comment/92528417
score: 23
accepted answer of: http://stackoverflow.com/q/26108623
answers question: http://stackoverflow.com/q/26108623
type: AcceptedAnswer
upvote count: 23

http://stackoverflow.com/a/26188093
has comment: http://stackoverflow.com/comment/41067873
has comment: http://stackoverflow.com/comment/41063510
has comment: http://stackoverflow.com/comment/41063369
accepted answer of: http://stackoverflow.com/q/26187553
answers question: http://stackoverflow.com/q/26187553
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41140058
has comment: http://stackoverflow.com/comment/41063525
type: Answer
has body: Even if that code carried the false value up to the database insertion, inserting a false value into the database will only make it a null field, which is the equivalent of setting it to nothing. So the two options you have are to: 1) Check for a null field when retrieving the rows from the database OR 2) Use the string value of "false" in the database and check for that instead
has comment: http://stackoverflow.com/comment/41063375
downvote count: 0
score: 1

http://stackoverflow.com/a/26040214
score: 0
has comment: http://stackoverflow.com/comment/40791444
type: Answer
answers question: http://stackoverflow.com/q/26039947
has body: I would suggest using the callback on jQuery load() like this >>> &lt;div id=videoHolder&gt;&lt;/div&gt; &lt;div id=loadrHolder&gt;&lt;/div&gt; &lt;script&gt; $( document ).ready(function() { $('#videoHolder').hide(); $('#videoHolder').load( "myVideo.mp4", function() { $('#videoHolder').show(); $('#loadrHolder').hide(); }); }); &lt;/script

http://stackoverflow.com/comment/40920852
has text: I'd recommend clicking the code button after highlighting the entire block of code; the backticks are meant for in-line code only. Like this: `some code goes here`, etc.
comment on: http://stackoverflow.com/q/26111057
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/40917530
type: Comment
comment on: http://stackoverflow.com/q/26109171
type: QuestionComment
has text: Check out http://jplayer.org/latest/developer-guide/#jPlayer-option-cssSelector for custom selectors
score: 0

http://stackoverflow.com/comment/41071505
comment on: http://stackoverflow.com/q/26192614
type: Comment
type: QuestionComment
score: 0
has text: Could you elaborate on that?

http://stackoverflow.com/a/26153643
has body: To my understand the way jQuery each fucntion works is you pass an array of elements that you want to loop through as a parameter like so, jQuery var height = 0; var elements = $('.elements'); $.each(elements,function(key,value) { height += $(this).height(); }); Pure JS var height = 0; var elements = document.querySelectorAll('.elements'); for(var i = 0;i < elements.length;i++) { height += elements[i].offsetHeight(); } UPDATE HTML jQuery var height = 0; var parents = $('.in-viewport'); $.each(parents,function(key,value) { height += $(this).height(); });
downvote count: 0
answers question: http://stackoverflow.com/q/26153611
has comment: http://stackoverflow.com/comment/41028833
has comment: http://stackoverflow.com/comment/41009668
type: Answer
has comment: http://stackoverflow.com/comment/41055152
upvote count: 1
has comment: http://stackoverflow.com/comment/41036120
score: 1
has comment: http://stackoverflow.com/comment/41004522
has comment: http://stackoverflow.com/comment/41033013

http://stackoverflow.com/comment/40802447
has text: Why use html() as append()? Why not use append() as append()? html() is html(), not append().
score: 3
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26046200

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

http://stackoverflow.com/comment/41054980
comment on: http://stackoverflow.com/a/26168447
score: 0
type: Comment
has text: This solution only silences the error. As per the link you provided: "Note: this “fix” will disable [the feature] in the firefox browser".
type: AnswerComment

http://stackoverflow.com/a/26116919
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/26116731
downvote count: 0
has body: http://jsfiddle.net/ah6yb7bf/2/ you need to put var pos= $('#gallery_slider').position(); inside click function. Because you check it on page load when its equal to 0; After move you need to check it again.

http://stackoverflow.com/a/30196139
answers question: http://stackoverflow.com/q/26044024
has body: I'm working on the same problem and got a "solution". It is still a prototype, but maybe it helps you. Every mouse click on a node calls a function and detects new nodes. They are all saved in nodes and all active, it means all nodes on the display are in activeNodes. All nodes belonging to the path from the root node to the clicked one are stored in pathNodes.The result is, that only the active path is displayed inclusivly the children of the clicked one. Hopefully it is clearly explained. For abetter understanding please look up the source code at: http://github.com/nextlevelshit/d3_nested_nodes For something to play with check out: http://dailysh.it/github/d3_nested_nodes/ Here the snippet of my code: /** * Triggering mouse click start */ function mousedown() { if (mousedown_node !== null) { var pathNodes = findPathNodesTo(mousedown_node); var point = d3.mouse(this), node = { id: nodes.length, parent: mousedown_node.id }; node.x = point[0]; node.y = point[1]; var newNodes = findNodesbyParentId(mousedown_node.id), startingPoint = { x: mousedown_node.x, y: mousedown_node.y }; for (var i = 0; i &lt; pathNodes.length; i++) { newNodes.push(pathNodes[i]); pathNodes[i].path = true; } var removeNodes = activeNodes.diff(newNodes); var addNodes = newNodes.diff(pathNodes).diff(activeNodes); for (var i = 0; i &lt; removeNodes.length; i++) { removeNode(removeNodes[i].id); } for (var i = 0; i &lt; addNodes.length; i++) { addNodes[i].x = startingPoint.x; addNodes[i].y = startingPoint.y; activeNodes.push(addNodes[i]); activeLinks.push({source: findNode(addNodes[i].parent), target: findNode(addNodes[i].id)}); } // TODO: Find a smoother way do delay popping out new nodes }); } restart(); } The last problem is to find a smooth way for popping out new nodes...
score: 0
type: Answer

http://stackoverflow.com/comment/40897435
comment on: http://stackoverflow.com/a/26061031
type: AnswerComment
type: Comment
has text: @AjayBansal If you found answer helped then you can accept my answer :)
score: 0

http://stackoverflow.com/a/26131382
has body: Since you did not mention any limitations on the technology or framework to be used, see if you can use this. MEAN -- MongoDB, Express, Angular and Node. http://mean.io/#!/
upvote count: 2
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26131264

http://stackoverflow.com/a/26138648
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40970972
has comment: http://stackoverflow.com/comment/40972543
answers question: http://stackoverflow.com/q/26137653
has comment: http://stackoverflow.com/comment/41102265
downvote count: 0
type: Answer
has body: Ensure that &lt;script type="text/javascript" src="js/respond.min.js"&gt;&lt;/script&gt; is called after all the body content. For IE8 and below, you must run your HTML script from a server in order to avoid a security error caused by respond.js / respond.min.js. If you haven't organized a server, you can Debug via localhost and this will fix your issue. Further information can be seen here

http://stackoverflow.com/comment/40865379
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26080217
has text: oh thanks - i dont know from codereview :)
score: 0

http://stackoverflow.com/q/26113829
tagged with: jquery
has body: I have two functions added to jQuery native methods and which use jquery data() method to store information to retrieve latter. Thing is I don't want to store the attribute if it has already been stored. So I have : $.fn.foo = function() { if(!$.hasData(this)) { $.data(this, 'width', this.css('width')); $('#test').append('foo : Added to "data"&lt;br&gt;'); } } $.fn.bar = function() { if(!$.hasData(this)) { $.data(this, 'width', this.css('width')); $('#test').append('bar : Added to "data"&lt;br&gt;'); } } $('element').foo(); $('element').bar(); But it outputs "Added to data" twice, instead of once. It seems that $.data() doesn't act globally at all. How should I adapt the code so that the data behave globally ? Here's the jsfiddle : http://jsfiddle.net/e9e9vbnn/
has answer: http://stackoverflow.com/a/26113869
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26113869
tagged with: javascript
score: 0
answer count: 1
has title: jQuery data() doesn't work globally

http://stackoverflow.com/comment/40805646
has text: I had to add a timeout for the snippet here, but you shouldn't need that.
type: AnswerComment
comment on: http://stackoverflow.com/a/26047931
score: 0
type: Comment

http://stackoverflow.com/a/26152900
has comment: http://stackoverflow.com/comment/40997837
has body: Onscroll fires a bunch of times so you are telling it to animate a bunch of times. Either stop the animation with stop() $('#header').stop().animate(...); or detect if it is animating. $('#header').not(":animated").animate(...);
answers question: http://stackoverflow.com/q/26152658
score: 0
type: Answer

http://stackoverflow.com/q/26140276
favorite count: 0
type: Question
has title: How to retrieve IndexedDB table data to variable?
answer count: 2
possible better answer: http://stackoverflow.com/a/26143785
has answer: http://stackoverflow.com/a/26143785
upvote count: 3
accepted answer: http://stackoverflow.com/a/26140527
tagged with: indexeddb
tagged with: arrays
downvote count: 0
has body: I have some data in a IndexedDB table that quite simply contains this data: var Customers = [ { ssn: "123-45-6666", name: "Andrew", age: 22, email: "andrew@hotmail.com" }, { ssn: "555-66-7777", name: "Gail", age: 25, email: "gail@email.me" } ]; I then have this function to get data back from the IndexedDB: function RetrieveTableRows(Table) { var returnData = []; var db = window.indexedDB.db; var trans = db.transaction([Table], "readwrite"); var store = trans.objectStore(Table); var keyRange = IDBKeyRange.lowerBound(0); var cursorRequest = store.openCursor(keyRange); cursorRequest.onerror = window.indexedDB.onerror; cursorRequest.onsuccess = function(e) { var result = e.target.result; if(!!result == false) { return; } returnData.push(result.value); result.continue(); }; return returnData; } I realise that it does not work because the onsuccess function is asynchronous, however I can't my head around a solution. Simply, I want to be able to write: var myCustomers = RetrieveTableRows('customers'); and be able to then use the variable myCustomers - is this possible? I have tried using JQuery.deferred(); method but that didn't seem to work, and I know that I could possibly do something like this: transaction.oncomplete = function() { ReturnTableRows(returnData); }; } function ReturnTableRows(data) { //do something with the array of data } but I can't work out how to pass this back to the myCustomers variable.
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/26140527
tagged with: asynchronous

http://stackoverflow.com/comment/40994842
comment on: http://stackoverflow.com/a/26150850
score: 0
type: AnswerComment
type: Comment
has text: I created the package in packages/<package> and added it with `meteor add <package>`. Are you testing with `meteor run --production`?

http://stackoverflow.com/comment/41046017
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26178972
has text: @mplungjan It is. But then again, since when were generic header/footer areas part of the content that you care about with SEO?

http://stackoverflow.com/comment/40962680
score: 0
comment on: http://stackoverflow.com/a/26134045
type: Comment
has text: I will probably just use JSON or JSONP. `sharify` looks interesting, but it probably puts the data directly inline in a ` ` tag, as well, which I don't want.
type: AnswerComment

http://stackoverflow.com/q/26169031
answer count: 3
has answer: http://stackoverflow.com/a/26169250
has comment: http://stackoverflow.com/comment/41027550
upvote count: 1
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26169236
has comment: http://stackoverflow.com/comment/41027504
tagged with: http://stackoverflow.com/tag/html
has body: I have created an html page with 2 buttons. One for first degree equations and on for quadratic. I have 3 forms for a b and c(quadratic equation) THe 1st degree equations are solved properly but I can't say the same for the quadratic equations!!!So here is my code: HTML: Equations Choose the type of equation you want and press = 1st degree Quadratic = And here is my Javascript: function quadratic(){ var a=$("#a").val(); var b=$("#b").val(); var c=$("#c").val(); var D=b*b - 4 * a * c; var base = 2 * a; var sD=Math.sqrt(D); if (D < 0) { alert("Can't be solved") } else if (D === 0){ var dx=(b*(-1)) / (2 * a); alert("Double solution:"+dx) } else{ var x1=-b+sD / base; var x2=-b-sD / base; alert("X1: "+x1+" X2: "+x2) } } The problem is that when I use that code to solve a quadratic equation the results are not the same as the results I get using my head
has title: Quadratic equation in Javascript is not working
has comment: http://stackoverflow.com/comment/41027849
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41027601
possible better answer: http://stackoverflow.com/a/26169163
has comment: http://stackoverflow.com/comment/41027564
tagged with: javascript
has comment: http://stackoverflow.com/comment/41027710
has comment: http://stackoverflow.com/comment/41027555
has answer: http://stackoverflow.com/a/26169163
accepted answer: http://stackoverflow.com/a/26169236
score: 0

http://stackoverflow.com/comment/41045311
score: 1
has text: Look into jquery toggle()
type: QuestionComment
comment on: http://stackoverflow.com/q/26178818
type: Comment

http://stackoverflow.com/comment/40979313
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26143169
type: QuestionComment
has text: `it did not work`, what went wrong exactly? What output do you receive? For example, what does `console.log(appendData)` show?

http://stackoverflow.com/comment/41001556
has text: You want to use data bind in javascript? If thats what you are intersted in I guess you can do so using attr() functions
comment on: http://stackoverflow.com/q/26155111
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40901305
comment on: http://stackoverflow.com/q/26099683
type: QuestionComment
type: Comment
has text: Can't you do serverside pre-calculation job with caching and just return a json "as-is" for the highchart ? I think the freezing problem is due to the actual displaying of data, but it could help. But I think you should really go to lower resolution by averaging values.
score: 0

http://stackoverflow.com/comment/40794881
has text: I'd like to to actually fade in the .small-logo div from the bottom up, when you scroll, instead of just fading in.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26041688
score: 0

http://stackoverflow.com/comment/41061748
comment on: http://stackoverflow.com/q/26187255
type: QuestionComment
type: Comment
has text: My bad. I didn't realize that the `text()` function was inside the click function because of how the code is formatted.
score: 0

http://stackoverflow.com/comment/40905877
type: Comment
has text: @GoldCoin No problem mate, I don't care about the downvotes. I was just wondering if I did something wrong. Glad I could help.
type: AnswerComment
comment on: http://stackoverflow.com/a/26101965
score: 0

http://stackoverflow.com/q/26044384
downvote count: 2
has answer: http://stackoverflow.com/a/26045856
has title: Implementing a "current-position" indicator on a page using HTML and JavaScript
has comment: http://stackoverflow.com/comment/40798935
type: Question
score: 3
upvote count: 5
tagged with: javascript
answer count: 2
has body: So, I want to add something like this to my webpage: So, I have an idea about how to get it done. Here are a few questions: Would this "indicator" be implemented by just using a div to house the circles that indicate where you are at? If so, how can I make this div always be at the same spot and always visible on the page, even when scrolling? To indicate you are at a current position, will I have to set ranges of pixels for each "circle indicator" and get the current-position using JavaScript? Lastly, is there a way to highlight/fill-in circles using CSS or JavaScript? Or will I need to use images of empty/filled circles?
has comment: http://stackoverflow.com/comment/40799023
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40798948
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40799157
has answer: http://stackoverflow.com/a/26046101

http://stackoverflow.com/q/26051578
answer count: 1
tagged with: javascript
tagged with: variables
has comment: http://stackoverflow.com/comment/40814646
score: 0
has answer: http://stackoverflow.com/a/26051846
tagged with: http://stackoverflow.com/tag/html
has body: I've just started programming with JavaScript and have come to a little problem. I am trying to place information into local storage. The key is taken from a variable, as is the value. Here is my code, It might not make very much sense. Note: Pies is just an example. &lt;form name="buy"&gt; &lt;input id="Quantity" name="Quantity" type="number" max="2" min="1" value="1"&gt; &lt;input type="submit" id="confirm" onclick="confirm()"&gt; &lt;/form&gt; &lt;p id="Output"&gt; &lt;script&gt; function confirm() var name = "Pies"; var quantity = document.getElementsById("Quantity"); if (localStorage["number"] == null) { var number = "1"; } else { // Put the name into a text box. number = number += 1; } document.getElementById("Output") = localStorage[number]; alert("You Stored: " + localStorage[number]); } The if/else statement is supposed to detect whether the the item "Number" exists yet in the local storage, and if not creates it. Then, the value of number in local storage is assigned from the HTML form. Number is simply the key of the local storage item, whilst its value is quantity, taken from the form. Sorry if my script doesn't make any sense, I'm new to the area of JavaScript. Any help would be greatly appreciated, -Luke
tagged with: local-storage
has comment: http://stackoverflow.com/comment/40812291
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26051846
type: Question
has title: Assigning local storage from variable

http://stackoverflow.com/a/26357910
upvote count: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26187543
answers question: http://stackoverflow.com/q/26187543
type: Answer
downvote count: 0
has body: This is a chrome specific issue, you can view the discussion here https://code.google.com/p/v8/issues/detail?id=3116 and in https://code.google.com/p/chromium/issues/detail?id=417640 look for #31 ulan@chromium.org, This issue is fixed in version 3.29.39
score: 3

http://stackoverflow.com/a/26080306
score: 1
has comment: http://stackoverflow.com/comment/40865154
upvote count: 1
answers question: http://stackoverflow.com/q/26080225
has comment: http://stackoverflow.com/comment/40865037
accepted answer of: http://stackoverflow.com/q/26080225
type: AcceptedAnswer
has body: Replace by This is the correct (default) url where socket.io's client's apis are exposed (via http) by the node module.
downvote count: 0
has comment: http://stackoverflow.com/comment/40864885
type: Answer

http://stackoverflow.com/q/26047660
has title: Calling function in knockout.js from outside view model
tagged with: php
type: AnsweredQuestion
has body: I'm using CakePHP 2.3.8 and I'm trying to call a function from within a knockout.js view model, but I'm having some trouble understanding what's going on. If a specific variable is set (in PHP), then I want to display a div but I'm having trouble getting it to work. When I call it from the PHP code, the div doesn't display, however an alert message from within the method triggers so I know that code is being reached. &lt;div data-bind = "visible: someDiv"&gt; I'm visible &lt;/div&gt; Here's the knockout viewmodel function myViewModel(){ var self = this; self.someDiv = ko.observable(false); //the div starts out hidden self.editing = ko.observable(false); //if the editing variable is changed, display someDiv self.editing.subscribe(function(){ alert('edit changed'); //this alert triggers every time, even from the PHP call self.someDiv(true); //someDiv only shows if I call from within the view model }); //if I manually change editing to true from within the viewmodel, the div shows //self.editing(true); } ko.applyBindings(new myViewModel()); Here's the PHP code that initiates the sequence of events echo $this-&gt;Html-&gt;script('knockout-2.3.0'); echo $this-&gt;Html-&gt;script('viewmodel'); //if the edit variable is set, the "someDiv" should be set to true if(isset($edit)){ &lt;script&gt; window.vm = new myViewModel(); window.vm.editing(true); //this will trigger the alert from the subscribe function, but the div doesn't display &lt;/script&gt; } Why is it when I change the editing value to true from PHP the div doesn't display, but if I change it from within the viewmodel it displays? Is it even possible to do what I'm attempting? Edit I am applying bindings to my viewmodel in that JS file. I am not applying bindings again in the PHP file. What I mean from "variable is set (in PHP)" is that the source of the data originates from PHP, although it is JavaScript setting the value in the end. I kept it short for my example above, so really it would be like this (not that …
score: 0
tagged with: cakephp
tagged with: knockout.js
type: Question
has answer: http://stackoverflow.com/a/26048774
tagged with: javascript
answer count: 1
accepted answer: http://stackoverflow.com/a/26048774

http://stackoverflow.com/comment/40846329
has text: You are changing the id. It will only change the style if the element's id is `exam`, but it won't change elements with the id `exam1` etc. Perhaps use a class.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26070052
type: Comment

http://stackoverflow.com/q/26064318
has comment: http://stackoverflow.com/comment/40835869
has answer: http://stackoverflow.com/a/26064488
score: 0
answer count: 1
tagged with: angularjs
has title: ng-options trackby in group expression
tagged with: angularjs-ng-options
has body: What am I doing wrong here that Angular (1.1.5) is not properly selecting the correct value in this grouped select dropdown? HTML: options.metricId is being set properly by the controller. The options.answers object looks like this: {id: 8, name: "Leads Others", question: "Assessment"} All the options are appearing, but it is not selecting the value where answer.id == options.metricId as I would expect it to.
has comment: http://stackoverflow.com/comment/40835835
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26064488
tagged with: javascript

http://stackoverflow.com/comment/40929147
has text: You're right. If they are required they should be added from the start, with some default values.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26115776
type: Comment

http://stackoverflow.com/comment/40823754
type: Comment
has text: what if instead I try to deal with the repeat index?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26057634

http://stackoverflow.com/comment/40854656
score: 0
type: AnswerComment
has text: Good but if my string is the following it doesn't work : `a='00-8'b='13-'a+='00-2'b+='3333'c='4'`. Or if their are another thing after...
type: Comment
comment on: http://stackoverflow.com/a/26074950

http://stackoverflow.com/comment/40836573
score: 0
type: Comment
has text: That's the issue. The webpage itself is loading over 80 (default) but the socket.io is listening over 8080. So the page wants to request the urls off 80, but it needs to use 8080
comment on: http://stackoverflow.com/a/26064821
type: AnswerComment

http://stackoverflow.com/comment/41009723
comment on: http://stackoverflow.com/a/26116241
has text: Yeah, then you can use this, when it goes into the if statement, you know that the post is not empty, and you can just assign a var to that, or even insert into database from there.
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/a/26148673
has body: Consider listening via window var links = ["#portfolio", "#animations", "#games"]; $(window).on('click', links.join(', '), function() { // do what you wanna });
score: 0
answers question: http://stackoverflow.com/q/26148565
type: Answer

http://stackoverflow.com/a/26086284
upvote count: 1
answers question: http://stackoverflow.com/q/26086263
has comment: http://stackoverflow.com/comment/40877893
has comment: http://stackoverflow.com/comment/40878482
accepted answer of: http://stackoverflow.com/q/26086263
has comment: http://stackoverflow.com/comment/40883608
has comment: http://stackoverflow.com/comment/40884575
type: AcceptedAnswer
downvote count: 0
score: 1
has body: You can have another listeners (keyup and keydown) for the shift key. Use a flag variable to denote whether the key is pressed or not, and then in your change listener simply check for the state of that flag variable. Something like this: var shiftPressed = false; $(document).keydown(function(e){ if (e.keyCode == 16) shiftPressed = true; }) $(document).keyup(function(e){ if (e.keyCode == 16) shiftPressed = up; }) See it here: http://jsfiddle.net/hL7Lnf3a/5/ (try changing the select item with and without the shift pressed) A version with a custom drop-down menu: http://jsfiddle.net/g8ptz2eb/11/
has comment: http://stackoverflow.com/comment/40878736
type: Answer

http://stackoverflow.com/q/26094957
type: Question
tagged with: javascript
tagged with: dynamics-crm-2011
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26096489
tagged with: odata
tagged with: http://stackoverflow.com/tag/html
has title: Why getting javascript errors with sample SDK script?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26096489
has body: I have created following simple web resource in dynamics CRM, to use rest API using OData. Please consider, new_JavaScriptRESTDataOperationsSample is sample with SDK, I have only created following sample HTML. <TITLE>OData ﻿ Click Me! When I click on Click Me! button it gives following errors, Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.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) Timestamp: Mon, 29 Sep 2014 07:38:45 UTC Message: 'startButton' is null or not an object Line: 32 Char: 3 Code: 0 URI: http://dynamicscrm01/CRM01/%7B635475719080000809%7D/WebResources/new_JavaScriptRESTDataOperationsSample Message: 'output' is null or not an object Line: 199 Char: 2 Code: 0 URI: http://dynamicscrm01/CRM01/%7B635475719080000809%7D/WebResources/new_JavaScriptRESTDataOperationsSample Sorry for incorrect formatting, SO not allowing links in block quotes.

http://stackoverflow.com/q/26053746
has title: Message shown before On page re- load , not working after page re-load
has comment: http://stackoverflow.com/comment/40816115
has comment: http://stackoverflow.com/comment/40815969
has answer: http://stackoverflow.com/a/26053909
has answer: http://stackoverflow.com/a/26053981
type: Question
has body: I have an ajax response code like the follows function click_delete_reply(){ if ((ajMsgDel.readyState == 4) &amp;&amp; (ajMsgDel.status == 200)) { var restxt = ajMsgDel.responseText; if (restxt == "success") { location.reload(); display_messagesuccess( "Message Delete has been successfully performed!"); } } } I need to reload the page after ajax response success and then I need write a message in a 'div'. But here After message shown then only it performs the page load. What can I do to overcome this? Please help me!
answer count: 2
tagged with: javascript
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/40815987
has comment: http://stackoverflow.com/comment/40816061
type: UnansweredQuestion

http://stackoverflow.com/q/26071539
score: 1
has comment: http://stackoverflow.com/comment/40849091
has comment: http://stackoverflow.com/comment/40849002
type: Question
accepted answer: http://stackoverflow.com/a/26071579
has title: Is it possible to run multiple functions side by side in javascript even if they are not triggered at the same time?
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
has body: My script runs as follows: //Gets triggered when a button is clicked function button_1() { ... setTimeout(other_function(), 0); ... } //Checks if for hundreds of thumbnails a high-res version is available function other_function() { ... $.ajax({ url: url_to_highres_file, type: 'HEAD', cache: false, error: function() { $(#output).text('The file ' + filename_of_current_file + ' is not available!'); } }); ... } I understand that when the function "button_1" is triggered it executes code until the function "other_function" is triggered. From that point on both functions run pseudo simultaneously. The problem I have now is, that the function "other_function" runs for a long time. While that function is running and the user triggers another function e.g. "button_2", then javascript finishes the function "other_function" first before it starts executing code within the function "button_2". Since the function "other_function" does not have that high of a priority to the user it is more important that the website responds to input rather than finishing the function "other_function" first. Is there a way to still execute code blocks from the function "other_function" but also mix code blocks from the function "button_2" in between, so they run side by side and the user does not have to wait until the function "other_function" has finished? Thanks a lot for your help!
tagged with: asynchronous
favorite count: 0
has answer: http://stackoverflow.com/a/26071579
upvote count: 1
type: AnsweredQuestion
tagged with: synchronous

http://stackoverflow.com/q/26079927
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40864122
tagged with: angularjs
has body: Sorry for duplicating a question for this issue but I really tried to seek for a solution but I could not find it. So I use angular $http.get xhr request to retrieve data from the public api. I have next code $http.get('http://www.carqueryapi.com/api/0.3/?callback=?&amp;cmd=getMakes&amp;year=2000&amp;sold_in_us=1') .success(function(d){ console.log(d); }) .error(function(d){ console.log( "nope" ); }); this returns in console: XMLHttpRequest cannot load http://www.carqueryapi.com/api/0.3/?callback=?&amp;cmd=getMakes&amp;year=2009. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'blah-my-localhost-blah' is therefore not allowed access. However if I user jquery getJson method it works just fine: $.getJSON("http://www.carqueryapi.com/api/0.3/?callback=?", {cmd:"getMakes", year:"2009"}, function(data) { console.log(data); }); So obviously I can configure angular to send correct request since jQuery works fine? Thank you for the response.
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40864096
has title: Access-Control-Allow-Origin issue and angular $http service
tagged with: javascript
has answer: http://stackoverflow.com/a/26079988
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26079988

http://stackoverflow.com/comment/40839777
type: QuestionComment
has text: hmmm that querySelectorAll(); should workout fine i think, will try! TY
type: Comment
comment on: http://stackoverflow.com/q/26066463
score: 0

http://stackoverflow.com/q/26056473
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/3698200
has answer: http://stackoverflow.com/a/26056996
accepted answer: http://stackoverflow.com/a/26056996
has answer: http://stackoverflow.com/a/26056580
answer count: 3
has title: Redirect page to another and then do something jQuery
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26056559
score: 0
has body: I have one page with slider with images and names of category, and second page with gallery and on this page is another slider with category icons. When you click on slider1 it shoud redirect you to page2 (gallery) and set slider2 to right positions, I mean slider2 shoud jump to proper slide with exactly the same category to show right pictures in gallery. Redirecting was no problem to me but I don't know how I should write the functions after redirecting to page. Right now I have var slide_jump; $('div.zobacz').bind("click touchstart", function() { slide_jump = glide2.current(); //get number of slide on slider1 to know to which slide should jump slider2 setTimeout(function() {//redirecting must be after I get current slide on slider1 var url = "http:***.html"; $(location).attr('href', url); }, 100); //HERE IS MY PROBLEM }); there is a function : slider2.jump(slide_jump) - slider2 jump to proper slide, but I dont know were I shoud use it. it should be after the page2 load, i know there is something like $(window).load(); $(document).ready(); but should I use it know? if everything is already in something like this.
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/4584373
linked to: http://stackoverflow.com/q/9870512
tagged with: http-redirect
has comment: http://stackoverflow.com/comment/40820934
has answer: http://stackoverflow.com/a/26056559
type: Question

http://stackoverflow.com/comment/41074272
type: Comment
has text: thx for your feedback. there you go http://pastie.org/9620151 its exactly what the tool generated. edited the post too.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26193791

http://stackoverflow.com/q/26158198
score: 0
has answer: http://stackoverflow.com/a/26158244
linked to: http://stackoverflow.com/q/1184624
tagged with: jquery
has comment: http://stackoverflow.com/comment/41188777
has body: Is there a way I can store form information using javascript and jquery to the variable first and only when user hits submit button, save that data, else discard it. I know html forms do the same, but I have an example where I can add multiple content using same input field and when user clicks add button content is sent to controller via ajax and manipulated then inserted in database and displayed from database entry instantly. But I don't want to save that data to database beforehand, only when complete form is submitted. So I want to save that data to some array first not directly to database, display it and save it to database only when user clicks submit button and sends the entire form to the server.
type: UnansweredQuestion
tagged with: php
answer count: 4
has answer: http://stackoverflow.com/a/26158500
has answer: http://stackoverflow.com/a/26255584
type: Question
has answer: http://stackoverflow.com/a/26158252
tagged with: javascript
has title: Save data to JS array before submiting form

http://stackoverflow.com/comment/40804273
score: 0
type: AnswerComment
type: Comment
has text: Well, I want to keep the div's background black and have an image fade into it. So I don't want to fade in the div, but just the background image.
comment on: http://stackoverflow.com/a/26047223

http://stackoverflow.com/q/26065915
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26065987
accepted answer: http://stackoverflow.com/a/26065987
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40838799
type: AnsweredQuestion
type: Question
linked to: http://stackoverflow.com/q/12472778
has comment: http://stackoverflow.com/comment/40839358
has body: How is it possible to iterate through child nodes of an element in order? I can reach all child nodes whit this code, but is it in the correct order, like in the HTML page? for(var i=0; i&lt;element.children.length; i++) { //... }
has comment: http://stackoverflow.com/comment/40838863
has title: Iterate through children in order
score: 0
has comment: http://stackoverflow.com/comment/40838857
has comment: http://stackoverflow.com/comment/40838725
upvote count: 1
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40838797

http://stackoverflow.com/a/34517065
score: 0
has body: Had the same problem, and even though I liked it, the accepted answer didn't work for me. It's not clear enough, but the documentation hints at the correct syntax, starting with the signatures: All commands accept the simple data[, …], fn. For example findAndModify({}, {}, fn) And from the finding section: users.findAndModify({ _id: '' }, { $set: {} }); Finally, continuing with the signatures section: You can pass options in the middle: data[, …], options, fn Putting it all together: collection.findAndModify({ _id: '', }, { $set: { value: '', }, }, { upsert: true, }); So in this case, data[, …] is the couple {}, {} objects: query and update. Then you can add the callback as a 4th parameter in my snippet.
type: Answer
answers question: http://stackoverflow.com/q/26154132

http://stackoverflow.com/comment/40955364
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26129687
has text: ok i figured it out. Its missting $(document).ready(function() { }

http://stackoverflow.com/comment/40926842
type: Comment
comment on: http://stackoverflow.com/a/26114414
has text: Yep changed that to fail.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41025338
type: Comment
has text: What is the actual error you get, and from which line?
comment on: http://stackoverflow.com/q/26166758
score: 0
type: QuestionComment

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

http://stackoverflow.com/a/26101172
downvote count: 0
answers question: http://stackoverflow.com/q/26101015
type: Answer
score: 1
upvote count: 1
has body: i think you should have to change just the href value of stylesheet on every button click .Doing that ,will load the new CSS file without affecting the DOM elements . Hope I am clear to you . Thanks !!

http://stackoverflow.com/q/26067668
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has title: jquery mtree onload open last clicked node with cookie option
tagged with: css
has body: I am using mtree( sample you can seehere for display my menu list nodes When i click on the node text (hyperlink) . I want to open the node which i clicked and all other nodes should be closed. I am using the following code. In main.html page i have list with Africa,America,Asia,Europe,Oceania,Arctica and Antarctica Africa is having sub menu as: Algeria,Marocco,Libya,Somalia,Kenya,Mauritania and South Africa( all are hyperlink text) when I click on kenya text hyperlink it will redirects to kenya.html page so on load of kenya.html i want Africa menu list should open with Kenya text highlighted main.html Africa Algeria Marocco Libya Somalia Kenya Mauritania South Africa America North-America Canada USA New York California Los Angeles San Diego Sacramento San Francisco Bakersville Lousiana Texas Nevada Montana Virginia Middle-America Mexico Honduras Guatemala South-America Brazil Argentina Uruguay Chile Asia China India Malaysia Thailand Vietnam Singapore Indonesia Mongolia Europe North Norway Sweden Finland East Romania Bulgaria Poland South Italy Greece Spain West France England Portugal Oceania Australia New Zealand Arctica Antarctica THIS IS MAIN PAGE kenya.html Africa Algeria Marocco Libya Somalia Kenya Mauritania South Africa America North-America Canada USA New York California Los Angeles San Diego Sacramento San Francisco Bakersville Lousiana Texas Nevada Montana Virginia Middle-America Mexico Honduras Guatemala South-America Brazil Argentina Uruguay Chile Asia China India Malaysia Thailand Vietnam Singapore Indonesia Mongolia Europe North Norway Sweden Finland East Romania Bulgaria Poland South Italy Greece Spain West France England Portugal Oceania Australia New Zealand Arctica Antarctica THIS IS Kenya PAGE
answer count: 0
tagged with: treeview
upvote count: 1
has comment: http://stackoverflow.com/comment/45153327
type: UnansweredQuestion
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery

http://stackoverflow.com/a/26113323
accepted answer of: http://stackoverflow.com/q/26113169
type: Answer
has comment: http://stackoverflow.com/comment/40924701
has comment: http://stackoverflow.com/comment/40924772
has comment: http://stackoverflow.com/comment/40924857
answers question: http://stackoverflow.com/q/26113169
has body: may be use window.parent.Xrm.Page.data.entity.attributes or window.parent.Xrm.Page.getAttribute() instead of Xrm.Page.getAttribute();. see here:http://msdn.microsoft.com/en-in/library/gg328474.aspx
has comment: http://stackoverflow.com/comment/40924798
score: 0
has comment: http://stackoverflow.com/comment/40924811
has comment: http://stackoverflow.com/comment/40925569
type: AcceptedAnswer

http://stackoverflow.com/a/26061050
answers question: http://stackoverflow.com/q/26060235
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26060235
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40899835
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40899969
has body: You could try, controller = ActionController::Base.new controller.send(:render_to_string, '/shared/a2a_master_quantity') Whatever you pass to render_to_string above are params for that method. You may or may not need that leading '/' for '/shared'.

http://stackoverflow.com/q/26082615
has comment: http://stackoverflow.com/comment/40869178
favorite count: 0
has comment: http://stackoverflow.com/comment/40869370
upvote count: 2
has comment: http://stackoverflow.com/comment/40869443
has comment: http://stackoverflow.com/comment/40869477
accepted answer: http://stackoverflow.com/a/26082951
type: AnsweredQuestion
score: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40869666
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
has title: Right way to define multiple variables,arrays or something else?
has body: Sorry if question are little dumb,but I am totally noob with this. I write code,but I am not sure that I do this on right way. My code work, but it is not seam right to me. I need to save multiple values,that have something relationship between itself. For example I add at list mark of tv,size of screen and button to remove this from list. For this i use 3 arrays arrayName,arraySize and arrayButton. button have generates names butDel1,butDel2,butDel3,etc... i push values in arrayName with arrayName.push i do same for array size, and i generate buttons name with for loop. than i check is butDel in name,if is i copy number, and remove tv on number position if is butDel3 i remove name,and size on position3...etc... and than i again define button array with for that get all button names... In code it is doing something like this ( whole code is to big i wold write important part): First define of arrays var arrayName = []; var arraySize = []; var arrayButton = []; After that adding value: arrayName.push("toshiba"); arraySize.push("50 cm"); arrayName.push("samsung"); arraySize.push("80 cm"); arrayName.push("sony"); arraySize.push("55 cm"); Now i need to define button that have number of place in array. if (aarayButton.length &lt; arrayName.length) { arrayButton = []; for (y = 0; y &lt; arrayName.length; y++) { arrayButton.push("btnDel" + y.toString()); } } When i want to remove from array: if (event.target.id.indexOf("btnDel") != -1) { id = event.target.id.replace('btnDel', ''); arrayName.splice(id, 1); arraySize.splice(id, 1); Now i define again button array(that song wrong to me) if (aarayButton.length &lt; arrayName.length) { arrayButton = []; for (y = 0; y &lt; arrayName.length; y++) { arrayButton.push("btnDel" + y.toString()); } } for example i click on butDel1 i splice arrayName.splice(1, 1); (in this code "samsung") i generate button array again to have only butDel0 and butDel1,if i not do that i have butdel2 and not arrayname[2]. I am sure that for this better lo…
has comment: http://stackoverflow.com/comment/40869437
has answer: http://stackoverflow.com/a/26082951
has comment: http://stackoverflow.com/comment/40869511
answer count: 1

http://stackoverflow.com/comment/40984507
type: Comment
comment on: http://stackoverflow.com/a/26132917
has text: @harsh.prasad Everyone has a different level of understanding people. Just because yours wasn't as good as this one, doesn't mean I don't appreciate your answer - this one was just particularly more helpful.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26136782
tagged with: jquery
upvote count: 2
answer count: 2
accepted answer: http://stackoverflow.com/a/26136867
downvote count: 1
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/26140174
has answer: http://stackoverflow.com/a/26136867
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
score: 1
type: Question
possible better answer: http://stackoverflow.com/a/26140174
has body: I have the following code and Numbers inside the values : I want all of the codes below: Change to : Actually I want the values ​​to be empty and numbers inside the values placed the other ID in option like id="" or data-id="" or .... http://code.jquery.com/jquery-1.11.1.min.js function cascadeSelect(parent, child) { var childOptions = child.find('option:not(.static)'); child.data('options', childOptions); parent.change(function() { childOptions.remove(); child .append(child.data('options').filter('.sub_' + this.value)) .change(); }) childOptions.not('.static, .sub_' + parent.val()).remove(); } $(function() { cascadeForm = $('.cascadeTest'); orgSelect = cascadeForm.find('.orgSelect'); terrSelect = cascadeForm.find('.terrSelect'); locSelect = cascadeForm.find('.locSelect'); cascadeSelect(orgSelect, terrSelect); cascadeSelect(terrSelect, locSelect); }); Organization: Select an Organization Organization 1 Organization 2 Organization 3 Territory: - All Territories - Organization 1 - Territory 1 Organization 1 - Territory 2 Organization 2 - Territory 1 Organization 2 - Territory 2 Organization 3 - Territory 1 Organization 3 - Territory 2 Organization 3 - Territory 3 Location: - All Locations - Organization 1 - Territory 1 - Location 1 Organization 1 - Territory 1 - Location 2 Organization 1 - Territory 2 - Location 1 Organization 1 - Territory 2 - Location 2 Organization 2 - Territory 1 - Location 1 Organization 2 - Territory 1 - Location 2 Organization 2 - Territory 2 - Location 1 Organization 3 - Territory 1 - Location 1 Organization 3 - Territory 2 - Location 1 Organization 3 - Territory 3 - Location 1
has title: how to fix triple drop down menu?
tagged with: javascript

http://stackoverflow.com/q/26111281
has answer: http://stackoverflow.com/a/26559563
type: UnansweredQuestion
score: 5
has answer: http://stackoverflow.com/a/42367865
tagged with: css
answer count: 4
has answer: http://stackoverflow.com/a/48322888
tagged with: twitter
has answer: http://stackoverflow.com/a/49263403
has title: Twitter's Typeahead Limit not working
type: Question
has body: I have installed twitter's typeahead plugin but I can't get the limit to work. I placed it in two different positions: $('input.typeahead').typeahead({ limit: 5, hint: true, highlight: false, minLength: 1 }, { name: 'country', displayKey: 'value', source: substringMatcher(countries) And I also tried this: $('input.typeahead').typeahead({ hint: true, highlight: false, minLength: 1 }, { limit: 5, name: 'country', displayKey: 'value', source: substringMatcher(countries) The rest of my code: var substringMatcher = function (strs) { return function findMatches(q, cb) { var matches, substringRegex; // an array that will be populated with substring matches matches = []; // regex used to determine if a string contains the substring `q` substrRegex = new RegExp(q, 'i'); // iterate through the pool of strings and for any string that // contains the substring `q`, add it to the `matches` array $.each(strs, function (i, str) { if (substrRegex.test(str)) { // the typeahead jQuery plugin expects suggestions to a // JavaScript object, refer to typeahead docs for more info matches.push({ value: str }); } }); cb(matches); }; }; var countries = [ "United States", "United Kingdom", "Canada", "Andorra", "United Arab Emirates", "Afghanistan", "Antigua and Barbuda", "Anguilla", "Albania", "Armenia", "Angola", "Antarctica", "Argentina", "American Samoa", "Austria", "Australia", "Aruba", "Ã…land", "Azerbaijan", "Bosnia and Herzegovina", "Barbados", "Bangladesh", "Belgium", "Burkina Faso", "Bulgaria", "Bahrain", "Burundi", "Benin", "Saint BarthÃ©lemy", "Bermuda", "Brunei", "Bolivia", "Bonaire", "Brazil", "Bahamas", "Bhutan", "Bouvet Island", "Botswana", "Belarus", "Belize", "Cocos [Keeling] Islands", "Congo", "Central African Republic", "Republic of the Congo", "Switzerland", "Ivory Coast", "Cook Islands", "Chile", "Cameroon", "China", "Colombia", "Costa Rica", "Cuba", "Cape Verde", "Curacao", "Christmas Island", "Cyprus", "Czechia", "Germany", "Djibouti", "Denmark", "Dominica", "Dominican …
upvote count: 5
tagged with: javascript
tagged with: typeahead
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/40819579
type: Comment
score: 0
type: AnswerComment
has text: I want to know how to write the javascript code for the following html ?
comment on: http://stackoverflow.com/a/26054544

http://stackoverflow.com/q/26066671
score: 1
answer count: 1
has answer: http://stackoverflow.com/a/26066726
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40840236
favorite count: 0
has comment: http://stackoverflow.com/comment/40840183
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40841011
has comment: http://stackoverflow.com/comment/40840138
tagged with: node.js
has comment: http://stackoverflow.com/comment/40840229
has body: I am a newbie to javascript and trying to learn some basics. So I wrote a small script for file reading. Below is my code. // Load the fs (filesystem) module var fs=require('fs'); // Read the contents of the file into memory. fs.readFile('example.txt', function (err, logData) { // If an error occurred, throwing it will //display the exception and end our app. if(err) throw err; // logData is a Buffer, convert to string. var text = logData.toString(); var results = {}; var lines = text.split('\n'); lines.forEach(function(line){ var parts = line.split(' '); var letter = parts[1]; var count = parseInt(parts[2]); if (!results[letter]){ results[letter] = 0; } results[letter] +=parseInt(count); }); console.log(results); }); my input file is 2013-08-09T13:50:33.166Z A 2 2013-08-09T13:51:33.166Z B 1 2013-08-09T13:52:33.166Z C 6 2013-08-09T13:53:33.166Z B 8 2013-08-09T13:54:33.166Z B 5 Number of lines in example.txt is 5 wc -l example.txt 5 example.txt Executing the above code using Node.js results in node my_parser.js [ '2013-08-09T13:50:33.166Z A 2', '2013-08-09T13:51:33.166Z B 1', '2013-08-09T13:52:33.166Z C 6', '2013-08-09T13:53:33.166Z B 8', '2013-08-09T13:54:33.166Z B 5', '' ] { A: 2, B: 14, C: 6, undefined: NaN } When there are only five lines in the example.txt file? Why is an extra empty string added to the list? Is this expected from split function? Please help
upvote count: 1
has title: Javascript code returning undefined:Nan in the execution output?
type: Question
has comment: http://stackoverflow.com/comment/40840240

http://stackoverflow.com/comment/40799545
type: AnswerComment
has text: As i thought. The request is failing, meaning that your data is not returned.. I am not completely sure why, though. :/
type: Comment
comment on: http://stackoverflow.com/a/26044515
score: 1

http://stackoverflow.com/a/26153873
has body: its done working fiddle http://jsfiddle.net/maL943us/6/ google.load('visualization', '1', { 'packages': ['geochart'], 'callback': drawVisualization }); function drawVisualization() { var data = new google.visualization.DataTable(); data.addColumn('number', 'latitude'); data.addColumn('number', 'longitude'); data.addColumn('string', 'Country'); data.addColumn('number', 'Fans'); data.addColumn({ type: 'string', role: 'tooltip', 'p': {'html': true}//added html version }); data.addRow([14.38, -90.33, '', 229, 'Guatemala City!']);//added div tag with inline style data.addRow([38.8339, -104.8214, '', 500, ' Colorado Springs! ']); var options = {tooltip: {isHtml: true}};//added html version var chart = new google.visualization.GeoChart(document.getElementById('col_chart_html_tooltip')); chart.draw(data, options); }; html CSS (overriding custom tooltip styles with !important) .google-visualization-tooltip { border:solid 1px #000!important; border-radius: 2px; background-color: white; position: absolute; font-size: 12px; padding: 0px; margin:0!important; } .google-visualization-tooltip-item-list { list-style-type: none; margin: 0!important; padding: 0!important; } .google-visualization-tooltip-item:first-child { margin: 0!important; } .google-visualization-tooltip-item { margin: 0!important; padding: 0!important; }
accepted answer of: http://stackoverflow.com/q/26153005
score: 5
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26153005
upvote count: 5
type: Answer
downvote count: 0

http://stackoverflow.com/q/26167402
has comment: http://stackoverflow.com/comment/41024531
has comment: http://stackoverflow.com/comment/41027774
has comment: http://stackoverflow.com/comment/41024605
has comment: http://stackoverflow.com/comment/41024627
upvote count: 1
answer count: 1
has body: I need to send password containing special characters. For example: password containing abc+ ends up as abc(space) on the server side which is wrong, breaking the elephant ahead. The server is not guilty as I've checked the network and the angular does actually send to server 'abc ' with space instead of 'abc+'. So the issue is on the client side code. login: function (param) { var data, config = { headers: { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' }, ignoreAuthModule: 'ignoreAuthModule' }; data = 'j_username=' + param.username + '&amp;j_password=' + param.password + '&amp;_spring_security_remember_me=' + param.rememberMe + '&amp;submit=Login'; if (!angular.isUndefined(param.service)) { data += '&amp;service=' + param.service; } $http.post('app/authentication', data, config).success( function (data, status, headers, config) { $rootScope.registrationSuccess = false; $rootScope.authenticationError = false; $rootScope.userLocked = false; if (param.success) { param.success(data, status, headers, config); } } ) ... When I debug the code j_password actually has 'abc+'. Some of the configuration is wrong I guess. Help poor java developer pls.
favorite count: 0
tagged with: angularjs
has title: Can't send password containing special characters(replaced with space)
has comment: http://stackoverflow.com/comment/41042516
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41024698
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26167474
accepted answer: http://stackoverflow.com/a/26167474

http://stackoverflow.com/q/26051551
accepted answer: http://stackoverflow.com/a/26051656
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26051646
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26051646
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/26051656
type: Question
tagged with: javascript
has body: I am trying working on a few tests on a small game in Javascript. I want to make it so a button has a timeout for "X" seconds. I did this but it won't live update with the amount of time left. Javascript: function cd(button, x) { var ms = x * 1000; //Change the seconds to Milliseconds var oldValue = button.innerHTML; button.setAttribute('disabled', true); button.innerHTML = oldValue + " [" + x + "]"; setTimeout(function(){ button.innerHTML = oldValue; button.removeAttribute('disabled'); }, ms); } Function Call: cd(document.getElementById("click"), 5); HTML: Get a banana I tried to combine the two to make it so that it would update every second with setInterval for "x" seconds, but it won't work.
has title: Timer every second for a few seconds
answer count: 2

http://stackoverflow.com/comment/40962025
type: Comment
comment on: http://stackoverflow.com/a/26086823
score: 0
has text: @Raman you'll definitely want to check this out. After not finding this question I posted [my own](http://stackoverflow.com/a/26126797/1294804) on which Chris dropped an awesome [plunker link](http://plnkr.co/edit/nc5ebdDonDfxc1PjwEHp?p=preview) which demos our use case perfectly.
type: AnswerComment

http://stackoverflow.com/a/26073849
answers question: http://stackoverflow.com/q/26070419
has body: First thing: Your data is uneascaped, so if some html special char ("'&lt;> etc.) occurrs in the string it'll mess up your html. Second thing: You need apostrophes around your string and you need to add a comma after this.value: &lt;?php print "&lt;select name='sel_reg' id='testsel2' onchange=\"loaddiver('city', this.value, '".htmlentities($_REQUEST['data_loc'], ENT_QUOTES)."');\"&gt;"; ?&gt;
type: Answer
score: 0

http://stackoverflow.com/q/26134954
has comment: http://stackoverflow.com/comment/40977748
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40977465
linked to: http://stackoverflow.com/q/6974684
has comment: http://stackoverflow.com/comment/40977805
has body: I found this answer explaining how to use a FormData object to upload a file over ajax. I'm wondering if it's possible to rearrange the data structure that's sent over in the POST request. My backend is in rails, and the controller expects the data like this: xmlFile: { some_property: 1, attachment: [the file] } However, if I use a solution similar to the one from the above link, something like var data = new FormData(); data.append('some_property', id); data.append('source', file); (where file is a File object), and then submit that with $.ajax $.ajax({ url: url, data: data, processData: false, type: 'POST', contentType: 'multipart/form-data', mimeType: 'multipart/form-data' }); the form submits, but the data isn't namespaced under xmlFile. If I try to do something like $.ajax({ url: url, data: {xmlFile: data}, processData: false, type: 'POST', contentType: 'multipart/form-data', mimeType: 'multipart/form-data' }); it doesn't work. The request data just shows [object Object].
answer count: 0
has comment: http://stackoverflow.com/comment/40964112
type: Question
has title: Can I "namespace" an ajax POST request that uses FormData?
tagged with: javascript
score: 0
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/40955712
comment on: http://stackoverflow.com/a/26129701
type: AnswerComment
score: 0
type: Comment
has text: @TJ the comment about `width` depending on parent width is true; in the case of the ` `, there's only one parent. It's usually the case that the browser default is for the ` ` element to be 100% of the viewport width, so in that sense it works. In general though a % width value refers to the parent element, not always the viewport.

http://stackoverflow.com/a/26121144
type: Answer
has body: A Couchbase view can only operate on the document presented to it. As you discovered, it can only partially do what you want. The real problem isn't the view though but is your data model. You appear to have designed your data model as if you were using a relational database. The calculation you are attempting is a kind of join. A fundamental concept with document databases is that a document should represent all of the information pertinent to some kind of event. This concept is what allows document databases to horizontally scale. You should not worry about data duplication. Locality of access is the key to an appropriate map-reduce data model. I would redesign your data model.
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26095356
downvote count: 0

http://stackoverflow.com/comment/40953533
score: 0
type: Comment
has text: thanx buddy i got what i want
type: AnswerComment
comment on: http://stackoverflow.com/a/26124642

http://stackoverflow.com/q/26186765
tagged with: content-type
type: Question
has title: Set AJAX Content Type with plain JavaScript (No JQuery)
has comment: http://stackoverflow.com/comment/41060851
downvote count: 0
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/41061008
has comment: http://stackoverflow.com/comment/41060755
has comment: http://stackoverflow.com/comment/41060802
has comment: http://stackoverflow.com/comment/41060827
has comment: http://stackoverflow.com/comment/41061204
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26186826
has comment: http://stackoverflow.com/comment/41061300
has body: I'm working on form submission with AJAX but using plain JavaScript, no external libraries. I've been having a problem when it comes to parsing the form as the PHP doesn't seem to be parsing the data correctly. From some research on the internet, I've seen people set the content type to "false". The problem is however, they are are using JQuery to do this and I'm not sure how I do this in plain JavaScript. I am only submitting a file and my PHP processes forms uploaded the traditional way perfectly. The AJAX also seems to work flawlessly and I see no fault in the code. Here is my upload function. var fd = new FormData(); fd.append("upload-file", document.getElementById('upload-file').files[0]); var xhr = new XMLHttpRequest(); /* I add some event listeners here for progress, load, error, and abort */ xhr.open("POST", "upload.php"); xhr.send(fd);
accepted answer: http://stackoverflow.com/a/26186826
tagged with: php
type: AnsweredQuestion
score: 3
upvote count: 3
linked to: http://stackoverflow.com/q/24839009

http://stackoverflow.com/q/26158039
accepted answer: http://stackoverflow.com/a/26158097
has comment: http://stackoverflow.com/comment/41007867
type: Question
type: AnsweredQuestion
has title: new Date() - object is not a function
has body: I'm working in AngularJS, but I'm experiencing an error when working with dates. I currently have one Unix timestamp, and I need to find out if it is today. var start = new Date(); start.setHours(0,0,0,0); var end = new Date(); end.setHours(23,59,59,999); // Convert to Second/Unix Timestamp start = Math.round(start.getTime() /1000); end = Math.round(end.getTime() /1000); for (i = 0; i &lt; list.length; i++) { var date = Date.utcDateToTimestamp(list[i].date_utc); if(start &lt; date &amp;&amp; end &gt; date) console.log('this one is today'); } However, I'm getting an error in the console: TypeError: object is not a function I've looked into it, and it seems I can't even create a new Date object without this being thrown: var start = new Date(); Is this something really obvious, or..?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41006722
score: 0
has comment: http://stackoverflow.com/comment/41006896
answer count: 1
has comment: http://stackoverflow.com/comment/41006651
has answer: http://stackoverflow.com/a/26158097
has comment: http://stackoverflow.com/comment/41006840

http://stackoverflow.com/comment/58045319
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/34637436
has text: Do notice the lexical scoping here.
score: 1

http://stackoverflow.com/comment/40815863
has text: not able to understand clearly what you want and post html or fiddle link plz.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26053679

http://stackoverflow.com/comment/41070505
has text: @Rohil_PHPBeginner...the correct way to do this is via **functions.php**
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26192087

http://stackoverflow.com/a/26077036
upvote count: 2
has body: Don't call initialize() function on document load, write document.addEventListener('deviceready', onDeviceReady, false); outside of function, after writing the onDeviceReady method will be called when device is ready that time you will not get any error. as &lt;script&gt; document.addEventListener('deviceready', onDeviceReady, false); function onDeviceReady(e){ window.requestFileSystem(LocalFileSystem.TEMPORARY, 0, onSuccess, errorHandler); } function onSuccess(fs){ fs.root.getFile('log.txt',{},function(fileEntry){console.log('the file is: ' + fileEntry.isFile);},errorHandler); fs.root.getDirectory('MyPictues',{},function(dirEntry){if(!dirEntry.isDirectory){console.log('My Pictures is not a directory');} else {console.log('My Pictures is a directory');}},errorHandler); } function errorHandler(e) { var msg = ''; switch (e.code) { case FileError.QUOTA_EXCEEDED_ERR: msg = 'QUOTA_EXCEEDED_ERR'; break; case FileError.NOT_FOUND_ERR: msg = 'NOT_FOUND_ERR'; break; case FileError.SECURITY_ERR: msg = 'SECURITY_ERR'; break; case FileError.INVALID_MODIFICATION_ERR: msg = 'INVALID_MODIFICATION_ERR'; break; case FileError.INVALID_STATE_ERR: msg = 'INVALID_STATE_ERR'; break; default: msg = 'Unknown Error'; break; }; console.log('Error: ' + msg); } &lt;/script&gt;
has comment: http://stackoverflow.com/comment/40869502
answers question: http://stackoverflow.com/q/26075918
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/comment/41034778
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26172902
has text: Have you also put onclick="calcBody()" on your input button?

http://stackoverflow.com/comment/40974577
has text: Which db? If Postgres, you can use st_asjson and return geojson from your server using java, php, whatever as (geo)json can be converted very easily to open layers features.
score: 0
comment on: http://stackoverflow.com/q/26138416
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26171875
score: 0
tagged with: django
answer count: 1
has comment: http://stackoverflow.com/comment/41033838
has comment: http://stackoverflow.com/comment/41033673
has comment: http://stackoverflow.com/comment/41034014
has answer: http://stackoverflow.com/a/26172540
type: AnsweredQuestion
has body: I am new to django. From my findings, I tried this way, but didn't work. &lt;script type="text/javascript" &gt; var data = {{json}} &lt;/script&gt; I am trying to use data table from this website, http://www.datatables.net/manual/data. &lt;script type="text/javascript" class="init"&gt; var temp = ''; // should be a list, but becomes a string alert(typeof temp) $(document).ready( function () { $('#campaigns').DataTable({ data: temp, columns: [ { data: 'id' }, { data: 'name' }, { data: 'date' }, ] }); } ); &lt;/script&gt; When I check the type before passing into datatable, the type becomes string. I also tried without quote, but didn't work. Any suggestion? Thanks.
tagged with: javascript
has title: Python Django: Pass json from view to javascript in template
type: Question
tagged with: python
accepted answer: http://stackoverflow.com/a/26172540
tagged with: list

http://stackoverflow.com/q/26122401
has title: how can one use css properties like border-radius with transitionables
has body: I've gone through all of the documentation, guides and famo.us university. I get all the concepts, but it seems that famo.us only allows use of transitionables on a small subset of properties of a renderable. Is there something I'm missing, or is this actually not possible? Is this in the roadmap? If both answers above are no, is there a clever way to do this that I'm not thinking of? Thanks!!
has answer: http://stackoverflow.com/a/26123106
type: AnsweredQuestion
downvote count: 0
tagged with: famo.us
score: 1
type: Question
tagged with: javascript
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/26123106
favorite count: 0

http://stackoverflow.com/q/26070386
type: UnansweredQuestion
tagged with: three.js
has title: Head-coupled/Off-axis perspective in Three.js
score: 3
tagged with: camera
has answer: http://stackoverflow.com/a/26196721
upvote count: 3
has answer: http://stackoverflow.com/a/26197115
type: Question
tagged with: perspective
downvote count: 0
tagged with: javascript
has body: I'm trying to achieve a permanent head-coupled perspective without using the full headtrackr library. My head won't be moving, but it won't be directly in front of the screen. I have a little demo that you can download and run with python -m SimpleHTTPServer 8000 The code is adapted from mainly this headtrackr example and part of the headtrackr source My expectations are based off this diagram: In the third image, I imagine slightly swiveling my monitor counter-clockwise from above. This should be equivalent to reducing Z and making X less than zero. I expect my monitor to show the middle image, but instead I see something like this: I think the "window" I'm looking through is the XY-plane, but shouldn't it stretch like the middle orange rectangle in the first diagram? Here's another window that stays fixed: http://kode80.com/2012/04/09/holotoy-perspective-in-webgl/ to see what I mean by "window." Are off-axis perspective and head-tracking unrelated? How do I get a convincing illusion of off-axis perspective in THREE.js?
answer count: 3
has answer: http://stackoverflow.com/a/26556368
favorite count: 0

http://stackoverflow.com/q/26170865
tagged with: javascript
has body: I used snowfall.jquery.min.js JQuery-Snowfall github It work on all browser except Safari It show snows or images if I use images, but no movement. Here is my code: Some text here Update Safari highlight this as an error snowTimeout = requestAnimationFrame(function(){snow()}); snowfall.jquery.js:305ReferenceError: Can't find variable: requestAnimationFrame /* ERROR HERE*/
score: 2
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: safari
has title: jQuery works in all browser but not in Safari - jQuery-Snowfall
answer count: 0
upvote count: 2
type: Question

http://stackoverflow.com/q/26168657
score: 0
has comment: http://stackoverflow.com/comment/41026858
has comment: http://stackoverflow.com/comment/41026879
answer count: 1
has comment: http://stackoverflow.com/comment/41026833
has answer: http://stackoverflow.com/a/26169009
has comment: http://stackoverflow.com/comment/41026809
has body: I have this JS var invoice = 1; var orders = [ [{ "invoice": "1", "article": "Coca Cola", "qty": "5", "active": "Yes" }, { "invoice": "1", "article": "Fanta", "qty": "10", "active": "Yes" }, { "invoice": "1", "article": "Sprite", "qty": "40", "active": "Yes" },{ "invoice": "1", "article": "Coca Cola", "qty": "40", "active": "Yes" }], [{ "invoice": "2", "article": "Coca Cola", "qty": "55", "active": "Yes" }, { "invoice": "2", "article": "Fanta", "qty": "10", "active": "Yes" }] ]; var msg = "&lt;div id=results&gt;" + results + "&lt;/div&gt;"; and final results in html to look like this lets say for invoice 1, to count all articles with same name all its qty, and display that article name with total amount of the qty. Here is html how it need to be display? &lt;div id="results"&gt; &lt;div class="each"&gt; &lt;input value="Coca Cola"&gt;&lt;input value="45"&gt; &lt;/div&gt; &lt;div class="each"&gt; &lt;input value="Fanta"&gt;&lt;input value="10"&gt; &lt;/div&gt; &lt;div class="each"&gt; &lt;input value="Sprite"&gt;&lt;input value="40"&gt; &lt;/div&gt; On Coca Cola i have to display countet values of qty? I have starded a working fiddle, but as you may see i have stucked at start.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41027141
has title: Display data from object jquery?
has comment: http://stackoverflow.com/comment/41026932
accepted answer: http://stackoverflow.com/a/26169009
has comment: http://stackoverflow.com/comment/41026920
type: Question
tagged with: arrays
has comment: http://stackoverflow.com/comment/41026812
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41026867

http://stackoverflow.com/q/26084879
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40874154
has body: this is my javascript code here i am unable to disable the textbox(id="due_Date") when i get the zero or negative amount in text feild (id="subtotal_input")...any help would be appreciated.... &lt;script&gt; window.onload = function() { document.getElementById('subtotal_input').onchange = disablefield; document.getElementById('phone_no').onchange = disablefield; document.getElementById('phone_yes').onchange = disablefield; } function disablefield() { if ( document.getElementById('subtotal_input').value &lt;= 0 ) { document.getElementById('due_Date').value = ''; document.getElementById('due_Date').disabled = true } if ( document.getElementById('phone_no').checked == true ) { document.getElementById('ReturnDate').value = ''; document.getElementById('ReturnDate').disabled = true} else if (document.getElementById('phone_yes').checked == true ){ document.getElementById('ReturnDate').disabled = false; } }
has title: to disable required field validator
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40874625
has comment: http://stackoverflow.com/comment/40873459
favorite count: 0
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26085813
accepted answer: http://stackoverflow.com/a/26085813
upvote count: 1

http://stackoverflow.com/a/26050325
score: 4
accepted answer of: http://stackoverflow.com/q/26049869
upvote count: 4
answers question: http://stackoverflow.com/q/26049869
has comment: http://stackoverflow.com/comment/40812764
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40833284
downvote count: 0
has body: On a hunch, I tried changing my Windows time zone to: TZ Key / ID: "E. Europe Standard Time" Display name: "(UTC+02:00) E. Europe" After restarting Chrome, I was then able to get the same thing you showed: Taking a closer look, at the localization properties: So it would seem that there is no time zone understood by Chrome. This is because Chrome uses ICU, which uses the CLDR mappings for Windows time zones. That particular time zone is now considered "unmappable" - as there is no IANA time zone identifier that matches this Windows zone. Note that this zone used to be mapped to Asia/Nicosia, but it was changed in the last revision of CLDR, as described in CLDR #6973 The reason for the discrepancy is that the toLocaleString function uses the ECMAScript Internationalization API, while toString does not. The prior is dependent on ICU and CLDR, while the latter just asks the OS for a time zone string. The fix is for the user to switch their time zone to the correct setting. For Cyprus, it should be: TZ Key / ID: "GTB Standard Time" Display name: "(UTC+02:00) Athens, Bucharest" When looking at the options in the Windows Time Zone Control Panel: Be sure to close all Chrome windows completely after making the time zone change, as Chrome will not properly initialize time zones until it is restarted. Now, the issue I mentioned earlier in comments is still a problem, as Intl.DateTimeFormat().resolvedOptions().timeZone now returns Europe/Kiev, and it should return either Asia/Nicosia, or Europe/Bucharest. But it is good enough to return the correct value for toLocaleString - at least most of the time.
type: Answer

http://stackoverflow.com/a/26220139
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26166408
answers question: http://stackoverflow.com/q/26166408
type: Answer
has body: The solution was a mixture of everything already mentioned. pointer-events: none stopped the scroll getting stuck, but prevented the dragging option from working. The answer was to add pointer-events: none to the draggable element only when the column wasn't scrolling. Monitoring the scroll event (without mouseclick) was easy, but I used the jQuery debounce to detect when scrolling had stopped. scrollers.scroll($.debounce( 250, function(){ // Re-enable drag event $(this).next('.decadeHeader').css('pointer-events', 'auto'); })); Simple solution and works a treat!
downvote count: 0

http://stackoverflow.com/q/26059837
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/26059908
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/26059946
type: Question
has comment: http://stackoverflow.com/comment/40827142
tagged with: javascript
has body: <?PHP foreach($pscBetraege as $pscs) { echo' '.$pscs.' '; } ?> I want that when the select id="guitatype" value is changed to "PayPal" the site redirects the user to ex: stackoverflow.com , but those scripts don't work. Print .png here
answer count: 2
has comment: http://stackoverflow.com/comment/40826912
downvote count: 0
has title: PHP JavaScript - Redirect when a select is changed
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/26107125
tagged with: function
has answer: http://stackoverflow.com/a/67138886
tagged with: addeventlistener
tagged with: javascript
has answer: http://stackoverflow.com/a/76838981
has answer: http://stackoverflow.com/a/68836300
has answer: http://stackoverflow.com/a/30063375
has answer: http://stackoverflow.com/a/78787415
has answer: http://stackoverflow.com/a/71565543
has comment: http://stackoverflow.com/comment/40913948
favorite count: 0
has answer: http://stackoverflow.com/a/48035659
has comment: http://stackoverflow.com/comment/112559941
has answer: http://stackoverflow.com/a/34281265
has answer: http://stackoverflow.com/a/57302328
linked to: http://stackoverflow.com/q/2414750
has answer: http://stackoverflow.com/a/73360492
has answer: http://stackoverflow.com/a/66997586
tagged with: getelementbyid
has answer: http://stackoverflow.com/a/60147465
has body: I have to use vanilla JavaScript for a project. I have a few functions, one of which is a button that opens a menu. It works on pages where the target id exists, but causes an error on pages where the id doesn't exist. On those pages where the function cannot find the id, I receive a "Cannot read property 'addEventListener' of null " error and none of my other functions work. Below is the code for the button that opens the menu. function swapper() { toggleClass(document.getElementById('overlay'), 'open'); } var el = document.getElementById('overlayBtn'); el.addEventListener('click', swapper, false); var text = document.getElementById('overlayBtn'); text.onclick = function(){ this.innerHTML = (this.innerHTML === "Menu") ? "Close" : "Menu"; return false; }; How do I deal with this? I probably need to all wrap this code in another function or use an if/else statement so that it only searches for the id on specific pages, but not sure exactly.
upvote count: 250
has comment: http://stackoverflow.com/comment/40913993
has answer: http://stackoverflow.com/a/69492738
has title: Cannot read property 'addEventListener' of null
possible better answer: http://stackoverflow.com/a/34281265
has answer: http://stackoverflow.com/a/73979740
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/72953787
has answer: http://stackoverflow.com/a/67856104
has answer: http://stackoverflow.com/a/26107174
has comment: http://stackoverflow.com/comment/63504940
has answer: http://stackoverflow.com/a/26107421
has answer: http://stackoverflow.com/a/59786423
has answer: http://stackoverflow.com/a/73392419
has answer: http://stackoverflow.com/a/41299524
has answer: http://stackoverflow.com/a/47992767
has answer: http://stackoverflow.com/a/61721820
downvote count: 1
type: Question
answer count: 28
has answer: http://stackoverflow.com/a/73109684
has answer: http://stackoverflow.com/a/32371727
has answer: http://stackoverflow.com/a/49218639
has comment: http://stackoverflow.com/comment/119638805
has comment: http://stackoverflow.com/comment/121250340
linked to: http://stackoverflow.com/q/1760250
score: 249
has comment: http://stackoverflow.com/comment/132420157
accepted answer: http://stackoverflow.com/a/26107174
has answer: http://stackoverflow.com/a/60798553
has answer: http://stackoverflow.com/a/32164615

http://stackoverflow.com/q/26071019
has title: javascript uncaught reference error onclick
has comment: http://stackoverflow.com/comment/40848052
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40848151
favorite count: 0
accepted answer: http://stackoverflow.com/a/26071080
upvote count: 7
type: AnsweredQuestion
has body: Trying to call a javascript function with a button, and the button is not doing anything on click. The debugger returns "uncaught reference error: printNumber is not defined. printNumber is the function I want to call. I did a search and most people with this problem did not use the proper syntax for declaring their function, defined their function within another function (function out of scope), or put their functions after they are called. It turns out nothing in my head is running. I tried to put a prompt in it for example, and the prompt did not show up. Here is my script: Here is my HTML: The number of times the button has been clicked is ... Can anybody point out to me where the problem is coming from? Thank you, this is for a programming class, and I hope that others who might also encounter this will see this.
has comment: http://stackoverflow.com/comment/40848086
tagged with: onclick
score: 7
has comment: http://stackoverflow.com/comment/40848043
type: Question
has answer: http://stackoverflow.com/a/26071080
tagged with: function
downvote count: 0
tagged with: button
tagged with: javascript

http://stackoverflow.com/q/26165283
type: Question
tagged with: angular-ui-router
has title: Pass data to Angular UI Router not changing when state change
has answer: http://stackoverflow.com/a/27453634
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/41021610
has comment: http://stackoverflow.com/comment/41021973
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41023096
has answer: http://stackoverflow.com/a/26167793
has comment: http://stackoverflow.com/comment/41023152
score: 0
has comment: http://stackoverflow.com/comment/41022388
has body: I want to pass different data to each state while using angular-ui-router. Though am able to pass data, its not changing when the route change. For example see code below: .config(function($stateProvider, $urlRouterProvider) { $stateProvider // route to show main page with satisfied/unsatisfied .state('main', { url: '/main', templateUrl: 'container.html', controller: 'formController', }) .state('main.happy', { url: '/happy', data: { happy: true }, templateUrl: 'happy.html', }) .state('main.sad', { url: '/sad', data: { happy: false }, templateUrl: 'welcome.html' }) // catch all route $urlRouterProvider.otherwise('/main'); }) In the above code when I goto path /happy, I can see the data is being taken, but when I goto the path /sad the data is not changing. While the value of happy have to false in the case of path /sad its still remains otherwise. It's only when I refresh the data is changing. Which defeats the whole purpose by I am using Angular.

http://stackoverflow.com/a/26173396
accepted answer of: http://stackoverflow.com/q/26173249
type: Answer
has comment: http://stackoverflow.com/comment/41057264
answers question: http://stackoverflow.com/q/26173249
has comment: http://stackoverflow.com/comment/41058464
has body: $(function(){ $(".dropdown-menu li a").click(function(){ $(this).parents('.dropdown').children('.btn').text($(this).text()); $(this).parents('.dropdown').children('.btn').val($(this).text()); }); }); Select a Forward To Action Another action Something else here Select a Manufacturing contact Action Another action Something else here in you click event: $(this).parents(".dropdown").children(".btn").text($(this).text()); possible to.replace children to find
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41040182
has comment: http://stackoverflow.com/comment/41057026
score: 0
has comment: http://stackoverflow.com/comment/41050658
has comment: http://stackoverflow.com/comment/41039769
has comment: http://stackoverflow.com/comment/41039736

http://stackoverflow.com/a/26072094
score: 4
type: AcceptedAnswer
type: Answer
upvote count: 4
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26071891
has body: In JavaScript, this creates a sparse array: var a = new Array(3) // a = [ , , ,] if you try to iterate over a using map or forEach, JavaScript skips the holes. The invocation var b = Array.apply(null, Array(3)) // b = [undefined, undefined, undefined] (this is equivalent to invoking the array constructor with Array(undefined, undefined, undefined)) creates a dense array b. b is almost the same as a but now, you can iterate over the elements, in other words, since the array is now dense, map and foreach don't skip over elements.
answers question: http://stackoverflow.com/q/26071891
has comment: http://stackoverflow.com/comment/40869538

http://stackoverflow.com/comment/64897377
type: AnswerComment
type: Comment
has text: Not until you mentioned it ;) That seems to have done the trick. It's still returning measurements that are a little higher than reported elsewhere (Google Maps/Wikipedia) but if anything maybe it's too accurate? A colleague directed me towards this article: https://en.wikipedia.org/wiki/Coastline_paradox which explains the problem so I'm considering some kind of smoothing method and don't know if you could suggest something but thanks for the hint!
comment on: http://stackoverflow.com/a/30274533
score: 0

http://stackoverflow.com/q/26097492
has title: Opening Times List To Highlight Day
has body: I've got a list of opening times: Mon 09:00 - 17:00 Tue 09:00 - 17:00 etc I'd like to know if anyone can tell me where I can find tutorials on how to highlight the opening times for the day we are on. IE On Tuesday the line Tue 09:00 - 17:00 would be in green and the rest in the normal font colour. Any help appreciated, I tend to find articles about calendars, which isn't what I want. Cheers
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26097798
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26097798
has comment: http://stackoverflow.com/comment/40896312
has comment: http://stackoverflow.com/comment/40896238
possible better answer: http://stackoverflow.com/a/26097771
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26097771
answer count: 2
upvote count: 0
favorite count: 0
tagged with: css

http://stackoverflow.com/comment/41062255
comment on: http://stackoverflow.com/a/26173489
score: 0
type: AnswerComment
type: Comment
has text: I don't own a 4k phone, could you upload or link a image so I could understand? Have you tried using the media in the image to choose based on width?

http://stackoverflow.com/q/26052699
upvote count: 30
type: Question
tagged with: ecmascript-6
has answer: http://stackoverflow.com/a/59581864
has body: So what is the difference between this two functions? They both create new Array object. Only difference I found so far is that Array.from supports ArrayLike parameters. I don't see any reason why they just haven't added ArrayLike support for Array.prototype.map function. Am I missing something?
tagged with: javascript
favorite count: 0
has title: Array.from vs Array.prototype.map
answer count: 4
score: 30
downvote count: 0
has answer: http://stackoverflow.com/a/26053046
accepted answer: http://stackoverflow.com/a/26053046
has answer: http://stackoverflow.com/a/37307442
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26053031
possible better answer: http://stackoverflow.com/a/37307442

http://stackoverflow.com/comment/41112216
has text: yes. When i tried the app over the phonepag server in worked fine. but in the build android app this dont work
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26161742

validation
tags question: http://stackoverflow.com/q/26139321
tags question: http://stackoverflow.com/q/26190047
tags question: http://stackoverflow.com/q/26140321
tags question: http://stackoverflow.com/q/26140940
tags question: http://stackoverflow.com/q/26039213
tags question: http://stackoverflow.com/q/26043196
tags question: http://stackoverflow.com/q/26154596
tags question: http://stackoverflow.com/q/26059274
tags question: http://stackoverflow.com/q/26099675
tags question: http://stackoverflow.com/q/26120951
tags question: http://stackoverflow.com/q/26100852
tags question: http://stackoverflow.com/q/26096847
tags question: http://stackoverflow.com/q/26085462
tags question: http://stackoverflow.com/q/26192985
tags question: http://stackoverflow.com/q/26128172
tags question: http://stackoverflow.com/q/26119474
tags question: http://stackoverflow.com/q/26049299
tags question: http://stackoverflow.com/q/26124959
type: Tag
tag name: validation
tags question: http://stackoverflow.com/q/26153910
tags question: http://stackoverflow.com/q/26063584
tags question: http://stackoverflow.com/q/26043295
tags question: http://stackoverflow.com/q/26157974
tags question: http://stackoverflow.com/q/26103231
tags question: http://stackoverflow.com/q/26037446
tags question: http://stackoverflow.com/q/26165173
tags question: http://stackoverflow.com/q/26179002
tags question: http://stackoverflow.com/q/26105146
tags question: http://stackoverflow.com/q/26158837
tags question: http://stackoverflow.com/q/26094802
tags question: http://stackoverflow.com/q/26054814
tags question: http://stackoverflow.com/q/26153230
tags question: http://stackoverflow.com/q/26155866
tags question: http://stackoverflow.com/q/26167363
tags question: http://stackoverflow.com/q/26078541
tags question: http://stackoverflow.com/q/26087804
tags question: http://stackoverflow.com/q/26059172
tags question: http://stackoverflow.com/q/26099241
tags question: http://stackoverflow.com/q/26099136
tags question: http://stackoverflow.com/q/26059922
tags question: http://stackoverflow.com/q/26036139
tags question: http://stackoverflow.com/q/26063293
tags question: http://stackoverflow.com/q/26125258
tags question: http://stackoverflow.com/q/26188570
tags question: http://stackoverflow.com/q/26170572
tags question: http://stackoverflow.com/q/26102626
tags question: http://stackoverflow.com/q/26167836
tags question: http://stackoverflow.com/q/26075028
tags question: http://stackoverflow.com/q/26099178
tags question: http://stackoverflow.com/q/26058157
tags question: http://stackoverflow.com/q/26063606
tags question: http://stackoverflow.com/q/26149620
tags question: http://stackoverflow.com/q/26124991
tags question: http://stackoverflow.com/q/26064414
tags question: http://stackoverflow.com/q/26144337
tags question: http://stackoverflow.com/q/26092223
tags question: http://stackoverflow.com/q/26050863
tags question: http://stackoverflow.com/q/26146991

aem
tags question: http://stackoverflow.com/q/26122214
type: Tag
tag name: aem
tags question: http://stackoverflow.com/q/26102239

servlets
tags question: http://stackoverflow.com/q/26116627
tags question: http://stackoverflow.com/q/26182150
tags question: http://stackoverflow.com/q/26097953
tags question: http://stackoverflow.com/q/26134252
tags question: http://stackoverflow.com/q/26073327
tag name: servlets
type: Tag
tags question: http://stackoverflow.com/q/26059060

http://stackoverflow.com/q/26056400
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26400306
tagged with: css
has title: How to make relative position work like fixed position on iPhone?
upvote count: 3
has comment: http://stackoverflow.com/comment/40821509
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40949053
score: 3
has comment: http://stackoverflow.com/comment/40955403
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has body: I have a top navbar which I keep fixed to top using JavaScript. $(window).scroll(function() { $('#nav').css({top: $(window).scrollTop()}); }); My nav I have a problem on my iPhone because when I scroll down the nav disappears and after that when I take off my finger from the touchscreen the nav appears again. I tried to use touchstart, touchmove, and touchend events to trigger between fixed/relative position for my nav but it still doesn't work right. (The thing is that when I don't touch the screen with my finger, the nav should be relative) Is there any other way to fix this problem without using position: fixed?

http://stackoverflow.com/q/26140177
tagged with: css
answer count: 4
score: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/70525864
type: Question
has answer: http://stackoverflow.com/a/26141487
has title: Add class to element when scrolled into view (scrollable div)
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26140359
upvote count: 4
has comment: http://stackoverflow.com/comment/40973431
downvote count: 0
possible better answer: http://stackoverflow.com/a/26141213
has answer: http://stackoverflow.com/a/26141213
favorite count: 0
has body: Is there a solution for adding a class to the element in view when scrolling, and removing when out of view? This needs to work for a scrollable div. I have found a few solutions so far but they only seem to work for body... not a scrollable div. I am happy to use a plugin if you know one exists. Something like this... if ($('.journal-slider .each-slide img').inViewport() ) { $(this).addClass('in-view'); } else { $('.journal-slider .each-slide img').removeClass('in-view'); } Thanks, R
accepted answer: http://stackoverflow.com/a/26140359
tagged with: http://stackoverflow.com/tag/html

html-table
tags question: http://stackoverflow.com/q/26184415
tag name: html-table
tags question: http://stackoverflow.com/q/26047448
tags question: http://stackoverflow.com/q/26144841
type: Tag
tags question: http://stackoverflow.com/q/26180431
tags question: http://stackoverflow.com/q/26045049

http://stackoverflow.com/comment/40999948
has text: @jfriend00 Agreed. I was just pointing out what jsLint thinks about code like this :-)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26154178
type: Comment

http://stackoverflow.com/q/26179521
linked to: http://stackoverflow.com/q/14167863
type: Question
tagged with: d3.js
tagged with: css
score: 4
has answer: http://stackoverflow.com/a/26179692
has body: This is my first attempt with d3.js and I am having small problem with the d3-tip function. A picture is worth a thousand words so here is my issue. d3-tips were working fine until I put my graph inside of a modal. I have tried css z-index as part of the d3-tip style: .d3-tip { line-height: 1; font-weight: bold; padding: 12px; background: rgba(0, 0, 0, 0.8); color: #fff; border-radius: 2px; z-index: 1; } This didn't have any effect and in my limited css knowledge I think that the z-index is still using my main body as the relational key. Here is my var tip setup: var tip = d3.tip() .attr('class', 'd3-tip') .offset([-10, 0]) .html(function(d) { return "Date: " + d.date + " Time: " + d.time + " Around: " + d.timeGroup + ""; }); Here is my modal: X I have also tried following the suggestions on this post. Is there any way to bring the tip to front with my current setup? Thanks!
answer count: 1
has title: D3-tip behind graph when in modal
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26179692
upvote count: 4
has comment: http://stackoverflow.com/comment/41046658
type: AnsweredQuestion
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/26136026
has title: Javascript dynamic input mask
accepted answer: http://stackoverflow.com/a/26136520
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/40966465
type: Question
score: 0
answer count: 1
has body: I'm wondering if there is a plugin which will be setting mask to the input, depending on which I have already input there. For example if I set mask of an input to numbers from 0-4, and then write '1' to the input, I want be able to write only '0', '2', '3', '4'. I have already tried following mask plugins: http://digitalbush.com/projects/masked-input-plugin/ but I only can achieve that, the whole input clear after write character, or the caret goes to the back of the input, or I'm not able to write anything. Here is my attempts to achieve what I want: jQuery.mask.definitions['x'] = '[123456789]'; jQuery('#inputLabel').mask("x, x, x, x, x, x, x"); and if I input something to the input I tried this: setting mask one more time jQuery.mask.definitions['x'] = returnDistinctTab(); //returnDistinctTab return tab without character which I have already input to the input. var text = jQuery("#inputLabel").val(); text.replace('_', 'x'); jQuery('#inputLabel').mask('text'); If someone have an idea what I'm doing wrong, or knows mask which will be suitable for my case, I will be very grateful!!
tagged with: jquery
has answer: http://stackoverflow.com/a/26136520
has comment: http://stackoverflow.com/comment/40966592

http://stackoverflow.com/comment/41002218
type: AnswerComment
comment on: http://stackoverflow.com/a/26155416
has text: The problem is in fact, that you added it in _testing purpose_, but people will use it in their code without any doubts. And when someone asks them why do they use this bad thing, they will say: "George Garchagudashvili told us to do it this way" :)
type: Comment
score: 0

http://stackoverflow.com/comment/41005002
type: AnswerComment
type: Comment
has text: Its only drawback is that, as I said, it is hardwired to work with a single object only. I could make the solution better to decode as many objects are passed in the string, but this is beyond the scope of the problem posed, so I did not.
comment on: http://stackoverflow.com/a/26139229
score: 0

http://stackoverflow.com/comment/41060818
type: QuestionComment
comment on: http://stackoverflow.com/q/26181833
has text: Okay, after significant research, I think I found out the issue. So, the thing that causes this issue, is an element I'm trying to append from the original window to a new window. I set that element to detach and append to a newly created div element and apparently IE doesn't like to append original elements. As per here: http://bugs.jquery.com/ticket/8010
score: 0
type: Comment

http://stackoverflow.com/comment/40961418
comment on: http://stackoverflow.com/a/26133388
type: Comment
type: AnswerComment
has text: @Cheery is correct, no library
score: 0

http://stackoverflow.com/q/26141229
favorite count: 0
linked to: http://stackoverflow.com/q/111368
has comment: http://stackoverflow.com/comment/40975505
has comment: http://stackoverflow.com/comment/40975531
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/784929
has comment: http://stackoverflow.com/comment/40976997
has comment: http://stackoverflow.com/comment/40975544
has comment: http://stackoverflow.com/comment/40975573
has comment: http://stackoverflow.com/comment/40975551
answer count: 0
has comment: http://stackoverflow.com/comment/104035794
score: 7
has comment: http://stackoverflow.com/comment/40975665
has title: !! (not not) vs Boolean() performance
has comment: http://stackoverflow.com/comment/40980511
upvote count: 8
type: Question
has comment: http://stackoverflow.com/comment/101770562
has body: I came across the !! (not not) operator in javascript as a way of converting a falsy/truthy value to inverted true/valse and then invert it to get the corresponding true/false. So apparently !!("something") and Boolean("something") are the same. Are there any differences between them? Which one is the preferred one? I found some related questions ( What is the !! (not not) operator in JavaScript?) but they don't seem to address performance. I hope this is not a duplicate.
tagged with: javascript
has comment: http://stackoverflow.com/comment/40980624
duplicate of: http://stackoverflow.com/q/111368
has comment: http://stackoverflow.com/comment/40975565
downvote count: 1
has comment: http://stackoverflow.com/comment/40975646

http://stackoverflow.com/q/26091836
score: 12
has comment: http://stackoverflow.com/comment/40886336
has comment: http://stackoverflow.com/comment/40906160
has title: Is there a way to read image metadata using node.js
has comment: http://stackoverflow.com/comment/40906235
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26105697
upvote count: 12
has comment: http://stackoverflow.com/comment/40907635
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has body: Does any one know of a way that I can read file metadata using node.js? For example, I want to read the 'comment' attribute on the 'details' tab of a jpeg file (on a Windows machine). See image below to understand what it is I am trying to read from the file's metadata.
tagged with: node.js
accepted answer: http://stackoverflow.com/a/26105697

http://stackoverflow.com/comment/40923620
type: QuestionComment
has text: Hi @mishik what should I do to put the images and thumbnails into one folder? without large and small folder. Thank you
score: 0
comment on: http://stackoverflow.com/q/26112689
type: Comment

http://stackoverflow.com/comment/40935574
comment on: http://stackoverflow.com/q/26119035
has text: Once you get it on the client side, there is no point in reducing. It's even more CPU/memory intensive to reduce it.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/26123519
has comment: http://stackoverflow.com/comment/40952196
has comment: http://stackoverflow.com/comment/40953034
downvote count: 5
answers question: http://stackoverflow.com/q/26120838
type: Answer
has body: By default, i think it is good to limit the framerate to 60Hz, since : • High framerate means more heat, so the (cpu) fan noise will be annoying. • For most game nobody will notice. • it's easy to do. • For those with ecological concerns, high fps uses more power (==> more CO2). About the visual interest of 120 Hz : For 2D games where only a tiny amount of the screen is actually changed between each frame it's of little to no interest. For 3D games, especially those targeting to be realistic, using 120Hz allows to get a more 'cinema'-like experience. Why ? ==> Most 3D renderers only render a scene at a point in time, so what you see is a succession of 'perfect' still images. On the other hand, a real camera will -like the human eye- be kept open for a few milliseconds, thus the moves happening during this time will leave a trail on the image, providing a more true to life experience. The 60Hz boundary is only enough to fool the eye about the motion, so what the 120Hz+ screen brings is that the screen is so fast eye remanence cannot follow and you have again that camera/eye trail effect. The code looks like : var minFrame = 13; var maxFrame = 19; var typicalFrame = 16; var gameTime = 0; var lastDrawTime = -1; animate(drawTime) { requestAnimationFrame(animate); var dt = drawTime - lastDrawTime; lastDrawTime = drawTime ; if (dt&lt;minFrame) return; if (dt&gt;maxFrame) dt=typicalFrame; // in case of a tab-out gameTime+=dt; // ... } function lauchAnimation() { requestAnimationFrame ( function(t) { lastDrawTime = t; requestAnimationFrame(animate); } ); } Rq1 : When you limit the fps, you must take care of the fact that the frame rate is not stable at all in a Browser. So even with an application doing nothing, on a 60Hz screen, has frame duration that can go from 14ms to 19ms. (!!!!) So you must take some margin when capping the frame rate to some value. Rq2 : In the example above 'typicalFrame' is to be replaced by the native screen frame rate (that you have to compute b…
has comment: http://stackoverflow.com/comment/40953612
score: -4
upvote count: 1

http://stackoverflow.com/a/26101258
upvote count: 1
score: 1
has body: The best way to solve this is to wrap both designs under one parent div which will be in charge of the state. This way you only have to toggle a CSS class in one place to manage which one is visible. Here is an example with jQuery. HTML Link 1 Link 2 Some content Some other content CSS .control.active { text-decoration: none; color: black; } .state-container .design2{ display: none; } .state-container.show-design2 .design2{ display: block; } .state-container.show-design2 .design1{ display: none; } JQUERY controls = $('.control'); ctr = $('.state-container'); $('.js-show-design2').click(function(){ controls.removeClass('active'); this.addClass('active'); ctr.addClass('show-design2'); }); $('.js-show-design1').click(function(){ controls.removeClass('active'); this.addClass('active'); ctr.removeClass('show-design2'); }); Note that this solution is meant for a toggle between only two views. You would need some adjustments to extend it to support 3 or more.
downvote count: 0
answers question: http://stackoverflow.com/q/26098876
type: Answer

http://stackoverflow.com/a/26221383
has body: If you only want to attach scripts to pages with specific URLs, you're better off using a PageMod than attaching to tabs. It would be useful to see most of your code and know a little bit about what you intend to do to give you the best answer, but if a PageMod isn't what you're looking for, here are some different scenarios. There are two ways of going about this. The one that I would do is to simply attach both scripts immediately, like so: main.js tabs.activeTab.attach({ contentScriptFile: [data.url("js/loader.js"), data.url("js/counter.js") ] }); counter.js var i = 0; function count() { i++; } loader.js if (titleIsValid() &amp;&amp; urlIsValid()) { count(); } Because all of your files are stored locally, I wouldn't worry too much about attaching a lot of JS files to a lot of pages. You just need to structure your count.js so that doesn't execute the code automatically. If you really want to attach the JS file only if those conditions apply, you can do this: main.js var worker = tabs.activeTab.attach({ contentScriptFile: data.url("js/loader.js") }); worker.port.on('attachCounter', function() { worker.tab.attach({ contentScriptFile: (data.url("js/counter.js") }); }); loader.js if (titleIsValid() &amp;&amp; urlIsValid()) { self.port.emit('attachCounter'); } Read more about communicating between content scripts and main scripts from tab/attach If the reason you attached the script to the page is to interact with page scripts that are already on the page (and the exact reason Firefox is telling you it's unsafe), then read about interacting with page scripts.
has comment: http://stackoverflow.com/comment/41150999
upvote count: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26193201
type: Answer
score: 2

http://stackoverflow.com/comment/41040902
has text: Also, where does `hour` come from? It's not defined in your schema?
type: AnswerComment
comment on: http://stackoverflow.com/a/26175963
score: 0
type: Comment

http://stackoverflow.com/q/26094657
tagged with: dynamics-crm-2011
tagged with: javascript
has answer: http://stackoverflow.com/a/26094824
type: AnsweredQuestion
score: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
tagged with: asp.net
favorite count: 0
type: Question
linked to: http://stackoverflow.com/q/38502033
answer count: 1
accepted answer: http://stackoverflow.com/a/26094824
has body: In sample example in SDK and at different places on internet Clientglobalcontext.js.aspx file is mentioned, if I do not include it in my html web resource, it throws exception, but if I include file like, &lt;script src="ClientGlobalContext.js.aspx" type="text/javascript"&gt;&lt;/script&gt; Then only rest endpoint API is working. Now, I am not able to locate this file anywhere. What is exact use of this file? How to locate it?
upvote count: 3
has title: What is exact use of clientglobalcontext.js.aspx in Dynamics CRM?

canjs
tags question: http://stackoverflow.com/q/26182181
tag name: canjs
type: Tag
tags question: http://stackoverflow.com/q/26109763

http://stackoverflow.com/a/26158414
type: Answer
downvote count: 0
score: 1
has body: I suspect jsLint is complaining because you have left out the third expression for the FOR loop. try something like this instead. for(a = top; a &amp;&amp; !a.tvcOI; 0)
accepted answer of: http://stackoverflow.com/q/26156426
upvote count: 1
answers question: http://stackoverflow.com/q/26156426
type: AcceptedAnswer

http://stackoverflow.com/comment/40861366
comment on: http://stackoverflow.com/a/26078512
has text: Tried doing so but it still doesn't appear neither in textbox nor paragraph :(
score: 0
type: AnswerComment
type: Comment

masking
tag name: masking
type: Tag
tags question: http://stackoverflow.com/q/26106620

http://stackoverflow.com/q/26168938
tagged with: arrays
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41027461
accepted answer: http://stackoverflow.com/a/26168990
has comment: http://stackoverflow.com/comment/41027286
has comment: http://stackoverflow.com/comment/41027492
has answer: http://stackoverflow.com/a/26168978
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41027684
possible better answer: http://stackoverflow.com/a/26168978
has title: Adding values to PHP array using jQuery
score: 0
has body: That's what I have: &lt;a href="&lt;?=$arItem["LINK"]?&gt;"&gt;&lt;?=$arItem["TEXT"]?&gt;&lt;/a&gt;. &lt;?=$arItem["LINK"]?&gt; - it's an array, which contains some links. I need to add an extra hashtag parameter #nav-link to the end of each link. That's how I tried do it, but this code doesn't work: &lt;a id="likeLink" href=""&gt;&lt;?=$arItem["TEXT"]?&gt;&lt;/a&gt; &lt;script&gt; $(document).ready(function () { $("#likeLink").attr("href", &lt;?=$arItem["LINK"]?&gt; + "#nav-link"); }); &lt;/script&gt; I don't know PHP quite well, but I think I need to add new array and return there all necessary links with hashtag and use this array in href. Thanks for help!
has comment: http://stackoverflow.com/comment/41027794
has answer: http://stackoverflow.com/a/26168990
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41027351

http://stackoverflow.com/comment/41000953
comment on: http://stackoverflow.com/q/26153520
score: 0
type: QuestionComment
type: Comment
has text: Thank you! That seems to have done the trick quite nicely.

http://stackoverflow.com/q/26083610
tagged with: css
accepted answer: http://stackoverflow.com/a/26083831
favorite count: 0
has title: How to animate entire "path" element of svg?
tagged with: http://stackoverflow.com/tag/svg
tagged with: animation
upvote count: 1
type: AnsweredQuestion
score: 1
type: Question
has answer: http://stackoverflow.com/a/26083831
answer count: 1
downvote count: 0
has body: I have read this documentation http://www.w3.org/TR/SVG/animate.html about svg animation and i know how to animate rectangle,circle etc,but this document doesn't contains any info on how to animate entire svg "path" element. I am creating bow and arrow game and i want to animate the "path" element to the right when user clicks on a button. i just want to know how to animate entire "path" element?? In the below code i want to animate second "path" element to the right... &lt;svg width="500" height="500"&gt; &lt;path d="M150,150 l0,150 q80,-50 0,-150 M220,230 l-120,0 m120,0 l-20,10 m20,-10 l-20,-10" style="stroke:black;stroke-width:5;fill:red;"/&gt; &lt;path d="M220,230 l-120,0 m120,0 l-20,10 m20,-10 l-20,-10" style="stroke:orange;width:5" /&gt; &lt;/svg&gt;
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40871166

http://stackoverflow.com/comment/40952364
comment on: http://stackoverflow.com/q/26127126
score: 0
type: Comment
type: QuestionComment
has text: You should use the one that fits your needs...which is the best way to you...can you post an example about how it needs to be...

http://stackoverflow.com/a/26109058
has comment: http://stackoverflow.com/comment/40996863
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40996645
has body: Just use jQuery's slice: var twentyChildElements = $("div").children("span").slice(0, 20); See also this performance test case - it's always faster than :lt(n), but can be outperformed by native selector engines.
has comment: http://stackoverflow.com/comment/40917512
accepted answer of: http://stackoverflow.com/q/26108924
type: Answer
has comment: http://stackoverflow.com/comment/41004617
has comment: http://stackoverflow.com/comment/40917492
answers question: http://stackoverflow.com/q/26108924
score: 2
has comment: http://stackoverflow.com/comment/40996385
upvote count: 2

http://stackoverflow.com/q/26155357
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/77793859
favorite count: 0
type: Question
possible better answer: http://stackoverflow.com/a/77793859
has answer: http://stackoverflow.com/a/26155407
answer count: 6
has answer: http://stackoverflow.com/a/26155393
has answer: http://stackoverflow.com/a/26155390
upvote count: 1
has body: Hey guys am a bit confused in running a function from the other. What I have tried is: var a = (function() { var babe = function() { console.log('yay'); }; })(); When I run the code like a.babe() it gives me error like TypeError: Cannot read property 'babe' of undefined. Why is it happening like this? I want to call the function babe from a ... How can i do it? I hope you guys can help me ... Thanks in advance.
has title: Executing another function from other function in javascript
has answer: http://stackoverflow.com/a/26155410
has answer: http://stackoverflow.com/a/26155401
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26155393

http://stackoverflow.com/q/26126710
score: 1
upvote count: 1
type: Question
tagged with: canvas
tagged with: javascript
has answer: http://stackoverflow.com/a/26126783
accepted answer: http://stackoverflow.com/a/26126783
has title: HTML5 canvas arc code correction
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
has body: Hello all I need to draw an arc between a time interval in analog clock. I need a simple code that takes start time and end time as input and draw arc based on that. For example if I put 11:00 as start time and 12:00 as end time then it should draw an arc starting from 11:00 o'clock to 12 o'clock. As you can see when you run this code the output is wrong I mean the arc drawn position is not correct. It should draw an arc starting from 11 o'clock to 12 o'clock but its not. Please help.
favorite count: 0
type: AnsweredQuestion

http://stackoverflow.com/q/26127338
has body: I have some images and their descriptions, currently loading in separate divs: IMAGE 1 IMAGE 2 IMAGE 3 CAPTION 1 CAPTION 2 CAPTION 3 I would like to move each caption to its corresponding image. It can be appended to either the image tag or its parent div. Hoping for this: IMAGE 1 CAPTION 1 IMAGE 2 CAPTION 2 IMAGE 3 CAPTION 3 I tried something here, but it attached every caption to each image. I know this code is probably headed in the wrong direction. I'm happy to scrap it and start over.
has comment: http://stackoverflow.com/comment/40951396
score: 0
has title: Append an element to a different element with the corresopnding index using jQuery
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40950399
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26127493
has comment: http://stackoverflow.com/comment/40950395
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40950425
type: Question
has comment: http://stackoverflow.com/comment/40950456
accepted answer: http://stackoverflow.com/a/26127493
tagged with: javascript

http://stackoverflow.com/q/26098193
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26098325
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: I've seen this website. If you click on the center element, it opens a file dialog so you can upload an image. I know how to open a file dialog by using an input[type=file]. How can I open the same dialog and use its output via jQuery events (for example, a click on a div)?
has title: Opening a file dialog without FILE input
has answer: http://stackoverflow.com/a/26098551
type: Question
possible better answer: http://stackoverflow.com/a/26098551
has answer: http://stackoverflow.com/a/26098325
tagged with: javascript

http://stackoverflow.com/q/26104414
has body: assume i have a div with width 320px, what number should i applied to height so it look proportional in landscape? 320px is just an example, the width will be responsive. so i need formula, not a fixed value for height based on that 320px width. i tried to follow this method: var maxWidth = 550; var w = dimension.width; var h = dimension.height; if(w &gt; maxWidth){ var ratio = maxWidth / w; w *= ratio; h *= ratio; } but i am not sure what value for h.
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40908770
tagged with: javascript
has title: set proportional height based on width
score: 0
has comment: http://stackoverflow.com/comment/40908618
favorite count: 0
has comment: http://stackoverflow.com/comment/40908678
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40913195
answer count: 0

http://stackoverflow.com/a/26154518
has body: Try setting your tabindex to 0, on the non-anchor elements you would like to make "tabbable". For example tabindex="0". This way, you won't mess with the tabbing order, or have to throw tabindexs all over the place.
type: Answer
accepted answer of: http://stackoverflow.com/q/26154128
score: 44
answers question: http://stackoverflow.com/q/26154128
has comment: http://stackoverflow.com/comment/41012480
upvote count: 44
has comment: http://stackoverflow.com/comment/116505013
type: AcceptedAnswer
downvote count: 0

firefox-addon-sdk
tags question: http://stackoverflow.com/q/26193201
type: Tag
tags question: http://stackoverflow.com/q/26149431
tag name: firefox-addon-sdk
tags question: http://stackoverflow.com/q/26059724
tags question: http://stackoverflow.com/q/26175475
tags question: http://stackoverflow.com/q/26146962

http://stackoverflow.com/comment/40981551
comment on: http://stackoverflow.com/a/26143918
type: AnswerComment
type: Comment
score: 2
has text: I think, it would be usefull to have `_.not()` wrapper as well. For example, `_.not(listOfPlays, {author: "Shakespeare"})`.

http://stackoverflow.com/q/26067751
accepted answer: http://stackoverflow.com/a/26068262
possible better answer: http://stackoverflow.com/a/26068228
has answer: http://stackoverflow.com/a/26068228
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
score: 1
has body: I am using Masonry to achieve a layout with different widths. Most have the same height, and if not, the idea is that they calculate to line up correctly next to each other. You can view the fiddle here: http://jsfiddle.net/hLangx3g/ And here's my code: // Javascript var container = document.querySelector('#masonry-grid'); var msnry = new Masonry( container, { // options itemSelector: '.masonry', columnWidth: 0 }); #masonry-grid {width:80%; margin:0 auto;} .masonry {background:#069;} .masonry-3 {width:25%; padding-bottom:25%; background:#0C6} .masonry-4 {width:33.3%; padding-bottom:33.3%; background:#9C0} .masonry-6 {width:50%; padding-bottom:50%; background:#C36} .masonry-8 {width:66.6%; padding-bottom:33.3%; background:#FC9} .masonry-12 {width:100%; padding-bottom:33.3%; background:#036} (The code inserted on Stack Overflow doesn't seem to layout correctly, my jsfiddle is where I'm at so far). You'll see there are four green (not the lime one) squares of the same width and height. I was hoping that the four boxes would themselves sit in a square, so two on each line, with the big pink box sat to the right of the four. That would then all equal out. How can I get the four green squares to sit 2x2 with the pink square to the right? I've been racking my brains for hours trying to figure out what I'm doing wrong. Thanks in advance.
upvote count: 1
type: Question
tagged with: masonry
has answer: http://stackoverflow.com/a/26068262
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: jquery
has title: Masonry: Having issues with div layout
favorite count: 0

http://stackoverflow.com/comment/40994359
type: AnswerComment
comment on: http://stackoverflow.com/a/26149942
score: 0
type: Comment
has text: Thanks a lot. Now i remember that to access the whole json response we have to use res.data and here data is not a json key as we did. See https://docs.angularjs.org/api/ng/service/$http

http://stackoverflow.com/comment/41004572
has text: Yes, that's how mongoose would consider the `permissionSchema`. Each schema maps to a mongodb collection.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26156773

http://stackoverflow.com/q/26079364
has comment: http://stackoverflow.com/comment/40863511
type: AnsweredQuestion
has body: I have written the code so far and came up with this. I have to Make sure the user input numbers into the text boxes and I was given errors using the Xhtml format, one, the '&&' sign gave me errors and due to online help, I was told I needed to use // As I student learning Javascript I have no idea what this is or means, but as I placed it there, I was given more errors and my code crashed up after the javascript was added. Thanks for the help in advance Account Lookup Please Provide Your Information Clear
has title: Validate Numbers Javascript
has comment: http://stackoverflow.com/comment/40863532
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26079623
has comment: http://stackoverflow.com/comment/40864933
has comment: http://stackoverflow.com/comment/40863169
has comment: http://stackoverflow.com/comment/40863567
score: 0
has comment: http://stackoverflow.com/comment/40863069
has comment: http://stackoverflow.com/comment/40864121
accepted answer: http://stackoverflow.com/a/26079623
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26079442
has answer: http://stackoverflow.com/a/26079442

http://stackoverflow.com/comment/40798117
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26043862
has text: I'm asking if it HAS to be accomplished with javascript because I'd rather do it with ruby instead if that's possible.
score: 0

http://stackoverflow.com/comment/40814245
comment on: http://stackoverflow.com/q/26051870
type: Comment
type: QuestionComment
has text: Sure, hiding their contents would work too, but it seems like it's the same problem: showing/hiding a vs. showing/hiding a appears to be the same challenge. Please correct me if I'm wrong; I often am.
score: 0

http://stackoverflow.com/comment/40893489
type: Comment
comment on: http://stackoverflow.com/q/26095773
type: QuestionComment
score: 1
has text: I assume you are fully aware that `yourDescribedFunction(100001)` will return `200000` ..? (Just checking.)

http://stackoverflow.com/a/26993923
has comment: http://stackoverflow.com/comment/101372137
answers question: http://stackoverflow.com/q/26042423
has body: Android and chrome I believe allow you to access old keys in session storage, but not write to it. I know that Safari will not allow any use of session or local storage. similar so question
upvote count: 9
score: 9
has comment: http://stackoverflow.com/comment/83330109
has comment: http://stackoverflow.com/comment/57356588
downvote count: 0
type: Answer

http://stackoverflow.com/a/26056741
score: 2
has body: Below condition will not give you correct comparison, when object already exists in array. if( coll[data.raw_id] == data.raw_id ) { I think you should just do: if(coll[data.raw_id]) { If I understand you correctly try this example if(coll[data.raw_id]) { var q = coll[data.raw_id].qty + _qty; var w = coll[data.raw_id].wastage + _wastage; coll[data.raw_id] = {"qty":q, "wastage":w}; } else { coll[data.raw_id] = {"qty":_qty, "wastage":_wastage}; }
has comment: http://stackoverflow.com/comment/40821277
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26056406
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/26056406

http://stackoverflow.com/comment/40905881
comment on: http://stackoverflow.com/a/26102787
type: AnswerComment
type: Comment
has text: I've no idea. I'm not convinced that it does. Can you provide an [MCVE](http://stackoverflow.com/help/mcve) proving that it works locally?
score: 2

http://stackoverflow.com/q/26143436
type: Question
answer count: 2
has title: Overwrite file content with variable data
has comment: http://stackoverflow.com/comment/40980035
has comment: http://stackoverflow.com/comment/40979794
tagged with: javascript
tagged with: jquery
score: 0
tagged with: client-side
has body: Using jquery open file (e.q. test.txt), and replace it with data written in your variable. Is it possible. var text_variable = "Some text"; Now open file e.q. test.txt and clear all content and replace it with text_variable.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26143516
has answer: http://stackoverflow.com/a/26144228
has comment: http://stackoverflow.com/comment/40979904
tagged with: file

http://stackoverflow.com/q/26067771
tagged with: ruby-on-rails
has body: I am trying to create a simple bar chart in Morris.js, which will display the workload of an person, paired with their name. (name, workload) |key, value| To do this, I have created a hash of the users name and their workload, @workloads. Then, in my charts.js.erb file: $(document).ready(function() { Morris.Bar({ element: 'workload-bar-chart', data: [ &lt;% @workloads.each do |key, value| %&gt; &lt;%= "{ y: '#{key}', a: #{value} }," %&gt; &lt;% end %&gt; ], xkey: 'y', ykeys: ['a'], labels: ['Name'], hideHover: 'auto', resize: true }); }); This is the output that is rendered in the browser. (Safari, in case you ask.) $(document).ready(function() { Morris.Bar({ element: 'workload-bar-chart', data: [ { y: &amp;#39;Ronny&amp;#39;, a: 0 }, { y: &amp;#39;Jeff&amp;#39;, a: 24 }, { y: &amp;#39;Brad&amp;#39;, a: 41 }, { y: &amp;#39;Janice&amp;#39;, a: 2 }, { y: &amp;#39;Jose&amp;#39;, a: 4 }, ], xkey: 'y', ykeys: ['a'], labels: ['Name'], hideHover: 'auto', resize: true }); }); Now, this doesn't work at all for Morris.js. The output I am trying to get is this: $(document).ready(function() { Morris.Bar({ element: 'workload-bar-chart', data: [ { y: 'Ronny', a: 0 }, { y: 'Jeff', a: 24 }, { y: 'Brad', a: 41 }, { y: 'Janice', a: 2 }, { y: 'Jose', a: 4 }, ], xkey: 'y', ykeys: ['a'], labels: ['Name'], hideHover: 'auto', resize: true }); }); When I code this in manually, it works perfectly, and I don't think anything is wrong with the hash itself. (It prints just fine in the view.) I simply need to stop my ' from converting to &amp;#39;, which I believe means that I need to escape it somehow. I think it is converting my ' to an HTML Entity (decimal). Just for reference, I know almost nothing about javascript, and I've only been coding with Ruby on Rails for just over a year.
type: Question
type: AnsweredQuestion
tagged with: erb
tagged with: javascript
answer count: 2
accepted answer: http://stackoverflow.com/a/26068383
downvote count: 0
has comment: http://stackoverflow.com/comment/40842640
tagged with: morris.js
has title: Why do '' show up as &#39; (HTML Entity?) in my charts.js.erb file?
favorite count: 0
tagged with: ruby
has answer: http://stackoverflow.com/a/26067852
possible better answer: http://stackoverflow.com/a/26067852
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/26068383

http://stackoverflow.com/a/37880291
score: 0
answers question: http://stackoverflow.com/q/26130463
has body: JavaScript has both number primitives and Number objects. Number primitives are immutable (like all primitives in JavaScript). The numeric value of a Number object is also immutable. So your add method can only return the updated value. You can create your own number-like object, of course, with a mutable value. Details about number immutability and your own number object in this other answer (didn't realize that question was a duplicate when answering it).
type: Answer

http://stackoverflow.com/comment/40986432
has text: Have you tried changing "error" class name for example in alpha directive? it's possible alpha directive is overwriting class "error" of required directive or viceversa
comment on: http://stackoverflow.com/q/26146881
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26115354
score: 0
has comment: http://stackoverflow.com/comment/40931603
has comment: http://stackoverflow.com/comment/40928343
type: Answer
has comment: http://stackoverflow.com/comment/40930903
has body: `$(window).unload(function() { var currentURL = document.location.href; var index = currentURL.indexOf("?error="); if(index &gt; -1) document.location.href = currentURL.substring(0, index); });`
answers question: http://stackoverflow.com/q/26115069

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

http://stackoverflow.com/comment/41020343
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26164793
type: AnswerComment
has text: that's because you're not reading your own statement - you said percentages, so if you plug in 0.3, you're plugging in 0.3%, which is a factor 1.003... if you're thinking of values between 0 and 1, not 0 and 100, you're not dealing with percentages and you've already done the factor division.

http://stackoverflow.com/comment/40934878
score: 0
type: Comment
has text: This is likely to be a good way to simply mask the problem rather than fixing it. Don't.
type: AnswerComment
comment on: http://stackoverflow.com/a/26119303

http://stackoverflow.com/q/26040231
has title: HTML2canvas script not outputting correct order
tagged with: http://stackoverflow.com/tag/html
answer count: 0
has body: I'm trying to output all table rows into a div using HTML2canvas. It works fine, all the rows output as images into the specified div. The problem i'm having is that the order of some of the output images in the div aren't the same as the order of the table rows in the HTML. It seems as though certain rows are being converted into an image before other rows. Can anyone tell me why this is happening and whether there is a fix for this? A snippet of my code is below var n = 0; function nextStep() { m++; if (m &gt;= 19) return; // some body allTrs.each(function() { html2canvas($(this), { onrendered: function(canvas) { // canvas is the final rendered &lt;canvas&gt; element n = n + 1; var myImage = canvas.toDataURL("image/png"); $('#outputimages').append('&lt;img style="display:block; width:700px;" src="' + myImage + '" class="' + n + '" /&gt;'); nextStep(); } }); }); } nextStep();
type: Question
tagged with: javascript
score: 0
tagged with: canvas
has comment: http://stackoverflow.com/comment/40808682
tagged with: jquery
has comment: http://stackoverflow.com/comment/40792821
has comment: http://stackoverflow.com/comment/40792246
type: UnansweredQuestion

http://stackoverflow.com/a/26106823
has body: As per your example, you can just use .split() on the innerHTML using , as a delimiter. If you want, you can add in an extra safeguard and use a function to detect whether you're getting a number. JavaScript: var vals = document.getElementsByTagName('script')[2].innerHTML.split(','); for(var i = 3; i &lt; vals.length; i+=4) { console.log(vals[i]); } Output: '401757' '1115337' '1169333' '10453' jsFiddle
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40913377
has comment: http://stackoverflow.com/comment/40913534
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26106709
type: Answer
answers question: http://stackoverflow.com/q/26106709
has comment: http://stackoverflow.com/comment/40913804

http://stackoverflow.com/comment/40879588
type: AnswerComment
comment on: http://stackoverflow.com/a/26088361
type: Comment
score: 1
has text: Small footnote: #bind is not supported in IE < 9. A polyfill is available here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind#Compatibility

http://stackoverflow.com/q/26079872
answer count: 1
tagged with: events
favorite count: 0
has comment: http://stackoverflow.com/comment/40864247
has title: Drag and drop detection
has body: My task was only to detect when element is in drop zone/leaves drop zone/dropped in drop zone. Can someone explain me why browser isn't detecting drop event. content2.addEventListener("dragenter",function(){ console.log("Pic is in drop zone."); },false); content2.addEventListener("dragleave",function(){ console.log("Picture is no longer in drop zone"); },false); content2.addEventListener("drop",function(){ console.log("Picture dropped in drop zone"); },false); I know that drop is by default disabled, but adding line this.preventDefault() in drop event didn't make any difference. Here is JS Bin link:http://jsbin.com/ledur/2/edit
tagged with: drag-and-drop
has answer: http://stackoverflow.com/a/26080070
accepted answer: http://stackoverflow.com/a/26080070
has comment: http://stackoverflow.com/comment/40864185
has comment: http://stackoverflow.com/comment/40864322
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: dom
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40864377
upvote count: 1
has comment: http://stackoverflow.com/comment/40864431

http://stackoverflow.com/a/42733453
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26161992
answers question: http://stackoverflow.com/q/26161992
has body: forever-monitor starts the child process in a detached child state so this is the expected behavior.Your custom forever-monitor script has to handle the signals from whatever you're using and manipulate the child process appropriately. Refer this article : https://github.com/foreverjs/forever-monitor/issues/5 var forever = require('forever-monitor'); process.stdin.resume(); var child = new(forever.Monitor)('Index.js', { max: 5, silent: false, minUptime: 2000, spinSleepTime: 5000 }); child.on('start', function() { console.log('Forever started for first time.'); }); child.on('exit', function() { console.error('Index.js file has exited after '+child.max+' restarts'); }); //Exit handler. function exitHandler(options, err) { try{ //Killing node process manually that is running "Index.js" file. process.kill(child.childData.pid); console.log("Child process killed succesfully!!"); console.log("Forever exit!!"); } catch(err){ console.log("Child process already stopped!!"); console.log("Forever exit!!"); } //Killing forever process. process.exit(); } //Handling user exit events like Ctrl+C. process.on('SIGINT', exitHandler.bind(null, {exit: true})); child.start();
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41128858
score: 0
type: Comment
has text: If you store your html app on a remote server, you should also use the appCache html5 features, which ensure that the code/files are cached locally. If you do this right, you can use your app in offline mode really quite well.
type: AnswerComment
comment on: http://stackoverflow.com/a/26200047

http://stackoverflow.com/a/26156012
has body: You can get the Page ID with the signed_request parameter. Here are some threads where this is explained already: Facebook API get Fanpage ID inside Page Tab Get Facebook Page Tab ID of current Tab? how to get facebook page id inside page fan tab using facebook javascript sdk How can I find out what Page has installed my Facebook App / which page is loading my app
accepted answer of: http://stackoverflow.com/q/26154763
type: Answer
answers question: http://stackoverflow.com/q/26154763
type: AcceptedAnswer
score: 0

drupal
tags question: http://stackoverflow.com/q/26156354
type: Tag
tag name: drupal
tags question: http://stackoverflow.com/q/26116616

http://stackoverflow.com/comment/40916295
has text: Thanks so much for your patience! Sorry I got a little confused during this as I wasn't sure what you where totally getting at with the array but I totally get it now!!
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26106931
type: AnswerComment

http://stackoverflow.com/q/26037104
tagged with: javascript
tagged with: google-maps-api-3
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26040673
has comment: http://stackoverflow.com/comment/40789257
linked to: http://stackoverflow.com/q/25017463
favorite count: 0
type: Question
has title: How to calculate intersection area in Google Maps API with JSTS Library?
answer count: 1
score: 4
has body: I am trying to calculate the area of the intersection between two triangles. I found out the JSTS Topology Suite has a Geometry class which a method intersection(). I tried it on JSFiddle and on my local computer but i am getting an Uncaught TypeError: undefined is not a function. There is also an example from JSTS. Here you can see the code. My code looks the same in JSFiddle: var union = triangleCoords.union(secondTriangleCoords); var intersection = triangleCoords.intersection(secondTriangleCoords); console.log('Intersection ' + intersection); google.maps.geometry.spherical.computeArea(intersection); Is there a conversion that i should do also?
accepted answer: http://stackoverflow.com/a/26040673
linked to: http://stackoverflow.com/q/24504068
upvote count: 4
tagged with: google-maps
has comment: http://stackoverflow.com/comment/40789348
downvote count: 0

http://stackoverflow.com/q/26103362
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29520061
score: 6
has body: I'm using Datatables to create a grouped by data grid. I was able to group my table using my first column. I want to accomplish getting the count on each grouped row and writing out the count on my grouped row, how would I go about doing that? If you see the link below, they have the shaded grouped row. I would like the count to appear right after the text of the grouped text. http://www.datatables.net/examples/advanced_init/row_grouping.html Thank you.
has answer: http://stackoverflow.com/a/55934483
downvote count: 0
has answer: http://stackoverflow.com/a/77303084
type: Question
has answer: http://stackoverflow.com/a/53695173
upvote count: 6
has answer: http://stackoverflow.com/a/57403554
tagged with: javascript
tagged with: jquery
tagged with: datatables
has title: Datatables: Using Row grouping, how do I get a count of each grouped row?
favorite count: 0
answer count: 5

http://stackoverflow.com/a/26228090
type: Answer
has comment: http://stackoverflow.com/comment/41647719
has body: It is a bug in Google Chrome. It looks like they are working on it. https://code.google.com/p/chromium/issues/detail?id=420070
has comment: http://stackoverflow.com/comment/41598324
accepted answer of: http://stackoverflow.com/q/26170692
answers question: http://stackoverflow.com/q/26170692
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/26084852
has title: toggle class on click with javascript
has body: I am trying to create a simple on click event using js (no jQuery) If I run the below code it only works for the first item I click. var listItem = document.querySelector('li'); listItem.addEventListener('click', function(event) { this.classList.toggle('clicked'); }); .clicked { color:red; } item 1 item 2 I looked at an alternative using var listItem = document.getElementById('mylist'); listItem.addEventListener('click', function(event) { this.classList.toggle('clicked'); }); .clicked { background-color:red; } item 1 item 2 but this just toggles the ul rather than the li I clicked. How can I target all li in my list so that each time they are clicked their class is toggeled
score: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26084870
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: onclick
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26084870
tagged with: javascript

http://stackoverflow.com/q/26094309
has answer: http://stackoverflow.com/a/26094363
has answer: http://stackoverflow.com/a/26094745
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26095210
has answer: http://stackoverflow.com/a/26094991
downvote count: 0
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40897646
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/26094363
has title: how can I do an addition of all price elements from a json array in javascript
answer count: 6
has answer: http://stackoverflow.com/a/26094595
has answer: http://stackoverflow.com/a/26094354
tagged with: http://stackoverflow.com/tag/json
has body: I have the following JSON array: fruits = [{"fruit":"banana","amount":"2","price":"1"},{"fruit":"apple","amount":"5","price":"2"},{"fruit":"kiwi","amount":"1","price":"5"}] How can I calculate all the "price" values together? The result should be 8. I have so far the following but problems accessing the price items: function count(fruits) { var sum = 0; for (var i = 0; i &lt; fruits.length; i++) { sum = sum + fruits[i][price]; } return sum; } console.log(count(fruits) Thank you!
upvote count: 1
possible better answer: http://stackoverflow.com/a/26094354
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/q/26178235
downvote count: 0
has title: Don't show thumbnails if Galleria has only one image
tagged with: jquery
favorite count: 0
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26178664
upvote count: 1
has body: I'm using Galleria (http://galleria.io/) and generating images to the gallery dynamically, once in a while there's a situation where a gallery includes just one image, at that point I'd like the gallery to appear without the thumbnail container, how could I do this? Any help greatly appreciated! My current script for initializing is: Galleria.loadTheme('assets/js/galleria.classic.min.js'); // Initialize Galleria Galleria.run('#galleria', { show: selectedIndex, showInfo: false, swipe: true, imageCrop: false, responsive:true, showCounter:true, thumbnails:true, lightbox: true, trueFullscreen:true, extend: function() { this.bind(Galleria.IMAGE, function() { $('#description').html(this.$('info-title').html()); $('.galleria-lightbox-title').html(this.$('info-title').html()); }) } });
type: Question
possible better answer: http://stackoverflow.com/a/48513638
tagged with: galleria
tagged with: javascript
has answer: http://stackoverflow.com/a/48513638
answer count: 2
accepted answer: http://stackoverflow.com/a/26178664

http://stackoverflow.com/comment/60443191
type: AnswerComment
type: Comment
has text: @geoidesic, regardless, in order to use the `groups` option without knowing the names before runtime, would still require that the `myGroups` variable be constructed at runtime as per the OP's example code. If that's not possible, then there is no solution, as this plugin provides no method(s) for changing these options after the plugin is initialized.
comment on: http://stackoverflow.com/a/26127343
score: 0

http://stackoverflow.com/comment/40792533
type: AnswerComment
comment on: http://stackoverflow.com/a/26040801
type: Comment
has text: This works but I want the click event to come under `mousedwon` event because I have other things to it.
score: 0

ajax
tags question: http://stackoverflow.com/q/26118696
tags question: http://stackoverflow.com/q/26121669
tags question: http://stackoverflow.com/q/26130245
tags question: http://stackoverflow.com/q/26116568
tags question: http://stackoverflow.com/q/26073327
tags question: http://stackoverflow.com/q/26176695
tags question: http://stackoverflow.com/q/26133760
tags question: http://stackoverflow.com/q/26060706
tags question: http://stackoverflow.com/q/26102697
tags question: http://stackoverflow.com/q/26121276
tags question: http://stackoverflow.com/q/26129533
tags question: http://stackoverflow.com/q/26188642
tags question: http://stackoverflow.com/q/26050166
tags question: http://stackoverflow.com/q/26083680
tags question: http://stackoverflow.com/q/26087184
tags question: http://stackoverflow.com/q/26140435
tags question: http://stackoverflow.com/q/26109315
tags question: http://stackoverflow.com/q/26043986
tags question: http://stackoverflow.com/q/26128937
tags question: http://stackoverflow.com/q/26138871
tags question: http://stackoverflow.com/q/26048351
tags question: http://stackoverflow.com/q/26061143
tags question: http://stackoverflow.com/q/26046296
tags question: http://stackoverflow.com/q/26114933
tags question: http://stackoverflow.com/q/26134803
tags question: http://stackoverflow.com/q/26163537
tags question: http://stackoverflow.com/q/26113837
tags question: http://stackoverflow.com/q/26064307
tags question: http://stackoverflow.com/q/26149281
tags question: http://stackoverflow.com/q/26141727
tags question: http://stackoverflow.com/q/26041384
tags question: http://stackoverflow.com/q/26039394
tags question: http://stackoverflow.com/q/26164361
tags question: http://stackoverflow.com/q/26063035
tags question: http://stackoverflow.com/q/26172509
tags question: http://stackoverflow.com/q/26153403
tags question: http://stackoverflow.com/q/26140503
tags question: http://stackoverflow.com/q/26086933
tags question: http://stackoverflow.com/q/26090880
tags question: http://stackoverflow.com/q/26053837
tags question: http://stackoverflow.com/q/26135860
tags question: http://stackoverflow.com/q/26054853
tags question: http://stackoverflow.com/q/26147218
tags question: http://stackoverflow.com/q/26038123
tags question: http://stackoverflow.com/q/26053746
tags question: http://stackoverflow.com/q/26158526
tags question: http://stackoverflow.com/q/26068540
type: Tag
tags question: http://stackoverflow.com/q/26070007
tags question: http://stackoverflow.com/q/26054038
tags question: http://stackoverflow.com/q/26062960
tags question: http://stackoverflow.com/q/26177140
tags question: http://stackoverflow.com/q/26037872
tags question: http://stackoverflow.com/q/26142785
tags question: http://stackoverflow.com/q/26164509
tags question: http://stackoverflow.com/q/26056928
tags question: http://stackoverflow.com/q/26062787
tags question: http://stackoverflow.com/q/26059675
tags question: http://stackoverflow.com/q/26111838
tags question: http://stackoverflow.com/q/26165703
tags question: http://stackoverflow.com/q/26059642
tags question: http://stackoverflow.com/q/26177688
tags question: http://stackoverflow.com/q/26038481
tags question: http://stackoverflow.com/q/26094648
tags question: http://stackoverflow.com/q/26036442
tags question: http://stackoverflow.com/q/26194330
tags question: http://stackoverflow.com/q/26192556
tags question: http://stackoverflow.com/q/26194525
tags question: http://stackoverflow.com/q/26152192
tags question: http://stackoverflow.com/q/26161742
tags question: http://stackoverflow.com/q/26180422
tags question: http://stackoverflow.com/q/26065161
tags question: http://stackoverflow.com/q/26149062
tags question: http://stackoverflow.com/q/26186765
tags question: http://stackoverflow.com/q/26081297
tags question: http://stackoverflow.com/q/26084533
tags question: http://stackoverflow.com/q/26044097
tags question: http://stackoverflow.com/q/26067408
tags question: http://stackoverflow.com/q/26159846
tags question: http://stackoverflow.com/q/26050109

http://stackoverflow.com/comment/40949299
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26121067
has text: @markE Thanks for the timestamp parameter tip! Very useful when trying to optimize everything as much as possible.
score: 0

http://stackoverflow.com/q/26044295
has answer: http://stackoverflow.com/a/26047968
type: AnsweredQuestion
score: 1
has body: I have a parent page and child page sharing the same file.js file for jquery events. Well I am working with Magnific Popup and I have: $("#addDetailButton").magnificPopup({ items: { src: 'someURL' }, type: 'iframe', enableEscapeKey: false, modal: true }); My popup is based on iframe and is modal. How I can close the modal window with a button html element? I did a research on StackOverflow and all the replies and based in inline type. I have tried &lt;input id="cancel" type="button" value="Cancel"/&gt; // child page $("#cancel").click(function(){ $.magnificPopup.close(); }); and I always receive trough Firefox's Web Console the following: TypeError: $.magnificPopup is undefined Thank You
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
upvote count: 1
answer count: 1
linked to: http://stackoverflow.com/q/2161388
accepted answer: http://stackoverflow.com/a/26047968
has title: Close a popup modal window of iframe type through a button
favorite count: 0
tagged with: magnific-popup

http://stackoverflow.com/comment/40848741
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26071405
score: 0
has text: What language are you using to create this html? (you said you where doing it a while loop?)

http://stackoverflow.com/q/26056894
has body: I would like to ask, how can i get selected value from radio list? I tried ng-change, and watch scope, but i get always only first value which is set into the model during the app initi. Here is example of my code: Radio button group: Dials Conversations Appointments Orders JS: // Default choice scope $scope.choice; $scope.$watch('choice', function(value) { // Here i get always the same value console.log("Selected goalType, text: " +value); }); How can i get selected value and set this value into the scope? Thanks for any help.
has answer: http://stackoverflow.com/a/26057399
tagged with: angularjs
type: AnsweredQuestion
tagged with: radio-group
has title: Angular - Ng-change return always the same value
possible better answer: http://stackoverflow.com/a/26057187
has answer: http://stackoverflow.com/a/26057187
accepted answer: http://stackoverflow.com/a/26057399
type: Question
answer count: 2
tagged with: javascript
score: 0

http://stackoverflow.com/comment/41283070
has text: I can live with that. At least with a facade object, I could just say that you must use the facade if you want to get the full benefit of the features that is being added. I think that would be reasonable in these kind of cases.
type: Comment
comment on: http://stackoverflow.com/a/26191342
type: AnswerComment
score: 0

http://stackoverflow.com/a/55743302
downvote count: 1
has body: Try this: function copytable(el) { var urlField = document.getElementById(el) var range = document.createRange() range.selectNode(urlField) window.getSelection().addRange(range) document.execCommand('copy') } hello
score: 18
upvote count: 19
type: Answer
answers question: http://stackoverflow.com/q/26053004

http://stackoverflow.com/comment/40837235
comment on: http://stackoverflow.com/a/26065222
type: AnswerComment
has text: The most interesting thing is that these syntax errors are shown in browser's console. How comes that people do not check console - I don't know...
score: 0
type: Comment

http://stackoverflow.com/a/26155031
upvote count: 2
has comment: http://stackoverflow.com/comment/41616168
has body: Space between columns is set by chart.columnSpacing property. But I am not sure if this is the case, could it be you have some graph with missing data?
score: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26145799
answers question: http://stackoverflow.com/q/26145799
type: Answer

http://stackoverflow.com/comment/40961787
comment on: http://stackoverflow.com/q/26133593
score: 0
type: Comment
type: QuestionComment
has text: Try http://xregexp.com/

http://stackoverflow.com/comment/41006114
comment on: http://stackoverflow.com/q/26157596
has text: If you are ever having scope issues, you can use this instead `jQuery(function($){ YOUR CODE });` which does both a DOM ready handler and provides a locally scoped `$`
score: 0
type: Comment
type: QuestionComment

formview
tags question: http://stackoverflow.com/q/26044678
tag name: formview
type: Tag

http://stackoverflow.com/a/60272473
score: 6
upvote count: 7
downvote count: 1
answers question: http://stackoverflow.com/q/26053004
has body: This has worked for me, it is not only restricted to table, but it can even select and copy to clipboard all elements inside Node specified with id. I have tested in Mac Chrome as well as windows chrome. Usescase : Copy Signature created by Signature Generator based on JS Demo : &lt;div id="signature_container"&gt; &lt;p id="company_name" style="margin-top: 4px; margin-bottom: 0px; color: #522e64; font-weight: 700; font-size: 16px; letter-spacing: 1px; border-bottom: solid 2px #522e64; width:250px; padding-bottom: 3px;"&gt;The Company Name&lt;/p&gt; &lt;p style="margin-top: 4px; margin-bottom: 0px; color: #00706a; font-weight: 700; font-size: 15px;"&gt; &lt;span id="first_name_output_2"&gt;&lt;/span&gt;Firstname&lt;span id="last_name_output_2"&gt; Lastname&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span id="designation_output_2" style="color: #000000; font-weight: 500; font-size: 15px;"&gt;Designation&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-top: 0px; margin-bottom: 0px; color: #625469; font-weight: normal; font-size: 15px; letter-spacing: 0.6px;"&gt;youreamil@xyz.com&lt;span id="email_output_2"&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt; &lt;/div&gt; &lt;br&gt;&lt;br&gt; &lt;input type="button" onclick="selectElementContents( document.getElementById('signature_container') );" value="Copy to Clipboard"&gt; &lt;script&gt; function selectElementContents(el) { var body = document.body, range, sel; if (document.createRange &amp;&amp; window.getSelection) { range = document.createRange(); sel = window.getSelection(); sel.removeAllRanges(); range.selectNodeContents(el); sel.addRange(range); } document.execCommand("Copy"); } &lt;/script&gt;
type: Answer

http://stackoverflow.com/a/26034608
has comment: http://stackoverflow.com/comment/40781124
type: Answer
has body: I would suggest to use a tested directive that will do exactly this. Take a look at this: https://github.com/sroze/ngInfiniteScroll
score: 0
answers question: http://stackoverflow.com/q/26034563
has comment: http://stackoverflow.com/comment/40781334
has comment: http://stackoverflow.com/comment/40781209

http://stackoverflow.com/q/26177463
accepted answer: http://stackoverflow.com/a/26179099
tagged with: meteor
tagged with: twitter-bootstrap
tagged with: google-api
tagged with: oauth-2.0
type: AnsweredQuestion
has title: How to use Meteor.loginWithGoogle with mrt:accounts-ui-bootstrap-dropdown
type: Question
has body: The dialog box that pops up becomes the following image after I entered my Google username and password. I think I should be intercepting the login using Meteor.loginWithGoogle in a similar fashion to https://www.eventedmind.com/feed/meteor-customizing-login However, I have no idea where to do that, since unlike in the video tutorial I am not building my own login event listener. I am simply using mrt:accounts-ui-bootstrap-dropdown. Any ideas? Thank you in advance.
answer count: 1
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/26172628
has answer: http://stackoverflow.com/a/26179099

http://stackoverflow.com/comment/40933685
has text: I'm not sure about the question either, but in the first paragraph themes are mentioned.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26062048

http://stackoverflow.com/comment/40845821
type: AnswerComment
has text: Thanks. I was going back and forth on storing in the DB. But kept thinking that storing it in the backend DB would mean that backend is aware of those settings even though it holds meaning only for the UI. If its per user settings, then I agree that DB is the best place but in my case its a system level setting so I wasn't sure. I might just store it in the DB for lack of better/simpler solution.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26069538

http://stackoverflow.com/q/26115427
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40928834
has body: I'm using a pattern from : Giulio Canti's blog so that I can create lots of constructors. I wish there was a way of setting the function name. That is, given the constructor function struct(cls, props) { function Struct(obj) { // add properties for (var name in props) { if (props.hasOwnProperty(name)) { // here you could implement type checking exploiting props[name] this[name] = obj[name]; } } } // the following doesn't work for me! // Struct.name = cls; return Struct; } When I use it to create an instance, e.g. var Person = struct('Person', { name: String, surname: String }); var person = new Person({surname: 'Canti', name: 'Giulio'}); In the console I get the following: But I would prefer: Person {name: "Giulio", surname: "Canti"} Any suggestions on how I could accomplish that?
has comment: http://stackoverflow.com/comment/40928832
has comment: http://stackoverflow.com/comment/40929488
answer count: 0
type: UnansweredQuestion
type: Question
score: 1
has comment: http://stackoverflow.com/comment/40928849
upvote count: 1
downvote count: 0
has title: Is there a way to change the name of a function

http://stackoverflow.com/a/26072911
has body: You have two input elements with the same id. The id in html document must be unique. When you try to do document.getElementById('updates_959338052'), it is selecting the first one which is not the one displayed, maybe from mobile compatible part of your website.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26072845
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26072845

http://stackoverflow.com/q/26105644
has comment: http://stackoverflow.com/comment/40914654
has comment: http://stackoverflow.com/comment/40915284
has comment: http://stackoverflow.com/comment/40915046
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
tagged with: pagination
type: Question
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40916976
linked to: http://stackoverflow.com/q/8232713
has answer: http://stackoverflow.com/a/26107854
accepted answer: http://stackoverflow.com/a/26107854
has title: Pagination of table data from json
score: 0
linked to: http://stackoverflow.com/q/2974246
has body: I want to paginate results obtained thusly: function processResponse(response){ var myObj = JSON.parse(response); var weighInData = myObj["WEIGH-INS"]; var weights = []; // re: weigh-in count and calculating highest/lowest var userDisplayEl1 = document.getElementById("user-display-weigh-in-data"); var weighInCountEl = document.getElementById("weigh-in-count"); var weightLowEl = document.getElementById("weight-low"); var weightHighEl = document.getElementById("weight-high"); var weightgoalEl = document.getElementById("weight-goal"); var dataRows = document.getElementById("data-rows"); userDisplayEl1.innerHTML = ""; weighInCountEl.innerHTML = ""; weightLowEl.innerHTML = ""; weightHighEl.innerHTML = ""; weightgoalEl.innerHTML = ""; dataRows.innerHTML = ""; for (var obj in weighInData) { if (weighInData[obj].user === selUser) { weights.push(weighInData[obj].weight); var row = "&lt;tr&gt;" + "&lt;td class=\"date\"&gt;" + weighInData[obj].date + " &lt;/td&gt;" + "&lt;td class=\"value\"&gt;" + weighInData[obj].weight + "&lt;/td&gt;" + "&lt;/tr&gt;"; dataRows.innerHTML += row; // pagination here? } // if ... === selUser } // for var obj in weighInData var weighInCount = weights.length; var weightLowest = Math.min.apply(null, weights); var weightHighest = Math.max.apply(null, weights); userDisplayEl1.innerHTML = weighInData[obj].user + "'s weigh-ins:"; weightLowEl.innerHTML += weightLowest; weightHighEl.innerHTML += weightHighest; weighInCountEl.innerHTML = weighInCount; } // processResponse It seems that, because I'm executing Math on the results (after the for loop), I cannot use a limit in my db query, else the math would be inaccurate (executing only on the chunks of data, and not on the entirety of the data). So it seems I'll have to paginate on the client, but I have no idea how to proceed given how I'm currently loading/displaying the data. I have looked briefly at a couple of pagination plugins but since I wasn't clear on how to implement them given my extant code, I…

http://stackoverflow.com/q/26178837
has comment: http://stackoverflow.com/comment/41045465
has comment: http://stackoverflow.com/comment/41046309
favorite count: 0
has comment: http://stackoverflow.com/comment/41045339
has comment: http://stackoverflow.com/comment/41045412
linked to: http://stackoverflow.com/q/6974582
has answer: http://stackoverflow.com/a/26179010
upvote count: 1
answer count: 1
has title: How do you turn jQuery's $('#foo') into an object as created by document.createElement?
has comment: http://stackoverflow.com/comment/41045454
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26179010
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
type: Question
has body: I have a function that takes the return value of document.createElement and puts it in a popup on the screen. However, I want this object to be passed to the popup to be an already created div so that I can manipulate the popup content easily. Basically, I want to turn this: var magicDiv = document.createElement('div'); Into: var magicDiv = $('#divToBeTurnedIntoElement').html(); In the first case, document.createElement has a specific return object. I am looking for the jQuery function that returns the same kind of object as document.createElement. In both cases, magicDiv should be the exact same object, but with the jQuery version, it is created based on an existing div. How can I accomplish this?

http://stackoverflow.com/q/26041737
has comment: http://stackoverflow.com/comment/40794233
possible better answer: http://stackoverflow.com/a/26042059
has body: In my registration form, users can register by 4 ways given in code. But I don't know how to show and hide only if users choose Discount or Installment method. This code is not working. Register 1. Paid Free Discount Installment Paid Dsicount Paid Due Need help. Thanks in advance.
has comment: http://stackoverflow.com/comment/40794516
answer count: 3
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26042325
has comment: http://stackoverflow.com/comment/40794400
type: AnsweredQuestion
score: 0
type: Question
has answer: http://stackoverflow.com/a/26042059
has answer: http://stackoverflow.com/a/26042325
has answer: http://stackoverflow.com/a/26042197
has title: Not able to Show/Hide div through selected Radio Button
tagged with: javascript

http://stackoverflow.com/a/26135902
answers question: http://stackoverflow.com/q/26135811
has body: well you could output the CSS from local files (please don't copypaste it, you're definitely in for trouble if you do :D). What people usually do is that they keep the things linked in development and use concatenation and uglification as soon as it comes to production. Global JS variables are generally a bad idea and yes, they can conflict (they are attached to the window object, which is globally available).
downvote count: 0
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/41081567
comment on: http://stackoverflow.com/a/26187982
type: AnswerComment
score: 0
type: Comment
has text: http://blogs.msdn.com/b/dorischen/archive/2010/08/27/top-8-reasons-why-jquery-is-so-popular.aspx In particular point 3 for someone new to web dev. You don't need to ever use Jquery, as it is a wrapper for Javascript, but the syntax is much cleaner, and easier to pickup and easier to debug.

http://stackoverflow.com/q/26175598
has comment: http://stackoverflow.com/comment/41044975
has comment: http://stackoverflow.com/comment/41103225
answer count: 0
has title: SoundCloud Widget - eliminate a short delay before start
has body: I use SoundCloud's widget for a site's player, controlled dynamically with my code. So when the player is ready (player.bind(SC.Widget.Events.READY...) and the user clicks on play button, it usually delays for a very short period (500ms to 1sec, kind of) before actually playing the music. How should I kill this short waiting gap? What I want to achieve is to make it play immediately after it's ready and the user clicks on the play button.
type: Question
score: 0
tagged with: soundcloud
has comment: http://stackoverflow.com/comment/41112690
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion

hover
tags question: http://stackoverflow.com/q/26056567
tags question: http://stackoverflow.com/q/26149368
tags question: http://stackoverflow.com/q/26191971
tags question: http://stackoverflow.com/q/26110092
tags question: http://stackoverflow.com/q/26070080
type: Tag
tags question: http://stackoverflow.com/q/26131609
tags question: http://stackoverflow.com/q/26053627
tag name: hover
tags question: http://stackoverflow.com/q/26120928

http://stackoverflow.com/comment/40968697
score: 0
has text: SjoerdDeWit: the ng-animate and ng-enter, ng-leave classes do show up when I press the back button. Is there a way to detect browser back button? I'm guessing once I detect the browser back button I could just reverse the animation?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26136826

http://stackoverflow.com/comment/41063532
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26188199
has text: Have you seen this site about the workaround for that? http://blog.rodneyrehm.de/archives/34-iOS7-Mobile-Safari-And-Viewport-Units.html

http://stackoverflow.com/comment/40841750
comment on: http://stackoverflow.com/q/26067483
type: Comment
type: QuestionComment
score: 2
has text: Nothing is wrong with your code from what I can see. What's likely wrong is not in what you posted. Did you define class hide? Perhaps you should just call `.hide()`

http://stackoverflow.com/q/26060024
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26060254
answer count: 2
score: 2
tagged with: multipartform-data
has answer: http://stackoverflow.com/a/26061031
has title: Send multipart-data in ajax Jquery
has body: I have a pop-up on my parent window that pop-up have a form also .That form will have some file input type .Now i want to send the data of the input types with the help of ajax. I have tried this : var formData = new FormData(); formData.append("file", $('#profileImg').get(0).files[0]); But this is not working for me.Check my html and jQuery: HTML Name: Age: Profile Image: Display Image: jQuery Suggest me how can we send all multipart data from ajax
favorite count: 0
tagged with: ajax
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40853877
upvote count: 3
downvote count: 1

http://stackoverflow.com/q/26155783
has comment: http://stackoverflow.com/comment/41003331
has comment: http://stackoverflow.com/comment/41004090
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26156338
linked to: http://stackoverflow.com/q/17990864
tagged with: angularjs
type: UnansweredQuestion
has body: I am trying to understand this behaviour, and have added simplified code of what I'm trying to do. In an HTML partial for a modal using a modal controller I have some code like this: &lt;form&gt; &lt;!-- example one --&gt; &lt;div read-field="{{ singleContact._id }}" &gt;&lt;/div&gt; &lt;h2&gt;{{ singeContact._id }}&lt;/h2&gt; &lt;!-- example two --&gt; &lt;div read-field="{{ someScope }}"&gt;&lt;/div&gt; &lt;/form&gt; and the directive: angular.module('myApp') .directive('readField', function () { return { link: function (scope, element, attrs) { console.log(attrs); // outputs correct object with attrs.readField "523c2..mongo_id.." console.log(attrs.readField); // outputs and empty string } }; }); Even though the singleContact._id value is rendered correctly on the page in the h2, and appears correctly in the object returned by logging just the (attrs), logging the variable attrs.readField directly returns an empty string. Doing the same thing in example two with someScope and everything works fine, ie a console.log of attrs.someScope returns 'Foo' as it should. Obviously then it is a problem with how they are setup in the controller: with example one (singleContact) coming from a function call to an api service, and example two (someScope) being a straight declaration. angular.module('myApp') .controller('EditModalCtrl', function ($scope, $modalInstance, $rootScope, apiCalls, id) { apiCalls.getContact(id) .success(function (data) { console.log(data); $scope.singleContact = data; }); $scope.someScope = 'Foo'; }); Any help in making me understand this would be much appreciated, I am new to angular, and have the feeling I'm missing something important here, thanks.
type: Question
has title: Scope object is undefined in Angular directive
tagged with: javascript

http://stackoverflow.com/a/26094956
answers question: http://stackoverflow.com/q/26094771
type: Answer
score: 0
has body: Send the window name, using a GET variable like javawindow. Try something like this: &lt;script&gt; function PopupCenter(pageURL, title,w,h) { var left = (screen.width/2)-(w/2); var top = (screen.height/2)-(h/2); var targetWin = window.open (pageURL + "&amp;popupTitle=" + title, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left); } &lt;/script&gt; &lt;a onclick="PopupCenter('/customconfig/index.php?javawindow=yes', 'CustomBuilder1',1080,700);" href="javascript:void(0);"&gt; &lt;img border=0 src = "/images/Animated.GIF"&gt;&lt;/a&gt; Then catch it in PHP with something like this: &lt;?php if(isset($_GET['popupTitle']) &amp;&amp; $_GET['popupTitle'] == "CustomBuilder1") { echo "It's a javascript initiated window."; } ?&gt;

http://stackoverflow.com/comment/40968086
comment on: http://stackoverflow.com/q/26134642
score: 0
type: Comment
type: QuestionComment
has text: You need to display (name + id) in the typehead ?

angularjs
tags question: http://stackoverflow.com/q/26147698
tags question: http://stackoverflow.com/q/26064318
tags question: http://stackoverflow.com/q/26068724
tags question: http://stackoverflow.com/q/26168027
tags question: http://stackoverflow.com/q/26118814
tags question: http://stackoverflow.com/q/26083143
tags question: http://stackoverflow.com/q/26092113
tags question: http://stackoverflow.com/q/26125144
tags question: http://stackoverflow.com/q/26085362
tags question: http://stackoverflow.com/q/26099577
tags question: http://stackoverflow.com/q/26150129
tags question: http://stackoverflow.com/q/26169481
tags question: http://stackoverflow.com/q/26091427
tags question: http://stackoverflow.com/q/26050279
tags question: http://stackoverflow.com/q/26178981
tags question: http://stackoverflow.com/q/26056264
tags question: http://stackoverflow.com/q/26184224
tags question: http://stackoverflow.com/q/26154180
tags question: http://stackoverflow.com/q/26123803
tags question: http://stackoverflow.com/q/26105464
tags question: http://stackoverflow.com/q/26050643
tags question: http://stackoverflow.com/q/26122008
tags question: http://stackoverflow.com/q/26138441
tags question: http://stackoverflow.com/q/26124515
tags question: http://stackoverflow.com/q/26115880
tags question: http://stackoverflow.com/q/26072273
tags question: http://stackoverflow.com/q/26094833
tags question: http://stackoverflow.com/q/26127898
tags question: http://stackoverflow.com/q/26042779
tags question: http://stackoverflow.com/q/26137804
tags question: http://stackoverflow.com/q/26143811
tags question: http://stackoverflow.com/q/26115534
tags question: http://stackoverflow.com/q/26146639
tags question: http://stackoverflow.com/q/26145428
tags question: http://stackoverflow.com/q/26048336
tags question: http://stackoverflow.com/q/26079927
tags question: http://stackoverflow.com/q/26047958
tags question: http://stackoverflow.com/q/26097944
tags question: http://stackoverflow.com/q/26069584
tags question: http://stackoverflow.com/q/26123388
tags question: http://stackoverflow.com/q/26138094
tags question: http://stackoverflow.com/q/26185803
tags question: http://stackoverflow.com/q/26062589
tags question: http://stackoverflow.com/q/26050179
tags question: http://stackoverflow.com/q/26087427
tags question: http://stackoverflow.com/q/26136301
tags question: http://stackoverflow.com/q/26096967
tags question: http://stackoverflow.com/q/26058617
tags question: http://stackoverflow.com/q/26055241
tags question: http://stackoverflow.com/q/26044474
tags question: http://stackoverflow.com/q/26100014
tags question: http://stackoverflow.com/q/26149904
tags question: http://stackoverflow.com/q/26123929
tags question: http://stackoverflow.com/q/26135104
tags question: http://stackoverflow.com/q/26041420
tags question: http://stackoverflow.com/q/26073414
tags question: http://stackoverflow.com/q/26144654
tags question: http://stackoverflow.com/q/26071680
tags question: http://stackoverflow.com/q/26128172
tags question: http://stackoverflow.com/q/26138192
tags question: http://stackoverflow.com/q/26186514
tags question: http://stackoverflow.com/q/26036042
tags question: http://stackoverflow.com/q/26042781
tags question: http://stackoverflow.com/q/26060368
tags question: http://stackoverflow.com/q/26188070
tags question: http://stackoverflow.com/q/26161638
type: Tag
tags question: http://stackoverflow.com/q/26122246
tags question: http://stackoverflow.com/q/26124959
tags question: http://stackoverflow.com/q/26123757
tags question: http://stackoverflow.com/q/26181912
tags question: http://stackoverflow.com/q/26132075
tags question: http://stackoverflow.com/q/26147597
tags question: http://stackoverflow.com/q/26109895
tags question: http://stackoverflow.com/q/26144269
tags question: http://stackoverflow.com/q/26116281
tags question: http://stackoverflow.com/q/26117304
tags question: http://stackoverflow.com/q/26106449
tags question: http://stackoverflow.com/q/26166498
tags question: http://stackoverflow.com/q/26129454

http://stackoverflow.com/comment/40804188
type: AnswerComment
score: 0
type: Comment
has text: I tried getting rid of the document.getElementById('img2').src = newImage; and that didn't work. I keep getting the same uncaught typeerror message. I understand that I have to define image 2, but I don't know where to put it.
comment on: http://stackoverflow.com/a/26046528

http://stackoverflow.com/a/26052127
type: AcceptedAnswer
type: Answer
downvote count: 0
has body: The only solution I came up with is to degrade back to the server-side authentication flow when on iOS using full on redirects. Basically your app should hit a URL like this: https://www.facebook.com/dialog/oauth? client_id={app-id} &amp;redirect_uri={redirect-uri} Which is a jarring experience on desktop, but is arguably a nicer experience on mobile, given that the user isn’t taken through the weird tab switching (which is the root of the new problem in the first place). To degrade to this flow ONLY on iOS, make sure your sign-in link is actually an href to the facebook authentication dialog (like the link above, or for you omniauth users on rails, is “/auth/facebook”). Then wrap the javascript where you invoke the client side flow in code that prevents it from being run on iOS (or all of mobile, if you want). if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { [Facebook client side flow code here] } (please let me know in comments if anyone has a more elegant way of doing this)
score: 1
has comment: http://stackoverflow.com/comment/40831587
accepted answer of: http://stackoverflow.com/q/26038096
answers question: http://stackoverflow.com/q/26038096
upvote count: 1

http://stackoverflow.com/a/26092920
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26092890
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26092890
has body: if (A[m] &gt;= key) { r = m; } else { l = m; } JavaScript can't have variable lvalues except for properties (i.e. you could do obj[A[m] &gt;= key ? 'r' : 'l'] = m, but not what you're proposing).

http://stackoverflow.com/a/26533634
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26037556
type: Answer
has body: As stated by eddyparkinson, you definitely want a form submit trigger, not a change or edit trigger. It is possible to set up a form submit trigger in either the Google Form, or in the Google Sheet that receives the form's responses. The trigger event in each case is slightly different; the Google Sheets form submit event contains the form entry values in simple arrays (e.values, e.namedValues), whereas the Forms form submit event contains a FormResponse object that can be queried for all the information about the form submission.
upvote count: 1

http://stackoverflow.com/comment/40965917
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26135819
has text: but it works now @ChenAsraf can you explain why it should not be $
score: 0

http://stackoverflow.com/q/26069829
downvote count: 0
tagged with: javascript
favorite count: 0
has body: The code below is for a Google area chart. Currently the cross-hairs are placed on the top of a data point when the mouse is moved across the chart. How do you offset the x and y position of the cross-hairs so that they can be positioned halfway between the vertical data points.
has title: How to position crosshairs on Google chart?
has answer: http://stackoverflow.com/a/26152328
upvote count: 1
type: AnsweredQuestion
score: 1
type: Question
has comment: http://stackoverflow.com/comment/40958901
accepted answer: http://stackoverflow.com/a/26152328
tagged with: google-visualization
answer count: 1

http://stackoverflow.com/comment/41006917
has text: And not to forget. In the code on the bottom if I remove the lines link.exit().remove(); and node.exit().remove(); it works without any errors. So yeah why is it that way?
score: 0
comment on: http://stackoverflow.com/q/26149714
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40943254
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26122984
has text: And the server is loading a user with the 'id' of 1, but the parameters have an 'id' of 8. I'm really confused about this one.
score: 0

http://stackoverflow.com/a/26079227
downvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26079203
answers question: http://stackoverflow.com/q/26079203
type: Answer
has comment: http://stackoverflow.com/comment/40862663
has comment: http://stackoverflow.com/comment/40862792
has body: for (i=0;i&lt;=Math.abs(negativeorpositivenumber);i++) { var original = negativeorpositivenumber &gt; 0 ? i : -i; // optional Documentation here.
score: 2
upvote count: 3

http://stackoverflow.com/q/26132327
tagged with: timeout
tagged with: javascript
has title: How to detect whether a webpage is in use with php, javascript, or jquery
has comment: http://stackoverflow.com/comment/40960779
has comment: http://stackoverflow.com/comment/40989752
has body: I'm trying to figure out how one would detect whether a web-page is in use. I am building a kind of web-appliance which has an HTML5 RDP client type thing. I need to detect whether the page is currently in use, if possible a specific url including a GET variable. I have searched every variation that I can think of for doing this and have come up with the following, but none seem to work for me. Pretty much my goal is to make a change in a mysql DB whenever a the page is active, then change it back when it's not. PHP sessions. This won't work for me because the session may still exist even if the user has left the specific page (I believe). Javascript window.onbeforeunload, however I see that this is pretty unreliable. Particularly if a user has security features enabled. I found some obscure referance to using php enviromental variables, but I wasn't sure how that would work, since it still wouldn't revert the variable or dismiss it when the page was closed. Any suggestions are greatly appriciated!!!!
score: 0
has comment: http://stackoverflow.com/comment/41018820
has comment: http://stackoverflow.com/comment/40960842
has comment: http://stackoverflow.com/comment/40959949
has comment: http://stackoverflow.com/comment/40993107
tagged with: jquery
has comment: http://stackoverflow.com/comment/40961746
has comment: http://stackoverflow.com/comment/40960650
has comment: http://stackoverflow.com/comment/40982133
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/40959550
linked to: http://stackoverflow.com/q/3877821
answer count: 0
has comment: http://stackoverflow.com/comment/40960886
type: Question

http://stackoverflow.com/a/26189162
downvote count: 1
score: 0
answers question: http://stackoverflow.com/q/26189132
upvote count: 1
has body: You are using Microsoft/IE only non-standard code that won't work anywhere else. Things like ActiveX and MSXML are Microsoft products.
type: Answer

http://stackoverflow.com/q/26069773
type: Question
tagged with: javascript
has title: AngularJS: emulate ng-repeat scope creation
has comment: http://stackoverflow.com/comment/40845753
score: 0
has body: Is there a way in angular to emulate the same scoping that ng-repeat creates without actually using ng-repeat? An example structure is static html static html and then have similar scopes created as if I used an ng-repeat? static html Wherein properties created through iteration will still be available inside my staticItem directive (ie. $last, $first, $middle)? I am using bootstrap angular directives (specifically tab component) which creates an isolated scope for each tab item. And the mark up is generated through CMS.
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40845811
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/26146465
type: Answer
answers question: http://stackoverflow.com/q/26146425
score: 0
has body: You could use window.location.href like $('.clickable-icon').on('click', function() { window.location.href = $(this).data('link'); });

http://stackoverflow.com/comment/51219000
has text: Did you manage to come up with a solution to this problem?
score: 0
comment on: http://stackoverflow.com/q/26178509
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40872568
score: 0
comment on: http://stackoverflow.com/q/26084605
type: Comment
type: QuestionComment
has text: Do you need any plugins or want ot do it yourself?

http://stackoverflow.com/comment/41010198
comment on: http://stackoverflow.com/a/26159767
type: AnswerComment
has text: I see but there were no problems with the size of the created window, just the position it pops up.
score: 0
type: Comment

http://stackoverflow.com/comment/137197875
type: AnswerComment
score: 0
type: Comment
has text: "the scripts come from the same domain where as via a blob they do not and so can not reference resources without absolute paths and those resources will be considered from another domain" This is not entirely true. They are same-domain. `self.origin` will match the parent page's origin. For instance you can `fetch(yourResource)` just fine. The issue is that the base-URL is different. So it really just concerns the resolution of relative URLs that are affected.
comment on: http://stackoverflow.com/a/77823444

http://stackoverflow.com/a/26038008
has comment: http://stackoverflow.com/comment/68173518
type: Answer
has comment: http://stackoverflow.com/comment/55933191
has body: It seems like the reason is because the promise wasn't yet resolved as it's asynchronous functionality. You basically have to $rootScope.$digest() afterwards like so: it('should return a rejected promise if status is a string', inject(function($rootScope) { var rejected = false; UserService.processIdentityResponse(data).catch(function() { rejected = true; }); $rootScope.$digest(); expect(rejected).toBe(true); }));
has comment: http://stackoverflow.com/comment/46644837
has comment: http://stackoverflow.com/comment/51428775
upvote count: 7
answers question: http://stackoverflow.com/q/26038007
downvote count: 0
has comment: http://stackoverflow.com/comment/51429356
score: 7

http://stackoverflow.com/a/26132616
has body: try $.extend({}, data), or $.extend(true, {}, data) for deep copy if you are using jquery > 1.1.4
answers question: http://stackoverflow.com/q/26132531
accepted answer of: http://stackoverflow.com/q/26132531
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40960290
score: 1

http://stackoverflow.com/comment/40965958
score: 0
has text: For me your current code works, i have made a demo here: http://fiddle.jshell.net/Lkfnh2hv/ .I am sure we have asked you about this, but you are 100% sure you are loading jquery on your site, right? Can you also confirm that the link i posted in this comment works for you? The output should be something like "1 (broken image link) Product name 4444kr"
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26120253

http://stackoverflow.com/comment/40988504
type: AnswerComment
comment on: http://stackoverflow.com/a/26147978
has text: @Oriol the animation doesn't seem to work in my chrome, but it works in firefox. not sure why.
type: Comment
score: 0

http://stackoverflow.com/comment/40972985
type: QuestionComment
has text: Not certain whether the problem is because of caching, but if you want to be explicit about what should and shouldn't be cached, you could define a cache manifest and list certain files under "network" so they are never cached.
comment on: http://stackoverflow.com/q/26139721
score: 0
type: Comment

http://stackoverflow.com/comment/40994631
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26150852
has text: In addition I've added to my answer below an example of a check that the field has actually been changed.

http://stackoverflow.com/a/26192631
has body: You're absolutely right. The prototype object has got the wrong constructor because it's right for the thing that uses it as a prototype but not for itself. That means prototypes are not regular objects in that respect. They have a special role like a class object. If you didn't notice already, your farewell is like a static member of a classical class. It's not a variable that exists per object. If the book said you can follow constructor pointers up the chain then it's wrong. You can follow getPrototypeOf() up the chain. {Edited out erroneous under-under-proto stuff here.} As for why any of this is useful when you have the awesome freedom of duck-typing, well I can't answer that.
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26192489
type: Answer
answers question: http://stackoverflow.com/q/26192489
has comment: http://stackoverflow.com/comment/41071636
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41071556
has comment: http://stackoverflow.com/comment/41070987
type: AcceptedAnswer

http://stackoverflow.com/q/26175005
has answer: http://stackoverflow.com/a/26175094
score: 2
has comment: http://stackoverflow.com/comment/41038709
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26175345
has answer: http://stackoverflow.com/a/26175159
downvote count: 0
has comment: http://stackoverflow.com/comment/41038637
favorite count: 0
possible better answer: http://stackoverflow.com/a/26175094
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/41038672
has title: how to call a function from module dependency (another module)
upvote count: 2
answer count: 3
has answer: http://stackoverflow.com/a/26175345
has body: I want to create seperate module for pagination, because I will need it to reuse in different modules, but I don't know how to call a function from module dependency (another module) Here is my main module: var App = angular.module('search', ['pagination']); App.controller('MainController', ['$scope', '$pagination' function($scope, $pagination) { $scope.testFunction(); //function from pagination module controller }]) Here is my pagination module: var App = angular.module('pagination', []); App.controller('PaginationController', ['$scope', function($scope) { $scope.testFunction = function(){ console.log("pagination module"); } }]) I get error: Error: [$injector:unpr] Unknown provider: $paginationProvider &lt;- $pagination
tagged with: javascript
tagged with: angularjs-scope

http://stackoverflow.com/comment/41006665
comment on: http://stackoverflow.com/q/26157596
type: Comment
type: QuestionComment
has text: Can you describe how to reproduce the problem? I am using Chrome and it seems to work fine.
score: 0

http://stackoverflow.com/comment/41441343
type: QuestionComment
comment on: http://stackoverflow.com/q/26132488
has text: @RichardHermanson i want +X more in Time cells like - ( +3 more in 6am-10am) not in day cell
score: 0
type: Comment

http://stackoverflow.com/a/26166710
answers question: http://stackoverflow.com/q/26166104
upvote count: 0
has comment: http://stackoverflow.com/comment/41024543
has comment: http://stackoverflow.com/comment/41023725
has comment: http://stackoverflow.com/comment/41027599
has comment: http://stackoverflow.com/comment/41023497
score: -1
has comment: http://stackoverflow.com/comment/41024108
has body: Sounds like counting in base 4 is the way to go. The trick here is to remember that nothing, '', is also an option (equivalent to 0 in arithmetic). So you have to include that in your array of options. You could achieve this with three nested loops: options = ['','a','b','c']; output = []; for ( var x = 0; x &lt; options.length; x++ ) for ( var y = 0; y &lt; options.length; y++ ) for ( var z = 0; z &lt; options.length; z++ ) output.push(options[x]+options[y]+options[z]); You're nesting three loops because the maximum length of the output will be 3 (remember that concatenating '' doesn't increase length. You could also achieve this using recursion. This way you would only have to write one for-loop. I'll leave that part to you, good luck!
has comment: http://stackoverflow.com/comment/41024252
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/41029550

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/26155145
tags question: http://stackoverflow.com/q/26083116
tags question: http://stackoverflow.com/q/26160167
tags question: http://stackoverflow.com/q/26071216
tags question: http://stackoverflow.com/q/26138805
tags question: http://stackoverflow.com/q/26186550
tags question: http://stackoverflow.com/q/26040231
tags question: http://stackoverflow.com/q/26110728
tags question: http://stackoverflow.com/q/26044887
tags question: http://stackoverflow.com/q/26157509
tags question: http://stackoverflow.com/q/26140252
tags question: http://stackoverflow.com/q/26170830
tags question: http://stackoverflow.com/q/26124987
tags question: http://stackoverflow.com/q/26113782
tags question: http://stackoverflow.com/q/26050176
tags question: http://stackoverflow.com/q/26182597
tags question: http://stackoverflow.com/q/26073810
tags question: http://stackoverflow.com/q/26178244
tags question: http://stackoverflow.com/q/26179893
tags question: http://stackoverflow.com/q/26115530
tags question: http://stackoverflow.com/q/26128133
tags question: http://stackoverflow.com/q/26050863
tags question: http://stackoverflow.com/q/26193702
tags question: http://stackoverflow.com/q/26190915
tags question: http://stackoverflow.com/q/26178915
tags question: http://stackoverflow.com/q/26073317
tags question: http://stackoverflow.com/q/26086552
tags question: http://stackoverflow.com/q/26039309
tags question: http://stackoverflow.com/q/26110240
tags question: http://stackoverflow.com/q/26075685
tags question: http://stackoverflow.com/q/26072163
tags question: http://stackoverflow.com/q/26104954
tags question: http://stackoverflow.com/q/26087984
tags question: http://stackoverflow.com/q/26177173
tags question: http://stackoverflow.com/q/26162764
tags question: http://stackoverflow.com/q/26072138
tags question: http://stackoverflow.com/q/26142148
tags question: http://stackoverflow.com/q/26061252
tags question: http://stackoverflow.com/q/26154263
tags question: http://stackoverflow.com/q/26133808
tags question: http://stackoverflow.com/q/26045534
tags question: http://stackoverflow.com/q/26088145
tags question: http://stackoverflow.com/q/26048617
tags question: http://stackoverflow.com/q/26098944
tags question: http://stackoverflow.com/q/26192887
tags question: http://stackoverflow.com/q/26094896
tags question: http://stackoverflow.com/q/26140504
tags question: http://stackoverflow.com/q/26175887
tags question: http://stackoverflow.com/q/26172728
tags question: http://stackoverflow.com/q/26173376
tags question: http://stackoverflow.com/q/26086007
tags question: http://stackoverflow.com/q/26064450
tags question: http://stackoverflow.com/q/26185132
tags question: http://stackoverflow.com/q/26155111
tags question: http://stackoverflow.com/q/26120825
tags question: http://stackoverflow.com/q/26044936
tags question: http://stackoverflow.com/q/26123410
tags question: http://stackoverflow.com/q/26173788
tags question: http://stackoverflow.com/q/26072264
tags question: http://stackoverflow.com/q/26059058
tags question: http://stackoverflow.com/q/26159705
tags question: http://stackoverflow.com/q/26078050
tags question: http://stackoverflow.com/q/26074414
tags question: http://stackoverflow.com/q/26133330
tags question: http://stackoverflow.com/q/26046120
tags question: http://stackoverflow.com/q/26186526
tags question: http://stackoverflow.com/q/26094996
tags question: http://stackoverflow.com/q/26113364
tags question: http://stackoverflow.com/q/26091967
tags question: http://stackoverflow.com/q/26158775
tags question: http://stackoverflow.com/q/26053444
tags question: http://stackoverflow.com/q/26069203
tags question: http://stackoverflow.com/q/26070173
tags question: http://stackoverflow.com/q/26036741
tags question: http://stackoverflow.com/q/26165814
tags question: http://stackoverflow.com/q/26134836
tags question: http://stackoverflow.com/q/26180343
tags question: http://stackoverflow.com/q/26140788
tags question: http://stackoverflow.com/q/26104645
tags question: http://stackoverflow.com/q/26140421

http://stackoverflow.com/comment/40919694
type: AnswerComment
has text: Thanks, I just noticed one issue, maybe you can help figure out. When I drop it down, then click outside the area ('html') to slide it back up, and then try to drop it down again, the order is reversed. i.e. it says "close this box" when it's already closed and vice-versa. I think clicking outside the area (this line: $("#toggler").html('Connect With Us! ');) resets the ordering. Is there a way around this?
comment on: http://stackoverflow.com/a/26110281
type: Comment
score: 0

http://stackoverflow.com/comment/41060726
comment on: http://stackoverflow.com/q/26186514
type: Comment
score: 0
has text: Sorry...didn't see your comment before I posted mine... :-) Thanks for the help...I've edited the question for clarity.
type: QuestionComment

http://stackoverflow.com/comment/41072600
comment on: http://stackoverflow.com/a/26193500
has text: Yes. The firewall is OK.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26143776
score: 0
has body: revome the e.preventDefault() $('#nav-mobile').click(function(e) { //e.preventDefault(); $('#nav-mobile ul').slideToggle(); }); look here to see the emulation: http://jsfiddle.net/m9bug6tk/2/
answers question: http://stackoverflow.com/q/26143141
type: Answer

http://stackoverflow.com/q/26168999
tagged with: overflow
upvote count: 1
has title: How to hide overflow on slideshow without hiding arrows?
downvote count: 1
type: Question
tagged with: slideshow
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26169223
has body: I want to make the overflow hidden to hide the second image in the slideshow (which if I don't, creates extra space in the bottom of my website) however when I do this, it also hides the arrows next and prev...How do I separate them and still keep the arrows in the correct position? And how do I make them responsive, let's say using percentage for width without it being misplaced? sorry long post. Please help! Thank you. This is the slideshow code: html css .diy-slideshow { position: relative; display: block; overflow: visible; width: 90%; margin-left: 5%; margin-right: 5%; } figure{ position: absolute; opacity: 0; overflow: hidden; transition: 1s opacity; } figure.show{ opacity: 1; position: static; overflow: hidden; transition: 1s opacity; } .next, .prev{ color: #fff; position: absolute; top: 50%; z-index: 1; opacity: .5; user-select: none; } .next:hover, .prev:hover{ cursor: pointer; opacity: 1; } .next{ right: -4%; border-top-left-radius: 3px; border-bottom-left-radius: 3px; } .prev{ left: -4%; border-top-right-radius: 3px; border-bottom-right-radius: 3px; } Javascript
answer count: 1
favorite count: 0
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26169223

http://stackoverflow.com/q/26041995
tagged with: javascript
tagged with: excel-formula
score: 0
has title: How To Compute Maximum Monthly Payment
accepted answer: http://stackoverflow.com/a/26132833
has comment: http://stackoverflow.com/comment/40794710
has answer: http://stackoverflow.com/a/26042491
tagged with: php
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26042491
has answer: http://stackoverflow.com/a/26132833
has body: (NOTE: Although this question refers to a spreadsheet to solve the problem, I am also open to using PHP or Javascript) I have a spreadsheet for forecasting my personal financial budget for the next 3 years. The goal is to pay as much as possible on the highest priority debt until it is paid off and then the next debt in priority begins to receive all extra monthly funds until it is paid and so on. I want the debt payments to auto calculate their payments, but I run into a circular reference error since computing the debt payment requires considering the debt balance which is computed using the debt payment. In addition the net income and thus checking balance use the debt payments to derive their values so it makes another circular reference when trying to self compute the debt payment. Is there a financial function that can compute the maximum possible payment without referencing the debt balance? Something that takes a starting balance and interest rate and looks at the sum of payments already made? I think I can get around the Checking Balance circular reference. Below is a sample of my spreadsheet. Income and Expense rows are manually input. Debt is currently manually entered as well but I want it to auto compute as outlined above. Net income, Checking Balance and Debt Balance are computed rows. --------------------------------------------------------------------------------------------- | | Jan | Feb | Mar | Apr | May | June | July | Aug | Sep | ... --------------------------------------------------------------------------------------------- | INCOME --------------------------------------------------------------------------------------------- | Salary 1 | 6500 | 6500 | 6500 | 6500 | 7000 | 7000 | 7000 | 7000 | 7000 | ... --------------------------------------------------------------------------------------------- | Salary 2 | 2500 | 2500 | 2500 | 2500 | 2500 | 2500 | 2500 | 2500 | 2500 | ... ----------------------------------------------------------------------…
has comment: http://stackoverflow.com/comment/40801151
type: Question
tagged with: financial
answer count: 2

http://stackoverflow.com/q/26107462
tagged with: twitter-bootstrap-3
type: Question
has title: Issue on Click and Alert on Button in Bootstrap Popover
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26107552
accepted answer: http://stackoverflow.com/a/26107552
has body: Can you please take a look at this demo and let me know why the $(".onealert").on("click",function(){ alert("You clicked on A"); }); is not functioning? here is the code I have : 1 2 3 Alphabet Select A B C I am not getting any error message too! Thanks
upvote count: 3
favorite count: 0
downvote count: 0
tagged with: twitter-bootstrap
type: AnsweredQuestion
score: 3

http://stackoverflow.com/q/26151441
downvote count: 0
has answer: http://stackoverflow.com/a/26151878
has title: 3 JavaScript files talking to each other
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40995446
score: 1
has body: How can 3 separate JavaScript files "talk to each other" outside of a browser? Can someone expound on how these 3 different JS files can use each other's code? How to avoid circular dependencies, etc? foo.js bar.js mud.js I know there are things like "var foo = require(./foo.js)" and "module.exports" but right now it's not making much sense.
upvote count: 1
has answer: http://stackoverflow.com/a/26151804
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40994902
answer count: 2

http://stackoverflow.com/comment/40997279
score: 4
comment on: http://stackoverflow.com/q/26152721
type: Comment
type: QuestionComment
has text: Java is to Javascript as Ham is to Hamster.

http://stackoverflow.com/a/26194896
type: Answer
has body: Try this... $('[id^='clickMe').click(function(event){ event.preventDefault() var i = this.id.replace('clickMe',''); $('#targetCollapse' + i).toggle(); if ($('#targetCollapse' + i).is(":visible")) { $('#change-icon' + i).removeClass('fa-plus').addClass('fa-minus'); } else { $('#change-icon' + i).addClass('fa-plus').removeClass('fa-minus'); } });
score: 0
answers question: http://stackoverflow.com/q/26194516

http://stackoverflow.com/a/26042558
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26040964
downvote count: 0
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26040964
has body: The following works having n arrays: function cartesianProduct(data) { var current = [[]]; for (var p in data) { var arr = data[p]; var newCurrent = []; for (var c = 0; c &lt; current.length; c++) { var baseArray = current[c]; for (var a = 0; a &lt; arr.length; a++) { var clone = baseArray.slice(); clone.push(arr[a]); newCurrent.push(clone); } } current = newCurrent; } return current; } for the following data: var data = { size: ['s', 'm'], color: ['blue', 'red'], version: ['run', 'walk', 'jump'] }; will return all the combinations: var variations = [ ["s","blue","run"], ["s","blue","walk"], ["s","blue","jump"], ["s","red","run"], ["s","red","walk"], ["s","red","jump"], ["m","blue","run"], ["m","blue","walk"], ["m","blue","jump"], ["m","red","run"], ["m","red","walk"], ["m","red","jump"] ];
has comment: http://stackoverflow.com/comment/40798425

http://stackoverflow.com/comment/40939105
type: AnswerComment
type: Comment
has text: That is why I say it would be hard to achieve. You would need to generate a lot more code and throw just the generic Error. I know that Typescript is compiled to javascript "on build".
comment on: http://stackoverflow.com/a/26121424
score: 0

http://stackoverflow.com/a/26090952
has comment: http://stackoverflow.com/comment/40954708
has comment: http://stackoverflow.com/comment/41024641
has body: Try this code: //EDIT2: Just try the code above so my script should do the rest! (comments) $(document).ready(function(){ var url="data_retrieval.php"; $("#jsondata tbody").html(""); $.getJSON(url,function(data){ $.each(data.uploads, function(i,user){ var newRow = " " +" "+user.height+" " +" "+user.brand+" " +" "+user.model+" " +" " ; $(newRow).appendTo("#jsondata tbody"); }); $.each(data.uploads, function(i,user){ var newdiv = ' '+user.DATASPECIFIC+' '+user.DATASPECIFIC2+' '+user.DATASPECIFIC3+' '; $(newdiv).appendTo("#jsondataspecific"); // Should be an DIV.... }); }); }); //EDIT: Added .mouseleave() to hide it.... $('#jsondata tr').mouseover(function(){ var row = $(this).prop('id'); $('#specific'+row).show(); }).mouseleave(function(){ var row = $(this).prop('id'); $('#specific'+row).hide(); }); height brand model 5 feet newbrand 55-v2 15 feet newbrand2 55-v3 51 feet newbrand3 65-v5 other info1 other info1 other info1 This is specific1 This is specific1 This is specific1 other info2 other info2 other info2 This is specific2 This is specific2 This is specific2 other info3 other info3 other info3 This is specific3 This is specific3 This is specific3 Greetings from Vienna
has comment: http://stackoverflow.com/comment/40993360
has comment: http://stackoverflow.com/comment/40889257
type: Answer
has comment: http://stackoverflow.com/comment/40994295
has comment: http://stackoverflow.com/comment/41025952
has comment: http://stackoverflow.com/comment/41030106
has comment: http://stackoverflow.com/comment/41057792
answers question: http://stackoverflow.com/q/26090855
has comment: http://stackoverflow.com/comment/41029236
has comment: http://stackoverflow.com/comment/41013180
score: 0
has comment: http://stackoverflow.com/comment/40967383
has comment: http://stackoverflow.com/comment/41031913

http://stackoverflow.com/comment/41052347
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26181803
type: Comment
has text: Thanks, that gives a clear explanation to my question. But for next time, I was just wondering if there is any concept in javascript by which arguments are passed to a function without any value and their values are altered/given a value inside the function body. So the arguments that are passed initially are more like placeholders.(Just to reiterate, this is about pure javascript and not d3). I ask this because I think I have heard something of that sort, can't really recollect. And time and again, I keep bumping into functions for which I can't figure out where value was given.

http://stackoverflow.com/q/26192887
tagged with: javascript
has comment: http://stackoverflow.com/comment/41071442
score: 0
answer count: 1
tagged with: jquery
has body: I have a piece of javascript/jquerycode, that's executed in between the document when a page loads. What it does, is takes the height of a particular div, and assigns it to another div. This works perfectly well in Firefox, but fails in the latest versions of all other browsers (Chrome, Opera, Safari, IE). I'm on Windows 7 Home Premium 64 Bit. Here's the code. It goes below a div when the page is generated. Works only in Firefox, and nothing else. '&lt;script type="text/javascript;"&gt;'. '$(document).ready(function() {'. '$(\'.s\').height($(\'.entry\').height());'. '});'. '&lt;/script&gt;'.
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: Javascript with jQuery in between document does not work
has comment: http://stackoverflow.com/comment/41071420
type: Question
has answer: http://stackoverflow.com/a/26192932
accepted answer: http://stackoverflow.com/a/26192932

http://stackoverflow.com/q/26044668
tagged with: javascript
has answer: http://stackoverflow.com/a/26044827
linked to: http://stackoverflow.com/q/25956768
answer count: 3
has comment: http://stackoverflow.com/comment/40800336
favorite count: 0
has body: Problem: I'd like to pass an array of variables into $watchGroup and loop through the array to update the values of each but this does not seem to work: $scope.secondsElapsed = stopWatchService.secondsElapsed; $scope.minutesElapsed = stopWatchService.minutesElapsed; $scope.colon = stopWatchService.colon; $scope.timers = ['stopWatchService.secondsElapsed', 'stopWatchService.minutesElapsed', 'stopWatchService.colon']; $scope.$watchGroup([$scope.timers], function(newValues, oldValues, scope){ if (newValues &amp;&amp; newValues !== oldValues){ for (var i=0; i&lt;newValues.length; i++){ scope.timers[i] = newValues[i]; } } }); The current work around I have is the following: $scope.$watchGroup(['stopWatchService.secondsElapsed', 'stopWatchService.minutesElapsed', 'stopWatchService.colon'], function(newValues, oldValues, scope){ scope.secondsElapsed = newValues[0]; scope.minutesElapsed = newValues[1]; scope.colon = newValues[2]; }); Any ideas?
has comment: http://stackoverflow.com/comment/40799836
tagged with: data-binding
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/33265958
upvote count: 1
has comment: http://stackoverflow.com/comment/40800141
tagged with: watch
score: 1
has comment: http://stackoverflow.com/comment/40800476
has comment: http://stackoverflow.com/comment/40800307
has comment: http://stackoverflow.com/comment/40800489
has title: Passing an array to $watchGroup and updating the array on change
type: Question
has answer: http://stackoverflow.com/a/31548510
tagged with: arrays
downvote count: 0

http://stackoverflow.com/a/26077820
score: 0
has comment: http://stackoverflow.com/comment/40880996
has body: You can use the jQuery load() method to insert specific content from a remote file: The .load() method, unlike $.get(), allows us to specify a portion of the remote document to be inserted. This is achieved with a special syntax for the url parameter. If one or more space characters are included in the string, the portion of the string following the first space is assumed to be a jQuery selector that determines the content to be loaded. For example, $("#result").load( "ajax/test.html #container" ); The element with an ID of container inside test.html, along with its contents, will be inserted into the element with an ID of result
type: Answer
answers question: http://stackoverflow.com/q/26076435

http://stackoverflow.com/a/26166759
score: 1
has body: You need to check if the map element exists before trying to run code on an element that does not exist on that page. You can do this on your window.onload function: var scaligeroMapElement = document.getElementById('scaligeroMap'); if (typeof(scaligeroMapElement) != 'undefined' &amp;&amp; scaligeroMapElement != null) { scaligeroMap(); } var alCorsaroMapElement = document.getElementById('alCorsaroMap'); if (typeof(alCorsaroMapElement) != 'undefined' &amp;&amp; alCorsaroMapElement != null) { alCorsaroMap(); } var oasiMapElement = document.getElementById('oasiMap'); if (typeof(oasiMapElement) != 'undefined' &amp;&amp; oasiMapElement != null) { oasiMap(); } This is assuming each of your maps have different IDs. If you have the jQuery included, you can just do: if ($('#alCorsaroMap').length &gt; 0) { oasiMap(); }
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26166371
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26166371

http://stackoverflow.com/comment/41014841
type: Comment
has text: Hi Jeff, can you please expand on the the alternative you gave. I simply want to check on my method that insertPostData.country is equal to an of the item listed in an array on the server side.
type: AnswerComment
comment on: http://stackoverflow.com/a/26158752
score: 0

http://stackoverflow.com/q/26194516
accepted answer: http://stackoverflow.com/a/26194595
has comment: http://stackoverflow.com/comment/41074678
tagged with: javascript
has answer: http://stackoverflow.com/a/26194896
score: 0
has title: How to repeat the same piece of code in JQuery with different number attached to each one?
answer count: 3
has answer: http://stackoverflow.com/a/26194683
has answer: http://stackoverflow.com/a/26194595
tagged with: jquery
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41074487
possible better answer: http://stackoverflow.com/a/26194683
tagged with: codeigniter
type: Question
has body: I am having issues to target elements which are created dynamically by PHP code. What I am trying to do is to toggle() element. It's kind of a news feed for the newest vacancies from the database. I made it work but it is really inefficient by manually writing the piece of jquery code to target the elements like so: $('#clickMe1').click(function(event){ event.preventDefault(); $('#targetCollapse1').toggle(); if ($('#targetCollapse1').is(":visible")) { $('#change-icon1').removeClass('fa-plus').addClass('fa-minus'); } else { $('#change-icon1').addClass('fa-plus').removeClass('fa-minus'); } }); $('#clickMe2').click(function(event){ event.preventDefault(); $('#targetCollapse2').toggle(); if ($('#targetCollapse2').is(":visible")) { $('#change-icon2').removeClass('fa-plus').addClass('fa-minus'); } else { $('#change-icon2').addClass('fa-plus').removeClass('fa-minus'); } }); How to make only one piece of this code and to apply for numbers from 1-5. I tried making in a for loop but still no success?? Here is the html/php code to see what is going on there. By the way I am using CodeIgniter and the parsing class so {vacancies} {/vacancies} is a for loop {vacancies} {job_title} {pubdate} {job_descr} {/vacancies}

http://stackoverflow.com/q/26075719
has answer: http://stackoverflow.com/a/26076369
linked to: http://stackoverflow.com/q/4988214
has title: Moving elements left and right in Javascript
type: UnansweredQuestion
has body: I'm trying to get an element to move in a random X and Y direction every second and every direction should be different for each element when a check box is clicked. The code I have so far is.... &lt;div id="exam" class="exam"&gt; Exam 1 &lt;input type="button" id="copy" value="Make Copy" onclick="makeCopy()" /&gt; &lt;input type="button" id="array" value="Get Array" onclick="makeArray()" /&gt; &lt;input type="checkbox" id="moving" onclick="doMove()"&gt;Making Them Move!! &lt;/div&gt; &lt;script&gt; function doMove() { moving.style.left = (moving.style.left+10)+'px'; setTimeout(doMove,1); } &lt;/script&gt; This isn't working for me...Does anyone know how I can improve the function to make them move like I stated above? This is the code I have now.... &lt;div id="exam" class="exam"&gt; Exam 1 &lt;input type="button" id="copy" value="Make Copy" onclick="makeCopy()" /&gt; &lt;input type="button" id="array" value="Get Array" onclick="makeArray()" /&gt; &lt;input type="checkbox" id="moving" onclick="doMove()"&gt;Making Them Move!! &lt;/div&gt; &lt;script&gt; function doMove() { var moving = document.getElementById("moving"); moving.style.left = (moving.style.left+10)+'px'; } setTimeout(doMove,1000); &lt;/script&gt;
type: Question
answer count: 2
tagged with: javascript
score: 0
tagged with: element
has answer: http://stackoverflow.com/a/26075828
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26170391
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26169743
accepted answer of: http://stackoverflow.com/q/26169743
type: Answer
has body: Use this within your each callbacks instead of a jQuery selector Retrieve this value with $(this).val(); For more information regarding this read the documentation regarding this and the object method here $('input[name="target"]').each(function () { console.log($(this).val()); // 'this' is each iteration of the each loop });
score: 0

http://stackoverflow.com/q/26176836
has answer: http://stackoverflow.com/a/26177971
has title: javascript/jquery - replace text with global variable
has body: I've created a documentation of an api which contains api endpoints, curl call syntax. It's a pure html document with pre and blockquote tags for code blocks. Currently the documnetation is for version 1.0. So the api calls are as below: https://api.xxx.com/v1 Now we are going to release next version. And the url will be changed to https://api.xxx.com/v1.1 and so on. It is very tidious to change all urls manually in the documentation. So I created a global variable as below and thought that only one change will reflect to all urls in documentation. window._respapiurl = "https://api.xxx.com/v1"; My way is to change version number in a variable so it will work for all the urls. And tried to replace it in a pre tag as . But it didn't work due to the behaviour of pre tag. How do replace all the urls in documentation with global variable ???
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41041813
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/40998735
type: QuestionComment
comment on: http://stackoverflow.com/q/26153286
has text: there are no value attribs or type addribs on your input tags. What should be passed it the name=value pair.
score: 0
type: Comment

http://stackoverflow.com/q/26093497
score: 1
type: Question
has comment: http://stackoverflow.com/comment/40891885
tagged with: internet-explorer
has body: I want to blink a div in my form continuously, while this div is blinking I should be able to do anything in my form (in other divs). I am blinking div using function blinking(div) { timer = setInterval(blink, 2000); function blink() { div.fadeOut(800, function () { div.fadeIn(800); }); $("#dvTbCallbackTitle").fadeOut(800, function () { $("#dvTbCallbackTitle").fadeIn(800); }); } } However after 5-10 minutes this gives me "System out of memeory exception" error: at line : return this.animate( props, speed, easing, callback ); What could be cause of this error? And how to fix it?
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40895520
has comment: http://stackoverflow.com/comment/40890975
has comment: http://stackoverflow.com/comment/40889664
has comment: http://stackoverflow.com/comment/40889543
favorite count: 0
has comment: http://stackoverflow.com/comment/40889396
answer count: 0
type: UnansweredQuestion
upvote count: 1
has title: Jquery Out of memory error
tagged with: internet-explorer-8

http://stackoverflow.com/a/54755091
downvote count: 1
answers question: http://stackoverflow.com/q/26156292
has body: I like the solution from @Pho3niX83... Let's extend it with "word" instead of "char"... function trimWord(_string, _word) { var splitted = _string.split(_word); while (splitted.length &amp;&amp; splitted[0] === "") { splitted.shift(); } while (splitted.length &amp;&amp; splitted[splitted.length - 1] === "") { splitted.pop(); } return splitted.join(_word); };
score: 0
upvote count: 1
type: Answer

http://stackoverflow.com/comment/40796522
score: 1
type: AnswerComment
has text: 072 101 108 108 111 @LightnessRacesinOrbit
comment on: http://stackoverflow.com/a/26038083
type: Comment

http://stackoverflow.com/a/26095512
accepted answer of: http://stackoverflow.com/q/26095180
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
has body: You will have to break down your application as it is a humongous task to create something like GA. You will have to track many user activities(click,spend time etc).so you can do that in plain js or use a cross-platform lightweight library(angular.js) that can make your life a little easy. Now since you will have to send large set of traced data to you database with minimum latency,use Node.js in this scenario.Simple Ajax call would also work but then it would be very slow. Now comes your database.Prefer NoSql since it suits your requirement of unstructured data ,preferrablly MongoDb which can help you with its own mapReduce,large storage capacity .Since there will be lot of calculation involved you can use your python knowledge which can help you process data a lot faster.you can use other languages as well(eg.Go) Your processed data and results can then be stored in Redis(which acts as a caching layer). you can use sophisticated graphic library like d3.js,Highcharts.js for displaying Graphical data on the client-side. There are a lot of factors that can be involved.This is just a very basic outline of what you could do.
type: Answer
answers question: http://stackoverflow.com/q/26095180

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/26069269
tags question: http://stackoverflow.com/q/26184925
tags question: http://stackoverflow.com/q/26066870
tags question: http://stackoverflow.com/q/26153520
tags question: http://stackoverflow.com/q/26165642
tags question: http://stackoverflow.com/q/26190989
tags question: http://stackoverflow.com/q/26039960
tags question: http://stackoverflow.com/q/26129854
tags question: http://stackoverflow.com/q/26079611
tags question: http://stackoverflow.com/q/26060083
tags question: http://stackoverflow.com/q/26140707
tags question: http://stackoverflow.com/q/26045313
tags question: http://stackoverflow.com/q/26154376
tags question: http://stackoverflow.com/q/26143371
tags question: http://stackoverflow.com/q/26104941
tags question: http://stackoverflow.com/q/26185285
tags question: http://stackoverflow.com/q/26132357
tags question: http://stackoverflow.com/q/26086081
tags question: http://stackoverflow.com/q/26126585
tags question: http://stackoverflow.com/q/26163842
tags question: http://stackoverflow.com/q/26055945
tags question: http://stackoverflow.com/q/26130342
tags question: http://stackoverflow.com/q/26105469
tags question: http://stackoverflow.com/q/26095265
tags question: http://stackoverflow.com/q/26156477
tags question: http://stackoverflow.com/q/26079653
tags question: http://stackoverflow.com/q/26100091
tags question: http://stackoverflow.com/q/26165981
tags question: http://stackoverflow.com/q/26041384
tags question: http://stackoverflow.com/q/26160902
tags question: http://stackoverflow.com/q/26050934
tags question: http://stackoverflow.com/q/26135135
tags question: http://stackoverflow.com/q/26054853
tags question: http://stackoverflow.com/q/26046564
tags question: http://stackoverflow.com/q/26156139
tags question: http://stackoverflow.com/q/26151560
tags question: http://stackoverflow.com/q/26063447
tags question: http://stackoverflow.com/q/26159217
tags question: http://stackoverflow.com/q/26126765
tags question: http://stackoverflow.com/q/26141026
tags question: http://stackoverflow.com/q/26106325
tags question: http://stackoverflow.com/q/26063746
tags question: http://stackoverflow.com/q/26076625
tags question: http://stackoverflow.com/q/26158468
tags question: http://stackoverflow.com/q/26104898
tags question: http://stackoverflow.com/q/26111564
tags question: http://stackoverflow.com/q/26073927
tags question: http://stackoverflow.com/q/26156177
tags question: http://stackoverflow.com/q/26083319
tags question: http://stackoverflow.com/q/26126491
tags question: http://stackoverflow.com/q/26127126
tags question: http://stackoverflow.com/q/26192556
tags question: http://stackoverflow.com/q/26110835
tags question: http://stackoverflow.com/q/26136310
tags question: http://stackoverflow.com/q/26099938
tags question: http://stackoverflow.com/q/26062098
tags question: http://stackoverflow.com/q/26075401
tags question: http://stackoverflow.com/q/26156166
tags question: http://stackoverflow.com/q/26116813
tags question: http://stackoverflow.com/q/26047636
tags question: http://stackoverflow.com/q/26063760
tags question: http://stackoverflow.com/q/26132604
tags question: http://stackoverflow.com/q/26073189
tags question: http://stackoverflow.com/q/26119347
tags question: http://stackoverflow.com/q/26106138
tags question: http://stackoverflow.com/q/26158493
tags question: http://stackoverflow.com/q/26157733
tags question: http://stackoverflow.com/q/26071079
type: Tag
tags question: http://stackoverflow.com/q/26058876
tags question: http://stackoverflow.com/q/26102800
tags question: http://stackoverflow.com/q/26175144
tags question: http://stackoverflow.com/q/26105230
tags question: http://stackoverflow.com/q/26097731
tags question: http://stackoverflow.com/q/26128150
tags question: http://stackoverflow.com/q/26041654
tags question: http://stackoverflow.com/q/26193997
tags question: http://stackoverflow.com/q/26183258
tags question: http://stackoverflow.com/q/26179502
tags question: http://stackoverflow.com/q/26039154

http://stackoverflow.com/q/26180938
has comment: http://stackoverflow.com/comment/41049967
tagged with: php
has comment: http://stackoverflow.com/comment/41049536
has comment: http://stackoverflow.com/comment/41050234
has comment: http://stackoverflow.com/comment/41050438
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/3076414
has comment: http://stackoverflow.com/comment/41049803
score: 1
has comment: http://stackoverflow.com/comment/41049800
upvote count: 1
accepted answer: http://stackoverflow.com/a/26181159
type: Question
has title: xmlhttp request status always returns 0
has comment: http://stackoverflow.com/comment/41049695
has comment: http://stackoverflow.com/comment/41050067
has comment: http://stackoverflow.com/comment/41049491
has comment: http://stackoverflow.com/comment/41050008
has comment: http://stackoverflow.com/comment/41049866
has comment: http://stackoverflow.com/comment/41050106
has comment: http://stackoverflow.com/comment/41049824
has body: I have a function which does get requests using plain old JS. function get(url,funct){ var xmlhttpget = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"); xmlhttpget.onreadystatechange=function(){ if (xmlhttpget.readyState==4 &amp;&amp; xmlhttpget.status==200){ funct(xmlhttpget.responseText); } } xmlhttpget.open("GET",url,true); xmlhttpget.send(); } I use it like this: get(url, function(resp){ window.alert(resp); }); When my callback function stopped working I modified my get() function to the following for debugging: function get(url,funct){ var xmlhttpget = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"); xmlhttpget.onreadystatechange=function(){ window.alert("ready state: "+xmlhttpget.readyState+" // status: "+xmlhttpget.status); if (xmlhttpget.readyState==4 &amp;&amp; xmlhttpget.status==200){ window.alert("responded..."); funct(xmlhttpget.responseText); } } window.alert(url); xmlhttpget.open("GET",url,true); xmlhttpget.send(); } With this I discovered that, during each readystate change the readystate will progress from 1 to 2 to 4, but the status always stays at 0 so my callback is never called, however, when I copy the alerted url to the browser it works fine. What's going on? Is my browser caching the page? How can I fix it (set a specific header on the requested page with php??)? Oh, not sure if this is relevant, but the page that's calling the function is inside of a frame whose parent document includes the same JavaScript file.
answer count: 1
has comment: http://stackoverflow.com/comment/41049834
has comment: http://stackoverflow.com/comment/41050285
downvote count: 0
tagged with: header
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41049741
tagged with: ajax
has answer: http://stackoverflow.com/a/26181159
has comment: http://stackoverflow.com/comment/41049738
tagged with: http-status-codes

http://stackoverflow.com/a/26099787
answers question: http://stackoverflow.com/q/26099577
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26099577
has body: Call $scope.$apply() when the scope changes $scope.progress = Math.round((progress.loaded * 100.0) / progress.total); if(!$scope.$$phase) { $scope.$apply() } as it may be that the upload function is called outside angularjs scope. Calling $scope.$apply() will cause the digest cycle to run so the view changes

http://stackoverflow.com/comment/41008345
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26157767
has text: @AlexJoukovsky If there is an other layer visible when you are hovering the link(with the inspector).

http://stackoverflow.com/comment/40923356
comment on: http://stackoverflow.com/q/26112503
type: Comment
has text: you can see my count i'm new to this stackoverflow and fiddle
score: 0
type: QuestionComment

http://stackoverflow.com/a/26263026
downvote count: 0
has body: Actually, as a best practice, you should be doing something like this: App = Ember.Application.create(); App.ApplicationController = Ember.Controller.extend({ colors: ['blue', 'green'] }); App.ColorSelector = Ember.Select.extend({ didInsertElement: function() { this._super(); Ember.run.scheduleOnce('afterRender', this, this.afterRenderEvent); }, afterRenderEvent: function(){ console.log(this.$().find('option').size()); // logs 2 this.$().colorselector(); } }); Ember.Handlebars.helper('color-selector', App.ColorSelector);
answers question: http://stackoverflow.com/q/26163402
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/40910073
type: Comment
comment on: http://stackoverflow.com/a/26105161
type: AnswerComment
has text: So if I enable CORS on the server, I should be able to send a PUT request
score: 0

http://stackoverflow.com/q/26080776
has title: HTML / Java Script Canvas - how to draw an image between source and destination points?
accepted answer: http://stackoverflow.com/a/26081450
tagged with: image
tagged with: draw
type: Question
tagged with: canvas
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40867164
has answer: http://stackoverflow.com/a/26081450
upvote count: 2
has body: I've tried to use the drawImage function of the canvas. In the documentation (http://msdn.microsoft.com/en-us/library/ie/ff975414(v=vs.85).aspx) I thought the last two parameters are the destination point, but I guess it's not because it's not working. Is there a way to draw image between two points without rotate it or something like this? Thanks!
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/26103231
tagged with: validation
answer count: 1
has comment: http://stackoverflow.com/comment/40915035
has body: I am using .slideToggle() to hide/show 2 div's that are part of the same form. The first section is the User Information and the second section is the order section. Everything is working great except if the user has the top section (the user information) hidden through the slideToggle, but it is not valid (meaning a field is missing data or isn't the right data) when they click the Submit button it just highlights the fields red and puts a message in the bottom right corner of the browser (in this case, firefox) saying "this field isn't valid". But the user doesn't know which field isn't valid unless they click the div to make it activate slideToggle again. I'm trying to make it so when a User clicks on the submit button, if the form isn't valid (using HTML5 "required" field or pattern) that it will show the hidden (through slideToggle) div so the user knows why their form didn't go through. Here is the code i've tried so far: $("form").submit(function(){ var testvalue = "Hi!"; alert(testvalue); if (!$(this).valid()) { $("#user_info_div_2").show(); $("#user_info_div_3").show(); } }); I also tried: ("#po_form") which is the ID of my form, instead of ("form"), but it wasn't any different. What ive found is, this code only fires if the form is valid to begin with. (the alert is just how I test to make sure the code is firing) which means the submit() function only fires if the form is actually submitted (which makes sense). I also tried: $("#po_submit_button").click(function(){ if (!$(this).valid()) { var testvalue = "Not Valid Form"; alert(testvalue); } }); This also had no affect on clicking the button. I'm not using javascript validation so maybe that's why the .valid() is failing is because i'm not using it properly? The form is simple, it just has "required" attributes on some of the fields and 1 of them uses a pattern attribute to make sure the state is only 2 characters. I can post the code of the form if you need it, but its "simple" by design but not simply w…
has title: Show a Hidden Div on submit but form isn't valid
accepted answer: http://stackoverflow.com/a/26103446
type: AnsweredQuestion
tagged with: forms
type: Question
has answer: http://stackoverflow.com/a/26103446
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/26126679
answers question: http://stackoverflow.com/q/26126538
has comment: http://stackoverflow.com/comment/40953817
has comment: http://stackoverflow.com/comment/40954087
has comment: http://stackoverflow.com/comment/40955713
score: 0
has body: Ok, take it! http://jsfiddle.net/a126cwb3/11/ // handle links with @href started with '#' only $(document).on('click', 'a[href^="#"]', function(e) { // target element id var id = $(this).attr('href'); // target element var $id = $(id); if ($id.size() === 0) { return; } // prevent standard hash navigation (avoid blinking in IE) e.preventDefault(); // top position relative to the document var pos = $(id).offset().top; // animated top scrolling $('body, html').animate({scrollTop: pos}); });
has comment: http://stackoverflow.com/comment/40955564
type: Answer

http://stackoverflow.com/a/26115876
upvote count: 2
answers question: http://stackoverflow.com/q/26115678
type: Answer
has comment: http://stackoverflow.com/comment/40930216
score: 2
has body: You should check the documentation before you ask a question, $( "#slider-vertical" ).slider( "option", "max", 300 ); http://api.jqueryui.com/slider/ To execute the code within php you can echo the statement as such: &lt;?php echo "&lt;script&gt; $( '#slider-vertical' ).slider( 'option', 'max', " + $_max + "); &lt;/script&gt;"; ?&gt;
has comment: http://stackoverflow.com/comment/40930316
downvote count: 0
has comment: http://stackoverflow.com/comment/40937783

http://stackoverflow.com/q/26076382
has body: So I have the following HTML: 30 What I want to do is get the number inside the with class 'amount' within each calculator-section based on the span with class 'x'. There can be multiple divs with the class 'calculator-section' and multiple within those with varying spans. Roughly what I want to do (I'm aware this won't work, it's just to show what I'm trying to do): var amount = 0; $('.calculator-section p').each(function(i, obj) { if($(this).$('span').className == "x") { //Set 'amount' variable to value within with class 'amount' within the same . } }); Hopefully this example makes sense. Any ideas?
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26076437
tagged with: css
has answer: http://stackoverflow.com/a/26076406
possible better answer: http://stackoverflow.com/a/26076406
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26076437
type: Question
has title: Get value of based on other class within div?
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26110115
has body: This block: var total=0; var yourmark="your score is "; if(document.getElementById('q12').checked) { total=total+1; }else { total=total; } runs at the beginning of of the page, as it is loading. At this point total is, in fact 0. When you click the button, all you're asking for is the value of 'total. At no point are you updating the value oftotal` after you change the options. The simplest solution, as PM 77-1 suggested, is to move the calculation inside the function, so that total is calculated every time you need an updated answer. sssdsdsdsd Mypage.com myPage Question 1-first option Question 1- second option Question 1- third option Show my score
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26109988

http://stackoverflow.com/a/26116241
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/41009723
answers question: http://stackoverflow.com/q/26114659
has comment: http://stackoverflow.com/comment/40972288
accepted answer of: http://stackoverflow.com/q/26114659
score: 0
has body: What i would do is, Start with naming all your custom inputs the same, like "custom1" and then get your javascript to increase the last number by one each time, like "custom2", "custom3", and so on. Then i would make a loop in my php script checking if empty() on "custom1", and just make that number increase for each time, if then one comes up empty, you have reached the end, meaning you can exit out of the loop. and then you have all your values you can insert where ever you want. I will try showing you some example code below. for ($x=1; $x=0; $x++) { if (!empty($_POST["custom".$x]) { //The user have this custom field, and type something in it. } else { //This is the end of the custom fields. $x=0; } }

http://stackoverflow.com/comment/40844021
score: 0
type: Comment
has text: @C-linkNepal Huh? basically my point is that `this` is a bad part of javascript. It's a parameter just like any other (if you only use `.call()` to invoke functions it becomes very obvious). The only differences are 1) you don't get to name it and 2) if you use the shorthand `fn()` syntax of invocation javascript just takes a guess at what it should be. Its almost always better to use a regular parameter instead.
comment on: http://stackoverflow.com/a/26068723
type: AnswerComment

http://stackoverflow.com/comment/40940046
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26117669
has text: @enguerranws ohh, my fault, didn't tested it, thanks
type: Comment

http://stackoverflow.com/q/26113782
tagged with: javascript
has answer: http://stackoverflow.com/a/26114175
score: 0
answer count: 1
tagged with: http://stackoverflow.com/tag/html
has body: 1). I have tried to make a solution to read string such as '1.120.000' as integer and make calculation with other value. 2). I need to customize user interface to convert string value as currency ? Exp : '12000' to '12.000' Note : my country currency using '.' as thousand separator..
accepted answer: http://stackoverflow.com/a/26114175
type: AnsweredQuestion
type: Question
has title: How convert number to currency vise versa ? (html input/output)
has comment: http://stackoverflow.com/comment/40925449

http://stackoverflow.com/q/26150232
has answer: http://stackoverflow.com/a/26150465
has answer: http://stackoverflow.com/a/48592904
has answer: http://stackoverflow.com/a/57336710
has answer: http://stackoverflow.com/a/56201048
linked to: http://stackoverflow.com/q/29963129
has answer: http://stackoverflow.com/a/61748277
has answer: http://stackoverflow.com/a/53373813
has answer: http://stackoverflow.com/a/45363133
type: Question
has comment: http://stackoverflow.com/comment/117844640
has answer: http://stackoverflow.com/a/66366060
has title: How can I access Promise resolution callbacks outside the Promise constructor callback’s scope?
upvote count: 549
tagged with: es6-promise
possible better answer: http://stackoverflow.com/a/34637436
tagged with: javascript
answer count: 23
has comment: http://stackoverflow.com/comment/126278526
has answer: http://stackoverflow.com/a/54411328
has comment: http://stackoverflow.com/comment/98882655
has answer: http://stackoverflow.com/a/56547429
has answer: http://stackoverflow.com/a/71158892
downvote count: 1
has answer: http://stackoverflow.com/a/58610922
has answer: http://stackoverflow.com/a/41604402
has body: Ordinarily, a Promise is constructed and used like this: new Promise((resolve, reject) =&gt; { const obj = new MyEventEmitter(); obj.onsuccess = (event) =&gt; { resolve(event.result); }; obj.onerror = (event) =&gt; { reject(event.error); }; }); But recently, I have been doing something like this to take the resolver outside the executor callback for the sake of flexibility: let outsideResolve; let outsideReject; new Promise((resolve, reject) =&gt; { outsideResolve = resolve; outsideReject = reject; }); And later: onClick = function() { outsideResolve(); } This works fine, but is there an easier way to do this? If not, is this a good practice?
favorite count: 0
linked to: http://stackoverflow.com/q/44728779
has answer: http://stackoverflow.com/a/69027809
tagged with: promise
has answer: http://stackoverflow.com/a/78638504
has comment: http://stackoverflow.com/comment/64743803
has comment: http://stackoverflow.com/comment/86267717
has answer: http://stackoverflow.com/a/72539883
has answer: http://stackoverflow.com/a/34637436
has answer: http://stackoverflow.com/a/53082289
has answer: http://stackoverflow.com/a/57385940
has answer: http://stackoverflow.com/a/77808165
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/79364258
has answer: http://stackoverflow.com/a/47112177
has comment: http://stackoverflow.com/comment/40992665
score: 548
has answer: http://stackoverflow.com/a/36072263
accepted answer: http://stackoverflow.com/a/36072263

http://stackoverflow.com/comment/41063634
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26188162
has text: You're right. Silly me.
type: Comment

http://stackoverflow.com/q/26137147
upvote count: 1
type: Question
score: 1
has title: VueJS transitions using v-view
accepted answer: http://stackoverflow.com/a/26153260
tagged with: vue.js
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: mvvm
type: AnsweredQuestion
has body: I'm looking to animate the appearance of new elements and the disappearance of old elements when you change the component a v-view element is bound to. However because changing the ViewModel actually destroys the DOM element, this doesn't seem to work (the boxes are supposed to fade/shrink when they disappear): var vm = new Vue({ el: "#container", data: { currentView: "" } }); Vue.component("red", { template: " " }); Vue.component("blue", { template: " " }); .red { background-color: red; } .blue { background-color: blue; } .box { transition: all 3s ease; height: 200px; width: 200px; opacity: 1; } .box.v-enter, .box.v-leave { height: 0; width: 0; opacity: 0; } Red Blue Is there any native VueJS method of making this animation work?
has answer: http://stackoverflow.com/a/26153260

http://stackoverflow.com/q/26066768
has answer: http://stackoverflow.com/a/43206604
favorite count: 0
upvote count: 8
tagged with: template-engine
score: 7
has body: In a handlebars template, how do you set a radio button group to the right value using only the template? Can this be done directly in the template? For an example, let's say there's a radio button group like this: Auto On Off The data coming into the template has a value for mode: {mode: "on"} I want to end up with this after template expansion: Auto On Off So that the HTML in the form initially shows the "on" value being selected.
answer count: 4
tagged with: mustache
has answer: http://stackoverflow.com/a/26067434
type: UnansweredQuestion
tagged with: handlebars.js
downvote count: 1
has answer: http://stackoverflow.com/a/50651260
has title: How to set the selected item in a radio button group in handlebars template?
type: Question
has answer: http://stackoverflow.com/a/50904571
tagged with: javascript

http://stackoverflow.com/q/26086007
has title: How do I dynamically change the gradient of a div with jQuery
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40876359
type: Question
has answer: http://stackoverflow.com/a/26086057
accepted answer: http://stackoverflow.com/a/26086057
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I have a div with a gradient that I want the user to be able to change dynamically. The div style is: &lt;div id="colourGradientDiv" style="background: &lt;?php echo $colour_start; ?&gt;; background: -moz-linear-gradient(top, &lt;?php echo $colour_start; ?&gt; 0%, &lt;?php echo $colour_end; ?&gt; 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,&lt;?php echo $colour_start; ?&gt;), color-stop(100%,&lt;?php echo $colour_end; ?&gt;)); background: -webkit-linear-gradient(top, &lt;?php echo $colour_start; ?&gt; 0%,&lt;?php echo $colour_end; ?&gt; 100%); background: -o-linear-gradient(top, &lt;?php echo $colour_start; ?&gt; 0%,&lt;?php echo $colour_end; ?&gt; 100%); background: -ms-linear-gradient(top, &lt;?php echo $colour_start; ?&gt; 0%,&lt;?php echo $colour_end; ?&gt; 100%); background: linear-gradient(to bottom, &lt;?php echo $colour_start; ?&gt; 0%,&lt;?php echo $colour_end; ?&gt; 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='&lt;?php echo $colour_start; ?&gt;', endColorstr='&lt;?php echo $colour_end; ?&gt;',GradientType=0 );"&gt; I am using Ajax to change the colour with the following code: $("#colourGradientDiv").css({"background" : colour_start, "background" : "-webkit-gradient(linear, left top, left bottom, color-stop(0%, "+colour_start+"), color-stop(100%, "+colour_end+"))", "background" : "-webkit-linear-gradient(top, "+colour_start+" 0%, "+colour_end+" 100%)", "background" : "-o-linear-gradient(top, "+colour_start+" 0%, "+colour_end+" 100%)" "background" : "-ms-linear-gradient(top, "+colour_start+" 0%, "+colour_end+" 100%)", "background" : "linear-gradient(to bottom, "+colour_start+" 0%, "+colour_end+" 100%)", "filter" : "progid:DXImageTransform.Microsoft.gradient( startColorstr='"+colour_start+"', endColorstr='"+colour_end+"',GradientType=0 )" }); The above code doesn't chagne the div at all. However, if I just set the first "background" property then I change the whole colour of the div so I know t…
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40875187

http://stackoverflow.com/comment/40986959
type: Comment
type: QuestionComment
has text: There is a `greet` function created for every `Person` instance, whereas there's only one `protoGreet` function, which is shared between all instances.
comment on: http://stackoverflow.com/q/26147293
score: 2

http://stackoverflow.com/comment/40806489
has text: Can you tell if you are doing some form validation work ? Cause there is a *much simpler* way to do that, without watching objects & all. I think you're going to a wrong way. Tell moar, if you want we could go to the chat
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26041578

http://stackoverflow.com/comment/40950700
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26127309
score: 0
has text: See my comment above yours.

http://stackoverflow.com/a/26171337
has body: Here you go... http://jsfiddle.net/tdyhq8z7/2/ $(function () { $("#RadioButtonList1 :radio").click(function () { var $rows = $("#gv_grid tr:gt(0)").show(); switch (this.value) { case "HideRequested": $rows.filter(function(){ return $('td:first&gt;:checkbox',this).is(":checked") }).hide(); break; case "ShowRequested": $rows.filter(function(){ return !$('td:first&gt;:checkbox',this).is(":checked") }).hide(); break; } }) }); //another solution: $(function () { $("#RadioButtonList1 :radio").click(function () { var $rows = $("#gv_grid tr:gt(0)").show(), $val=this.value; if(this.value != "All"){ $rows.filter(function(){ var $checked = $('td:first&gt;:checkbox',this).is(":checked"); if($val == "HideRequested") return $checked; else if($val == "ShowRequested") return !$checked; }).hide(); } }) });
has comment: http://stackoverflow.com/comment/41055429
has comment: http://stackoverflow.com/comment/41047331
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26167161
has comment: http://stackoverflow.com/comment/41055566
answers question: http://stackoverflow.com/q/26167161
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/26061195
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40829932
has comment: http://stackoverflow.com/comment/40829630
has title: php post displays empty message and no output
has comment: http://stackoverflow.com/comment/40830682
type: Question
upvote count: 2
score: 0
answer count: 2
downvote count: 2
has body: I am trying to send a group of variables and using PDO to insert into my database, however when i run the page, i get an empty message box and nothing is happening on the page. This is how I am getting the user inputs. COMPANY ON AMAZON WANTS YOU TO TEST AND REVIEW IT’S PRODUCT! index.html Click to Save get.php <?php //configuration $host = "localhost"; $name = "lpages"; $user = "root"; $pass = "****"; //connection $odb = new PDO("mysql:host=".$host.";dbname=".$name,$user,$pass); //new data if(isset($_POST['edit1a'])){ $edit1 = $_POST['edit1a']; $edit2 = $_POST['edit2a']; $edit3 = $_POST['edit3a']; $edit4 = $_POST['edit4a']; $edit5 = $_POST['edit5a']; $edit6 = $_POST['edit6a']; $edit7 = $_POST['edit7a']; $edit8 = $_POST['edit8a']; $edit9 = $_POST['edit9a']; $edit10 = $_POST['edit10a']; $edit11 = $_POST['edit11a']; $q = "INSERT INTO webpages1(edit1, edit2, edit3, edit4, edit5, edit6, edit7, edit8, edit9, edit10, edit11) values (:edit1, :edit2, :edit3, :edit4, :edit5, :edit6, :edit7, :edit8, :edit9, :edit10, :edit11);"; $query = $odb->prepare($q); $results = $query->execute(array( ":edit1"=>$edit1, ":edit2"=>$edit2, ":edit3"=>$edit3, ":edit4"=>$edit4, ":edit5"=>$edit5, ":edit6"=>$edit6, ":edit7"=>$edit7, ":edit8"=>$edit8, ":edit9"=>$edit9, ":edit10"=>$edit10, ":edit11"=>$edit11 )); } ?> I am fairly new to using PDO so maybe I am having an issue with the formatting
has comment: http://stackoverflow.com/comment/40829848
has comment: http://stackoverflow.com/comment/40830085
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/26061271
has comment: http://stackoverflow.com/comment/40830055
has answer: http://stackoverflow.com/a/26061271
has comment: http://stackoverflow.com/comment/40829842
tagged with: php
has comment: http://stackoverflow.com/comment/40829653
has answer: http://stackoverflow.com/a/26062491
accepted answer: http://stackoverflow.com/a/26062491
tagged with: pdo
has comment: http://stackoverflow.com/comment/40830585

constraints
type: Tag
tags question: http://stackoverflow.com/q/26179222
tag name: constraints

http://stackoverflow.com/a/26076100
downvote count: 0
has comment: http://stackoverflow.com/comment/40860147
score: 1
has comment: http://stackoverflow.com/comment/40863556
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26074070
answers question: http://stackoverflow.com/q/26074070
type: Answer
has comment: http://stackoverflow.com/comment/40858801
has body: It doesn't support nested statements, but try this: {\?if ([^{}]+)}(.*?)({\?elseif [^{}]+}.*?)*(?:{\?else}(.+?))?{\?endif} Group 2 will capture an empty string if there are no {?elseif} statements. Group 3 won't exist if there's no {else} statement. See demo. Explanation: {\?if // match "{?if " literally ([^{}]+)// capture the condition in group 0 }// match "}" (.*?)// capture the content of the {if} branch in group 1 (// in group 2,... {\?elseif //...capture "{?elseif "... [^{}]+//...a condition... }//..."}"... .*?// and the content of the {elseif} branch... )*//...as often as possible. (?:// if possible,... {\?else}//...match "{?else}"... (.+?)//...and the content of the {else} branch. )? {\?endif}// finally, match "{?endif}".

http://stackoverflow.com/q/26189710
has comment: http://stackoverflow.com/comment/41069349
tagged with: submit
has body: I'm writing a "change password" form but I'm not too good with javascript and I need a bit of help :) This is my current function: function changeformhash(form, currentpwd, password, conf) { // Check each field has a value if (currentpwd.value == '' || password.value == '' || conf.value == '') { alert('¡Debes proporcionar todos los datos solicitados!'); form.currentpwd.focus(); return false; } // Check that the current password is sufficiently long (min 6 chars) // The check is duplicated below, but this is included to give more // specific guidance to the user if (currentpwd.value.length &lt; 6) { alert('Tu contraseña actual debe contener, como mínimo, 6 carácteres. Por favor, intentalo de nuevo.'); currentpwd.value = ""; password.value = ""; conf.value = ""; form.currentpwd.focus(); return false; } // At least one number, one lowercase and one uppercase letter // At least six characters re = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}/; if (!re.test(currentpwd.value)) { alert('Tu contraseña actual debe contener, como mínimo, 1 númnero y 1 letra mayúscula y minúscula. Por favor, intentalo de nuevo.'); currentpwd.value = ""; password.value = ""; conf.value = ""; form.currentpwd.focus(); return false; } // Check that the new password does not match with the current password // and is sufficiently long (min 6 chars) // The check is duplicated below, but this is included to give more // specific guidance to the user if (password.value == currentpwd.value) { alert('¡No puedes usar la misma contraseña!'); currentpwd.value = ""; password.value = ""; conf.value = ""; form.currentpwd.focus(); return false; } if (password.value.length &lt; 6) { alert('La contraseña debe contener, como mínimo, 6 carácteres. Por favor, intentalo de nuevo.'); currentpwd.value = ""; password.value = ""; conf.value = ""; form.currentpwd.focus(); return false; } // At least one number, one lowercase and one uppercase letter // At least six characters var re = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}/; if (!r…
tagged with: return
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/1357118
has comment: http://stackoverflow.com/comment/41069346
tagged with: php
answer count: 0
has comment: http://stackoverflow.com/comment/41069467
has title: php javascript validate and send current and new password
has comment: http://stackoverflow.com/comment/41072441
type: Question
has comment: http://stackoverflow.com/comment/41072701
tagged with: javascript
score: 0

http://stackoverflow.com/comment/40910224
type: Comment
has text: possible duplicate of [AngularJS - get element attributes values](http://stackoverflow.com/questions/24673418/angularjs-get-element-attributes-values)
type: QuestionComment
comment on: http://stackoverflow.com/q/26105185
score: 0

http://stackoverflow.com/comment/40859680
type: QuestionComment
comment on: http://stackoverflow.com/q/26077544
score: 0
has text: $("#idh").val(); <-- I don't see an element with this ID in your HTML
type: Comment

http://stackoverflow.com/comment/40899593
type: QuestionComment
comment on: http://stackoverflow.com/q/26059258
has text: event propagation works only in the controllers which are currently exist. Can you post a plunker example to describe your problem
score: 0
type: Comment

http://stackoverflow.com/comment/40984399
has text: Aleksei Mialkin much appreciated for the help. I guess I was looking at the wrong class definition or something because the object model I found kept showing me the previous definition. Thanks again.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26127270
type: Comment

http://stackoverflow.com/q/26190168
type: AnsweredQuestion
tagged with: cookies
type: Question
has comment: http://stackoverflow.com/comment/41066976
has comment: http://stackoverflow.com/comment/41066918
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26190227
favorite count: 0
has answer: http://stackoverflow.com/a/26190227
has answer: http://stackoverflow.com/a/26190238
answer count: 3
has answer: http://stackoverflow.com/a/26190234
has body: Hi i am trying to make code for clear cookies in jquery onclick of logout button but didn't get solution function logout() { document.cookie = 'Visit=; expires='+new Date(0).toUTCString() +'; path=/FinalVertozz/'; window.location='../login.html'; } cookies details Name: Visit Content: 09850227123455130 Domain: localhost Path: /FinalVertozz Send for: Any kind of connection Accessible to script: Yes Created: Saturday, October 4, 2014 11:25:45 AM Expires: When the browsing session ends
accepted answer: http://stackoverflow.com/a/26190238
has title: Remove Cookies In Jquery on logout button
upvote count: 1
linked to: http://stackoverflow.com/q/1458724

http://stackoverflow.com/q/26171001
tagged with: css
has title: Disabling hover events on handheld devices
type: Question
has body: I have some fancy hover animations going on with my website. I want to disable them on handheld devices such as tablets and phones. I know that I could use min/max-width to do this but I want to keep the effect in the browser on desktops at all viewport sizes. The reason I don't want it on mobile/tablets is simply because there is no mouse...hence...the hover effect won't translate as I want. I have seen that you can detect specific user agent stylesheets? Or there are some scripts to do this? I have found a few but they aren't explained very well. Modernizr wouldn't be able to do this would it? I ask because I saw it mentioned in a post when I was researching. Thanks in advance :)
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26171196
has answer: http://stackoverflow.com/a/26171218
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41013302
has text: On a side note it should be mentioned that sniffing the user agent will get you which devices are an iPad however this is by no means **secure** since anyone that wants to can spoof their user agent.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26161028
score: 0

http://stackoverflow.com/q/26165814
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41021706
type: AnsweredQuestion
upvote count: 1
downvote count: 1
has title: Draw a dot on a HTML page
type: Question
has answer: http://stackoverflow.com/a/26165984
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
favorite count: 0
has body: I want to draw a dot where the X position is 24 and the Y is 60. Here's my JSfiddle, and it doesn't work. Can someone please help me out here? var color = '#000000'; var size = '30px'; $("body").append( $(' ') .css('position', 'absolute') .css('top', 60 + 'px') .css('left', 24 + 'px') .css('width', size) .css('height', size) .css('background-color', color) );
has comment: http://stackoverflow.com/comment/41022064
accepted answer: http://stackoverflow.com/a/26165984

http://stackoverflow.com/q/26182609
tagged with: jquery
linked to: http://stackoverflow.com/q/19372658
upvote count: 1
favorite count: 0
type: UnansweredQuestion
has body: I'm using jQuery v1.7.1 in my project. I'm getting following warning/error in Firebug console: Use of getPreventDefault() is deprecated. Use defaultPrevented instead. in a file jquery.js line no.3432 If I click on this file name I get following code lines highlighted from jquery.js: src.getPreventDefault &amp;&amp; src.getPreventDefault() ) ? returnTrue : returnFalse; How should I get rid off this warning/error? Can someone please help me in this regard? Thanks in advance. If you want I can provide you the whole code of file jquery.js
tagged with: jquery-1.7
has comment: http://stackoverflow.com/comment/41055873
has title: How to get rid off the warning/error "Use of getPreventDefault() is deprecated. Use defaultPrevented instead."?
answer count: 0
downvote count: 0
score: 1
tagged with: warnings
tagged with: preventdefault
has comment: http://stackoverflow.com/comment/41056144
type: Question
tagged with: javascript

http://stackoverflow.com/q/26185132
has title: Selecting and Adding Functions to Div's via For Loop
tagged with: for-loop
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26185176
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I wanted to select divs quickly so i wrote a for loop that select all divs and add functions to them quickly instead of "onClick='blahblah'" method. Here is my code: Strategy Game Dev Test Origin 1 2 3 4 5 6 My problem is: When i open this html file or refresh the page, alert messages appears (six times) immediately. I want it to alert when i click a grid... Note: it works when i do this: function everything(){ for(var test_id = 0; test_id < 7; test_id++){ document.getElementById("t"+test_id).addEventListener("click", function(){alert("test");}); } } But this isnt going to be useful in future i think :P Help me!
tagged with: css
type: AnsweredQuestion
tagged with: loops
type: Question
has answer: http://stackoverflow.com/a/26185176

http://stackoverflow.com/comment/40988672
has text: This tag is deprecated AFAIK.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26148164

http://stackoverflow.com/a/26035742
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26035094
score: 1
upvote count: 1
has body: Keep the reference to the prototypes "this" by setting this to an variable and using it inside the Geocoders callback var googleMapsFunctions = function(clubs, location) { this.clubs = clubs; this.location = location; this.latLng = new Array(); this.geocoder = new google.maps.Geocoder(); this.closeClubs = []; } googleMapsFunctions.prototype.setLatLng = function() { var that = this; this.geocoder.geocode({'address' : this.location}, function(results, status) { if(status === "OK") { that.latLng.push(results[0].geometry.location.k); that.latLng.push(results[0].geometry.location.B); } }); }
answers question: http://stackoverflow.com/q/26035094
type: AcceptedAnswer

http://stackoverflow.com/q/26180849
type: UnansweredQuestion
tagged with: android
has body: I'd like to create a personnel project with a Java-coded server, and one HTML/JS client (with a framework to determine) and one Android client. I'd like to be able to call Java method from those two clients with only one implementation. Which approach could I use? I have thought about Websocket, but It seems I can only send messages, and then the server side has to parse it and make a method call itself. That's doable, but I'd like to find a better solution. Using AJAX (that I never really used) seems to have the same issue. A http request is sent, but I will need a sort of parser to read the request and dispatch it. I know servlets can do the work, but I often head this is really old-school. I don't know why, though. I'm really open to any proposition to implement this client-server communication. EDIT: The ideal solution I'd like to find would be anything that would enable a direct method call on server from client side. A great solution would be, for example, being able to call webservices from Javascript, or finding a framework with which I can make a direct remote call to a Java method.
has comment: http://stackoverflow.com/comment/41049641
tagged with: java
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26183336
score: 0
answer count: 2
has title: How to call Java server side methods from HTML/JS and android?
has answer: http://stackoverflow.com/a/26181635

http://stackoverflow.com/q/26139499
type: UnansweredQuestion
upvote count: 1
downvote count: 1
type: Question
tagged with: blob
has comment: http://stackoverflow.com/comment/40972379
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40972500
has comment: http://stackoverflow.com/comment/40972422
favorite count: 0
has comment: http://stackoverflow.com/comment/40972340
score: 0
has title: how to get data from multiple inputs using javascript
tagged with: file-upload
has comment: http://stackoverflow.com/comment/40972527
has body: I have multiple inputs, I need with one button to upload all files from all the inputs (image and/or video), I found a code on web, but I can't find a way to upload or get all my files. I am new to this procedure and unable to figure out the problem (maybe the .get() function is not right). How to get all the files from all the inputs in one button click?.. HTML: Add Image Add Video Javascript - code found on web function saveMedia() { var xhr = new XMLHttpRequest(); var data = new FormData(); var files = $(".back").get(0).files; alert(files.length); if (files.length == 0) { alert("No files"); } else { for (var i = 0; i < files.length; i++) { data.append(files[i].name, files[i]); } xhr.open("POST", "UploadHandler.ashx"); xhr.send(data); } };
answer count: 0

http://stackoverflow.com/a/26150535
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40993921
has body: the console displays the link to your file. look there if the correct Maybe you should have to wait until the image is loaded before you draw it. Try this instead: var canvas = document.getElementById("myCanvas"); var context = canvas.getContext("2d"); make_base(); function make_base() { base_image = new Image(); base_image.src = 'http://techtastico.com/files/2014/06/Apple-Swift-Logo.png'; base_image.onload = function(){ context.drawImage(base_image, 0, 0); }; } &lt;canvas id="myCanvas" width="200" height="100" style="border:1px solid #000000;"&gt; &lt;/canvas&gt;
type: Answer
accepted answer of: http://stackoverflow.com/q/26150312
score: 0
answers question: http://stackoverflow.com/q/26150312

http://stackoverflow.com/comment/40857284
has text: @Bernd: `InfoBackground` is a [CSS 2 System Color](http://www.w3.org/TR/css3-color/#css2-system).
type: Comment
comment on: http://stackoverflow.com/q/26076212
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41051050
score: 0
comment on: http://stackoverflow.com/q/26181698
type: Comment
type: QuestionComment
has text: You need px like @MaxArt is saying.. also.. it most likely isn't a cross browser issue of 100% height. It is most likely the interpretation. You have to make sure to 100% both HTML and BODY when doing height 100%. Then the container itself needs to be inside of the body nothing else and given height 100%. Usually a position absolute element is easiest to display this, but you can do it for many factors.

http://stackoverflow.com/comment/40877003
type: QuestionComment
has text: @Fred-ii-: No, `ajax` doesn't require forms (or form elements) at all. In this case, the OP is using a form element, but only as a means of getting the value to send.
comment on: http://stackoverflow.com/q/26086933
score: 0
type: Comment

http://stackoverflow.com/comment/40868687
score: 6
comment on: http://stackoverflow.com/q/26082299
type: Comment
type: QuestionComment
has text: JavaScript `Array`s are `0`-based. Attempting to start at `1` results in a [sparse array](https://en.wikipedia.org/wiki/Sparse_array).

http://stackoverflow.com/comment/40896312
type: Comment
has text: @BenM true, forgot about time zones.
comment on: http://stackoverflow.com/q/26097492
score: 0
type: QuestionComment

http://stackoverflow.com/a/26149253
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/40991326
has comment: http://stackoverflow.com/comment/40991453
has body: as I said in the comments, if you prevent the user from typing any non-numeric character in the first place, all the problems are solved: $('input:text').keydown(function( e ) { if(!/([\d ,\$])+/.test(String.fromCharCode(e.which))) return false; });
downvote count: 0
has comment: http://stackoverflow.com/comment/40991398
answers question: http://stackoverflow.com/q/26149067

http://stackoverflow.com/q/26043595
tagged with: node.js
tagged with: angularjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26043759
has title: How to send the file to node.js and back end when using ng-flow to take the file
type: Question
tagged with: mongodb
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26043759
score: 0
has body: I am using angularJS's ng-flow to upload a img in my app. the prob is that I successfully upload the file flow and I am not able to send the file to node.js and save it to mongoDb. Code (FrontEnd)(HTML): JS: $scope.saveImage = function(flow){ console.log('hello') if(flow){ var abc = !!{png:1,gif:1,jpg:1,jpeg:1}[flow.files[0].getExtension()] if(abc == true){ $scope.groupData.picURL = flow.files[0]; $scope.img = flow.files.length; }else{ flow.cancel() } } } I have file object in flow.files[0] and $scope.groupData.picURL. Now can I make a POST request to the server and then save it to mongoDB. Please help with the example Code

http://stackoverflow.com/comment/40933835
type: Comment
has text: file is xml. Then, why you are using json_decode() ?
type: QuestionComment
comment on: http://stackoverflow.com/q/26118697
score: 0

http://stackoverflow.com/q/26053156
has answer: http://stackoverflow.com/a/26053308
tagged with: compare
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26053258
possible better answer: http://stackoverflow.com/a/26053308
has comment: http://stackoverflow.com/comment/40814845
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40814834
type: Question
has title: Finding text to compare true or false
has answer: http://stackoverflow.com/a/26053258
tagged with: javascript
score: 0
answer count: 2
has body: I'm trying to build out a json object in javascript/jquery that compares . Here's what I have html: size large medium number js: selectedObj = { 'fieldSize':false, 'sizeXSmall':false, 'sizeSmall':false, 'sizeMedium':false, 'sizeLarge':false, 'sizeXLarge':false, 'fieldName':false, 'fieldNum':false }; if(jQuery('.field div:contains("size")')){selectedObj['fieldSize'] = true} if(jQuery('.field div:contains("xs")')){selectedObj['sizeXSmall'] = true} if(jQuery('.field div:contains("small")')){selectedObj['sizeSmall'] = true} if(jQuery('.field div:contains("medium")')){selectedObj['sizeMedium'] = true} if(jQuery('.field div:contains("large")')){selectedObj['sizeLarge'] = true} if(jQuery('.field div:contains("xl")')){selectedObj['sizeXLarge'] = true} if(jQuery('.field div:contains("name")')){selectedObj['fieldName'] = true} if(jQuery('.field div:contains("number")')){selectedObj['fieldNum'] = true} So ideally I would end up with an object that looks like this: selectedObj = { 'fieldSize':true, 'sizeXSmall':false, 'sizeSmall':false, 'sizeMedium':true, 'sizeLarge':true, 'sizeXLarge':false, 'fieldName':false, 'fieldNum':true }; I instead end up with an object where everything is true. Here is an example: http://jsfiddle.net/vz600nd7/ Also, when I console log it before an after it looks like this: It looks like the 'preview' is giving the right info but the actual view is not.

http://stackoverflow.com/comment/40958493
comment on: http://stackoverflow.com/a/26113872
type: AnswerComment
score: 0
type: Comment
has text: This is not going to work. when the countdown is set, it closes the window so I can set a new countdown for something different.

http://stackoverflow.com/q/26037033
has comment: http://stackoverflow.com/comment/40786003
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40791763
tagged with: userlocation
has comment: http://stackoverflow.com/comment/40785049
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26041187
has comment: http://stackoverflow.com/comment/40787369
type: Question
has body: I have the next script: var directionDisplay; $( document ).on( "pageinit", "#calc", function() { directionsDisplay = new google.maps.DirectionsRenderer(); var defaultLatLng = new google.maps.LatLng(34.0983425, -118.3267434); // Default to Hollywood, CA when no geolocation support if ( navigator.geolocation ) { function success(pos) { // Location found, show map with these coordinates drawMap(new google.maps.LatLng(pos.coords.latitude, pos.coords.longitude)); } function fail(error) { drawMap(defaultLatLng); // Failed to find location, show default map } // Find the users current position. Cache the location for 5 minutes, timeout after 6 seconds navigator.geolocation.getCurrentPosition(success, fail, {maximumAge: 500000, enableHighAccuracy:true, timeout: 6000}); } else { drawMap(defaultLatLng); // No geolocation support, show default map } function drawMap(latlng) { var myOptions = { zoom: 10, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP, disableDefaultUI: true }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); // Add an overlay to the map of current lat/lng directionsDisplay.setMap(map); var marker = new google.maps.Marker({ position: latlng, map: map, title: "Greetings!" }); } }); var directionsService = new google.maps.DirectionsService(); function calcRoute() { var start = document.getElementById("start").value; var end = document.getElementById("end").value; var request = { origin:start, destination:end, travelMode: google.maps.DirectionsTravelMode.DRIVING }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); var distanceInput = document.getElementById("distance"); distanceInput.value = response.routes[0].legs[0].distance.value / 1000; } }); } I want calculate the km's between this 2 points,the end will be the input value and the start will be user gelocation, i cant find any online solutions for it. What are the go…
tagged with: distance
accepted answer: http://stackoverflow.com/a/26041187
tagged with: google-maps
has title: Jquery Google Maps User location
answer count: 1

http://stackoverflow.com/q/26046474
tagged with: converters
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/56510554
answer count: 4
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40803007
has comment: http://stackoverflow.com/comment/40802816
has answer: http://stackoverflow.com/a/26046737
has comment: http://stackoverflow.com/comment/40803053
score: 3
has comment: http://stackoverflow.com/comment/40803143
upvote count: 3
type: Question
has answer: http://stackoverflow.com/a/52681092
has body: I want to make a webpage that has two text boxes, a Celsius and Fahrenheit box. In between them, there is a convert button which converts Celsius to Fahrenheit and Fahrenheit to Celsius. If there is letters in either box, I want to cancel the converting and an alert pop up saying "Only numbers please!" So far, I haven't figured out how to get the alert and when I type numbers in the Celsius box, it always says the number -18 in the same box. Fahrenheit is fine. HTML: Temparature Converter Celsius: Convert Fahrenheit: JavaScript: function convertTemp(degree) { if (degree == "C") { F = document.getElementById("c").value * 9 / 5 + 32; document.getElementById("f").value = Math.round(F); } else { C = (document.getElementById("f").value -32) * 5 / 9; document.getElementById("c").value = Math.round(C); } } Note: I got some code from W3Schools so I think the onkeyup convert is a little funny. If possible, please notify me how it has to change as well as the JavaScript.
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26046651
tagged with: jquery
has comment: http://stackoverflow.com/comment/40802848
has title: Celsius and Fahrenheit Converter- JavaScript

http://stackoverflow.com/a/26057187
answers question: http://stackoverflow.com/q/26056894
type: Answer
has body: I've made this fiddle for you. When you select a radio, $scope.currentSelection changes and this way you'll know which is the current selected goal.
score: 0

http://stackoverflow.com/q/26062508
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/26063426
has comment: http://stackoverflow.com/comment/40833337
downvote count: 1
has comment: http://stackoverflow.com/comment/40833196
favorite count: 0
has answer: http://stackoverflow.com/a/26063426
upvote count: 0
tagged with: titanium
tagged with: titanium-mobile
type: AnsweredQuestion
tagged with: titanium-alloy
has body: How can we get the selected picker value in controller and do the validation of the selected value. View: &lt;Picker id="countryPicker" class="picker"&gt; &lt;PickerRow title="Select a Country"/&gt; &lt;PickerRow title="India"/&gt; &lt;PickerRow title="China"/&gt; &lt;/Picker&gt; Controller: var countryname = $countryPicker.value(); alert("country: "+ countryname); $.planWin.open(); Did validation done in controller or some other module?
has title: How to get the picker value in controller using Titanium Alloy?
type: Question
answer count: 1

http://stackoverflow.com/comment/72828425
type: Comment
comment on: http://stackoverflow.com/a/39984018
has text: is there any documentation for module support of promises? i'm trying to do this myself and it doesn't return a response
type: AnswerComment
score: 0

http://stackoverflow.com/a/26104402
score: 3
has comment: http://stackoverflow.com/comment/40908840
downvote count: 1
has body: Because it takes time for the new resource to be fetched, In the meantime, the browser just carries on. In addition the server might return a 204 No Content response to the http://m.example.com request, in which case, the current page would remain displayed and active.
has comment: http://stackoverflow.com/comment/40909215
upvote count: 4
has comment: http://stackoverflow.com/comment/40908766
answers question: http://stackoverflow.com/q/26104297
has comment: http://stackoverflow.com/comment/40908983
type: Answer

firefox-addon
tags question: http://stackoverflow.com/q/26115209
tags question: http://stackoverflow.com/q/26095448
tags question: http://stackoverflow.com/q/26175475
tags question: http://stackoverflow.com/q/26078273
tags question: http://stackoverflow.com/q/26146962
type: Tag
tags question: http://stackoverflow.com/q/26172732
tag name: firefox-addon
tags question: http://stackoverflow.com/q/26059724

http://stackoverflow.com/a/26124069
has body: In style.css and style2.css of the Parallax Content Slider plugin, look for this rule: da-slider:hover .da-arrows span { opacity: 1; } Adding an IE8-specific rule that overrides it will do the trick.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26122321

http://stackoverflow.com/a/26110226
has body: Instead of inserting the options through the markup, you can predefine the options like so: $scope.options = { 'AAA':'AAAAAAAAAAAAAAAA', 'BBB':'BBBBBBBBBBBBBBB' } ; $scope.myPick = "BBBBBBBBBBBBBBB"; and in your view: You can see how it works here: http://plnkr.co/edit/aOV1agWFfJZaTU675wEF?p=preview
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26110093
has comment: http://stackoverflow.com/comment/50233274
type: Answer
has comment: http://stackoverflow.com/comment/40919546
score: 1

http://stackoverflow.com/comment/41112646
score: 0
type: AnswerComment
type: Comment
has text: Hmm ... I was pretty sure it was that. Well, maybe try to use the helper libraries? They're quite helpful + you don't have to write everything yourself
comment on: http://stackoverflow.com/a/26211747

http://stackoverflow.com/q/26070654
has comment: http://stackoverflow.com/comment/40847426
has body: I want to detect if the user click the print or cancel button in the printing options in the browser for certain pages (e.g. File -> Print Preview, Print). I like to display a message (separate message if the user click cancel or print). Here's my code: function printCheckout() { (function() { if(print){ ///if print button click } else { ///cancel button click } }()); window.print(); }
has answer: http://stackoverflow.com/a/26070862
type: Question
upvote count: 2
tagged with: browser
tagged with: javascript
linked to: http://stackoverflow.com/q/3339789
score: 0
downvote count: 2
tagged with: printing
has comment: http://stackoverflow.com/comment/40847478
has comment: http://stackoverflow.com/comment/40847432
answer count: 1
favorite count: 0
type: UnansweredQuestion
has title: Run javascript function on browser Print wizard

http://stackoverflow.com/comment/59202206
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26110842
has text: @rahoolm Which error are you getting? I resolved this for him, but we connected outside of SO and I remoted to his machine. If I recall, his theme javascript was messing with his custom javascript.
score: 0

http://stackoverflow.com/a/27461168
answers question: http://stackoverflow.com/q/26181070
type: Answer
has body: You can use html base tag for this. Just set the absolute address once and then use relative addresses &lt;head&gt; &lt;base href="http://www.w3schools.com" target="_blank"&gt; &lt;link href="built.css" rel="stylesheet"&gt; &lt;/head&gt; There is now automation wired in jsreport for this however you should be able to take base url from request header and easily replace it in html.
score: 0

http://stackoverflow.com/comment/40915705
score: 0
has text: "Lines" might be the wrong word for it. Wasn't sure how to describe it. Maybe between HTML tags would be better
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26107993

http://stackoverflow.com/comment/40898079
comment on: http://stackoverflow.com/q/26098078
score: 0
type: Comment
has text: The file type is php I attempted to use var address = <?php $_POST['address'] ?>; but for some reason this didn't work?
type: QuestionComment

http://stackoverflow.com/a/26077967
type: Answer
has comment: http://stackoverflow.com/comment/40860881
has comment: http://stackoverflow.com/comment/40861019
has comment: http://stackoverflow.com/comment/40860522
downvote count: 1
upvote count: 0
score: -1
has comment: http://stackoverflow.com/comment/40861345
has comment: http://stackoverflow.com/comment/40860673
has body: You do it like this: var selection = new Array (4); selection[0] = new Array ('$210', 'etc', 'etc', 'etc', 'etc'); selection[1] = new Array ('Solar', 'Supernova', 'Quasar', 'Galaxy', 'Blackhole'); selection[2] = new Array ('Talk', 'Talk &amp; Text', 'Talk, Text &amp; Data'); selection[3] = new Array ('One Year', 'One', 'Two Years', 'Two', 'Three Years', 'Three', 'Four Years', 'Four'); function selectPhone (selectionArray) { var yourPhone = prompt("What kind of Smartphone would you like: Solar?"); for( s1 in selectionArray ){ for( s2 in selectionArray[s1] ) { if (yourPhone == selectionArray[s1][s2] ) { console.log("You picked: " + yourPhone + "."); } else { console.log("Error."); } } } } selectPhone(selection); You do need to know about objects though. Also look into the for .. in function in JS - documentation will explain it better than me, but in short, you loop through properties of the parent array(with the for..in) - basically through a list of arrays. Than using the same idea, you loop through the each array in part. To give you a visual representation, you array looks like this: var selection = [//outer array [ //inner array - property of outer array (first for..in) = s1 '$210', //property of inner array (second for..in) = s2 'etc' ], [ 'Solar', 'Supernova', 'Quasar', 'Galaxy', 'Blackhole' ], [ 'Talk', 'Talk &amp; Text', 'Talk, Text &amp; Data' ], [ 'One Year', 'One', 'Two Years', 'Two', 'Three Years', 'Three', 'Four' ] ]
answers question: http://stackoverflow.com/q/26077690
has comment: http://stackoverflow.com/comment/40860735
has comment: http://stackoverflow.com/comment/40861154
has comment: http://stackoverflow.com/comment/40860546

http://stackoverflow.com/a/26177192
answers question: http://stackoverflow.com/q/26177173
score: 0
has body: You're comparing the results of stringifying the element (i.e. "[Object object]") instead of its .value property.
type: Answer

http://stackoverflow.com/q/26034183
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26035703
has comment: http://stackoverflow.com/comment/40780107
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26034250
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: My HTML My Script $('html').on('mouseover','.fr-bttn .fa-picture-o', function () { var pos = $(this).offset(); console.log(pos.left+"||"+pos.top); var left_pos=(pos.left-15)+"px"; var top_pos=(pos.top+35)+"px"; $(".abc").css({position: "absolute", top: top_pos, left: left_pos }); $(".abc").show(); $(".popup").show(); }); }); I want to apply the left and top to abc class which is without parent and not to the class which is under id="txt_blog_editor"
linked to: http://stackoverflow.com/q/2389540
possible better answer: http://stackoverflow.com/a/26034250
linked to: http://stackoverflow.com/q/965816
has title: How to avoid the particular class from applying css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26034956
accepted answer: http://stackoverflow.com/a/26034956

http://stackoverflow.com/q/26080036
favorite count: 0
has comment: http://stackoverflow.com/comment/40864434
has comment: http://stackoverflow.com/comment/40865890
duplicate of: http://stackoverflow.com/q/111102
has comment: http://stackoverflow.com/comment/40864323
has comment: http://stackoverflow.com/comment/40864271
has comment: http://stackoverflow.com/comment/40864685
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/40865894
has title: What do closures mean exactly?
has comment: http://stackoverflow.com/comment/40865848
downvote count: 1
type: Question
score: 1
has comment: http://stackoverflow.com/comment/40864360
has comment: http://stackoverflow.com/comment/40864759
has answer: http://stackoverflow.com/a/26080125
linked to: http://stackoverflow.com/q/111102
answer count: 1
has comment: http://stackoverflow.com/comment/40865953
accepted answer: http://stackoverflow.com/a/26080125
tagged with: javascript
has comment: http://stackoverflow.com/comment/40864385
has body: I've read about closures many times here. But I'm really confusing to know exactly what do closure mean? Is variable a closure ? Or, is function is a closure ? Or, both can be called a closure ?

http://stackoverflow.com/q/26164705
accepted answer: http://stackoverflow.com/a/26165175
upvote count: 2
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: ajax
has body: I have a test node server that is sending chunked responses every few two seconds with the following headers: response.setHeader('Content-Type', 'text/plain') response.setHeader('Transfer-Encoding', 'chunked') Every two seconds, I write out to the response: response.write('Hello World'); When I do a curl on the endpoint, I get a chunk back every two seconds: Hello World (wait two seconds) Hello World (wait two seconds) Hello World It works like it's supposed to in curl. For my Javascript on the client side, I set up a new XMLHttpRequest and assign a function to print out its responseText for the onprogress event. Here is where the implementation seems to differ across browsers. In Firefox and Safari, I get similar behavior as when I curl. An onprogress event fires for each "Hello World". In Chrome, an onprogress event fires only when all of chunks have been received and I do a response.end() on the server side. And when I try to print out the responseText, only an empty string prints out. Here is what the client-side code looks like: var xhr = new XMLHttpRequest() xhr.onprogress = function() { // Firefox, Safari prints out an accumulation of the chunks // Chrome prints out an empty string console.log(xhr.responseText); }
tagged with: xmlhttprequest
tagged with: node.js
type: AnsweredQuestion
score: 2
downvote count: 0
tagged with: google-chrome
type: Question
has title: Chrome not handling chunked responses like Firefox, Safari
has answer: http://stackoverflow.com/a/26165175

http://stackoverflow.com/comment/40904164
type: QuestionComment
score: 0
has text: The raw code that shows up is an initial Javascript bit that gets screen resolution and adjusts the window size accordingly. After that comes lots of PHP which is fed with mysql data and forms divs and a table. The page has always needed to load a bit before it showed up and rendered the table, but it never showed the raw code while doing so. CSS files are all declared within the head tag. The code is very long which makes it hard to decide what sample code to give you.
comment on: http://stackoverflow.com/q/26101758
type: Comment

http://stackoverflow.com/q/26126429
answer count: 3
tagged with: submit
has comment: http://stackoverflow.com/comment/40948514
has answer: http://stackoverflow.com/a/26127412
upvote count: 2
has body: I would like to disable the Submit button on a search form that only contains select dropdowns. There are several similar questions here but I most of them deal with fields. The closest thing to my case is Disable submit button if all three of three specific dropdown fields are empty. I modified the solution supplied in JSFiddle to feature an empty option, and did get it working -- but only in JSFiddle, not on my page. I use the same code from the proposed answer (only changed IDs): $('#submit').attr('disabled','disabled'); $('select').change(function(){ if ( $(this).hasClass('require_one') ){ $('#submit').removeAttr('disabled'); } }); $('#submit').click(function() { $('#searchform').submit(); }); I add the above code right after I include the jquery.js (v. 1.9.1). I generate the form dynamically, but in JSFiddle I use exactly what is seen in the page source: http://jsfiddle.net/cheeseus/d5xz6aw8/8/ I have no idea why I can't get it to work on the actual page, hope those more knowledgeable can help sort it out. And, if possible, I would also like the Submit button to be disabled again if all three selects are set to blank values again.
has answer: http://stackoverflow.com/a/26126927
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26127492
linked to: http://stackoverflow.com/q/19253708
tagged with: select
type: Question
has title: Disable Submit button if none of selector options is selected
possible better answer: http://stackoverflow.com/a/26126927
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/26127412

http://stackoverflow.com/a/26860763
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26191686
has body: All you should need to do is include the main countdown.js file and then include the localisation.js file after. If you are trying to translate to Spanish, then add this code only to the localisation.js file: (function($) { $.countdown.regionalOptions['es'] = { labels: ['Años', 'Meses', 'Semanas', 'Días', 'Horas', 'Minutos', 'Segundos'], labels1: ['Año', 'Mes', 'Semana', 'Día', 'Hora', 'Minuto', 'Segundo'], compactLabels: ['a', 'm', 's', 'g'], whichLabels: null, digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], timeSeparator: ':', isRTL: false}; $.countdown.setDefaults($.countdown.regionalOptions['es']); })(jQuery);

http://stackoverflow.com/comment/40996312
type: QuestionComment
comment on: http://stackoverflow.com/q/26141727
score: 1
has text: you have all the images in the html ie (src="http://images01...) etc so naturally they will load all at once. Either create a script that dynamically injects 3 or 4 Pics at a time or find a plugging simillar to the one you are using that lazy loads pics
type: Comment

http://stackoverflow.com/a/26132004
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26131926
has body: How can I even begin investigate which javascript file is the culprit? Comment out JavaScript &lt;script&gt; tags until the behavior stops.

http://stackoverflow.com/q/26099071
has answer: http://stackoverflow.com/a/26099217
upvote count: 1
has body: Is it possible to click text in a list to add into a text box. I have made a JSON api that gets a list of people in the database. I then have a form that has a text field and displays the list of people. I would like to click a particular person and add it to the text box. main.js var ajax_call = function() { var $people = $('#people'); $.ajax({ type: 'GET', url: '/all/api', success: function(people) { $.each(people, function(i, person) { $people.empty() }); $.each(people, function(i, person) { $people.append(' name: ' + person.first_name+', last: '+ person.last_name + ' '); }); } }); $("#people").on("click", "li", function() { var content = $(this).html(); //$("#testbox").val(content); //replace existing name in textbox $("#testbox").val($("#testbox").val() + content + "\n"); //add new name to textbox }); }; var interval = 800; setInterval(ajax_call, interval); form.html {% csrf_token %} {{ form.as_p }}
favorite count: 0
has comment: http://stackoverflow.com/comment/40898869
has answer: http://stackoverflow.com/a/26099231
accepted answer: http://stackoverflow.com/a/26099231
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40899462
possible better answer: http://stackoverflow.com/a/26099217
answer count: 4
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40898964
has title: JQuery how to click html element to copy into text area?
type: Question
has answer: http://stackoverflow.com/a/26099417
has comment: http://stackoverflow.com/comment/40899937
has answer: http://stackoverflow.com/a/26099233
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40879788
has text: @SergeyPavlov : There was a Unterminated quote in the expression. Add a qoute like **orderBy : 'name'**. Here is the updated [fiddle](http://jsfiddle.net/467px16e/2/).
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26086852
type: AnswerComment

http://stackoverflow.com/q/26062332
has comment: http://stackoverflow.com/comment/40831831
type: Question
has body: I want to create an RTF reader, and I want to get the plain text part. But I can't "delete" the commands from the incoming string 's'... var plain = s.replace(/\\.*(\\|\s|{){1}/g,"");
has comment: http://stackoverflow.com/comment/40831800
tagged with: javascript
tagged with: replace
score: 0
answer count: 1
tagged with: space
tagged with: string
has comment: http://stackoverflow.com/comment/40833655
has comment: http://stackoverflow.com/comment/40832277
has comment: http://stackoverflow.com/comment/40831865
accepted answer: http://stackoverflow.com/a/26063289
tagged with: regex
has comment: http://stackoverflow.com/comment/40833870
has title: How to replace all parts of a string by regex that stats with a \ and ends with \ or space or {?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26063289

http://stackoverflow.com/comment/40872811
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26084427
has text: Before you click on any `a` element, Is the `.dynamicDiv` empty? or it has some contents?
type: QuestionComment

http://stackoverflow.com/a/26097947
type: Answer
downvote count: 1
score: 1
has body: You can't access razor in Js file. When I need the urls from Razor in Js I just define them in the view, like: &lt;script&gt; var _rootUrl = '@Url.Content("~")'; &lt;/script&gt; This will work
has comment: http://stackoverflow.com/comment/40898643
has comment: http://stackoverflow.com/comment/40900122
upvote count: 2
answers question: http://stackoverflow.com/q/26097905

http://stackoverflow.com/comment/40879183
type: QuestionComment
score: 0
has text: Can you show your user Service? You can handle it through config
comment on: http://stackoverflow.com/q/26087807
type: Comment

http://stackoverflow.com/comment/40928544
type: AnswerComment
type: Comment
has text: Ah you're right, so instead of POST, he could use SESSION
comment on: http://stackoverflow.com/a/26115272
score: 0

http://stackoverflow.com/q/26115837
type: Question
score: 1
has body: I am using term.js for emulating a terminal in the web browser via JavaScript and Node.js. I have already setup the basic implementation and I can connect to both local as well as remote host (I use node ssh2 to connect to a remote host). Everything works as expected, except that it's black and white (black background, white text). I have the following code in the client which is as per the example in the repository. Should I add some extra configuration to enable colors? var term = new Terminal({ colors: Terminal.colors, // This alone doesnt seem to work cols: 80, rows: 24, useStyle: true, screenKeys: true, cursorBlink: true });
has title: Enabling colors in term.js
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/26153182
accepted answer: http://stackoverflow.com/a/26153182

http://stackoverflow.com/q/26108657
has comment: http://stackoverflow.com/comment/40916930
has comment: http://stackoverflow.com/comment/40917469
upvote count: 2
answer count: 2
tagged with: jquery
has body: I've created an AjaxMethod (a very general method, and I'm doing ASP.NET MVC) to get the ID of the item the user clicks on, to add them into the site cart (by adding them to the cookies). The problem is that my Ajax method has one parameter which is used as the ID so I'm creating buttons whose id attribute are the actual product ID and their values are Add to Cart. I've also created a single hidden submit button whose id is the same name as the parameter name in Ajax method and its value depends on the ID of the clicked button. Click Button ID --Passed into--&gt; Value of submit button My problem is, I wanna know that is there any way to write a JavaScript/JQuery method and use it in OnClientCLick in the buttons to: get the id of the caller button and then pass it to the value of the submit button. For example: // I do not know the ID of the caller // this method is used like: &lt;button id="1111" OnClientClick="Test()"&gt;&lt;/button&gt; function Test() { var ID = this.id // this did not work $("#SubmitButton").val(ID) $("SubmitButton").trigger("click") }
favorite count: 0
has comment: http://stackoverflow.com/comment/40917340
has comment: http://stackoverflow.com/comment/40916725
has answer: http://stackoverflow.com/a/26108770
has answer: http://stackoverflow.com/a/26108839
accepted answer: http://stackoverflow.com/a/26108839
score: 2
has comment: http://stackoverflow.com/comment/40916711
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40916896
downvote count: 0
has comment: http://stackoverflow.com/comment/40917421
linked to: http://stackoverflow.com/q/3239598
has comment: http://stackoverflow.com/comment/40916720
type: Question
has title: Get the ID of the caller in JavaScript/JQuery
possible better answer: http://stackoverflow.com/a/26108770
has comment: http://stackoverflow.com/comment/40916791
tagged with: javascript

http://stackoverflow.com/comment/41286875
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26138172
has text: You could poll a webservice/database to check if any new tickets came since your last check of the webservice/database. This would disconnect your notification application from your website, but since the one doesn't have anything to do with the other, that would be an acceptable compromise (not to mention that you could then also program other applications to generate messages on changes)

http://stackoverflow.com/q/26107255
has comment: http://stackoverflow.com/comment/40914378
has comment: http://stackoverflow.com/comment/40914178
answer count: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26107515
tagged with: javascript
tagged with: jquery
has body: I have a following code, i want to remove label and Input Box on click, but it is not working no any alert is shown, nothing is seen over the console.. really disappointed LastName : my jquery $('.draggableField ui-draggable droppedField').on('click', function () { $(this).parent('div.DivHTML').remove(); alert("hi"); }); Help is apperciable. thnx
has title: Jquery Remove Div and Alert is not Working
has answer: http://stackoverflow.com/a/26107820
favorite count: 0
has comment: http://stackoverflow.com/comment/40914936
type: Question
has answer: http://stackoverflow.com/a/26107586
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40914183
has comment: http://stackoverflow.com/comment/40914320
score: 0
possible better answer: http://stackoverflow.com/a/26107377
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/26107377
has answer: http://stackoverflow.com/a/26107515

http://stackoverflow.com/comment/40815840
has text: For use with an anonymous proxy function, you must pass the arguments: `.attr("d", function(d,i){console.log(d); return arc(d,i);})`
type: Comment
comment on: http://stackoverflow.com/q/26053191
score: 0
type: QuestionComment

http://stackoverflow.com/a/26175128
accepted answer of: http://stackoverflow.com/q/26175069
has body: I guess you want to print it to console. So you should change return result_page; to console.log(result_page); This will also solve the problem that PhantomJS never terminates, because page.open returns before calling phantom.exit();. On an unrelated note, you should call page.includeJs inside of page.open, because otherwise you just load another page where jQuery is not loaded anymore.
has comment: http://stackoverflow.com/comment/41110561
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26175069

http://stackoverflow.com/q/26103244
has title: DIsplaying HTML element if model count is empty - ASP.NET MVC View
type: AnsweredQuestion
has body: I have a view which displays one of two elements based on the Model.Count property. The code is as follows: @if (Model.Count() == 0) { Everybody is in! There are no absences today :) } else { Name Date Out Return Date Absence Type @foreach (var item in Model) { @item.FullName @item.DateFrom.Value.ToLongDateString() @item.AbsencePeriodFrom.PeriodText @item.DateTo.Value.ToLongDateString() @item.AbsencePeriodTo.PeriodText @item.AbsenceType.AbsenceTypeText } In my application I use jQuery to get data based on the selection of a date from a calendar control. My JavaScript code then appends rows to the absencesTable element. If there are no absences for the current day the table element will never be in the DOM. If I choose a date where there are records I modify the rows in the table. I realise why it's not working as it's simply because the table doesn't exist and so my ajax code is ignored. Here is my jQuery ajax call: $.ajax(ajaxOptions).done(function (data) { if (data != null && data.length != 0) { var $target = $("#absencesTable"); $("#absencesTable tbody > tr").remove(); $.each(data, function (index, element) { var fromDate = new Date(element.DateFrom); var toDate = new Date(element.DateTo); var detailsStr = " " + element.FullName + " " + " " + moment(fromDate).format("DD MMMM YYYY") + " " + element.AbsencePeriodFrom.PeriodText + " " + " " + moment(toDate).format("DD MMMM YYYY") + " " + element.AbsencePeriodTo.PeriodText + " " + " " + element.AbsenceType.AbsenceTypeText + " " + " "; $("#absencesTable > tbody").append(detailsStr); }); } else { $("#absencesTable tbody > tr").remove(); var detailsStr = " No absences on that day "; $("#absencesTable > tbody").append(detailsStr); } }); My question is how do I change my code so that my view remains the same - the table is only created if there is data otherwise display the "no records" element.
type: Question
has answer: http://stackoverflow.com/a/26103484
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26103484
tagged with: razor

http://stackoverflow.com/a/26120424
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26120084
has body: if(pswrd.value !== pswrd1.value) the text in bold above should be != and not !== !== is not an operator, use == for equality and != for unequality

http://stackoverflow.com/q/26156336
has comment: http://stackoverflow.com/comment/41007802
has body: Consider a JSP application with a couple of JavaScript files. The backend is fully localized, using several .properties files, one for each language. Rendered HTML contains strings in the correct language - all of this is the usual stuff and works perfectly. Now however, from time to time I need to use some localized string in a JavaScript resource. Suppose e.g.: function foo() { alert('This string should be localized!'); } Note that this is somewhat similar to the need to refer some AJAX endpoints from JavaScript, a problem well solved by a reverse JS router. However the key difference here is that the backend does not use the router, but it does use the strings. I have come up with several approaches, but none of them seems to be good enough. Parameters JSP that renders the code to invoke foo() will fetch the string: foo('<%= localize("alert.text") %>'); function foo(alertText) { alert(alertText); } Pros: It works. Cons: Method signatures are bloated. Prototypes JSP renders a hidden span with the string, JS fetches it: This string should be localized! function foo() { alert($('#prototype').text()); } Pros: Method signatures are no longer bloated. Cons: Must make sure that the hidden s are always present. AJAX There is an endpoint that localizes strings by their key, JS calls it. (The code is approximate.) function foo() { $.ajax({ url : '/ajax/localize', data : { key : 'alert.text' } }) .done(function(result) { alert(result); } ); } Pros: Server has full control over the localized result. Cons: One HTTP call per localized string! Any of the AJAX calls fail, the logic breaks. This can be improved by getting multiple strings at once, but the rountrip problem is an essential one. Shared properties files Property file containing the current language is simply exposed as an additional JS resource on the page. // brings in the i18n object function foo() { alert(i18n.alert.text); } Pros: Fast and reliable. Cons: All the strings are pulled in - also the ones we don't need…
score: 4
type: Question
upvote count: 4
answer count: 1
downvote count: 0
tagged with: jsp
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41005629
has answer: http://stackoverflow.com/a/26558362
accepted answer: http://stackoverflow.com/a/26558362
has comment: http://stackoverflow.com/comment/41005762
tagged with: localization
has comment: http://stackoverflow.com/comment/41007189
has title: Share localization strings from backend to JavaScript
type: AnsweredQuestion

http://stackoverflow.com/a/26101941
has comment: http://stackoverflow.com/comment/84563701
has comment: http://stackoverflow.com/comment/118677468
has comment: http://stackoverflow.com/comment/106534028
has body: You can use the HTML5 files property of the element like follows: updateList = function() { var input = document.getElementById('file'); var output = document.getElementById('fileList'); var children = ""; for (var i = 0; i < input.files.length; ++i) { children += ' ' + input.files.item(i).name + ' '; } output.innerHTML = ' '+children+' '; } Selected files:
upvote count: 63
downvote count: 0
has comment: http://stackoverflow.com/comment/40925026
has comment: http://stackoverflow.com/comment/99472608
accepted answer of: http://stackoverflow.com/q/26082721
answers question: http://stackoverflow.com/q/26082721
has comment: http://stackoverflow.com/comment/106535438
has comment: http://stackoverflow.com/comment/77843623
has comment: http://stackoverflow.com/comment/106532400
score: 63
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/106533728
has comment: http://stackoverflow.com/comment/106535949
has comment: http://stackoverflow.com/comment/118668578
type: Answer

http://stackoverflow.com/q/26062871
favorite count: 0
tagged with: struts2
accepted answer: http://stackoverflow.com/a/26120444
has comment: http://stackoverflow.com/comment/40833500
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40917826
has body: I have a textarea in my form : &lt;s:textarea key = "appInfo.collection" required = "true" readonly = "true" cssClass = "form-control" rows = "8"/&gt; and few more textarea fields. I want to make these textareas fit their content in readonly mode. Since I have specified rows=8 it sometimes shows a blank area if content fills only 2 rows, or shows a scrollbar if content is more than 8 rows. How can I give these textareas the right size based on their content, with no scrollbars ?
upvote count: 1
has title: How to make a readonly <s:textarea /> fit to its content
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26120444
tagged with: struts-tags
type: Question
linked to: http://stackoverflow.com/q/19170083
tagged with: textarea
downvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/40783312
has text: Thank you very much to stay tune until this minute. Every thing works just fine but me - error!!!
comment on: http://stackoverflow.com/a/26035134
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26172062
tagged with: protractor
tagged with: javascript
upvote count: 2
answer count: 1
favorite count: 0
tagged with: promise
tagged with: angularjs
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/26172076
downvote count: 0
linked to: http://stackoverflow.com/q/22239207
tagged with: timeout
has title: angular protractor: driver.wait and .then taking allScriptsTimeout time to return
type: Question
has answer: http://stackoverflow.com/a/26172076
has body: I am trying to test an xmpp chat application, and having some difficulties testing the results of asynchronous operations. The test is trying to remove a contact from your roster (contact list), and driver.wait does not seem to be resolving when the promise if fulfilled. The test passes, but it waits for 11 secs (allScriptsTimeout in protractor.conf) before finishing the wait, then takes another 11 secs in the .then after evaluating the expect statement before the browser window closes. Here's the code, problems start at driver.wait() block: describe("When adding a contact to the roster", function() { var jid = "testyeti@yeti.dslab.ad.adp.com"; var searchString = "yeti"; var editBtnId = jid + "_cog"; var plusBtnId = jid + "_add"; var searchId = "yeti-searchInput"; beforeEach(function() { browser.get('/'); }); var addOrRemove = function(callbackWhenDone) { expect(element(by.css('.yeti-contactList')).isPresent()).toBe(true); var driver = browser.driver; driver.manage().timeouts().implicitlyWait(10000).then(function() { //wait for the roster to load async expect(element(by.css('.yeti-rosterRight')).isPresent()).toBeTruthy(); }); var cog = element(by.id(editBtnId)); cog.isPresent() .then(function(itIsThere) { if (itIsThere) { //remove this person from the roster if they are there console.log(jid + " was in roster. Removing..."); //click the button to edit contact properites cog.click(); //click to remove from roster element(by.id('RemoveExisting')).click(); //click to confirm remove element(by.id('SureRemove')).click(); //here's where things get interesting... var deferred = protractor.promise.defer(); driver.wait(function() { var poll = function() { //check if the element is present until it gets removed element(by.id(editBtnId)).isPresent().then(function(isPresent) { console.log("(in promise.then) element isPresent? " + isPresent); // isPresent is true if the server hasn't yet returned with a // response to remove contact // we need isPresent to be false before eval o…

http://stackoverflow.com/q/26179599
tagged with: javascript
score: 0
tagged with: typeahead.js
answer count: 1
has answer: http://stackoverflow.com/a/26183529
has comment: http://stackoverflow.com/comment/41047804
tagged with: angularjs
has title: Typeahead: why it is send request to the server after event $typeahead.select?
type: UnansweredQuestion
has body: Typeahead sending the request to the server with the selected value. I think it is not necessary, how it prevent? Example Plnkr Address (async via maps.googleapis.com) selectedAddress: {{ selectedAddress }} --js $scope.getAddress = function(viewValue) { var params = {address: viewValue, sensor: false}; return $http.get('http://maps.googleapis.com/maps/api/geocode/json', {params: params}) .then(function(res) { angular.forEach(res.data.results, function(o) { o.label = o.formatted_address; }); console.log(res.data.results) return res.data.results; }); };
type: Question
tagged with: angular-strap

http://stackoverflow.com/comment/41002103
comment on: http://stackoverflow.com/a/26155416
has text: This looks like it's great, but is there a way to ensure there are at a minimum of 4 figures? So if I ran `my(1)` now it would return `.01` and I would like `00.01`? I know how to ensure figures on the right of a decimal (more precision) but not on the left.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/26189663
type: Answer
answers question: http://stackoverflow.com/q/26189470
has body: You don't have to create new buttons (in the case you use always three of them). Anyways it depends all on the game logic. Usually how it's done is by using an Array of Objects literal like: var stages = [ [ {btntext:"Russet", type:"seed", pts:1, text:"You set seed as Russet Potato."}, {btntext:"Red", type:"seed", pts:2, text:"You set seed as Russet Potato."}, {btntext:"Sweet", type:"soil", pts:1, text:"You set seed as Russet Potato."} ],[ {btntext:"Sand", type:"foo", pts:1, text:"You set soil as Thin Sandy Soil."}, {btntext:"Loam", type:"bar", pts:2, text:"You set soil as Loose Loam Soil."}, {btntext:"Clay", type:"bar", pts:3, text:"You set soil as Heavy Clay Soil."} ],[ {btntext:"Baz", type:"baz", pts:1, text:"You set Baz!."}, {btntext:"Foo2", type:"foo", pts:2, text:"You set Foo twice!."} ] ]; Now, if you look the above Array and do: alert(stages.length) // 3 you'll see you can count 3 stages. If you set a var counter = 0 initially to 0 you can first read the 0 indexed stage, read the length of stage options like var nOfBtns = stages[counter].length; // 3 cause you have three options Russet Red Sweet. The last one will return you 2 buttons. You can extract all the needed values from your Array and Object really easily like: var selectedButtonPoints = stages[counter][buttonNid].pts; Once the player clicks the buttons and you extract all the needed info from your array, you simply create a new set of buttons depending on the number of items in the next stage and increase the counter counter += 1; Just to give you an idea. Also, document.write is deprecated. See how to use innerHTML instead. Set some elements on your page like some containers: &lt;div id="buttons"&gt;&lt;/div&gt; &lt;!-- JS will populate with needed buttons --&gt; &lt;div id="points"&gt;&lt;/div&gt; &lt;!-- JS will write here the player stats --&gt; &lt;!-- etc... --&gt; Target those elements with JS, create functions like function createNewButtons() and use them to fill your elements with buttons a…
score: 0

http://stackoverflow.com/comment/40912247
comment on: http://stackoverflow.com/q/26103584
score: 0
type: Comment
type: QuestionComment
has text: What do you mean by 'toggles the slice on/off'? Do you mean when you click on one color in the legend, the other colors on the pie go opaque, while the selected color remains bright? Like a highlighting effect?

http://stackoverflow.com/comment/40993535
has text: Don't provide a link... provide the code...
comment on: http://stackoverflow.com/q/26150697
score: 3
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26063400
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26071438
has body: I'm trying to see if a date is DST shifted, and I can make it work without telling Moment.js which timezone I am in, thus it will choose my local timezone, but I would like to tell Moment.js which timezone the date is in, but I can not seem to make it work. Any ideas? moment.tz.add(['America/New_York|EST EDT|50 40|0101|1Lz50 1zb0 Op0']); document.write(moment('2014-03-31T02:00:00+02:00', moment.ISO_8601).isDSTShifted()); document.write('&lt;br&gt;&lt;br&gt;'); document.write(moment('2014-03-31T02:30:00+02:00').isDSTShifted()); document.write('&lt;br&gt;&lt;br&gt;'); document.write(moment.tz('2013-03-10 02:30:00', 'America/New_York').isDSTShifted()); document.write('&lt;br&gt;&lt;br&gt;'); // I think this only works because I am in America/New_York document.write(moment('2013-03-10 2:30', 'YYYY-MM-DD HH:mm').isDSTShifted()); &lt;script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.3/moment.min.js"&gt;&lt;/script&gt; &lt;script src="//cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.2.2/moment-timezone.min.js"&gt;&lt;/script&gt;
tagged with: momentjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26071438
downvote count: 0
score: 1
has title: Check if date isDSTShifted
type: Question

http://stackoverflow.com/comment/71119836
comment on: http://stackoverflow.com/a/26197858
type: Comment
score: 2
has text: @Shiva - Your answer is great, thanks a lot! Wish I could give a +5 instead of +1!
type: AnswerComment

http://stackoverflow.com/a/26109281
has comment: http://stackoverflow.com/comment/40942981
score: 1
has comment: http://stackoverflow.com/comment/40922014
has body: First, to explain what's going on: The problem is that the changes you are making cancel out multiplicatively, but transitions proceed in an additive way. So for your simple example, where radius (r) starts at 20, the scale (s) starts out (implicitly) as 1 and you are transitioning by a factor of 5, the effective radius of the circle is r*s: At the start of transition: r =20 s =1 r*s =20 At the end of transition: r =4 s =5 r*s =20 Now, the way you're thinking of it in your head is that the factor should transition from 1 to 5, but that's not what is going to happen. The default transition functions don't see your factor, they just see that radius is transitioning from 20 to 4, and scale is transitioning from 1 to 5. Therefore, at the midpoint of the transition, each attribute will be at the midpoint (average) of its start and end values: r = (20+4)/2 = 12 s = (1+5)/2 = 3 r*s = 36 In order to do what you want, you're going to have to create a custom tween, which directly transitions the factor, and then calculates the radius and scale from there: svg.selectAll("circle") .transition() .duration(2000) .tween("factor", function(d,i){ /* create an interpolator for your factor */ var f = d3.interpolateNumber(1,factor); /* store the selected element in a variable for easy modification */ var c = d3.select(this); /* return the function which will do the updates at each tick */ return function(t) { var f_t = f(t); c.attr("transform", "scale(" + 1/f_t + ")" ); c.attr("r", r*f_t ); }; }); Note that in your real application, you'll need to store the "start" value for your factor transition in a global variable or each data object, since it won't automatically be 1 when you transition to a different scaling factor. var w = 400; var h = 400; var r = 20; var factor = 5; var svg = d3.select("body").append("svg") .attr("width", w) .attr("height", h) .append("g") .attr("transform", "translate(" + w/2 + "," + h/2 + ")"); svg.append("circle") .attr("cx", 0) .attr("cy", 0) .attr("r", r)…
has comment: http://stackoverflow.com/comment/40920117
has comment: http://stackoverflow.com/comment/40920010
has comment: http://stackoverflow.com/comment/40945046
has comment: http://stackoverflow.com/comment/40947677
answers question: http://stackoverflow.com/q/26090389
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26090389
type: Answer

http://stackoverflow.com/q/26137231
has answer: http://stackoverflow.com/a/26137640
tagged with: javascript
score: -1
answer count: 3
has answer: http://stackoverflow.com/a/26137671
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has body: With only using js I'm able to select 4,6 and 8. The challenge is when I hover an item, but not the first, then I need to output/alert 3,5,7. When I hover a value inside the output, I need to exclude this from the output. For example I hover 1, then nothing happens. If I hover 2, then it outputs/alerts 3,5,7. If I hover 3, then it outputs/alerts 5,7 because 3 is one of these values. $('.item').filter(function (index) { return index > 2 && index % 2 == 1 }).css('font-weight', 'bold'); 1 2 3 4 5 6 7 8 9
has comment: http://stackoverflow.com/comment/40968298
has title: stuck in using jquery filter in my case
upvote count: 0
has comment: http://stackoverflow.com/comment/40968235
has answer: http://stackoverflow.com/a/26137843
downvote count: 1
type: Question

http://stackoverflow.com/comment/40961141
has text: so something like this? ' + this.parentNode.style.height = "200px";'
comment on: http://stackoverflow.com/q/26132905
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26175878
accepted answer of: http://stackoverflow.com/q/26159032
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26159032
downvote count: 0
type: Answer
score: 1
has body: I have managed to fix this problem, let me explain what was wrong. My getdata.php was not right, I was trying to access "param" variables which was not defined correctly. So I defined as a variable . $param = $_GET["param"]; So here is the complete getdata.php code I used to fix it. <?php $con = mysql_connect("localhost", "root", ""); if (!$con) { die('Could not connect: ' . mysql_error()); } $param = $_GET["param"]; mysql_select_db("pos", $con); if (strlen($param) > 0) { $result = mysql_query("SELECT category.short_description AS category, asset.asset_code AS code, asset_model_number.short_description AS model, asset_custom_field_helper.cfv_1 AS mnfserial, asset_custom_field_helper.cfv_6 AS proctype, asset_custom_field_helper.cfv_7 AS hdd, asset_custom_field_helper.cfv_8 AS type, asset_custom_field_helper.cfv_9 AS cond, asset_custom_field_helper.cfv_10 AS drive, asset_custom_field_helper.cfv_12 AS os, asset_custom_field_helper.cfv_13 AS cpu, asset_custom_field_helper.cfv_14 AS ram, manufacturer.short_description AS Manu, user_account.username AS testedby FROM asset_transaction LEFT JOIN asset ON asset_transaction.asset_id = asset.asset_id LEFT JOIN asset_model ON asset.asset_model_id = asset_model.asset_model_id LEFT JOIN asset_model_number ON asset.asset_model_number_id = asset_model_number.asset_model_number_id LEFT JOIN asset_custom_field_helper ON asset.asset_id = asset_custom_field_helper.asset_id LEFT JOIN user_account ON asset.created_by = user_account.user_account_id LEFT JOIN category ON asset_model.category_id = category.category_id LEFT JOIN manufacturer ON asset_model.manufacturer_id = manufacturer.manufacturer_id WHERE asset.asset_code LIKE '$param%' limit 1"); if (mysql_num_rows($result) == 1) { while ($myrow = mysql_fetch_array($result)) { $category = $myrow["category"]; $code = $myrow["code"]; $model = $myrow["model"]; $mnfserial = $myrow["mnfserial"]; $proctype = $myrow["proctype"]; $hdd = $myrow["hdd"]; $type = $myrow["type"]; $cond = $myrow["cond…
upvote count: 1

http://stackoverflow.com/comment/41011084
has text: Your question is not clear.. You can put some code which handles the click event of Delete button..
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26160193

http://stackoverflow.com/comment/40874617
type: Comment
type: QuestionComment
has text: Quentin, obviously because ive posted here! haha. Im using Aptana IDE and it in Chrome's console it says the error is on that line. "Unexpected String". I just need to know how to make it get the selected item value and plug it into the src url so it makes a full url like "example.com/images/pic.jpg"
score: 0
comment on: http://stackoverflow.com/q/26085668

http://stackoverflow.com/q/26077865
score: 0
answer count: 1
tagged with: meteor
tagged with: node-gyp
has answer: http://stackoverflow.com/a/26530258
tagged with: node.js
type: UnansweredQuestion
type: Question
has body: I'm deploying a Meteor v0.9.3 app from a OSX system onto an Ubuntu 14.04 system using Meteor-up mup v0.6.8. It gives an error as shown below. Repeated npm i -g mup, mup setup, mup deploy but it didn't solve the problem. Seems like there's a problem rebuilding the NPM packages. Has anyone encountered this issue before? Wonder if its npm-container? $ mup deploy Meteor Up: Production Quality Meteor Deployments ------------------------------------------------ Bundling Started: . Started TaskList: Deploy app 'my-test-app' (linux) [192.168.1.114] - Uploading bundle [192.168.1.114] ✔ Uploading bundle: SUCCESS [192.168.1.114] - Setting up Environment Variables [192.168.1.114] ✔ Setting up Environment Variables: SUCCESS [192.168.1.114] - Invoking deployment process [192.168.1.114] ✘ Invoking deployment process: FAILED -----------------------------------STDERR----------------------------------- gyp info spawn args '-Dmodule_root_dir=/opt/my-test-app/tmp/bundle/programs/server/npm/npm-container/node_modules/serialport', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' ] gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:343:16) gyp ERR! stack at ChildProcess.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12) gyp ERR! System Linux 3.12.28+ gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild" gyp ERR! cwd /opt/my-test-app/tmp/bundle/programs/server/npm/npm-container/node_modules/serialport gyp ERR! node -v v0.10.32 gyp ERR! node-gyp -v v1.0.2 gyp ERR! not ok -----------------------------------STDOUT----------------------------------- =&gt; re-installing binary npm module 'serialport' of packa…
tagged with: meteor-up
tagged with: javascript
has title: Error when Installing NPM module during Meteor.js's MUP Deploy

http://stackoverflow.com/a/26167170
has comment: http://stackoverflow.com/comment/41024442
answers question: http://stackoverflow.com/q/26167017
has comment: http://stackoverflow.com/comment/41024201
has body: Going off of the initial question my answer would be: No jquery is needed you can simply change your anchor tag to have the feature target='_blank'. So the full example would be: &lt;a href="http://google.com" target="_blank"&gt; 123123 &lt;/a&gt; Edit upon more review and another thought: Alternatively you could add this to your function: window.open('url to open','window name','attribute1,attribute2') So an actual example to jam in there is: nTd.click(function(e){ $(this).css("font-weight","bold"); e.stopPropagation(); window.open("http://www.google.com", "_blank"); }); Anchor Tag Reference Javascript open new window reference
score: 0
has comment: http://stackoverflow.com/comment/41024169
type: Answer

http://stackoverflow.com/comment/41033658
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26170926
type: Comment
has text: Please put the HTML somewhere in your question rather than the comment. Thanks.

http://stackoverflow.com/a/26071579
has comment: http://stackoverflow.com/comment/52298989
has body: There are three possible ways to approach it, depending on what you mean by "side by side". If you are talking about actually simultaneously executing code, it can only be achieved by multithreading, because you can imagine code like a literal thread going through the CPU, traditionally also described as a "tape" ( because that's what it used to be ). The only way to process simultaneously is by using multiple threads, multiple CPU cores instead of one. This way even if one thread takes a long time ( it blocks ), other threads are still being processed. The other advantage is that two threads are actually getting processed twice as fast, because you are using double the processing power ( or more, depending on how many threads you can use ). Javascript has no multithreading support as it's simple by design. If you are writing Javascript for the browser your only choice is using the Web Workers API, nodejs has a very similar Cluster API in the standard library, as well a frameworks. The second approach is called "subroutines", where rather than doing the entire expensive computation, you split it up into many small chunks and return control after every one of them, so other computations can be made ( for example handling of events ) between those chunks. The third, the "asynchronous" approach is irrelevant for your problem. I'm just mentioning it because it's the best approach for many very similar looking problems. Instead of doing multiple computations side by side, people often just want functions to "wait for something". It's a completely different topic, but a very popular one to be confused about.
type: Answer
answers question: http://stackoverflow.com/q/26071539
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26071539
has comment: http://stackoverflow.com/comment/52307009
has comment: http://stackoverflow.com/comment/70890634
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40849097

http://stackoverflow.com/comment/40891856
comment on: http://stackoverflow.com/a/26092602
type: Comment
has text: `url: '/echo/json/',` and `json: JSON.stringify({ status: 'success', email: email }),` are just for fake data, php request couldn't be called in jsfiddle because cross domain. Just change these line into your code, it should be ok.
score: 0
type: AnswerComment

http://stackoverflow.com/a/68541043
score: 2
upvote count: 3
downvote count: 1
has body: You can simply wrapped it inside []. This will worked as well in material UI button. [function1(), function2()]}>Click Me Click to see sample code Click to see the output
type: Answer
answers question: http://stackoverflow.com/q/26069238

http://stackoverflow.com/a/26175094
score: 0
type: Answer
has body: You can't inject a controller in a controller. Your pagination module need to declare a service or factory or provider wich will be be injected in your controller. See docs here.
answers question: http://stackoverflow.com/q/26175005

http://stackoverflow.com/comment/114404183
comment on: http://stackoverflow.com/a/26111889
type: Comment
score: 0
type: AnswerComment
has text: It's deprecated.

http://stackoverflow.com/comment/40913382
type: QuestionComment
type: Comment
has text: Since you already have the prev worked out, just check for `h6 strong`'s length
score: 0
comment on: http://stackoverflow.com/q/26106765

http://stackoverflow.com/comment/41061900
type: Comment
has text: Interesting. So what's the var keyword even for?
comment on: http://stackoverflow.com/a/26174582
score: 0
type: AnswerComment

http://stackoverflow.com/q/26071891
favorite count: 0
upvote count: 2
tagged with: google-chrome
has body: I've stumbled upon something strange.... Maybe someone can try explaining the difference between these two: var a1=Array(2); var a2=Array.apply(null,a1); console.log(a1); console.log(a2); console.log(a1[0]===a2[0]); notice the items are equal but the console log of the arrays looks different (on Chrome and NodeJS). also other aspects of them seem to work differently: a1.map(function(i){console.log("!");}) a2.map(function(i){console.log("!");}) notice that map itereares only for a2 not for a1. this happens on NodeJS, Chrome and FF.
tagged with: node.js
has answer: http://stackoverflow.com/a/26072094
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40849604
type: Question
has comment: http://stackoverflow.com/comment/40849632
score: 2
tagged with: firefox
tagged with: arrays
downvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26072094
has title: JavaScript Array weird initialization

http://stackoverflow.com/comment/41024440
has text: Ok, I'm using parseFloat and the loop is returning the all lat and lng numbers - so that works. I'm just trying to push each instance of `district` into the `polyLayer` array... I'm still working on it, but getting close.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26164050
type: AnswerComment

http://stackoverflow.com/comment/40884563
has text: This is where [transclusion](https://docs.angularjs.org/guide/directive#creating-a-directive-that-wraps-other-elements) comes in. You should look up existing code for modal dialog directives for AngularJS online, and just adapt them for your particular markup and use case.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26090854

http://stackoverflow.com/comment/40881642
type: Comment
type: QuestionComment
has text: How can I understand what's not fine, what exactly you want...?
score: 0
comment on: http://stackoverflow.com/q/26089162

http://stackoverflow.com/a/26184691
has comment: http://stackoverflow.com/comment/41061507
has comment: http://stackoverflow.com/comment/41056932
score: 0
type: Answer
has body: This is close: subject.replace(/^'|([^\\])'/g, '$1"') It won't catch two apostrophes in a row, but I suppose you could just run it twice.
answers question: http://stackoverflow.com/q/26184335

http://stackoverflow.com/q/26105267
has comment: http://stackoverflow.com/comment/40911396
tagged with: django
tagged with: python
has comment: http://stackoverflow.com/comment/40945826
has comment: http://stackoverflow.com/comment/40917624
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/40946240
type: Question
has body: I am new with Django and JavaScript and I am struggling trying to pass some values from a html table rendered with django-tables2 I want to open a django template passing 3 arguments. I have an html table with a drop down button with several options. every open a different django template. I get the values from the table with this JS function: &lt;script type="text/javascript"&gt; function param(){ $(function(){ var http = new XMLHttpRequest(); var tbl = document.getElementById("myTable"); var rows = tbl.rows; var url = "/recepcion/"; for (var i = 0; i &lt; rows.length; i++){ rows[i].onclick = function(){ idpro = this.cells; ano = this.cells; mes1 = this.cells; $.ajax({ type:"POST", url: "/recepcion/", datatype: "json", data: ({idprov: idpro[0].innerHTML, anio: ano[1].innerHTML, mes: mes1[2].innerHTML }), success: function(){ http.open("POST",url,true), http.send(data) } }); } } }); } &lt;/script&gt; The functionality that i need is: When I click in the first option of the drop down button call this function. The function will take the value from some cells and pass this values as arguments to another template where i can edit some record. This is the view where I try to pass the arguments views.py def RecepcionView(request): idp = request.POST.get('idpro') year = request.POST.get('year') month = request.POST.get('month') if request.method == 'POST': r = DetalleRecepcion.objects.get(id_proveedor=idp,year=year,month=month) form = RecepcionForm(request.POST, instance=r) if form.is_valid(): form.save() return HttpResponseRedirect('/monitor/') else: r = DetalleRecepcion.objects.get(id_proveedor=idp,year=year,month=month) form = RecepcionForm(instance=r) return render_to_response('recepcion.html', {'form':form}, context_instance=RequestContext(request)) UPDATE I change the function and I put all inside a function and now can I pass the arguments, but I get the error: ReferenceError: data is not defined http.send(data) In firebug I can see the function pass the value to t…
has comment: http://stackoverflow.com/comment/40914561
has title: Pass arguments to a django template using AJAX
tagged with: javascript
has comment: http://stackoverflow.com/comment/40945759
has comment: http://stackoverflow.com/comment/40910941
has comment: http://stackoverflow.com/comment/40917569
tagged with: django-tables2
tagged with: ajax
has comment: http://stackoverflow.com/comment/40919947
has comment: http://stackoverflow.com/comment/40946216
linked to: http://stackoverflow.com/q/25868726
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40917984

http://stackoverflow.com/q/26046875
score: 0
linked to: http://stackoverflow.com/q/21375467
answer count: 1
has comment: http://stackoverflow.com/comment/40803642
has comment: http://stackoverflow.com/comment/40803582
has comment: http://stackoverflow.com/comment/40803657
has comment: http://stackoverflow.com/comment/40803820
favorite count: 0
has comment: http://stackoverflow.com/comment/40803769
duplicate of: http://stackoverflow.com/q/3076414
upvote count: 2
type: UnansweredQuestion
downvote count: 2
has body: I'm trying to get a time data from json with the code bellow, but i get a error instead of the data, what can be happening? $.ajax({ type: "POST", url: "http://www.previsaodotempo.org/api.php?city=Rio+De+Janeiro", success: function(data) { alert() data.location; $("div").html(data); }, error: function(data) { $("div").html('can not get the json'); } }); Here is a fiddle: http://jsfiddle.net/jodgjqwf/
has comment: http://stackoverflow.com/comment/40803636
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40803746
linked to: http://stackoverflow.com/q/3076414
has answer: http://stackoverflow.com/a/26046938
type: Question
has title: Error on get json data
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40803894

http://stackoverflow.com/q/26133696
favorite count: 0
score: 2
has title: Javascript not rendering correctly in Flask jinja2 templates
has answer: http://stackoverflow.com/a/26133929
possible better answer: http://stackoverflow.com/a/26134127
downvote count: 0
tagged with: python
type: AnsweredQuestion
tagged with: jinja2
type: Question
upvote count: 2
has body: I'm writing a Flask app using jinja2, and I'm trying to pass my Python variables both into some Javascript and HTML. I made Javascript and HTML templates, but for some reason the Javascript is getting rendered and displayed in the wrong place, and I can't figure out what the problem is. My controller code that passes my Python data, and renders my templates is: @info_page.route('/info.html', methods=['GET']) def info(): ''' Documentation here. ''' session = db.Session() infoDict = {} jsDict = {} ... infoDict['character'] = character infoDict['name']=name jsDict['powertree']=powertree js = render_template('powertree.js', **jsDict) infoDict['js']=js return render_template("info.html", **infoDict) The template for info.html is: {% extends "layout.html" %} {% block head %} &lt;link rel="stylesheet" type="text/css" href=" {{url_for('static',filename='css/index.css')}}"&gt; {% endblock head %} {% block code %} {{js}} {% endblock code %} {% block body %} &lt;h1&gt;{{name}}&lt;/h1&gt; ... {% endblock body %} And the template for powertree.js is: &lt;script type='text/javascript'&gt; $(document).ready(function() { var data = {{powertree}}; console.log('hello, inside powertree'); }); &lt;/script&gt; The rendered Javascript code is just visibly printed at the top of my webpage. Looking at the DOM shows it's displayed inside the HTML body and not inside the HTML head, where it belongs. If I remove the {{js}} and replace it with the actual code inside powertree.js, everything renders fine, and works as expected. However I'd rather keep my Javascript in a separate file as it will get quite long. Why doesn't this work? How can I easily pass my variables into Javascript code so I can reference, in this example {{powertree}} in my js? Because it just visibly prints the Javascript at the top of my webpage, it makes me think it's a simple syntax error with a missing or something like that, but I can't find anything. Thanks.
answer count: 2
has answer: http://stackoverflow.com/a/26134127
tagged with: javascript
tagged with: flask
accepted answer: http://stackoverflow.com/a/26133929

http://stackoverflow.com/comment/40826770
score: 0
type: Comment
type: QuestionComment
has text: @coderboi_89 Tht's my part of mistake. I have corrected the question..
comment on: http://stackoverflow.com/q/26059318

http://stackoverflow.com/a/26053692
type: Answer
has body: Use &lt;pre&gt;&lt;/pre&gt; tag into your span. Because HTML doesn't show spaces on front end without pre tag. Your code is correct and getting values with space check here: HTML: &lt;span class="span"&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/span&gt;&lt;br&gt; &lt;input type="text" value="1 1" /&gt; jquery: $(document).ready(function(){ var inputVal = $('input').val(); $('.span pre').text(inputVal); }); http://jsfiddle.net/8numkeuu/11/
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26053526
downvote count: 0

http://stackoverflow.com/q/26103915
tagged with: ubuntu
tagged with: digital-ocean
has comment: http://stackoverflow.com/comment/40908518
score: 0
has comment: http://stackoverflow.com/comment/40909821
has body: Yesterday, I registered a new account at digitalocean.com in order to use a server. What I want to do is use Node.js for testing purposes. So I made a new droplet with the Ubuntu OS and later on, I used FileZilla to find the www file and upload html, js, css with node_modules files/folders. I installed node package manager, mongodb, mongoose and express. But the problem for now is socket.io can't be found. I changed local ip http://127.0.0.x./socket.io/socket.io.js to http://178.62.220.194/node_modules/socket.io/socket.io.js I will upload more info soon. Any help is appreciated.
has comment: http://stackoverflow.com/comment/40908555
has comment: http://stackoverflow.com/comment/40908572
has title: How to change local ip to server ip in order to use Node.js
type: UnansweredQuestion
tagged with: sockets
has comment: http://stackoverflow.com/comment/40908999
tagged with: node.js
has comment: http://stackoverflow.com/comment/40952491
answer count: 0
type: Question
tagged with: javascript

http://stackoverflow.com/q/26147461
tagged with: parsing
has answer: http://stackoverflow.com/a/26147923
type: UnansweredQuestion
score: 0
tagged with: php
has comment: http://stackoverflow.com/comment/40987664
linked to: http://stackoverflow.com/q/13840429
type: Question
answer count: 2
has body: I'm trying to get the browser's width and then compare it as a php variable, but it is saving it as a string, I tried parsing it to another variable but it only returns 0. $tam=' '; I'm doing the parsing like this: $ntam=(int) $tam;
duplicate of: http://stackoverflow.com/q/13840429
tagged with: casting
tagged with: javascript
tagged with: jquery
has title: save jscript integer as a php integer
has comment: http://stackoverflow.com/comment/40987445
has answer: http://stackoverflow.com/a/26147500

http://stackoverflow.com/comment/40913281
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26105543
has text: Thank you all for your helpful comments! I wasn't hoping to see anything in particular, and I'm not attempting to optimize anything in this manner right now. I know little of the inner workings of programming languages in general, and JavaScript works very differently from the ones that I'm used to using, so these questions are important in improving my understanding of the language. It seems clear that I can expect little to no benefit of doing this, especially considering the cost in readability.
score: 0

http://stackoverflow.com/a/26188133
accepted answer of: http://stackoverflow.com/q/26186798
answers question: http://stackoverflow.com/q/26186798
type: Answer
score: 1
upvote count: 1
has body: Your $http request returns json objects where all fields are strings. Since you feed it directly to your table, your ids are still strings and are ordered as such (1, 10, ...). You need to either preprocess the data and replace your string ids with numbers if you want to order them as numbers, or leverage the trNgGrid column options ; going by the module documentation, I would say a computed field implementing a stringToNumberFormat should do the trick : angular.module(...) .filter("stringToNumber", function () { return function (fieldValueUnused, item) { return parseInt(item.id); }; }); &lt;th field-name="numberId" display-name="id" display-format="stringToNumber:gridItem"&gt;
has comment: http://stackoverflow.com/comment/41063414
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41125330

http://stackoverflow.com/a/26180403
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26180269
has body: Initially, you set newBalance to a number. Calling either of your functions, however, will set newBalance to a string. (toFixed returns a string, not a number.) After that, newBalance + amountIn will also be a string (and be completely different from what you want &mdash; the + will denote string concatenation rather than addition), so it will not have a toFixed method. So you get the error you see. To fix this, modify your functions so that they do not convert newBalance to a string. You should use toFixed only when you are displaying the balance: console.log("Your new balance is $" + newBalance.toFixed(2));
accepted answer of: http://stackoverflow.com/q/26180269
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40803986
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26046967
has text: What if I have 2 users and I only want to move one of them but not all at once ? I´m guessing the arrayAdmins.push(aBlocked) will move everything from the array.
score: 0

http://stackoverflow.com/comment/40832808
type: QuestionComment
has text: One thing is, that your first `console.log(fxc.get());` does not print `Object { currency="EUR", exponent=2}`, but the `init`!
comment on: http://stackoverflow.com/q/26061856
score: 0
type: Comment

http://stackoverflow.com/comment/40800875
has text: Magic. You meant "<=2" btw. Thanks so much -- I've been working on that forever.
type: Comment
comment on: http://stackoverflow.com/a/26045406
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40977661
type: QuestionComment
has text: grab the current url, trim it, add the a/b/c
comment on: http://stackoverflow.com/q/26142081
score: 0
type: Comment

http://stackoverflow.com/a/26121110
score: 0
answers question: http://stackoverflow.com/q/26120732
has body: In beginning of the function validateForm() set all the texts to black. Cuz everytime you enter the validate function it will set all the texts to black, then enter the if statements if the conditions is correct. for example: function validateForm() { document.getElementById('name').removeAttribute('style'); .... .... ... } but then the color wont change until you click the button. Else add an onchange function on the textboxes to check the validation.
type: Answer
has comment: http://stackoverflow.com/comment/41011189
has comment: http://stackoverflow.com/comment/41013476

http://stackoverflow.com/q/26122419
has comment: http://stackoverflow.com/comment/40941919
tagged with: javascript
tagged with: google-maps-api-3
score: 0
tagged with: google-maps
answer count: 1
has comment: http://stackoverflow.com/comment/40941705
has comment: http://stackoverflow.com/comment/40942725
has comment: http://stackoverflow.com/comment/40942638
type: UnansweredQuestion
has title: Custom Marker Overlap issue
type: Question
has answer: http://stackoverflow.com/a/44434910
has body: I have displayed custom markers on the map. Some of them are overlapped each other. so, for that i have created one logic to display infowindows seperate on each marker click. Here is my Example : http://jsfiddle.net/u758rqpa/20/ Here you can see that when click on marker map is zooming. but , i want that when i clicked on overlapped marker then it should be zoom not on one seperate marker click. so, is there any way to find out that the markers are overlapped ? so, i can stop zooming when marker is seperate. google.maps.event.addListener(marker, 'click', (function (marker, x, content) { return function () { var zoomLevel = map.getZoom(); if (zoomLevel != 15) map.setZoom(zoomLevel + 1) infowindow.close(); infowindow.setOptions({ content: content, pixelOffset: new google.maps.Size(0, 20) }) infowindow.open(map, this); } })(marker, x, content));
has comment: http://stackoverflow.com/comment/40941941

http://stackoverflow.com/q/26141470
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26142423
tagged with: timeout
has comment: http://stackoverflow.com/comment/41145510
tagged with: responsive-slides
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41071114
has body: I created a slider with responsiveslides.js. It contains 5 different image slides. I usually can assign a timeout of, for example, 4000 milliseconds, but it will be assigned to every single image of the slider. I would like to assign different timeouts to each image slide. For example: slide 1: timeout = 10000 slide 2: timeout = 2000 slide 3: timeout = 4000 slide 4: timeout = 4000 slide 5: timeout = 2000 How can I obtain that? Is it possible? Thank you very much for your help and sorry for my poor english. I edited the code as suggested by Timctran but I did something wrong. Can you help me identifying what's wrong in this code? I tried to change the code as you suggested. I don't have experience in javascript code so I did something wrong and the slider doesn't work anymore, so I reverted to old version. Here is how i modified the code: // Array to enter timeout values. var desiredTimeouts = [10000, 2000, 4000, 4000, 2000]; // Auto cycle if (settings.auto) { startCycle = function (i) { rotate = setTimeout(function () { // Clear the event queue $slide.stop(true, true); var idx = index + 1 &lt; length ? index + 1 : 0; // Remove active state and set new if pager is set if (settings.pager || settings.manualControls) { selectTab(idx); } slideTo(idx); startCycle(index); }, desiredTimeout[i]); }; // Init cycle startCycle(index); } // Restarting cycle restartCycle = function () { if (settings.auto) { // Stop clearTimeout(rotate); // Restart startCycle(index); } }; Any help in correcting the code will be really appreciated. Thanks!
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41127234
has title: responsiveslides.js - Assign specific timeout to each slide
has answer: http://stackoverflow.com/a/26233082
accepted answer: http://stackoverflow.com/a/26142423
score: 0
has comment: http://stackoverflow.com/comment/41170156
possible better answer: http://stackoverflow.com/a/26233082
has comment: http://stackoverflow.com/comment/41065762

http://stackoverflow.com/comment/40963056
type: Comment
type: QuestionComment
has text: @ElYobo It's not really a duplicate of that. His problem isn't really with changing the class, it's with the selector to find the elements in the first place.
comment on: http://stackoverflow.com/q/26134327
score: 0

http://stackoverflow.com/comment/40802729
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26044024
has text: Have you seen [this question](http://stackoverflow.com/questions/9539294/adding-new-nodes-to-force-directed-layout)?
score: 0

http://stackoverflow.com/comment/40859055
type: AnswerComment
type: Comment
score: 2
comment on: http://stackoverflow.com/a/26076657
has text: JSON.parse(json_test); is what you're looking for.

http://stackoverflow.com/a/26127880
has body: Right, parseInt is not a regular function. It takes 2 arguments. The first is the number to parse, the second is the radix. Array.map passes 3 - the value, index, and full array. Each call goes like this: parseInt('1', 0) // 1 parseInt('1', 1) // NaN To fix this, you need to manually call the function. console.log(['1','1'].map(function(num){ return parseInt(num); }));
accepted answer of: http://stackoverflow.com/q/26127814
answers question: http://stackoverflow.com/q/26127814
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
upvote count: 1

http://stackoverflow.com/comment/40810768
comment on: http://stackoverflow.com/q/26050737
has text: provide us the fiddle.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/26056844
score: 0
has body: jQuery.toggle() accepts a boolean value indicating whether to show or hide the elements. So you can do like this: $('#guess_the_score').change(function(){ $('#theDiv').toggle($('#guess_the_score').is(':checked')); }); JSFiddle here
type: Answer
answers question: http://stackoverflow.com/q/26056633

http://stackoverflow.com/q/26118697
has body: I'm somewhat familliar with xml and json parsing but Im having a problem with this site. I tried $json_string="http://meteo.arso.gov.si/uploads/probase/www/plus/timeline/timeline_radar_si_short.xml"; $json = file_get_contents($json_string); $arr=json_decode($json_string, true); but it doesn't work. When i was analysing the data i found that there are some javascript variables inside json that are turned to data when javascript is run so maybe thats why it doesn't work. Not shure how to fix it thou. What I would like to do is parse values like "9:10 CEST"... and "si0_20140930-0710_zm_si.jpg"... into php array.
tagged with: arrays
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26120095
answer count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/40933830
tagged with: parsing
favorite count: 0
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/40933977
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26119424
possible better answer: http://stackoverflow.com/a/26118806
score: 1
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26120095
has answer: http://stackoverflow.com/a/26118806
has comment: http://stackoverflow.com/comment/40933835
has comment: http://stackoverflow.com/comment/40935181
has title: PHP parsing json from xml file
type: Question

http-headers
tags question: http://stackoverflow.com/q/26065386
tags question: http://stackoverflow.com/q/26170692
type: Tag
tag name: http-headers

http://stackoverflow.com/comment/40931271
has text: When I for example tests the code here http://stackoverflow.com/questions/15310195/from-jquery-ajax-to-breeze-js-sharepoint-odata-example?rq=1 I get the same error I'm having
type: Comment
comment on: http://stackoverflow.com/q/26083657
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40952971
has text: As far as I know there are no errors, or shouldn't be, since it works completely fine before it's locked.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26125503

http://stackoverflow.com/q/26037446
type: Question
has comment: http://stackoverflow.com/comment/40786725
has comment: http://stackoverflow.com/comment/40788191
has body: I'm having trouble with a JavaScript form validation script. Essentially if an answer hasn't been given, it should mark the question as red and not submit the form. (It adds the red by giving the class error to the question) My form is set up to POST through to another script but I want to handle the validation before POSTing so have used onsubmit to run the validation: So it runs this script. If it gets a false result then it makes the question red and then fill it in again. What I can't understand is that it still always POST's the form after the first if statement. I have noted with a comment where it gets to before it POST's. It never gets further than this, even though nothing has been returned true yet. function validateForm() { var features = document.forms["questionnaire"]["features"].value; if (features == null || features == "") { var qFeature = document.getElementById("qOne"); qFeature.className = qFeature.className + " error"; return false; } else { qFeature.className = qFeature.className + " noerror"; } // POST's form anyway here var freeDel = document.forms["questionnaire"]["importance-free-delivery"].value; if (freeDel == null || freeDel == "") { var qFreeDel = document.getElementById("qTwoOne"); qFreeDel.className = qFreeDel.className + " error"; return false; } else { qFreeDel.className = qFreeDel.className + " noerror"; } return true; } 1) What product features do you specifically look for when renting a vehicle/s for your business: Free Delivery and Collection A fixed price 2) Rank the below in terms of importance. (1 = not very important, 5 = very important) 1 2 3 4 5
has comment: http://stackoverflow.com/comment/40788340
has comment: http://stackoverflow.com/comment/40787121
accepted answer: http://stackoverflow.com/a/26038579
has comment: http://stackoverflow.com/comment/40786622
has comment: http://stackoverflow.com/comment/40788285
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40786703
has comment: http://stackoverflow.com/comment/40786180
has title: JavaScript form validation, does not complete full script before continuing
has comment: http://stackoverflow.com/comment/40787847
answer count: 2
has comment: http://stackoverflow.com/comment/40786498
has answer: http://stackoverflow.com/a/26038579
tagged with: validation
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26039385
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/40786911
possible better answer: http://stackoverflow.com/a/26039385
has comment: http://stackoverflow.com/comment/40786671
tagged with: forms

http://stackoverflow.com/q/26191263
has comment: http://stackoverflow.com/comment/41068853
has body: As we all know, obfuscated javascript code with things like "packer" and "eval" can easily be decoded by a variety of tools provided on the Internet, but recently I encountered a piece of javascript code that is obfuscated with things like []['filter']['constructor']....., which seems to have no solution to decoding. The example is as follows: []["filter"]["constructor"]("r" + "e" + "t" + "u" + "r" + "n" + " " + "e" + "s" + "c" + "a" + 211["toString"]("!0!0!01")[+true] + "e")()("" ["italics"]()[0])[true + true] + "N" + "S" + "S" + "{" + "I" + []["filter"]["constructor"]("r" + "e" + "t" + "u" + "r" + "n" + " " + "u" + "n" + "e" + "s" + "c" + "a" + 211["toString"]("!0!0!01")[+true] + "e")()([]["filter"]["constructor"]("r" + "e" + "t" + "u" + "r" + "n" + " " + "e" + "s" + "c" + "a" + 211["toString"]("!0!0!01")[+true] + "e")()("" ["italics"]()[0])[0] + "5" + "f") + 101["toString"]("!0!01")[+true] + "a" + (+"false" + []["filter"]["constructor"]("r" + "e" + "t" + "u" + "r" + "n" + " " + []["filter"]["constructor"]("r" + "e" + "t" + "u" + "r" + "n" + " " + "e" + "s" + "c" + "a" + 211["toString"]("!0!0!01")[+true] + "e")()("" ["fontcolor"]()["!01"])[true + true] + "a" + "t" + "e")()())["!0!0!00"] + "e" + []["filter"]["constructor"]("r" + "e" + "t" + "u" + "r" + "n" + " " + "u" + "n" + "e" + "s" + "c" + "a" + 211["toString"]("!0!0!01")[+true] + "e")()([]["filter"]["constructor"]("r" + "e" + "t" + "u" + "r" + "n" + " " + "e" + "s" + "c" + "a" + 211["toString"]("!0!0!01")[+true] + "e")()("" ["italics"]()[0])[0] + "5" + "f") + []["filter"]["constructor"]("r" + "e" + "t" + "u" + "r" + "n" + " " + "u" + "n" + "e" + "s" + "c" + "a" + 211["toString"]("!0!0!01")[+true] + "e")()([]["filter"]["constructor"]("r" + "e" + "t" + "u" + "r" + "n" + " " + "e" + "s" + "c" + "a" + 211["toString"]("!0!0!01")[+true] + "e")()("" ["italics"]()[0])[0] + "59" + "") + "o" + "u" + []["filter"]["constructor"]("r" + "e" + "t" + "u" + "r" + "n" + " " + "u" + "n" + "e" + "s" + "c" + "a" + 211["toString"](…
tagged with: obfuscation
score: 3
upvote count: 3
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41068834
has title: How to deobfuscate javascript codes with "[][filter][constructor]..."?
has answer: http://stackoverflow.com/a/26302015
answer count: 1
downvote count: 0
favorite count: 0
tagged with: deobfuscation
type: UnansweredQuestion

http://stackoverflow.com/comment/41038808
score: 0
comment on: http://stackoverflow.com/a/26175017
type: Comment
has text: It depends on your code, how do you add the element? In my example I add "element2", but I don't know what's the value of element2 in your code.
type: AnswerComment

http://stackoverflow.com/comment/40966935
has text: The reference to java is just to show the date notations for different countries.
comment on: http://stackoverflow.com/a/26135880
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/26285085
score: 0
accepted answer of: http://stackoverflow.com/q/26136259
has body: My simple example does work (http://jsfiddle.net/NameFILIP/ohxjarnq/2/): function addListen(x, y) { return window.addEventListener(x, y); } function doNothing() {} var i = 3; i === 3 ? addListen("click", function () { alert('clicked'); }) : doNothing(); Maybe something went wrong with your ternary operator? Check has the addListen function been executed? Take into account that it's recommended to always use ===. You can also use a Visual Event trick to inspect your event listeners.
type: Answer
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26136259

http://stackoverflow.com/q/26162805
tagged with: angularjs-ng-click
score: 3
upvote count: 3
possible better answer: http://stackoverflow.com/a/26163250
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26163274
answer count: 3
downvote count: 0
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26229827
has title: ng-click not firing when using ng-mouseenter or ng-mouseover on tablet
has answer: http://stackoverflow.com/a/26163250
has body: In my project I'm using AngularJS v1.2.16 and Bootstrap v3.1.0. The following code is correctly working on desktop side but not when trying it via tablet (ipad) In case of tablet, the ng-click is not fired on first time, only when "tabbing" again on the div element, it is fired. &lt;div ng-click="selectObject($index)" ng-class="selectedObject($index)" class="check-obj" ng-mouseover="showwhiteobj = true;" ng-mouseleave="showwhiteobj = false;"&gt; &lt;span ng-hide="selectedObject[$index]"&gt; &lt;span ng-hide="showwhiteobj"&gt;&lt;img src="img/{{imagename}}.svg"/&gt;&lt;/span&gt; &lt;span ng-show="showwhiteobj"&gt;&lt;img src="img/{{imagename}}-white.svg"/&gt;&lt;/span&gt; &lt;/span&gt; &lt;/div&gt; selectObject is just setting an array to true or false: $scope.selectObject = function (objIndex) { if ($scope.selectObject[objIndex]) { $scope.selectObject[objIndex] = false; } else { $scope.selectObject[objIndex] = true; } }; selectedObject returns an 'active' or undefined (used in ng-class): $scope.selectedObject = function (objindex) { if ($scope.selectedObject[objindex]) { objindex = 'active'; } else { return undefined; } return objindex; }; funny thing is, that when removing ng-mouseover="showwhiteobj = true;" ng-mouseleave="showwhiteobj = false;" everything is working fine (on desktop and on tablets), unfortunately I cant use different images on hover. And when trying it with ng-mouseover or ng-mouseenter its only working on desktop - on tablet its only working by doing an extra "tab/click" on the object. I dont see any errors on console side :-( Any ideas or workaround? Thanks a lot guys!
accepted answer: http://stackoverflow.com/a/26163274
type: AnsweredQuestion

requirejs
tags question: http://stackoverflow.com/q/26060377
tag name: requirejs
tags question: http://stackoverflow.com/q/26068500
tags question: http://stackoverflow.com/q/26113754
type: Tag
tags question: http://stackoverflow.com/q/26106449
tags question: http://stackoverflow.com/q/26178509
tags question: http://stackoverflow.com/q/26171629
tags question: http://stackoverflow.com/q/26146631
tags question: http://stackoverflow.com/q/26098312
tags question: http://stackoverflow.com/q/26070972
tags question: http://stackoverflow.com/q/26086705
tags question: http://stackoverflow.com/q/26078286
tags question: http://stackoverflow.com/q/26098194
tags question: http://stackoverflow.com/q/26068847
tags question: http://stackoverflow.com/q/26159959
tags question: http://stackoverflow.com/q/26180720
tags question: http://stackoverflow.com/q/26035510
tags question: http://stackoverflow.com/q/26109074
tags question: http://stackoverflow.com/q/26163937
tags question: http://stackoverflow.com/q/26129021

http://stackoverflow.com/a/26043658
has comment: http://stackoverflow.com/comment/40801955
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/26042739
downvote count: 0
has comment: http://stackoverflow.com/comment/40804376
answers question: http://stackoverflow.com/q/26042739
score: 1
has body: Since the content of you source tags are all identical, except for the sizes, the below code just combines and simplifies what is displayed. If you need, I can make a jQuery version, but here's a pure-JS solution: function size() { var width = window.innerWidth, size = '', source; if(width <= 480) size = '-small'; else if(width > 480 && width <= 800) size = '-medium'; source = ' THIS BROWSER DOES NOT HAVE NATIVE VIDEO SUPPORT'; document.getElementById('video').innerHTML = source; } Then, remove all the code from the video tag, so all you have in the body is: You'd call it onload by adding onload="videoSize()" to the body tag. Due to my lack of knowledge on how-to use JSFiddle, I had to load it using their built-in system: http://jsfiddle.net/x8h5ebq6/2/ I added an id to the video tag, but you can leave that off if you swap document.getElementById('video').innerHTML for document.getElementsByTagName('video')[0].innerHTML, the [0] corresponding to the instance on the page of the video tag you want the script to target. It can be seen at: http://jsfiddle.net/x8h5ebq6/1/
has comment: http://stackoverflow.com/comment/40804791
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40801208

http://stackoverflow.com/comment/40989532
type: Comment
type: AnswerComment
has text: Ah that was easy, thanks! I also made an update here, http://jsfiddle.net/7ywLyp6w/, that makes the map keep it's position and zoom rather than resetting. Hopefully this will save someone some searching in the future.
score: 0
comment on: http://stackoverflow.com/a/26140127

http://stackoverflow.com/comment/40905179
type: Comment
has text: please give us your HTML structure also . Would be a much help !!
score: 0
comment on: http://stackoverflow.com/q/26102427
type: QuestionComment

http://stackoverflow.com/q/26184509
accepted answer: http://stackoverflow.com/a/26185155
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41057303
tagged with: web
tagged with: jquery
has answer: http://stackoverflow.com/a/26185155
has comment: http://stackoverflow.com/comment/41057383
has comment: http://stackoverflow.com/comment/41057069
type: AnsweredQuestion
tagged with: imagemap
type: Question
has comment: http://stackoverflow.com/comment/41056866
has comment: http://stackoverflow.com/comment/41057512
has title: Imageflip Javascript does not flip
tagged with: javascript
has comment: http://stackoverflow.com/comment/41057144
has body: I have this peace of Javascript code. I have an photograph on which I want to perfom an imageflip on a mouseover. Displaying it in the browser, the original image appears. When I go with the mouse over the defined area, the cursor changes to the hand, but the image does not flip. Thus, it recognizes the defined area (the with the coordinates created polygon), but it wont flip. I cannot find the mistake. Any hints where do look for it?

http://stackoverflow.com/q/26161264
has comment: http://stackoverflow.com/comment/41012891
has comment: http://stackoverflow.com/comment/41013886
has comment: http://stackoverflow.com/comment/41012967
has comment: http://stackoverflow.com/comment/41013738
type: Question
has comment: http://stackoverflow.com/comment/41013447
has comment: http://stackoverflow.com/comment/41013118
has comment: http://stackoverflow.com/comment/41013513
has body: I wanna be able to select a specific set of child in which an attribute is defined. But how to select childs which are first child of the root selector that having the attribute data-role first-of-type selector doesn't work due to the type of the element. Here we have a sample of the DOM. [...] My filter should select only It should work in any case, meanings, it shouldn't be linked to a specific structure of the dom and must use data-role as 'selector'. I'm not a relevant jQuery developer. I tried some selector such as $('[data-role]:first-of-type'); but it doesn't work. Do you have an idea to select the right set of child. Note: Finding the first parent is not a concern.
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 3
has answer: http://stackoverflow.com/a/26161975
has answer: http://stackoverflow.com/a/26161574
has comment: http://stackoverflow.com/comment/41013941
favorite count: 0
upvote count: 2
has title: Selecting first child based on attributes
possible better answer: http://stackoverflow.com/a/26161574
has answer: http://stackoverflow.com/a/26161873
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/26161975
has comment: http://stackoverflow.com/comment/41014033

http://stackoverflow.com/a/26273477
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26069378
has comment: http://stackoverflow.com/comment/65820553
type: Answer
has body: Problem: I have resolved this issue. It appears that Internet Explorer 11 does not like aliases to the msSaveBlob function, demonstrated by the simplest examples: // Succeeds navigator.msSaveBlob(new Blob(["Hello World"]), "test.txt"); // Fails with "Invalid calling object" var saveBlob = navigator.msSaveBlob; saveBlob(new Blob(["Hello World"]), "test.txt"); So essentially the generic alias created to encapsulate saveBlob functionality, which should be permissible, prevents msSaveBlob from working as expected: var saveBlob = navigator.msSaveBlob || navigator.webkitSaveBlob || navigator.mozSaveBlob || navigator.saveBlob; Workaround: So the work around is to test for msSaveBlob separately. if(navigator.msSaveBlob) navigator.msSaveBlob(blob, filename); else { // Try using other saveBlob implementations, if available var saveBlob = navigator.webkitSaveBlob || navigator.mozSaveBlob || navigator.saveBlob; if(saveBlob === undefined) throw "Not supported"; saveBlob(blob, filename); } tl;dr So the msSaveBlob method works, as long as you don't alias the function. Perhaps it's a security precaution - but then perhaps a security exception would have been more appropriate, though I think it is most likely a flaw, considering the source. :)
score: 5
upvote count: 5
accepted answer of: http://stackoverflow.com/q/26069378

http://stackoverflow.com/q/26149982
has body: I have a function is outside of ajax function, I want to disable this "enable" click function while ajax is running, and enable it after ajax successfully loads, how do I approach this exactly? Any help would be appreciated. Here is my code: $('enable').click(function () { console.log(123); $(this).css('display', 'none'); var xhr = $.ajax({ type: "POST", url: $.vp + "signup/distLookup.ashx" + "?first=" + val_f_name + "&amp;last=" + val_l_name + "&amp;country=" + val_country + "&amp;language=" + $.langID, contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { console.log(data); ;
has answer: http://stackoverflow.com/a/26150114
has answer: http://stackoverflow.com/a/26150220
has comment: http://stackoverflow.com/comment/40992228
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26150104
accepted answer: http://stackoverflow.com/a/26150095
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26150095
tagged with: click
tagged with: ajax
score: 0
has title: how to disable a function before ajax call, and enable it on ajax success?
has answer: http://stackoverflow.com/a/26150104

http://stackoverflow.com/comment/40892963
comment on: http://stackoverflow.com/q/26095120
has text: My mobile number is `' or 1 = 1; drop table WP_eemail_Table_Sub; --` - where can I apply?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26150196
upvote count: 1
has title: jQuery extend multiple objects with the same function
tagged with: oop
accepted answer: http://stackoverflow.com/a/26184150
has answer: http://stackoverflow.com/a/26194462
possible better answer: http://stackoverflow.com/a/26194462
tagged with: javascript
tagged with: jquery
has body: So I'm using $.extend to combine multiple components (objects). Some of these components have a function with the same key. I want the final extended object to have that same key, but have it point to a function which calls all of the merged components' versions of the functions one after the other. So it'd look something like this: var a = { foo: function() { console.log("a"); } }; var b = { foo: function() { console.log("b"); } }; var c = {}; // Doesn't have foo var d = $.extend({}, a, b, c); var e = $.extend({}, a, c); var f = $.extend({}, c); d.foo(); // Should call function() { console.log("a"); console.log("b"); } e.foo(); // Should call function() { console.log("a"); } f.foo(); // Should call function() {} Is there a pragmatic way of doing this? I only want to do this for a specific set of keys, so I would only want to merge those specific keys' functions together and let the ordering in extend overwrite anything else. Hopefully that makes sense :S
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26184150
favorite count: 0
type: Question
answer count: 2

forms
tags question: http://stackoverflow.com/q/26071222
tags question: http://stackoverflow.com/q/26049244
tags question: http://stackoverflow.com/q/26047583
tags question: http://stackoverflow.com/q/26059172
tags question: http://stackoverflow.com/q/26099241
tags question: http://stackoverflow.com/q/26165173
tags question: http://stackoverflow.com/q/26121167
tags question: http://stackoverflow.com/q/26089728
tags question: http://stackoverflow.com/q/26182396
tags question: http://stackoverflow.com/q/26099136
tags question: http://stackoverflow.com/q/26078128
tags question: http://stackoverflow.com/q/26039603
type: Tag
tags question: http://stackoverflow.com/q/26044551
tags question: http://stackoverflow.com/q/26150636
tags question: http://stackoverflow.com/q/26065800
tags question: http://stackoverflow.com/q/26087204
tags question: http://stackoverflow.com/q/26110240
tags question: http://stackoverflow.com/q/26110575
tags question: http://stackoverflow.com/q/26165145
tags question: http://stackoverflow.com/q/26151524
tags question: http://stackoverflow.com/q/26063606
tags question: http://stackoverflow.com/q/26160000
tags question: http://stackoverflow.com/q/26120084
tags question: http://stackoverflow.com/q/26128083
tags question: http://stackoverflow.com/q/26111713
tags question: http://stackoverflow.com/q/26130701
tags question: http://stackoverflow.com/q/26132945
tags question: http://stackoverflow.com/q/26192657
tags question: http://stackoverflow.com/q/26112935
tags question: http://stackoverflow.com/q/26151124
tags question: http://stackoverflow.com/q/26138621
tags question: http://stackoverflow.com/q/26035309
tags question: http://stackoverflow.com/q/26109849
tags question: http://stackoverflow.com/q/26106053
tags question: http://stackoverflow.com/q/26107864
tags question: http://stackoverflow.com/q/26085293
tags question: http://stackoverflow.com/q/26064414
tags question: http://stackoverflow.com/q/26110188
tags question: http://stackoverflow.com/q/26174151
tags question: http://stackoverflow.com/q/26102752
tags question: http://stackoverflow.com/q/26057166
tags question: http://stackoverflow.com/q/26092223
tags question: http://stackoverflow.com/q/26187957
tags question: http://stackoverflow.com/q/26130832
tags question: http://stackoverflow.com/q/26059539
tags question: http://stackoverflow.com/q/26138805
tags question: http://stackoverflow.com/q/26186550
tags question: http://stackoverflow.com/q/26160358
tags question: http://stackoverflow.com/q/26054079
tags question: http://stackoverflow.com/q/26046398
tags question: http://stackoverflow.com/q/26035476
tags question: http://stackoverflow.com/q/26050722
tags question: http://stackoverflow.com/q/26189025
tags question: http://stackoverflow.com/q/26113364
tags question: http://stackoverflow.com/q/26105442
tags question: http://stackoverflow.com/q/26055496
tags question: http://stackoverflow.com/q/26159392
tags question: http://stackoverflow.com/q/26125537
tags question: http://stackoverflow.com/q/26140594
tags question: http://stackoverflow.com/q/26175505
tags question: http://stackoverflow.com/q/26059339
tags question: http://stackoverflow.com/q/26134252
tags question: http://stackoverflow.com/q/26066942
tags question: http://stackoverflow.com/q/26080694
tags question: http://stackoverflow.com/q/26045769
tags question: http://stackoverflow.com/q/26182587
tags question: http://stackoverflow.com/q/26083680
tags question: http://stackoverflow.com/q/26072754
tags question: http://stackoverflow.com/q/26127898
tags question: http://stackoverflow.com/q/26113837
tags question: http://stackoverflow.com/q/26098816
tags question: http://stackoverflow.com/q/26059330
tags question: http://stackoverflow.com/q/26111413
tags question: http://stackoverflow.com/q/26147451
tags question: http://stackoverflow.com/q/26054813
tags question: http://stackoverflow.com/q/26128172
tags question: http://stackoverflow.com/q/26141454
tags question: http://stackoverflow.com/q/26188813
tags question: http://stackoverflow.com/q/26119474

http://stackoverflow.com/comment/40957054
comment on: http://stackoverflow.com/a/26110983
score: 0
type: Comment
has text: Modifying browser/js engine code will be my last resort if no existing software/technology can help.
type: AnswerComment

http://stackoverflow.com/comment/41048768
score: 0
comment on: http://stackoverflow.com/q/26176233
has text: I'd suggest to try a different approach: use multiple Controllers within one application. ExtJS allows you to load Controllers dynamically, and Controllers will load both all the Stores and Views it needs. This is the way i solved it in my multi-app.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26079919
type: Answer
has body: I'm not 100% sure why your JS isn't working the first time around. There could be many culprits, of which Turbolinks is often a good first guess. But I think you could get closer to discovering what's going on by trying some of the following: Throw a console.log('in here'); in your JS file, right within the document ready. When it's loaded, that should print to the Web Inspector console. This will help you decipher whether the file is loading (but not running correctly) or just not loading at all. Make sure there aren't any JS errors. These would show up in red in the Web inspector. One error or weirdness might result from the way you're combining JS and ERB. A .js.erb file is generally essentially a view with combined JavaScript functionality. You'd generally keep it in the app/views directory, and tell your controller how to handle it. In this case, this looks like more or less a regular JS file -- in which case how you include it is the question that has the greatest effect on its function. Are you including it in your application.js file? In the &lt;head&gt; tag of your layout.html.erb view? Some other way? In relation to the ERBness of this file, it's worth pointing out that you don't seem to need the ERB at all. If anything, your use of ERB is potentially messing things up. The only ERB-like line I see is this one: &lt;% @user = "data" %&gt;; That line takes the Ruby/Rails variable @user and overwrites it with the string "data". That's almost certainly something you don't want to do. (I'm unsure whether it will actually affect the variable, as you use it here.) tl;dr -- I'd rename the file .js, make sure it's included in application.js, and add a console.log to the file to make sure that it's getting loaded, so you can isolate whether it's a loading issue or a JavaScript issue. Also, check for JS errors, and remove the &lt;% @user = "data" %&gt; line. Hopefully the above will get you closer to figuring out what's going on.
answers question: http://stackoverflow.com/q/26077523
score: 0

http://stackoverflow.com/comment/40896476
has text: There's no difference apart from adding some colours.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26097115
type: AnswerComment

http://stackoverflow.com/a/26133795
has body: For jQuery 1.9 and above $('.item:nth-of-type(3n)').css('font-weight','bold'); 1 2 3 4 5 6
score: 2
answers question: http://stackoverflow.com/q/26133764
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40962055
upvote count: 2

http://stackoverflow.com/comment/40917850
has text: Check your HTML file. It looks like that may be where you can also change them via this example. http://jsfiddle.net/jPlayer/XLNCY/
comment on: http://stackoverflow.com/q/26109171
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/127277407
type: AnswerComment
type: Comment
has text: I understand all this, and its exactly what i wanted. Just thank you so much for the nice explanation. learned a new word today radix
score: 1
comment on: http://stackoverflow.com/a/70961870

http://stackoverflow.com/a/26058852
upvote count: 0
type: Answer
has body: You can use jquery to find a cell containing a specific text. e.g. if text is 'hello world' than you can do a search for nodes and go to next element to it like this var checkBox = $("td:contains('hello world')").next(); // to go to next, use prev() to go to previous element to the cell var isChecked = checkBox.is(":checked"); // to check if checkbox is checked
score: -1
downvote count: 1
answers question: http://stackoverflow.com/q/26057946

http://stackoverflow.com/a/26057599
type: Answer
answers question: http://stackoverflow.com/q/26057349
has body: Something like this basic example should give you a good base to work from. If you want something a little more comprehensive, you can Google for other tutorials ul, li { list-style: none; margin: 0; padding: 0; } ul ul { display: none; position: absolute; left: 5em; } li { width: 5em; background-color: green; } li:hover ul { display: block; } li li { background-color: red; } A S T V B G H J C O P Q
score: 0

http://stackoverflow.com/q/26122849
type: Question
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27413680
score: 2
upvote count: 2
accepted answer: http://stackoverflow.com/a/27413680
tagged with: mocha-phantomjs
type: AnsweredQuestion
tagged with: phantomjs
tagged with: javascript
has title: mocha-phantomjs error loading resource mocha.js
has body: I try to run mocha-phantomjs and get this error: $ npm run test-phantom > selenium-test@0.0.5 test-phantom /path/to/project/ > mocha-phantomjs test/client.html Error loading resource file:///path/to/project//test/mocha.css (203). Details: Error opening /path/to/project//test/mocha.css: No such file or directory Error loading resource file:///path/to/project//test/mocha.js (203). Details: Error opening /path/to/project//test/mocha.js: No such file or directory Error loading resource file:///path/to/project//test/chai.js (203). Details: Error opening /path/to/project//test/chai.js: No such file or directory TypeError: 'undefined' is not a function (evaluating 'mocha.ui('bdd')') file:///path/to/project//test/client.html:11 npm ERR! Linux 3.16.3-1-ARCH npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "test-phantom" npm ERR! node v0.10.32 npm ERR! npm v2.1.1 npm ERR! code ELIFECYCLE npm ERR! selenium-test@0.0.5 test-phantom: `mocha-phantomjs test/client.html` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the selenium-test@0.0.5 test-phantom script. npm ERR! This is most likely a problem with the selenium-test package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! mocha-phantomjs test/client.html npm ERR! You can get their info via: npm ERR! npm owner ls selenium-test npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /path/to/project/npm-debug.log The test/client.html file is this: Which is pretty much the example from the README. I see 3 possible solutions to this run a local webserver to provide mocha and chai resources somehow tell phantomjs to look in node_modules for the resources I ask for Hardcode the paths of the resources in the test page which I find a bit ugly I am probably getting something wrong about this...

http://stackoverflow.com/comment/40922899
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26112051
has text: Thanks for the response - I'm able to get the autoplay working but only want it to autoplay when the user scrolls past a certain point. I tried the script you linked but it doesn't work for me. What did you use for the source in the snippet?

http://stackoverflow.com/comment/40901093
comment on: http://stackoverflow.com/a/26100331
score: 0
has text: Thanks, changed :) I'm doing delphi at the moment used to write with no parens x)
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26156639
favorite count: 0
has title: How to check if div has a specific value in JavaScript
has answer: http://stackoverflow.com/a/26156703
upvote count: 1
has comment: http://stackoverflow.com/comment/41004289
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26156658
type: Question
accepted answer: http://stackoverflow.com/a/26156658
possible better answer: http://stackoverflow.com/a/26156647
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26156647
has body: I want to know how I can let the JavaScript react when the div has a certain value. 1 If the value div has 0, I want the background color to be red of the div called background. If the value div has a other value, it should do nothing. This is what I've come up to. But it don't work. Even if I put another value in the value div, the red background still shows. Except when I emptied the value div, then ofcourse you will see nothing.
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: getelementbyid
has answer: http://stackoverflow.com/a/26157160
answer count: 4
has comment: http://stackoverflow.com/comment/41004379

http://stackoverflow.com/comment/40882219
type: Comment
comment on: http://stackoverflow.com/q/26089700
has text: I don't understand what you want to achieve. There is no user interaction...
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40949415
type: Comment
comment on: http://stackoverflow.com/a/26126777
score: 0
type: AnswerComment
has text: I've seen google create some unexpected events before (in the maps api), so you may be looking for a custom event you need to fire

http://stackoverflow.com/comment/40806672
type: QuestionComment
comment on: http://stackoverflow.com/q/26048453
type: Comment
has text: you should use something like this http://stackoverflow.com/questions/21224411/css-calc-viewport-units-workaround
score: 0

http://stackoverflow.com/comment/40987945
has text: Seems to worrk fine once you include the mixItUp plugin properly: http://jsfiddle.net/03a9g9ep/1/. Also note that if you are not on mixItUp v2 then the function in all lowercase `mixitup()`.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26147506
score: 0

http://stackoverflow.com/comment/41019448
score: 3
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26164643
has text: Have you tried using ngOptions instead?

asynchronous
tags question: http://stackoverflow.com/q/26073570
tags question: http://stackoverflow.com/q/26140276
tags question: http://stackoverflow.com/q/26060706
tags question: http://stackoverflow.com/q/26115880
tags question: http://stackoverflow.com/q/26143963
tags question: http://stackoverflow.com/q/26151130
tags question: http://stackoverflow.com/q/26149281
tags question: http://stackoverflow.com/q/26126292
tags question: http://stackoverflow.com/q/26147077
tags question: http://stackoverflow.com/q/26077604
type: Tag
tags question: http://stackoverflow.com/q/26129758
tags question: http://stackoverflow.com/q/26071539
tag name: asynchronous
tags question: http://stackoverflow.com/q/26053412
tags question: http://stackoverflow.com/q/26107009
tags question: http://stackoverflow.com/q/26110772
tags question: http://stackoverflow.com/q/26106184
tags question: http://stackoverflow.com/q/26066164
tags question: http://stackoverflow.com/q/26176957
tags question: http://stackoverflow.com/q/26053215
tags question: http://stackoverflow.com/q/26068821
tags question: http://stackoverflow.com/q/26081431
tags question: http://stackoverflow.com/q/26182271

http://stackoverflow.com/a/26063685
has body: Since Jquery is one of your tags in your question, you can just use: $(document).ready(function(){ //your code to run });
score: 0
answers question: http://stackoverflow.com/q/26063621
type: Answer

http://stackoverflow.com/comment/41031929
type: Comment
has text: Thanks so much for letting me know about adding the class instead of changing it. I'll definitely do that! How do I figure out if my script is used or not? (Sorry for the total newbie question.)
comment on: http://stackoverflow.com/a/26152781
type: AnswerComment
score: 0

http://stackoverflow.com/q/26106214
has body: I am using a function which takes a callback paramater to which im passing my own function. I'm however getting the error function expected GpsGate.Server.MyService.getTracksByUser(groupName, user.username, getTracksByUser_callback()); function getTracksByUser_callback(result) { var responseData = '&lt;response&gt;'; result.tracks.foreach( //error on this line function addTrack(track) { responseData += '&lt;track&gt;'; //ommited responseData += '&lt;/track&gt;'; } ); responseData += '&lt;/response&gt;'; response.body = responseData; } looking at examples http://msdn.microsoft.com/en-us/library/ie/ff679980(v=vs.94).aspx im unsure why it is not working
tagged with: javascript
has comment: http://stackoverflow.com/comment/40912171
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/40912420
has answer: http://stackoverflow.com/a/26106267
has title: Javascript Foreach Function Expected
score: 0
accepted answer: http://stackoverflow.com/a/26106267
type: AnsweredQuestion

http://stackoverflow.com/comment/44922626
type: AnswerComment
score: 0
type: Comment
has text: Yes, this feature is now working in ui-router-extras 0.0.11 and above.
comment on: http://stackoverflow.com/a/26767292

http://stackoverflow.com/q/26061335
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26062153
tagged with: javascript
has title: Express with Socket.IO: Server doesn't receive emits from client
tagged with: express
type: Question
score: 0
answer count: 1
has body: I am using Express and Socket.IO for a real-time notification service in a web app. The client can connect to the server, and receive emits from the server. The server, however, isn't receiving emits from the client. I have even set up post routes in Express to send emits to the client when a server side event occurs, and these work. Client Code: &lt;script type="text/javascript"&gt; var socket = io("https://{$_SERVER['HTTP_HOST']}:7076"); socket.on('message', function(data) { alert(data.message); }); socket.on('connected', function(data) { if(data.success) { socket.emit('join', { empid: '{$_SESSION['userID']}', rooms : [ '0{$_SESSION['MasterID']}', '1{$_SESSION['userDivisionID']}', '2{$_SESSION['userDistrictID']}', '3{$_SESSION['userRegionID']}', '4{$_SESSION['userOfficeID']}' ] }); } }); $(document).ready(function(){ var doc = $(document); doc.on('click', '#join_button', function(){ socket.emit('join', { empid: '{$_SESSION['userID']}', rooms : [ '0{$_SESSION['MasterID']}', '1{$_SESSION['userDivisionID']}', '2{$_SESSION['userDistrictID']}', '3{$_SESSION['userRegionID']}', '4{$_SESSION['userOfficeID']}' ] }); }); doc.on('click', '#emit_button', function() { socket.emit('office message', { office: 3454, message: 'Hello' }); }); }); &lt;/script&gt; &lt;div style="padding: 32px;"&gt; &lt;input id="join_button" type="button" class="btn btn-primary" value="Click 2 Join" /&gt; &lt;input id="emit_button" type="button" class="btn btn-primary" value="Click 2 Emit" style="float:right;"/&gt; &lt;/div&gt; The Server Code: var app = require('express')(), https = require('https'), fs = require('fs'), routes = require('./mod/routes'), socketRoutes = require('./mod/socket/routes'), sockets = require('./mod/socket/sockets'), config = require('./mod/config'), socketArray = {}, options = { key: fs.readFileSync('4096_SSL.key').toString(), cert: fs.readFileSync('wild.crt').toString(), ca: fs.readFileSync('gd_bundle.crt').toString() }, server = https.createServer(options, app); app.use(r…
tagged with: node.js
accepted answer: http://stackoverflow.com/a/26062153
tagged with: socket.io

http://stackoverflow.com/comment/40990984
comment on: http://stackoverflow.com/q/26125762
score: 0
has text: Hi tadman, thanks for your feedback. I'm really new to javascript, I only started the codeacademy.com java module last saturday and only got to learn about switches after I'd created most of the game. I should get to the jquery module in about 4 or 5 days so I will probably have a go at rewriting it once I've learnt a bit more.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40989626
score: 2
comment on: http://stackoverflow.com/a/26148573
type: AnswerComment
type: Comment
has text: Aren't events and http callbacks already wrapped in $apply()?

http://stackoverflow.com/comment/40797787
type: QuestionComment
has text: Format, for data purposes it needs to keep the .00 in the database, but when I load it on the page I need it to not show that.
comment on: http://stackoverflow.com/q/26043784
score: 0
type: Comment

http://stackoverflow.com/comment/41031646
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26171073
has text: That didn't work. I changed the dropdown and the autocomplete functions that came up were from the original selected option.
score: 0

http://stackoverflow.com/comment/40922608
comment on: http://stackoverflow.com/q/26110835
has text: Do you mean something to the effect of `"_1" = { mobile: source/test.jpg, desktop: ..., tag: ..., linkLabel: ..., title: "Test 1 Desc" }`?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26040978
has comment: http://stackoverflow.com/comment/40793423
type: Answer
upvote count: 13
answers question: http://stackoverflow.com/q/26040796
score: 13
has comment: http://stackoverflow.com/comment/66779249
downvote count: 0
has comment: http://stackoverflow.com/comment/40793346
has comment: http://stackoverflow.com/comment/40793154
has body: Setting selectedIndex to -1 clears the selection. document.getElementById('dropdownid').selectedIndex = -1;

http://stackoverflow.com/a/26087235
accepted answer of: http://stackoverflow.com/q/26087205
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40878588
has body: I've re-written your code as a Constructor in JavaScript function Player() { this.totalScore = 0; // `this` will refer to the instance this.playing = true; } Player.prototype.checkScore = function () { // the prototype is for shared methods if (this.totalScore &gt;= 100) { // that every instance will inherit this.playing = false; } }; var playerAI = new Player(), playerOne = new Player(); Some of your code patterns don't look like JavaScript though, are you sure you're not using a different language? (such as Java)
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26087205
has comment: http://stackoverflow.com/comment/40877670
type: Answer

http://stackoverflow.com/q/26052442
has comment: http://stackoverflow.com/comment/40813569
has comment: http://stackoverflow.com/comment/40813688
type: AnsweredQuestion
has title: JQuery: when mousedown on child object, trigger only parent object not child?
score: 0
type: Question
has comment: http://stackoverflow.com/comment/40813582
has answer: http://stackoverflow.com/a/26052563
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I just want to trigger parent div not child when mousedown/mousemove on child element. I am designing a object say [square] with the restricted area, It is working fine when I am moving slow mouse within area, but when I move fast It moves out of the restricted area, How can I make it in the restricted area? I don't want to use any plugin.
favorite count: 0
has comment: http://stackoverflow.com/comment/40813567
accepted answer: http://stackoverflow.com/a/26052563
upvote count: 2
has comment: http://stackoverflow.com/comment/40963598
downvote count: 2

http://stackoverflow.com/comment/40942745
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26121902
has text: DEFAULT_X and DEFAULT_Y are defined as getters, so they behave like constants. Is there a better way to achieve this? I used the || operator like this to shorten the example code. I'm aware of javascript's 'beauty'.

http://stackoverflow.com/comment/40908077
comment on: http://stackoverflow.com/a/26101623
type: AnswerComment
score: 0
has text: Still prompts the file explorer even if it returns false
type: Comment

http://stackoverflow.com/q/26182876
tagged with: javascript
has answer: http://stackoverflow.com/a/26183042
score: 0
answer count: 3
tagged with: jquery
has body: I'm using bootstrap 3 and I have a page whose contents are dynamically loaded with require_once (). I have a dropdown menu for sections. <a href="<?php echo WEB_ROOT; ?>admin"> Dashboard Catalog <a href="<?php echo WEB_ROOT; ?>admin/product/"> Products <a href="<?php echo WEB_ROOT; ?>admin/category/"> Categories What I want to do is to keep open the menu when i select a section, moving the in the appropriate section. If the pages were static it would be easier, but in this way? I have no idea how to do it. Here there is a link to demo Thanks
type: UnansweredQuestion
has title: bootstrap and custom dropdown menu
tagged with: css
tagged with: twitter-bootstrap-3
has answer: http://stackoverflow.com/a/26183106
has comment: http://stackoverflow.com/comment/41053593
type: Question
has answer: http://stackoverflow.com/a/26183040

http://stackoverflow.com/a/26108480
downvote count: 0
has body: Need to set the current window before adding the event callback and use this window variable in the callback function. IE var myWindow = window; vimeoPlayer.addEvent('play', function(){ status.text("Playing!"); myWindow.focus(); myWindow.onblur = function() { status.text("You went away!"); vimeoPlayer.api("pause"); }; }); These can be confirmed and tested at the previously linked codepen examples: Youtube: http://codepen.io/earlonrails/pen/jugAm Vimeo: http://codepen.io/earlonrails/pen/KBAmd I guess the window when clicked in the iframe would be setting onblur on the iframe window, which would then never get called, but I still can't explain why when you click play on the iframe, then click the body of the page, then click a different tab then it works. Perhaps the callback is being fired more than once from the iframe or the postMessage is being fired or still in some buffer.
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26048270
answers question: http://stackoverflow.com/q/26048270
type: Answer

http://stackoverflow.com/a/26129292
answers question: http://stackoverflow.com/q/26128329
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26128329
score: 1
has body: Here's a fiddle for my solution to your problem - http://jsfiddle.net/1nqdsyhu/ Here's the snippet of HTML/jQuery code HTML Enter The frame wich has the form hasnt been includedbecause i dont know how to, but the form above should be the value instead of the word 'name' shown as value in de javascript, wich at this point will be placed in the iframe form. jQuery $(document).ready(function(){ $('#btnMain').on('click', function() { $('ul').append(' ' + $('input').val() + '</val>'); }); });
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/26036894
tagged with: unobtrusive-validation
favorite count: 0
accepted answer: http://stackoverflow.com/a/26037183
tagged with: asp.net-mvc-4
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/40785145
has answer: http://stackoverflow.com/a/26037183
upvote count: 2
has title: Discover which submit button pressed in validation method
type: Question
tagged with: javascript
has body: I'm writing a new custom validator for MVC4. Done this several times. This time though I need to know which submit button was pressed, there are multiple submits on the form which do slightly different things based on their value. Given the common way of writing a new adapter: $.validator.unobtrusive.adapters.add( 'requiredforsubmitvalue', ['submitValue'], function (options) { options.rules['requiredforsubmitvalue'] = options.params; options.messages['requiredforsubmitvalue'] = options.message; }); $.validator.addMethod("requiredforsubmitvalue", function (value, element, params) { //which submit button pressed? }); How do I identify which submit button has been pressed? Is this even possible?
answer count: 1
downvote count: 0
tagged with: jquery

http://stackoverflow.com/comment/40917826
type: QuestionComment
has text: Sorry but the example didn't work for me. My text areas are in read mode and I do not have keyup function available for them.
comment on: http://stackoverflow.com/q/26062871
score: 0
type: Comment

http://stackoverflow.com/q/26118542
has answer: http://stackoverflow.com/a/26118665
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40933818
has comment: http://stackoverflow.com/comment/40933975
has comment: http://stackoverflow.com/comment/40934295
type: UnansweredQuestion
downvote count: 1
has answer: http://stackoverflow.com/a/26119467
type: Question
score: 3
has comment: http://stackoverflow.com/comment/40933725
tagged with: javascript
has title: Is there any difference beetween cloned div and a div created in loop?
has body: Is there any difference between a div cloned and a div generated in a loop ? I have two situations: div 1 : $('.div1').clone(true).insertAfter('.created_form'); div 2 : loop &lt;div class="div2"&gt;&lt;/div&gt; endloop I have a button in each div, to delete the div when the button is pressed. But the button for delete work only for the cloned div (div1). For div 2 is not working. My code for deleting the div is : $('.buttons').on('click', '.minus_sign', function() { var parent_id = $(this).parent().attr('id'); $("#"+parent_id).remove(); $("input[name='"+parent_id+"']").remove(); }); Can someone tell me why this is not working for both please ? I mention that the div is exaclty the same, only the id is different! Thank you
upvote count: 4
answer count: 2
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40933718

http://stackoverflow.com/comment/41115139
has text: Thx for your answer! I looked through the link you shared with me, however, this does not solve my problem. One solution I could use could be to create a google sheet where I put my data via json in. Any recommendations if that is possible with casper? I also would appreciate in example in order to accept your answer!
type: AnswerComment
comment on: http://stackoverflow.com/a/26206676
score: 0
type: Comment

http://stackoverflow.com/comment/40866761
type: Comment
score: 2
has text: I like the socket.io functionality a lot. The doc is pretty bad. I could only figure out simple things I needed to do by setting breakpoints and inspecting socket.io data structures and methods in the debugger. It shouldn't be that hard. Seriously, you use `socket.broadcast.to()` to send to a single socket and the code example for that is in the chat rooms part of the doc? That's odd.
type: AnswerComment
comment on: http://stackoverflow.com/a/26081170

http://stackoverflow.com/comment/41050906
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26179547
type: Comment
has text: So in the typical case, what prompts Angular to do an automatic rebind to the scope (an automatic re-application of the directives)? Is it hooking event handlers to the user interface pieces that are bound, so that UI changes (like a textbox entry) forces a rebind? Or is it doing some sort of rebind with a timer or loop (polling)?

http://stackoverflow.com/q/26123468
has answer: http://stackoverflow.com/a/26145355
has body: I have node labels mapped to the node "name" property, and I need the label to update on the cy canvas when the name is changed. I've been using the style style: cytoscape.stylesheet() .selector('node') .css({ 'color': '#000000', 'content': 'data(name)', 'text-valign': 'center', 'background-color': '#FFFFFF', 'border-width': 1, 'border-color': '#707070' }) and a node cy.add( { group: "nodes", data: { id: "n0", name: 'name' }, position: { x: 100, y: 100 } } ); and updating the node with cy.$('#n0').data('name', 'newName') Using 2.2.10, the node label (content) is updated on the canvas as expected. Since upgrading to version 2.3.1, this no longer works. Any suggestions for how to achieve this again would be greatly appreciated! Edit I don't know why that doesn't work, but for anyone else having this problem, for the time being I'm using eles.flashClass() to very briefly remove the node label for the node. When the temporary class is removed, the correct label is rendered. E.g. in the css style set on init .selector('node.nolabel') .css({ 'content': '' }) then to rename a node cy.$('#n0').data('name', 'newName').flashClass('nolabel',1) //class applied for 1ms then removed This works but it doesn't seem like it should be necessary, I'd really like to know why content: 'data(name)' isn't working - I don't know if it's a bug or I'm doing something wrong, only that it works below version 2.3.0
tagged with: cytoscape.js
downvote count: 0
tagged with: cytoscape-web
tagged with: javascript
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/34659374
accepted answer: http://stackoverflow.com/a/26145355
upvote count: 6
has title: dynamic node content (label) in cytoscape.js
score: 6
possible better answer: http://stackoverflow.com/a/34659374
has answer: http://stackoverflow.com/a/41881634
type: AnsweredQuestion
type: Question

http://stackoverflow.com/q/26162099
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has body: I found this code on internet. It simply alerts options that are selected from element. I have multiple elements, and I need an information from a particular one, let's say the one with id "one". How can I add this restriction to my code. $("select").change(function () { var str = ""; $("select option:selected").each(function () { str += $(this).text() + " "; }); alert(str); }) .trigger("change"); Thanks
has answer: http://stackoverflow.com/a/26162462
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/26162462
has answer: http://stackoverflow.com/a/26162471
has comment: http://stackoverflow.com/comment/41014634
tagged with: jquery
favorite count: 0
has title: How to alert selected options from particular select element
possible better answer: http://stackoverflow.com/a/26162471
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41014775

http://stackoverflow.com/a/27031054
score: 19
has body: This should fix your problem: var expect = require('chai').expect; Notice that the expect function is not being invoked.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26072381
upvote count: 19
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26072381

http://stackoverflow.com/q/26055166
answer count: 2
linked to: http://stackoverflow.com/q/19522587
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/61780196
favorite count: 0
has body: Suppose I have this reveal.js code: A: Introduction B: This slide takes 30 minutes to explain. C: This slide takes 2 hours to explain. D: Conclusion E: Click here to print this deck to PDF. Slide C and E should be shown conditionally: Show notShownInShortPresentation if URL ends with ?longDuration Show notShownInPDFOutput if URL does not ends with ?print-pdf Is that possible? If I add style="visilibity: hidden;" on a , that slide doesn't disappear, it's just empty.
has answer: http://stackoverflow.com/a/26055684
tagged with: reveal.js
score: 2
has title: Reveal.js: Conditionally show a slide
upvote count: 2
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40833211
tagged with: javascript

http://stackoverflow.com/q/26165213
downvote count: 0
tagged with: jasmine
favorite count: 0
has answer: http://stackoverflow.com/a/26165368
tagged with: angularjs
has title: How to synchronize actions between it blocks
tagged with: selenium-webdriver
type: AnsweredQuestion
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/26165368
type: Question
has body: I'm using protractor to run e2e tests on my angular app. I want to be able to synchronize actions between describe or it blocks like: describe('My spec', function () { doMyAction(); describe('My sub spec 1', function () { ... }); describe('My sub spec 2', function () { ... }); doAnotherAction(); }); The problem is these actions are executed in this order: doMyAction doAnotherAction describe1 describe2 Is there a way to force the describe blocks to be executed before doAnotherAction? I checked the control flow feature: https://code.google.com/p/selenium/wiki/WebDriverJs#Control_Flows What I want to know is do the describe blocks return a promise I can sync with?
tagged with: protractor
tagged with: javascript
answer count: 1

http://stackoverflow.com/q/26120951
tagged with: javascript
score: 0
tagged with: validation
answer count: 1
has body: Is it possible to disable JS validation in Domino Designer 8.5.3? I'm accessing a database design where some 3rd party JS libraries (for example the Bootstrap min JS lib: bootstrap.min.js) have been installed within Code/Script Libraries rather than in the Resources/Files section. The problem that this creates is that the built in JS validator now displays lots of JS errors in the Problems window whenever I'm accessing this application. Not the biggest deal but it makes seeing actual errors/warnings a bit more difficult to find. I've tried enabling project specific settings and disabling the various JS validators in the Validation section but none seem to have any effect. I've seen people mention that it's possible to disable this validation in standalone Eclipse but I can't seem to get anything to work in Domino Designer. Any thoughts welcome.
tagged with: lotus-notes
type: UnansweredQuestion
tagged with: lotus-domino
tagged with: eclipse
type: Question
has title: Domino Designer - Disable Javascript Validation?
has answer: http://stackoverflow.com/a/27251698

http://stackoverflow.com/a/34361484
has body: The simple answer is to use ng-class. Here is an working example: var app = angular.module('myApp', []); app.controller('myCtrl', function() { var vm = this; vm.books = [{ author: 'Dickens', title: 'A Christmas Carol', disposed: false }, { author: 'Twain', title: 'The Adventures of Huckleberry Finn', disposed: true }]; }); .disposed { color: red; } th, td { padding: 2px 10px; text-align: left; } &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"&gt;&lt;/script&gt; &lt;div ng-app="myApp"&gt; &lt;div ng-controller="myCtrl as C"&gt; &lt;table&gt; &lt;tr&gt; &lt;th&gt;Author&lt;/th&gt; &lt;th&gt;Title&lt;/th&gt; &lt;/tr&gt; &lt;tr ng-repeat="book in C.books"&gt; &lt;td&gt; {{book.author}} &lt;/td&gt; &lt;td&gt; &lt;span ng-class="{disposed: book.disposed}"&gt; {{book.title}} &lt;/span&gt; &lt;span ng-if="book.disposed"&gt; &amp;nbsp;(Disposed) &lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt;
score: 0
answers question: http://stackoverflow.com/q/26052792
type: Answer

http://stackoverflow.com/q/26131926
has answer: http://stackoverflow.com/a/26132004
has body: On my page here: http://greenjobinterview.com/win-fiat-hr-tech/ if there is any query string added to the URL, it causes the page to "jump down" halfway. For example: http://greenjobinterview.com/win-fiat-hr-tech/?question. When I disable JavaScript for the page, the problem goes away. I inherited this from another developer. How can I even begin investigate which javascript file is the culprit? Thanks!
type: AnsweredQuestion
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26151055
has comment: http://stackoverflow.com/comment/40958913
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40993945
accepted answer: http://stackoverflow.com/a/26151055
tagged with: query-string
possible better answer: http://stackoverflow.com/a/26132004
has title: Query appended to url causes page to jump down

http://stackoverflow.com/comment/40915712
type: Comment
type: QuestionComment
has text: You want to ignore the links that have the class .external-links and that are inside p tag?
comment on: http://stackoverflow.com/q/26107993
score: 0

http://stackoverflow.com/q/26035010
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/16337149
has comment: http://stackoverflow.com/comment/40783134
score: 1
tagged with: asp.net
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/40785349
has comment: http://stackoverflow.com/comment/40784013
upvote count: 1
tagged with: vb.net
has comment: http://stackoverflow.com/comment/40785404
has title: Previous pages visible even after Logging Out. The Page is Cached
has comment: http://stackoverflow.com/comment/40782170
answer count: 0
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40782101
has body: After a User Logs-out the page is redirected to Login.aspx page but after pressing the Back Button he is able to see the previous pages. I have already used JavaScript to disable the Back Button My Logout.aspx is as Follows: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Logout.aspx.vb" Inherits="Logout" %> Untitled Page And Logout.aspx.vb as Follows: Imports System.Data.SqlClient Imports System.Data Partial Class Logout Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim strHostName As String = System.Net.Dns.GetHostName() Dim clientip As String = GetIpAddress() Dim params() As SqlParameter = New SqlParameter(6) {} params(0) = New SqlParameter("@compname", strHostName) params(1) = New SqlParameter("@ip_add", clientip) params(2) = New SqlParameter("@mac_add", "") params(3) = New SqlParameter("@login_id", Session("login").ToString()) params(4) = New SqlParameter("@user_name", Session("topusr").ToString()) params(5) = New SqlParameter("@login_status", "Logout Success") params(6) = New SqlParameter("@counted", "Y") Dim cnString As String = ConfigurationManager.ConnectionStrings("patravaliConnectionString").ToString Dal.ExecuteNonQuery(cnString, CommandType.StoredProcedure, "sp_audit1", params) Response.Cookies.Add(New HttpCookie("Asp.Net_SessionId", "")) Response.Cookies.Add(New HttpCookie("ASMSAUTH", "")) Response.Cache.SetCacheability(HttpCacheability.NoCache) Response.Cache.SetExpires(Now.AddSeconds(-1)) Response.Cache.SetNoStore() Response.AppendHeader("Pragma", "no-cache") Page.Response.Cache.SetCacheability(HttpCacheability.NoCache) System.Web.Security.FormsAuthentication.SignOut() Response.Redirect("login.aspx") 'FormAuthentication.Signout() Response.Buffer = True Response.ExpiresAbsolute = DateTime.Now.AddDays(-1D) Response.Expires = -1500 Response.CacheControl = "no-cache" 'Response.Buffer=true;<o:p></o:p> 'Response.ExpiresAbsolute=DateTime.Now.AddDays(-1d); 'Response.Expires =-…
tagged with: jquery

http://stackoverflow.com/comment/40948468
comment on: http://stackoverflow.com/a/26075773
type: AnswerComment
score: 0
type: Comment
has text: nevermind got it just had to npm install selenium-server

http://stackoverflow.com/comment/41055011
comment on: http://stackoverflow.com/a/26183765
score: 0
has text: Doesn't really help w/ the images, but a good point nonetheless.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26041875
has answer: http://stackoverflow.com/a/26042014
tagged with: php
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
accepted answer: http://stackoverflow.com/a/26042014
tagged with: zend-framework
tagged with: javascript
linked to: http://stackoverflow.com/q/25720697
has title: How can I call ajax array passed from php json encode? zend framework 2
score: 0
answer count: 1
tagged with: ajax
has body: I can't call an arrays passed from the php json encode. I would concatenate 2 select state-contry-city. How can I do this?? This is the code: I have 2 selects. I send the first value to an action: php action into my controller: public function regioniProvinceComuniAction(){ $response = $this-&gt;getResponse(); $request = $this-&gt;getRequest(); if ($request-&gt; isPost()){ $post_data = $request-&gt;getPost(); $regione = (int)$post_data['regione']; $province = (int)$post_data['province']; } if(isset($regione)){ $prov = $this-&gt;getProvincia($regione); } if(isset($province)){ $com = $this-&gt;getComuni($province); } $response-&gt;setContent(\Zend\Json\Json::encode(array('prov' =&gt; $prov, 'com' =&gt; $com))); return $response; } This is my js file: $("select#Regione").change(function () { var regione = $("select#Regione option:selected").attr('value'); $.ajax({ type: 'POST', url: '/zf-tutorial/public/regioni-province-comuni', datatype: 'json', data: { regione: regione }, success: function (data) { alert (data); } }); }); An example of the alert function is like this: {"prov":[{"id":"10","nome":"Genova"},{"id":"8","nome":"Imperia"},{"id":"11","nome":"La Spezia"},{"id":"9","nome":"Savona"}],"com":[]} I tried to populate my second select via data.post like this, but the values are "undefined": success: function (data) { $('select#Provincia option').each(function(){$(this).remove()}); for(var i=0; i&lt;data.length; i++){ $("select#Provincia").append('&lt;option value="' + data[i].prov.id + '"&gt;' + data[i].prov.nome + '&lt;/option&gt;'); } i tried to do for (var i = 0; i &lt; data.prov.length; i++) { $("select#Provincia").append('&lt;option value="' + data.prov[i].id + '"&gt;' + data.prov[i].nome + '&lt;/option&gt;'); } if i set manually the var data, works fine, but with the response data doesn't work. i tried to do: var prov = data.prov; $("div#id").html(prov); but it doesn't work. works only like this: $("div#id").html(data); and the output is the same {"prov":[{"id…
has comment: http://stackoverflow.com/comment/40827339

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

greasemonkey
tags question: http://stackoverflow.com/q/26156245
tags question: http://stackoverflow.com/q/26106709
tags question: http://stackoverflow.com/q/26042267
type: Tag
tag name: greasemonkey
tags question: http://stackoverflow.com/q/26153382
tags question: http://stackoverflow.com/q/26084060
tags question: http://stackoverflow.com/q/26052194

http://stackoverflow.com/q/26172525
tagged with: jquery
has comment: http://stackoverflow.com/comment/41034718
has answer: http://stackoverflow.com/a/26188554
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41034178
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41034097
has body: I'm new to JS and HTML and there are many things I'm trying to understand so if anyone can help and explain it'd be great. Here's my snippet. &lt;script&gt; $(".radio-inline").click(function(){ $("#team").click(function(){ create_Countdown(data[2].year, data[2].month, data[2].day, data[2].Hours, data[2].ampm, data[2].minute, data[2].second); }); }); &lt;/script&gt; For some reason whenever I call the create_Countdown() function within the jquery functions it is generated on an all blank page. I am assume that all the other code is being deleted for some reason. The weird thing is that if I call the function without call the jquery function it prints where I want it to. Can anyone help? For those asking to see the code for create_Countdown() here it is function create_Countdown(yearx, monthx, dayx, hourx, ampmx, minutex, secondx){ //Code to create a new countdown with the parameters new Countdown({year : yearx, month : monthx, day : dayx, hour : hourx, ampm : ampmx, minute : minutex, second : secondx}); } I tried to put a return before new to see if there would be a difference and nope.
accepted answer: http://stackoverflow.com/a/26188554
tagged with: javascript
has comment: http://stackoverflow.com/comment/41034122
score: 0
possible better answer: http://stackoverflow.com/a/26184279
answer count: 2
has answer: http://stackoverflow.com/a/26184279
has comment: http://stackoverflow.com/comment/41063924
has comment: http://stackoverflow.com/comment/41034273
has title: Data being overwritten in this one specific scenario

http://stackoverflow.com/comment/41062386
type: QuestionComment
comment on: http://stackoverflow.com/q/26187543
score: 0
has text: also, you can just use strings: `new Date("2014");`.. See example: **http://jsfiddle.net/ydjc9g1f/3/**
type: Comment

http://stackoverflow.com/a/26183242
downvote count: 0
upvote count: 5
type: Answer
has body: I'd like to contribute to this interesting thread by extending to the concept of the revealing module pattern, which ensures that all methods and variables are kept private until they are explicitly exposed. In the latter case, the addition method would be called as Calculator.add();
answers question: http://stackoverflow.com/q/26092101
score: 5

http://stackoverflow.com/a/26147600
type: Answer
answers question: http://stackoverflow.com/q/26147194
score: 0
has body: There is actually a CSS-only solution, but it is not recommended. I am going to provide it simply for curiosity's sake, and to demonstrate the diversity of solutions available. It involves invoking a property which is supported by mozilla/chrome/safari, but for which official induction to the CSS3 standard never happened: the user-modify property. In my example, the content of a div becomes editable when clicking on a checkbox. This supports full rich-text paste. I'm also using an attribute selector to determine when the checkbox is checked, and an adjacent sibling selector to then apply the property in question. Here is a jsFiddle example that includes some extra styling. Below is the bare-bones example. input[type=checkbox]:checked + .content { user-modify: read-write; -moz-user-modify: read-write; -webkit-user-modify: read-write; } &lt;input type="checkbox"&gt; Edit &lt;div class="content"&gt; This is the content, only editable when the checkbox above is checked. &lt;/div&gt;

http://stackoverflow.com/comment/41006952
has text: I don't. But i have multiple JS file connected (several dozens), and it may exist somewhere
type: Comment
comment on: http://stackoverflow.com/a/26157973
score: 0
type: AnswerComment

http://stackoverflow.com/q/26115352
type: Question
score: 0
has body: I use Grunt and grunt-contrib-jasmine to start jasmine tests. My config in Gruntfile: jasmine : { src : ['src/main/webapp/app/js/controllers/*.js'], options: { specs: 'src/main/webapp/specs/*spec.js', vendor: '/src/main/webapp/app/lib/angular.min.js', helpers: '/src/main/webapp/specs/helpers/angular-mocks.js' } } But after grunt:jasmine i get error 'ReferenceError: Can't find variable: module How can I fix it?
answer count: 1
tagged with: javascript
tagged with: jasmine
tagged with: angularjs
type: UnansweredQuestion
has title: Jasmine. Module is undefined even when angular-mocks used
has answer: http://stackoverflow.com/a/26115580

http://stackoverflow.com/comment/40973238
has text: There is your answer... http://stackoverflow.com/questions/582244/is-there-a-w3c-valid-way-to-disable-autocomplete-in-a-html-form
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26139688
type: Comment

http://stackoverflow.com/comment/41027391
score: 0
has text: I am displaying information on physical objects. Each content page can have its own static HTML file and those files loaded into a template. The primary purpose of the site is to put it on an ipad and let users navigate around on it while staring at the physical objects themselves. As a secondary purpose, users will be able to learn about the library special collection while not actually in the archives room.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26168692

http://stackoverflow.com/a/26164727
answers question: http://stackoverflow.com/q/26164490
type: Answer
upvote count: 1
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41020535
has body: Okay, I think I found it. The problem as just in my partition loop, I was ending it too early. Here is the complete code: function quicksort ( arr ) { // Launch the sorting process. sort(arr, 0, arr.length - 1 ); /** * swap * takes in an array and two indicies, * swaps the elements in the array at those indicies */ function swap ( arr, a, b ) { var temp = arr[a]; arr[a] = arr[b]; arr[b] = temp; } function partition ( arr, l, r) { var p = arr[r], i = l - 1, j = l; while ( j &lt; r) { if (arr[j] &lt;= p) { swap ( arr, ++i, j ); } j++; } // Put the pivot in its correct place swap (arr, i + 1, r); return i + 1; } function sort ( arr, l, r ) { var p; if (l &lt; r) { p = partition( arr, l, r ); sort( arr, l, p - 1); sort( arr, p + 1, r); } else if (l === arr.length) { // Output the sorted array. console.log(arr); } } } Basic tests: quicksort( [19,12,1,2,3,123,23,2,5] ) [ 1, 2, 2, 3, 5, 12, 19, 23, 123 ] quicksort( [8,3,2,1,5,1,3] ) [ 1, 1, 2, 3, 3, 5, 8 ] Open to suggestions on how to improve! :)

http://stackoverflow.com/a/26136520
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40966905
has comment: http://stackoverflow.com/comment/51186476
has comment: http://stackoverflow.com/comment/40967082
has comment: http://stackoverflow.com/comment/40967172
type: Answer
has body: you can use the oninput event, and write a simple function that enforces unique values from a list: &lt;script&gt; function verifyInput(txt, mask) { var res = ''; for (var i = 0; i &lt; txt.length; i++) { var char = parseInt( txt[i] ); if (mask.indexOf(char) &gt; -1 &amp;&amp; res.indexOf(char) === -1) res += char; } return res; } &lt;/script&gt; &lt;input type="text" id="unique-numbers" oninput="this.value=verifyInput(this.value, [0, 1, 2, 4])" /&gt; It'll probably be faster than a jQuery plugin, and also easier to maintain (you're not limited to anything, really).
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26136026
answers question: http://stackoverflow.com/q/26136026
has comment: http://stackoverflow.com/comment/51182824

http://stackoverflow.com/comment/41128337
type: Comment
comment on: http://stackoverflow.com/a/26222675
score: 0
type: AnswerComment
has text: You can't set `select` `readonly`. You can set thought `disabled` but again it doesn't work.

http://stackoverflow.com/comment/41013133
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26161388
has text: I think @Regent is trying to tell you to show what you have come up with for now ;-) Show your JS code.

requestanimationframe
tags question: http://stackoverflow.com/q/26120838
type: Tag
tag name: requestanimationframe

http://stackoverflow.com/comment/41045405
has text: can you show your router. If your comments are nested in post resource you must specified that in your controller.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26140710
score: 0

http://stackoverflow.com/a/26118580
has comment: http://stackoverflow.com/comment/40935161
score: 0
has comment: http://stackoverflow.com/comment/40935343
type: Answer
answers question: http://stackoverflow.com/q/26116989
has comment: http://stackoverflow.com/comment/40935129
has body: Do you have a local copy of http://j.maxmind.com/app/geoip.js as 500 Internals server error is return to me. Also you are not using this properly, first you need to have geoip_country_code(); when page is loaded, if this is actually JS function, and I don't get the PHP part as there is no such function in PHP MaxMind code geoip_country_code(). In your php do following &lt;?php include('geoip.inc'); include('geoipregionvars.php'); include('timezone/timezone.php'); $gi = geoip_open(PATH_TO_GeoIP.dat,GEOIP_STANDARD); list($country_code,$region) = geoip_region_by_addr($gi, $IP_ADDRESS); $timeZone = get_time_zone($country_code,$region);
has comment: http://stackoverflow.com/comment/40934557
has comment: http://stackoverflow.com/comment/40934207

http://stackoverflow.com/comment/40959861
type: Comment
score: 0
type: AnswerComment
has text: Excellent! The does explain why the model was not binding to the control and I verified by setting the initial value of the model to a valid value. However that still leaves me with the problem in Label3. You will notice in the output that value3 does not contain a value for $error. I would expect it to contain a value the same as value1. Am I missing something or is this a correct assumption?
comment on: http://stackoverflow.com/a/26132358

http://stackoverflow.com/comment/40885319
type: Comment
has text: I will try that when I get back to that computer. But the strange thing is that, that part of code is only called when a button is clicked. And the code will still be overwritten, even when it's not beeing clicked. If I delete that line, is there an alternative to save the file? I will need to save it somehow
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26090880

http://stackoverflow.com/comment/41039771
type: QuestionComment
has text: @LeeWillis Well take a look at Windows for example. At standar settings the single click select and double click open/execute. But just like the OP problem, really do both thing, first select and then execute at double click.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26175501

http://stackoverflow.com/comment/40839263
has text: What errors does it show in the console.
type: Comment
comment on: http://stackoverflow.com/q/26066145
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40783111
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26035638
has text: @martincarlin87 How do I check?

http://stackoverflow.com/comment/40880140
type: Comment
type: QuestionComment
score: 3
has text: Not sure I get it, isn't that just as expected, the keyup event fires when the button is released so e.metaKey will be false at that point even if the keyup event fires with the correct keyCode ?
comment on: http://stackoverflow.com/q/26088671

http://stackoverflow.com/q/26192581
has answer: http://stackoverflow.com/a/26192738
tagged with: jquery
favorite count: 0
has title: Open a URL in a new Tab
has answer: http://stackoverflow.com/a/26192635
has body: I want to open a URL in a new browser tab with JavaScript or jQuery. And if it's already been opened, the tab is selected. I use this function to open. function OpenInNewTab(url) { var win = window.open(url, '_blank'); win.focus(); } What should I do if the tab is already open?
duplicate of: http://stackoverflow.com/q/8135188
upvote count: 3
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41071003
score: -2
has comment: http://stackoverflow.com/comment/41070955
downvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/41071005
linked to: http://stackoverflow.com/q/7389328
answer count: 2
linked to: http://stackoverflow.com/q/2704206
linked to: http://stackoverflow.com/q/8135188

http://stackoverflow.com/q/26183995
tagged with: jquery
has answer: http://stackoverflow.com/a/26184052
favorite count: 0
tagged with: dotnetnuke
has comment: http://stackoverflow.com/comment/41055797
has title: Prevent parent script from firing
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26185212
has answer: http://stackoverflow.com/a/26214851
has comment: http://stackoverflow.com/comment/41057279
upvote count: 1
has comment: http://stackoverflow.com/comment/41057403
possible better answer: http://stackoverflow.com/a/26185212
type: Question
score: 1
tagged with: javascript
has body: I have a DotNetNuke website. Baked into the DNN code is the following script &lt;script type="text/javascript"&gt; //&lt;![CDATA[ function WebForm_OnSubmit() { dnn.controls.submitComp.onsubmit(); return true; } //]]&gt; &lt;/script&gt; The problem is, I put a form on a page on my website that performs a search, and I wired up a jquery listener that says if the enter key is pushed, fire my button click event. The problem is, the parent script above ALSO fires that WebForm_OnSubmit() function, and whatever that onsubmit() function\return true does is causing my page to just refresh. So, if there anything i can do so "override" or "prevent" that WebForm_OnSubmit() function from also triggering? Edit 1: In response to the question "how is your listener setup": I have a function called canISearch: function canISearch() { if (event.keyCode == 13) { event.stopPropagation(); $("#btnSearch").click(); } } and I fire this function using my onkeydown attribute: &lt;input type="text" id="txtblah" onkeydown="canISearch()" /&gt;
has comment: http://stackoverflow.com/comment/41057384
accepted answer: http://stackoverflow.com/a/26214851
answer count: 3
downvote count: 0

http://stackoverflow.com/comment/41057954
type: QuestionComment
score: 0
has text: Don't be so harsh dude. :D
comment on: http://stackoverflow.com/q/26185332
type: Comment

http://stackoverflow.com/q/26183944
has comment: http://stackoverflow.com/comment/41055445
has comment: http://stackoverflow.com/comment/41055842
has body: I've been programming a lot in Swift recently. Today I did some work in JavaScipt when question popped up to me: Is there something similar to optional chaining in JavaScript? A way to prevent undefined is not an object without any variables? Example: function test(){ if(new Date() % 2){ return {value: function(){/*code*/}}; } } test().value(); will fail half of time because sometimes test returns undefined. The only solution I can think of is a function: function oc(object, key){ if(object){ return object[key](); } } oc(test(), 'value'); I would like to be able to do something like: test()?.value() The part after the question mark is only executed if test returned an object. But this is not very elegeant. Is there something better? A magic combination of operators? Edit I know I could rewrite test to return something. But I'm wondering if there's something like optional chaining. I'm not interested in a particular solution to the above example. Something that I also can use if have no control over the function returning undefined.
has comment: http://stackoverflow.com/comment/41055981
accepted answer: http://stackoverflow.com/a/49242861
linked to: http://stackoverflow.com/q/17341456
downvote count: 0
answer count: 7
linked to: http://stackoverflow.com/q/52633568
has comment: http://stackoverflow.com/comment/41055751
possible better answer: http://stackoverflow.com/a/26184000
favorite count: 0
has comment: http://stackoverflow.com/comment/41056006
has title: Optional Chaining in JavaScript
has comment: http://stackoverflow.com/comment/41055465
has answer: http://stackoverflow.com/a/26184013
has answer: http://stackoverflow.com/a/26184000
has answer: http://stackoverflow.com/a/62890385
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/49242861
score: 21
has answer: http://stackoverflow.com/a/60845999
tagged with: optional-chaining
upvote count: 21
has answer: http://stackoverflow.com/a/61250539
has comment: http://stackoverflow.com/comment/41055856
type: Question
duplicate of: http://stackoverflow.com/q/32139078
tagged with: javascript
has answer: http://stackoverflow.com/a/26189937

http://stackoverflow.com/comment/41024298
has text: Sure, I'm one of them, but that's another question.
type: Comment
comment on: http://stackoverflow.com/a/26167226
score: 1
type: AnswerComment

http://stackoverflow.com/comment/41071636
type: Comment
has text: Good point, and thanks for the formatting tip.
comment on: http://stackoverflow.com/a/26192631
type: AnswerComment
score: 0

http://stackoverflow.com/a/26124115
has comment: http://stackoverflow.com/comment/40948042
has comment: http://stackoverflow.com/comment/40946958
type: Answer
has body: It looks like you're calling parseInt on a string such as this: 'AS.010.232' According to this, parseInt will return NaN for such values. Quoting from there: If the first character cannot be converted to a number, parseInt returns NaN. Since all of those sort values are being interpreted as NaN it may actually be sorting them, just in some random order. Instead of calling parseInt, try just returning the text directly: getSortData: { course_number: function ($elem) { return $elem.find('.course-number').text(); } }, This seems to be working in this updated fiddle, and is also pretty much identical to the examples on Isotope's manual entry for sorting.
has comment: http://stackoverflow.com/comment/40956430
score: 1
answers question: http://stackoverflow.com/q/26123956
has comment: http://stackoverflow.com/comment/40955791
has comment: http://stackoverflow.com/comment/40947604
has comment: http://stackoverflow.com/comment/40948420
accepted answer of: http://stackoverflow.com/q/26123956
upvote count: 1
has comment: http://stackoverflow.com/comment/40952768
type: AcceptedAnswer
downvote count: 0

mysql
tags question: http://stackoverflow.com/q/26060824
tags question: http://stackoverflow.com/q/26134104
tag name: mysql
tags question: http://stackoverflow.com/q/26042013
tags question: http://stackoverflow.com/q/26192220
tags question: http://stackoverflow.com/q/26127531
tags question: http://stackoverflow.com/q/26172828
tags question: http://stackoverflow.com/q/26102461
tags question: http://stackoverflow.com/q/26079185
tags question: http://stackoverflow.com/q/26076823
tags question: http://stackoverflow.com/q/26071884
tags question: http://stackoverflow.com/q/26112093
tags question: http://stackoverflow.com/q/26090855
tags question: http://stackoverflow.com/q/26116199
tags question: http://stackoverflow.com/q/26107500
tags question: http://stackoverflow.com/q/26155764
tags question: http://stackoverflow.com/q/26050244
tags question: http://stackoverflow.com/q/26059647
tags question: http://stackoverflow.com/q/26101758
tags question: http://stackoverflow.com/q/26083987
tags question: http://stackoverflow.com/q/26055928
tags question: http://stackoverflow.com/q/26143371
tags question: http://stackoverflow.com/q/26130342
tags question: http://stackoverflow.com/q/26082005
tags question: http://stackoverflow.com/q/26086933
type: Tag
tags question: http://stackoverflow.com/q/26108487
tags question: http://stackoverflow.com/q/26090846
tags question: http://stackoverflow.com/q/26146817
tags question: http://stackoverflow.com/q/26127126
tags question: http://stackoverflow.com/q/26092913
tags question: http://stackoverflow.com/q/26190074
tags question: http://stackoverflow.com/q/26174403
tags question: http://stackoverflow.com/q/26069544
tags question: http://stackoverflow.com/q/26159032
tags question: http://stackoverflow.com/q/26047755
tags question: http://stackoverflow.com/q/26126850
tags question: http://stackoverflow.com/q/26116608
tags question: http://stackoverflow.com/q/26118700
tags question: http://stackoverflow.com/q/26077699
tags question: http://stackoverflow.com/q/26121909

http://stackoverflow.com/a/26133797
has comment: http://stackoverflow.com/comment/40962322
downvote count: 0
has comment: http://stackoverflow.com/comment/40962478
has comment: http://stackoverflow.com/comment/40965705
has comment: http://stackoverflow.com/comment/40967696
has comment: http://stackoverflow.com/comment/40965896
has comment: http://stackoverflow.com/comment/40962388
answers question: http://stackoverflow.com/q/26133764
upvote count: 3
has body: You can use .filter() like $('.item').filter(function(idx) { return idx > 2 && idx % 2 == 1 }).css('font-weight', 'bold'); 1 2 3 4 5 6 7 8 9 or if all these items are children of 1 parent and there are no other elements between them then use the :nth-child selector $('.item:nth-child(2n + 4)').css('font-weight', 'bold'); .item:nth-child(2n + 4) { padding-left: 10px; } 1 2 3 4 5 6 7 8 9
has comment: http://stackoverflow.com/comment/40966096
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40965763
accepted answer of: http://stackoverflow.com/q/26133764
has comment: http://stackoverflow.com/comment/40962446
has comment: http://stackoverflow.com/comment/40962266
type: Answer
score: 3

http://stackoverflow.com/q/26046428
has comment: http://stackoverflow.com/comment/40802900
downvote count: 0
score: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26046934
favorite count: 0
type: Question
tagged with: dynatable
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40803008
upvote count: 1
has body: I'm attempting to write data using dyntable to an html table. One of the headers is called Week of year. In the JSON file, the name is also Week of year (with the spaces). When passing the json to dynatable: $('#week_table').dynatable({ dataset: { records: [{"Week of year":"June 9, 2014 to June 15, 2014","a":0.0,"b":0.0,"c":0.0,"d":0.0,"e":1.0,"f":0.0},{"Week of year":"June 16, 2014 to June 22, 2014","a":0.0,"b":0.0,"c":5.0,"d":0.0,"e":16.0,"f":0.0}] }}); and drawing to an html table: weekOfYear Week of year a b c d e f The table draws fine for a to f, but appears as undefined for both weekOfYear and Week of year. How do you pass json to dynatable that contains spaces?
answer count: 1
has title: Dynatable json data with spaces
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/q/26127903
tagged with: javascript
has body: I'm studying Javascript and I found a problem. I must define the constructor given some parameters. I insert them but I wanted to insert an if to check when the user inserts nothing. I'm working with the parasitic Inheritance model, but I don't know how to insert this case. Here is the part of my constructor: function user(_id, userName, email, password, firstName, lastName, date_created, playlists) { if (firstName === 'undefined') { firstName = userName; } if (lastName === 'undefined') { lastName = userName; } return { _id: _id, userName: userName, email: email, password: password, firstName: firstName, lastName: lastName, date_created: new Date(), playlists: [] }; } Suppose that the user does not use firstName and LastName. It will return undefined. But I want to store a default value. How do I do that?
downvote count: 4
upvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40951415
has answer: http://stackoverflow.com/a/26128066
linked to: http://stackoverflow.com/q/894860
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40951440
has comment: http://stackoverflow.com/comment/40951484
has comment: http://stackoverflow.com/comment/40951434
score: -4
type: Question
accepted answer: http://stackoverflow.com/a/26128066
tagged with: oop
has title: Assigning default values for parameters
has comment: http://stackoverflow.com/comment/40951442

http://stackoverflow.com/comment/41000662
comment on: http://stackoverflow.com/a/26154663
type: Comment
has text: Not familiar with flex box... that was just a desperate attempt :D
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41052762
has text: Yes it does exist. I'll put the appended code inside the console log.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26181833

http://stackoverflow.com/comment/41008057
score: 0
comment on: http://stackoverflow.com/a/26158711
type: Comment
type: AnswerComment
has text: updated, thanks. I noticed you posted a link, why don't you post it as answer? looks good to me.

http://stackoverflow.com/q/26040412
has answer: http://stackoverflow.com/a/26041660
accepted answer: http://stackoverflow.com/a/26040801
has answer: http://stackoverflow.com/a/26040624
possible better answer: http://stackoverflow.com/a/26040955
has answer: http://stackoverflow.com/a/26040955
has title: How to Go About Click Event Under Focus Event
has body: What I want is to have a hidden div displayed whenever my input box gains focus and to be able select a value and populate the textbox with. Then make the displayed div fadeOut. 1970 1971 1972 jQuery: $('.birth_date').hide(); $('body').on('focus', '#birth_year' ,function (e) { $('.birth_date').show(); //this is where my click event comes in... }) How to achieve this bubbles in my head and I am a bit confused on how to try it out. See the picture below:
answer count: 4
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
has answer: http://stackoverflow.com/a/26040801
type: Question
upvote count: 1

http://stackoverflow.com/a/26103892
type: Answer
has body: Try to remember context of this to some variable: var self = this; this.message = "hello"; ... jsFiddle
answers question: http://stackoverflow.com/q/26103841
score: 0

http://stackoverflow.com/comment/40877199
score: 1
has text: To keep the same code you can check all ancestors of the clicked element, so you need to use parents() instead of parent()
comment on: http://stackoverflow.com/q/26087049
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40897580
comment on: http://stackoverflow.com/a/26098099
score: 0
type: AnswerComment
type: Comment
has text: I have updated the fiddle; http://jsfiddle.net/fourroses666/tm10jcu0/1/ Really need a fade-in / fade-out option thow. thanks so far Alex.

http://stackoverflow.com/comment/40910795
has text: You can't render a partial after rails is processed, unluss you do ajax. If it's not the case, create both forms, hide one and than manage the hiding show of them in the change event of the select.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26105473

http://stackoverflow.com/q/26094833
tagged with: javascript
tagged with: jquery
upvote count: 2
answer count: 2
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26095015
accepted answer: http://stackoverflow.com/a/26095015
type: AnsweredQuestion
score: 2
downvote count: 0
has title: Get iframe attributes inside iframe javascript with cross domain
has body: How to get iframe attributes inside iframe javascript code &lt;div&gt; &lt;iframe src="http://192.168.0.108:8092/" name="otherDomain" width="100%" height="600px" style="border: 0;" data-auth-token="xyz" data-auth-key="abc" &gt; &lt;/div&gt; I am trying with console.log(window.frameElement.getAttribute('data-auth-token')) If iframe url and browser user is same I am able to get iframe attributes. if the urls are different I am getting following error. Uncaught SecurityError: Failed to read the 'frame' property from 'Window': Blocked a frame with origin "http://192.168.0.108:8092" from accessing a frame with origin "http://localhost:8092". Protocols, domains, and ports must match. Is it possible to get cross domain iframe attributes inside JavaScript.
possible better answer: http://stackoverflow.com/a/65313576
type: Question
has answer: http://stackoverflow.com/a/65313576

http://stackoverflow.com/comment/40783263
has text: Can't use an if in the handler?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26035932
score: 0

http://stackoverflow.com/q/26047583
tagged with: ajax
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40805163
type: UnansweredQuestion
has title: Create a form from template depending on radio button
has comment: http://stackoverflow.com/comment/40805216
has body: Hi I want to know if its possible to use javascript/jquery or Ajax to show a form based on a radio button. For example I have 2 different forms And if the one radio button is checked I want to load the first form but if the second radio button is checked I want to load the second form. Is this possible using Ajax? If its easier I just need to show/remove a select box and a input box depending on the radio button. Thanks
has comment: http://stackoverflow.com/comment/40805088
has answer: http://stackoverflow.com/a/26047853
tagged with: forms
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26047834

http://stackoverflow.com/q/26054257
tagged with: css
has comment: http://stackoverflow.com/comment/40816787
has answer: http://stackoverflow.com/a/26054414
has comment: http://stackoverflow.com/comment/40818936
type: Question
upvote count: 5
tagged with: javascript
has title: Changing visibility property
score: 5
has body: I have a div which has a class name myClass and id name myId. The div has following style. .myClass { height: 74%; margin-top: -1px; position: relative; overflow-y: auto; width: 100%; overflow-x: hidden; visibility: hidden; } When i try to change visibility from hidden to visible doing this $('#myId').css({ 'visibility': 'visible' }); I am using id in JQuery instead of class because same class is applied to others elements too. My div is still not visible. What am I doing wrong?
downvote count: 0
has answer: http://stackoverflow.com/a/26054966
tagged with: jquery
has answer: http://stackoverflow.com/a/26054590
favorite count: 0
has answer: http://stackoverflow.com/a/26055305
answer count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40822061
has comment: http://stackoverflow.com/comment/40816783
has answer: http://stackoverflow.com/a/26054561

http://stackoverflow.com/comment/40839401
has text: So you are trying to insert thousands separators? Is that right?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26066295

http://stackoverflow.com/a/26139470
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/26139337
type: Answer
has body: if(fs.existsSync(file_path)) { var file_content = fs.readFileSync(file_path, 'utf-8'); } else { var file_content = fs.writeFileSync(file_path, ''); }
answers question: http://stackoverflow.com/q/26139337

http://stackoverflow.com/q/26111651
has title: Module pattern defined in separate files
type: Question
score: 2
has comment: http://stackoverflow.com/comment/40922542
upvote count: 2
has comment: http://stackoverflow.com/comment/40922063
answer count: 1
tagged with: javascript
has body: Is there a convenient approach to code organization, which allows to create a module pattern, but define its internally exposed functionality in separate files. So, with a module below, can SomeInternalObject2 be defined in another js file and still be accessible from the first file (assuming proper ordering of script files)? var MyModule = (function(){ function SomeInternalObject1(){..} function SomeInternalObject2(){..} return { this.publicFunction = function(){..} } })(); EDIT: Perhaps I'm thinking about it in a wrong way. Code organization is a development-time concern. Require.js, module-loading, etc.. is a run-time concern.
favorite count: 0
has comment: http://stackoverflow.com/comment/40922027
has answer: http://stackoverflow.com/a/32703861
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40922563

http://stackoverflow.com/comment/40862785
comment on: http://stackoverflow.com/q/26079203
score: 1
type: QuestionComment
has text: This doesn't make sense. Why do you need i to count down in negative value cases? Do you care about the value of i? What are you trying to accomplish?
type: Comment

http://stackoverflow.com/q/26053004
has answer: http://stackoverflow.com/a/26053690
answer count: 10
has answer: http://stackoverflow.com/a/46763443
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/70878576
favorite count: 0
type: Question
linked to: http://stackoverflow.com/q/2044616
has comment: http://stackoverflow.com/comment/87876106
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/54674716
has body: I have written some JavaScript to select the table, but I want to now automatically copy it after clicking the button. My JavaScript is: function selectElementContents(el) { var body = document.body, range, sel; if (document.createRange &amp;&amp; window.getSelection) { range = document.createRange(); sel = window.getSelection(); sel.removeAllRanges(); try { range.selectNodeContents(el); sel.addRange(range); document.execCommand('Copy'); } catch (e) { range.selectNode(el); sel.addRange(range); document.execCommand('Copy'); } } else if (body.createTextRange) { range = body.createTextRange(); range.moveToElementText(el); range.select(); range.execCommand('Copy'); } }
has answer: http://stackoverflow.com/a/55952625
score: 24
has answer: http://stackoverflow.com/a/27869960
has answer: http://stackoverflow.com/a/60272473
has answer: http://stackoverflow.com/a/79539978
upvote count: 24
linked to: http://stackoverflow.com/q/400212
has answer: http://stackoverflow.com/a/55743302
has answer: http://stackoverflow.com/a/38821410
has title: How can I copy a whole HTML table to the clipboard with JavaScript?
type: UnansweredQuestion

http://stackoverflow.com/a/26128034
answers question: http://stackoverflow.com/q/26125880
has body: The $ in the parameter for the function handler is probably redefining $ as something other than the normal value of the jQuery object. Remove it from the parameters and see what you get. $(document).ready(function($ /* &lt;-- here*/ ){ } Sample: $(function(){ /*this is shorthand for $(document).ready(function(){ */ $(".tablesort").tablesorter(); });
type: Answer
score: 0

http://stackoverflow.com/a/26055462
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40819765
has body: $(document).on("change",".selector input",function(e){ $(".selector input").attr('readonly', false) ; var flag = 0; var id; debugger; $(".selector input").each(function(i){ if(this.value!="") { flag++; } else { id = this.getAttribute("id"); } }); if(flag == 2) $("#"+id).attr('readonly', true) ; else $("#"+id).attr('readonly', false) ; }); I have updated the link just check - > http://jsfiddle.net/sumeetp1991/dvdvye4p/3/
answers question: http://stackoverflow.com/q/26054814

http://stackoverflow.com/q/26162659
type: Question
accepted answer: http://stackoverflow.com/a/26165709
has title: how to apply jquery functions to ajax loaded content
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26162934
has answer: http://stackoverflow.com/a/26162934
has comment: http://stackoverflow.com/comment/41015529
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/26166038
tagged with: jquery
favorite count: 0
tagged with: ajax
has body: i'm using the tooltipster plugin to create tooltips. some of the content where i want to apply the plugin is loaded via AJAX when the page opens. i tried using jQuery(window).on("load", function(){ $('.tip1').tooltipster(); }); but it seems to apply the function only on the main page contents, not on the ajax loaded contents. this DOES work : $(document).on('ready ajaxComplete', function() { $('.tip1').tooltipster(); }); but it seems to cause errors if the content is re-loaded again via AJAX. i see lots of this warning in the console : Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips whats the best way of getting this to work? EDIT : the external content is loaded like this : &lt;script type="text/javascript"&gt; $(document).ready(function() { url = "source_url.php"; target= ".holder"; $(target).load(url); }); &lt;/script&gt; &lt;div class="holder"&gt;&lt;/div&gt;
upvote count: 2
has answer: http://stackoverflow.com/a/26165709
has comment: http://stackoverflow.com/comment/41015688
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/26046967
has comment: http://stackoverflow.com/comment/40804274
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26047200
has body: I have two kinds of arrays going on which are var arrayAdmins = [{"firstName": "Admin", "lastName": "User", "email": "test@1.com","password": "admin"}]; var aBlocked = [{"firstName": "Blocked", "lastName": "User", "email": "test2@2.com","password": "blocked"}] To keep it simple for this question I have a button: &lt;input type="button"id="switch"&gt; I then do a variable to target the button: var arraySwitch = document.getElementById('switch'); What I want to do is that when the button is clicked the user from the array called aBlocked over to arrayAdmins. So I'm hoping that from a certain admin panel, the admin can remove user from being blocked into being an admin.
score: 1
has comment: http://stackoverflow.com/comment/40804140
accepted answer: http://stackoverflow.com/a/26047561
type: Question
possible better answer: http://stackoverflow.com/a/26047200
answer count: 2
has comment: http://stackoverflow.com/comment/40804026
tagged with: function
tagged with: addeventlistener
tagged with: arrays
downvote count: 0
has comment: http://stackoverflow.com/comment/40804047
tagged with: javascript
has comment: http://stackoverflow.com/comment/40803986
has comment: http://stackoverflow.com/comment/40803859
has title: Move array item to another array on click
favorite count: 0
has comment: http://stackoverflow.com/comment/40803846
upvote count: 1
has answer: http://stackoverflow.com/a/26047561

http://stackoverflow.com/a/26182829
score: 0
has comment: http://stackoverflow.com/comment/41056763
has body: Here's a link to a fiddle that i believe solves your problem: http://jsfiddle.net/62bwav2L/ In your code I see two divs with the same id, which is not allowed - ids must be unique ... so - changed that: ... and then you can go ahead and set your innerHTML with the img tag and all (not that that's a particularly elegant way to do this - but it will work) document.getElementById("resultPoopClick").innerHTML = " " + localStorage.clickcount + " ";
has comment: http://stackoverflow.com/comment/41053947
has comment: http://stackoverflow.com/comment/41053728
has comment: http://stackoverflow.com/comment/41054463
has comment: http://stackoverflow.com/comment/41054111
has comment: http://stackoverflow.com/comment/41055939
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26181808
answers question: http://stackoverflow.com/q/26181808
has comment: http://stackoverflow.com/comment/41053424

http://stackoverflow.com/comment/41048632
type: QuestionComment
comment on: http://stackoverflow.com/q/26180550
score: 6
has text: You are missing a `!`: you are using that ItemId *when* it's empty
type: Comment

http://stackoverflow.com/comment/40946665
has text: You don't actually need a counter variable. Just use `$(selector).length`.
comment on: http://stackoverflow.com/q/26125398
score: 4
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26055435
has comment: http://stackoverflow.com/comment/40819511
has comment: http://stackoverflow.com/comment/40819203
type: Question
has answer: http://stackoverflow.com/a/26055851
has title: jQuery lightbox(featherlight) not working with click event
has comment: http://stackoverflow.com/comment/40819992
has comment: http://stackoverflow.com/comment/40819446
tagged with: lightbox
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40819510
has comment: http://stackoverflow.com/comment/40819936
has comment: http://stackoverflow.com/comment/40819984
has body: I am using featherlight lightweight jQuery lightbox plugin but I don't understand how to load lightbox using with click event as I am not good with jQuery codes. Here is my code work: HTML: Load Lightbox Load Lightbox on click event Delete Item Are you Sure? blubblub? Close Yes jQuery: jQuery(document).on("click", "#openbox", function() { jQuery('.lightbox').featherlight(); }); JSFiddle: jsfiddle.net/g68bZ/18/ Comment Reply: But what If I want to display lightbox with logical condition like: var checkedCount = $('.chkAssets:checked').length; // Getting some counts if(checkedCount == 1){ // Load lightbox if condition is match } I hoping someone guide me proper way. Thanks.
accepted answer: http://stackoverflow.com/a/26055851
has comment: http://stackoverflow.com/comment/40819273
has comment: http://stackoverflow.com/comment/40819128
favorite count: 0
has comment: http://stackoverflow.com/comment/40818958
upvote count: 2
has comment: http://stackoverflow.com/comment/40818855
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40819590

nodelist
type: Tag
tags question: http://stackoverflow.com/q/26055769
tag name: nodelist

http://stackoverflow.com/comment/40941747
comment on: http://stackoverflow.com/q/26122812
type: QuestionComment
type: Comment
has text: `info2value + '|' + colorvalue + '|'` doesn't look anything like the `application/x-www-form-urlencoded` format!
score: 1

http://stackoverflow.com/q/26183979
has body: I have this element: "AcousticsActuarial StudiesAdministrative Law" I want to truncate this by a's text e.g: Acoustics in the above example. If it is more than 50, I want to truncate it. How can I do that with jQuery?
has comment: http://stackoverflow.com/comment/41055488
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26184048
score: 0
has comment: http://stackoverflow.com/comment/41055522
has comment: http://stackoverflow.com/comment/41055692
has answer: http://stackoverflow.com/a/26184951
has comment: http://stackoverflow.com/comment/41055563
has answer: http://stackoverflow.com/a/26184847
has answer: http://stackoverflow.com/a/26184088
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26184999
has title: Is there a way to truncate element's text in jQuery?
has comment: http://stackoverflow.com/comment/41055523

http://stackoverflow.com/q/26129334
has body: I want to make an online test, but i have some problems with the code below. I want it to mark the correct and wrong answers, and show the score, when the button is pressed. Now I have the following problem: I want the first switch statement to be only for the first group of radio buttons, the second switch statement for the second group of buttons, and so on. How could I do that? When I run the code now, the colors change even though none of the radio buttons is checked, or when a button in only one of the groups is checked. function showScore() { var check; var total = 0; var yourmark = "your score is "; switch (document.getElementById('q12').checked) { case true: total = total + 1; document.getElementById('text1').style.color = "green"; break; case false: document.getElementById('text0').style.color = "red"; document.getElementById('text2').style.color = "red"; document.getElementById('text1').style.color = "green"; break; } switch (document.getElementById('q13').checked) { case true: document.getElementById('text0.1').style.color = "green"; total = total + 1; break; case false: document.getElementById('text1.1').style.color = "red"; document.getElementById('text1.2').style.color = "red"; break; } alert(yourmark + total); } Question 1-first option Question 1- second option Question 1- third option Question 1-first option Question 1- second option Question 1- third option Show my score
linked to: http://stackoverflow.com/q/26109988
score: 1
type: Question
answer count: 2
has title: javascript conditional statement for a group of radio buttons
has answer: http://stackoverflow.com/a/26130316
tagged with: javascript
has comment: http://stackoverflow.com/comment/40954462
tagged with: radio-button
downvote count: 0
tagged with: button
has answer: http://stackoverflow.com/a/26130138
favorite count: 0
has comment: http://stackoverflow.com/comment/40954859
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40954656
tagged with: statements
upvote count: 1
has comment: http://stackoverflow.com/comment/40954629
has comment: http://stackoverflow.com/comment/40954365

http://stackoverflow.com/q/26044229
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40799076
accepted answer: http://stackoverflow.com/a/26044687
has comment: http://stackoverflow.com/comment/40798637
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40798684
has answer: http://stackoverflow.com/a/26045703
tagged with: this
tagged with: javascript
has body: I am trying to understand why this is returning Window instead of my object. Looking at my previous examples this is working. I must be missing something obvious. (function($) { if (typeof a === "undefined" || a === null) a = {}; if (typeof a.b === "undefined" || a.b === null) a.b = {}; if (typeof a.b.c === "undefined" || a.b.c === null) a.b.c = {}; if (typeof a.b.c.d === "undefined" || a.b.c.d === null) a.b.c.d = {}; if (typeof a.b.c.d.e === "undefined" || a.b.c.d.e === null) a.b.c.d.e = {}; a.b.c.d.e.MyObject = { method1: function() { console.log(this); //Returning Window }, method2: function() { } } }(jQuery)); This is being called via eval() from another JS file.
has title: Javascript 'this' returning window instead of my object
possible better answer: http://stackoverflow.com/a/26045703
has comment: http://stackoverflow.com/comment/40798704
has answer: http://stackoverflow.com/a/26044687
has comment: http://stackoverflow.com/comment/40799185
score: 0
has comment: http://stackoverflow.com/comment/40798576
has comment: http://stackoverflow.com/comment/40798888

http://stackoverflow.com/a/26096448
upvote count: 2
has comment: http://stackoverflow.com/comment/40894946
has comment: http://stackoverflow.com/comment/40896628
score: 2
has comment: http://stackoverflow.com/comment/40894812
has body: first, create an *.html page with your content. store it on root as /html/homeview.html homeview.html Home index.html, you've : And implement the jQuery ajax or simple $.get() : $(document).ready(function() { $.get('html/homeView.html') .done(function(data) { //this is homeView's HTML content $('.homeView').html(data); }) .fail(function(error) { console.log(error); }) }) remove its content by $('.homeView').html('');
downvote count: 0
has comment: http://stackoverflow.com/comment/40894658
has comment: http://stackoverflow.com/comment/40897129
has comment: http://stackoverflow.com/comment/40894521
has comment: http://stackoverflow.com/comment/40894694
type: Answer
has comment: http://stackoverflow.com/comment/40895637
answers question: http://stackoverflow.com/q/26096115

http://stackoverflow.com/comment/40924240
type: QuestionComment
type: Comment
has text: there were no errors.
comment on: http://stackoverflow.com/q/26112525
score: 0

http://stackoverflow.com/q/26165770
has comment: http://stackoverflow.com/comment/41021738
type: AnsweredQuestion
has title: jQuery Promise is undefined
has answer: http://stackoverflow.com/a/26189034
tagged with: sharepoint-2013
type: Question
has comment: http://stackoverflow.com/comment/41022127
has comment: http://stackoverflow.com/comment/41021715
has body: I'm trying to use jQuery's promise object to ensure my async call is complete before other code runs. I need to use the Deferred object because I am use SharePoint's executeQueryAsync to run the query. I am using Shereen Qumsieh's example here. My issue is that in the result handler the jQuery promise is always undefined and I cannot determine why. Has anyone experienced this before? Any help or clues to point me in the right direction would be much appreciated. Thanks. Query function successCallback() { console.log(this.d.promise()); this.d.resolve(this.list); } function failCallback() { console.log(this.d.promise()); this.d.reject("something bad happened"); } function getMyList() { var d = jQuery.Deferred(); console.log(d.promise()); var clientContext = SP.ClientContext.get_current(); var list = clientContext.get_web().get_lists().getByTitle('Documents'); clientContext.load(list); var o = {d: d, list:list}; clientContext.executeQueryAsync(Function.createDelegate(o, successCallback), Function.createDelegate(o, failCallback)); return d.promise(); } Result Handler var result = getMyList(); console.log(result);// output: undefined result.done(function(result) { //TypeError: Cannot read property 'done' of undefined // result is an SP.List because that is what we passed to resolve()! var list = result; console.log('Result done hit. result: ' + result); }); result.fail(function(result) { // result is a string because that is what we passed to reject()! var error = result; console.log('Result fail hit. result: ' + error); }); UPDATES: getMyList console.log(d.promise()) output Object {state: function, always: function, then: function, promise: function, pipe: function…} successCallback console.log(this.d.promise()) output Object {state: function, always: function, then: function, promise: function, pipe: function…} Result Handler console.log(result) output undefined Sequential Output with timestamps getMyList ln 449 Promise output 1412279244379: [object Object] getMyList l…
tagged with: javascript
has comment: http://stackoverflow.com/comment/41022211
has comment: http://stackoverflow.com/comment/41021893
has comment: http://stackoverflow.com/comment/41053783
score: 0
accepted answer: http://stackoverflow.com/a/26189034
has comment: http://stackoverflow.com/comment/41021930
has comment: http://stackoverflow.com/comment/41021937
has comment: http://stackoverflow.com/comment/41021830
answer count: 1
has comment: http://stackoverflow.com/comment/41021867
tagged with: jquery
has comment: http://stackoverflow.com/comment/41022698
tagged with: promise
has comment: http://stackoverflow.com/comment/41022502

http://stackoverflow.com/a/35525565
has body: For those having mocha installed and have makefile like this: test: @./node_modules/.bin/mocha -u tdd .PHONY: test but getting this error: Error: cannot resolve path (or pattern) 'test' you need to add folder "test" in the project folder. And your test files in that test folder E.G. /home/you/nodejs/chapter3 ├── lib ├── makefile ├── node_modules ├── package.json └── test ├── db.test.js
score: 2
upvote count: 3
downvote count: 1
answers question: http://stackoverflow.com/q/26182161
type: Answer
has comment: http://stackoverflow.com/comment/62238849

http://stackoverflow.com/q/26148452
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to write a jQuery takes the value from the between the tags to be an attribute named data-row-key="xx" my html looks like this: 1 2 but I need to look like this: 1 2 noticed the added attribute to the tag, any help or hint to point me in the right direction will be greatly appreciated, thanks UPDATE before I posted the question i tried $('td[data-name="BrokenLink_ID"]').each(function() { var id = $(this).text(); var table = document.getElementById('linksgrid'); var rows = table.rows; for (var i = 0, 1 = rows.lenght; i < l; i++) { rows[i].data = id } });
has answer: http://stackoverflow.com/a/26148517
has answer: http://stackoverflow.com/a/26148491
favorite count: 0
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/26148505
has answer: http://stackoverflow.com/a/26148512
type: Question
has title: Add attribute to from text
has comment: http://stackoverflow.com/comment/40989267
has answer: http://stackoverflow.com/a/26148598
has answer: http://stackoverflow.com/a/26148574
score: -2
tagged with: javascript
answer count: 6
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26148491
downvote count: 2
possible better answer: http://stackoverflow.com/a/26148505

http://stackoverflow.com/q/26045769
has title: How can the browser be notified to fill saved username and password in a form created by javascript?
has comment: http://stackoverflow.com/comment/40801671
has comment: http://stackoverflow.com/comment/40801730
has comment: http://stackoverflow.com/comment/40801571
has comment: http://stackoverflow.com/comment/40801994
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40801859
has comment: http://stackoverflow.com/comment/40802777
has comment: http://stackoverflow.com/comment/40801842
has comment: http://stackoverflow.com/comment/40802574
tagged with: http://stackoverflow.com/tag/html
tagged with: autofill
has comment: http://stackoverflow.com/comment/40801774
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40802444
type: Question
has body: My website has a few registered users, so I decided it is inefficient to put a login form in the page while only a few people actually use it. Then I put a button whose onclick event triggers a javascript function that creates a login form and displays it on the page. The problem is that when the user fires this function and the login form is displayed (for the first time), the user name and password inputs do not fill with the saved values by the browser (Chrome, IE, FireFox). (After closing and reopening the form, it's fields fills with the saved values, which is desirable) How should I notify the browser to fill fields with the saved username and password? Thank you very much. HTML seems something like this: members main contents and the javascript: function showloginform() { var form=' close'; document.getElementById("loginform").innerHtml=form; document.getElementById("loginform").style.display="block"; return true; }
tagged with: forms

http://stackoverflow.com/q/26184113
has comment: http://stackoverflow.com/comment/41055749
has body: My scanner reads a qr code with a url, I need to force the cursor to the address bar. I know alt-d or ctrl-l sends the cursor to the browser address bar, how would I accomplish this within html, so that when the page loads, it would be as if the alt-d or ctrl-l combo would be initiated.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41056203
tagged with: cursor
answer count: 0
tagged with: javascript
tagged with: position
type: Question
has title: Pass alt-d or ctrl-l in html so that it forces cursor to go to address bar on page load
has comment: http://stackoverflow.com/comment/41056145
score: 0
has comment: http://stackoverflow.com/comment/41056209

http://stackoverflow.com/comment/40896444
comment on: http://stackoverflow.com/q/26095467
type: QuestionComment
type: Comment
score: 0
has text: Maybe set up a jsfiddle?

http://stackoverflow.com/q/26138952
accepted answer: http://stackoverflow.com/a/26139256
type: AnsweredQuestion
has title: Construct JSON in proper format
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26139256
type: Question
answer count: 1
tagged with: javascript
favorite count: 0
downvote count: 4
upvote count: 0
has body: My JSON have current and targeted items. Targeted item will remain same for the rest of the year, currently i am repeating for all the months so i am asking experts is there a better way?? it is working fine , but i am thinking any alternative way in less json { "DataContainer": { "profit": [ { "current": "20", "target": "19" }, { "current": "20", "target": "19" }, { "current": "30", "target": "19" }, { "current": "23", "target": "19" }, { "current": "19", "target": "19" }, { "current": "17", "target": "19" } ], "revenue": [ { "current": "50", "target": "45" }, { "current": "20", "target": "45" }, { "current": "30", "target": "45" }, { "current": "23", "target": "45" }, { "current": "19", "target": "45" }, { "current": "17", "target": "45" } ] } }
score: -4

http://stackoverflow.com/q/26148394
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26148436
has body: I know that i've read about a new method of making CORS requests, using a technology similar to AJAX. The way it works is pageA sends a request to pageB. An event is fired in pageB, with the URL of pageA. pageB can then decide whether it wants to allow or deny the connection. If it allows, an event is fired an pageA to that effect, and the pages are now connected. pageA and pageB can both send messages to each other, firing an event on the other. Does anyone know what i am thinking of?
downvote count: 1
type: AnsweredQuestion
score: -1
type: Question
has title: What is the method of AJAX-like linking two pages together?
has answer: http://stackoverflow.com/a/26148436
upvote count: 0

http://stackoverflow.com/comment/40867066
has text: Here var but_2005 = document.getElementById("2000"); you are using the unexistent "2000" instead of "2005". I do not know much about openlayers, but I guess that somehow you should revert the previously added layer when you want to change the layer, right?
type: QuestionComment
comment on: http://stackoverflow.com/q/26081156
score: 0
type: Comment

http://stackoverflow.com/comment/40870376
has text: Thanks Oleg! I completely missed the fact that `transition.selectAll("text")` was selecting *all* text nodes in the document. Thanks very much!
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26083065

http://stackoverflow.com/q/26076333
tagged with: angularjs
type: UnansweredQuestion
tagged with: css
score: 2
downvote count: 0
has title: Responsive slideshow with controls in AngularJS
type: Question
tagged with: slideshow
tagged with: javascript
has answer: http://stackoverflow.com/a/26077950
upvote count: 2
has body: offtopic: sorry for my bad english. ontopic: i'm trying to do a responsive slideshow with control in AngularJS (i'm newbie in angular too) and i'm stuck in the part of the control the slides, i got this: app.js angular.module('slider', []) .controller('sliderCtrl', ['$scope', function($scope) { var thumbs = $scope.thumbs = []; for(i=1;i<=11;i++) { thumbs.push({ image: 'http://lorempixel.com/500/300/sports/' + i }) } }]) .service('thumbService', function() { this.resize = function(elem, scope) { elem.style.width = scope.containerWidth + 'px'; } }) .directive('carousel', ['$timeout', '$window', function($timeout, $window) { return { restrict: 'EA', replace: true, transclude: true, controller: 'sliderCtrl', templateUrl: 'carousel.html', link: function(scope, elem) { angular.element($window).on('load resize', function() { $timeout(function() { scope.containerWidth = elem[0].offsetWidth * 0.25; }, 200); }); } } }]) .directive('thumbs', ['$window', 'thumbService', function($window, thumbService) { return { restrict: 'EA', replace: true, templateUrl: 'thumbs.html', require: '^carousel', transclude: true, link: function(scope, elem) { thumbService.resize(elem[0], scope); scope.$watch('containerWidth', function() { thumbService.resize(elem[0], scope); }); } }; }]) .directive('controls', [function() { return { restrict: 'E', replace: true, require: '^carousel', templateUrl: 'controls.html', link: function(scope, elem, attrs) { scope.goPrev = function() { // TODO } scope.goNext = function() { // TODO } } } }]) .run(function($templateCache) { $templateCache.put('thumbs.html', ' '); $templateCache.put('carousel.html', ' ' + ' ' + ' ' + ' '); $templateCache.put('controls.html', ' ' + ' < ' + ' > ' + ' '); }) styles.css .slider-wrapper { margin: 0 auto; overflow: hidden; max-width: 100%; } .slider-gallery { transform: translate3d(0,0,0); width: 20000em; position: relative; top: 0; } .slider-gallery_item { width: 200px; float: left; padding: 0 10px; } .slider-gallery_item img { dis…
answer count: 2
has answer: http://stackoverflow.com/a/26077492
favorite count: 0

input-field
tags question: http://stackoverflow.com/q/26136038
tag name: input-field
type: Tag

http://stackoverflow.com/comment/64979349
has text: This is gold. I had a build process that I've moved from Grunt to Gulp and it was a real pain in the ass matching the functionalities. Finally when I reached the testing part (with Jasmine) I had problems setting up the fixtures. I used to include jasmine-jquery and jquery manually in the testRunner. Now everything works nice https://github.com/serbanghita/formToObject.js/blob/master/gulpfile.js
comment on: http://stackoverflow.com/a/29263841
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/a/26139086
type: AcceptedAnswer
downvote count: 1
type: Answer
score: 1
has body: The problem is that the elements doesn't have names. It's the name attribute that determines what the key is for the value that is sent to the server, so only fields that have names can be sent to the server. Add names to the elements: var htmlSets = ' ' + ' Reps ' + ' Kg\'s ' + ' '; You are also creating multiple elements with the same id, which can cause problems if you actually try to use the id for something in the future.
has comment: http://stackoverflow.com/comment/40971446
answers question: http://stackoverflow.com/q/26139008
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26139008

http://stackoverflow.com/comment/40825921
type: AnswerComment
type: Comment
score: 1
has text: Just an addendum for completeness: you can also use an object with all the lowercase alphanumeric characters as keys and their morse code equivalents as values. This would mean converting the string to all lowercase and skipping characters not in the object/dictionary.
comment on: http://stackoverflow.com/a/26059284

http://stackoverflow.com/comment/40980511
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26141229
has text: `!!x` and `new Boolean(x)` are not the same: if you compare those two expressions, they will fail a strict equality check (`===`) and they give different results for `typeof` (which is why they fail the strict equality). `new Boolean` creates an object, while `!!` returns a primitive.
type: Comment

http://stackoverflow.com/a/26093207
has body: Try adding the following to your layout .xml file within <reference name="head">
type: Answer
has comment: http://stackoverflow.com/comment/45222237
score: 14
downvote count: 0
answers question: http://stackoverflow.com/q/26093139
has comment: http://stackoverflow.com/comment/44829085
has comment: http://stackoverflow.com/comment/65995720
upvote count: 14
has comment: http://stackoverflow.com/comment/45222318

http://stackoverflow.com/comment/41025519
type: QuestionComment
type: Comment
has text: Just btw, jquery ui has a ready made accordion.
score: 0
comment on: http://stackoverflow.com/q/26167871

http://stackoverflow.com/a/48035659
type: Answer
has body: Add all event listeners when a window loads.Works like a charm no matter where you put script tags. window.addEventListener("load", startup); function startup() { document.getElementById("el").addEventListener("click", myFunc); document.getElementById("el2").addEventListener("input", myFunc); } myFunc(){}
has comment: http://stackoverflow.com/comment/118674206
answers question: http://stackoverflow.com/q/26107125
downvote count: 4
upvote count: 0
has comment: http://stackoverflow.com/comment/83041575
score: -4
has comment: http://stackoverflow.com/comment/83041832

http://stackoverflow.com/comment/40962941
type: QuestionComment
has text: Where do you close the socket before taking the last snapshot?
type: Comment
comment on: http://stackoverflow.com/q/26134155
score: 0

http://stackoverflow.com/q/26082044
type: Question
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40868239
has comment: http://stackoverflow.com/comment/40868581
has comment: http://stackoverflow.com/comment/40868206
has body: I need to get a field value from table. I am getting the field id but when I am getting the value of that field it is giving error. I have no idea about this. I have goggled it but no example with variable. Can anyone please help me to get the value here please ?! here are my attempts below : function setTotalAmount(id){ var rateField = id.replace(".AMOUNT", ".RATE"), rateSelector = "'#"+rateField+"'", rate = $(rateSelector).val(); alert(rate) } Here are my HTML :: first template >> %{-- --}% ITEM ID ITEM NAME ITEM DETAILS RATE AMOUNT TOTAL AMOUNT Action <g:render template='detail' model="['result':null,'i':'_clone','hidden':true]"/> <g:each var="upDirectProcurementDetails" in="${up_Proc_MasterInstance.upDirectProcurementDetails}" status="i" > <g:render template='detail' model="['upDirectProcurementDetails':upDirectProcurementDetails,'i':i]"/> </g:each> Second template where only rows >> <tr id="detail${i}" name="tr[${i}]" class="detail-div" <g:if test="${hidden}">style="display:none;"</g:if>> <g:hiddenField name='upDirectProcurementDetails[${i}].id' value='${upDirectProcurementDetails?.id}'/> <g:hiddenField name='upDirectProcurementDetails[${i}].deleted' value='false'/> <g:hiddenField name='upDirectProcurementDetails[${i}].new' value="${upDirectProcurementDetails?.id == null?'true':'false'}"/> <g:textField size="13px" name='upDirectProcurementDetails[${i}].RATE' value='${upDirectProcurementDetails?.RATE}' class='detail-number form-control'/> <g:textField size="13px" name='upDirectProcurementDetails[${i}].AMOUNT' value='${upDirectProcurementDetails?.AMOUNT}' onblur="setTotalAmount(this.id)" class='detail-txt form-control'/> <g:textField size="13px" name='upDirectProcurementDetails[${i}].TOTAL_PRICE' value='${upDirectProcurementDetails?.TOTAL_PRICE}' class='detail-txt form-control' readonly=""/>
has comment: http://stackoverflow.com/comment/40868323
has comment: http://stackoverflow.com/comment/40868225
has comment: http://stackoverflow.com/comment/40868309
has comment: http://stackoverflow.com/comment/40868245
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26082241
has title: get a field value using variable in jquery
has comment: http://stackoverflow.com/comment/40868264
has answer: http://stackoverflow.com/a/26082491

http://stackoverflow.com/q/26175648
favorite count: 0
has body: I am using ng-tag-input and ui-block together in an app. I am using auto-complete ng-tag-input. When I type 3 letter in input tag,it does not show suggested tag. It gives error: Error: [$rootScope:inprog] $digest already in progress http://errors.angularjs.org/1.2.22/$rootScope/inprog?p0=NaNigest at VALIDITY_STATE_PROPERTY (http://localhost:9000/bower_components/angular/angular.js:78:12) at beginPhase (http://localhost:9000/bower_components/angular/angular.js:12966:15) at Scope.$get.Scope.$apply (http://localhost:9000/bower_components/angular/angular.js:12755:11) at HTMLInputElement.<anonymous> (http://localhost:9000/bower_components/ng-tags-input/ng-tags-input.min.js:1:4856) at HTMLInputElement.jQuery.event.dispatch (http://localhost:9000/bower_components/jquery/dist/jquery.js:4641:9) at HTMLInputElement.jQuery.event.add.elemData.handle (http://localhost:9000/bower_components/jquery/dist/jquery.js:4309:46) at BlockUI.blkUI.factory.reset (http://localhost:9000/bower_components/angular-block-ui/dist/angular-block-ui.js:329:28) at BlockUI.blkUI.factory.stop (http://localhost:9000/bower_components/angular-block-ui/dist/angular-block-ui.js:301:14) at Object.blkUI.factory.utils.forEachFn (http://localhost:9000/bower_components/angular-block-ui/dist/angular-block-ui.js:453:19) at Array.blkUI.factory.utils.forEachFnHook.arr.(anonymous function) [as stop] (http://localhost:9000/bower_components/angular-block-ui/dist/angular-block-ui.js:458:15) But when I removed ui-block from app.ng-tag-input is working fine. controller : var app = angular.module('plunker', ['ngTagsInput','blockUI']); app.controller('MainCtrl', function($scope, $http) { $scope.tags = [ { text: 'Tag1' }, { text: 'Tag2' }, { text: 'Tag3' } ]; $scope.loadTags = function(query) { return $http.get('tags.json'); }; }); Html: Model: {{tags}} I think ui-block is not compatible with ng-tag-input.please suggest me how can I overcome this issue ? see plunker
tagged with: angularjs
type: UnansweredQuestion
has title: blockui is not compatible with ng-tag-input library in angular js?
score: 2
tagged with: blockui
upvote count: 2
tagged with: ng-tags-input
has answer: http://stackoverflow.com/a/36697986
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41054490
answer count: 2
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/31425693

http://stackoverflow.com/comment/41034162
type: Comment
comment on: http://stackoverflow.com/q/26172509
score: 0
type: QuestionComment
has text: firstly, you need to call `p.send();` in your ajax_get_json function to make the request.

http://stackoverflow.com/comment/41074248
type: AnswerComment
has text: I updated the answer so it displays the category image in the categoryList. Also added a animated scroll and some style ... enjoy!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26179949

http://stackoverflow.com/q/26060235
linked to: http://stackoverflow.com/q/6838550
linked to: http://stackoverflow.com/q/9617658
accepted answer: http://stackoverflow.com/a/26061050
possible better answer: http://stackoverflow.com/a/26065081
has comment: http://stackoverflow.com/comment/40853941
has answer: http://stackoverflow.com/a/26065081
type: AnsweredQuestion
tagged with: ruby-on-rails
type: Question
has body: I'm running rails 4.0.4. I have a form I'm using a partial in to add a subset of fields. The user has the option to remove those fields and replace them with other fields once they're on the page. I'd like to be able to add those fields back in in the event that they want to undo their decision. Render isn't available in javascript files (which seems odd for js.erb files). I've gotten as far as using the following to read the text of the file into a variable. var master_quantity = "&lt;%= data='';File.open("#{Rails.root}/app/views/shared/_a2a_master_quantity.html.erb","r").each_line{|x| data+=x};data %&gt;"; Unfortunately escape_javascript doesn't appear to be available in the asests folder either, so I'm unable to use this string as it breaks the javascript. Anyone have any suggestions on cleaning the string or alternate methods to get the partial into my javascript?
has answer: http://stackoverflow.com/a/26061050
tagged with: javascript
score: 0
answer count: 2
has title: Rendering html.erb templates in javascript

http://stackoverflow.com/q/26166747
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/41023713
has comment: http://stackoverflow.com/comment/41023452
has body: Would it be possible to wrap the first and last word within each line of text in a heading with jQuery? I have looked into lettering.js and others, yet have been unable to create the perfect result. Desired result: This is text within a line That is wrapped within a span based on calculated jQuery somehow. Any help here would be wonderful!
duplicate of: http://stackoverflow.com/q/12887372
score: 0
has comment: http://stackoverflow.com/comment/41023841
has answer: http://stackoverflow.com/a/26167565
has comment: http://stackoverflow.com/comment/41023803
has comment: http://stackoverflow.com/comment/41023680
type: Question
has comment: http://stackoverflow.com/comment/41023808
has comment: http://stackoverflow.com/comment/41023453
has comment: http://stackoverflow.com/comment/41024100
tagged with: javascript
tagged with: jquery
has title: Select and span wrap first and last word within each line
has comment: http://stackoverflow.com/comment/41023639
has comment: http://stackoverflow.com/comment/41023847
has comment: http://stackoverflow.com/comment/41023675
answer count: 1
linked to: http://stackoverflow.com/q/12887372
has comment: http://stackoverflow.com/comment/41023961
has comment: http://stackoverflow.com/comment/41023785
has comment: http://stackoverflow.com/comment/41023883

http://stackoverflow.com/comment/40789894
has text: Another tip: You don't actually need an `if...then...else` for this. `$("#size option[value='medium']").prop('disabled', $('#color').val() == "pink");`
type: QuestionComment
comment on: http://stackoverflow.com/q/26039594
score: 0
type: Comment

http://stackoverflow.com/a/26185789
has comment: http://stackoverflow.com/comment/41061059
has comment: http://stackoverflow.com/comment/41060099
answers question: http://stackoverflow.com/q/26185285
score: 0
has body: Your JSON is not valid, json properties should be in quotes "rules": { "name": "required", "email": { "required": true, "email": true } But other than that, it should work
type: Answer

http://stackoverflow.com/comment/40823850
type: Comment
has text: if not on mouseover, then can try this plugin and bellow code: plugin: https://github.com/teamdf/jquery-visible/ code: if ($('#element').visible(true)) { // The element is visible, do something } else { // The element is NOT visible, do something else }
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26057750

http://stackoverflow.com/q/26097905
tagged with: asp.net-mvc
possible better answer: http://stackoverflow.com/a/26097947
has title: Use URL based on razor method
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26097958
type: Question
answer count: 2
tagged with: razor
upvote count: 1
has body: I want to redirect to particular page. For that I am using some Javascript function in MVC project as:: function rootUrl(url) { var _rootUrl = '@Url.Content("~")'; var x = url; if (url.indexOf(_rootUrl) != 0) { x = _rootUrl + "/" + url; x = x.replace(/\/\//g, "/").replace(/\/\//g, "/"); } return x; }; which is being used as :: var url = rootUrl("Home/Company/") + $(this).val(); window.location.href = url; But I am getting wrong URL in my browser as:: http://localhost:60294/Home/Company/@Url.Content(%22~%22)/Home/Company/7
has answer: http://stackoverflow.com/a/26097947
has answer: http://stackoverflow.com/a/26097958

http://stackoverflow.com/q/26184771
answer count: 1
tagged with: javascript
score: 0
has title: yui treeview checkbox does not expand nodes
has answer: http://stackoverflow.com/a/26232689
type: UnansweredQuestion
tagged with: treeview
tagged with: yui
has body: I am using YUI TreeView with checkbox. I cannot use YUI3 CheckboxTree as the system is a little old and we use YUI 2.9. I followed the example YUI TreeView with checknox. Basically I created a widget that extends YUI TreeView. I am able to get the checkboxes on my nodes and am able to check them, but the nodes do not expand. My guess is that the problem can be with the following statement: this.subscribe('clickEvent',this.onEventToggleHighlight); I tried defining my own onEventToggleHighlight as follows: onEventToggleHighlight: function(oArgs) { var node = oArgs.node; node.hightlight(); node.focus(); node.toggle(); return false; } After doing this, I am able to expand the nodes, but checkboxes stop working. Kindly suggest where I am going wrong. I have set the propagateHighlightUp and propagateHighlightDown node properties to true as well. TIA.
type: Question

http://stackoverflow.com/comment/109496117
comment on: http://stackoverflow.com/a/47276129
type: AnswerComment
has text: for SITEMAP.XML in handelbars, this is the right solution. Thank you very much
type: Comment
score: 0

http://stackoverflow.com/comment/41170010
has text: Wait...Before ` ` or after? Before is valid, after no
comment on: http://stackoverflow.com/a/26069272
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26051568
has body: I searched here lot of question related to refresh current page in jquery mobile but mine is slightly differ from others. I enter some values is popup when the popup closes i need to refresh the current page(that is the popup values should be render in current page). Here is the sample what i tried: localStorage.setItem("name","tiger"); $(document).on("click","#save",function(){ $("#openpopup").popup("close"); localStorage.setItem("name","lion"); $.mobile.changePage("#page1",{ allowSamePageTransition : true, transition : 'none', showLoadMsg : true, reloadPage : true }); }); $(document).on("pageshow","#page1",function(){ if(localStorage.getItem("name")){ $("#name").val(localStorage.getItem("name")); } }); Here is the sample FIDDLE Note* The fiddle is for just reference my actual code is to store in sqlite after get the values in sqlite and refresh the current page.
score: 1
upvote count: 1
has title: Refresh the current page from popup
type: Question
has comment: http://stackoverflow.com/comment/40813441
has comment: http://stackoverflow.com/comment/40815147
tagged with: jquery-mobile
tagged with: javascript
has comment: http://stackoverflow.com/comment/40814009
has comment: http://stackoverflow.com/comment/40814438
answer count: 2
has comment: http://stackoverflow.com/comment/40813301
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/40815124
favorite count: 0
has answer: http://stackoverflow.com/a/26054204
has answer: http://stackoverflow.com/a/26051826
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40813541
has comment: http://stackoverflow.com/comment/40815142
has comment: http://stackoverflow.com/comment/40814612
has comment: http://stackoverflow.com/comment/40815093

http://stackoverflow.com/q/26133860
tagged with: cakephp
tagged with: javascript
has answer: http://stackoverflow.com/a/26133965
answer count: 3
has body: In my view file i have two div, in div1 there is some buttons, when i click a button in div1 it goes to div2 and in div2 it does same thing, this time it goes to div1. Now my question is when there is several buttons in div2, how can i take all the button's id in an array. I want to pass this array in a hidden field of another model. i tried in following way but it does not working.This is my scripting code. function movebutton(elem){ var teamMember=[]; if( $(elem).parent().attr("id") == "officers_list" ){ $(elem).detach().appendTo('#add_member'); teamMember.push($(elem).attr("id")); } else{ $(elem).detach().appendTo('#officers_list'); teamMember.pop($(elem).attr("id")); } $("#TeamTeamMember").val(teamMember); //console.debug('teamMember=&gt;',teamMember); }
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26134052
possible better answer: http://stackoverflow.com/a/26134043
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26134043
score: 0
has title: Get the all button's id in an array in javascript
type: Question
has answer: http://stackoverflow.com/a/26134052
tagged with: arrays

http://stackoverflow.com/a/26120253
answers question: http://stackoverflow.com/q/26119130
has comment: http://stackoverflow.com/comment/40940534
has comment: http://stackoverflow.com/comment/40937559
score: 0
has comment: http://stackoverflow.com/comment/40939064
has comment: http://stackoverflow.com/comment/40937377
type: Answer
has comment: http://stackoverflow.com/comment/40965958
has comment: http://stackoverflow.com/comment/40940460
has body: You can update the content of each div like this $(document).ready(function() { $('div').each(function(){ var newText = $(this).html().replace(/,-/g, 'kr'); $(this).html(newText); }); }); You can remove the var "newText = " and replace it with $(this).html($(this).html().replace(/,-/g, 'kr')); The first example is easier to understand perhaps if you are new to programming. You will, however only change the content of text placed in tags. I would place the text to replace in a div with some predefine class, like "autoKronor", it would then look like this: 123,- and $(document).ready(function() { $('.autoKronor').each(function(){ var newText = $(this).html().replace(/,-/g, 'kr'); $(this).html(newText); }); }); to en sure that only text you intended to change gets changed.. Example here: http://jsfiddle.net/akm1uw8h/2/ Also note the use of $(document).ready(); instead of window.onload. It does what you intended to do with window.onload. if you really want to change EVERY single instance of ",-" to "kr" then you could do this: $(document).ready(function() { $('body').html($('body').html().replace(/,-/g, 'kr')); }); But i strongly advice against the last example because it will be the slowest to compute and more importantly you might change stuff you don't intend to, like any script block inside the page body (with that i mean other javascripts)

http://stackoverflow.com/q/26126017
has title: HTML5 data-* attribute type casting strings and numbers
possible better answer: http://stackoverflow.com/a/26126302
has answer: http://stackoverflow.com/a/26126163
has answer: http://stackoverflow.com/a/26126302
has body: Why is the value of data-value="2.0" cast to a String and the value of data-value="2.5" cast to a Number? I can handle this fine within my function. I'm just trying to understand a little more about how Javascript handles Numbers and Strings. This kind of caught me off guard. 2.0 2.5 $("a").click(function() { alert(typeof $(this).data( "value")); }); [ Fiddle With It ]
answer count: 6
has comment: http://stackoverflow.com/comment/85377244
has answer: http://stackoverflow.com/a/26126393
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: string
favorite count: 0
score: 39
has answer: http://stackoverflow.com/a/26126174
tagged with: jquery-data
upvote count: 39
has answer: http://stackoverflow.com/a/26126144
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26126393
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40947880
has comment: http://stackoverflow.com/comment/40947873
type: Question
has answer: http://stackoverflow.com/a/26126283

http://stackoverflow.com/q/26056092
has comment: http://stackoverflow.com/comment/40820126
has comment: http://stackoverflow.com/comment/40820002
score: 3
downvote count: 0
has title: Is it better to "overload" a function or have two separate functions when dealing with multiple argument types
has comment: http://stackoverflow.com/comment/40820119
has comment: http://stackoverflow.com/comment/40820068
type: Question
has comment: http://stackoverflow.com/comment/40820110
tagged with: javascript
has answer: http://stackoverflow.com/a/26056412
upvote count: 3
has comment: http://stackoverflow.com/comment/40820137
answer count: 1
favorite count: 0
has body: I'm writing a function that takes a array of word objects, and then modifies the word objects. I would like a user to be also be able to use the function on an individual word object, and I'm wondering which is a better approach: a) have the function type check whether an inputted argument is an object or array and respond accordingly b) have two functions, one for an obj, and the other for an array. //method 1: accepts either a obj or an array function wordChecker(element) { if (typeof element === 'object') { wordCheckerHelperHelper([element]); } else if(element instanceof Array) { wordCheckerHelper(element); } else throw new Error('invalid argument'); }; function wordCheckerHelper(arr) { //do something }; //method 2: separate methods, but the wordCheckerObj method is just a wrapper around the wordCheckerArr method function wordCheckerArr(arr) { //do something }; function wordCheckerObj(obj) { if(typeof obj !== 'object') throw new Error('invalid argument'); workCheckerArr([obj]); }
type: UnansweredQuestion

http://stackoverflow.com/comment/40782858
score: 0
type: AnswerComment
has text: It will operate on them all, even multiples in parallel as the function has a locally scoped `$element` and each Ajax call comes back to its matching calling function (thanks to some tricky behind the scenes).
type: Comment
comment on: http://stackoverflow.com/a/26035134

http://stackoverflow.com/q/26124959
has body: I have an Angular-based form for which I want to apply specific validation: Please enter a name for the project. Topic {{$index + 1}} Topic {{$parent.$index + 1}} Source {{$index + 1}} -- platform -- Add Topic Source New Topic Back In the form, a project can have either zero or multiple topics. Each topic must have at least one topic source. Basically, I want to create validation that checks if a topic is being added (added being defined as having a name) and if so require that it has at least one topic_source with platform and keyword fields entered associated with it. Is this even possible? I'm not very familiar with Angular custom validation so I'm not sure how to begin implementing something like this. **Edit** Current progress on custom validation directive: angular.module('dashboard').directive 'topicSourceRequired', ($parse) -> require: "ngModel" link: (scope, elem, attrs, ctrl) -> topicName = $parse attrs.parent scope.$watch topicName, (topicName) -> ctrl.$parsers.unshift checkForExistence if topicName checkForExistence = (topicSource) -> if topicSource ctrl.$setValidity "topicSourceRequired", true else ctrl.$setValidity "topicSourceRequired", false topicSource Ok, getting closer for this validation. Right now the validation seems to be checking if the two topic_source fields have values independent of whether or not the parent's name field has a value, AND the topic_source fields only register as invalid if a field has been entered and then erased. How do I make sure the checkForExistence function is only called when topicName has a non empty string value? Second, how do I make sure blank fields are invalid without having to modify them somehow?
tagged with: angularjs
has answer: http://stackoverflow.com/a/26125245
has title: Angular Custom Validation of Nested Attributes
type: UnansweredQuestion
type: Question
score: 0
tagged with: validation
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/40892073
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26095023
score: 0
has text: provide a fiddle and so that we will look in the matter closely..

http://stackoverflow.com/comment/40883308
has text: Note that this JQuery code should be placed in a $(document).ready(function(){});
type: AnswerComment
comment on: http://stackoverflow.com/a/26090305
score: 0
type: Comment

http://stackoverflow.com/q/26165639
has body: I'm using AdminLTE template ( Bootstrap ), and i want to change the color of the tr when my checkbox is ticked ID ID Sujet Nom du client Département Status Derniére reponse ID ID Sujet Client Département Statut Derniere reponse 12 Pb SQL Relou SQL Ouvert 30/09/2014 à 12h24 18 Pb FTP Relou Technique Ouvert 30/09/2014 à 12h21 19 Quels sont vos DNS ? Relou Technique Reponse client 30/09/2014 à 10h13 22 Facture #123456789 Relou Commercial En attente Tech Niveau II 30/09/2014 à 07h34 123 Paiement reçu ? Relou Commercial En attente paiement 29/09/2014 à 23h45 90 Pb renouvellement Relou Commercial Reponse client 29/09/2014 à 21h13 193 Un gay dans l'equipe ? Relou Pour Nico Reponse client 29/09/2014 à 15h14 3045 Detail offre pro Relou Pré-vente Reponse client 29/09/2014 à 13h37 4567 Quel modes de paiement autorisez vous ? Relou Commercial Attente serivce commercial 29/09/2014 à 10h54 6789 Paiement non abouti Relou Technique Reponse client 29/09/2014 à 00h01 I want to use JS but i don't know how to do :( Tried this : $("input[type=checkbox]").on("change", function() { var $chk = $(this); var isChecked = $chk.prop('checked'); if (isChecked) { $chk.parent().addClass("info"); } else { $chk.parent().removeClass("info"); } }); But doesn't work.. I really ned help :( Thanks a lot ! ( I'm sorry if my english is bad, i am French :))) )
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: Change color table when checkbox ticked
has answer: http://stackoverflow.com/a/26165858
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26165820
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/26156160
has body: You're getting the error because you want to retrieve first element of ... nothing (twitter.statuses[key].entities.media[0]; media is already a null and you can't access first element of null) Try checking with if (typeof twitter.statuses[key].entities.media != "undefined") { ...
answers question: http://stackoverflow.com/q/26156139
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41003425
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26156139

http://stackoverflow.com/comment/41000747
has text: Not unless you roll your own custom validator.
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26154596

http://stackoverflow.com/a/39904205
has comment: http://stackoverflow.com/comment/85782649
type: Answer
upvote count: 1
has body: I use YUICompressor. It works on both JavaScript and CSS. Once it's installed, it's easy to use: Right-click the JS file you'd like to minimize Go to External Tools > Compress Javascript Specify the name of the compressed file and click Finish Unfortunately, you will need to manually run the compressor every time you change the original file, which can get tedious if you're working with lots of files. If you want to automate the process, see this answer. I ended up writing a quick batch script for my project.
score: 1
answers question: http://stackoverflow.com/q/26120407
downvote count: 0

http://stackoverflow.com/a/26046871
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26046685
has body: Bootstrap Select has a method for doing this. You shouldn't be manually manipulating attributes because the element seen in the page isn't the original select element anyway. $("#setdefault").on("click", function () { $("#selItems").selectpicker('val', 'Ketchup'); }); Demo http://silviomoreto.github.io/bootstrap-select/#methods
downvote count: 0

http://stackoverflow.com/comment/40848785
comment on: http://stackoverflow.com/q/26070225
score: 1
has text: `_.random(9 - index)` with index equals 0 has the same chance to pick `1` or any other number. But overall `1` has less chance to appear because it can only appear in the first cell. So you should replace `_.random(9 - index)` with a function that gives more weight to `1` according to the maximum size of the array. You may find the exact weight to give to each number by asking on [Math](http://math.stackexchange.com/).
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40935170
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26119389
has text: coupon-link-18 is not the `id` of the flash object . Rather it is the id of it's parent sibling

http://stackoverflow.com/comment/40816748
score: 0
has text: @Stefan — Standard DOM lets you do that just as easily.
comment on: http://stackoverflow.com/q/26053837
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26120965
has answer: http://stackoverflow.com/a/34437009
score: 0
has body: I've got a div that I'm trying to bind using Knockout using the following code: &lt;div data-bind="style: { height: ($('.someDiv').height() - 37) + 'px' }"&gt;...&lt;/div&gt; This works perfectly in Chrome, FF or IE11. Not sure it has been tested on IE9-10. But it fails on IE8, throwing a "Unable to process binding" exception. Surprisingly, this works: // without substracting 37 style: { height: ($('.someDiv').height() + 'px' } // replacing 37 by the same computed value, doesn't matter if it ends up being 0 style: { height: ($('.someDiv').height() - $('.someDiv').height()) + 'px' } But even more surprisingly, this fails too: // replacing 37 by something (dumb) assuring a positive value style: { height: ($('.someDiv').height() - $('.someDiv').height() + $('.someDiv').height()) + 'px' } I'm kind of clueless here. Anyone knows anything about this ? I'm using jQuery 1.11.1 and Knockout 3.1.0. EDIT: Ok I moved forward a little. It appears that the div someDiv is injected using a template in a custom binding. Therefore, if I do something like this around the binding: console.log('before ko'); console.log('length:'+$('.someDiv').length); console.log('$height:'+$('.someDiv').height()); ko.applyBindings(vm, $('#container').get(0)); console.log('after ko'); console.log('length:'+$('.someDiv').length); console.log('$height:'+$('.someDiv').height()); The output is (both in IE8 and in Chrome): before ko $length:0 $height:null after ko $length:1 $height:762 So I guess something happens differently in Knockout during binding depending on the browser.
has comment: http://stackoverflow.com/comment/40940069
possible better answer: http://stackoverflow.com/a/34437009
has comment: http://stackoverflow.com/comment/40938763
has comment: http://stackoverflow.com/comment/40939517
has comment: http://stackoverflow.com/comment/40939102
accepted answer: http://stackoverflow.com/a/26123858
has comment: http://stackoverflow.com/comment/40940630
has comment: http://stackoverflow.com/comment/40938362
type: Question
has comment: http://stackoverflow.com/comment/40939157
type: AnsweredQuestion
tagged with: internet-explorer-8
has comment: http://stackoverflow.com/comment/40941903
has answer: http://stackoverflow.com/a/26123858
linked to: http://stackoverflow.com/q/31037759
has comment: http://stackoverflow.com/comment/40941844
tagged with: knockout.js
answer count: 2
has title: Knockout binding throws an "Unable to process binding" exception in IE8
has comment: http://stackoverflow.com/comment/40941801
tagged with: javascript
has comment: http://stackoverflow.com/comment/40940510
tagged with: jquery

http://stackoverflow.com/comment/41079291
type: AnswerComment
has text: I agree. As you say, there's no need to render to a texture and then deform the texture. For best quality, the corner pinning should be done through a projection matrix without any final texture pass.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26196721

http://stackoverflow.com/a/26133055
score: 0
type: Answer
has body: Looking at their examples, they seem to use special .handsontable('getData'); method. This seems to work better now... DUMP DATA
answers question: http://stackoverflow.com/q/26111597

http://stackoverflow.com/a/26182504
type: AcceptedAnswer
downvote count: 0
has body: You should also animate the opacity. So set it to 0 to begin with then when the animate runs it will change it to 1 over the period of the animation; $(function(){ // $(document).ready shorthand $("#headerWrapper").animate({top: '0px', opacity: 1}, 1000); }, function() { $("#headerWrapper").animate({top: '-=100%', opacity: 1}, 1000); }); Also has to change some of your CSS: section#headerWrapper { background: #000; color: #FFF; width:100%; position:fixed; font-size: 30px; z-index:1; padding-bottom:1em; top:-80px; opacity: 0; } See this fiddle.
type: Answer
accepted answer of: http://stackoverflow.com/q/26182437
answers question: http://stackoverflow.com/q/26182437
upvote count: 3
score: 3

http://stackoverflow.com/a/26085716
answers question: http://stackoverflow.com/q/26085181
upvote count: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/26085181
has body: Solved it ! first i needed to prevent the default event of the submit button. second i didn't think results.row was enough but this will do if (results.rows.length &gt; 0). The code i use at the moment: works great ! function check_login() { event.preventDefault(); // cancel default behavior var username = $("#username").val(); var password = $("#password").val(); db.transaction(function(tx) { alert(tx + "test"); tx.executeSql('SELECT * FROM LOGIN WHERE username=? AND password=?', [username, password], function(tx, results) { if (results.rows.length &gt; 0) { window.location = "main.html"; } else { alert("Invalid username or password"); } }, errorCB); }); }

http://stackoverflow.com/comment/41037663
type: Comment
type: QuestionComment
has text: Actually in upper div there's tree view data and in lower div the action to that particular selected data. and got it upper div value in js. but not able to send it with anchor tag to next page!
score: 0
comment on: http://stackoverflow.com/q/26174473

http://stackoverflow.com/a/26074874
score: 0
has body: Don't rely on the length property of window.localStorage. localStorage behaves like an Object, not like an Array In order to iterate through keys of localStorage, do for(var key in window.localStorage){ var item = window.localStorage.getItem(key); //do something with item }
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26073810
answers question: http://stackoverflow.com/q/26073810

http://stackoverflow.com/q/26036488
tagged with: google-maps
tagged with: google-maps-markers
has comment: http://stackoverflow.com/comment/40786975
has comment: http://stackoverflow.com/comment/40786354
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/40786964
has title: Google maps markers appears multiple times on wide map
has comment: http://stackoverflow.com/comment/40786425
possible better answer: http://stackoverflow.com/a/26038392
has answer: http://stackoverflow.com/a/26038392
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26145485
upvote count: 1
has comment: http://stackoverflow.com/comment/40786322
type: Question
has comment: http://stackoverflow.com/comment/40785499
has body: I'm having this problem where the markers appears multiple times on a wide map, 1920x1080 screen resolution, map height 500px and width 100% (a live example). However, setting the markers as draggable makes the google maps api not to render the markers multiple times (a live example). Question: How can I prevent marker duplicates while the markers remain undraggable? Later Edit: The map size cannot be changed.
score: 1
accepted answer: http://stackoverflow.com/a/26145485
answer count: 2

http://stackoverflow.com/q/26126080
tagged with: twitter-bootstrap
tagged with: toggle
has answer: http://stackoverflow.com/a/26126492
has title: If statement within jQuery on Click function not running properly
type: Question
linked to: http://stackoverflow.com/q/21203111
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26126192
tagged with: if-statement
has comment: http://stackoverflow.com/comment/40947892
has body: I'm trying to get the navigation bar to push down the page content when opened on the mobile site. I have a click event listener, plus a toggle function, and an if statement inside the event listener. Is there any reason the if statement isn't running properly? I noticed the 'in' class isn't actually being toggled; rather, the display is being toggled between 'block' and 'none'. Right now, the content shifts down when the menu is opened, but doesn't shift back up when it's closed. Thanks! $('.navbar-toggle').click(function(event) { $('.navbar-collapse').toggle('in'); if ($(".navbar-collapse").is(":hidden")) { $('.content-below').css('margin-top','0px'); } else if ($(".navbar-collapse").is(":visible")) { $('.content-below').css('margin-top','200px'); } }); EDIT: I got the .toggle('in') portion from the last answer in this question: Bootstrap 3 collapsed menu doesn&#39;t close on click Perhaps he meant to use .toggleClass.
possible better answer: http://stackoverflow.com/a/26126192
has answer: http://stackoverflow.com/a/26126253
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/26126253

http://stackoverflow.com/comment/40888495
has text: Not sure how to do that? Can you give an example please?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26092923

http://stackoverflow.com/a/26106396
answers question: http://stackoverflow.com/q/26105522
downvote count: 0
score: 1
has body: It's possible for templateUrl to be a function. In which case you can actually change the view based on some kind of state: var initialized = false; $routeProvider .when('/view1', { templateUrl: function(){ if(initialized){ return 'view1.html'; } initialized = true; return 'view-initial.html'; }, controller: 'View1Ctrl' }) Here is a working Plunker based on yours.
has comment: http://stackoverflow.com/comment/40917399
upvote count: 1
type: Answer

http://stackoverflow.com/comment/40987602
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26147355
has text: I couldn't help but wonder, why in god's name would you want to do that.. ( looking at the fiddle )

http://stackoverflow.com/q/26129544
upvote count: 0
tagged with: arrays
tagged with: javascript
has body: I am trying to access the array value of a certain person property, but instead it is giving me the index of the string person. How do I fix this to get the desired output? var Stats = { person1: [17, 0], person2: [15, 0], person3: [10, 2], person4: [7, 5], person5: [5, 7] }; for (var key in Stats) { if(key === person4){ console.log(key); //Output "Person4" as expected console.log(key[0]); //Output "P" when I expect/want 7 } }
answer count: 1
score: -1
favorite count: 0
has title: Javascript looping over properties with array value not returning expected
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/85992
duplicate of: http://stackoverflow.com/q/85992
has comment: http://stackoverflow.com/comment/40954956
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26129571

http://stackoverflow.com/a/26057931
upvote count: 1
has comment: http://stackoverflow.com/comment/40824240
downvote count: 1
score: 0
has body: use self.fetch(self.options);
answers question: http://stackoverflow.com/q/26056275
type: Answer

http://stackoverflow.com/comment/41006477
type: Comment
has text: Well in general if your array does not contain > 1000-2000 elements you should not waste time with that matter as loops are very performant. Its just puzzling arround for not much effect. Are you sure you need this?
comment on: http://stackoverflow.com/q/26157870
score: 0
type: QuestionComment

http://stackoverflow.com/q/26172293
has title: difference between d3.v3.js and entire D3 repository
has answer: http://stackoverflow.com/a/26173862
has comment: http://stackoverflow.com/comment/41036471
type: Question
possible better answer: http://stackoverflow.com/a/26172407
tagged with: javascript
tagged with: github
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26172407
accepted answer: http://stackoverflow.com/a/26172391
tagged with: d3.js
has body: For d3, or any javascript package in general, what is the difference between the js file which has the entire source code(say, d3.v3.js) and the github repo for it(in the case of d3, it is https://github.com/mbostock/d3). What does the github repo contain that the entire source code does not? I read on Scott Murray's tutorials that the D3 repository contains "all of the component source code". Can someone explain what's meant by 'component'?
has answer: http://stackoverflow.com/a/26172391
type: AnsweredQuestion

http://stackoverflow.com/q/26103841
type: Question
duplicate of: http://stackoverflow.com/q/20279484
tagged with: javascript
has body: Suppose, we have the following code: HTML: &lt;input type="button" id="button" value="Say hello"&gt; Javascript: function test () { this.message = "hello"; this.on_change = function (){ alert(this.message); } this.on_change(); } $(document).ready(function() { var my_object = new test(); $('#button').click(my_object.on_change); }); my_object must print "Hello" in 2 cases: When the instance is created (works) When clicking the button "Say hello" (doesn't work) In the second case it prints "Undefined", because this refers to "button" object, and not to the instance of test class. jsfiddle
has answer: http://stackoverflow.com/a/26103892
has title: Jquery: using this inside class internal functions, working as handlers
answer count: 2
has answer: http://stackoverflow.com/a/26103897
tagged with: this
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/40907869
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40907668
linked to: http://stackoverflow.com/q/20279484
score: 1
upvote count: 1

http://stackoverflow.com/q/26096802
tagged with: jquery
score: -1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40895122
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40895144
has comment: http://stackoverflow.com/comment/40895036
has title: How can I make slidetoggled 'div' independently from another one?
downvote count: 1
has comment: http://stackoverflow.com/comment/40895039
has comment: http://stackoverflow.com/comment/40895104
has comment: http://stackoverflow.com/comment/40895172
has comment: http://stackoverflow.com/comment/40895064
tagged with: slidetoggle
has body: Hy everyone! I'm beginner in jquery. So I have two div elements. They are slidetoggled. When I open/close one div, the other div also move with that. Yes i see, what happend in the background but do you have any Idea how can I make them independently? Thank you! st1 dasd fsfs fsfs st2 dasd fsfs fsfs and the jquery: $(document).ready(function() { $("#ms1").click(function(){ $("#m1 .content").slideToggle(1000); }); $("#ms2").click(function(){ $("#ms2 .content").slideToggle(1000); }); });
type: Question
has answer: http://stackoverflow.com/a/26097115
upvote count: 0
has comment: http://stackoverflow.com/comment/40895081
has comment: http://stackoverflow.com/comment/40895053
tagged with: javascript

http://stackoverflow.com/q/26119683
has title: Angular js, ngTable data-title has to be set dynamically using model value
has body: In angular js ng table http://plnkr.co/edit/CBcbkc?p=preview, is it possible to replace data-title attributes dynamically using the model values of some other columns? For example, in {{user.age}} I want something like data-title = {{user.age}} Please don't mind if this requirement does not make sense with this example, but in my complex application, I need to set the column title with the some other column value, something like {{user.age}}, or {{user.name}}. In essence I don't want to hard code the titles, rather I want to set some other column values (model value) for its title. I tried different ways to use {{user.age}} in replace of "'Age'", but my template compilation is breaking out. The template sample that I have tried to meet my requirement is: var TemplateSample = ' Spend ' + ' ' + ' ' + ' {{ group.value }} {{user.service}} ' + ' ' + ' ' + ' ' + ' {{user.month4}} ' + ' {{user.month5}} ' + ' {{user.month6}} ' + ' {{user.month7}} ' + ' {{user.month8}} ' + ' {{user.month9}} ' + ' {{user.month10}} ' + ' ' + ' ';
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/26119977
has answer: http://stackoverflow.com/a/32533938
tagged with: ngtable
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/40802573
has text: Hey guys, thanks for the suggestions, I added some of the code in both of my files, these scripts don't work together, I believe they are both in global scope as well and loading in the proper order.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26046120

http://stackoverflow.com/a/26048205
type: Answer
has comment: http://stackoverflow.com/comment/40806297
answers question: http://stackoverflow.com/q/26048178
has body: You forgot to accept message attribute: function filteredMessages(){ return messages.length &lt; 50; } Change function to function filteredMessages(message){ return message.length &lt; 50; }
score: 0

http://stackoverflow.com/comment/41018745
has text: Please instantly remove `eval` from this code or I'm going to downvote you… :-P
comment on: http://stackoverflow.com/a/26164050
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26053753
type: Answer
answers question: http://stackoverflow.com/q/26053633
downvote count: 0
score: 1
has body: You may try this in your code: "'" + this.value + "'"
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26053633

http://stackoverflow.com/q/26100671
score: 0
has comment: http://stackoverflow.com/comment/40906493
has comment: http://stackoverflow.com/comment/40902860
has comment: http://stackoverflow.com/comment/40903415
type: UnansweredQuestion
tagged with: three.js
has comment: http://stackoverflow.com/comment/41195644
has body: function drawEdge(source, target) { material = new THREE.LineBasicMaterial({ color: 0xff0000, opacity: 1, linewidth: 0.5 }); var tmp_geo = new THREE.Geometry(); tmp_geo.vertices.push(source.data.draw_object.position); tmp_geo.vertices.push(target.data.draw_object.position); line = new THREE.Line(tmp_geo, material, THREE.LinePieces); line.scale.x = line.scale.y = line.scale.z = 1; line.originalScale = 1; geometries.push(tmp_geo); scene.add(line); } I call this about 2,000 times on 800 points...I tried "caching" where I put the new THREE.LineBasicMaterial outside the function but that didn't seem to help. I thought having the spheres would be the bottleneck and I'd have to move to a particle system but the lines are killing my performance
answer count: 0
linked to: http://stackoverflow.com/q/13489228
type: Question
has comment: http://stackoverflow.com/comment/41058757
has title: Why are my three.js lines so expensive?
tagged with: javascript

http://stackoverflow.com/comment/40884986
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26091049
has text: @joshstrike is suggesting that "can load the file" or "cannot load the file" is a really coarse-grained method of doing permissions; that kind of thing will often grow into a desired for finer-grained permissions where you can say "Group Admin" (has rights to modify things for the groups he's part of) vs. "Site Admin" (can modify everything in his domain) vs. "Super Admin" (can modify everything for everyone in all domains).

http://stackoverflow.com/a/26075876
downvote count: 0
has body: I tracked down this bug, and found that it only occurs in Chrome browser. Furthermore, it seems directly related to lazy loaded images and ajax pages. Loaded images are not being removed from memory when they are removed from DOM after an ajax call. I managed to find a hack which somehow clears them from memory before DOM is updated with new data. $('#content').find("img").off().attr('src', '').remove(); I am not sure if all the above are required, but the combo works to fair degree. The strange thing is, the memory is not reclaimed until another page with images replaces the #content DOM element. Buggy memory management in Chrome!
type: Answer
score: 1
answers question: http://stackoverflow.com/q/26062960
upvote count: 1

http://stackoverflow.com/a/26112282
answers question: http://stackoverflow.com/q/26112222
score: 0
has comment: http://stackoverflow.com/comment/40923056
has body: Yes: all browsers have some kind of inbuilt developers tools that let you inspect a website's HTML, CSS and other components. The shortcut and method for activating them is different for each, but all of them have a 'highlighter' that allows you to click an element on the page in order to inspect it. Read more here on using developer tools in all broswers -> http://devtoolsecrets.com/ Chrome's developer tools are arguably the most widely known, commonly used and most powerful. Shortcut is SHIFT + CTRL + J. edit: in light of the comments below, it looks like OP is after a specific feature of Codemirror that lets you highlight syntax. This is not possible natively in browser.
has comment: http://stackoverflow.com/comment/40922927
has comment: http://stackoverflow.com/comment/40923047
type: Answer
has comment: http://stackoverflow.com/comment/40922876
has comment: http://stackoverflow.com/comment/40922842
has comment: http://stackoverflow.com/comment/40922871

http://stackoverflow.com/q/26138211
has comment: http://stackoverflow.com/comment/40970782
has body: Could somebody please show me an error in this code? I checked the file structure over and over and it seems ok, anyway, in the Network tab I only get a warning "Provisional headers are shown" but it seems like the files are fetched. What happens is that although I made 3 collumns, I can see them one under another, full width of the container. The button css seems to be working though. Bootstrap 101 Template fdsf fds lkj ah soij saklmds a;sldj nas.d iashd aslkdm aosifh saf safd fdsf fds lkj ah soij saklmds a;sldj nas.d iashd aslkdm aosifh saf safd fdsf fds lkj ah soij saklmds a;sldj nas.d iashd aslkdm aosifh saf safd fdsf fds lkj ah soij saklmds a;sldj nas.d iashd aslkdm aosifh saf safd fdsf fds lkj ah soij saklmds a;sldj nas.d iashd aslkdm aosifh saf safd fdsf fds lkj ah soij saklmds a;sldj nas.d iashd aslkdm aosifh saf safd fdsf fds lkj ah soij saklmds a;sldj nas.d iashd aslkdm aosifh saf safd fdsf fds lkj ah soij saklmds a;sldj nas.d iashd aslkdm aosifh saf safd fdsf fds lkj ah soij saklmds a;sldj nas.d iashd aslkdm aosifh saf safd fdsfds
possible better answer: http://stackoverflow.com/a/26138824
has comment: http://stackoverflow.com/comment/40970201
has title: Bootstrap not working - where's the error?
has answer: http://stackoverflow.com/a/26138824
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
has answer: http://stackoverflow.com/a/26138345
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26138524
tagged with: twitter-bootstrap-3
has answer: http://stackoverflow.com/a/26138451
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/40970815
has comment: http://stackoverflow.com/comment/40970926
has comment: http://stackoverflow.com/comment/40970257
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26138345
score: 0
has comment: http://stackoverflow.com/comment/40972079

http://stackoverflow.com/comment/40870325
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26083141
has text: The array is located inside the processing.js file that the page runs. The array itself contains mainly chars (currently I am trying to just add the first two entries of the array to the database and later on will work with the rest of the array). I want to add the array to the database and add to it the user submitted data (name and mail) when the user clicks the submit button.
score: 0

http://stackoverflow.com/a/26056744
answers question: http://stackoverflow.com/q/26056633
type: Answer
has body: $(function() { $('#guess_the_score').on('change', function() { $("#guess_score_show").toggle(this.checked); }); }); #guess_score_show { display: none; } Toggle Score Score: 10
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/q/26046707
has body: So I'm trying to make multiple lights activate on button clicks and I'm not sure what I'm doing wrong here. I thought I could make this into a function and then pass it the id name but it looks like it's not acting the way I want. html Red Button Yellow Button Green Button css .lights{ height: 600px; width: 200px; background-color: black; padding-top: 15px; } .button{ padding-top: 20px; } #red, #yellow, #green { margin: 0 auto; background-color: black; border-radius: 50%; width: 180px; height: 180px; margin-top: 10px; } #red.active { background-color: red; } #yellow.active { background-color: yellow; } #green.active { background-color: green; } jquery function click(e) { $('#red,#yellow,#green').removeClass('active'); $('e').addClass('active'); } $('#red_button').click(click('#red')); $('#yellow_button').click(click('#yellow')); $('#green_button').click(click('#green')); http://jsfiddle.net/0m9wos1r/1/
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26046794
has comment: http://stackoverflow.com/comment/40803359
upvote count: 1
downvote count: 1
type: Question
has title: New to javascript trying to figure this out
has answer: http://stackoverflow.com/a/26046824
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26046824
favorite count: 0
has comment: http://stackoverflow.com/comment/40803338
has answer: http://stackoverflow.com/a/26046794
has comment: http://stackoverflow.com/comment/40803375

state
tag name: state
tags question: http://stackoverflow.com/q/26138140
tags question: http://stackoverflow.com/q/26113849
type: Tag
tags question: http://stackoverflow.com/q/26138094

http://stackoverflow.com/comment/91566778
score: 1
comment on: http://stackoverflow.com/q/26145778
has text: @SyedKashanAli No, It`s not part of query string. It's placed before url as you can see in the sample above
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26127148
has comment: http://stackoverflow.com/comment/40949940
downvote count: 1
answers question: http://stackoverflow.com/q/26126663
upvote count: 0
has body: I actually tried on the link you gave and it works. There's no jquery on the page, so have to go by native methods. var click= document.createEvent("MouseEvents"); click.initMouseEvent("click", true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null); document.getElementsByClassName('c-T-S a-b a-b-B')[0].dispatchEvent(click)
has comment: http://stackoverflow.com/comment/40950556
score: -1
type: Answer

http://stackoverflow.com/comment/54027413
score: 0
type: Comment
has text: The codes for the command key are different for each browser on MacOS, and Safari is using 2 codes. See http://stackoverflow.com/a/3922353/438970 .
type: AnswerComment
comment on: http://stackoverflow.com/a/26088835

http://stackoverflow.com/comment/40863968
comment on: http://stackoverflow.com/q/26079780
score: 0
type: QuestionComment
type: Comment
has text: can we do something with that java script code that blocks me from changing the ids ? but in the same time to be functional as with that script ?

http://stackoverflow.com/q/26164210
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26164251
has title: jQuery selector by form index and input name
tagged with: forms
has answer: http://stackoverflow.com/a/26164275
type: Question
upvote count: 4
has body: Take the following page with two forms with different classes but each form has an input with the same name. &lt;form class='first_form'&gt; &lt;input name='test' value='1' /&gt; &lt;/form&gt; &lt;form class='second_form'&gt; &lt;input name='test' value='3'/&gt; &lt;/form&gt; I can get the form index and I know the name of the input but I do not know the index of the input. Is there a way to chain a selector with the form index and the input name to get the value? I have tried chaining but nothing seems to work var inputName = 'test'; Var formIndex = 1; $('*[name="' + inputName + '"]' +' ' + '$("form").eq(' + formIndex + ')').val();
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
has answer: http://stackoverflow.com/a/26164304
possible better answer: http://stackoverflow.com/a/26164468
has answer: http://stackoverflow.com/a/26164251
favorite count: 0
has answer: http://stackoverflow.com/a/26164468
answer count: 5
has answer: http://stackoverflow.com/a/26164286

http://stackoverflow.com/comment/40945797
comment on: http://stackoverflow.com/a/26124910
type: AnswerComment
has text: Are you using the latest version of Chrome?
score: 0
type: Comment

http://stackoverflow.com/comment/40916938
has text: Can you post your CSS code? Does it happen if you change the printer driver or use Chrome's Save as PDF option?
comment on: http://stackoverflow.com/q/26108658
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40950313
type: Comment
has text: Initially hidden. Once the bootstrap button is clicked, the menu drops down.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26126253

http://stackoverflow.com/q/26140504
tagged with: jquery
has answer: http://stackoverflow.com/a/26200251
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40974170
has title: html button does not change color
has comment: http://stackoverflow.com/comment/40974123
score: -1
type: AnsweredQuestion
has body: i am working with liflet API. i create markers on a map. when a marker is pressed a popup uppers. in the pop up there are two buttons. what i am trying to do is to make the buttons change color when they are pressed. the problem is that when i try to reset the color when the popup is opened to the original one the affect happens only when i open the popup a second time. i checked the popup event and the click event work. button creation code: if(!marker.getPopup()){ var tooltipContent = $('&lt;div /&gt;'); $.each(marker._myId, function(index,value){ var current = $("&lt;button id=\"router-"+value.properties.name+"\" type=\"button\" style=\"width:100%;color:black\" class='tooltipName' &gt;"+value.properties.name+"&lt;/button&gt;") .click(function(){ handleClickOnSwitch(value); var button=$("#router-"+value.properties.name); button.css("background-color","grey"); }); tooltipContent=tooltipContent.append(current); }); marker.bindPopup(tooltipContent[0],{'closeButton' : false,}).openPopup(); } on click i change the button coller to grey. each time the popup is opened i call: function resetButtonPress(marker){ $.each(marker._myId, function(index,router){ var button=$("#router-"+router.properties.name); button.css("background-color","RGB(221,221,221)"); }); } i would appreciate any help.
accepted answer: http://stackoverflow.com/a/26200251
downvote count: 1
type: Question
tagged with: leaflet
has comment: http://stackoverflow.com/comment/40974063
upvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26069477
accepted answer: http://stackoverflow.com/a/26069558
score: 2
type: AnsweredQuestion
tagged with: list
has title: Adding items to a list when a button is pressed in Javascript
type: Question
upvote count: 2
answer count: 1
tagged with: button
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I am creating a page that has an unordered list of items with the id "faves", a text box with the id "add", and a button with the id "btnAdd". By default the list contains 3 items, but the user is supposed to be able to enter text into the text box, click the button, and whatever they typed into the text box should be added to the list. I can't seem to figure out how to get the text entered to display in the list when the button is clicked. Here is my HTML, this also includes the CSS and Javascript: Project 1 Tanner Taylor Project 1 Tanner Taylor Click Me! Video Games Food Sleeping Would anybody be willing to point me in the right direction?
has answer: http://stackoverflow.com/a/26069558

http://stackoverflow.com/q/26097731
has comment: http://stackoverflow.com/comment/40896630
linked to: http://stackoverflow.com/q/6489783
has answer: http://stackoverflow.com/a/26097887
score: 0
answer count: 3
favorite count: 0
possible better answer: http://stackoverflow.com/a/26097764
has comment: http://stackoverflow.com/comment/40896573
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26097764
has title: JavaScript object or JSON
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/26097887
type: Question
has comment: http://stackoverflow.com/comment/40896611
has body: Is this is a JavaScript Object or JSON? var j = { "countries": { "country": [{ "cname": "Japan", "capital": "Tokyo" }, { "cname": "India", "capital": "Delhi" }] } }; If it is a JSON, how do I make it a JavaScript object. If it is a JavaScript object, how do I make it JSON?
has answer: http://stackoverflow.com/a/26098085
upvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40896620

http://stackoverflow.com/a/26036791
has body: Hope this solution will work for you. The only change in solution is that you need only video id from iframe you have. Please refer the fiddle link mentioned below. &lt;div id="player"&gt;&lt;/div&gt; &lt;script src="http://www.youtube.com/player_api"&gt;&lt;/script&gt; &lt;script&gt; // create youtube player var player; function onYouTubePlayerAPIReady() { player = new YT.Player('player', { height: '390', width: '640', videoId: 'XzZudNOwkU8', &lt;!-- video id should be here. last component from video URL --&gt; events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange } }); } // autoplay video function onPlayerReady(event) { event.target.playVideo(); } // when video ends function onPlayerStateChange(event) { if(event.data === 0) { $('#player').css('display', 'none'); } } &lt;/script&gt; Fiddle link
type: Answer
accepted answer of: http://stackoverflow.com/q/26036441
answers question: http://stackoverflow.com/q/26036441
downvote count: 1
score: 3
has comment: http://stackoverflow.com/comment/41015910
upvote count: 4
type: AcceptedAnswer

http://stackoverflow.com/comment/40910718
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26105469
has text: It just might be issue related to insepct .. did you try to print with simple : console.log( JSON.stringify( item ) ); ?

http://stackoverflow.com/q/26085668
has comment: http://stackoverflow.com/comment/40874702
has comment: http://stackoverflow.com/comment/40874897
has comment: http://stackoverflow.com/comment/40874687
has body: How can I use the selected combo box item as a variable for the use of javascript image calling? HTML .JPG .PNG .GIF JavaScript var selectedComb = document.getElementById("fileType"); var selectedFileType = selectedComb.options[selectedComb.selectedIndex]; var selectedType = selectedFileType.value; document.write(' '); Now, obviously this doesn't work. How can I make it work? Its really just the document.write line that needs to be fixed.
linked to: http://stackoverflow.com/q/802854
type: Question
has comment: http://stackoverflow.com/comment/40874617
linked to: http://stackoverflow.com/q/25398005
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40874674
score: 0
has comment: http://stackoverflow.com/comment/40874867
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26085909
has comment: http://stackoverflow.com/comment/40874551
has comment: http://stackoverflow.com/comment/40874727
linked to: http://stackoverflow.com/q/4537963
has comment: http://stackoverflow.com/comment/40874566
has comment: http://stackoverflow.com/comment/40874581
has comment: http://stackoverflow.com/comment/40874910
upvote count: 1
has title: Call combo box value in JavaScript
downvote count: 1
has comment: http://stackoverflow.com/comment/40874801
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40874635
has comment: http://stackoverflow.com/comment/40874576
accepted answer: http://stackoverflow.com/a/26085909

http://stackoverflow.com/q/26072998
upvote count: 1
type: Question
score: 1
tagged with: signalr
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: asp.net
favorite count: 0
has body: When does the GetUserId method get called by the SignalR framework when we have a custom IUserIdProvider as follows: public class RealTimeNotificationsUserIdProvider : IUserIdProvider { public string GetUserId(IRequest request) { return request.QueryString["userId"]; } } How and when does the ConnectionId to UserId mapping happen and how does the following method work: Clients.User("1").notify(notificationsJson); Does the user have to be authenticated for this to work?
has title: When exactly Signalr IUserIdProvider's method GetUserId called by the signalr framework
has answer: http://stackoverflow.com/a/26107742
tagged with: signalr-hub
type: UnansweredQuestion

http://stackoverflow.com/comment/40855412
type: QuestionComment
has text: i don't like using forms much. Also interested to know if this is doable at all or not
type: Comment
comment on: http://stackoverflow.com/q/26075321
score: 0

http://stackoverflow.com/a/66449591
has comment: http://stackoverflow.com/comment/117540490
answers question: http://stackoverflow.com/q/26191142
has body: In my case, my terminal was already opened before I set PATH. All solutions failed until I finally restarted the terminal.
score: 0
type: Answer

http://stackoverflow.com/q/26041420
has answer: http://stackoverflow.com/a/26041578
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40793403
type: UnansweredQuestion
upvote count: 1
has body: A few days back, I asked the following question: I've searched for how to do this, and I've not had any luck. I'm fairly inexperienced with web stuff, so perhaps it's so trivial that no one needs to ask how to do it :( Suppose I have an HTML text input field with a label, like this: Stuff Now suppose the text input field value is changed. Is there a way to use AngularJS to restyle the label (Like, turn it green, for example) when this change occurs? I've looked into using ng-change and ng-class, but I'm not knowledgeable enough about how these work to use them in this manner. When I tested the solution provided, which was: CSS .marvellous { color: green; } HTML Stuff It worked, but only when I manually changed the text field (i.e. I typed stuff in the text field directly). However, in the particular application I'm working on, I need for the labels to be restyled when the value stored in ng-model changes. Unfortunately, I falsely assumed that if this method worked when I manually changed the text field, it must work if ng-model were to change as well. I've come to find out that it doesn't. What's the reason for this? And how can I make the label re-style when ng-model changes? Thanks! EDIT: When I say "ng-model changes," what I mean is..in my controller, there is a variable that is used to populate the text fields of the app that I'm working on. However, when the user clicks an "import changes" button, this variable is changed according to the changes that they are importing, which consequently changes the corresponding text fields linked to that variable. Ultimately, I want all of the labels attached to these changed text fields to be highlighted for the user to see. I'm sorry for my vagueness.
tagged with: css
has comment: http://stackoverflow.com/comment/40794744
score: 1
has comment: http://stackoverflow.com/comment/40794724
has answer: http://stackoverflow.com/a/26044500
type: Question
downvote count: 0
tagged with: javascript
has title: Using AngularJS to style label when ng-model changes in a text field
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26042457
favorite count: 0

http://stackoverflow.com/comment/40841368
type: Comment
comment on: http://stackoverflow.com/a/26067182
score: 0
type: AnswerComment
has text: I've tried this - it still doesn't update, even when the scale bar values change. That's why I feel like the updated data isn't being sent back to $scope - I can see the label next to the scale bar change, but the values aren't adding in the "estimate" field.

http://stackoverflow.com/q/26112358
tagged with: php
has comment: http://stackoverflow.com/comment/40923784
has body: I've been trying to add Javascript:void(0)to my magento website's navigation bar for a long time. I read many articles about this subject and almost all of them says I should edit /app/code/core/Mage/Catalog/Block/Navigation.php or copy this to local folder end edit there. here one of the popular way that i followed; To remove url, href functionality of the top menu categories, you can take the following steps: Create some folder as this path: app/code/local/Mage/Catalog/Block Copy file Navigation.php from app/code/core/Mage/Catalog/Block to app/code/local/Mage/Catalog/Block Go to function _renderCategoryMenuItemHtml() Replace this code $html[] = 'getCategoryUrl($category).'"'.$linkClass.'>'; $html[] = '' . $this->escapeHtml($category->getName()) . ''; $html[] = ''; with this code if($category->getLevel()== 2 && $hasActiveChildren) { $html[] = ''; $html[] = '' . $this->escapeHtml($category->getName()) . ''; $html[] = ''; } else { $html[] = 'getCategoryUrl($category).'"'.$linkClass.'>'; $html[] = '' . $this->escapeHtml($category->getName()) . ''; $html[] = ''; } But it didn't work for me. Weirdly even if i delete /app/code/core/Mage/Catalog/Block/Navigation.php the navigation menu works just fine. Were it gets the code for working I have no idea. Maybe you have an idea that can help me. I just want to put Javascript:void(0) to the navigation menu.
score: 0
type: Question
answer count: 2
has title: magento javascript:void(0) in navigation menu
tagged with: magento
tagged with: javascript
has answer: http://stackoverflow.com/a/27708554
has answer: http://stackoverflow.com/a/26113308
type: UnansweredQuestion

http://stackoverflow.com/comment/40946765
type: QuestionComment
score: 2
has text: Tip: `button` doesn't have a `type=button` attribute.
comment on: http://stackoverflow.com/q/26125398
type: Comment

http://stackoverflow.com/comment/41015214
has text: Well when you use the jQuery `.html()` API, the library explicitly looks for ` ` tags and it arranges for them to be run. It looks like you're using something else to drop the loaded content.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26162241

http://stackoverflow.com/comment/40913663
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26106821
has text: Great thanks @LcSalazar (feeling a bit stupid atm) :-) . So probably a jQuery thing... I marked as duplicate.

http://stackoverflow.com/q/26175501
possible better answer: http://stackoverflow.com/a/26175947
has comment: http://stackoverflow.com/comment/41039762
has answer: http://stackoverflow.com/a/26175947
linked to: http://stackoverflow.com/q/17921556
has comment: http://stackoverflow.com/comment/41039771
tagged with: javascript
has comment: http://stackoverflow.com/comment/41039527
tagged with: double-click
has title: execute either single click or double click . Not both
tagged with: click
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41042948
has comment: http://stackoverflow.com/comment/41043448
type: AnsweredQuestion
has body: I need to execute one function on single click and other function on double click. Problem I am facing is due to the fact that we can not have double click event without first having two single clicks. I want, whenever we have double click then only double click function should execute not single click function . Below is something I have done so far. Please suggest if there is any better way to do it because below code is not always working perfectly. HTML &lt;div class='box'&gt; JS: var dblclick = false; //single click function $('div.box').on('click',function(){ setTimeout(function(){ if(!dblclick){ console.log('singleClick'); } },200); }); //resetting double click flag $('div.box').on('click',function(){ setTimeout(function(){ dblclick = false; },400); }); //double click function $('div.box').on('dblclick',function(){ dblclick = true; console.log('doubleClick') }); CSS: div.box { height: 100px; width: 100px; border: 1px solid black; }
has answer: http://stackoverflow.com/a/26175921
accepted answer: http://stackoverflow.com/a/26175921
type: Question

http://stackoverflow.com/a/31578936
upvote count: 3
has comment: http://stackoverflow.com/comment/84062251
answers question: http://stackoverflow.com/q/26176977
downvote count: 0
has comment: http://stackoverflow.com/comment/83587852
has body: Here is a very basic way of handling websocket using polymer Polymer({ is: "ws-element", socket: null, properties: { protocol: { type: String }, url: { type: String } }, ready: function () { this.socket = new WebSocket(this.url, this.protocol); this.socket.onerror = this.onError.bind(this); this.socket.onopen = this.onOpen.bind(this); this.socket.onmessage = this.onMessage.bind(this); }, onError: function (error) { this.fire('onerror', error); }, onOpen: function (event) { this.fire('onopen'); }, onMessage: function (event) { this.fire('onmessage', event.data); }, send: function (message) { this.socket.send(message); }, close: function () { this.socket.close(); } }) Please take a look at the WebSocket Polymer Element, The Polymer element uses the native WebSocket client that comes with most of today's modern browsers.
type: Answer
score: 3

http://stackoverflow.com/comment/41030462
has text: Too used to styling stuff in the javascript :) Fixed the css and added a fiddle based on @HakurHaf's answer.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26170479

http://stackoverflow.com/q/26181457
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/41055026
has body: I'm looking to detect if a Facebook share on a page was successful, and upon success change the value of a box. I can handle the latter just fine, but am a little lost as to how execute the actual share detection. I've Google and found FB.ui, but how do I actually implement it into a page and have it run the detection?
has answer: http://stackoverflow.com/a/26191315
has comment: http://stackoverflow.com/comment/41056566
answer count: 2
score: 5
downvote count: 0
favorite count: 0
tagged with: facebook
has comment: http://stackoverflow.com/comment/41053293
accepted answer: http://stackoverflow.com/a/26191315
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41054047
has comment: http://stackoverflow.com/comment/41055755
has comment: http://stackoverflow.com/comment/41054090
possible better answer: http://stackoverflow.com/a/26185075
has answer: http://stackoverflow.com/a/26185075
has comment: http://stackoverflow.com/comment/41056151
type: Question
has title: Detect Facebook share success?

http://stackoverflow.com/a/26119944
accepted answer of: http://stackoverflow.com/q/26042927
answers question: http://stackoverflow.com/q/26042927
score: 0
type: AcceptedAnswer
type: Answer
has body: You can apply position:absolute so that the elements will overlap instead of taking up individual space in the ui. Apply #set div{ position:absolute; top:80px; left:80px; } Demo

http://stackoverflow.com/comment/40928387
has text: @RGraham question you pointed is about priority of inline scripts. But I asked about priority of linked javascript files that required for that inline scripts. Are they equal?!
comment on: http://stackoverflow.com/q/26115227
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26055979
answers question: http://stackoverflow.com/q/26054814
upvote count: 2
score: 2
has body: I have built upon the answer of sumeet. This code should be fully functional: $(document).on("change",".selector input",function(e){ var emptyFields = Array(); $(".selector input").each(function(i){ if(!this.value) { emptyFields.push(this.getAttribute("id")); } }); if(emptyFields.length === 1) { $("#"+emptyFields[0]).attr('readonly', true); } else { emptyFields.forEach(function(id) { $("#"+id).attr('readonly', false) ; }); } }); &lt;div class="selector"&gt; &lt;input type="number" placeholder="A" name="A" id="A"&gt; &lt;input type="number" placeholder="B" name="B" id="B"&gt; &lt;input type="number" placeholder="C" name="C" id="C"&gt; &lt;/div&gt;
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26054814

http://stackoverflow.com/a/26091265
type: AcceptedAnswer
type: Answer
has body: I do see this bug on Chrome 37.0.2062.124 on OS X. This may or may not be related to the bug described here, which is supposedly to be fixed in Chrome 38. As a workaround, rotating a few degrees and immediately rotating it back before filling the arc seems to work. // draw filled arc ctx.beginPath(); ctx.arc(225, 75, 50, 0, Math.PI/2); ctx.lineTo(275, 125); ctx.closePath(); ctx.rotate(1*Math.PI/180); // Rotate 1 degree ctx.rotate(-1*Math.PI/180); // Reverse rotation ctx.fill(); Here's a fiddle demonstrating the workaround: http://jsfiddle.net/ejacpd1w/1/
accepted answer of: http://stackoverflow.com/q/26090875
answers question: http://stackoverflow.com/q/26090875
score: 0

http://stackoverflow.com/comment/40820656
type: QuestionComment
has text: @SSA, that didn't make any difference. The error is still happening.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26056167

http://stackoverflow.com/a/26191978
answers question: http://stackoverflow.com/q/26191566
has body: Try this div { width: 150px; height:150px; display: block; border-radius: 50%; background-color: #EC5F51; border: 2px solid #EC5F51; margin: 50px auto; position:relative; background-image: linear-gradient(180deg, transparent 50%, #ccc 50%), linear-gradient(90deg, #ccc 50%, transparent 50%); } div:before{ content: "pure CSS3"; position: absolute; width: 114px; height: 114px; background: white; z-index: 1; border-radius: 50%; left: 18px; top: 18px; line-height:114px; text-align:center } Markup: &lt;div&gt;&lt;/div&gt;
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/26191566
upvote count: 1

http://stackoverflow.com/q/26060234
has title: How to get links from web page using selenium
score: 0
has body: Is there any way we can get the link location of webelement. I know we can get the text from webelement and also by using getAttribute("href") method we can location of link for href link. But my requirement is to get all the link. For example, 1.&lt; a href="http://www.java2s.com/"&gt;Example&lt;/a&gt; 2. &lt; a onclick="Test.TestFunction("9","testNumber","2");" style="cursor:pointer"&gt;This is text display on page&lt;/a&gt;. I have user below given code: public void getAlllink(){ tcount = driver.findElements(By.tagName("a")); System.out.println("Total Links on page :"+tcount.size()); for(WebElement we:tcount){ System.out.println("Link: "+str);//display element but not link. we.click(); //This click on link System.out.println(we.getText()); //display text code that fetched by selenium and not link text System.out.println(we.getAttribute("href"));//display only one link http://www.java2s.com/ } Is there any way to get the link location for both the element. One is simple link and another is link which is generated on call of JavaScript function.
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40838601
tagged with: selenium-webdriver
has answer: http://stackoverflow.com/a/26157548
type: UnansweredQuestion
tagged with: selenium
has answer: http://stackoverflow.com/a/26067807
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40828329

http://stackoverflow.com/a/26082080
answers question: http://stackoverflow.com/q/26080665
has comment: http://stackoverflow.com/comment/40873826
upvote count: 1
has body: http://liveweave.com/C8NNC6 http://jsfiddle.net/zwzoresL/ Why not just apply the hover on the container instead of the image? $('.col-sm-2').hover(function () { $( ".cap-1" ) .animate({ "opacity": "1", "top": "-=75%" }, 300 ) .animate({ "top": "+=25%" }, 200 ); }, function () { $( ".cap-1" ) .animate({ "top": "+=50%", "opacity": "0" }, 300 ); }); .img-1 { width: 100%; height: 50%; background: rgb(0,0,0); background: rgba(0,0,0,0.4); } .friends-caption { position: absolute; height: 25%; top: 384px; left: 10%; right: 10%; background: rgb(102, 102, 102); background: rgba(102, 102, 102, 0.7); border: none; font: 16px inherit; text-align: center; color: #fff; padding-top: 16px; cursor: default; opacity: 0; } Costa Cafe
score: 1
has comment: http://stackoverflow.com/comment/40875514
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26080665
type: Answer

http://stackoverflow.com/comment/41032037
type: QuestionComment
comment on: http://stackoverflow.com/q/26171357
type: Comment
has text: Are you running this on ChromeOS? Because this API only works there.
score: 0

http://stackoverflow.com/q/26134706
has answer: http://stackoverflow.com/a/26134939
accepted answer: http://stackoverflow.com/a/26134939
has body: Is it possible to pair two date pickers but still allow selection of the same day. $('#depart, #departc, #depart_modify').Zebra_DatePicker({ format: 'd/m/Y', selectWeek: true, inline: true, pair: $('#return, #returnc'), firstDay: 1 }); $('#return, #returnc, #depart_review').Zebra_DatePicker({ format: 'd/m/Y', selectWeek: true, direction: 0 }); but the end datepicker still disables selection of start and end date being the same day.
tagged with: datepicker
tagged with: php
possible better answer: http://stackoverflow.com/a/38919651
type: AnsweredQuestion
has title: Start and end date being the same day of Zebra DatePicker
type: Question
tagged with: zebra-ui-framework
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/38919651
upvote count: 4
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/110772252
has text: @QuinnComendant new Function is evaluating it so not as safe as you think.
type: Comment
comment on: http://stackoverflow.com/a/26172164
score: 1
type: AnswerComment

http://stackoverflow.com/comment/40910754
type: Comment
has text: it's because the page is loaded from the server with a value set, and I want to set that value for the scope...
comment on: http://stackoverflow.com/a/26105372
score: 0
type: AnswerComment

http://stackoverflow.com/a/26120753
has body: You can use an external builder to run build scripts for your Javascript tasks. Go to Project --> Properties and choose Builders. Then you can add an external builder to launch an external program with whatever arguments you need. You can se the builder to run automatically by using the Build Options tab and setting the "Run The Builder:" options:
downvote count: 0
has comment: http://stackoverflow.com/comment/40938441
has comment: http://stackoverflow.com/comment/40940576
upvote count: 2
has comment: http://stackoverflow.com/comment/40938347
has comment: http://stackoverflow.com/comment/40937876
answers question: http://stackoverflow.com/q/26120407
has comment: http://stackoverflow.com/comment/40940171
type: Answer
score: 2

http://stackoverflow.com/comment/40901420
has text: *It should be simple but i cant get it done.* Go to the person who told you that's simple and ask them to code it. Then take a step back and enjoy.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26100527

http://stackoverflow.com/q/26091890
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
type: Question
answer count: 1
has body: I setup a jQuery plugin > http://keith-wood.name/countdown.html to countdown from 3 days. The time should not start over on refresh. It should continue where it left off when the user comes back let's say 1/2 days later. After 3 days it should just reload. Everything looks right. But it's not working. Numbers are showing up as NaN. If the "until: new Date(cookie)" is changed to "+2d" as is standard for the plugin it works fine. When its changed to the date 3 days ahead with the cookie it fails. Anyone know what's wrong? $(document).ready(function(){ if (!$.cookie('offerTimer')){ var now = new Date(); timer = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 3); $.cookie('offerTimer', timer.format("yyyy, mm, dd"), { expires: 7, path: '/' }); } var cookie = $.cookie('offerTimer'); $('#until3d').countdown({until: new Date(cookie), format: 'HMS'}); });
has answer: http://stackoverflow.com/a/26092504
score: 0
tagged with: cookies
accepted answer: http://stackoverflow.com/a/26092504
has title: Cookie problems with javascript countdown timer

http://stackoverflow.com/comment/40823918
comment on: http://stackoverflow.com/q/26058157
type: Comment
type: QuestionComment
has text: onChange must get triggered. Please share more code. So that we can debug.
score: 0

http://stackoverflow.com/comment/40829343
has text: @TedBarth: We don't understand what you are asking for. Do you want us to compile a list of the most commonly used culture codes or what?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26061082

http://stackoverflow.com/a/26071929
upvote count: 2
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/26071916
answers question: http://stackoverflow.com/q/26071916
has body: $ is a function in jQuery. So, $() is a function call. And: $(function() { /* code here */}); is a function call that you are passing an anonymous function to. That $ function will then call that anonymous function at some time in the future. In jQuery's case, it will call that function when the DOM is done loading and ready for manipulation. It's a shortcut syntax that I don't use primarly because it confuses people that aren't familiar with jQuery, but others like it for its brevity. It is shorthand for this: $(document).ready(function() { /* code here */}); which I personally find a little more self-descriptive. These are NOT self-executing anonymous functions. Those are a different construction for a different purpose. This is just a plain function call just like ready() would be, with the one addition of passing it a function. The extra parens on your second construction are not needed and don't add anything in this particular case.
downvote count: 0
has comment: http://stackoverflow.com/comment/40849668
type: AcceptedAnswer

http://stackoverflow.com/q/26192326
type: Question
has title: How can I stop/pause a function from another function?
accepted answer: http://stackoverflow.com/a/26192358
tagged with: javascript
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41070476
type: AnsweredQuestion
score: 0
has body: I have a simple jquery-ui slider which I am continuously automatically looping through values. I successfully have a button which starts the movement, but I forget how I can pause/stop the movement when another button is pressed? I know this is something really simple, but am having an absolute mind blank and google is not giving me what I want. (probably because i'm searching for the wrong wording). What can do I put in the pauseSlider function to ... pause the slider! function scrollSlider() { var slideValue; slideValue = $("#slider").slider("value"); if (slideValue &gt;= 0) { if (slideValue == 2013) { slideValue = -1; } $("#slider").slider("value", slideValue + 1); console.log($("#slider").slider("value")); setTimeout(scrollSlider, 1000); } } $('#startSlider').click(function() { scrollSlider(); }); $('#pauseSlider').click(function() { //What do I put in here? });
has answer: http://stackoverflow.com/a/26192358
has comment: http://stackoverflow.com/comment/41070532

http://stackoverflow.com/comment/40932704
type: Comment
comment on: http://stackoverflow.com/q/26117820
type: QuestionComment
has text: @Benedikt - I am using Google Chrome - is the last part working? What happens if you change a link from active to inactive & refresh? I am testing it on a MAMP server.
score: 0

http://stackoverflow.com/comment/41011492
type: QuestionComment
has text: Just press `start the DEMO` again? What do you expect to happen when you click End Tour?
score: 2
comment on: http://stackoverflow.com/q/26160698
type: Comment

http://stackoverflow.com/q/26143780
has title: How to obtain document that was just upserted in mongodb?
tagged with: mongodb
has answer: http://stackoverflow.com/a/26144201
has comment: http://stackoverflow.com/comment/40980866
tagged with: javascript
has body: In the following command, where foos is a collection, I "upsert" a new item: foos.update(criteria, { $set: fooUpdate }, { w: 1, upsert: true }, function(err, upsertedFoo) { /* upsertedFoo is actually just count of updated/ inserted rows */ } I would like to obtain the new document that was just created (if it was an update), or the existing document that was modified (if it was updated). If this is not possible, the _id of it will also suffice. How can I get this? NOTE: I am using the standard mongodb package.
answer count: 3
has answer: http://stackoverflow.com/a/26153133
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26144011
tagged with: node.js
score: 0
type: Question

http://stackoverflow.com/comment/40832941
has text: http://docs.telerik.com/fiddler/knowledgebase/fiddlerscript/modifyrequestorresponse
comment on: http://stackoverflow.com/a/26062951
type: Comment
score: 2
type: AnswerComment

http://stackoverflow.com/q/26179273
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41047336
upvote count: 1
type: Question
tagged with: angularjs-directive
tagged with: angularjs-scope
has answer: http://stackoverflow.com/a/26179931
has title: Angular dialog directive with compile function and ng-show does not work
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
has body: Inspired from this article I created a dialog directive. But I want to be a bit more flexible (e.g. not creating new variables/functions in the controller by hand for each dialog. I also want to have no scope in the dialog because then other angular components in the dialog don't work as they would if they wouldn't be in the dialog. So I thought of this: angular.module('directives.dialog', []) .directive('modalDialog', function() { return { restrict: 'E', replace: true, transclude: true, compile: function(element, attrs) { var html = " X " var newElem = $(html); element.replaceWith(newElem); return function(scope, element, attrs) { //link function scope[attrs.dialogid] = false; //don't show in the beginning scope['hideModal'+attrs.dialogid] = function() { scope[attrs.dialogid] = false; }; } } }; }); Usage would be like this: Play weather god Some dialog content Other components.. The toggleModal is pretty simple in my controller: $scope.toggleModal = function(id) { $scope[id] = !$scope[id]; }; My problem is that the ng-show has no effect, even though the dialogId gets set in the scope by the link function (also the toggling works, but as I said it has no effect). Also the dynamically generated hide function is in the scope. I have the feeling that there is something general wrong with this approach. Can you give hints where the error might be or how to do it better?
tagged with: angularjs
linked to: http://stackoverflow.com/q/26109658

http://stackoverflow.com/comment/40783600
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26036211
has text: Wow so many right answers right away.. thank you! I can only accept one, so I will take the first one. Thank you!

http://stackoverflow.com/a/26068383
score: 2
has comment: http://stackoverflow.com/comment/40905965
type: AcceptedAnswer
downvote count: 0
has body: The easy answer is use escape_javascript. But what you most likely should be doing is using AJAX and consuming your own API. Why? Because you can test the javascript in Jasmine/ Mocha etc. without setting up an entire rails stack. You can also simply stub the ajax call in your tests. By avoiding "dynamic" javascript you can compile all assets at deploy time. $(document).ready(function() { // I just assumed this path var promise = $.getJSON('/workloads.json'); // Transform data promise.then(function(data){ return $.map(data, function(item){ return { y: item.name, a: item.foo } }); }); // Render chart promise.done(function(data){ Morris.Bar({ element: 'workload-bar-chart', data: data, xkey: 'y', ykeys: ['a'], labels: ['Name'], hideHover: 'auto', resize: true }); }); });
answers question: http://stackoverflow.com/q/26067771
has comment: http://stackoverflow.com/comment/40855035
type: Answer
accepted answer of: http://stackoverflow.com/q/26067771
has comment: http://stackoverflow.com/comment/40858739
upvote count: 2

http://stackoverflow.com/comment/40944187
has text: @TusharGupta, sorry, somehow JSBin didn't save my latest changes (there was even no button). I've updated bin again: http://jsbin.com/gacebekuhebu/2/edit You just need to press "Run with JS" and then press a button. It will work.
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26115343

http://stackoverflow.com/q/26040400
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26040512
has comment: http://stackoverflow.com/comment/40828389
has title: CSS selector to find element whose one of subelements has particular text value
has answer: http://stackoverflow.com/a/26040665
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: CSS selector to find element where one of its subelements has a particular text value. ie: Home Val1 Val2 Here, I want to find the one , having with innerText = Val2
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: xpath

http://stackoverflow.com/a/26116758
has body: It looks there is a problem with the PHP from your server and the response can't be parsed. You should check with Firebug what is the response from the server when you try to upload an image. finfo_file function for instance is available only starting with PHP 5.3. If your version is older this is the problem most probably.
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26045313
downvote count: 0
has comment: http://stackoverflow.com/comment/40959273
accepted answer of: http://stackoverflow.com/q/26045313
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40948365
upvote count: 2
has comment: http://stackoverflow.com/comment/40974382

http://stackoverflow.com/comment/41007890
type: QuestionComment
has text: Have u tried calling /panel/videos after deleting, that should automatically refresh the view!
comment on: http://stackoverflow.com/q/26158681
score: 0
type: Comment

http://stackoverflow.com/q/26044831
tagged with: javascript
favorite count: 0
has title: Calculated in what direction should i go
has comment: http://stackoverflow.com/comment/40799911
downvote count: 3
has comment: http://stackoverflow.com/comment/40799869
has comment: http://stackoverflow.com/comment/40799727
accepted answer: http://stackoverflow.com/a/26045074
has comment: http://stackoverflow.com/comment/40800020
upvote count: 0
score: -3
has answer: http://stackoverflow.com/a/26045074
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40799705
has comment: http://stackoverflow.com/comment/40799692
has comment: http://stackoverflow.com/comment/40800057
type: Question
has body: I have a function with 2 parameters FROM and TO. TO can only be 0, 90, 180 or 270. FROM can be some number between 0 and 360. If FROM and TO are same function should return that number. If FROM is for example 181 and TO is 0 return 181+1 but if FROM 179 return 179-1 Given 360°, calculate which direction is shortest to get from FROM to TO. How to write this function without hundred lines of if and else. nearestPath: function(from ,to){ to = to%360; from = from%360; if(from == to){ return to; }else{ // Calculate increment or decrement.. } }
has comment: http://stackoverflow.com/comment/40799882
answer count: 1

http://stackoverflow.com/q/26038123
downvote count: 2
has answer: http://stackoverflow.com/a/26038323
has answer: http://stackoverflow.com/a/26038312
has comment: http://stackoverflow.com/comment/40787482
tagged with: php
has comment: http://stackoverflow.com/comment/40786958
has comment: http://stackoverflow.com/comment/40787068
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40786930
has comment: http://stackoverflow.com/comment/40787638
has comment: http://stackoverflow.com/comment/40787003
has comment: http://stackoverflow.com/comment/40786925
has comment: http://stackoverflow.com/comment/40787040
type: Question
accepted answer: http://stackoverflow.com/a/26038323
upvote count: 0
score: -2
tagged with: javascript
tagged with: jquery
has title: converting javascript code to jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/40787087
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has body: I have following code of javascript for search function. It works well when written inside html/php file it self, however, when I try to add this in my jQuery file, it doesn't work anymore. &lt;script type="text/javascript"&gt; function findmatch(){ if(window.XMLHttpRequest){ xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } xmlhttp.onreadystatechange = function(){ if ( xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200 ){ document.getElementById('search_result').innerHTML = xmlhttp.responseText; } } xmlhttp.open('GET', 'php/search.php?search_text='+document.search.search_text.value , true); xmlhttp.send(); } &lt;/script&gt; I tried replacing 'getElementById' with $('#') and few some ways. But didn't work. I want to convert in jQuery so I can manage/animate 'search_result' div according to size of result returned. I don't know how will I do that. But, if you can guide me fir that extra, It would be great/
has answer: http://stackoverflow.com/a/26038445
possible better answer: http://stackoverflow.com/a/26038312

http://stackoverflow.com/a/26050071
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40809555
type: Answer
has body: Try something like: &lt;?php $lines_array = fgetcsv(fopen('file.php', 'r'), "\t"); ?&gt;
accepted answer of: http://stackoverflow.com/q/26049952
answers question: http://stackoverflow.com/q/26049952

jquery-ui
tags question: http://stackoverflow.com/q/26168596
tags question: http://stackoverflow.com/q/26166408
tags question: http://stackoverflow.com/q/26136668
tags question: http://stackoverflow.com/q/26042927
tags question: http://stackoverflow.com/q/26072955
tags question: http://stackoverflow.com/q/26170364
tags question: http://stackoverflow.com/q/26110525
tags question: http://stackoverflow.com/q/26157225
tags question: http://stackoverflow.com/q/26178042
tags question: http://stackoverflow.com/q/26047636
tags question: http://stackoverflow.com/q/26038970
tags question: http://stackoverflow.com/q/26104966
tags question: http://stackoverflow.com/q/26159228
tags question: http://stackoverflow.com/q/26119328
tags question: http://stackoverflow.com/q/26120825
tags question: http://stackoverflow.com/q/26097325
tags question: http://stackoverflow.com/q/26061751
tags question: http://stackoverflow.com/q/26117136
tags question: http://stackoverflow.com/q/26065461
tags question: http://stackoverflow.com/q/26093918
tags question: http://stackoverflow.com/q/26177265
tags question: http://stackoverflow.com/q/26042783
tags question: http://stackoverflow.com/q/26127521
tags question: http://stackoverflow.com/q/26071123
tags question: http://stackoverflow.com/q/26176607
tags question: http://stackoverflow.com/q/26098584
tags question: http://stackoverflow.com/q/26069533
tags question: http://stackoverflow.com/q/26137980
tags question: http://stackoverflow.com/q/26142626
tags question: http://stackoverflow.com/q/26128387
tags question: http://stackoverflow.com/q/26167166
tags question: http://stackoverflow.com/q/26036516
tags question: http://stackoverflow.com/q/26165094
type: Tag
tags question: http://stackoverflow.com/q/26116257
tags question: http://stackoverflow.com/q/26062963
tags question: http://stackoverflow.com/q/26038833
tag name: jquery-ui
tags question: http://stackoverflow.com/q/26108864
tags question: http://stackoverflow.com/q/26192558
tags question: http://stackoverflow.com/q/26106714
tags question: http://stackoverflow.com/q/26099807
tags question: http://stackoverflow.com/q/26104722
tags question: http://stackoverflow.com/q/26121402
tags question: http://stackoverflow.com/q/26126193
tags question: http://stackoverflow.com/q/26170251

http://stackoverflow.com/q/26080088
downvote count: 0
answer count: 1
score: 1
favorite count: 0
has body: A webpage sends JSON data via POST to my Node.js App (MEAN-environment using Mongoose). The JSON file looks like this (excerpt): Firstname: 'XY', Surname: 'asd', Articles: [ { title: '1', description: 'XY' }, { title: '2', description: 'XY' }, { title: '3', description: 'XY' } The purpose is to create an Author in a mongodb database, add the author to an additional directory, store associated articles and create references to those articles in the author document (code excluded). This is the code that handles the request: [...] async.waterfall([ //Create random code for author (besides mongodb-specific id) function(callback){ newAuthorCode.randomAuthorCode(function(err, code) { callback(null, code); }); }, //Save new author to db function(code, callback){ var newAuthor = new Author({firstname: req.body.Firstname, surname: req.body.Surname, identcode: code }); newAuthor.save(function (err){ callback(null, newAuthor); }); }, //Add new author to an additional directory function(newAuthor, callback){ Directory.update({_id: req.user._id}, {$push: {authorids: newAuthor._id }}, function(err, update){ if (update){ callback(null); } }); }, //saves articles to db function(callback){ var keys = Object.keys(req.body.articles); for(var i=0, length=keys.length; i&lt;length; i++){ var newArticle = new Article({title: req.body.Articles[keys[i]].title, description: req.body.Articles[keys[i]].description }); newArticle.save(function (err){ console.log(newArticle._id); // &lt;--- !!!!!!! }); } callback(null); } ], function (err, result) { console.log('DONE!!!'); res.send('200'); }); My problems: 1) The marked line of code where I try to output all IDs of the generated articles only delivers i-times the ID of the last article stored (in this case of article 3). 2) Problem 1 leads to the issue that I can not create references of the newly created articles in the author document (stored in a different collection) as I can't access no article IDs but the last one!? 3) Sometimes the author…
accepted answer: http://stackoverflow.com/a/26080410
tagged with: node.js
has title: Node.js: Creating multiple MongoDB docs over iterated JSON POST data
type: AnsweredQuestion
upvote count: 1
type: Question
tagged with: mongodb
tagged with: mongoose
tagged with: javascript
has answer: http://stackoverflow.com/a/26080410

http://stackoverflow.com/q/26191774
tagged with: javascript
tagged with: jquery
score: 29
favorite count: 0
has answer: http://stackoverflow.com/a/26193766
tagged with: ajax
type: Question
has comment: http://stackoverflow.com/comment/41069672
has title: Submit form using AJAX in Asp.Net mvc 4
tagged with: asp.net
has body: I'm trying to learn asp.net and so far I can load other page contents without refreshing using Ajax.Actionlink and AjaxOptions() but I can't figure it out how to use ajax when submitting a form. I did a lot of googling but couldn't find the appropriate solution. Here are my codes, Controller page namespace CrudMvc.Controllers { public class HomeController : Controller { sampleDBEntities db = new sampleDBEntities(); // // GET: /Home/ public ActionResult Index() { return View(db.myTables.ToList()); } public PartialViewResult Details(int id = 0) { myTable Table = db.myTables.Find(id); return PartialView(Table); } [HttpGet] public PartialViewResult Create() { return PartialView(); } [HttpPost] public ActionResult Create(myTable table) { if (ModelState.IsValid) { db.myTables.Add(table); db.SaveChanges(); return RedirectToAction("Index"); } return View(table); } protected override void Dispose(bool disposing) { db.Dispose(); base.Dispose(disposing); } } } Index View page @model IEnumerable<CrudMvc.Models.myTable> @{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_Layout.cshtml"; } Index @Ajax.ActionLink("Add New", "Create", new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "info", InsertionMode = InsertionMode.Replace }) @Html.DisplayNameFor(model => model.name) Action @foreach (var item in Model) { @Html.DisplayFor(modelItem => item.name) @Ajax.ActionLink("Details", "Details", new{ id=item.id}, new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "info", InsertionMode = InsertionMode.Replace }) } Create View Page @model CrudMvc.Models.myTable @{ ViewBag.Title = "Create"; Layout = "~/Views/Shared/_Layout.cshtml"; } Create @using (Html.BeginForm()) { @Html.ValidationSummary(true) myTable @Html.LabelFor(model => model.id) @Html.EditorFor(model => model.id) @Html.ValidationMessageFor(model => model.id) @Html.LabelFor(model => model.name) @Html.EditorFor(model => model.name) @Html.ValidationMessageFor(model => model.name) } @Html.ActionLink("Back to List", "Inde…
linked to: http://stackoverflow.com/q/30868493
accepted answer: http://stackoverflow.com/a/26193766
answer count: 1
upvote count: 29
type: AnsweredQuestion
tagged with: asp.net-mvc
downvote count: 0

http://stackoverflow.com/comment/40885753
score: 0
has text: well, i forgot to say this, but my javascript function is to add new table row dynamically, so `$('#tblbahan tr').last().after('');` function is to add new tr inside table, and the combobox is inside that tr, so when i click add, i want it to add new row plus the combobox..
type: AnswerComment
comment on: http://stackoverflow.com/a/26091503
type: Comment

http://stackoverflow.com/comment/40872297
comment on: http://stackoverflow.com/a/26084073
score: 0
type: AnswerComment
type: Comment
has text: Okay thanks for explaining, I'm still unable to get it to work :/ I've done exactly what you have mentioned in your code example. Here is the live site: http://www.drivencarsales.co.uk/index.php When I search it goes to used-cars.php however does not select the option that was selected. Any ideas why?

http://stackoverflow.com/a/26080163
answers question: http://stackoverflow.com/q/26080050
score: 2
downvote count: 0
upvote count: 2
has body: I suspect is because returned data is an object with other data. That doesn't make any sense at all. The reason you are not getting the number in the string is because .search returns the index of the match. Use .match or .exec instead: showSelection.match(/\d+/)[0]; /*or*/ /\d+/.exec(showSelection)[0];
type: Answer

http://stackoverflow.com/q/26101669
favorite count: 0
has answer: http://stackoverflow.com/a/26103313
accepted answer: http://stackoverflow.com/a/26103313
tagged with: node.js
tagged with: promise
downvote count: 0
linked to: http://stackoverflow.com/q/22519784
possible better answer: http://stackoverflow.com/a/26103228
has answer: http://stackoverflow.com/a/26102052
type: AnsweredQuestion
tagged with: bluebird
has comment: http://stackoverflow.com/comment/40904989
score: 1
has title: Call async function while pushing the same function on array
type: Question
has body: I have this code: var queue = []; var allParserd = []; _.each(webs, function (web) { queue.push(function () { WebsitesUtils.parseWebsite(web, function (err, parsed) { allParserd.push(parsed); }); }); }); Promise.all(queue).then(function (data) { console.log(allParserd); }); Basically I need to fetch all my webs and be sure to give the result after that every parsing is done. the function parseWebsite return the correct data, but in this way is not called and allParsed return just as an empty array. I'm sure that I miss some things, I've started to use the promises just from some days. If you need some more information just tell me. P.s. I want that all the functions to start at the same time; I don't want to wait for each one response for going forward.
answer count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/40903814
has answer: http://stackoverflow.com/a/26103228
has comment: http://stackoverflow.com/comment/40905206
tagged with: javascript

http://stackoverflow.com/a/26125913
has body: You need to create round as global variable as you did it with rock, paper, scissors etc. Define round the same way var round = 0; and your roundUp function should work as expected. EDIT: You also forgot to end your statements with semicolons. And I think you don't need to send choice2 as parameter on button click while you're setting it inside your function.
answers question: http://stackoverflow.com/q/26125762
upvote count: 1
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/41005210
score: 1
comment on: http://stackoverflow.com/q/26155145
type: Comment
type: QuestionComment
has text: Do you want to do that on the CPU side prior to rendering? Is http://threejs.org/examples/js/modifiers/ExplodeModifier.js what you are looking for?

http://stackoverflow.com/q/26079524
tagged with: casperjs
answer count: 1
downvote count: 1
tagged with: node.js
tagged with: heroku
tagged with: phantomjs
has body: I have created an application in casperjs which scraps sport data from a website. I would like to run this application per cronjob on heroku, to save the sports results in a csv, database or external google docs(haven`t decided yet). However, I have one questions before I start to implement it for heroku: I found this buildpack for heroku, which claims that it can run casperjs scirpts. However, do I need nodejs to run the script scheduled? Or can I just create a cronjob on heroku? I really appreciate your replies!
has answer: http://stackoverflow.com/a/26206676
type: AnsweredQuestion
tagged with: javascript
favorite count: 0
type: Question
has title: Running casperjs per cronjob on heroku
score: 5
upvote count: 6
accepted answer: http://stackoverflow.com/a/26206676

http://stackoverflow.com/comment/40972634
comment on: http://stackoverflow.com/q/26138871
has text: the page dosent reload the page stays static but a div on the page is filled with the contents of a loaded file using ajax and said loaded file has its own css but again none of the replys are actually helping here so am looking for someone who knows ajax and javascript that can help me put everything i have in a working function
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/28850750
answers question: http://stackoverflow.com/q/26055454
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26055454
has body: It turns out that the above script is unable to convert unicode properly. The best solution that worked for me is using the html tag sup as follows: X2 Hope this helps.

http://stackoverflow.com/comment/40786795
comment on: http://stackoverflow.com/a/26038083
has text: Aye, an odd rule though
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/26174791
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26174709
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/26174709
upvote count: 1
has body: the problem is in this line: $(this).find('span').css('transform', 'rotate(0deg)'); you are searching for the arrow inside the X button. you need to go 2 elements up, and search there: Fixed Fiddle $('#main').each(function () { var $accordian = $(this); $accordian.find('.view-m').on('click', function () { $accordian.find('.mobile-content-body').slideUp(); $accordian.find('span').css('transform', 'rotate(0deg)'); if (!$(this).next().is(':visible')) { $(this).next().slideDown(); $(this).find('span').css('transform', 'rotate(90deg)'); $(this).next().slideDown(); $accordian.find('.close').click(function () { $(this).parent().slideUp(500); $(this).parent().parent().find('span').css('transform', 'rotate(0deg)'); }); } }); });

http://stackoverflow.com/a/26048979
has comment: http://stackoverflow.com/comment/40837176
type: AcceptedAnswer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26048306
type: Answer
has comment: http://stackoverflow.com/comment/40835738
has comment: http://stackoverflow.com/comment/40811102
answers question: http://stackoverflow.com/q/26048306
downvote count: 0
has body: One way you can handle it is with the enum pattern. In this code, this.state.person is either the loading sentinel, the notFound sentinel, or the actual person. var status = {loading: {}, notFound: {}}; // ... getInitialState: function(){ return {person: status.loading} }, fetchPerson: function(){ doFetchPerson(function(person){ if (person) this.setState({person: person}) else this.setState({person: status.notFound}) }.bind(this)) }, render: function(){ var person = this.state.person) if (person === status.loading) ... else if (person === status.notFound) ... else ... }
score: 3

http://stackoverflow.com/q/26079064
upvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26079076
tagged with: javascript
has body: The shortest way to convert any number to true or false depending on 0 and all -1 = false and 1 to rest = true. How can i do this in javascript. I have tried using if statements, but that looks like long way to do things. How can i quickly log value to true or false for numbers.
has comment: http://stackoverflow.com/comment/40862356
has title: how to quickly convert any number to true or false
has comment: http://stackoverflow.com/comment/40862370
favorite count: 0
has comment: http://stackoverflow.com/comment/40862367
score: -4
has comment: http://stackoverflow.com/comment/40862353
has answer: http://stackoverflow.com/a/26079076
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40862365
has comment: http://stackoverflow.com/comment/40862421
type: Question
downvote count: 4

http://stackoverflow.com/q/26131413
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26131505
linked to: http://stackoverflow.com/q/4197591
possible better answer: http://stackoverflow.com/a/26131505
has answer: http://stackoverflow.com/a/26131485
linked to: http://stackoverflow.com/q/24366549
has title: Manipulate menu links when started "example.com/#link1"
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26131485
has body: Would like to know how to handle when the page is loaded in one of menu links. when the URL starts with #link1 or #link2 or #link3, manipulate: if('example.com/#link1') { alert('link1'); } else if ('example.com/#link2') { alert('link2'); } else if ('example.com/#link3') { alert('link3'); }
type: Question
score: 0
answer count: 2

http://stackoverflow.com/comment/40932843
comment on: http://stackoverflow.com/q/26118050
score: 0
type: Comment
type: QuestionComment
has text: What exactly do you expect it to do?

http://stackoverflow.com/q/26047996
has comment: http://stackoverflow.com/comment/40810034
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40805772
type: Question
has title: Pasting the contents of a paragraph into a text area from a .txt file
has comment: http://stackoverflow.com/comment/40805754
has comment: http://stackoverflow.com/comment/40862535
tagged with: javascript
has answer: http://stackoverflow.com/a/26092019
has comment: http://stackoverflow.com/comment/40884929
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/196498
has body: So I edited this a bunch of times but basically i want to insert paragraphs from a text file into div. So far I've been able to change the "its me" to "hello World using Jqquery BUT instead of hello world I want to get the paragraphs from within the text file. Thank you This is what I have so far
favorite count: 0
has comment: http://stackoverflow.com/comment/40865506
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40884553
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40880457
has comment: http://stackoverflow.com/comment/40879654
has comment: http://stackoverflow.com/comment/40884490

http://stackoverflow.com/q/26093536
has answer: http://stackoverflow.com/a/29263791
type: Question
tagged with: algorithm
tagged with: javascript
has title: StakeOut: Find Optimal Expectation Using Recursion
has body: I was recently presented with a coding assignment by a startup I was interviewing with. They gave me the following problem and asked for a solution: Congratulations! You are the new elite hacker in a group of villainous ne'er-do-wells. Luckily this group is more saavy than your last band of ruffians, and they are looking to software (and you) to improve their take. The con man for the team, has gone door-to-door down each street posing as a termite inspector so he could covertly total the valuable goods in each house. Normally the gang would just rob all the valuable homes, but there's a catch! Whenever a house is robbed in this wealthy neighborhood, the police watch it and the neighboring houses for months. So the gang can't simply rob all the homes, and if they choose to rob one, they can no longer rob the house on either side of it. The ringleader wants to know what houses he should rob to maximize the team's profit, and he wants to know now. Write a function that takes in an array of positive integers (home values) and returns the maximum expected value of robbing that street. For example: [ 20, 10, 50, 5, 1 ] should return $71, as robbing the first, third, and fifth houses is optimal [ 20, x, 50, x, 1 ] [ 20, 50, 10, 1, 5 ] should return $55, as robbing the second and fifth houses is optimal [ x, 50, x, x, 5 ] Basically, you can only sum the values of alternative houses because if a house is robbed, the houses immediately before and after it cannot be robbed, due to heavy security in the street. I wrote a solution using recursion and presented it to them. I presented a solution which accounted for all cases except for the following: [2, 3, 2], for which the returned answer was 3, instead of 4. They told me to fix the bug. Since, it was the only case for which the algorithm didn't work, I used the following code to fix the problem (written in JavaScript): // The recursive alrogithm doesn't account for arrays of length 3. if(array.length === 3) { if(array[0] + ar…
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26093709
type: UnansweredQuestion
tagged with: recursion
has answer: http://stackoverflow.com/a/26093887

http://stackoverflow.com/comment/41008378
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26158837
has text: @Harry12345 http://jsfiddle.net/x612hq84/
score: 0

http://stackoverflow.com/a/38824974
score: 2
has body: I recommend InteractJS to handle touch events. It doesn't have any dependencies and handles dragging, rotation and multitouch etc. interact('.drag-and-resize').draggable({ snap: { targets: [ { x: 100, y: 200 }, function (x, y) { return { x: x % 20, y: y }; } ]} }).resizable({ inertia: true }); Here is a demo I cobbled together on Codepen using SVGs
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26108660
type: Answer
accepted answer of: http://stackoverflow.com/q/26108660
upvote count: 3
downvote count: 1

http://stackoverflow.com/q/26094704
type: AnsweredQuestion
score: 1
has body: In my service: appRoot.factory('ProgramsResource', function ($resource) { return $resource('Home/Program', {}, { Program: { method: 'get', isArray: false } }) }); In my controller: appRoot.controller('ProgramCtrl', function ($scope, ProgramsResource) { $scope.searchPrograms = function () { $scope.Programs = ProgramsResource.get( { Name: $scope.searchProgramName, }); }; $scope.SortBy = "Name"; $scope.searchPrograms(); //Lines of code which I want to execute only after the searchPrograms() completes its execution $scope.TotalItems = $scope.Programs.TotalItems; $scope.ItemsPerPage = $scope.Programs.ItemsPerPage; }); searchPrograms(); is responsible for getting data from server. And only after line $scope.searchPrograms(); I want to execute below code: $scope.TotalItems = $scope.Programs.TotalItems; $scope.ItemsPerPage = $scope.Programs.ItemsPerPage; But its not happening like that. Its not waiting for searchPrograms() to complete its operation and executing the lines of code below it. As in js, it won't wait for ajax to complete and executes the lines below it, this is happening. To execute certain code only after ajax completion there is concept of call back functions in js and for the same there is concept of promises in angular. I got very nice article over angular promises but not able to understand that, how exactly I should use the promises in my case.
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/26094910
tagged with: javascript
has answer: http://stackoverflow.com/a/26094910
has title: Executing certain block of code only after angular service gets data from server and completes its execution
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/26094876
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26094876
tagged with: angular-promise

http://stackoverflow.com/comment/40813947
has text: Your answer is ok, but I've decided to choose this variant http://www.w3schools.com/jsref/met_win_open.asp
comment on: http://stackoverflow.com/a/26052636
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40872589
comment on: http://stackoverflow.com/a/26084073
type: AnswerComment
score: 0
type: Comment
has text: I am seeing `?make=FORD` in the browser url on the second page so the first page is correct. I should be seeing ` FORD ` on the second page but i'm not so you got somet5hing wrong on the second page

http://stackoverflow.com/comment/40987422
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26147574
has text: JavaScript runs on the client, Ruby runs on the server.
type: Comment

http://stackoverflow.com/comment/40825957
type: Comment
type: QuestionComment
has text: you said you are receiving "["Bob", "Human"]" . Just do $("#currentPlayer").append(playerNameAndType[0]); $("#playerType").append(playerNameAndType[1]);
comment on: http://stackoverflow.com/q/26059060
score: 0

http://stackoverflow.com/a/26121343
answers question: http://stackoverflow.com/q/26121029
score: 0
has comment: http://stackoverflow.com/comment/40963778
type: Answer
has comment: http://stackoverflow.com/comment/40964718
has comment: http://stackoverflow.com/comment/40964641
has comment: http://stackoverflow.com/comment/40942502
has body: JS Fiddle $('#toggleSequence').parents('table').next().hide(); // first you need to hide it use can also use css for this $("#toggleSequence").change(function (e) { if ($(this).is(":checked")) { alert(); $(this).parents('table').next().show(); } else { $(this).parents('table').next().hide(); } });
has comment: http://stackoverflow.com/comment/40938871
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26121029
has comment: http://stackoverflow.com/comment/40964724

http://stackoverflow.com/q/26156107
has answer: http://stackoverflow.com/a/26156381
downvote count: 1
has comment: http://stackoverflow.com/comment/41003414
type: Question
has answer: http://stackoverflow.com/a/26156143
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41003354
answer count: 3
upvote count: 0
has body: I'm trying to write a javascript function to test if an element is the first child... This is my code: $el = document.getElementsByClassName("b")[0]; $firstEl = $el.parentNode.getElementsByClassName("a").firstChild; http://jsfiddle.net/bf2ae5tt/ Why it does not work?
accepted answer: http://stackoverflow.com/a/26156143
favorite count: 0
has title: How to test if the given element is the first child
has comment: http://stackoverflow.com/comment/41003369
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26156156
has answer: http://stackoverflow.com/a/26156156

http://stackoverflow.com/comment/41063688
type: AnswerComment
comment on: http://stackoverflow.com/a/26188287
has text: Wow. I would've never guessed that in a million years. Thanks! :D
type: Comment
score: 1

http://stackoverflow.com/a/26097244
score: 1
accepted answer of: http://stackoverflow.com/q/26096847
answers question: http://stackoverflow.com/q/26096847
upvote count: 2
type: AcceptedAnswer
downvote count: 1
type: Answer
has body: Try my FIDDLE $('#input').keyup(function() { if (!$('#form')[0].checkValidity()) { $('#submit').click(); } });
has comment: http://stackoverflow.com/comment/40898686

http://stackoverflow.com/q/26193997
score: 0
answer count: 4
has answer: http://stackoverflow.com/a/26194085
accepted answer: http://stackoverflow.com/a/26194061
possible better answer: http://stackoverflow.com/a/26194057
tagged with: php
has answer: http://stackoverflow.com/a/26194057
has body: This is my first time handling with JSON, and I can't make this work: JavaScript: var obj = new Object(); obj.latitude = sessionStorage.lat; obj.longitude = sessionStorage.lng; var jsonString= JSON.stringify(obj); var post_data = "coords="+jsonString; $.ajax({ url: "index.php", type: "POST", data: post_data, dataType: "json", success: function(){ alert("postdone!"); }, error: function(){ alert("posterror!") } }); PHP: if (isset($_POST['data'])) { $jsondata = json_decode($_POST['data'],true); echo $jsondata; } I always get "posterror!"...
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/26194061
has answer: http://stackoverflow.com/a/26194068
has title: Parsererror with json and PHP
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/q/26190047
type: Question
tagged with: parsley.js
has body: I have been reading the parsley.js docs and I have tried to write a custom validator to validate if a date is greater than todays date. I have the conditional code written, but I am completly confused about how to apply the conditional error message. I have completed the task with a parsley maxlength validator, but realise that this is less than perfect. How do I write the custom validation with parsley? Here is my js/jq code that dynamically adds &amp; deletes the validation using the maxlength: if(formattedStartDate &gt; todaysDate) { $('#id_voluntary_start_date').attr('data-parsley-maxlength', '1'); $('#id_voluntary_start_date').attr('data-parsley-maxlength-message', '{% trans "Commencement Date must not be greater than today." %}'); $('#id_voluntary_start_date').parsley(); } else { $('#id_voluntary_start_date').attr('data-parsley-maxlength', '50'); } Any help with implementing the custom validation would be appreciated.
tagged with: javascript
answer count: 2
tagged with: validation
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/48800802
has title: parsley.js - custom validation for date field
has answer: http://stackoverflow.com/a/26190285
score: 1
upvote count: 1

http://stackoverflow.com/a/26041986
type: AcceptedAnswer
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/26040920
downvote count: 0
answers question: http://stackoverflow.com/q/26040920
has body: You're very likely loading your CSS using a relative url like so &lt;link rel="stylesheet" href="styles/style.css" /&gt; The problem is in html5mode your chef url is /chef/123 So the browser is trying to load your CSS from /chef/styles/style.css You'll want to either turn off html5mode or change your stylesheet href to be root relative (e.g. /styles/style.css)
upvote count: 2

http://stackoverflow.com/q/26052530
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/26052555
has body: Hi I want to validate a textfield with javascript. Here is my code in php: $question_type = "&lt;input type='text' id='question_type_n' onkeyup="allnumeric(this.value)" name='question_type_n_".$qid."' value='".$d[0]."' &gt;"; I also have the function allnumeric() in javascript. But it returns errors. Javascript-Error: Parse error: syntax error, unexpected 'allnumeric' (T_STRING) in E:\Share\xampp\htdocs\Dropbox\icsurvey\application\views\finish_survey.php on line 142
tagged with: php
has answer: http://stackoverflow.com/a/26052560
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26052555
accepted answer: http://stackoverflow.com/a/26052634
has comment: http://stackoverflow.com/comment/40813758
has answer: http://stackoverflow.com/a/26052565
type: Question
has title: JavaScript inline validation in php code
has answer: http://stackoverflow.com/a/26052634

http://stackoverflow.com/comment/110941273
score: 0
type: Comment
comment on: http://stackoverflow.com/a/38578855
type: AnswerComment
has text: 2 letter domains such as `ti.com` do not work with this regex.

http://stackoverflow.com/comment/41056145
has text: I just found this: chrome.tabs.getCurrent(function(tab) { chrome.tabs.update(tab.id, { 'url': url, 'selected': true }); }); how do I implement this code?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26184113

http://stackoverflow.com/comment/40970926
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26138211
has text: I've done that, I can see some bootstrap styles for the body, div has display: block, but no width applied.
score: 0

http://stackoverflow.com/comment/41003658
type: QuestionComment
has text: Sorry, spoke too soon. Apparently this is backbone's `bind`. Still not the bind you're thinking of.
comment on: http://stackoverflow.com/q/26152532
score: 0
type: Comment

http://stackoverflow.com/q/26153751
has comment: http://stackoverflow.com/comment/40999518
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41000013
has body: I'm working with a site that stopped working in Firefox randomly. This piece of code is populating into the html each time I try to update, and I'm trying to understand it. I haven't made any changes to the javascript used in the site but whatever this is has completely disabled all the site elements that use javascript. The kicker is that it only happens in Firefox. Chrome works perfectly. I've been poring over the html all day and this is the only thing that's weird- I'm at my wit's end, any ideas? I don't know a great deal about Javascript and I haven't touched anything in the scripts for the site, so I don't understand why they suddenly stopped functioning. &lt;script type="text/javascript" id="RTCEarlyScript"&gt; window.oldSetTimeout = window.setTimeout; window.setTimeout = function (func, delay) { return window.oldSetTimeout(function () { try { if (!document.documentElement.getAttribute('stopTimers ')) { if (typeof func == 'string') { var nfunc = new Function(func); nfunc(); } else func(); } } catch (ex) { } }, delay); }; window.oldSetInterval = window.setInterval; window.setInterval = function (func, delay) { return window.oldSetInterval(function () { try { if (!document.documentElement.getAttribute('stopTimer s')) { if (typeof func == 'string') { var nfunc = new Function(func); nfunc(); } else func(); } } catch (ex) { } }, delay); }; &lt;/script&gt;
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40999107
score: 0
has comment: http://stackoverflow.com/comment/40999136
has comment: http://stackoverflow.com/comment/40999863
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40999723
tagged with: firefox
tagged with: javascript
has answer: http://stackoverflow.com/a/26197882
has title: Javascript issue in firefox
has answer: http://stackoverflow.com/a/26198146

http://stackoverflow.com/q/26069428
upvote count: 1
has comment: http://stackoverflow.com/comment/40845393
type: AnsweredQuestion
score: 1
tagged with: powershell-3.0
has comment: http://stackoverflow.com/comment/40845652
type: Question
accepted answer: http://stackoverflow.com/a/26074517
tagged with: powershell
tagged with: javascript
tagged with: jquery
has body: I'm trying to write a PowerShell function to execute JavaScript/jQuery on a web page and return the results back to PowerShell with this trick that we store the JavaScript return value in the DOM using setAttribute and then retrieving it in PowerShell using getAttribute. However, the following problem is bugging me for few days now. Please see below for comments: Function ExecJavaScript($ie, $jsCommand, [switch]$global) { if (!$global) { $jsCommand = "document.body.setAttribute('PSResult', (function(){$jsCommand})());" } $document = $ie.document $window = $document.parentWindow $window.execScript($jsCommand, 'javascript') if (!$global) { $psresult = $document.body.getAttribute('PSResult') # Why no matter what I do, this always returns an array instead of a String? return $psresult.ToString() #return @($psresult) #return @($psresult).ToString() #return ($psresult | select -First 1) #return ($psresult -join '') } } $ie = New-Object -COM InternetExplorer.Application -Property @{ Navigate = "https://www.google.com/" Visible = $true } do { Start-Sleep -m 100 } while ( $ie.busy ) $result = ExecJavaScript $ie @' return "JavaScript code ran successfully!"; '@ # Why $result.length is always 2 ?!! $result.length $result Thanks!
has title: Why return type from PowerShell function is always an array?
has comment: http://stackoverflow.com/comment/40845538
answer count: 1
tagged with: scripting
downvote count: 0
has comment: http://stackoverflow.com/comment/40845494
favorite count: 0
has comment: http://stackoverflow.com/comment/40845684
has answer: http://stackoverflow.com/a/26074517

http://stackoverflow.com/q/26056264
tagged with: javascript
score: 0
tagged with: ngroute
has comment: http://stackoverflow.com/comment/40823817
tagged with: angularjs
has answer: http://stackoverflow.com/a/26056717
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40821330
has body: With this configuration: app.config(['$routeProvider', function($routeProvider) { $routeProvider .when('/personal-area/', {...}) .otherwise({'redirectTo': '/personal-area/'}) ]); When Im loading /personal-area/ in browser - Angular redirects me to /personal-area/#/personal-area/. How to make it recognize paths correctly?
has title: How to match routes against full path?
type: Question
answer count: 1

http://stackoverflow.com/q/26036345
tagged with: javascript
linked to: http://stackoverflow.com/q/25975535
has answer: http://stackoverflow.com/a/26040604
linked to: http://stackoverflow.com/q/9515704
tagged with: google-chrome-extension
upvote count: 1
has title: Executing a script in the current tab, from within a popup
favorite count: 0
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/40784735
accepted answer: http://stackoverflow.com/a/26040604
has body: So after being properly educated in this thread and moving a little bit further with developing Chrome Extensions, it seems that I need more direction on how to move forward. function testFunction() { chrome.tabs.query({active: true, currentWindow: true}, function(arrayOfTabs) { var activeTab = arrayOfTabs[0]; chrome.tabs.executeScript(activeTab.id, {file: "test.js"}); }); The test.js contains my script. It works fine when messing around with basic things like console.log and changing background colors, but does not seem to work for the pre-made script Im trying to use. Like I mentioned in my previous thread, the script I have works well when I simply paste it in the console - and I want the extension to do just that. I was probably wrong at first when I said that the script does not depend on anything on the page. What exactly is happening when running code via the console, and how can I run the same code via an extension? Thanks.
answer count: 1

http://stackoverflow.com/comment/41043474
has text: There's Traceur but it's buggy as hell.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26177776

http://stackoverflow.com/comment/40936195
has text: Wait... @MatRichardson is right. What possible action would you want other than a click? I just woke up. It sounded like you were ASKING for it to become a click.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26110225
type: Comment

http://stackoverflow.com/q/26107004
upvote count: 1
accepted answer: http://stackoverflow.com/a/26111725
type: AnsweredQuestion
score: 1
linked to: http://stackoverflow.com/q/18985587
type: Question
has body: I've been really struggling with radio buttons. I just want to dynamically create some radio buttons and then bind the checked radio button to a property on the controller. I tried the answer in this question: https://stackoverflow.com/a/18991426/62653 However, it doesn't work when you create the radio buttons dynamically. This is a snippet from the accepted answer: &lt;label&gt; {{view Ember.RadioButton name="selectionTest" selectionBinding="isSelected" value="true"}} true &lt;/label&gt; &lt;label&gt; {{view Ember.RadioButton name="selectionTest" selectionBinding="isSelected" value="false"}} false &lt;/label&gt; But when you create the radio button views dynamically like this, it doesn't work: {{#each myModel.someCollection}} &lt;label&gt; {{view Ember.RadioButton name="selectionTest" selectionBinding="isSelected" value=id}} {{id}} &lt;/label&gt; {{/each}} If you use a loop to create the radio buttons as above, the property isSelected doesn't get updated. Any ideas or other solutions to bind radio buttons?
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26111725
tagged with: ember-1
has title: How to bind dynamic radio buttons to controller property in Ember
tagged with: ember.js
answer count: 1

http://stackoverflow.com/comment/40909076
type: QuestionComment
score: 1
has text: @Bergi : you're right, and since O(1)+constant === 0(1), we have not a 'near' O(1) for the lookup, but exactly O(1). So this algorithm is O(n). Now, as shown in my answer, we can get a 6-10X improvement on the 'k' of this O(n) by using the best-fit native object.
comment on: http://stackoverflow.com/q/26097132
type: Comment

http://stackoverflow.com/comment/40977348
type: QuestionComment
comment on: http://stackoverflow.com/q/26141454
score: 0
type: Comment
has text: You need to make sure that JS part that submits form doesnt do it over and over again, ie if there is a form submition and user is loged in or not, next time you show a page do not fire form.submit() anymore

http://stackoverflow.com/comment/40809338
type: Comment
has text: The "lineTOMove" variable was created to see the output on the console. But it is assigned to attribute "cx". Ok, in the code I posted I did not update the lineToMove variable which is equal to "d3.event.sourceEvent.x". I guess it is not causing the error here. What I understood is, initially when I zoom the graph the zooming feature is working as expected. Later, when I try to drag any one of the line graph the drag feature is not working, but from the console I can see that the event values are getting updated. I am not sure what's the bug here.
score: 0
comment on: http://stackoverflow.com/a/26049063
type: AnswerComment

http://stackoverflow.com/a/26188268
score: 0
type: Answer
has body: Your comparison operator is wrong in your Jquery. It should be !== , not !=
answers question: http://stackoverflow.com/q/26182587

http://stackoverflow.com/comment/40853074
comment on: http://stackoverflow.com/q/26063105
has text: @Jeroen, it's working in your case because your `$.ajax` function is not asynchronous. Add a `setTimeout` inside it and it will break.
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/comment/41002275
comment on: http://stackoverflow.com/a/26155419
type: AnswerComment
has text: thanks that works fine but how do i disappear the other option when i click mobile i need to disappear the other two option
type: Comment
score: 1

http://stackoverflow.com/comment/40972903
has text: http://jsfiddle.net/518b000u/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26139144

http://stackoverflow.com/comment/40829841
score: 0
comment on: http://stackoverflow.com/q/26061254
has text: This is one of the reasons why `onclick=""` is outdated way to handle events...
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40839528
score: 1
type: Comment
comment on: http://stackoverflow.com/a/26065081
has text: Because it has form fields in it I want them removed from the DOM so they never hit the back end. Hiding them and setting them to empty strings should be sufficient, it just irks me that there's not a way to do this.
type: AnswerComment

http://stackoverflow.com/a/26170113
answers question: http://stackoverflow.com/q/26169958
score: 0
type: Answer
has body: You can call function which you want to execute first inside the second function before any other code. SO it has to execute first like. function a() { alert("first"); return true; } function b { b(); alert("second"); } or you can set an hidden variable on execution of first functin and check whether it is set or not in second one.

http://stackoverflow.com/a/54674716
has body: The previous scripts did not work for me because the .execCommand("Copy") was not triggering. By attaching it to the document itself, and moving it outside of the conditional, I was able to get it to work: I think this function is more robust: function selectElementContents(el) { var body = document.body, range, sel; if (document.createRange &amp;&amp; window.getSelection) { range = document.createRange(); sel = window.getSelection(); sel.removeAllRanges(); try { range.selectNodeContents(el); sel.addRange(range); } catch (e) { range.selectNode(el); sel.addRange(range); } } else if (body.createTextRange) { range = body.createTextRange(); range.moveToElementText(el); range.select(); } document.execCommand("Copy"); }
answers question: http://stackoverflow.com/q/26053004
type: Answer
upvote count: 2
downvote count: 1
score: 1

http://stackoverflow.com/comment/40958200
score: 0
comment on: http://stackoverflow.com/q/26131093
type: Comment
type: QuestionComment
has text: Always use the strict equality operator `===` when working with `typeof`.

http://stackoverflow.com/q/26098881
has title: Unable to iterate for loop in jquery properly
has answer: http://stackoverflow.com/a/26099320
tagged with: ajax
has answer: http://stackoverflow.com/a/26099416
accepted answer: http://stackoverflow.com/a/26099416
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26099210
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26099543
has answer: http://stackoverflow.com/a/26099531
has answer: http://stackoverflow.com/a/26099210
type: Question
has answer: http://stackoverflow.com/a/26099291
tagged with: javascript
answer count: 6
tagged with: jquery
has body: I have 3 div elements in my html each of which have a checkbox. When I click the delete button the divs with checked checkboxes should be deleted. However I find that when I check all the checkboxes the last div remains undeleted. I am sure that the last iteration is occuring as I have checked that using alert boxes. However the last iteration mysteriously stops somewhere in between without deleting the last div. The class of my 3 divs are "0","1" &amp; "2". The following is my function: $("#delete").click(function(){ checkboxes = document.getElementsByName('myCheckbox'); for(var i=0, n=checkboxes.length;i&lt;n;i++) { if(checkboxes[i].checked==true){ $("."+i).remove(); } } });
score: 0
has comment: http://stackoverflow.com/comment/40899036

http://stackoverflow.com/comment/40931030
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26116580
score: 0
has text: Added an answer, hope that helps

http://stackoverflow.com/q/26090880
has comment: http://stackoverflow.com/comment/40885255
type: Question
has comment: http://stackoverflow.com/comment/40885209
tagged with: http://stackoverflow.com/tag/xml
score: 0
has comment: http://stackoverflow.com/comment/40885319
has comment: http://stackoverflow.com/comment/40885173
answer count: 0
has body: I am reading text from a xml file, and insert this text into a Label. I read the text from the xml file every 5th second, in case it has changed. This mean that I insert the text into the label every 5th second (no matter if it has changed or not). Now the problem is that my xml file gets deleted when I do a GET the 2nd time, and this results in a 500 (internal server error), since the file is no longer there. Here is the code that creates the xml document [WebMethod] [ScriptMethod(UseHttpGet=true)] public string GetMessage() { XmlTextReader reader = new XmlTextReader (Global.sAppPath + "/alt/importantMsg.xml"); string message = null; while (reader.Read()) { if (reader.IsStartElement ()) { switch (reader.Name.ToString ()) { case "Message": message = reader.ReadString(); break; } } } return message; } And here is the code that issues a GET window.setInterval(function() { msg; $.ajax({ url: "isoServe.asmx/GetMessage", type: "GET", contentType: "application/json; charset=utf-8", dataType: "json", success: function(data) { msg = data.d; }, error: function() { alert("Error"); } }); Ext.getCmp('attentionLabel').setText(msg); Ext.getCmp('attentionLabel').show(); }, 5000); Below is the code that issues a POST, to save the message to the xml file, along with the client code [WebMethod] public void AddToXMLFile (string param) { XmlDocument doc = new XmlDocument(); DateTime today = DateTime.Today; XmlNode rootNode = doc.CreateElement("Scant"); XmlNode dateNode = doc.CreateElement("Date"); XmlNode importantMsg = doc.CreateElement("Message"); XmlAttribute msgId = doc.CreateAttribute("id"); msgId.Value = "msgID"; dateNode.InnerText = today.ToString(); importantMsg.InnerText = param; importantMsg.Attributes.Append(msgId); rootNode.AppendChild(dateNode); rootNode.AppendChild(importantMsg); doc.AppendChild(rootNode); doc.Save(Global.sAppPath + "/alt/importantMsg.xml"); } And the client code function saveMsg(msg) { var xmlhttp = new XMLHttpRequest(); xmlhttp.open("POST", "isoServe.as…
has title: xml file gets deleted unexpectedly on a GET request
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
tagged with: asp.net
tagged with: ajax

http://stackoverflow.com/q/26118039
possible better answer: http://stackoverflow.com/a/37607081
tagged with: javascript
has body: I'm trying to do the same with multiple data, with data-todo attribute, but it doesn't work. Could you help me? JAVASCRIPT: $(document).on("click", ".open-EditTodo", function () { var todoId = $(this).data('id'); var todoName = $(this).data('todo'); $(".modal-body #todoId").val( todoId ); $(".modal-body $todoName").val( todoName ); }); HTML: &lt;a href="#editTodoDialog" class="open-EditTodo btn btn-warning" data-toggle="modal" data-id="$todo_id" data-todo="$todo_name"&gt;EDIT&lt;/a&gt; &lt;div class="modal fade" tabindex="-1" role="dialog" style="margin-top: 200px;" id="editTodoDialog"&gt; &lt;div class="modal-dialog" align="center"&gt; &lt;div class="modal-content" style="width: 350px;"&gt; &lt;div class="modal-header" align="left"&gt; &lt;button type="button" class="close" data-dismiss="modal"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt; &lt;h4 class="modal-title"&gt;Edit to-do:&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body" align="center" style="height: 65px;"&gt; &lt;form class="form-inline" role="form" method="post" action="todo.php"&gt; &lt;div class="form-group"&gt; &lt;input type="text" name="todoName" id="todoName" value="" class="form-control" style="width: 230px;"&gt; &lt;input type="hidden" name="todoId" id="todoId" value=""&gt; &lt;button type="submit" class="btn btn-warning"&gt;&lt;span class="glyphicon glyphicon-edit"&gt;&lt;/span&gt; Edit&lt;/button&gt; &lt;/div&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; By the way, data-id works just fine, but data-todo doesn't.
upvote count: 2
accepted answer: http://stackoverflow.com/a/26118266
answer count: 2
tagged with: modal-dialog
favorite count: 0
has answer: http://stackoverflow.com/a/26118266
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/37607081
has title: Passing multiple datas through bootstrap modal
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question

facebook
tags question: http://stackoverflow.com/q/26159305
tags question: http://stackoverflow.com/q/26081116
tags question: http://stackoverflow.com/q/26039012
tags question: http://stackoverflow.com/q/26180313
tags question: http://stackoverflow.com/q/26038096
type: Tag
tags question: http://stackoverflow.com/q/26181457
tags question: http://stackoverflow.com/q/26044303
tags question: http://stackoverflow.com/q/26060284
tags question: http://stackoverflow.com/q/26187751
tags question: http://stackoverflow.com/q/26166463
tags question: http://stackoverflow.com/q/26120230
tags question: http://stackoverflow.com/q/26155019
tags question: http://stackoverflow.com/q/26154763
tag name: facebook
tags question: http://stackoverflow.com/q/26124886
tags question: http://stackoverflow.com/q/26121934
tags question: http://stackoverflow.com/q/26188924
tags question: http://stackoverflow.com/q/26078309
tags question: http://stackoverflow.com/q/26185567
tags question: http://stackoverflow.com/q/26156153
tags question: http://stackoverflow.com/q/26188383
tags question: http://stackoverflow.com/q/26184381
tags question: http://stackoverflow.com/q/26194370

http://stackoverflow.com/comment/40817194
comment on: http://stackoverflow.com/q/26054444
type: Comment
type: QuestionComment
has text: Disable all plugins/extensions. Try another browser, if the problem persists there, it's not bound to Chrome but something worse.
score: 0

http://stackoverflow.com/comment/40874635
score: 0
type: Comment
type: QuestionComment
has text: The first set of apostrophes are to call the line. the quotation is to call the src and then in that is another apostrophe to call the variable?
comment on: http://stackoverflow.com/q/26085668

http://stackoverflow.com/a/26116870
has body: Not in the way you can in a C# project, since there is no C# support. You will have to find a javascript libaray that will do what you want. Or create and host a C# Webapi 'proxy' for your service so you can access it with JSON and jQuery from the app. Maybe this can help when you want to do this from javascript directly
type: Answer
has comment: http://stackoverflow.com/comment/40932062
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40932425
upvote count: 1
answers question: http://stackoverflow.com/q/26114887

http://stackoverflow.com/comment/40787050
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26037646
score: 0
has text: You can definitely cross-compile javascript code to Android using cordova, however you cannot update this functionality remotely. You will still have to upload new APKs whenever you add/change features.

http://stackoverflow.com/q/26146136
has answer: http://stackoverflow.com/a/43711349
has title: getting grunt-istanbul error: No coverage information was collected
tagged with: qunit
favorite count: 0
type: UnansweredQuestion
has body: I've built a grunt setup for testing using qunit and generating coverage reports with istanbul but I can't get the storeCoverage task to complete without the error: No coverage information was collected. Gruntfile.js module.exports = function (grunt) { "use strict"; grunt.initConfig({ pkg: grunt.file.readJSON("package.json"), connect: { root_server: { options: { port: 2424, base: 'qunit' }, } }, qunit: { all: ['qunit/test1.html'] }, instrument: { files: "testable.js", options: { lazy: true, basePath: "qunit/" } }, storeCoverage: { options: { dir: "report/" } }, makeReport: { src: "report/*.json", options: { type: "lcov", dir: "test", print: "detail" } } }); grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks("grunt-contrib-qunit"); grunt.loadNpmTasks("grunt-istanbul"); grunt.registerTask("default", ["instrument", "connect", "qunit", "storeCoverage"/*, "makeReport"*/]); }; testable.js function runable () { return true; }; test1.html QUnit Example Everything works, qunit runs and the one assert does run on the instrumented file and succeeds. But when it hits the storeCoverage task it fails. Am I doing something wrong? Any help is appreciated of course.
has comment: http://stackoverflow.com/comment/53168907
has answer: http://stackoverflow.com/a/32706089
type: Question
upvote count: 4
answer count: 2
tagged with: istanbul
downvote count: 0
has comment: http://stackoverflow.com/comment/41920537
tagged with: javascript
tagged with: gruntjs
score: 4

http://stackoverflow.com/comment/40999280
type: Comment
comment on: http://stackoverflow.com/q/26153650
score: 0
type: QuestionComment
has text: Show your code. Where is the HTML markup? Where is the call to `.validate()`?

http://stackoverflow.com/q/26039278
answer count: 0
has comment: http://stackoverflow.com/comment/40789311
has body: I have two forms usin ajax on one page, one for uploading an image and the other sending information via mail. When I submit one it clears the content of the other one. My html: &lt;form class="inputform"&gt; &lt;input required size="60" maxlength="80" class="form-control" name="Location[zendernaam]" id="Location_zendernaam" type="text"&gt; &lt;!--more input fields--&gt; &lt;input type="submit" class="submit" style="display:none;"&gt; &lt;/form&gt; &lt;form id="form" class="imageuploadform" action="&lt;?php echo get_home_url(); ?&gt;/wp-content/themes/PandoraBox/ajaxupload.php" method="post" enctype="multipart/form-data"&gt; &lt;input id="uploadImage" type="file" accept="image/*" name="image" /&gt; &lt;input id="button" class="image-upload" type="submit" value="Upload"&gt; &lt;/form&gt; &lt;div id="preview" style="display:none"&gt;&lt;/div&gt; &lt;input id="submitform" type="button" value="Verzend"&gt; My javascript/jquery: &lt;script type="text/javascript"&gt; $("#submitform").click(function(){ $('.inputform .submit').click(); return false; }); $(".inputform").submit(function( event ){ event.preventDefault(); post_data = { 'titel' : $("#Location_title").val(), 'hoofdcategorie' : $("#Location_hoofd1").val(), //more fields }; $.ajax({ type: "POST", url: "&lt;?php echo get_home_url(); ?&gt;/wp-content/themes/PandoraBox/verzend-inzending.php", data: post_data, success: function(){ alert('top!'); } }); }); &lt;/script&gt; First the user fills in the fields, after that he can upload an image and preview it. When you click submit on the image upload form it clears all the values of the first form.
type: Question
has comment: http://stackoverflow.com/comment/40789147
score: 0
has comment: http://stackoverflow.com/comment/40789176
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40789271
tagged with: ajax
has title: Two AJAX forms on one page, one clears the other
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php

http://stackoverflow.com/comment/40971768
comment on: http://stackoverflow.com/q/26139203
score: 0
has text: http://jsfiddle.net/arunpjohny/zpuynvuu/1/
type: Comment
type: QuestionComment

key-value
tags question: http://stackoverflow.com/q/26177521
tag name: key-value
type: Tag
tags question: http://stackoverflow.com/q/26147214

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/26160193
tags question: http://stackoverflow.com/q/26187181
tags question: http://stackoverflow.com/q/26143213
tags question: http://stackoverflow.com/q/26104525
tags question: http://stackoverflow.com/q/26156536
tags question: http://stackoverflow.com/q/26156003
tags question: http://stackoverflow.com/q/26154758
tags question: http://stackoverflow.com/q/26184536
type: Tag
tags question: http://stackoverflow.com/q/26105331
tags question: http://stackoverflow.com/q/26045534
tags question: http://stackoverflow.com/q/26132330
tags question: http://stackoverflow.com/q/26143612

http://stackoverflow.com/a/26088599
answers question: http://stackoverflow.com/q/26079395
has body: Changed the code to this and it works now: Parse.Cloud.define("editMatchCenter", function(request, response) { var matchCenterItem = Parse.Object.extend("matchCenterItem"); var query = new Parse.Query(matchCenterItem); query.contains('searchTerm', request.params.searchTerm); query.equalTo('parent', Parse.User.current()) query.first({ success: function(results) { results.set('minPrice', request.params.minPrice); results.set('maxPrice', request.params.maxPrice); results.set('itemCondition', request.params.itemCondition); results.set('itemLocation', request.params.itemLocation); results.save(); response.success('MatchCenterItem successfully edited!'); }, error: function() { response.error('MatchCenterItem NAAAAT successfully edited!'); } }); });
accepted answer of: http://stackoverflow.com/q/26079395
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/comment/41015327
comment on: http://stackoverflow.com/a/26162512
type: Comment
has text: This does work! But it isn't returning anything from $(this).serialize()?
score: 0
type: AnswerComment

http://stackoverflow.com/q/26063411
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26063543
tagged with: http://stackoverflow.com/tag/html
has title: Where in the HTML/CSS/JavaScript is Mobile Formatting Handled?
possible better answer: http://stackoverflow.com/a/26063448
has answer: http://stackoverflow.com/a/26063641
has answer: http://stackoverflow.com/a/26063448
tagged with: css
answer count: 4
has answer: http://stackoverflow.com/a/26063463
type: AnsweredQuestion
has body: Consider the following site: 200minus.com This site looks good on both a mobile phone and a desktop. It's as if when you view the site on a mobile phone, everything is appropriately shrunken. Where in the source code (HTML/CSS/JavaScript) is this being dealt with (or is this typically dealt with)?
type: Question
accepted answer: http://stackoverflow.com/a/26063641

http://stackoverflow.com/comment/40803140
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26046398
has text: try this http://jsfiddle.net/k0LLjfxj/

http://stackoverflow.com/a/26084071
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26072445
answers question: http://stackoverflow.com/q/26072445
has body: Like I said in the comments, I think previously you had a jQuery version lower than 1.5 (without .done() implemented) so the success method is invoked as a callback then .done() throw an error in the console without breaking anything (like undefined is not a function). So in this case, you have an error in the console and only one callback function called. Demo with jQuery 1.4.4 : jsfiddle In the console : 1 error : undefined is not a function (because of .done()) and 1 log : Object (datas from the call)
type: Answer
downvote count: 0

http://stackoverflow.com/comment/40882813
type: AnswerComment
comment on: http://stackoverflow.com/a/26090026
has text: Sorry, fixed link to fiddle.
score: 0
type: Comment

http://stackoverflow.com/a/26130894
accepted answer of: http://stackoverflow.com/q/26130245
has comment: http://stackoverflow.com/comment/57722242
answers question: http://stackoverflow.com/q/26130245
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: I Figured it out ajax_post = function(aData, aCB) { var xmlhttp; xmlhttp = void 0; // Fallback for IE5/6 if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } // Send Request to Server xmlhttp.open("POST", aData.path, true); // Set Header Information specifying what type of data you are sending xmlhttp.setRequestHeader('Content-Type', 'application/json'); // Callback that waits untill request is finished and responce is ready xmlhttp.onreadystatechange = (function(_this) { return function() { // readyState // - 0: request not initialized // - 1: server connection established // - 2: request received // - 3: processing request // - 4: request finished and response is ready // status // - 200: OK if ((aCB != null) &amp;&amp; xmlhttp.readyState === 4 &amp;&amp; xmlhttp.status === 200) { aCB(xmlhttp.responseText); } // TODO check for xmlhttp.status !== 200 Because error handeling should be done }; })(this); // Sends Request Request Payload xmlhttp.send(JSON.stringify(aData)); }; Edit: Added comments per request

http://stackoverflow.com/a/26057889
has comment: http://stackoverflow.com/comment/40891303
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40832188
has comment: http://stackoverflow.com/comment/40941258
type: Answer
has comment: http://stackoverflow.com/comment/40931221
has comment: http://stackoverflow.com/comment/40823821
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26057079
score: 1
answers question: http://stackoverflow.com/q/26057079
has comment: http://stackoverflow.com/comment/40824530
has comment: http://stackoverflow.com/comment/40889686
has body: Edit Updated to reflect a multi-column table with data from different parts of the JSON hierarchy. This is an attempt at parsing your rather complex JSON. For this example, d3.json has been removed because it is not using an external file, but you can add this back in if required and change tabulate(myJSON, ....; back to tabulate(data, ... E.g. d3.json('/api/data.json', function (error,data) { function tabulate(data, columns) { // etc etc as per snippet below } var columnFields = [ { id: "ID", key: "id" }, { id: "Interest", key: "interest" }, { id: "Loan Amount", key: "loan.amount" }, { id: "Code", key: "loan.grouploan[0].gl.groupoffice.code" }, { id: "Name", key: "loan.grouploan[0].gl.groupoffice.name" } ]; // render the table(s) var groupOfficeTable = tabulate(myJSON, columnFields); // multi column table }); Note that it retrieves the data by drilling down to .objects.loan.grouploan[0].gl.groupoffice. You will need to modify this code if there is more than one grouploan. var myJSON = { "meta" : { "limit" : 200, "next" : "/api/v1/loandcb/?limit=200&amp;offset=200", "offset" : 0, "previous" : null, "total_count" : 22374 }, "objects" : [{ "collections" : 0.0, "id" : 2081041, "interest" : 916.32, "loan" : { "amount" : 225000.0, "approval_date" : "2006-05-02T00:00:00", "grouploan" : [{ "gl" : { "go" : "C1030", "groupoffice" : { "code" : "C1030", "name" : "MANNARGUDI", "officeparent" : { "code" : "BN110", "name" : "MANNARGUDI", "officeparent" : { "code" : "TJR", "name" : "TANJORE", "officeparent" : { "code" : "CRP", "name" : "CORPORATE", "officeparent" : null, "oficecode" : null, "resource_uri" : "/api/v1/office/1/" }, "oficecode" : "CRP", "resource_uri" : "/api/v1/office/344/" }, "oficecode" : "TJR", "resource_uri" : "/api/v1/office/19/" }, "oficecode" : "BN110", "resource_uri" : "/api/v1/office/86/" }, "resource_uri" : "/api/v1/group/5190/" }, "id" : 1432, "last_modified_date" : "2013-04-14T12:42:39.951000", "resource_uri" : "/api/v1/grouploan/1432/" } ], "product" : …

http://stackoverflow.com/comment/40843047
has text: Yes - however, in this case, Im dealing with a stream (I don't have all the buffers up front)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26068249
score: 0

http://stackoverflow.com/comment/40788657
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26038906
has text: FYI: This works like a charm as long as I use HTTP Basic Authentication (the browser adds the header and the credentials as soon as available). However, I want to switch to OAuth...

http://stackoverflow.com/q/26189886
type: Question
tagged with: charts
accepted answer: http://stackoverflow.com/a/38214810
has comment: http://stackoverflow.com/comment/41068886
tagged with: javascript
has body: I would like to add annotations to an SVG bar chart written in D3. I want to add lines and text to the chart, like the below: My question is: is there a best practice for this or general pattern? My assumption would be to use a .each method following the data .enter() method. Using a conditional operator, should then be possible to call a function that inserts rendered line paths and text.
score: 4
upvote count: 4
answer count: 1
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
has title: Annotations with lines on D3 bar charts
has answer: http://stackoverflow.com/a/38214810
has comment: http://stackoverflow.com/comment/41099983
type: AnsweredQuestion

http://stackoverflow.com/comment/40925499
type: Comment
has text: listen to `navigate` event http://stackoverflow.com/a/18213393/1771795
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26113439

http://stackoverflow.com/comment/40926561
has text: please add the code or elaborate
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26114366
score: 0

http://stackoverflow.com/comment/40910675
type: Comment
comment on: http://stackoverflow.com/a/26063186
has text: Thanks, seems only support 2 y-axis.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41397791
comment on: http://stackoverflow.com/a/26252367
score: 0
type: AnswerComment
has text: ok, so i got the event bus of the component..var c = sap.ui.core.Component.getOwnerIdFor(this.getView()); var localEventBus = sap.ui.component(c).getEventBus(); localEventBus.publish("zPrApp","showHideApprovalButtons",{id:sButtonId}); And then in the other view controllerlocalEventBus.subscribe("zPrApp","showHideApprovalButtons", this.handleApprovalButtonsVisibility, this); This works fine on desktops, but fails in iPhone.Weird. The error on phones is Reject Button is undefined.this._oControlStore.oButtonListHelper.mButtons returns only the Approve Button..Any suggestions..
type: Comment

twilio
tag name: twilio
tags question: http://stackoverflow.com/q/26141528
type: Tag

http://stackoverflow.com/a/26049131
score: 0
has comment: http://stackoverflow.com/comment/40807851
answers question: http://stackoverflow.com/q/26048692
has body: Possible solution without table and with a little bit of JS to set the same height on each column. The .before and are here as a substitute of the :before (because it doesn't work on IE7) http://jsfiddle.net/OxyDesign/p3tv9n5m/ HTML content content content content content CSS .container { position:relative; } .cell{ width:33.3333333333333%; float:left; } .cell .before { width:0; height:100%; display:inline-block; vertical-align:middle; } .cell-content { display:inline-block; vertical-align:middle; } .cell-left{ text-align:left; background:#ccc; } .cell-center{ text-align:center; background:#ddd; } .cell-right{ text-align:right; background:#ccc; } JS $(document).ready(function(){ var cells = $('.cell'), cellsLgth = cells.length, maxHeight = 0; for(var i = 0; i < cellsLgth; i++){ var height = cells.eq(i).height(); if(height > maxHeight) maxHeight = height; } cells.css('height',maxHeight); });
type: Answer

http://stackoverflow.com/comment/40789665
type: AnswerComment
has text: I would probably not test this.. and just delete it instead
type: Comment
comment on: http://stackoverflow.com/a/26039471
score: 1

http://stackoverflow.com/a/26165581
type: Answer
score: 1
upvote count: 1
has body: You have JQuery so why aren't you using it to do this? $('#One1 img').hover(function(){ // get the parent element (#One1) with .parent() // and hide all p elements in it $(this).parent().find('p').hide(); }); This solution is more flexible, #One1 can also be a class which appears multiple times on the page with this solution.
answers question: http://stackoverflow.com/q/26165485
downvote count: 0

http://stackoverflow.com/comment/40835140
score: 0
type: Comment
type: QuestionComment
has text: @Bergi So, maybe I should be trying to figure out how to pass JSON data using the browser? Such as www.site.com/page.php?data=JSON_DATA
comment on: http://stackoverflow.com/q/26063959

http://stackoverflow.com/q/26039947
downvote count: 0
has body: I have a div that has a background video whos size is roughly 6mb. I want to show the entire page until that video finishes loading. I've seen in plenty websites, specially the ones of movies (recent ones) they have background video, and before they show the page, there's like a loading screen. How can I achieve this? I've been searching around but so far, no luck. Is there a specific name for this technique if you can call it like that?
has comment: http://stackoverflow.com/comment/40790893
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: css
has title: While background div with video finishes loading, show entire div with loading
score: 1
has answer: http://stackoverflow.com/a/26040214
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26040041
tagged with: jquery
tagged with: html5-video
has comment: http://stackoverflow.com/comment/40790953
answer count: 3
has answer: http://stackoverflow.com/a/26040828
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40951431
has text: `SubscriberService.updateSubscriberList` when called does **not** change the reference assigned in: `$scope.subscribers = SubscriberService.getSubscribers();`. A couple of options available here. The easiest (but imho the least elegant) would be to use an intermediate object e.g. `data.subscribers`.
type: QuestionComment
comment on: http://stackoverflow.com/q/26127194
score: 0
type: Comment

http://stackoverflow.com/q/26188461
has answer: http://stackoverflow.com/a/26190645
downvote count: 0
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26190645
tagged with: ember.js
has title: ember.js - How to setup a route with an optional ID for lookup, and fallback default model?
type: AnsweredQuestion
has body: I want to setup a route that can take an optional ID to lookup a model to use, while still supporting a default model if one isn't passed in? eg: /home/ /order/ /order/123 /order/123/shipping /someotherroute/ Is there a clean way to do this without using query string params?
score: 1
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/comment/40800975
comment on: http://stackoverflow.com/a/26042873
has text: Okey, that might be. But still, the URL I am requesting is not ISO-8859-1, it is UTF-8.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40987564
has text: But i would like to reduce object to object2 not only the "name" field
comment on: http://stackoverflow.com/a/26147621
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/40813529
has text: thanks, i updated..But i am not getting the values from b.php file
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26052357
type: AnswerComment

http://stackoverflow.com/comment/40987680
has text: The template uses isotope v1.5 and the fiddle uses isotope v2. This may be one reason for the fiddle working and the code not.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26143639
score: 0

object-literal
tag name: object-literal
type: Tag
tags question: http://stackoverflow.com/q/26185581

http://stackoverflow.com/q/26131720
has comment: http://stackoverflow.com/comment/40958843
has comment: http://stackoverflow.com/comment/40958743
has comment: http://stackoverflow.com/comment/40958720
answer count: 0
tagged with: twitter-bootstrap
score: 0
has comment: http://stackoverflow.com/comment/40960661
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40961962
has comment: http://stackoverflow.com/comment/40958730
has body: So I am currently trying to fill a form using jQuery based on saved information. Currently, I am doing this: $.each(form_data.form_data, function(name, val) { var $el = $('[name="' + val.name + '"]'); var type = $el.attr('type'); switch(type){ case 'checkbox': $el.attr('checked', 'checked'); break; case 'radio': $el.filter('[value="' + val.value + '"]').attr('checked', 'checked'); break; default: $el.val(val.value); } }); However, if the input field doesn't exist, I want to be able to copy the parent div and create a clone after the last div. The only time this would occur is if they dynamically created fields previously, so they would be in the format of something-example[0] and something-example[1] My idea was if I had something-example[2], then search for the input field without the square brackets so trying to match up something-example with something-example, and then clone that div. I am using Bootstrap if you want to get an understanding of the design of the page. This is an example of the form-group: Item Amount $ How would I go about taking care of this feature? Thanks!
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40958731
has title: jQuery Find Name Based On Form
has comment: http://stackoverflow.com/comment/40960720
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40958598

http://stackoverflow.com/comment/40842558
type: QuestionComment
has text: HTML is getting rendered from php file should i post this PHP file?
comment on: http://stackoverflow.com/q/26067927
score: 0
type: Comment

http://stackoverflow.com/q/26133593
type: UnansweredQuestion
score: 6
upvote count: 7
has comment: http://stackoverflow.com/comment/40962503
has comment: http://stackoverflow.com/comment/40961787
linked to: http://stackoverflow.com/q/280712
downvote count: 1
duplicate of: http://stackoverflow.com/q/280712
type: Question
has comment: http://stackoverflow.com/comment/40961909
has title: Using regex to match international/unicode alphanumeric characters in javascript?
has answer: http://stackoverflow.com/a/26135188
tagged with: javascript
has comment: http://stackoverflow.com/comment/40961944
tagged with: unicode
has body: I'm trying to use Javascript's string.match() function for a fairly simple task: extract all the words from a string and then count the number of occurrences of each word. The regular expression: /\w+/g works fine for this task except for the fact that it can't handle any sort of unicode/international characters. What's the best/cleanest way to be able to match accented characters, the Cyrillic alphabet, and any other major alphabets? If it happens to matter, I'm currently coding in a Node.js environment.
answer count: 1
tagged with: regex
favorite count: 0
has comment: http://stackoverflow.com/comment/40977210
linked to: http://stackoverflow.com/q/2998519
has comment: http://stackoverflow.com/comment/40963094

http://stackoverflow.com/q/26072273
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/40850412
type: Question
accepted answer: http://stackoverflow.com/a/26072287
has comment: http://stackoverflow.com/comment/40850460
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: Main.jsp View Orders Logout Login Controllers var myApp = angular.module('myApp', ['ngRoute']); ... // route for the default home page .when('/', { templateUrl : function($node, tattrs) { return "resources/html/home.html"; }, controller : 'mainController' }) // route for the order page .when('/order', { templateUrl : function($node, tattrs) { return "resources/html/order.html"; }, controller : 'orderController' }) .... myApp.controller('mainController', function($scope, $http) { .... $scope.isUserLoggedIn = true; //or false ..... Question: The $scope.isUserLoggedIn is having no effect on Login/Logout hrefs. The scope is probably not accessible on the main app page (i.e in the navbar in the ng-app page). I want to show hide the Login/Logout button conditionally. Any ideas?
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40850496
has title: AngularJS show login/logout button conditionally in navbar on app page
has answer: http://stackoverflow.com/a/26072287
score: 2

http://stackoverflow.com/comment/40931026
has text: as your clients might not use chrome, (maybe Firefox, IE, ...) you'd better use a cross-browser plug-in like jQuery. you can use html() to get innerhtml of objects. for the reference see: [jquery Documentation](http://api.jquery.com/html/)
type: AnswerComment
comment on: http://stackoverflow.com/a/26099974
type: Comment
score: 1

http://stackoverflow.com/a/26187510
score: 3
accepted answer of: http://stackoverflow.com/q/26187427
has comment: http://stackoverflow.com/comment/41063200
has comment: http://stackoverflow.com/comment/41063170
upvote count: 3
answers question: http://stackoverflow.com/q/26187427
has comment: http://stackoverflow.com/comment/41063037
has comment: http://stackoverflow.com/comment/41062254
type: AcceptedAnswer
downvote count: 0
has body: You can't do it like that, but you can set a promise value in query, and handle the callback in append: UnitTable.prototype = { query: function() { this.queryPromise = $.post('php.php', {func: "get"}); return this; }, append: function() { this.queryPromise.done(function(data) { $('#result').append(data); }); return this; } }; new UnitTable(options).query().append();
type: Answer
has comment: http://stackoverflow.com/comment/41062889

http://stackoverflow.com/q/26088015
has answer: http://stackoverflow.com/a/26088066
has answer: http://stackoverflow.com/a/26088077
tagged with: javascript
tagged with: jquery
downvote count: 0
has comment: http://stackoverflow.com/comment/40881566
favorite count: 0
accepted answer: http://stackoverflow.com/a/26088077
has title: Using $("[property=value]").click(), I want a delay between clicks
tagged with: http://stackoverflow.com/tag/html
answer count: 4
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40878959
has body: I am currently selecting all the buttons on a page. using the following code. $("button[data-capture=button123]").click(function(){ ...some code on click }); I end up clicking all the buttons at once, where as I would prefer clicking one at a time, using a delay between clicks.
upvote count: 1
has answer: http://stackoverflow.com/a/26088078
type: Question
has answer: http://stackoverflow.com/a/26088059
possible better answer: http://stackoverflow.com/a/26088066

http://stackoverflow.com/comment/97554564
type: AnswerComment
comment on: http://stackoverflow.com/a/26050234
has text: @JosueMarin In my comment above (https://stackoverflow.com/questions/26049855/javascript-time-counter-since-start-date-and-time/26050234#comment54717128_26050234), I described how you can make multiple timers with this. The main idea is that it takes a certain start timestamp and compares that to the current time. Looking at your posted question it looks like you’re starting with some calculated time difference already. I would suggest getting the starting timestamps from the database and output them as a JavaScript value as input for the timer.
score: 0
type: Comment

http://stackoverflow.com/q/26119961
score: 0
has comment: http://stackoverflow.com/comment/40936248
has body: I have gridview. In that gridview i have an Icon. if the icon is clicked then the bootstrap popover with textbox and two buttons will be opened. If i filled on that textbox of the popover and then i clicked outside of the popover, then the popover will be closed. and then again if i clicked that icon, the popover will be opened. but the textbox is not empty. the old value is place on that textbox. Can anyone say, how to empty bootstrap popover textbox, when the popover is opened? My code is: &lt;img src="Images/icon.png" data-title="Name" data-btnoklabel="Update" data-btncancellabel="Cancel" data-textbox="true" data-popout="true" runat="server" data-placement="left" data-toggle="confirmation-singleton" data-original-title="" /&gt;
answer count: 1
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40936609
has title: How to clear the content of textbox in bootstrap-confirmation.js popup?
tagged with: popover
has comment: http://stackoverflow.com/comment/40936070
type: Question
has comment: http://stackoverflow.com/comment/40936196
has comment: http://stackoverflow.com/comment/40936446
has comment: http://stackoverflow.com/comment/40936171
has answer: http://stackoverflow.com/a/26120107

http://stackoverflow.com/comment/40986804
comment on: http://stackoverflow.com/a/26147040
type: Comment
type: AnswerComment
has text: m42, sanity check means things are not complete rubbish, not that they are completely correct.
score: 0

http://stackoverflow.com/comment/40839358
has text: I mean, what order did you think they would be in?
score: 0
comment on: http://stackoverflow.com/q/26065915
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40945826
type: QuestionComment
type: Comment
has text: @joseleg it is because the ``data`` isnot known inside ``success`` function. you should define it before ``$.ajax`` and refer to it inside success function
score: 0
comment on: http://stackoverflow.com/q/26105267

http://stackoverflow.com/q/26063731
type: UnansweredQuestion
favorite count: 0
has comment: http://stackoverflow.com/comment/40834847
type: Question
has answer: http://stackoverflow.com/a/26441389
has comment: http://stackoverflow.com/comment/40834477
has body: working with a Lightswitch application and the UI is done in javascript. What I have is a list of attachments, anything from images to pdfs, spreadsheets and regular docs. What I would like to do is separate the images from the rest and wrap them in 'img' tags so they display as images instead of just file attachments. The postRender function looks like this for my list: myapp.ViewLesson.LessonAttachments_postRender = function (element, contentItem) { // Write code here. var re = /(?:\.([^.]+))?$/; var ext = re.exec(contentItem.value)[1]; if (ext = "jpg" || "png" || "bmp") { //wrap each item in '&lt;img&gt;" tags to display them as images } }; I tried to filter the extensions by using pieces from this: How to extract extension from filename string in Javascript? But it's not working
score: -1
downvote count: 1
answer count: 1
linked to: http://stackoverflow.com/q/680929
has comment: http://stackoverflow.com/comment/40835172
tagged with: visual-studio-lightswitch
has comment: http://stackoverflow.com/comment/40834863
upvote count: 0
has title: Display images from list of attachments
tagged with: javascript

http://stackoverflow.com/a/26096029
has body: Maybe you should define the isVoted-var in the controller. App.IndexController = Ember.ObjectController.extend({ //or get the initial value from somewhere voteUp: false, actions: { voteup: function(){ this.set('isVoted' , true); }, votedown: function(){ this.set('isVoted' , false); } } });
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26094799
has comment: http://stackoverflow.com/comment/40894091

http://stackoverflow.com/comment/41012158
comment on: http://stackoverflow.com/a/26160631
type: AnswerComment
score: 0
type: Comment
has text: you read my question?!!! i active select2 plugin with `.selectD` so if u remove this select2 not work !

http://stackoverflow.com/q/26090073
accepted answer: http://stackoverflow.com/a/26090180
tagged with: http://stackoverflow.com/tag/json
type: Question
type: AnsweredQuestion
tagged with: javascript
score: 0
has title: Navigating a JSON object
answer count: 1
tagged with: jquery
has body: total noob here: I've got a JSON result coming to a .on('click') function which looks like this: {"1411939719-8696.jpeg":true} I want to remove a line in a table, based on where the call came from, but for some reason it's not working: $('#fileupload').fileupload({ dataType: 'json', done: function (e, data) { $.each(data.result.files, function (index, file) { $('&lt;p/&gt;').text(file.name).appendTo(document.body); var del = $('&lt;button/&gt;') .addClass('btn btn-danger') .attr('data-type', 'DELETE') .attr('data-url', file.deleteUrl) .text('DELETE'); var thumb = $('&lt;img /&gt;', { id: file.thumbnailUrl+'_ID', src: file.thumbnailUrl, alt:'MyAlt'}); $('#preview').find('tbody') .append($('&lt;tr&gt;') .append($('&lt;td&gt;').append(thumb)) .append($('&lt;td&gt;').append(del)) ); }); } }); and the on click function is here: $(document).on("click", ".btn-danger", function () { $.ajax({ url: $(this).attr("data-url"), type: $(this).attr("data-type") }).done(function (result) { $(this).closest("tr").remove(); // to remove the complete row after delete success }); }); I need to remove the row that contains the delete button, along with the thumbnail image, but this code isn't working?
has answer: http://stackoverflow.com/a/26090180

http://stackoverflow.com/comment/40950538
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26127498
has text: I think this is the most "ajax" I've seen in one post in a while. Can't we just say "HTTP request" already? Please?
score: 1

http://stackoverflow.com/comment/40928757
type: QuestionComment
comment on: http://stackoverflow.com/q/26115586
score: 1
has text: I would check the values first by putting them into some variables and THEN perform the request, let me try with an answer below :)
type: Comment

http://stackoverflow.com/comment/41003851
has text: Thank you for the asnwer, i've used unminified library of angular as @Nikos Paraskevopoulos suggested and the error is gone. But if i keep the minified version your solution does not work for me. So minified shows unclear error, while the unminified does not produce it at all.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26156213

http://stackoverflow.com/a/52395328
answers question: http://stackoverflow.com/q/26145778
score: 1
upvote count: 3
downvote count: 2
type: Answer
has body: The http://username:password@example.com format is no longer supported by either IE or Chrome, wouldn't be surprised if others followed suit if they haven't already. (From T.J. Crowder comment here)
has comment: http://stackoverflow.com/comment/137423186

http://stackoverflow.com/a/26081618
score: 0
has comment: http://stackoverflow.com/comment/40878731
type: Answer
accepted answer of: http://stackoverflow.com/q/26080752
answers question: http://stackoverflow.com/q/26080752
has body: You need to change all points usage API. In KineticJS v5 points is array of numbers [x1, y1, x2, y2, ...]. So instead of points[1].x = bla; You have to write points[2] = bla;
has comment: http://stackoverflow.com/comment/40884283
type: AcceptedAnswer

http://stackoverflow.com/q/26159285
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26159430
type: AnsweredQuestion
has title: Opening HTML file with Internet Explorer
has body: Good Morning Everyone, I'm trying to open an HTML file with Internet Explorer (Please, don't mind the version, I've already tried with all of them). That HTML file uses javascript code to create a Google Map in a div, but every time I try to open it with Internet Explorer, the browser shows the following message: "Internet Explorer has stopped this page from running scripts or ActiveX controls that could access you computer." I've already tried to change the security and privacy options but the message is still showing. This is the javascript code I'm using right now: &lt;script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"&gt;&lt;/script&gt; &lt;script&gt; var directionsDisplay; var directionsService = new google.maps.DirectionsService(); function initialize() { directionsDisplay = new google.maps.DirectionsRenderer(); var mapOptions = { zoom: 12, center: new google.maps.LatLng(40.4889323, -3.6927295), mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); directionsDisplay.setMap(map); calcRoute(); } function calcRoute() { var start = new google.maps.LatLng(40.4889323, -3.6927295); var end = new google.maps.LatLng(40.5485301,-3.648655); var request = { origin: start, destination: end, waypoints: [ { location: new google.maps.LatLng(40.662707,-3.771187), stopover: true } ], travelMode: google.maps.TravelMode.DRIVING }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } }); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; I will be very grateful if someone can help me or give me some advice about it. Thank you very much in advance.
type: Question
has comment: http://stackoverflow.com/comment/41008961
accepted answer: http://stackoverflow.com/a/26159430
tagged with: internet-explorer
score: 0
tagged with: google-maps
answer count: 1

http://stackoverflow.com/a/26169051
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26167537
answers question: http://stackoverflow.com/q/26167537
has comment: http://stackoverflow.com/comment/41050123
has comment: http://stackoverflow.com/comment/41049780
has comment: http://stackoverflow.com/comment/41028578
type: AcceptedAnswer
downvote count: 0
has body: Bulk.find.upsert With the upsert option set to true, if no matching documents exist for the Bulk.find() condition, then the update or the replacement operation performs an insert. If a matching document does exist, then the update or replacement operation performs the specified update or replacement. But you will need to loop over your collection: var bulk = db.items.initializeUnorderedBulkOp(); myDocumnets.forEach(function(doc) { bulk.find({_id: doc._id}).upsert().replaceOne(doc); }); bulk.execute({w: 1, j: true}, function (err, result) { if (result.isOk()) { ... } More, or less, I am sorry I am not able to test it at the moment. I am also not able to say how it will behave on large amounts of documents. UPDATE I modified code, as suggested by Colin.
score: 1
has comment: http://stackoverflow.com/comment/41045793
has comment: http://stackoverflow.com/comment/41027792
has comment: http://stackoverflow.com/comment/41028260
has comment: http://stackoverflow.com/comment/41028457
has comment: http://stackoverflow.com/comment/41041022
type: Answer

http://stackoverflow.com/comment/40818657
comment on: http://stackoverflow.com/a/26055338
score: 0
type: AnswerComment
has text: A side note, this will target every `` on the page, even if they aren't module links. There aren't any in the posted code, but it's hard to believe there are none in the header/footer etc
type: Comment

http://stackoverflow.com/q/26076212
accepted answer: http://stackoverflow.com/a/26076328
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/5999209
has answer: http://stackoverflow.com/a/26076270
score: 1
has title: How to get a style value of an element - jQuery
favorite count: 0
has body: how to get the the value of background-color property if ($(this).css('background-color') == 'InfoBackground') { // it doesn't enter here }
duplicate of: http://stackoverflow.com/q/5999209
possible better answer: http://stackoverflow.com/a/26076270
answer count: 2
has comment: http://stackoverflow.com/comment/40857045
upvote count: 1
has comment: http://stackoverflow.com/comment/40857060
tagged with: css
tagged with: if-statement
has comment: http://stackoverflow.com/comment/40857046
has answer: http://stackoverflow.com/a/26076328
has comment: http://stackoverflow.com/comment/40857044
has comment: http://stackoverflow.com/comment/40857043
has comment: http://stackoverflow.com/comment/40857284
downvote count: 0
has comment: http://stackoverflow.com/comment/40857140
tagged with: javascript
tagged with: jquery
type: Question

http://stackoverflow.com/a/26050821
has comment: http://stackoverflow.com/comment/40853762
upvote count: 2
has comment: http://stackoverflow.com/comment/40847575
answers question: http://stackoverflow.com/q/26050668
has comment: http://stackoverflow.com/comment/40847295
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26050668
has body: You can do this by using the .toDataURL() method on the canvas element. And then apply this to the download attribute to an &lt;a&gt; tag. We can add an anchor tag around the image: &lt;a&gt; &lt;canvas width="300" height="300" id="canvas"&gt;&lt;/canvas&gt; &lt;/a&gt; Now for the clicking on the canvas, we adjust the download and href of the &lt;a&gt; parent: $('#canvas').click(function(){ $(this).parent().attr('href', document.getElementById('canvas').toDataURL()); $(this).parent().attr('download', "myPicture.png"); }); Here is an example
type: Answer
score: 2

http://stackoverflow.com/a/26177729
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26160759
has body: You have a couple of things wrong. e_mail: this.e_mail.value There is no email field. This throws an error and makes your form submit handler not prevent default. Btw - it may not be a good idea to store user info in LocalStorage like that.
downvote count: 0
type: Answer

http://stackoverflow.com/q/26111455
tagged with: parsing
favorite count: 0
tagged with: d3.js
type: UnansweredQuestion
score: 14
upvote count: 14
type: Question
has title: converting a d3.csv method to d3.csv.parse method
has answer: http://stackoverflow.com/a/26112005
downvote count: 0
answer count: 1
tagged with: javascript
has body: I just need to draw a d3 barchart of data retrieved from an sql query, so I don't have a tsv or csv file but a string of data in csv format. I know I can use d3.csv.parse method but somehow I couldn't figure out how to convert the example code for the csv bar chart using the data from a file to csv.parse method for data contained in a string variable. here is the example code for csv file: d3.csv("data.csv", type, function(error, data) { x.domain(data.map(function(d) { return d.letter; })); y.domain([0, d3.max(data, function(d) { return d.frequency; })]); here is the sample data for testing purposes and the code that doesn't work var bardata="letter,frequency\nA,0.89\nB,0.71\nC,0.45"; d3.csv.parse(bardata,type, function(data) { x.domain(data.map(function(d) { return d.letter; })); y.domain([0, d3.max(data, function(d) { return d.frequency; })]); Apparently, I cannot simply replace a file with a var containing the contents of the file. What would be the best way to do it? Many thanks
tagged with: http://stackoverflow.com/tag/csv

http://stackoverflow.com/comment/41088635
comment on: http://stackoverflow.com/a/26149216
has text: thanks! still some things not entirely clear. The creation of an object is done via literal expression or the `new` keyword, but the inheritance is done by `Object.create(Person.prototype)` or for example `jon=new Person()`? When would I prefer to use one method over the other?
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26096675
accepted answer: http://stackoverflow.com/a/26098099
type: AnsweredQuestion
tagged with: onclick
has title: Click on thumb shows large image
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26098099
answer count: 1
has body: I have a carousel slider, when I click on a thumb an image needs to be loaded in the large banner. How can I do this? It needs to be smooth, it shows a large image, when clicking on a thumb that thumb needs to fade-in over the existing image. But first I need to get it working thow. Example here New other example is here! script: $(document).ready(function() { $('.owl-carousel').owlCarousel({ loop: true, margin: 10, responsiveClass: true, responsive: { 0: { items: 2, nav: false }, 600: { items: 3, nav: false }, 1000: { items: 4, nav: false, loop: false, margin: 20 } } }) })
tagged with: carousel
has comment: http://stackoverflow.com/comment/40897074

http://stackoverflow.com/a/26184576
downvote count: 0
type: Answer
has body: Try destroying the previous one before creating new: $('#Population').dataTable().fnDestroy(); $('#Population').dataTable({ "data": usPopulation, "bJQueryUI":true, "columns": [ { "data": "Demographic" }, { "data": "Total" } ], }); or do like this: var table = $('#Population').dataTable({ "data": usPopulation, "bJQueryUI":true, "columns": [ { "data": "Demographic" }, { "data": "Total" } ], }); table.draw();
upvote count: 3
answers question: http://stackoverflow.com/q/26184530
accepted answer of: http://stackoverflow.com/q/26184530
score: 3
type: AcceptedAnswer

http://stackoverflow.com/a/26174945
answers question: http://stackoverflow.com/q/26174571
has comment: http://stackoverflow.com/comment/41041196
score: 0
type: Answer
has body: Opening the new window should contain a full URL. So something like this: var newwin = window.open('http://example.com/mydoc.php?'+filterstr,"_blank"); That should work. Or, you can make it shorter on the current domain like this: var newwin = window.open('/mydoc.php?'+filterstr,"_blank"); In your case the mysite.com is seen as a directory on the current domain, and not as a domain.
has comment: http://stackoverflow.com/comment/41040421
has comment: http://stackoverflow.com/comment/41039969

http://stackoverflow.com/comment/40929015
comment on: http://stackoverflow.com/a/26115690
has text: I updated the example page to reflect the suggest, and it doesn't work as expected. It will remove the option only after the button is clicked and then the page is refreshed.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26039660
has comment: http://stackoverflow.com/comment/40790875
tagged with: http://stackoverflow.com/tag/json
downvote count: 2
upvote count: 1
answer count: 1
has body: I've been trying for some time to read a local JSON file with pure Javascript (no JQuery). I searched the whole Google and Stackoverflow, but it seems that nothing works in my case. I know the JSON.parse, but how do I read the file in the first place on my Javascript? loadJSON(json){ var savedJSON = JSON.parse(json); alert(savedJSON[0].name); } The main idea is to have a server website to generate a JSON that has the user's saved information, and now I will read the JSON and generate a HTML with that information to use in a Android app, but I'm struggling at reading the JSON. Any idea?
linked to: http://stackoverflow.com/q/7346563
has comment: http://stackoverflow.com/comment/40790563
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26106781
has comment: http://stackoverflow.com/comment/40790032
tagged with: http://stackoverflow.com/tag/html
has title: Reading a local JSON to HTML with Javascript
favorite count: 0
score: -1
has comment: http://stackoverflow.com/comment/40913285
type: Question
has comment: http://stackoverflow.com/comment/40790089

http://stackoverflow.com/a/26179068
upvote count: 1
score: 1
has body: The issue why your code is not working is because in the second function colorbox, you have Secondary_key instead of Secondary_Key. Look at the capital K.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26178818

http://stackoverflow.com/q/26105699
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: datatables
accepted answer: http://stackoverflow.com/a/31627806
favorite count: 0
score: 2
has body: I've been using datatables for some time now, but I have only recently started working with IndexedDB. For the most part the two work together pretty nicely, however, I have run into a bit of a problem. What I want to do is load data from a local database, but not all at once. The reason is that it loads thousands of records which is quite slow. Instead, I would like to do with indexedDB what I have been doing server side- where I send over a chunk of records and a total count of how many records there actually are. DataTables is able to use those two peices of information to paginate correctly. However, this uses the fnAjaxSource option which takes a url. I need to to take a function that returns data somehow. I haven't found anyone doing quite the same thing. Currently I am using DataTables 1.9 for the project, however, I would be able to user 1.10 for this and similar pages if that is required. However, going through the API and documentation hasn't shown me any ways to tell DataTables to expect more records than it receives. If there is any other information you need from me please let me know, but I can't really post an example since I don't know what I'm doing. I'm hoping there's an easy option, or some way I could write a plug in that does this, but I haven't seen anything that gives me hope. I have asked the question similarly on the DataTables forum here. I should clarify that I am not having issues with IndexedDB really. I am loading my data in chunks just fine, as well as getting the count of the total number of records that fulfill my search criteria. The problem is with DataTables wanting all the data, not just a chunk in order to know how many records will exist and how to do the pagination.
upvote count: 2
has answer: http://stackoverflow.com/a/26119494
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26119494
tagged with: indexeddb
has comment: http://stackoverflow.com/comment/51203000
has title: Client side lazy loading into DataTables jquery plugin from IndexedDB
has answer: http://stackoverflow.com/a/31627806

http://stackoverflow.com/comment/40893777
has text: @VladimirŠtus can you reproduce the problem using jsfiddle or code snippets
type: AnswerComment
comment on: http://stackoverflow.com/a/26059080
score: 0
type: Comment

http://stackoverflow.com/a/26093752
answers question: http://stackoverflow.com/q/26093196
has body: m becomes double in your code. All numbers are represented as doubles internally in JS. Should be truncated to int, I guess? The following code seems to work. function CeilIndex(A, l, r, key) { var m; while( r - l &gt; 1 ) { m = Math.floor(l + (r - l)/2); if (A[m] &gt;= key) { r = m; } else { l = m; } } return r; }
has comment: http://stackoverflow.com/comment/40892033
has comment: http://stackoverflow.com/comment/40891896
has comment: http://stackoverflow.com/comment/40892974
score: 0
has comment: http://stackoverflow.com/comment/40891657
has comment: http://stackoverflow.com/comment/40893315
has comment: http://stackoverflow.com/comment/40893346
type: Answer
has comment: http://stackoverflow.com/comment/40891802
has comment: http://stackoverflow.com/comment/40893124

http://stackoverflow.com/a/26035895
accepted answer of: http://stackoverflow.com/q/26035525
downvote count: 0
answers question: http://stackoverflow.com/q/26035525
upvote count: 2
has comment: http://stackoverflow.com/comment/40785820
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/40783292
has comment: http://stackoverflow.com/comment/40783190
has comment: http://stackoverflow.com/comment/40783724
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40783835
has comment: http://stackoverflow.com/comment/40785374
has body: From what I can see you are using 1 model and 1 view but you want them to act independently. So when you click span2 you are still setting the same model which is why they both change. For this i would use seperate model and seperate views for the both spans like this var model = new Backbone.Model({ "text": "span1" }); var model2 = new Backbone.Model({ "text": "span2" }); var View = Backbone.View.extend({ initialize: function () { // If the model's text changes, update the view this.model.on("change:text", function (model, text, options) { if (text != this.$el.text()) { this.$el.text(text); } }, this); } }); var view1 = new View({ model: model, el: $("#input") }); var view2 = new View({ model: model2, el: $("#input2") }); then register your other model in the undo register // Now: The undo/redo part var undoManager = new Backbone.UndoManager; undoManager.register(model); undoManager.register(model2); undoManager.startTracking(); and finally change your click handler on span2 to edit the new model $("#input2").on("click", function () { var element = document.getElementById("input2"); element.innerHTML = prompt("#input2", element.innerHTML); model2.set("text", $("#input2").text()); }) here is a fiddle with it all together You can also be taking advantage of backbone more by having your view handle the events rather that doing this outside. here is an example var View = Backbone.View.extend({ initialize: function () { // If the model's text changes, update the view this.model.on("change:text", function (model, text, options) { if (text != this.$el.text()) { this.$el.text(text); } }, this); }, events: { 'click': 'editValue' }, editValue: function () { var data = prompt("#input2", this.model.get("text")); if(data) { this.model.set("text", data); } } }); now the view handles this change to the model and we also don;t have to get data from the html we keep it in the model at all times. here is an updated fiddle showing this technique http://fiddle.jshell.net/leighking2/2v…

http://stackoverflow.com/q/26139407
has title: How to encode a String in Angularjs?
upvote count: 6
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/26139444
accepted answer: http://stackoverflow.com/a/26139444
has comment: http://stackoverflow.com/comment/40975081
linked to: http://stackoverflow.com/q/16630471
favorite count: 0
has body: I use Angularjs to send a get http request to my server. The server respond to rest request using Spring MVC. Here a snippet code on my angular url building : var name="myname"; var query= "wo?d"; var url = "/search/"+query+"/"+name; Here Spring MVC Controller : @RequestMapping( value = "/search/{query}/{name}" , method = RequestMethod.GET , produces = MediaType.APPLICATION_JSON_VALUE ) @ResponseBody public List&lt;Data&gt; search() { // search logic return data; } I have the problem when the query contains question mark character ( ? ). The url is split so that Spring responds : WARN o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/my-server/web/search/wo in DispatcherServlet with name 'mvc' This is right because the question marks ? introduce the begining of request parameters. I've tried to use the js function encodeURI(query) but the question mark character is not encoded. How to encode a question mark in url ? Thanks
tagged with: angularjs
score: 6
possible better answer: http://stackoverflow.com/a/26139588
tagged with: spring
tagged with: spring-mvc
has answer: http://stackoverflow.com/a/26139588
type: AnsweredQuestion
downvote count: 0
tagged with: java
type: Question

http://stackoverflow.com/q/26171629
answer count: 0
score: 1
has body: I recently saw an example of how requirejs bundles work(http://vimeo.com/97519516) and got excited. So I'm trying to get the bundling feature to work with my setup and am banging my head on the wall. Troubleshooting done so far. The main.js file will be created properly without bundling and defining the comp1 component in the main.js top depenendecy. But when I nest the comp1 dependency and add the bundling options the page1 and page2 bundle never gets created. So it doesn't seem to be an issue with the rest of the configuration. I have also tried this a few different ways. Removing the module and and putting everything in the root of the config. Moving the bundles to the all-config.js. Any ideas on what I could be doing wrong. all-config.js (function() { if (typeof requirejs != 'function') { requirejs = function(config) { requirejs = config; }; } requirejs({ pathes: { comp1: "path1", comp2: "path2, router: "path3" } }); build.json { "baseUrl": "./", "appDir": "../src/main/webapp", "dir": "build", "mainConfigFile": "app/all-config.js", modules: [ { "include": [ "app/lib/require/require.js" ], bundles":{ "page1" : ["comp1"], "page2" : ["comp2"] } } ] } main.js require(['jquery', 'router'],function($){ //load app require(["comp1"],function(comp1){ var app = new comp1(); }); }); Gruntfile module.exports = function(grunt){ var stripper = require('strip-json-comments'); var buildOptionsFile = grunt.file.read( 'build.json' ); var buildOptions = JSON.parse(stripper(buildOptionsFile) ); grunt.initConfig({ requirejs: { compile: { options: buildOptions } } }); ..... }; Any ideas on how to get this to work?
type: Question
downvote count: 0
tagged with: javascript
tagged with: bundling-and-minification
favorite count: 0
type: UnansweredQuestion
tagged with: requirejs
upvote count: 1
has title: RequireJs bundling with modules

http://stackoverflow.com/a/26087470
has body: This is because you are hiding the mismatched &lt;div&gt;s only when the value of &lt;select&gt; changes. Which does not occur by default when the page loads. You can manually trigger a change event on the &lt;select&gt; using the trigger() method after page load to run your script as follows: $(document).ready(function(){ $('.form-control').change(function(){ var make = $(this).val(); if(make != 'make-any'){ $('.makes').hide(); $('.'+make).show(); } else { $('.makes').show(); } }); $('.form-control').trigger("change"); });
type: Answer
has comment: http://stackoverflow.com/comment/40878490
has comment: http://stackoverflow.com/comment/40878662
accepted answer of: http://stackoverflow.com/q/26087407
has comment: http://stackoverflow.com/comment/40878410
score: 0
answers question: http://stackoverflow.com/q/26087407
has comment: http://stackoverflow.com/comment/40878545
has comment: http://stackoverflow.com/comment/40878272
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40878061
has comment: http://stackoverflow.com/comment/40878153

http://stackoverflow.com/a/26184001
score: 1
accepted answer of: http://stackoverflow.com/q/26183238
answers question: http://stackoverflow.com/q/26183238
upvote count: 1
type: AcceptedAnswer
has body: In js/aggregate-ck.js, you have this function that gets the img src and sets it as a background-image: _transferImages = function(selector){ var $selector=$(selector); $selector=$selector.not($_transferredImages); $selector.each(function(){ var $this=$(this), $img=$this.children("img"), $img1; if($img.length){ $img1=$img.eq(0); $this.css({"background-image":"url('"+ $img1.attr("src")+"')"}); $img1.remove(); } }); $_transferredImages=$_transferredImages.add($selector); return $selector; }; When I use a desktop user agent, it works fine because the images have an src attribute. Unfortunately, with a mobile user agent, these images do not have an src, but a data-cfsrc attribute. To correct this function, replace $img1.attr("src") with ($img1.attr("src") || $img1.attr("data-cfsrc")) and you're good to go!
type: Answer
has comment: http://stackoverflow.com/comment/41061612
downvote count: 0
has comment: http://stackoverflow.com/comment/41059026

http://stackoverflow.com/comment/42726220
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27091567
has text: You are a good man! Thank you. This has been on hold since this was posted a few months back so I appreciate the help. On another note, when all the cards are showing face up after clicking the show all button, is there a better way of writing my singular hover and click function so when you hovered over the individual cards it didn't flip them back?

http://stackoverflow.com/comment/40834391
has text: @nnnnnn Just what I needed to resolve against. The vagueness of the selectors is what I needed in this instance.
comment on: http://stackoverflow.com/q/26061409
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/50651260
has comment: http://stackoverflow.com/comment/106721598
type: Answer
downvote count: 0
score: 1
has body: I really liked the answer from ChrisV, once I understood it. I really struggled to get there from here. Please consider this a supporting comment to the answers above. I will say my use case was a tiny bit different. I'm using Express and I wanted to set the checkbox from a route. It wasn't totally clear to me how to call the helper function. Obviously, I'm using two different radio button groupings. In app.js, where I initially setup the view engine var hbs = require('hbs'); hbs.registerPartials(__dirname + '/views/partials'); hbs.registerHelper('checked', function (value, test) { if (value == undefined) return ''; return value == test ? 'checked' : ''; }); app.set('view engine', 'hbs'); I set the route in index.js var express = require('express'); var router = express.Router(); router.get('/display_form', function (req, res, next) { //... play with data. use req.query.optionsRadiosA, etc... // var outputA = "video" res.render('formpage', { title: 'Setup Page', optionsRadiosA: outputA, // use variable optionsRadiosB: 'Audio' // or use string }); }); and finally, my template, formpage.hbs (extract shown...) {{title}} Channel A Setup Video Audio Channel B Setup Video Audio
answers question: http://stackoverflow.com/q/26066768
upvote count: 1

http://stackoverflow.com/comment/40945689
has text: Yes, but I have marked as right answer. I just want do those things **automatically**.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26124452
type: Comment

http://stackoverflow.com/comment/40881430
comment on: http://stackoverflow.com/a/26089097
type: AnswerComment
score: 0
type: Comment
has text: Edited my answer with tested solution.

http://stackoverflow.com/comment/40912628
type: QuestionComment
type: Comment
has text: Just so you know, when scrolling down the top of the rectangles go negative, so its never > 0. And problem is using each and then removing an element, causes trouble. You should traverse in inverse order: `for(var index=innerItems.length-1;index>=0;index--){`
comment on: http://stackoverflow.com/q/26106220
score: 0

http://stackoverflow.com/a/26164732
accepted answer of: http://stackoverflow.com/q/26164661
score: 4
type: AcceptedAnswer
type: Answer
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/26164661
has body: You can do that: if($('#container &gt; div:first').attr('id') == 'banner') { //banner exists } else { //banner not exists }

http://stackoverflow.com/q/26171373
downvote count: 3
type: Question
accepted answer: http://stackoverflow.com/a/26182174
upvote count: 0
has comment: http://stackoverflow.com/comment/41032104
tagged with: javascript
score: -3
answer count: 1
has body: My question was phrased horribly, I'm sorry. So what I wanna do is to go into the createNewCourseScreen, enter the name and set the color and press the create button, and the button created will pop up under the other buttons in the coursesScreen. I'm a meganoob in titanium and need your help! Screens coursesScreen: http://s30.postimg.org/do1jrlrrl/courses.png newCourseScreen: http://s29.postimg.org/7c15cxnon/newcourse.png
favorite count: 0
tagged with: appcelerator
has answer: http://stackoverflow.com/a/26182174
tagged with: titanium
has title: How to create a button through the press of another button in Titanium Appcelerator?
type: AnsweredQuestion

http://stackoverflow.com/comment/40890951
score: 0
type: Comment
type: QuestionComment
has text: Previously it was giving me a 404 error, but now I've updated to (presumably) the correct path, and console.log(dataset) is returning 'undefined'. Do you know how I might debug that one?
comment on: http://stackoverflow.com/q/26093450

http://stackoverflow.com/q/26095595
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/26095669
has answer: http://stackoverflow.com/a/26095679
accepted answer: http://stackoverflow.com/a/26095669
has title: + and - should be having the different precedence in Angular?
tagged with: angularjs
upvote count: 1
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/26095736
has answer: http://stackoverflow.com/a/26095736
type: Question
has body: Just started with Angular, and I have the following code: This is your first angular expression {{1 +- 2}} running in this code in the browser gives me the o/p: This is your first angular expression -1 How come - is taking place instead of +. In fact I was expecting a error at runtime, but that doesn't. Even though the expression is changed to : {{1 -+ 2}} results in -1. + and - aren't having the same precedence? Edit: Given the expression {{1 -% 2}} gives me an error: Error: Syntax Error: Token '2' is an unexpected token at column 6 of the expression [1 -% 2] starting at [2]. at Error (<anonymous>) at throwError (http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js:5913:11) at parser (http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js:5907:5) at http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js:6470:29 at $interpolate (http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js:4807:27) at addTextInterpolateDirective (http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js:4436:27) at collectDirectives (http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js:3933:11) at compileNodes (http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js:3816:22) at compileNodes (http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js:3824:15) at compileNodes (http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js:3824:15) This leaves to me the question, how come +- or -+ is working fine.
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41002013
type: AnswerComment
has text: [why document.write is bad practise](http://stackoverflow.com/questions/802854/why-is-document-write-considered-a-bad-practice).
comment on: http://stackoverflow.com/a/26155416
type: Comment
score: 0

http://stackoverflow.com/q/26181089
type: Question
answer count: 2
tagged with: push
tagged with: javascript
has body: i am trying to make a eCommerce shop with angular and code is as follow var shopApp = angular.module('shopApp', ["slugifier"], function() {}); controllers.productController = function($scope,FetchFactory) { $scope.fetchProducts = function(offset) { FetchFactory.items.fetchItems(offset).then(function(data){ $scope.products = data; }); } var activeAttrValue = 0; var activeAttrUnit = 0; var activeAttrId = 0; $scope.add_to_cart() = function(index){ var newProd = []; newProd = $scope.products[index]; // $scope.products have products json newProd.quantity = 1; newProd.attr_id = activeAttrId; newProd.attr_value = activeAttrValue; newProd.attr_unit = activeAttrUnit; $scope.cartProducts.itemlist.push(newProd); $scope.cartProducts.total_items++; $scope.cartProducts.total_price += parseInt(newProd.price); } } shopApp.controller(controllers); i have a made a factory which will return me products json after a ajax request and using ng-repeat as "product in products" i am displaying all the products in my html and i have make a shopping cart where the products that are added to cart are being displayed by ng-repeat of "cartProduct in cartProducts.itemlist track by $index" products have attributes like color,size,weight etc. whenever a attribute is clicked its value(like weight) and unit(kg) are store in a global variables activeAttrValue,activeAttrUnit and if add to cart is clicked they are stored in cartProducts. Problem: In case of multiple attributes. when one attribute is selected added to cart, and again another attribute of same product is selected and added to cart.ideally they should add to cart as two products but instead last added product and attributes only adds and in console gives a error Error: [ngRepeat:dupes] http://errors.angularjs.org/1.2.16/ngRepeat/dupes?p0=cartProduct%20in%20cartProducts.itemlist&amp;p1=object%3A006 when i tried console.log($scope.cartProducts.itemlist); i got this Object $$hashKey: "005" attr_id: "3" attr_unit: "" attr_value: "blue" , Objec…
upvote count: 1
linked to: http://stackoverflow.com/q/26152576
has comment: http://stackoverflow.com/comment/41052064
has comment: http://stackoverflow.com/comment/41052669
tagged with: angularjs-ng-repeat
favorite count: 0
has comment: http://stackoverflow.com/comment/41052104
has answer: http://stackoverflow.com/a/26181207
has comment: http://stackoverflow.com/comment/41052393
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41055533
has answer: http://stackoverflow.com/a/26181208
has comment: http://stackoverflow.com/comment/41051970
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41054957
has comment: http://stackoverflow.com/comment/41052317
has comment: http://stackoverflow.com/comment/41055137
downvote count: 0
has comment: http://stackoverflow.com/comment/41052571
score: 1
has title: using push function in angular js

runtime-error
tags question: http://stackoverflow.com/q/26120162
tag name: runtime-error
type: Tag
tags question: http://stackoverflow.com/q/26116789

http://stackoverflow.com/a/26086057
has comment: http://stackoverflow.com/comment/40877273
upvote count: 1
has body: You can use jQuery to do something like : $('#block').css({ background: "-webkit-gradient(linear, left top, left bottom, from($colour_start), to($colour_end))" }); And call this every time the client change the color of start or end.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40877233
type: Answer
has comment: http://stackoverflow.com/comment/40876371
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26086007
has comment: http://stackoverflow.com/comment/40876413
answers question: http://stackoverflow.com/q/26086007
score: 1

http://stackoverflow.com/a/26181428
has comment: http://stackoverflow.com/comment/41054815
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41052637
has comment: http://stackoverflow.com/comment/41053228
accepted answer of: http://stackoverflow.com/q/26181365
type: Answer
has comment: http://stackoverflow.com/comment/41053687
answers question: http://stackoverflow.com/q/26181365
has comment: http://stackoverflow.com/comment/41053272
has comment: http://stackoverflow.com/comment/41053391
has comment: http://stackoverflow.com/comment/41054594
has comment: http://stackoverflow.com/comment/41052750
has comment: http://stackoverflow.com/comment/41052692
has comment: http://stackoverflow.com/comment/41053604
has comment: http://stackoverflow.com/comment/41052818
has body: Your syntax of using regex using RegExp constructor is wrong. Your regex can be simplified to: var pattern2 = /^\(?\d{3}\)?[-\s.]?\d{3}[-\s.]?\d{4}$/;
has comment: http://stackoverflow.com/comment/41053116
score: 0

http://stackoverflow.com/a/26059556
score: 1
has body: You're not passing actual data as the parameters, you're passing a function: data: function (term, page) { return { id: '123', filter: term }; } Unless something invokes that function, the result will never be evaluated. Generally one would just pass data by itself: data: { id: '123', filter: term } If, however, in your code there's a particular reason (not shown in the example) to use a function, you'll want to evaluate that function in order for the resulting value to be set as the data: data: (function (term, page) { return { id: '123', filter: term }; })() However, these errors also imply a second problem, probably related to however you're trying to debug this: The name 'id' does not exist in the current context The name 'filter' does not exist in the current context Even if no values were being passed, id and filter still exist in the scope of the action method. They may be null or empty strings, but the variables exist. It's not clear where you're seeing that error, but it's definitely not in the scope of the action method.
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26059477
answers question: http://stackoverflow.com/q/26059477
upvote count: 1

http://stackoverflow.com/comment/40829847
comment on: http://stackoverflow.com/a/26061371
has text: You _can,_ but why would you?
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/26127082
answers question: http://stackoverflow.com/q/26126960
type: Answer
score: 0
has body: You can use scrollTo jQuery plugin: http://demos.flesler.com/jquery/scrollTo/ and repeat a function using setTimeout(function(){ $.scrollTo('#element'); }, 5000);

http://stackoverflow.com/comment/41007463
type: AnswerComment
type: Comment
has text: @Ctrl_Alt_Defeat then take a look at mentioned [$.Deferred](http://api.jquery.com/category/deferred-object/) or send `callback` function as second parameter to `loadCofirmAlert` as jevgenig has suggested.
comment on: http://stackoverflow.com/a/26158496
score: 0

http://stackoverflow.com/comment/40815124
comment on: http://stackoverflow.com/q/26051568
has text: consider i have table with 3 rows when popup opens and fill some values then the table row is increased to 3 to 4 like wise..
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40920943
score: 3
has text: I would say: when it's actually called.
comment on: http://stackoverflow.com/q/26111118
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40947897
type: QuestionComment
comment on: http://stackoverflow.com/q/26115906
score: 0
type: Comment
has text: That means I would have to somehow keep track of the coordinates. Looping through all the nodes would be slow. I'm thinking a tree structure?

http://stackoverflow.com/comment/40858512
has text: No server = no accounts. Accounts are not a property of web pages, they're part of online services, which require online SERVERS and therefore databases to store this information.
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26076989
type: QuestionComment

http://stackoverflow.com/q/26167161
linked to: http://stackoverflow.com/q/6068348
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26171337
tagged with: asp.net
has title: Acting on the rows in a gridview based on a checkbox field
type: AnsweredQuestion
has body: I have a GridView, where the first field is a checkbox. I want to take action client-side (show or hide rows) depending on the state of the checkboxes. Thanks to my previous StOf posting, I have a RadioButtonList properly firing my Javascript. Now it's a matter of obtaining a reference to the appropriate rows. I have relied on several questions and answers to build my current Javascript: $(function () { $("#RadioButtonList1 input[id^=Radio]").click(function () { var grd = $("#my_gridview"); var rows = $("#my_gridview tr:gt(0)"); switch (this.value) { case "All": { $("#my_gridview tr").show(); } case "HideRequested": { var rowToShow = rows.find("td:eq(0)").filter(checked != "checked"); rows.show().not(rowToShow).hide(); } case "ShowRequested": { var rowToShow = rows.find("td:eq(0)").filter(checked == "checked"); rows.show().not(rowToShow).hide(); } } }) }); But when I run this, I get an error in the JS console: ReferenceError: checked is not defined. Which is odd, because it works in the other questions, and the generated HTML (as confirmed in the console) includes the checked property in the input element. The HTML is: Select Entry Entry Name Type Details Entry 1 Foo Assorted text. Entry 2 Bar Assorted text. Entry 3 Baz Assorted text. I have also tried: var checkboxArray = $('#my_gridview td input:checkbox'); Which did produce an array of the checkbox elements, but I still couldn't figure out how to correctly filter for the checked property nor how to get back to the governing tr element. Sources: https://stackoverflow.com/a/6013026/2615836 https://stackoverflow.com/a/6068768/2615836
accepted answer: http://stackoverflow.com/a/26171337
linked to: http://stackoverflow.com/q/6013009
linked to: http://stackoverflow.com/q/26147838
type: Question

http://stackoverflow.com/a/26130652
has comment: http://stackoverflow.com/comment/40956863
has comment: http://stackoverflow.com/comment/40956869
accepted answer of: http://stackoverflow.com/q/26130579
score: -2
has comment: http://stackoverflow.com/comment/40957290
has comment: http://stackoverflow.com/comment/40956920
has comment: http://stackoverflow.com/comment/40956899
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40956878
answers question: http://stackoverflow.com/q/26130579
has comment: http://stackoverflow.com/comment/40957247
has comment: http://stackoverflow.com/comment/40956765
type: Answer
has body: Or just with a pure javascript: $('img').click(function () { document.getElementById("shikh_sec").disabled = true; });
has comment: http://stackoverflow.com/comment/40957440
downvote count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/40957511

http://stackoverflow.com/comment/40845652
type: QuestionComment
comment on: http://stackoverflow.com/q/26069428
score: 0
has text: I don't really have an explanation. I just recognized those symptoms, and that command was the only candidate I saw for being a possible source of extraneous output.
type: Comment

http://stackoverflow.com/comment/40868171
type: Comment
comment on: http://stackoverflow.com/q/26082005
score: 0
has text: if it so then why it is accepting and get entered $packages in database.? Please clear this confusion
type: QuestionComment

http://stackoverflow.com/comment/40889344
type: Comment
type: QuestionComment
has text: where is `_alphabetSearch` variable defined? can you please reproduce this on jsfiddle?
comment on: http://stackoverflow.com/q/26093511
score: 0

http://stackoverflow.com/a/26252367
has body: First, you should use sId instead id when defining HeaderFooterOptions, you can get the footer buttons by sId, for example, the Approve button. this._oControlStore.oButtonListHelper.mButtons["btn_approve"] Please check the following code snippet: S2.view.controller: You have a filter event handler defined following and use EventBus to publish event OrderTypeChanged to S3.view.controller. onFilterChanged: function(oEvent) { // Set the filter value, here i use hard code var sFilter = "Past Orders"; sap.ui.getCore().getEventBus().publish("app", "OrderTypeChanged", { filter: sFilter }); } S3.view.controller: Subscribe event OrderTypeChanged from S2.view.controller. onInit: function() { /// var bus = sap.ui.getCore().getEventBus(); bus.subscribe("app", "OrderTypeChanged", this.handleOrderTypeChanged, this); }, getHeaderFooterOptions: function() { var oOptions = { oPositiveAction: { sI18nBtnTxt: that.resourceBundle.getText("XBUT_APPROVE"), sId: "btn_approve", onBtnPressed: jQuery.proxy(that.handleApprove, that) }, oNegativeAction: { sI18nBtnTxt: that.resourceBundle.getText("XBUT_REJECT"), sId: "btn_reject", onBtnPressed: jQuery.proxy(that.handleReject, that) } }; return oOptions; }, handleOrderTypeChanged: function(channelId, eventId, data) { if (data &amp;&amp; data.filter) { var sFilter = data.filter; if (sFilter == "Past Orders") { this._oControlStore.oButtonListHelper.mButtons["btn_approve"].setVisible(false); } //set Approve/Reject button visible/invisible based on other values //else if(sFilter == "Other Filter") } }
has comment: http://stackoverflow.com/comment/41397791
has comment: http://stackoverflow.com/comment/43306234
type: Answer
has comment: http://stackoverflow.com/comment/41406712
has comment: http://stackoverflow.com/comment/41460732
answers question: http://stackoverflow.com/q/26144794
downvote count: 1
score: -1
has comment: http://stackoverflow.com/comment/41393509
upvote count: 0
has comment: http://stackoverflow.com/comment/48414222
has comment: http://stackoverflow.com/comment/41432912

http://stackoverflow.com/comment/40986860
has text: Where are you trying to get `listFilter` from? it isn't defined in the controller and isn't being returned by the service (and thus is unusable)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26146821

http://stackoverflow.com/q/26145489
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/26147818
answer count: 1
downvote count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26147818
favorite count: 0
has comment: http://stackoverflow.com/comment/40983569
has title: Table created with php array. How do i get each individual value using jquery?
tagged with: php
has comment: http://stackoverflow.com/comment/40983548
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40983528
upvote count: 0
has body: Ok, so I have a page that users upload docs from. I put them in a folder and then update a table to show where these docs live. Now, when I go to an edit page I query that database using PHP and echo the location of those files. I'm trying to figure out a way to delete files. I know I need to unlink, but the problem I'm having is I can't seem to figure out how to get the location of each individual file. Here is the code I'm using to get the file locations. &lt;?php $sql = 'select trnum, trseq, trfnam, trfloc, podnum from bd.bdvdocs where trnum = ' . $_GET['trnum']; $result = db2_exec($conn, $sql); if ($result) { while ($row = db2_fetch_array($result)) { echo"&lt;tr&gt;"; echo "&lt;td&gt;&lt;a href='" . $row[3] . $row[0] . '/' . $row[2] . "'&gt;$row[2]&lt;/a&gt; &lt;/td&gt;"; echo"&lt;/tr&gt;"; } } ?&gt; If I add a button to the right of each link and use jquery to get var, it only comes back with the value of the first link. If I click on the second button the page bombs out.
type: Question

http://stackoverflow.com/comment/40880924
score: 0
comment on: http://stackoverflow.com/q/26083893
type: Comment
type: QuestionComment
has text: pls update your tags. Add actionscript, javascript ...

http://stackoverflow.com/q/26046398
has comment: http://stackoverflow.com/comment/40803298
tagged with: forms
type: Question
answer count: 2
tagged with: textarea
possible better answer: http://stackoverflow.com/a/26046438
has comment: http://stackoverflow.com/comment/40803140
has answer: http://stackoverflow.com/a/26046830
has comment: http://stackoverflow.com/comment/40802842
tagged with: javascript
score: 0
tagged with: focus
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40802939
has answer: http://stackoverflow.com/a/26046438
type: AnsweredQuestion
has title: Textarea did not focus but submit instead
accepted answer: http://stackoverflow.com/a/26046830
has body: I have a textarea which catch the keyphrase of characters' count. I also have a javascript codes in mine which return false if the textarea have no character typed in the field at all or at least 20 chars. This is my scripts: Javascript function CheckLength() { var msg_area = document.getElementById("error2"); msg_area.innerHTML = ""; if (document.getElementById("staf_address").value.length < 20) { document.getElementById("error1").className = "par control-group error"; document.getElementById("staf_address").focus();​ msg_area.innerHTML = "YOU DID NOT ENTER ENOUGH INFORMATION"; return false; } else document.getElementById("addstaf").submit(); } HTML Address Next There is no problem at all, at the beginning. The textarea will be not submitted if the characters in id=staf_address are less than 20 chars. The error will be displayed on id=error2. So, the textarea and the form work fine, no problem. The thing is that, it doesn't focus on text area during the form is submitted (if the textarea is less than 20 chars). So, I add a line of codes that is this line: document.getElementById("staf_address").focus();​ After that, here comes the problem. The document won't check my javascript instead it submit the form eventhough the textarea only have 1 char. How to solve this? Need just a plain javascript only.

http://stackoverflow.com/q/26035370
possible better answer: http://stackoverflow.com/a/26035408
has answer: http://stackoverflow.com/a/26035408
has answer: http://stackoverflow.com/a/26035412
type: AnsweredQuestion
tagged with: leaflet
tagged with: loops
type: Question
has title: Javascript: looping through an array of objects that hold arrays
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26035412
has body: In leaflet, I made a function that takes an array holding objects that each hold an array of markers and an ID to identify the group. I have this array: var markerGroupArray = [ { features: [L.marker([39.61, -105.02]).bindPopup('This is Littleton, CO.'), L.marker([39.74, -104.99]).bindPopup('This is Denver, CO.'), L.marker([39.73, -104.8]).bindPopup('This is Aurora, CO.'), L.marker([39.77, -105.23]).bindPopup('This is Golden, CO.')], id: 'Group 1'}, { features: [L.marker([39.51, -105.02]).bindPopup('Somewhere else'), L.marker([39.64, -104.99]).bindPopup('Somewhere else'), L.marker([39.63, -104.8]).bindPopup('Somewhere else'), L.marker([39.67, -105.23]).bindPopup('Somewhere else')], id: 'Group 2'} ]; Which I feed to this function: addOverlayMap: function (overlayMapArray) { for (var i = 0; i &lt; overlayMapArray.length; i++) { var layerGroup = L.layerGroup(); for (var j = 0; j &lt; overlayMapArray[i][features].length; j++) { layerGroup.addLayer(overlayMapArray[i][features][j]); } this.overlayMapObject[overlayMapArray[i][id]] = layerGroup; } this.refreshLayerControl(); } However, I get the error that the "features" key is not defined. What's going on?
score: 0
answer count: 2
tagged with: mapbox

http://stackoverflow.com/comment/40994119
type: AnswerComment
comment on: http://stackoverflow.com/a/26150806
type: Comment
has text: Great @void, you're right in helping... I'm just trying to point you on how to help more people (That's what SO is meant to do)... Think about it: A well formed answer is going to help a lot of other people, and it may get many up-votes in the future...
score: 0

http://stackoverflow.com/comment/40810823
has text: I figured it out, had to return false
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26050525

http://stackoverflow.com/comment/41055842
has text: @dandavis But that would me require to write a wrapper function for each function I want to call. And what should I return in this functions? (Look at my 2nd example)
comment on: http://stackoverflow.com/q/26183944
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40898645
has text: I think you mean O(N log M) for the first approach.
type: Comment
comment on: http://stackoverflow.com/a/26098892
score: 0
type: AnswerComment

http://stackoverflow.com/comment/91763159
type: Comment
score: 1
type: AnswerComment
has text: @SeyedAliAkhavani question definitely says that "I need to get the username and the password that a __browser has send__ to my node.js", so your answer is not valid. It is just impossible
comment on: http://stackoverflow.com/a/52308324

http://stackoverflow.com/a/77885632
has body: Improved typescript version of @JasonLarke answer: export const trimChars = (input: string, chars: string) =&gt; { let start = 0 let end = input.length while (start &lt; end &amp;&amp; chars.includes(input[start])) { start += 1 } while (end &gt; start &amp;&amp; chars.includes(input[end - 1])) { end -= 1 } return start &gt; 0 || end &lt; input.length ? input.substring(start, end) : input } Usage: trimChars(' .,hello;', ' ,.;') // -&gt; 'hello'
score: 2
answers question: http://stackoverflow.com/q/26156292
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/comment/40899596
has text: Thanks Luizgrs. I'm not familiar with creating jsfiddle but this is what I have done. Hope it helps. Thanks once again. http://jsfiddle.net/8hwh7pkt/
comment on: http://stackoverflow.com/q/26098584
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/40995647
type: Comment
has text: Thanks, but how can I create new users like Game.Player.User when User = "Name", and you call it with Game.Player.Name ?
comment on: http://stackoverflow.com/a/26151551
score: 0
type: AnswerComment

http://stackoverflow.com/q/26050353
answer count: 1
accepted answer: http://stackoverflow.com/a/26050394
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40810980
downvote count: 1
has title: how do I pass js variable value to php
type: Question
has answer: http://stackoverflow.com/a/26050394
tagged with: javascript
has body: I am trying to pass a random number from html to php the random number (generated by js), is displayed on the webform and the user must supply its value on the form. php must GET this value and process accordingly. In my webpage, i have this js and form action; In my example.php, i have <?php $rands = $_GET['formvar']; echo "rands:" .$rands; ?> In this example, the value of variable formvar is always 'rnd' instead of the value of rnd Can you please advise the best way to do this ?
score: -1
upvote count: 0

http://stackoverflow.com/q/26151422
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40998982
tagged with: primefaces
has comment: http://stackoverflow.com/comment/40995197
tagged with: javascript
tagged with: jsf-2
downvote count: 0
has body: I am using this code in my .xhtml page In head tag, i am using for refresh purpose, &lt;script type="text/javascript"&gt; alert("hi"); setInterval(function() { document.getElementById('myForm:btnLoadData').submit(); alert("Hello"); }, 3000); &lt;/script&gt; and inside ui:define tag i am writing this code. &lt;h:panelGroup id="divData" layout="block"&gt; //my jsf code.................. &lt;/h:panelGroup&gt; &lt;h:form id="myForm"&gt; &lt;h:commandButton id="btnLoadData" value="Hidden" style="display:none"&gt; &lt;f:ajax execute="@form" render=":divData" /&gt; &lt;/h:commandButton&gt; &lt;/h:form&gt; After all this I am not getting any error, but the hidden button is not working as desired in script. Even I cant see the alert("Hello"). Update: I can see the first alert("hi") but not alert("Hello") I am newbie in jsf. I have to implement polling type thing or auto refresh. I also tried this example. But its not working. Problem 2 I dont know that much jsf. At some places I am using normal HTML tags. I dont know why URL is not showing the page name. Its always like host/myProjectName. I am expecting host/projectName/Login.xhtml or host/projectName/SomeOtherPage.xhtml Even browser back button or reload for that particular page not works. It reloads from first page of my project i-e Login page. Are both problems interrelated. How can I handle this. Somebody please help me with the problem.
favorite count: 0
tagged with: richfaces
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40999035
has comment: http://stackoverflow.com/comment/40995507
has title: Auto refresh in JSF using Ajax
answer count: 0
tagged with: jsf
score: 1
has comment: http://stackoverflow.com/comment/40996993

http://stackoverflow.com/comment/40834792
type: QuestionComment
comment on: http://stackoverflow.com/q/26063357
score: 0
has text: @Batman it's quite the same in a service (constant,value,factory etc) is better because you heave got separation of concerns
type: Comment

http://stackoverflow.com/comment/40876539
has text: ya...you are right, but after I submit my form I cannot get the fill in data...I use Request.Form["myLatitudes"].ToString() in server side but no data get...
comment on: http://stackoverflow.com/a/26086546
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41051120
type: QuestionComment
comment on: http://stackoverflow.com/q/26181654
has text: forgot to say: without using iframe. What is going to change is a webform (pop up).
score: 0
type: Comment

http://stackoverflow.com/q/26114887
answer count: 1
has title: Can we add service reference to multi-device hybrid App?
favorite count: 0
tagged with: visual-studio-cordova
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/124269
score: -1
has answer: http://stackoverflow.com/a/26116870
tagged with: web-services
downvote count: 1
type: Question
has body: So the Question is pretty straightforward. In my project, I need to consume services which are made in JAVA and they are in WSDL format. I need to make an app, which should be available for all the platforms. Since its essentially fetching service data and displaying, I think this Multi-Device Hybrid App project in Visual Studio should be best thing to go. But I'm not able to find how to add service reference in order to consume those services as I have been doing in other type of projects. Hence the Question: Can we even add service Reference to this type of project?
tagged with: typescript
tagged with: javascript
upvote count: 0

http://stackoverflow.com/a/26147091
downvote count: 0
has comment: http://stackoverflow.com/comment/41099366
accepted answer of: http://stackoverflow.com/q/26133817
type: Answer
answers question: http://stackoverflow.com/q/26133817
upvote count: 3
score: 3
has body: The photos are likely being presenting in their natural orientation. When taking a photograph, a bunch of meta data about the camera is stored in something called EXIF data, things such as time, location, shutter, and orientation. Most photo viewing software, including the ones on the device itself, take the orientation into account and display it accordingly. As a result, your logic will need to do the same. The following StackOverflow post describes in further detail how to accomplish this in JavaScript: extract exif orientation data from image var b64 = "data:image/jpeg;base64,/9j/4AAQSkZJRgABA......"; var bin = atob( b64.split( ',' )[1] ); // convert base64 encoding to binary var exif = EXIF.readFromBinaryFile( new BinaryFile( bin ) ); console.log( exif.orientation ); For more information on the FileReader API and the readFromBinaryFile method, here is a link to the MDN: https://developer.mozilla.org/en-US/docs/Web/API/FileReader.readAsBinaryString
type: AcceptedAnswer

http://stackoverflow.com/a/26150946
type: Answer
score: 3
upvote count: 3
downvote count: 0
has body: win doesn't have the method getId because you've commented out the line that assigns the Window class its prototype. It doesn't inherit from Shape at all. When you do have it inherit properly, it is not going to do what you want anyway. In the Shape constructor, you never assign to the id property, and you never reference the newShapeObj property in getId. Keep that in mind in the rest of your constructors, where you also don't assign any properties that you reference later. The newShapeObj means nothing to the interpreter, it has no reason to suspect that you want its properties to be copied to the new object. If you want that behavior for all of your subclasses, you can add it to the Shape constructor: function Shape(properties) { Object.keys(properties).forEach(function (propKey) { this[propKey] = properties[propKey]; }, this); } but I wouldn't recommend it. Instead, select the properties you want to assign to the object and get them from the initializing object: function Shape(properties) { this.id = properties.id; } or dispose of the object altogether and pass the properties you want as parameters: function Shape(id) { this.id = id; }
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26150779
answers question: http://stackoverflow.com/q/26150779

http://stackoverflow.com/comment/40993615
comment on: http://stackoverflow.com/q/26150697
type: Comment
score: 0
has text: StackOverflow is not about today, but to help other people in the future... What if your link goes unavailable in the future?
type: QuestionComment

http://stackoverflow.com/q/26081808
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26082016
downvote count: 0
score: 1
favorite count: 0
tagged with: ajax
tagged with: angularjs
linked to: http://stackoverflow.com/q/3148225
possible better answer: http://stackoverflow.com/a/26082017
has answer: http://stackoverflow.com/a/26082017
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26082016
has answer: http://stackoverflow.com/a/26082028
has answer: http://stackoverflow.com/a/26082380
has comment: http://stackoverflow.com/comment/40946816
upvote count: 1
type: Question
has title: Show Waiting Gif for Multiple Async Ajax Calls
has body: I am making a page with AngularJS and some jQuery plugins in which the angular-js controller initializes its model by calling some servlet methods via ajax asynchronously. I want to show a loading gif when the first ajax call starts and hide it when the last ajax call finishes. Since I don't know which will be the last ajax call to finish, I cannot know where to place the instructions to hide the loading gif. How can I achieve this behavior? A code example of what i want: myApp.controller("adminCtrl", function($scope, $http) { $scope.initData1 = function() { /* is this the first call? then show the gif */ $http(...).success(function() { /* is this the last response received? then hide the gif */}); } $scope.initData2 = function() { /* is this the first call? then show the gif */ $http(...).success(function() { /* is this the last response received? then hide the gif */}); } $scope.initData3 = function() { /* is this the first call? then show the gif */ $http(...).success(function() { /* is this the last response received? then hide the gif */}); } initData1(); initData2(); initData3(); } I hope you understand my problem and know any way to achieve this.

http://stackoverflow.com/q/26117191
has comment: http://stackoverflow.com/comment/40931961
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40931302
has body: I am trying to connect 2 js files but I can't seem to pass variables to it. language.js file: //SELECT LANGUAGE var login_user, login_pass, login_page_loading_msg, login_button, login_register; var dash_log_out, dash_loading_msg, dash_open_lifetime, dash_remind, dash_nothanks, dash_logout, dash_revenue, dash_value, dash_campaign, dash_status, dash_layer, dash_popdown, dash_leadorsale; var stat_date, stat_view, stat_clicks; var prog_choose, prog_info, prog_payperorder, prog_ordervolume, prog_countries, prog_conditions, prog_share, prog_url, prog_copytoclipboard, prog_copiedtoclipboard, prog_success, prog_ok; var reg_title, reg_earn, reg_startearning, reg_participfree, reg_generalinfo, reg_language, reg_prefuser, reg_email, reg_details, reg_usertitle, reg_fn, reg_ln, reg_street, reg_postcode, reg_country, reg_tandc, reg_submit; var menu_dash, menu_stat, menu_prog, menu_news; $.getJSON("data/res/en.json", function(json) { //ATTRIBUTE LANGUAGE //LOGIN PAGE VARIABLES login_user = json['login']['user']; login_pass = json['login']['pass']; login_page_loading_msg = json['login']['page_loading_msg']; login_register = json['login']['register']; login_button = json['login']['login']; //DASHBOARD PAGE VARIABLES dash_log_out = json['dashboard']['log_out']; dash_loading_msg = json['dashboard']['loading_msg']; dash_open_lifetime = json['dashboard']['open_lifetime']; dash_remind = json['dashboard']['remind']; dash_nothanks = json['dashboard']['nothanks']; dash_logout = json['dashboard']['logout']; dash_revenue = json['dashboard']['revenue']; dash_value = json['dashboard']['value']; dash_campaign = json['dashboard']['campaign']; dash_status = json['dashboard']['status']; dash_adklicks = json['dashboard']['adklicks']; dash_layer = json['dashboard']['layer']; dash_popdown = json['dashboard']['popdown']; dash_leadorsale = json['dashboard']['leadorsale']; $('#logOut').html(dash_log_out); $('.loading').html(dash_loading_msg); //STATISTICS PAGE VARIABLES stat_date = json['statistics']['da…
has title: JS global variable passing as undefined - jquery mobile
has comment: http://stackoverflow.com/comment/40931379
has comment: http://stackoverflow.com/comment/40931406
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40931748
has comment: http://stackoverflow.com/comment/40931535
tagged with: global-variables
type: Question
has comment: http://stackoverflow.com/comment/40931784
has answer: http://stackoverflow.com/a/26119663
has comment: http://stackoverflow.com/comment/40931811
tagged with: javascript
tagged with: variables
tagged with: jquery
has answer: http://stackoverflow.com/a/26117670

http://stackoverflow.com/comment/40930411
type: AnswerComment
score: 0
type: Comment
has text: Richie, thanks! The error message is gone. But the about page is still not showing up by default.
comment on: http://stackoverflow.com/a/26116330

http://stackoverflow.com/comment/41030413
type: AnswerComment
has text: @KateMak For a WebMethod try this: HttpContext.Current.Response.StatusCode = 500;
type: Comment
comment on: http://stackoverflow.com/a/26170371
score: 0

http://stackoverflow.com/a/26120317
upvote count: 2
answers question: http://stackoverflow.com/q/26119241
has comment: http://stackoverflow.com/comment/40938233
score: 2
has comment: http://stackoverflow.com/comment/40942508
has body: If you have no access to the ajax code as per @TrueBlueAussies' answer, you can listen to some sort of mutation event. Working fiddle $(document).bind('DOMNodeInserted', function(e) { if($('.test').length) { $('.hidden').show(); } }); Update Mutation events are deprecated, you should use the MutationObserver instead. Updated Fiddle
has comment: http://stackoverflow.com/comment/40941745
has comment: http://stackoverflow.com/comment/40938058
has comment: http://stackoverflow.com/comment/40942300
downvote count: 0
has comment: http://stackoverflow.com/comment/40939184
has comment: http://stackoverflow.com/comment/40941154
type: Answer

http://stackoverflow.com/comment/40943442
score: 0
comment on: http://stackoverflow.com/q/26123556
type: Comment
type: QuestionComment
has text: maybe you have [dynamic properties](http://msdn.microsoft.com/en-us/library/ms537634(v=vs.85).aspx) in that CSS file?

http://stackoverflow.com/q/26071994
has answer: http://stackoverflow.com/a/26072568
type: Question
tagged with: javascript
answer count: 2
has title: In KineticJS, what is the difference between the "click" event and the "contentClick" event?
downvote count: 0
tagged with: events
accepted answer: http://stackoverflow.com/a/26072568
favorite count: 0
has body: Can someone explain the difference between the "click" event and the "contentClick" event ? stage.on("contentClick", function(e) { console.log("stage contentClick"); }) stage.on("click", function(e) { console.log("stage click"); }) //Both events get fired equally I've already noticed that "contentClick" seems to work on the stage only : rect.on("contentClick", function(e) { //This never gets fired console.log("rect contentClick"); }) ... and "contentClick" doesn't play well with cancelBubble : rect.on("click", function(e) { console.log("rect click"); e.cancelBubble = true; }) stage.on("contentClick", function(e) { //This fires even though cancelBubble should prevent it console.log("stage contentClick"); }) Apart from these differences, what exactly IS "contentClick" and what is it usually used for ? Thanks !
tagged with: kineticjs
possible better answer: http://stackoverflow.com/a/41839212
has answer: http://stackoverflow.com/a/41839212
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/comment/40877512
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26086204
has text: @ljames I'm not sure I understood your edit, but I've updated my answer

http://stackoverflow.com/comment/40971972
score: 0
comment on: http://stackoverflow.com/q/26139369
type: Comment
type: QuestionComment
has text: try wrapping that inside document.ready

typeahead
type: Tag
tags question: http://stackoverflow.com/q/26111281
tag name: typeahead
tags question: http://stackoverflow.com/q/26069380

http://stackoverflow.com/a/26151789
upvote count: 1
answers question: http://stackoverflow.com/q/26149770
has body: for (var i = 0, marker; marker = markers[i]; i++) { marker.setMap(null); }
downvote count: 0
type: Answer
score: 1

asp.net-mvc-3
tags question: http://stackoverflow.com/q/26050757
tags question: http://stackoverflow.com/q/26151531
tag name: asp.net-mvc-3
tags question: http://stackoverflow.com/q/26137980
tags question: http://stackoverflow.com/q/26118446
type: Tag
tags question: http://stackoverflow.com/q/26147526

http://stackoverflow.com/q/26127126
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40954199
tagged with: mysql
has body: I’m reading X,Y Coordinates from MySQL Database. 2 files, pretend the connection is there : coordinate_array, and map.php Update here In coordinate_array: I am making a multidimensional arrays so I can then use json_encode($desk). I only need x,y values for the Javascript part. &lt;?php include 'db_conn.php'; header('Content-Type: application/json'); $select_coordinate_query = "SELECT x_coord, y_coord FROM coordinates"; $result = mysqli_query($conn,$select_coordinate_query); //see if query is good if($result === false) { die(mysqli_error()); } //array that will have number of desks in map area $desk = array(); // just added while($row = mysqli_fetch_assoc($result)){ //get desk array count $desk[] = array( array("x" =&gt; $row['x_coord']), array("y" =&gt; $row['y_coord']) ); } //end while loop echo json_encode($desk); //encode array ?> The code above gives me this : [[{"x":"20"},{"y":"20"}],[{"x":"30"},{"y":"30"}],[{"x":"40"},{"y":"40"}],[{"x":"50"},{"y":"50"}]] In map.php : I am trying to get those value with the use of JQuery. I want to get the values and run a loop that will execute my Paint function which will keep drawing rectangles for every row thats in the table. I am very new with JSON and JQuery and starting to use it. &lt;canvas id="imageView" width="600" height="500"&gt;&lt;/canvas&gt; &lt;script type="text/javascript"&gt; NEED HELP HERE PLEASE //I have no idea how to get the encoded values $(document).ready(function(){ $.getJSON('coordinate_array.php', function(data)){ $.each(data, function(k,v){ Paint(v[0].x, v[1].y); });//end each });//end get json });//end rdy func I WANT TO EXECUTE THIS FUNCTION //function to paint rectangles function Paint(x,y) { var ctx, cv; cv = document.getElementById('imageView'); ctx = cv.getContext('2d'); ctx.lineWidth = 5; ctx.strokeStyle = '#000000'; //x-axis,y-axis,x-width,y-width ctx.strokeRect(x, y, x+100 , y+100); } &lt;/script&gt; Thank you in advance it’s much appreciated!
has title: JSON Array values to use in JQuery and execute function
type: Question
has comment: http://stackoverflow.com/comment/40950911
has comment: http://stackoverflow.com/comment/40954931
has comment: http://stackoverflow.com/comment/40950162
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26127202
tagged with: javascript
has comment: http://stackoverflow.com/comment/40954475
has answer: http://stackoverflow.com/a/26127470
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40952364
has comment: http://stackoverflow.com/comment/40951094
tagged with: jquery
has comment: http://stackoverflow.com/comment/40953442
has comment: http://stackoverflow.com/comment/40951313
has comment: http://stackoverflow.com/comment/40956246
tagged with: php
has comment: http://stackoverflow.com/comment/40952435
has comment: http://stackoverflow.com/comment/40950016

http://stackoverflow.com/a/26154482
has body: Credit to @HMR. Test I wrote to verify: it('Should spy on Date', function() { var oldDate = Date; spyOn(window, 'Date').andCallFake(function() { return new oldDate(); }); var d = new Date().toISOString; expect(window.Date).toHaveBeenCalled(); });
has comment: http://stackoverflow.com/comment/49592853
accepted answer of: http://stackoverflow.com/q/26152796
has comment: http://stackoverflow.com/comment/74274559
downvote count: 9
has comment: http://stackoverflow.com/comment/80749024
score: 12
upvote count: 21
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/45410201
type: Answer
answers question: http://stackoverflow.com/q/26152796

http://stackoverflow.com/a/26098429
type: Answer
has body: You use GET method, for example, Create file index.jsp <%@ page contentType="text/html;charset=UTF-8" language="java" %> Username: Email: Go to: http://localhost:8080/index.jsp (I use default port 8080 with Tomcat) When enter username: myname email: myname@example.com and press Submit button. See browser's address bar: http://localhost:8080/index.jsp?txtUserName=myname&emailUser=myname%40example.com
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26097953

http://stackoverflow.com/comment/40840448
has text: Use time (milliseconds) So the code is only executed once every X seconds? Could that be an option?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26066797

http://stackoverflow.com/q/26039103
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26039191
has title: How to destroy data in id when select radio button like this function?
tagged with: php
has body: How to destroy data in id when select radio button like this function ? ..................................................................................................................................................................... First load page index.php, press Check1 button, you will see text PRODUCTS DATA OK checked radio button SECOND RADIO checked radio button FIRST RADIO you will see text PRODUCTS DATA OK this is my question in step 2. checked radio button SECOND RADIO After checked radio button SECOND RADIO, i want to destroy text PRODUCTS DATA OK that store in How can i do that ? index.php FIRST RADIO SECOND RADIO data.php <?PHP if(isset($_POST['products_color'])) { if ( $_POST['products_id'] != '' ) { if ( $_POST['products_type'] != '' ) { ?> PRODUCTS DATA OK <?PHP } else { ?> NO PRODUCTS type <?PHP } } else { ?> NO PRODUCTS ID <?PHP } } else { ?> NO PRODUCTS COLOR <?PHP } ?>
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26039191
type: Question

datetimepicker
type: Tag
tag name: datetimepicker
tags question: http://stackoverflow.com/q/26058738
tags question: http://stackoverflow.com/q/26046062
tags question: http://stackoverflow.com/q/26136360
tags question: http://stackoverflow.com/q/26139634

http://stackoverflow.com/comment/41000492
comment on: http://stackoverflow.com/q/26154532
has text: Second method should also work. But function `app.activateAnchor` should be `visible` - within the scope. http://jsfiddle.net/kzug3b18/
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/26112981
score: 0
has title: JQuery script not working on Chrome or Safari
accepted answer: http://stackoverflow.com/a/26113105
tagged with: safari
type: AnsweredQuestion
has body: The following script works on IE and Firefox but I can't seem to figure out the reason why it's not working on Chrome and Safari. The purpose of the script is simply to remove the first 4 options from list "B" if the first option in list "A" is clicked. Thanks in advance for any feedback! $("document").ready(function () { $('select[name="A"] option[value="001"]').click(function () { var vList = ["001", "002", "003", "004"]; $.each(vList, function (i, code) { $("select[name="B"] option[value=" + vList[i] + "]").remove(); }); }); }); 1 RED CATEGORY 2 BLUE CATEGORY 3 GREEN CATEGORY 4 YELLOW CATEGORY 5 BLACK CATEGORY 1 - RED 2 - RED 3 - RED 4 - RED 1 - BLUE 2 - BLUE 3 - BLUE 4 - BLUE 1 - GREEN 2 - GREEN 3 - GREEN 4 - GREEN 1 - YELLOW 2 - YELLOW 3 - YELLOW 4 - YELLOW 1 - BLACK 2 - BLACK 3 - BLACK 4 - BLACK
tagged with: google-chrome
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26113105
possible better answer: http://stackoverflow.com/a/26113083
has answer: http://stackoverflow.com/a/26113083

http://stackoverflow.com/comment/40922937
type: AnswerComment
comment on: http://stackoverflow.com/a/26112201
type: Comment
has text: @SeshaKiran Afraid not. It would appear that you were in fact mis-interpreting the question and not me!
score: 0

http://stackoverflow.com/q/26037646
upvote count: 3
has comment: http://stackoverflow.com/comment/40786972
has title: Android: how to initiate android's featues through javascript
type: Question
has answer: http://stackoverflow.com/a/26167122
has comment: http://stackoverflow.com/comment/40786422
tagged with: javascript
has answer: http://stackoverflow.com/a/26200225
answer count: 3
tagged with: android-jsinterface
downvote count: 0
has body: I have a code to speak a text passed from html. Which I was able to make it working using below code. Here is the code: tts = new TextToSpeech(this, this); myWebView = (WebView) findViewById(R.id.webviewid); //The html text is from the server. myWebView.loadDataWithBaseURL(null, " " + " " + " " + " " + " " + " " + " " + " " + " ", "text/html", "UTF-8", null); WebSettings webSettings = myWebView.getSettings(); webSettings.setJavaScriptEnabled(true); myWebView.addJavascriptInterface(new WebAppInterface(this), "Android"); Here is my Java script interface: protected class WebAppInterface { Context mContext; /** Instantiate the interface and set the context */ WebAppInterface(Context c) { mContext = c; } /** Show a toast from the web page */ @JavascriptInterface public void textToSpeak(String texttospeak) { Toast.makeText(mContext, texttospeak, Toast.LENGTH_SHORT).show(); speakOut(texttospeak); } } private void speakOut(String text) { tts.speak(text, TextToSpeech.QUEUE_ADD, null); } The above code works as expected. My question is how can I invoke TTS or any other feature (like alarm or making a call etc) through javascript. That means is it possible to call tts.speak() method from javascript. Or in another way, I wanted to invoke androids TTS through javascript instead of creating Java Script Interface (like above). This way I don't have to give an update to user for every feature that I am going to add. Example: Please Note: Below is an example, which I know is incorrect. This is to give you an overview what I need to. //The html text is from the server. myWebView.loadDataWithBaseURL(null, " " + " " + " " + " " + " " + " " + " " + " " + " ", "text/html", "UTF-8", null); Is there any plugin that I need to add. Please let me know. Any help is appreciated.
favorite count: 0
type: UnansweredQuestion
tagged with: android
has comment: http://stackoverflow.com/comment/40787050
has answer: http://stackoverflow.com/a/26200047
score: 3
tagged with: android-webview
linked to: http://stackoverflow.com/q/7869372

http://stackoverflow.com/q/26169540
has answer: http://stackoverflow.com/a/26169685
has body: I have this large list of numbers: http://www.codeshare.io/MGpQ4, that I would like to convert into a JavaScript array format, so that I can check if a certain number in a function matches one of the numbers in that repsective array. Is there any tool I can use to convert all these numbers into a JS array format?
has answer: http://stackoverflow.com/a/26169880
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41028761
has comment: http://stackoverflow.com/comment/41028860
accepted answer: http://stackoverflow.com/a/26169685
has comment: http://stackoverflow.com/comment/41028498
has comment: http://stackoverflow.com/comment/41028392
type: Question
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/41028901
has title: How can I convert a large list of numbers into JavaScript array format?
score: 0
has answer: http://stackoverflow.com/a/26169565
has answer: http://stackoverflow.com/a/26169788
has comment: http://stackoverflow.com/comment/41028721
answer count: 4
possible better answer: http://stackoverflow.com/a/26169565

http://stackoverflow.com/q/26187019
tagged with: input
tagged with: match
type: Question
tagged with: javascript
has body: I have the above div and the below jQuery $('#text').on('input', function() { if($(this).text() == 'banana') { alert('banana!'); } }); I need to search the value/text of #text every time you type something it should check if it can find "banana". Right now it's alerting if you have only typed "banana", but I need it to search through everything, even if there's other things typed there...for example: damn, that's a tasty banana! It should detect the "banana" in that. Additionally, i will need to wrap (instead of alerting) that "banana" in something, like a span for example. Any thoughts on that? So final result should be something like: damn, that's a tasty banana! and it even works with multiple bananas
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26187108
type: UnansweredQuestion
has title: Match a specific word while typing in input/contenteditable

http://stackoverflow.com/a/26188738
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41064587
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26188693
answers question: http://stackoverflow.com/q/26188693
has body: The problem, as pointed out, is that else does not take a condition which makes sense as the else body is run when all the other corresponding if/else-if conditionals failed. Thus JavaScript (not requiring braces around if/else-bodies) is parsing it as so: else Statement More specifically it starts parsing it as an ExpressionStatement, (i = 5), followed by an invalid {. It is invalid for the same reason the following is invalid: i = 5 { } Statements must be separated by semicolons - explicitly or via automatic semicolon insertion. The former is not done and the latter does not apply in the given code.
upvote count: 2

http://stackoverflow.com/a/26078314
has body: try using jQuery from CDN to check the problem [source : http://jquery.com/download/] other way to include it is like this : http://www.w3schools.com/jquery/jquery_install.asp Also there is closing braces missing in the code Learning jQuery
has comment: http://stackoverflow.com/comment/40861358
has comment: http://stackoverflow.com/comment/40861079
has comment: http://stackoverflow.com/comment/40860963
has comment: http://stackoverflow.com/comment/40861208
has comment: http://stackoverflow.com/comment/40861119
has comment: http://stackoverflow.com/comment/40861085
answers question: http://stackoverflow.com/q/26078230
has comment: http://stackoverflow.com/comment/40860995
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40861170
has comment: http://stackoverflow.com/comment/40861076
has comment: http://stackoverflow.com/comment/40860988
has comment: http://stackoverflow.com/comment/40861149

http://stackoverflow.com/comment/40781057
score: 0
type: Comment
has text: Use .class instead #id for selectors... typical error
type: QuestionComment
comment on: http://stackoverflow.com/q/26034471

http://stackoverflow.com/comment/41015676
has text: Use a global handler for the mouse click?
type: Comment
comment on: http://stackoverflow.com/q/26162440
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41030123
has text: @MilkyWayJoe, i think that Ember has one way to do this simply. Something like [this](http://stackoverflow.com/questions/14220989/ember-js-how-to-apply-a-jquery-plugin-after-new-item-is-inserted-to-arraycontro)
type: Comment
comment on: http://stackoverflow.com/q/26163402
score: 0
type: QuestionComment

http://stackoverflow.com/q/26175139
answer count: 0
downvote count: 0
score: 1
has body: Hy guys, I'm using the X-Editable plugin for table inline editing (http://vitalets.github.io/x-editable/). I have an answer with the checklist component. Basically a I get a table of Players and every Player has one or more roles (like forward, goalkeeper,ecc...). When I display my table, I would like to see in the roles column all the roles checked. How can provide checked option dinamically for every player? I tried to work with the 'value' attribute but I receive always Empty list. This is the reference example: &lt;a href="#" id="options" data-type="checklist" data-pk="1" data-url="/post" data-title="Select options"&gt;&lt;/a&gt; &lt;script&gt; $(function(){ $('#options').editable({ value: [2, 3], source: [ {value: 1, text: 'option1'}, {value: 2, text: 'option2'}, {value: 3, text: 'option3'} ] }); }); &lt;/script&gt; Basically I will need to substitute value attribute with a function like this: ... value: function(){....}, .... Could someone help me to solve my problem? Thanks in advance.
type: Question
tagged with: javascript
upvote count: 1
tagged with: x-editable
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has title: X-Editable check dynamically checked options into checklist

http://stackoverflow.com/q/26102269
has comment: http://stackoverflow.com/comment/40905389
has comment: http://stackoverflow.com/comment/40905255
has comment: http://stackoverflow.com/comment/40905662
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40906915
has comment: http://stackoverflow.com/comment/40904978
type: UnansweredQuestion
has body: We are developing with angularjs and are running against a problem We are changing views from inside the controllers normally, but in this case we need to change the view from an other js file. What is the best way to tackle this? We have created a method: toShop: function() { var e = document.getElementById('appContainer'); var scope = angular.element(e).scope(); scope.$apply(function() { scope.toShop(); }); } But this isn't working, the scope object is defined, but the apply function is not working. Is there another way in angular to change views from outside the controller? edit, controller code: controllers.controller('HomeCtrl', function($scope, $location) { $scope.toShop = function() { alert('ruN!'); $location.url('/shop'); }; }); The first js should run the method of the second js
linked to: http://stackoverflow.com/q/12729122
has title: Change view from other javascript file
has answer: http://stackoverflow.com/a/26103120
type: Question
has comment: http://stackoverflow.com/comment/40905474
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/a/26098226
has comment: http://stackoverflow.com/comment/40898188
has comment: http://stackoverflow.com/comment/40900230
accepted answer of: http://stackoverflow.com/q/26097917
has comment: http://stackoverflow.com/comment/40900585
score: -1
answers question: http://stackoverflow.com/q/26097917
type: AcceptedAnswer
downvote count: 1
has body: If you want to do in pure java script then this solution will work for you. INCOME Income Total INCOME2 Income Total2 INCOME3 Income Total3 function toggle_visibility(id) { var e = document.getElementById(id); var myClasses = document.querySelectorAll('.income'), i = 0, l = myClasses.length; for (i; i < l; i++) { myClasses[i].style.display = 'none'; } if (e.style.display == 'none') e.style.display = 'block'; } DEMO
type: Answer
has comment: http://stackoverflow.com/comment/40900487
has comment: http://stackoverflow.com/comment/40900507
upvote count: 0
has comment: http://stackoverflow.com/comment/40898268

http://stackoverflow.com/comment/40926741
has text: This is the better answer than the accepted answer. No need to extend jQuery when there are methods such as `map` that do this for you
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26113628
type: AnswerComment

http://stackoverflow.com/q/26147691
accepted answer: http://stackoverflow.com/a/26147978
has comment: http://stackoverflow.com/comment/40987696
has body: So i came accross the following template but due to the fact they have base64 encrypted their javascript / page elements for god only knows what reason it makes seeing the source code very difficult. http://yootheme.com/demo/themes/joomla/2010/planet/index.php?option=com_content&amp;view=article&amp;id=44&amp;Itemid=53&amp;preset=default But on that page the header bar with the class "header-bg" seems to have the background-position constantly changing most likely via the use of javascript and i like the design and effect of the colors so i am curious if someone can help me or fiddle to me a demo of how they are doing this. I love the way the border effect is constantly rotating around in different variations of colors like that. (Not sure if anyone else finds that beautiful)
has comment: http://stackoverflow.com/comment/40987874
has comment: http://stackoverflow.com/comment/40988001
type: Question
has comment: http://stackoverflow.com/comment/40987661
score: -2
tagged with: javascript
tagged with: jquery
has title: HTML, CSS and Javascript very cool border rotating glowing effects
has comment: http://stackoverflow.com/comment/40987756
downvote count: 4
answer count: 1
has answer: http://stackoverflow.com/a/26147978
favorite count: 0
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40988264
type: AnsweredQuestion

http://stackoverflow.com/a/51973541
score: 0
type: Answer
has body: After researching through blogs, youtube and more I found the answer, implemented it and given me the collapsing dropdown functionality with Semantic UI Put the CSS and semantic.js link inside the header instead of the body Give the select an ID 3.Initialize the ID with with dropdown only: $('#gender-select').dropdown();
answers question: http://stackoverflow.com/q/26159441

http://stackoverflow.com/q/26141325
type: Question
has answer: http://stackoverflow.com/a/26219007
answer count: 1
tagged with: javascript
score: 0
type: UnansweredQuestion
tagged with: php
has body: I'm using the Perch CMS to pull through some captions for a bxslider. I currently have 4 taglines. Because I'm using a different image on each bxslider list item I'm wondering if there's a way to pull out a specific index of the array itself. That's my HTML code currently. And I want to be able to pull the taglines out using <?php perch_content('Taglines');?> But obvioulsy that will pull all of the taglines into the title and not just the first tagline for the first , the second tagline for the second tag. Is there a way to do this within perch? (Ideal output below). <img src="assets/img/banners/hay-banner.jpg" title="perch_content('Taglines (1))"
tagged with: perch
has title: Perch CMS - Get first item out of region list

http://stackoverflow.com/q/26145943
tagged with: javascript
linked to: http://stackoverflow.com/q/10903989
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/40984615
favorite count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/40984859
type: UnansweredQuestion
has title: error 80020101 during downloading a javascript file using $.ajax in IE8
upvote count: 1
linked to: http://stackoverflow.com/q/4918969
tagged with: internet-explorer-8
has body: I've got this Knockout custom binding, all alone in one file (allowing to bind to a jQuery widget): (function ($, ko, undefined) { ko.bindingHandlers.switch = { init: function (element, valueAccessor, allBindings, viewModel, bindingContext) { $(element).switch(valueAccessor()); } }; }(jQuery, ko)); The project This file is downloaded at some point using the jQuery._evalUrl function. I could describe the whole process, but I'm not sure it would be relevant. The problem is that in IE8, I get the good old error 80020101 during the $.ajax from the function. I looked around and found that this error can happen for almost any reason ( see these questions that sum up some of them). I didn't find any JS error in the file (but I'm not a JS guru), and eventually looked at the jQuery._evalUrl function. Here is the source in jQuery 1.11.1: jQuery._evalUrl = function( url ) { return jQuery.ajax({ url: url, type: "GET", dataType: "script", async: false, global: false, "throws": true }); }; Out of despair, I changed dataType: "script", to dataType: "text/javascript", and... that worked. But in fact, writing dataType: "dummy", worked as well. But removing the entire dataType line didn't. I'm not sure I get why. Is the code evaluated when dataType="script" and not otherwise ? So I tried to rewrite the custom binding step by step, testing all the way down, to track a potential code problem using the original dataType: "script". This doesn't raise an error: (function ($, ko, undefined) { }(jQuery, ko)); This does: (function ($, ko, undefined) { ko.bindingHandlers.switch = { }; }(jQuery, ko)); In fact, those two also fail: (function ($, ko, undefined) { ko.bindingHandlers.switch = 1; }(jQuery, ko)); (function ($, ko, undefined) { ko.bindingHandlers.switch = "a"; }(jQuery, ko)); Any ideas what the hell could be happening ?
score: 1
tagged with: knockout.js
has comment: http://stackoverflow.com/comment/40984420
type: Question
downvote count: 0

http://stackoverflow.com/q/26135451
score: 7
has title: How to change tooltip color on open using jQuery UI Tooltip?
upvote count: 7
tagged with: css
type: AnsweredQuestion
has body: I'm trying to achieve the following, can't figure out how though. I have several tooltips on a page, but I want each one to look different (depending on severity for instance). Here is what I have so far: Tooltip 1 (Warning) Tooltip 2 (Danger) /*JAVASCRIPT*/ var ArrowToolTip = { init: function (parentId) { jQuery('#' + parentId).tooltip( { content: function () { var element = jQuery(this); return element.attr('title'); }, create: function () { var element = jQuery(this); var severity = element.data('severity'); if (!severity) { severity = 'default'; } element.tooltip('option', 'tooltipClass', severity); }, open: function(event, ui) { var element = jQuery(this); var severity = element.data('severity'); ui.tooltip({ tooltipClass: severity }); //ui.tooltip.tooltipClass(severity); console.log(event); console.log(ui); } }); } } Whatever I have in the create: works, but it's only called on page load, so that doesn't do me any good. So now I'm trying to move this to the open: event. But that doesn't seem to work at all. The jQuery(this) doesn't return the hovered element, it returns the container. How can I get the correct element to select the data attribute? And how can I then change the CSS class? Does anyone know how this could be achieved?
possible better answer: http://stackoverflow.com/a/26135956
has answer: http://stackoverflow.com/a/26135956
has comment: http://stackoverflow.com/comment/40965910
has answer: http://stackoverflow.com/a/26136269
type: Question
answer count: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/26136269
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: jquery-ui-tooltip

http://stackoverflow.com/comment/40980782
type: QuestionComment
comment on: http://stackoverflow.com/q/26140443
has text: (...and thanks for the confidence booster!)
score: 0
type: Comment

http://stackoverflow.com/a/26067182
downvote count: 0
answers question: http://stackoverflow.com/q/26066648
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/40841368
upvote count: 1
has body: Just setting them equal in the beginning wont work. In your view, instead of having an estimate field just use this ${{values.insurance + values.lease }} ${{values.insurance}} ${{values.lease}} This will keep them adding as the values change. Another thing that would be breaking is that you have two controller calls to the same controller and no app. Need to change it as below with the new div and remove the rest of the ng-controllers. Also, make sure that you have the ui slide javascript file included on your page.
has comment: http://stackoverflow.com/comment/40864673

http://stackoverflow.com/a/26152168
has comment: http://stackoverflow.com/comment/41002861
score: 3
upvote count: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26152024
type: Answer
accepted answer of: http://stackoverflow.com/q/26152024
has body: All TypedArrays are just views on a type agnostic ArrayBuffer, so you can simply use this: Packing: new Float32Array((new Uint8Array([i1,i2,i3,i4])).buffer)[0]; Unpacking: new Uint8Array((new Float32Array([f])).buffer); See the documentation of ArrayBufferView for more information.
downvote count: 0

http://stackoverflow.com/a/26055333
downvote count: 0
has body: As dfsq wrote the problem is with word boundary. If you remove \b you will get desired output, but it is quite different regex. It will replace Един also in cases where it is a part of word. To avoid that you can use negative lookahead and define which letters shouldn't appear behind, because they could be a part of word. 'Един'.replace(/\Един(?![A-я])/gi, '');
type: Answer
answers question: http://stackoverflow.com/q/26054681
upvote count: 4
has comment: http://stackoverflow.com/comment/40820339
score: 4

http://stackoverflow.com/comment/41065716
has text: You mean, add the Script Tags into the Target Container and execute a script recreation into it and output using innerHTML?
comment on: http://stackoverflow.com/a/26189447
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40820141
type: QuestionComment
comment on: http://stackoverflow.com/q/26056079
has text: what issue do you face here?
score: 0
type: Comment

http://stackoverflow.com/q/26169743
answer count: 1
has comment: http://stackoverflow.com/comment/41029403
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26170391
accepted answer: http://stackoverflow.com/a/26170391
has body: I am using Kendo UI for File Upload. I want to then get the correct properties from the DOM tree. On my cshtml I have: &lt;input name="target" id="target" type="file" /&gt; I then want to get the value of each file - so I am doing the following in my js: $('input[name="target"]').each(function () { console.log($('input[name="target"]')); // get the value of each file - do something with value if set - not if blank }); In the console I am seeing the below - two inputs one with a #target and one without - not sure why: If I expand the 0: input element I get the following so in this case the input value has a value: value: "C:\fakepath\MyDoc.txt" Expanding the 1: input#target and scrolling down to the value it is blank as "". In my .each(function how can I extract the value of each of these inputs so in pesudo code I want to do something like: foreach (input in (input[name="target"]) { if (input.val() != "") { alert("Value Found"); alert(input.val(); } else { alert("No Value Found"); } } Doing what Brian said and a console.log(this) on inside my $.each... gives: &lt;input name="target" type="file" data-role="upload" multiple="multiple" autocomplete="off" tabindex="-1" style="display: none;"&gt; &lt;input name="target" id="target" type="file" data-role="upload" multiple="multiple" autocomplete="off"&gt; So this pulls out both of the individual inputs that are there but neither contains the value attribute which in one case will be the file "C:\Desktop\MyDoc.txt" and the other value would be blank ""
has title: jQuery to extract correct values from DOM tree
has comment: http://stackoverflow.com/comment/41029849
has comment: http://stackoverflow.com/comment/41029359
has comment: http://stackoverflow.com/comment/41028930
downvote count: 2
has comment: http://stackoverflow.com/comment/41029674
has comment: http://stackoverflow.com/comment/41029444
has comment: http://stackoverflow.com/comment/41029736
type: Question
has comment: http://stackoverflow.com/comment/41029657
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41030173
has comment: http://stackoverflow.com/comment/41030006
has comment: http://stackoverflow.com/comment/41029163
has comment: http://stackoverflow.com/comment/41029382
has comment: http://stackoverflow.com/comment/41029019
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/41029022
has comment: http://stackoverflow.com/comment/41029000

http://stackoverflow.com/q/26065644
favorite count: 0
linked to: http://stackoverflow.com/q/750486
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40838321
score: 1
has answer: http://stackoverflow.com/a/26065702
upvote count: 1
has comment: http://stackoverflow.com/comment/40838183
type: Question
has body: When using a "for in" loop to set a method, the proper method names are set, but the variables used in each function call are clobbered by the last set property. Example Code function colorLog() { var color = { graph: '#88A825', node: '#35203B', link: '#911146', error: '#AC2930', info: 'black' }; var logger = {}; for(var k in color) { logger[k] = function(msg) { console.log(color[k]); console.log("%c" + msg, "color:" + color[k] + ";font-weight:bold;"); } } return logger; } var log = colorLog(); log.graph("Graph Says"); log.node("Node Says"); log.link("Link Says"); log.error("Error Says"); log.info("Info Says"); Output black Graph Says black Node Says black Link Says black Error Says black Info Says What am I not understanding about scoping rules?
downvote count: 0
duplicate of: http://stackoverflow.com/q/750486
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26065702
answer count: 1
has title: for in loop only using last property

http://stackoverflow.com/comment/40818575
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26055141
has text: from this link http://www.html5canvastutorials.com/labs/html5-canvas-drag-and-drop-multiple-images-with-kineticjs/

http://stackoverflow.com/q/26147503
score: 0
answer count: 1
has title: Resume or set start time on Brightcove video
type: UnansweredQuestion
tagged with: brightcove
has answer: http://stackoverflow.com/a/26177974
type: Question
tagged with: javascript
tagged with: html5-video
has body: I am using Brightcove player http://docs.brightcove.com/en/video-cloud/smart-player-api/ with Angular to do a popup video. I want to be able to resume it after the popup is closed. I found this module that I can pause, resume or set start time: http://docs.brightcove.com/en/video-cloud/smart-player-api/references/symbols/brightcove.api.modules.VideoPlayerModule.html However, their doc is somewhat out of date. For example, this doesn't work var APIModules = brightcove.modules.APIModules; var videoPlayer = experience.getModule(APIModules.VIDEO_PLAYER); Even though I have included the js files: &lt;script src="http://admin.brightcove.com/js/BrightcoveExperiences.js"&gt;&lt;/script&gt; &lt;script src="http://admin.brightcove.com/js/APIModules_all.js"&gt;&lt;/script&gt; It said ReferenceError: experience is not defined in the console. Can you point me a direction on how to successfully use the pause() or seek() function? Thanks.

http://stackoverflow.com/a/26114566
accepted answer of: http://stackoverflow.com/q/26114402
has comment: http://stackoverflow.com/comment/40926910
has comment: http://stackoverflow.com/comment/40928947
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40929567
score: 1
has comment: http://stackoverflow.com/comment/40928872
has comment: http://stackoverflow.com/comment/40926873
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26114402
has comment: http://stackoverflow.com/comment/40926908
downvote count: 0
has body: You have two buttons with the same id. jQuery # selector find only the first match of that id, so the first button that is hidden. Delete it or change it's name and it should works ;-) Edit: You can also change them to a .className rather than an id and all the respective references to classes and it should work.

http://stackoverflow.com/q/26140252
has answer: http://stackoverflow.com/a/26140611
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has body: I have a kind of drop down menu. But when I click some submenu link, the new page of my web site is opening, but the menu is closing. But on the new page of the web-site active menu must be open! I think that it is necessary to find active menu, and after that remove style="display:none" using the ajax code. But I have some difficulties with it. I tried to implement what I have in simple way on JSFiddle: Example HTML: Click me 1 Dropdown link Dropdown link Click me 2 Dropdown link Dropdown link AJAX: $(document).ready(function () { $('#menu li > a').click(function (e) { if ($(this).next('ul').length > 0) { e.preventDefault(); var subNav = $(this).next('ul'); if (subNav.is(':visible')) { subNav.slideUp('normal') $(this).removeClass("selected"); } else { $('#menu ul:visible').slideUp('normal'); subNav.slideDown('normal'); $("a.selected").removeClass("selected"); $(this).addClass("selected"); } } }); }); Thanks for any help!
has comment: http://stackoverflow.com/comment/40977464
upvote count: 2
has title: Keep jquery dropdown menu open on the new page of web site
has answer: http://stackoverflow.com/a/26141500
tagged with: css
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26140591
has comment: http://stackoverflow.com/comment/40973551
possible better answer: http://stackoverflow.com/a/26140591
type: Question
accepted answer: http://stackoverflow.com/a/26141500
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 3

http://stackoverflow.com/a/26135880
has body: The culture de-De is German, use nl-NL instead.
has comment: http://stackoverflow.com/comment/40966728
downvote count: 0
has comment: http://stackoverflow.com/comment/40967818
score: 1
has comment: http://stackoverflow.com/comment/40966481
has comment: http://stackoverflow.com/comment/40966935
upvote count: 1
answers question: http://stackoverflow.com/q/26135774
type: Answer

http://stackoverflow.com/comment/41010731
comment on: http://stackoverflow.com/a/26159348
type: Comment
has text: @Hatul "it show a div in the center of the page (above everything) - when clicking anywhere the div gets closed" .. that's exactly what jQuery UI dialog does. Btw: this answer also uses jQuery, so you can just go with that. Doing it in vanilla JS is of course possible, but is it really important for you? I mean.. is the additional effort worth it? There are quite a few things to handle.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26165461
has comment: http://stackoverflow.com/comment/41021696
has answer: http://stackoverflow.com/a/26165957
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41021675
has comment: http://stackoverflow.com/comment/41021257
has body: Accept text box value when it's first letter is a alphanumeric . In my html page i have a text box, which has to accept only alphanumeric .If first letter is integer truncate.for special chatacter also. &lt;input type="text" onKeyUp="numericFilter(this);"/&gt; function numericFilter(txb) { txb.value = txb.value.replace(/[^\0-9]/ig, ""); } Above code only accept integer only how can i change it.
has comment: http://stackoverflow.com/comment/41021719
type: Question
has comment: http://stackoverflow.com/comment/41021569
tagged with: javascript
has title: Accept textbox value when its first letter is an alphanumeric
score: 0

http://stackoverflow.com/a/26105845
has comment: http://stackoverflow.com/comment/40911664
answers question: http://stackoverflow.com/q/26105746
has body: You can use JSON.stringify , replacer method to convert to string and remove null, then convert back to JSON from string. convert object(having null value ) to string = JSON.stringify(obj,param...); back to object = JSON.parse("string value"); Some helpful link Recursively remove null values from JavaScript object https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
has comment: http://stackoverflow.com/comment/40911517
score: 0
has comment: http://stackoverflow.com/comment/40911585
type: Answer

http://stackoverflow.com/comment/40930182
score: 0
type: AnswerComment
has text: You still need to pass a parameter to `toggle()`. It expects the parameter `section`, and passes this parameter into 'querySelectorAll`. If `section` is `undefined` then `querySelectorAll()` will return `null` and you will not be able to get a `classList` from `null`.
comment on: http://stackoverflow.com/a/26116330
type: Comment

http://stackoverflow.com/comment/86682379
type: AnswerComment
has text: performance.webkitSetResourceTimingBufferSize seems to be not working. It throws error as it is not a function. Can anyone help me with the solution? i need to capture all the request that are more than 150
type: Comment
comment on: http://stackoverflow.com/a/26994448
score: 0

http://stackoverflow.com/comment/40984060
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26145417
type: Comment
has text: We're using a 4D Database. Thanks for the tips/responses here.

http://stackoverflow.com/q/26057680
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40823524
has body: I am using Sly slider plugin in my project and I am new to it. The problem I am facing right now is that when I apply width: 100% to the container, the other slides show on the side, thats because they have static width. Problem demo. I tried setting the slide's width to 100% but it didnt help. I need to make it working in such a way that the container width would be the device width and there should be exactly 1 slide shown in it at a time. How do I fix this? jsFiddle EDIT: It seems this plugin needs the slide width explicitly mentioned. width: auto wouldnt work either. Does anybody have any suggestion?
type: UnansweredQuestion
has title: Sly fill container with slide
tagged with: css
has comment: http://stackoverflow.com/comment/40823587
answer count: 0
has comment: http://stackoverflow.com/comment/40823988

http://stackoverflow.com/q/26187543
tagged with: javascript
has answer: http://stackoverflow.com/a/26357910
has title: Strange Date behavior in Chrome
has comment: http://stackoverflow.com/comment/41361228
has comment: http://stackoverflow.com/comment/41062902
has comment: http://stackoverflow.com/comment/41062835
answer count: 1
accepted answer: http://stackoverflow.com/a/26357910
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41062386
tagged with: datetime
type: AnsweredQuestion
score: 7
has comment: http://stackoverflow.com/comment/41063061
has comment: http://stackoverflow.com/comment/41062705
upvote count: 7
has comment: http://stackoverflow.com/comment/41062296
type: Question
has comment: http://stackoverflow.com/comment/41062626
has comment: http://stackoverflow.com/comment/41063157
has body: Why these nearly similar date objects give different results in Chrome 37? var d2014 = new Date(2014, 0, 1); alert(d2014.getFullYear()); // 2013 var d2015 = new Date(2015, 0, 1); alert(d2015.getFullYear()); // 2015 In IE11 I get "2014" and "2015" as expected. Browser works in Russian locale. Conversion to strings gives the following results: d2014.toString(); // Tue Dec 31 2013 23:00:00 GMT+0300 (RTZ 2 (зима)) d2015.toString(); // Thu Jan 01 2015 00:00:00 GMT+0300 (RTZ 2 (зима)) d2014.toUTCString(); // Tue, 31 Dec 2013 20:00:00 GMT d2015.toUTCString(); // Wed, 31 Dec 2014 21:00:00 GMT
has comment: http://stackoverflow.com/comment/41062807

http://stackoverflow.com/comment/40803188
has text: Typically it's probably better to stick to the lib (or lack of lib) the OP is using. Native JS would be a better answer than a jQuery answer here (way overhead for math)
comment on: http://stackoverflow.com/a/26046651
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26148502
score: 0
accepted answer: http://stackoverflow.com/a/26148838
answer count: 2
tagged with: javascript
tagged with: jquery
has body: After posting a form to a web service, the below angular http post result should trigger one of two HTML elements to display the success or failure of the post. Though I'm getting a 200 ok reponse along with a "Success" string as a return, the success HTML element isn't displaying as if it wasn't successful. Can anyone point out what I'm missing here? I'd appreciate it. Jquery: $scope.demoInquiry = function(){ $http({ method : 'POST', url : 'http://localhost:XXXXX/XXX/XXXXXXX/XXXXXXXXXX', data : $.param({ firstName : $scope.firstName, lastName : $scope.lastName, companyName : $scope.companyName, email : $scope.email, phone : $scope.phone, deviceHwid : "Website Inquiry" }), headers : { 'Content-Type': 'application/x-www-form-urlencoded' } }).success(function(data) { console.log(data); $scope.postSuccess = true; }).error(function(data){ console.log(data); $scope.postError = true; }); }; HTML: Thank you for registering! There was an error with your registration. Try again.
tagged with: angularjs
has title: $http.success() or .error() not triggering ng-show upon completion
has answer: http://stackoverflow.com/a/26148838
possible better answer: http://stackoverflow.com/a/26148573
has answer: http://stackoverflow.com/a/26148573
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40989850
type: Question

http://stackoverflow.com/comment/40990888
has text: its not very effective,it work but I want the alert message to appear before text1 < text2 and cannot type anything in the text
comment on: http://stackoverflow.com/q/26149158
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41050106
comment on: http://stackoverflow.com/q/26180938
type: Comment
type: QuestionComment
has text: I'll look around for a duplicate, but I'm curious, you're using an `alert()` for debugging. Are you aware of your browser's developer tools? Like @Quentin mentioned, you'll get helpful info there.
score: 0

http://stackoverflow.com/a/26054966
type: Answer
has body: in css the visibility property effects to content inside the tag while display property effects to total tag, that means if you apply display:none; it will remove entire tag but visibility:hidden hide the content inside that tag. Since :visible is a jQuery selector you can use opacity instead of visibility to hide the content inside the tag. $('#myId').css('opacity','1'); $('#myId').css('opacity','0'); if you need to hide the entire tag, better go with display none
score: 0
answers question: http://stackoverflow.com/q/26054257

http://stackoverflow.com/a/26152353
score: 1
has body: Currently, this is not possible with PhantomJS. It does not expose the request/response content in those callbacks. Possible workarounds would be: If the AJAX requests can be replayed (multiple requests to the same URL yield the same response every time), then you can make your own AJAX request in the onResourceReceived handler and save the response into a file using the fs module. AJAX responses for the same URL would mean that some content changes in the page. You could write custom code to check the DOM for those changes and infer what the AJAX request might have been. It doesn't necessarily have to be DOM. Maybe the data is accessible in some JavaScript variable from the page context or it is saved in localStorage. It is also possible to write a custom XMLHttpRequest implementation as a proxy which saves the responses so that they can be grabbed. It must be injected before any page JavaScript runs. So the page.onInitialized handler works best. I have written a post about those workarounds for CasperJS, but they can be easily converted to be used with plain PhantomJS: A: How can I catch and process the data from the XHR responses using casperjs?.
upvote count: 1
answers question: http://stackoverflow.com/q/26152192
type: Answer
downvote count: 0

http://stackoverflow.com/comment/41034660
has text: You can if you use [jQuery UI dialogs](http://jqueryui.com/dialog/#modal-form). But naively no.
comment on: http://stackoverflow.com/q/26172881
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40965552
has text: I'm pretty sure bitmasks really isn't what the OP is looking for at the moment.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26123685
type: AnswerComment

http://stackoverflow.com/comment/40941594
comment on: http://stackoverflow.com/a/26120444
has text: I did change rows attribute already. It works great. Think just need to change the value 20 to something smaller to add little less space at the bottom. Thanks again works for me.
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/q/26180422
accepted answer: http://stackoverflow.com/a/26238038
score: 0
answer count: 1
has body: In my rails 4 app I am having trouble getting ajax "success" event triggering for links that are added to a page dynamically with jquery. I am creating markup like the following and dynamically adding it to a page. delete The following DOES trigger: $(document).on("ajax:success" But the version that does NOT trigger and the one I want to use is: $("a[data-remote]").on("ajax:success" Any idea why the $(document) version works while the $("a[data-remote]") version does not? To clarify, it does not work specifically when things are added dynamically. For links that are already on the page they trigger the events just fine. Note: Turbolinks is removed.
has answer: http://stackoverflow.com/a/26238038
has comment: http://stackoverflow.com/comment/41048577
tagged with: ruby-on-rails
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41064976
type: Question
has title: ajax success event not triggering for dynamically added links
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/q/26131264
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: web-services
has comment: http://stackoverflow.com/comment/40958054
upvote count: 0
has answer: http://stackoverflow.com/a/26131382
has title: Using a JS framework for developing a database client application?
type: Question
tagged with: database
tagged with: javascript
score: -1
has body: Requirement:Using a JS frameworks and readily available UI elements to develop a database application (which would connect to databases the user wants to connect to using jdbc, and do some drag-and-drop SQL query building etc. and similar functionality) I understand that I would need some parts of it needs to be residing in a web server. Since not all the users' databases (local, intranet) could be accessible from a central server where I run my application, I am thinking I would need to bundle the server also (apache tomcat) with my application. Is there any simpler tools/methods to architect this, keeping the UI in HTML5/JS?
has comment: http://stackoverflow.com/comment/40960973
downvote count: 1

http://stackoverflow.com/a/26192761
upvote count: 2
has comment: http://stackoverflow.com/comment/42109896
accepted answer of: http://stackoverflow.com/q/26187437
type: Answer
has body: It's a bit tricky, you need to understand how the console works. Logging objects or arrays is not like logging primitive values like strings or numbers. When you log an object to the console, you are logging the reference to that object in memory. In the first log that object has no models but once the models are fetched the object gets updated (not what you have previously logged!) and now that same object has 6 models. It's the same object but the console prints the current value/properties. To answer your question, IO is asynchronous. You need to wait for that objects to be fetched from the server. That's what events are for. fetch triggers a sync event. Model emits the sync when the fetch is completed. So: var Products = Backbone.Collection.extend({ model: Product, url : 'restendpoint', customFilter: function(f){ var results = this.where(f); return new TestCollection(results); } }); var products = new Products(); products.fetch(); console.log(products.length); // 0 products.on('sync',function(){ console.log(products.length); // 6 or whatever products.customFilter({title: 'MyTitle'}); })
has comment: http://stackoverflow.com/comment/41077081
score: 2
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26187437

http://stackoverflow.com/a/26072057
downvote count: 0
has body: This problem tends to happen when you're using the src attribute to interpolate the path of your images. Use ng-src instead of using the src attribute. &lt;tr ng-repeat="d in data"&gt; &lt;td&gt;&lt;img ng-src="{{d.image}}"&gt;&lt;/td&gt; &lt;/tr&gt;
answers question: http://stackoverflow.com/q/26072019
type: Answer
accepted answer of: http://stackoverflow.com/q/26072019
score: 7
upvote count: 7
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40849922

http://stackoverflow.com/a/26113053
answers question: http://stackoverflow.com/q/26113028
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26113028
has body: you want just move image to var Construction so it will be var Construction = 'The construction company with several years of experience in projects valued over millions of USD having Service and Quality with satisfaction and appreciation of the clients &lt;img src="images/SCALE Construction.png"&gt;';
type: Answer
downvote count: 1
upvote count: 0
score: -1

http://stackoverflow.com/comment/41004292
score: 0
comment on: http://stackoverflow.com/q/26156166
type: QuestionComment
has text: Yes but where is your problem right now? Does the console log show the desired data? dOes it display any data in your HTML? Does it display wrong data in your HTML? Are there any errors on your console?
type: Comment

http://stackoverflow.com/comment/40824562
type: QuestionComment
has text: Actually your regex remove only white spaces.
score: 0
comment on: http://stackoverflow.com/q/26058534
type: Comment

http://stackoverflow.com/a/27628501
score: 3
accepted answer of: http://stackoverflow.com/q/26087966
has body: You can't inspect response headers in this manner. Endpoints API system doesn't even supply a way for you to modify or set the headers. Header inspection/modification is something you should do in a normal handler. At best, I can give this advice. If you use the function gapi.client.request() method, you can hit the REST endpoints for your API, and this function returns a gapi.client.Request object. Calling .execute() on this object will allow you to pass a callback function which will receive the response, including headers.
type: AcceptedAnswer
downvote count: 0
upvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/26087966

http://stackoverflow.com/q/26176298
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41040952
duplicate of: http://stackoverflow.com/q/23392111
answer count: 0
has title: Why doesn't the property of this cloned object update properly
type: Question
has comment: http://stackoverflow.com/comment/41040995
linked to: http://stackoverflow.com/q/23392111
tagged with: javascript
has comment: http://stackoverflow.com/comment/41041002
score: 0
has body: var obj1 = new obj(); var obj2 = obj1.clone(); obj2.BusinessLine = businessLine2; console.log(obj2.BusinessLine); // businessLine2 console.log(obj1, obj2); // businessLine1, businessLine1 obj2.loadClone(obj1); //irrelevant console.log(obj1, obj2); jsfiddle here. I define a new object, clone it with $.extend and change one of the clone's properties that links to an object. console.log(clone.property) shows the new value but console.log(clone) shows the old value.
tagged with: jquery

http://stackoverflow.com/comment/40914822
comment on: http://stackoverflow.com/q/26107500
score: 0
type: Comment
type: QuestionComment
has text: Nothing happens, no errors. Just reloads the page, no new database entry, no errors, nothing.

http://stackoverflow.com/q/26055448
has title: iron-router render notFound template when route does not exist
has answer: http://stackoverflow.com/a/26055933
accepted answer: http://stackoverflow.com/a/26055933
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
answer count: 1
tagged with: javascript
upvote count: 1
tagged with: meteor
favorite count: 0
has body: If the data function returns a falsy value like null, the NotFound template will be rendered in my application. This works fine, but now I want also to render the NotFound template, if the route does not exist. For instance: this.route('settingsOverviewPage', { path: '/settings', data: function() { return Users.findOne(Meteor.userId()); }, waitOn: function() { if (Meteor.userId()) { return Meteor.subscribe('ownUser', Meteor.userId()); } return null; } }); If I use this route: /settings12345 for instance, the browser reloads, but it renders the last route. Any help would be greatly appreciated.
tagged with: iron-router

http://stackoverflow.com/q/26192556
has answer: http://stackoverflow.com/a/26192675
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26192675
has body: I've got a Web App that uses a data source encoded as JSON. I'm wondering if there's an advantage to loading the data as a variable from an external script using a standard tag vs. using the jQuery AJAX method to load the data. If I'm loading the data as a variable from an external script it would look like this: var settings = {"one" : 1, "two" : 2, "three" : 3}; I would load it using: &lt;script type="text/javascript" src="data.js"&gt;&lt;/script&gt; Then I can access it using: console.log(settings.two); If I'm loading the data via AJAX it would look like this: {"one" : 1, "two" : 2, "three" : 3} I would load it and access it using: $.getJSON( 'data.json', function( settings ) { console.log(settings.two); }); The biggest advantage I can see loading the data as an external script, would be that it loads before jQuery is ready and the "settings" variable can be accessed globally. Any thoughts on which method to use? Thanks, Howie
has title: Loading Data into a Web App
favorite count: 0
upvote count: 1
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/40789207
type: QuestionComment
comment on: http://stackoverflow.com/q/26039169
score: 0
has text: Why don't you use bootstrap too then? They have a good documentation
type: Comment

http://stackoverflow.com/comment/41000656
has text: @intothev01d is correct. You've bound mouseleave to a very specific object, referenced by 'player,' and when mouseenter creates a new player object, mouseleave is no longer bound to it. You could try to do the binding of mouseleave within the mouseenter function, so it rebinds each time you create a new object. Even better would be to trigger the binding in your onPlayerReady function.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26128788
score: 0

http://stackoverflow.com/comment/40939137
score: 4
type: QuestionComment
type: Comment
has text: First off, you can't have more than 1 element with the same ID. They're unique.
comment on: http://stackoverflow.com/q/26121512

http://stackoverflow.com/comment/41000936
type: Comment
has text: i dont know how to do it but you can achieve this - quickest fix will be from command prompt, select folder and file and run to rename, you will get enough tutorials in google
comment on: http://stackoverflow.com/q/26154783
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40938763
comment on: http://stackoverflow.com/q/26120965
has text: I'll try that and edit the question. But how can it be just `$.height`, if both working tests don't fail?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40795292
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26042314
has text: What would cause the transition/animation? What should happen after it ends?

http://stackoverflow.com/comment/40896907
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26097381
has text: can you create fiddle or something similar to that

http://stackoverflow.com/comment/40998089
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26153207
has text: Yep. getUserMedia will get a second instance of camera/mic rather than grabbing the original.
type: AnswerComment

http://stackoverflow.com/q/26089747
has comment: http://stackoverflow.com/comment/40945008
tagged with: variance
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/40882558
has comment: http://stackoverflow.com/comment/40882961
possible better answer: http://stackoverflow.com/a/26110598
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26110598
has answer: http://stackoverflow.com/a/26114723
has comment: http://stackoverflow.com/comment/40926347
tagged with: mapreduce
type: Question
has body: I am trying to implement a parallel calculation of variance in JavaScript using MapReduce. I believe that this Parallel algorithm could be used, but I cannott figure out how to apply it to an arbitrary number of datasets. So far, I came to the conclusion that the best way to approach the problem is to do a reduction based on the sum of squares instead of doing it against the variance. A naive implementation would look like that: // partials is an array of [count, sum, sumsquare] arrays function variance(partials) { var count = 0; var sum = 0; var sumsquare = 0; for (var i = 0; i &lt; partials.length; ++i) { count += partials[i][0]; sum += partials[i][1]; sumsquare += partials[i][2]; } return (sumsquare / count) - Math.pow(sum / count, 2); } // variance([[3, 6, 14], [3, 15, 77], [3, 24, 194]]) should return 6.666666666666668 Not being a statistician, I have a hard time figuring out whether such a parallel algorithm would introduce too many compounding errors. But if it is acceptable, it is worth noting that the variance does not need to be computed during the map phase. Only the sum of squares, sum, and count are needed.
has comment: http://stackoverflow.com/comment/40914547
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26114723
answer count: 2
has comment: http://stackoverflow.com/comment/40919922
downvote count: 0
has title: Parallel calculation of variance

http://stackoverflow.com/comment/40801508
type: QuestionComment
has text: Try listening for "sync" event instead of "change" event for your backbone model.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26040531

http://stackoverflow.com/q/26192985
has body: I validate my form using jquery validate like this: $("#formuser").validate({ rules: { accountname: { required: true, minlength: 6 }, T1: { required: true, minlength: 6 }, accountpassword1: { required: true, minlength: 8 }, accountpassword2: { required: true, minlength: 8, equalTo: "#accountpassword1" }, }, }); HTML: &lt;input id="accountpassword1" class="text-input form-control" type="text" name="accountpassword1" size="24" placeholder="password" &gt; &lt;input class="text-input form-control" type="text" name="accountpassword2" size="24" placeholder="password" &gt; this worked for me But. I need to check jquery validate when password1 and password 2 not empty. my mean is if password input is empty jquery validate not validate field else validate field password1 and password2. how do create this? NOTE:: i need to only check validate accountpassword1 and accountpassword1 with this method.
has comment: http://stackoverflow.com/comment/41071682
has answer: http://stackoverflow.com/a/43817123
has answer: http://stackoverflow.com/a/26193053
tagged with: javascript
tagged with: jquery
score: 6
possible better answer: http://stackoverflow.com/a/43817123
type: AnsweredQuestion
tagged with: validation
downvote count: 0
has title: jquery validate when field not empty
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/26193053
answer count: 2
upvote count: 6

http://stackoverflow.com/q/26189786
tagged with: jquery
has comment: http://stackoverflow.com/comment/41229983
has answer: http://stackoverflow.com/a/26190770
favorite count: 0
accepted answer: http://stackoverflow.com/a/26190770
linked to: http://stackoverflow.com/q/26280943
has comment: http://stackoverflow.com/comment/41229823
tagged with: php
upvote count: 4
linked to: http://stackoverflow.com/q/13591533
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41233999
downvote count: 0
has body: Having an issue working out the best way to save an ajax sortable list into my database. I'm using HTML5Sortable and Laravel 4.2 framework. The basic end result I'm trying to achieve is for a user to be able to click and drag the list items and reorder them and this new order will be saved in the database in a field called "order" so that when they return to the page later the new order will be present. I have a list of chapters on the page like so: @foreach ($chapters as $chapter) order }}">{{ $chapter->title }} @endforeach And I can drag and drop sort these using HTML5Sortable and then serialize this data and submit it via ajax POST, which fires off each time the list is reordered like so: $('.sortable').sortable().bind('sortupdate', function(e, ui) { var order = $('ul.sortable li').map(function(){ return $(this).data("order"); }).get(); var uuid = "<?php echo$uuid; ?>"; $.ajax({ type: "POST", url: "api-ch-order", dataType: "json", data: {order: order, uuid: uuid}, success: function(order){ console.log(order) } }); }); My controller at /api-ch-order gets the data and saves the new order like so: if(Request::ajax()){ $uuid = Input::get('uuid'); $order = Input::get('order'); $i = 1; foreach($order as $position) { $chapter = Chapter::where('book_uuid', $uuid)->where('order', $position)->first(); $chapter->order = $i; $chapter->save(); $i++; } } THE PROBLEM The issue I'm having with this approach is that it wont work in some circumstances, the loop causes problems. e.g. LOOP 1: FIND Chapter where order = 2 and change order to 1 LOOP 2: FIND Chapter where order = 1 and change it to 2 The problem here is that in LOOP 2 it is finding result of LOOP 1 and updating this instead... I think... This problem is confusing me quite a bit... But I'm 99% sure the foreach loop in my controller is the problem and I'm not sure the best approach to fix this. Resources to link to this question: How To Use Jquery UI Sortable in Laravel 4 Serialize data for AJAX using HTML5sortable THE A…
tagged with: laravel
type: Question
possible better answer: http://stackoverflow.com/a/42140444
score: 4
has answer: http://stackoverflow.com/a/42140444
has title: Saving serialised sortable data from jQuery/ajax using Laravel 4+
answer count: 2
tagged with: laravel-4
has comment: http://stackoverflow.com/comment/41216224
tagged with: javascript

http://stackoverflow.com/a/26041967
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/26041770
has body: To access the last element of an array use length -1 events[events.length - 1].event_date if the response from the server is not sorted in any way you should filter first var sortedArray = $filter('orderBy')($scope.events, '-event_date'); var lastDate = sortedArray[sortedArray.length - 1].event_date hope this gets you on the way.
score: 1
upvote count: 1

http://stackoverflow.com/a/26088828
type: Answer
has body: That's not JavaScript. It's a Grails GSP expression using a taglib and Groovy code. It generates JavaScript at runtime which gets written to the HTML sent to the browser, and that's why it works when it's in the GSP. But there is no processing of .js files to look for GSP expressions, taglib calls, Groovy code, etc. - those files are assumed to be just static JavaScript. To use this in a .js file you need to get the generated JavaScript code, and this is available from your browser - view the source of the generated page to see it.
score: 0
answers question: http://stackoverflow.com/q/26076853

http://stackoverflow.com/a/26163174
has body: PHP only prints HTML. So whatever you want to be done using HTML, you just have to echo that HTML using PHP. So for this case: echo ' ';
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26162918

http://stackoverflow.com/a/26175195
type: Answer
has comment: http://stackoverflow.com/comment/41039248
answers question: http://stackoverflow.com/q/26175055
has comment: http://stackoverflow.com/comment/41039756
has body: remove return statement: &lt;asp:Button ID="btnDimensionDel" runat="server" Text="Delete" OnClientClick="watchdelete()" OnClick="btnDimensionDel_Click" /&gt;
has comment: http://stackoverflow.com/comment/41040099
score: 0
has comment: http://stackoverflow.com/comment/41039296

http://stackoverflow.com/comment/40974823
type: AnswerComment
type: Comment
has text: I have flagged it. You guys may go ahead. @NiettheDarkAbsol I would appreciate if you remove your downvote. I believe this question will be closed eventually.
comment on: http://stackoverflow.com/a/26140645
score: 0

magento
tags question: http://stackoverflow.com/q/26119392
tags question: http://stackoverflow.com/q/26112358
tags question: http://stackoverflow.com/q/26192976
tags question: http://stackoverflow.com/q/26168306
tags question: http://stackoverflow.com/q/26035336
tag name: magento
tags question: http://stackoverflow.com/q/26091926
tags question: http://stackoverflow.com/q/26093139
tags question: http://stackoverflow.com/q/26178393
type: Tag

http://stackoverflow.com/comment/41058191
has text: Please see updated answer and fiddle which addresses this question.
comment on: http://stackoverflow.com/a/26185440
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26107959
tagged with: jquery
has body: I'm using jquery-steps on a project. But i can't find any way to add an icon to the Previous or Next buttons. I modified the javascript with the following code: labels: { next: "&amp;raquo;", previous: "&amp;laquo;" } But this is not what I like. this is the plugin url: http://www.jquery-steps.com/ Someone knows a way to do this? Thanks in advance!
answer count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: wizard
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26108184
score: 1
upvote count: 1
type: Question
tagged with: jquery-steps
has title: Icons on jquery-steps "Next" and "Previous" Buttons
has answer: http://stackoverflow.com/a/26108120
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/29520061
answers question: http://stackoverflow.com/q/26103362
type: Answer
downvote count: 2
score: -2
has body: Using the example you linked, noted my comments with //: "drawCallback": function ( settings ) { var api = this.api(); var rows = api.rows( {page:'current'} ).nodes(); var last=null; api.column(2, {page:'current'} ).data().each( function ( group, i ) { //Create vars with each element you want to sum here if ( last !== group ) { $(rows).eq( i ).before( //Get row data here, sum it in vars to display '&lt;tr class="sum group"&gt;&lt;td&gt;'+SumCol1+'&lt;/td&gt;&lt;td&gt;'+SumCol2+'&lt;/td&gt; //End sum row '&lt;tr class="group"&gt;&lt;td colspan="5"&gt;'+group+'&lt;/td&gt;&lt;/tr&gt;' ); last = group; //Don't forget to clear your sum vars at the end of each loop! } } ); }
upvote count: 0
has comment: http://stackoverflow.com/comment/134837266

http://stackoverflow.com/comment/40949609
type: AnswerComment
has text: Sorry, but I'm perfectly confident in the placement of my vote. It took far too much work on my part to get to those changes that were actually made. I think you're just having trouble accepting that you didn't really understand jQuery's event system, and were a bit embarrassed by it. You don't need to be embarrassed. Just show a little humility next time rather than making snarky, condescending comments in order to hide the fact. Now you're trying to play a game where there are observers noting my supposed failure of a personality test. That bothers me not. I'm very secure in myself.
type: Comment
comment on: http://stackoverflow.com/a/26125597
score: 0

http://stackoverflow.com/comment/40936362
type: QuestionComment
has text: Yes, I posted the answer below :)
comment on: http://stackoverflow.com/q/26118587
score: 0
type: Comment

http://stackoverflow.com/a/26192932
has body: The think the problem is the type value you have specified. You have a extra ; at the end of type attribute value. So either change it to text/javascript or remove the type attribute entirely type This attribute identifies the scripting language of code embedded within a script element or referenced via the element’s src attribute. This is specified as a MIME type; examples of supported MIME types include text/javascript, text/ecmascript, application/javascript, and application/ecmascript. If this attribute is absent, the script is treated as JavaScript.
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26192887
answers question: http://stackoverflow.com/q/26192887
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/comment/40905214
has text: I think because my button is dynamically generated I need to use jquery find?
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26098222
score: 0

http://stackoverflow.com/q/26094802
has answer: http://stackoverflow.com/a/26094861
has answer: http://stackoverflow.com/a/26094972
accepted answer: http://stackoverflow.com/a/26094972
has body: Noob here wants to know how you can validate two fields using a javascript function. For example the online javascoipt code needs to validate two fields fieldx and fieldy function checkdate(input) { var validformat = /^\d{2}\/\d{2}\/\d{4}$/ //Basic check for format validity var returnval = false if (!validformat.test(input.value)) alert("Invalid Date Format. Please correct and submit again.") else { //Detailed check for valid date ranges var monthfield = input.value.split("/")[0] var dayfield = input.value.split("/")[1] var yearfield = input.value.split("/")[2] var dayobj = new Date(yearfield, monthfield - 1, dayfield) if ((dayobj.getMonth() + 1 != monthfield) || (dayobj.getDate() != dayfield) || (dayobj.getFullYear() != yearfield)) alert("Invalid Day, Month, or Year range detected. Please correct and submit again.") else returnval = true } if (returnval == false) input.select() return returnval } &lt; /script&gt; Question How do I use the JavaScript to validated both the fields. I have tried &amp;&amp; but didnt work. &lt;cfform action="someactionyoutake.cfm" method ="POST" onSubmit="return checkdate(document.formname.fieldx &amp;&amp; document.formname.fieldy)"&gt; Thanks in advance
type: AnsweredQuestion
has title: Javascript onSubmit Validation
has comment: http://stackoverflow.com/comment/40937776
has comment: http://stackoverflow.com/comment/40891984
has answer: http://stackoverflow.com/a/26094942
has comment: http://stackoverflow.com/comment/40891752
type: Question
answer count: 3
tagged with: validation
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26094861
score: 0
tagged with: coldfusion

http://stackoverflow.com/comment/41032500
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26111166
has text: So I was center scaling it, like I side, it's not true 3d rotation, but as long as it is precede to be seen as so, that's all I need.
score: 0

http://stackoverflow.com/a/26096420
answers question: http://stackoverflow.com/q/26096066
type: Answer
has body: i think you want something like this Js Fiddle $(this).find('span').toggleClass('transform');
score: 0

http://stackoverflow.com/q/26040282
has comment: http://stackoverflow.com/comment/40791269
possible better answer: http://stackoverflow.com/a/26040525
has answer: http://stackoverflow.com/a/26040525
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/40791257
accepted answer: http://stackoverflow.com/a/26040430
tagged with: javascript
score: 4
answer count: 3
downvote count: 0
has title: Nest JSON from array
has comment: http://stackoverflow.com/comment/40791225
favorite count: 0
has body: I am trying to achieve something which seemed very basic but is getting me mad over the last days. I have a simple array : ["a","b","c","d","e"] and I want to turn it into a nested JSON like this: {"a":{"b":{"c":{"d":{"e":""}}}}} Looping over it, I ran in problems like "how do you save the last key to set it afterwards without erasing it" and so on. Does anyone has an idea?
has answer: http://stackoverflow.com/a/26040430
has answer: http://stackoverflow.com/a/26040692
type: AnsweredQuestion

http://stackoverflow.com/comment/41023521
score: 0
has text: @sarvesh Done. I've run the code again today, and after a small edit to the function, it got through about 30 users and stopped.
comment on: http://stackoverflow.com/q/26150579
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26079868
possible better answer: http://stackoverflow.com/a/26080045
downvote count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/40864012
answer count: 2
has comment: http://stackoverflow.com/comment/40864068
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26080020
has answer: http://stackoverflow.com/a/26080045
has title: How to get value in for area?
upvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26080020
has comment: http://stackoverflow.com/comment/40864314
has comment: http://stackoverflow.com/comment/40864260
has body: i want to make a www like this! Random Number Type: Scol: i want to people first type the numbers in the upper textbox , then click the button.And show the random number in the below textbox and count how many numbers is matched between the upper textbox and the below textbox. I have no idea what's wrong with the code. Can anyone help me?
type: AnsweredQuestion

http://stackoverflow.com/q/26116041
has comment: http://stackoverflow.com/comment/40929532
score: -1
has comment: http://stackoverflow.com/comment/40929441
has body: Why eval() does not evaluate expression like eval(2/2(2))
answer count: 1
has comment: http://stackoverflow.com/comment/40929641
tagged with: javascript
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has title: Calculate mathematical operation using javascript eval()
has comment: http://stackoverflow.com/comment/40929593
downvote count: 2
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40929500
has answer: http://stackoverflow.com/a/26116238

http://stackoverflow.com/q/26085272
accepted answer: http://stackoverflow.com/a/26268622
tagged with: jquery
tagged with: dropzone.js
answer count: 2
downvote count: 0
possible better answer: http://stackoverflow.com/a/39562493
has answer: http://stackoverflow.com/a/39562493
favorite count: 0
score: 8
upvote count: 8
tagged with: php
has answer: http://stackoverflow.com/a/26268622
type: AnsweredQuestion
has body: In dropzone.js , there is an event error, however I can not find any documentation on how to trigger this from PHP. I have tried sending various header() responses from PHP including, 404, 500, 503, and so on yet this event has not fired. What I am looking to do, is the server checks the mime to see if it is valid, and if it is not valid, I discard the file, and ideally -- return an error so that dropzone can respond accordingly. From the javascript side, I have tried the following : .on("complete", function(file,response) { console.log(response); } .on("error", function(file,response) { console.log(response); } .on("success", function(file,response) { console.log(response); } ... however, response is undefined, even if i return JSON or plain text from the php script. It doesn't appear that dropzone.js supports getting the full server response or at least it doesn't elevate it to the custom handler. The ONLY place I have seen any reference to passing a second param on events is here on SO in other questions that are not directly asking this question. There must be a way to get the server response (as I have done in the past with other uploader javascript such as jQuery POST, and jqUpload, and so on). It seems rather silly that I can't trigger a command to signal the upload failed -- even if the file transfer completed -- as it still needs to wait on the script for a response. --- This means I am likely overlooking something, which is why I am calling for assistance as their documentation reveals absolutely nothing with regards to how a server should respond --- language irrelevant, however in my case, I am using PHP. Thanks in advance.
has title: How can I trigger the error event in DropZone using PHP?
type: Question
tagged with: javascript

http://stackoverflow.com/comment/40923481
type: AnswerComment
score: 0
type: Comment
has text: Oh I see... I was developing a webapp of my own and was running Chrome with the '--disable-web-security' flag. Useful during development. Indeed this will not work with a CORS request in an usual environment.
comment on: http://stackoverflow.com/a/26112148

http://stackoverflow.com/comment/41104908
comment on: http://stackoverflow.com/a/26193697
type: Comment
score: 0
type: AnswerComment
has text: can you please tell me this type for my path value ? because i have just only Beamwidth value.

http://stackoverflow.com/comment/40984859
score: 0
type: Comment
type: QuestionComment
has text: That's awesome the first case of the code highlighter helping someone solve their own problem :)
comment on: http://stackoverflow.com/q/26145943

angular-strap
tag name: angular-strap
tags question: http://stackoverflow.com/q/26138722
tags question: http://stackoverflow.com/q/26179599
type: Tag

http://stackoverflow.com/a/26122164
has comment: http://stackoverflow.com/comment/40941003
has body: Why don't you use JSON format that is handled by both languages? you could do something like this: &lt;?php $chartJSON = json_encode($chartdata); ?&gt; &lt;script type="text/javascript"&gt; json = "&lt;?php echo $chartJSON;?&gt;"; var TimData1 = JSON.parse(json); &lt;/script&gt;
answers question: http://stackoverflow.com/q/26121929
type: Answer
score: 0

http://stackoverflow.com/comment/40932086
type: Comment
has text: I agree, maybe put that in your question? I think saying whitespace in a file name is a bad idea is a blanket statement and could be perceived in many different ways, that's all (:
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26117268

http://stackoverflow.com/comment/41060327
comment on: http://stackoverflow.com/a/26183709
type: Comment
has text: Remember to accept the answer, if you think it is the right one ;)
score: 0
type: AnswerComment

http://stackoverflow.com/q/26034315
type: Question
has comment: http://stackoverflow.com/comment/40780928
tagged with: javascript
has body: I would like to remove some hosting imposed google ads on my phpbb board. Currently I accomplish this by deleting via javascript all the banners divs when the page is loaded. But unfortunately in that way advertisements are quickly displayed before disappearing. Now I am thinking about a different (neater) approach to my problem: maybe I might write some javascript code which interferes with the one injected by google thus generating the inability to show those annoying divs... Any idea? EDIT I can't edit html and css, I am just allowed to insert any html/javascript/css code in a separate "widget". This is for testing purposes and I have the admin permission to try ... My current code follows &lt;script type="text/javascript"&gt; window.onload = function(){ document.getElementById('ad').getElementsByTagName('div')[0].outerHTML=''; document.getElementById('ad2').outerHTML=''; document.getElementById('footer').outerHTML=''; document.getElementById('ad3').getElementsByTagName('a')[1].outerHTML=''; }; &lt;/script&gt;
has answer: http://stackoverflow.com/a/26034712
score: 0
tagged with: banner
answer count: 2
has title: Generate javascript errors on purpose
has comment: http://stackoverflow.com/comment/40780556
type: UnansweredQuestion
tagged with: adsense
tagged with: ads
tagged with: conflict
has answer: http://stackoverflow.com/a/26034694
has comment: http://stackoverflow.com/comment/40781777

http://stackoverflow.com/q/26171844
favorite count: 0
has comment: http://stackoverflow.com/comment/41032853
accepted answer: http://stackoverflow.com/a/26172048
has title: How to use an image as a frame, and scroll inside? Simulating a phone on a website
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26172048
downvote count: 0
has comment: http://stackoverflow.com/comment/41034041
type: Question
score: 1
tagged with: javascript
has body: I'm not sure what this is called, but how do developers accomplish being able to have, say a hollow image of a Nexus phone, and then scroll content inside of it? It's an ingenious way to simulate how a product will work in real life, so how does one pull this off? Here's an example, about halfway down the page. http://grupoweb.upf.edu/innova/q_kly/#step-6 @silversunhunter I am able to get both images displayed, but the content seems to be completely obscuring the parent div. I measured the images and the dimensions are correct afaik. css: .nexus5-frame { background: url(img/nexus5frame.png); height:640px; width:326px; position: relative; } .nexus5-content { overflow: scroll; height: 515px; width: 292px; position: absolute; left: 26px; top 597px; } HTML: &lt;div class="col-lg-5 col-lg-offset-2 col-sm-6"&gt; &lt;div id="nexus5-frame"&gt; &lt;div id="nexus5-content"&gt; &lt;img src="img/content.png"/&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;
upvote count: 1
answer count: 1
tagged with: web

http://stackoverflow.com/comment/40972776
type: QuestionComment
has text: First check the length of captured links with : document.getElementsByClassName('_5syj').length
comment on: http://stackoverflow.com/q/26139742
score: 0
type: Comment

gmail
type: Tag
tags question: http://stackoverflow.com/q/26065603
tags question: http://stackoverflow.com/q/26077023
tag name: gmail
tags question: http://stackoverflow.com/q/26147761

http://stackoverflow.com/a/26169058
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26162649
type: Answer
answers question: http://stackoverflow.com/q/26162649
score: 2
upvote count: 2
has body: I've no idea how to nicely solve this. But peeking into the generated HTML, one sees the following for the "Stations" link in the popup: ... Stations One could use some jQuery trickery to get the new URL from those links when clicked, and load a new layer using that: // Handle any link that ends in .kml ourselves: $("body").on("click", "a[href$='.kml']", function(event) { event.preventDefault(); var newURL = $(this).attr("href"); createCRUTEMlayer(newURL); }); This adds the Station markers (and their popups), but does not remove them until the page is refreshed. I don't know enough of these layers to remove them when clicking somewhere else, but I'm sure it's doable. Beware that this is a dangerous hack as the contents of the third party KML file can change. If, for example, the links in the KML no longer end with .kml, then the jQuery selector won't find them anymore. Also, this handles all links that end in .kml. One could limit jQuery to the Google Maps info box using on("click", ".gm-style-iw a[href$='.kml']", ... but that would introduce a dependency on the Google Maps HTML. Full snippet below. KML Layers
type: AcceptedAnswer

http://stackoverflow.com/a/26121424
has comment: http://stackoverflow.com/comment/40939646
has comment: http://stackoverflow.com/comment/40996696
upvote count: 3
has comment: http://stackoverflow.com/comment/40939658
has comment: http://stackoverflow.com/comment/40939447
score: 3
accepted answer of: http://stackoverflow.com/q/26121307
has comment: http://stackoverflow.com/comment/40939105
has comment: http://stackoverflow.com/comment/40939178
has body: You've bound a string value to numeric type and expect automatic type conversion to happen during binding. This won't work because first and foremost KnockoutJS is a Javascript framework which knows nothing about Typescript's Type System. You could either make the property a writeable-computed observable or introduce a read-only computed observable that simply runs the current value of "myProp" through parseInt().
answers question: http://stackoverflow.com/q/26121307
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40939047
has comment: http://stackoverflow.com/comment/40938993
type: Answer
has comment: http://stackoverflow.com/comment/40939056

http://stackoverflow.com/comment/40939515
has text: Hmm, that's a bit more complicated.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26113210
type: AnswerComment

http://stackoverflow.com/comment/41048811
type: QuestionComment
comment on: http://stackoverflow.com/q/26180018
has text: @AmitJoki i define the var of numSelec with this line **var numSelec = arrayOfSelectOfCountry[arrayOfSelectOfCountry.length-1];**
score: 0
type: Comment

http://stackoverflow.com/comment/52406048
has text: I found that I have loaded my files in correct order, but still getting the error and dataTables not working properly. Please help.
type: AnswerComment
comment on: http://stackoverflow.com/a/26165264
type: Comment
score: 13

http://stackoverflow.com/q/26068689
has comment: http://stackoverflow.com/comment/40844396
has comment: http://stackoverflow.com/comment/40845908
type: Question
has title: Anchor tags disappearing inside an expanding DIV
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40843751
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
tagged with: css
has body: HTML: Plan Search Advanced Plan Search TEST LINK Feature Under Construction CSS: .ac_subitem { width:1000px; height:0px; /* animate to 400px */ top:50%; right:0px; margin-top:0px; /* animate to -200px */ position:fixed; z-index:99; overflow:hidden; background:transparent url(../images/bg_menu.png) repeat top left; } Basically, I have a navigation set up via each contains an expandable . What I am trying to do is add anchor tags to external links within these s however the text/image used will not show up, the anchor is there and clickable but the contact itself will not appear, thus leaving me with a clickable blank space. any ideas? Note: I do have the JS used to perform these actions, but it is quite lengthy. If necessary I can post that as well. thanks for your time in advanced! Edit: Here is the fiddle for whole code used http://jsfiddle.net/8smk6mhs/. It doesn't seem to load properly in jsFiddle, however everything is loading fine using provided code in Dreamweaver6 links to jQuery and http://yourjavascript.com/0073145129/center-menu.js load it properly. Also a link to the completed template purchased for this project in comments. Edit2: Have since gone through, validated, cleaned up the code. I have been trying to work through this problem for days now, and cannot grasp why this is happening. the fact that the anchor is active and works but Just cannot properly display contents of anchor is what really confuses me. *I've updated the Fiddle.
answer count: 0

http://stackoverflow.com/a/26073494
downvote count: 0
has body: The GetDomains function does not have access to the domainService scope, where you have injected the $http service. You should change your code to something like this : .service("domainService", function ($http, $q, domainList) { return { getDomain: function (handleSuccess, handleError) { $http.get(domainList).then(handleSuccess, handleError); } }; }); You should also define the handleSuccess and the handleError callbacks, surely as parameters of your getDomain function.
type: Answer
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/87044006
accepted answer of: http://stackoverflow.com/q/26073414
answers question: http://stackoverflow.com/q/26073414
type: AcceptedAnswer

http://stackoverflow.com/q/26155330
has comment: http://stackoverflow.com/comment/41004550
upvote count: 1
answer count: 1
has title: Youtube video api in JavaScript
favorite count: 0
has comment: http://stackoverflow.com/comment/41004417
tagged with: youtube-javascript-api
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: youtube-api
has comment: http://stackoverflow.com/comment/41004582
type: Question
has answer: http://stackoverflow.com/a/26157993
accepted answer: http://stackoverflow.com/a/26157993
has body: I have used the YouTube video API in JavaScript And play pause and stop events I have used Now I got total current time which total watched time, but my main problem is this: Watch a video for a few seconds and fast forward, then watch another few seconds and see what time it records.... If I watch a video for 5 seconds, then fast forward to minute 10 and watch another 5 seconds, the time I actually watched the video is 10 seconds, not 10 minutes. Here is my code : function onytplayerStateChange(event) { //alert("Status=&gt;"+event.data); if(event. data == 1) { if(Math.floor(event.target.A.currentTime) == 0) { previous_track_time = current_track_time = 0; total_track_time = event.target.A.duration; } else { previous_track_time = current_track_time; current_track_time = event.target.A.currentTime; } } if(event.data == 2) { current_track_time = event.target.A.currentTime; total_track_time =(event.target.A.duration-(current_track_time-previous_track_time)); previous_track_time = current_track_time; } } Can you fix that please?
tagged with: javascript

http://stackoverflow.com/comment/41131435
has text: was this ans helpful ?
type: Comment
comment on: http://stackoverflow.com/a/26185466
score: 0
type: AnswerComment

http://stackoverflow.com/q/26187993
downvote count: 1
has comment: http://stackoverflow.com/comment/41063151
has title: What is the most efficient way to modify DOM elements and limit reflow?
tagged with: javascript
type: AnsweredQuestion
favorite count: 0
type: Question
has body: When working with a very dynamic UI (think Single Page App) with potentially large JS libraries, view templates, validation, ajax, animations, etc... what are some strategies that will help minimize or reduce the time the browser spends on reflow? For example, we know there are many ways to accomplish a DIV size change but are there techniques that should be avoided (from a reflow standpoint) and how do the results differ between browsers? Here is a concrete example: Given a simple example of 3 different ways to control the size of a DIV when the window is resized, which of these should be used to minimize reflows? http://jsfiddle.net/xDaevax/v7ex7m6v/ //Method 1: Pure Javascript function resize(width, height) { var target = document.getElementById("method1"); target.setAttribute("style","width:" + width + "px"); target.setAttribute("style", "height:" + height + "px"); console.log("here"); } // end function window.onresize = function() { var height = (window.innerHeight / 4); var width = (window.innerWidth / 4); console.log(height); resize(height, width); } //Method #3 Jquery animate $(function() { $(window).on("resize", function(e, data) { $("#method3").animate({height: window.innerHeight / 4, width: window.innerWidth / 4}, 600) }); });
score: 5
tagged with: reflow
answer count: 1
has answer: http://stackoverflow.com/a/26187994
upvote count: 6
tagged with: performance
accepted answer: http://stackoverflow.com/a/26187994

http://stackoverflow.com/comment/41055955
has text: Still missing the `[]` after `price` (you removed it from the `for` while you needed to add it). **Edit:** wait let me test something. **Edit 2:** Yes, definitely need to add the bracket.
comment on: http://stackoverflow.com/a/26183909
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26130481
tagged with: arrays
tagged with: angularfire
has comment: http://stackoverflow.com/comment/41021669
tagged with: angularjs
has body: I am moving tasks to a new array to show activity as tasks are completed. I need to be able to move them out of that array if a task becomes unchecked. Is there a way to reference newly created items by referencing the item is was created from? Here is a plnkr to show what I have working so far: http://plnkr.co/edit/XnNqej When I run the isComplete function I add the task to a new array. That's where I think I need to remove it as well. $scope.isCompleteTask = function(task) { if (task.completeTime) { task.completeTime = ''; //would like to delete it from a different list here } else { task.completeTime = Firebase.ServerValue.TIMESTAMP; $scope.activity.$add(task); //add it here } $scope.list.$save(task); };
has comment: http://stackoverflow.com/comment/40976234
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41020067
has title: Moving completed tasks to a new array and then removing them from the new array if the task is unchecked?
tagged with: firebase
has comment: http://stackoverflow.com/comment/40972825
tagged with: javascript
has comment: http://stackoverflow.com/comment/40977054
type: Question
score: 0

http://stackoverflow.com/comment/40927053
has text: Have you tried something yourself? Can you post that code?
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26114684

http://stackoverflow.com/a/26201378
upvote count: 2
has comment: http://stackoverflow.com/comment/41187013
downvote count: 1
has comment: http://stackoverflow.com/comment/41185257
type: Answer
has comment: http://stackoverflow.com/comment/41193086
answers question: http://stackoverflow.com/q/26116463
has comment: http://stackoverflow.com/comment/41182321
has comment: http://stackoverflow.com/comment/41182788
score: 1
has body: PeerJS is what you're looking for: http://peerjs.com
has comment: http://stackoverflow.com/comment/41182836

http://stackoverflow.com/comment/126255592
type: Comment
comment on: http://stackoverflow.com/a/71199110
type: AnswerComment
score: 5
has text: useEffect hook is only available in React not JavaScript....

http://stackoverflow.com/a/26175382
has comment: http://stackoverflow.com/comment/41039240
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26175287
downvote count: 1
has body: I'm not sure whether I get your question right. To hide the field at the begin add this javascript code: $("#newsletterCheckbox").change(function () { EmailTextboxVisibility(); }); function EmailTextboxVisibility(){ if ($("#newsletterCheckbox").is(":checked")) { $("#newsletterInputfield").show(); } else { $("#newsletterInputfield").hide(); } } $( document ).ready(function() { EmailTextboxVisibility(); }); This will hide your email textbox at the begin when the checkbox isn't checked. here my jsfiddle
has comment: http://stackoverflow.com/comment/41039324
upvote count: 1

http://stackoverflow.com/q/26089185
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/26089276
has comment: http://stackoverflow.com/comment/40881543
has comment: http://stackoverflow.com/comment/40881166
has comment: http://stackoverflow.com/comment/40881364
tagged with: javascript
has comment: http://stackoverflow.com/comment/40881179
has body: I've had a look round and I'm a little confused. There seems to be several responses to my particular problem but I don't fully understand. So if anybody could help that'd be great! Basically, I set a variable var firstThumb = "02" And I want to increase it function thumbIncrease() { firstThumb++ }; on an interval setInterval(function(){ getThumb.trigger("click"); thumbIncrease(); }, 5000); Basically what I expect to happen is - Every 5 seconds a click is triggered, and I want my firstThumb variable to increase by 1. So 02, click, 03, click, 04, click.... So each time it clicks a different element. Any help would be great! Thanks!! EDIT Thanks for the responses! I kind of understand now! So the reason I've got a 0, is more for me than for the code. I currently have 15 things that I need clicking. 01 and 15 being 2 characters, meaning my code looks neater. Should I just man up and remove the 0? Or is there a better way of doing it?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40881190
has answer: http://stackoverflow.com/a/26089241
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40887858
type: Question
has title: jQuery - Variable Increment +1
has comment: http://stackoverflow.com/comment/40881158
accepted answer: http://stackoverflow.com/a/26089241
possible better answer: http://stackoverflow.com/a/26089276
has comment: http://stackoverflow.com/comment/40881162

http://stackoverflow.com/q/26082686
downvote count: 2
upvote count: 1
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40869308
has comment: http://stackoverflow.com/comment/40869316
has title: JavaScript string comparison always returns true
score: -1
has comment: http://stackoverflow.com/comment/40869331
has comment: http://stackoverflow.com/comment/40869279
answer count: 2
has answer: http://stackoverflow.com/a/26082712
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/26082712
has body: I'm doing my first project using AngularJS and now i've run into a JavaScript problem that just can't understand. Perhaps this is trivial to someone more experienced in JS, if so i hope you guys can help me :) I've doing this string comparison in function, that receives an id passed as a parameter from a view, which it then compares to id of objects kept in the service: for (var i = 0; i < this.Sessions.length; i++) { if (this.Sessions[i].sessionId === sessionId) { for (var j = 0; j < this.Sessions[i].Instances.length; j++) { if (this.Sessions[i].Instances[j].instanceId === instanceId); { console.log("InstanceId's: " + this.workoutSessions[i].Instances[j].instanceId + " " + instanceId); //Do stuff and return. } } } } When i run the method all the instanceId's of all the instances will evaluate to true.. Why??? As far as i know i'm just comparing strings, but i guess not. The outer comparison works as it should, which makes it even stranger to me. Output in console, showing that they evaluate to true no matter the value of the strings. InstanceId's: l0h34qzzgdlpu8fr 42p9smh9kxdsfw29 InstanceId's: 42p9smh9kxdsfw29 42p9smh9kxdsfw29 Really what i want to do is stop the function as soon as i've found the correct instance, but if i put in a return statement inside the IF-block my compiler tells me the j++ statement is unreachable, indicating no matter what the expression is going to be true, and... that is just beyond me. How the parameter is passed from the view: //Some form controls here... + 1 Remove Can anybody help?? Thanks in advance.
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40869420
possible better answer: http://stackoverflow.com/a/26082939
has answer: http://stackoverflow.com/a/26082939

http://stackoverflow.com/q/26121307
has answer: http://stackoverflow.com/a/26121424
tagged with: typescript
type: AnsweredQuestion
upvote count: 3
has comment: http://stackoverflow.com/comment/40940315
accepted answer: http://stackoverflow.com/a/26121424
tagged with: knockout.js
type: Question
has body: I use Knockout version 3.2.0 and its definitelyTyped definitions from nuget: I have a property bound to an input (type number) with value binding, the property definition is: export class SomeClass { myProp: KnockoutObservable&lt;number&gt;; constructor() { myProp = ko.observable(0); } } Now, fiddling with console, when the class is initialized the property returns 0 when called. However, after I change the value in the input, the property starts to return string, e.g. if I change it to 2, the returned value is "2". This is obviously a problem when adding two such properties together. var x = myinstance.myProp() + myinstance.myProp(); The result is not 4, as you would expect it to be, the result is actually "22", the concatenation. Is there any reasonable solution? Is it a bug in knockout or a documented behaviour?
tagged with: javascript
has title: KnockoutObservable<number> returns string when bound to an input in typescript
has comment: http://stackoverflow.com/comment/40938857
score: 3
downvote count: 0
answer count: 1
favorite count: 0

http://stackoverflow.com/a/26171375
has body: You can use querySelector or querySelectorAll. If you add a class to your links you can distinguish one from a pair easily. A (qs) B (qs) Now your code becomes var links = document.querySelectorAll("#menu-sub-shops a.pickme"); for (var i = 0; i < links.length; i++) { var text = links[i].text; var href = links[i].href; }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26171141

http://stackoverflow.com/a/26143086
answers question: http://stackoverflow.com/q/26141668
downvote count: 0
score: 1
upvote count: 1
type: Answer
has body: Check for missing brackets in If-Statement: the function will currently always break after it because of the RETURN FALSE. Try it this way, with brackets: function btnSave_Click() { alert("1"); if (!Page_ClientValidate('vgFormVals')) { alert("2"); return false; } alert("3"); document.getElementById('hfFilename').value = btnUpload_onclick(document.getElementById('SessionID').value); document.getElementById('btnSubmit').click(); alert("4"); }

http://stackoverflow.com/a/26226724
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26111766
answers question: http://stackoverflow.com/q/26111766
has body: The real reason my code wasn't working was because the variables bound to the textarea and select were not considered dependencies for the canSubmit computed property. I found this out in the documentation here. The solution, as on the site, was to access those variables initially, e.g. enableSubmit: function () { this.genesString; //Adding these this.gene_search.experiments; //lines fixed the problem switch (this.search_type) { case "gene": return this.genesString.length &gt; 0 &amp;&amp; this.gene_search.experiments.length &gt; 0; case "experiment": return this.experiment_search.experiment.length &gt; 0; default: return false; } },

http://stackoverflow.com/a/26113516
has body: You can pass any data to controller using ajax -: Get values you want to a javascript variable and check a sample ajax $.ajax({ dataType: "html", type: "POST", evalScripts: true, url: '&lt;?php echo Router::url(array( 'controller'=&gt;'controller','action'=&gt;'action'));?&gt;', data: ({type:variable-value }), success: function (data){ return true; // $("#div").html(data); } });
answers question: http://stackoverflow.com/q/26112980
type: Answer
score: 0

http://stackoverflow.com/comment/99813617
comment on: http://stackoverflow.com/a/32444643
score: 0
type: AnswerComment
has text: Indeed, this was the solution to my problem to deploy a dockerized meteor app, at docker-compose up. It works like a charm, Thanks !
type: Comment

http://stackoverflow.com/comment/41045570
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26178972
has text: That's a nice idea! I would prefer having a real separate `HTML`page included, but I'll use your idea if it's not possible!
score: 0

http://stackoverflow.com/comment/40885732
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26091492
type: Comment
has text: True. OP could use a text to image code from `ImageCreate`. Similar to what I use for anti-botting. Not a CAPTCHA though, as suggested under OP's question, that'd be overkill.

http://stackoverflow.com/q/26128810
downvote count: 0
favorite count: 0
has title: how to trigger Emberjs actions defined in itemController
has answer: http://stackoverflow.com/a/26130099
tagged with: ember.js
tagged with: ember-controllers
type: AnsweredQuestion
score: 1
upvote count: 1
has body: Is there way a way to trigger an action defined in the itemController. When I trigger the action with , it throws Uncaught Error: Nothing handled the event 'inItem'.. If I set the target for the action with , it throws the error, Uncaught TypeError: Cannot read property 'apply' of undefined. How do I trigger the action defined in the itemController. App = Ember.Application.create({ LOG_TRANSITIONS: true }); App.Router.map(function(){ this.resource('posts'); }); App.PostsRoute = Ember.Route.extend({ model: function(){ return [ {title: 'success'}, {title: 'winning'}, {title: 'breakthrough'} ]; } }); App.PostsController = Ember.Array.extend({ itemController: 'post' }); App.PostController = Ember.ObjectController.extend({ isSelected: false, actions: { inItem: function(){ this.set('isSelected', true); //alert('hi'); } } }); JS Bin
accepted answer: http://stackoverflow.com/a/26130099
type: Question
tagged with: javascript
answer count: 1

http://stackoverflow.com/comment/40968558
score: 0
type: Comment
has text: You solution is good for TWO select boxes, but for three and more, it will unhide options, that were selected in one of other two
comment on: http://stackoverflow.com/a/26137399
type: AnswerComment

http://stackoverflow.com/q/26158843
has comment: http://stackoverflow.com/comment/41008137
tagged with: javascript
linked to: http://stackoverflow.com/q/905298
type: AnsweredQuestion
has title: Assigning the value of a callback to a variable shorthand
type: Question
has answer: http://stackoverflow.com/a/26158928
has body: Probably this question has been asked before, I did my "Google homeworks" without results (it's kind of difficult to ask this as a question). I find myself doing this often with async callbacks: var wow; myFunction(function(something) { wow = something; }); Is there a shorthand to assign the value contained in the callback function to a variable, like above? I can't change the code of the myFunction. Possible real case scenario (with Angular): $http.get(url).success(function(res) { $scope.data = res; }
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26158928

http://stackoverflow.com/q/26115663
has title: Knockout Circular Reference (Simple Currency Converter)
upvote count: 1
type: Question
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26115783
tagged with: knockout.js
accepted answer: http://stackoverflow.com/a/26115783
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I'm new to Knocout.JS so I have no idea how to accomplish my problem. Let's say I want to write a little currency converter. &lt;div&gt; Rate: &lt;input type="text" data-bind="value: Rate" /&gt; &lt;/div&gt; &lt;div&gt; USD: &lt;input type="text" data-bind="value: Dollar" /&gt; &lt;/div&gt; &lt;div&gt; EUR: &lt;input type="text" data-bind="value: Euro" /&gt; &lt;/div&gt; My model is: var viewModel = function() { this.Rate = ko.observable(0); this.Dollar = ko.observable(0); this.Euro = ko.computed(function() { return this.Dollar() * this.Rate(); }, this); } ko.applyBindings(new viewModel()); So I want to make sure that every textbox's change event updates another. For example if Dollar is updated I want to update Euro too. Changes in Rate will update Euro Changes in Dollar will update Euro Changes in Euro will update Dollar Here is my playground: http://jsfiddle.net/gnL4we9z/

http://stackoverflow.com/q/26058400
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40824419
has answer: http://stackoverflow.com/a/26058516
has title: Random Numb to display random link
downvote count: 1
has comment: http://stackoverflow.com/comment/40824277
type: Question
has answer: http://stackoverflow.com/a/26058612
score: -1
has comment: http://stackoverflow.com/comment/40831096
tagged with: random
answer count: 2
upvote count: 0
tagged with: arrays
tagged with: javascript
tagged with: floor
favorite count: 0
has body: I am making a page that shows a random link on it. In the JavaScript code, it includes an array of links and if the user does not have Java enabled, it automatically sets the link to YouTube. This is just an exercise that I got assigned, just letting you know. Currently, no link shows up. HTML: Working with Randoms Random Link JavaScript: var jsEnabled = navigator.javaEnabled(); var rand_link = document.getElementById("random_link"); if(jsEnabled=false;){ rand_link.innerHTML = "Default Link";} var link = new Array(5); link[0]="http://www.pageresource.com"; link[1]="http://www.javascriptcity.com;" link[2]="http://www.mydemos.com"; link[3]="http://www.yahoo.com"; link[4]="http://www.google.com"; var rand_int = Math.floor(Math.random()*5); rand_link.innerHTML = "Random Link!"

http://stackoverflow.com/q/26114552
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40926944
score: 1
has answer: http://stackoverflow.com/a/26114687
tagged with: jquery
tagged with: server-side
favorite count: 0
has comment: http://stackoverflow.com/comment/40926849
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/40927843
answer count: 2
has body: Lets say I want to do the JS execution, like, processing Javascript Elements but on the Server rather than exposing the code(s) on the client JS file. Something like, lets say: From the browser's side, lets say i will get the JS native window Object. Then i want to make all Javascript processing works (on that window Object) in the backend by passing it to backend via Ajax, or whatever. So as an very simple examples (to do on the Backend JS Server): Parse the window.location and do some codings related to it. Parse the window.document and do some codings related to it. And then return back to browser with the respective outcomes and then so on .. So that means, (based on this simple example), i want to perform the parsing and whatever coding works, related to window.location &amp; window.document Objects, in the backend (another) server. Just by passing this window Object to it. (Then return the already processed result back to the browser) So the user wont see what i am doing with this window object. ** Above is just a simple example. In fact, i want to pass some more complicated JS Objects and process at the backend. That obvious point here is, i do not want my main JS processing codes to be exposed to the users. Is this "concept" even possible please? (If possible, what is the ideal approach to this?) Especially for the BACKEND, what should i be running and HOW, please? Thanks
tagged with: node.js
has title: Javascript: How to execute at the Server Side (back-end)?
has comment: http://stackoverflow.com/comment/40926878
has comment: http://stackoverflow.com/comment/40926855
has comment: http://stackoverflow.com/comment/40927066
downvote count: 1
has comment: http://stackoverflow.com/comment/40928372
has answer: http://stackoverflow.com/a/26114673
tagged with: javascript
tagged with: serverside-javascript

http://stackoverflow.com/q/26039457
accepted answer: http://stackoverflow.com/a/26040207
has comment: http://stackoverflow.com/comment/40789503
type: AnsweredQuestion
has title: Cannot access variable in Javascript array. Console.log says undefined
has comment: http://stackoverflow.com/comment/40789856
has body: I have an object which contains an array that I then pass to another function in order for that function to use. The only thing is, when I go to access these variables, console.log says they are undefined. It's strange as when I log the whole array it ways the values are there but when I go to access the array element specifically, it returns undefined. Here is my code: googleMapsFunctions.prototype.calculateDistances = function() { var that = this; console.log(that.latLngArray); var closeClubs = []; var sortable = []; var resultsArray = []; jQuery(this.clubs).each(function(key, club) { var clubLatLng = new google.maps.LatLng(club.latitude, club.longitude); var distanceFromLoc = clubLatLng.distanceFrom(that, "", ""); //alert(distanceFromLoc); //that.clubs[key].distance = distanceFromLoc; //closeClubs.push(club); }); closeClubs.sort(function(a, b) { return a.distance - b.distance; }); } googleMapsFunctions.prototype.setLatLng = function() { var that = this; this.geocoder.geocode({'address' : this.location}, function(results, status) { if(status === "OK") { that.latLngArray.push(parseFloat(results[0].geometry.location.lat())); that.latLngArray.push(parseFloat(results[0].geometry.location.lng())); } }); } //Client Code var googleMapsClass = new googleMapsFunctions(JSONItems, searchTerm); googleMapsClass.setLatLng(); googleMapsClass.calculateDistances(); I am using console.log to print out the array (that.latLngArray) which gives the following: I then click on the aray brackets and it takes me to the following (which is the correct information). I just can't seem to access these variables and it says that they are undefined. Can anyone see what is happening here? Thanks
type: Question
has comment: http://stackoverflow.com/comment/40789765
tagged with: arrays
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40789615
score: 0
has answer: http://stackoverflow.com/a/26040207
has comment: http://stackoverflow.com/comment/40790655
tagged with: undefined
has comment: http://stackoverflow.com/comment/40789700

http://stackoverflow.com/comment/40989407
score: 0
comment on: http://stackoverflow.com/a/26148526
type: Comment
has text: I would like to know why this approach works, and why the first two I tried didn't.
type: AnswerComment

java
tags question: http://stackoverflow.com/q/26189940
tags question: http://stackoverflow.com/q/26137390
tags question: http://stackoverflow.com/q/26095068
tags question: http://stackoverflow.com/q/26134846
tags question: http://stackoverflow.com/q/26141309
tags question: http://stackoverflow.com/q/26087656
tags question: http://stackoverflow.com/q/26121464
tags question: http://stackoverflow.com/q/26171642
tags question: http://stackoverflow.com/q/26060261
tags question: http://stackoverflow.com/q/26136283
tags question: http://stackoverflow.com/q/26167306
tags question: http://stackoverflow.com/q/26105559
tags question: http://stackoverflow.com/q/26122780
tags question: http://stackoverflow.com/q/26110635
tags question: http://stackoverflow.com/q/26056808
tags question: http://stackoverflow.com/q/26118587
tags question: http://stackoverflow.com/q/26036876
tags question: http://stackoverflow.com/q/26139407
tags question: http://stackoverflow.com/q/26108857
tags question: http://stackoverflow.com/q/26119005
tags question: http://stackoverflow.com/q/26034288
tags question: http://stackoverflow.com/q/26094183
tags question: http://stackoverflow.com/q/26152764
tags question: http://stackoverflow.com/q/26120634
tags question: http://stackoverflow.com/q/26134951
tags question: http://stackoverflow.com/q/26059060
tags question: http://stackoverflow.com/q/26096059
tags question: http://stackoverflow.com/q/26037881
tags question: http://stackoverflow.com/q/26167607
tags question: http://stackoverflow.com/q/26084565
tags question: http://stackoverflow.com/q/26097953
tags question: http://stackoverflow.com/q/26058178
tags question: http://stackoverflow.com/q/26041374
tags question: http://stackoverflow.com/q/26094047
tags question: http://stackoverflow.com/q/26132374
tags question: http://stackoverflow.com/q/26051702
tags question: http://stackoverflow.com/q/26114978
tags question: http://stackoverflow.com/q/26130452
tags question: http://stackoverflow.com/q/26069175
tags question: http://stackoverflow.com/q/26053241
tags question: http://stackoverflow.com/q/26188383
tag name: java
tags question: http://stackoverflow.com/q/26115667
tags question: http://stackoverflow.com/q/26147644
tags question: http://stackoverflow.com/q/26119331
tags question: http://stackoverflow.com/q/26179894
tags question: http://stackoverflow.com/q/26111865
tags question: http://stackoverflow.com/q/26168777
tags question: http://stackoverflow.com/q/26081635
tags question: http://stackoverflow.com/q/26039753
tags question: http://stackoverflow.com/q/26182150
tags question: http://stackoverflow.com/q/26073327
tags question: http://stackoverflow.com/q/26060083
tags question: http://stackoverflow.com/q/26047206
tags question: http://stackoverflow.com/q/26180849
tags question: http://stackoverflow.com/q/26042496
tags question: http://stackoverflow.com/q/26073453
tags question: http://stackoverflow.com/q/26186377
tags question: http://stackoverflow.com/q/26158337
tags question: http://stackoverflow.com/q/26188496
tags question: http://stackoverflow.com/q/26059330
type: Tag
tags question: http://stackoverflow.com/q/26174503
tags question: http://stackoverflow.com/q/26101420
tags question: http://stackoverflow.com/q/26141713
tags question: http://stackoverflow.com/q/26158518
tags question: http://stackoverflow.com/q/26141942
tags question: http://stackoverflow.com/q/26081093
tags question: http://stackoverflow.com/q/26051911
tags question: http://stackoverflow.com/q/26108292
tags question: http://stackoverflow.com/q/26157810
tags question: http://stackoverflow.com/q/26170518

http://stackoverflow.com/q/26161388
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41013499
has comment: http://stackoverflow.com/comment/41038384
has comment: http://stackoverflow.com/comment/41013527
score: 2
answer count: 0
has comment: http://stackoverflow.com/comment/41013128
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/17517448
has comment: http://stackoverflow.com/comment/41012846
has body: I have textarea and i want to change the font color of some text which contains the #(hashtag) i want to do this by using jquery when enter #(hashtag) then change the color of that word this s is test text #photography in this string word #photography should be in different color
type: Question
has comment: http://stackoverflow.com/comment/41013133
has comment: http://stackoverflow.com/comment/41012986
upvote count: 2
has title: how can changed font color in text area which contains special characters?
has comment: http://stackoverflow.com/comment/41014819
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/26067173
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26405141
has title: upload images without image manager in opencart 1.5.5.1
has comment: http://stackoverflow.com/comment/40841316
tagged with: opencart
score: 0
linked to: http://stackoverflow.com/q/24168040
has answer: http://stackoverflow.com/a/26405141
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40848178
has body: I'm trying upload product pictures without image manager directly from My Computer window, for example like it is possible on facebook. So, in admin/view/template/catalog/product_form.tpl file in code that responsible of product image I put: id="anyword" to the following: &lt;a onclick="image_upload('image', 'thumb');" id="anyword"&gt;&lt;?php echo $text_browse; ?&gt;&lt;/a&gt; instead of: onclick="image_upload('image', 'thumb');" to become: &lt;tr&gt; &lt;td&gt;&lt;?php echo $entry_image; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;div class="image"&gt;&lt;img src="&lt;?php echo $thumb; ?&gt;" alt="" id="thumb" /&gt;&lt;br /&gt; &lt;input type="hidden" name="image" value="&lt;?php echo $image; ?&gt;" id="image" /&gt; &lt;a id="anyword"&gt;&lt;?php echo $text_browse; ?&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;|&amp;nbsp;&amp;nbsp;&lt;a onclick="$('#thumb').attr('src', '&lt;?php echo $no_image; ?&gt;'); $('#image').attr('value', '');"&gt;&lt;?php echo $text_clear; ?&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt; And add in end of page: &lt;script type="text/javascript" src="admin/view/javascript/jquery/ajaxupload.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt;&lt;!-- $(document).ready(function() { new AjaxUpload('#anyword, { action: 'index.php?route=common/filemanager/upload&amp;image=' + encodeURIComponent($('#image').attr('value')), name: 'image', autoSubmit: true, responseType: 'json', onChange: function(file, extension) { this.setData({'directory': ''}); this.submit(); }, onSubmit: function(file, extension) { $('#upload').append('&lt;img src="admin/view/image/loading.gif" class="loading" style="padding- left: 5px;" /&gt;'); }, onComplete: function(file, json) { if (json.success) { $('#image').attr('value','data/user/'+file); $.ajax({ url: 'index.php?route=common/filemanager/image&amp;image=' + encodeURIComponent($('#image').attr('value')), dataType: 'text', success: function(text) { $('#thumb').replaceWith('&lt;img src="' + text + '" alt="" id="thumb" /&gt;'); } }); } …
type: Question
has comment: http://stackoverflow.com/comment/115444916
has comment: http://stackoverflow.com/comment/40890774
answer count: 1

http://stackoverflow.com/comment/40999968
score: 0
type: AnswerComment
type: Comment
has text: So you're using expand out of the closure? Sure it won't be a problem my friend. I've updated again.
comment on: http://stackoverflow.com/a/26154058

http://stackoverflow.com/a/26126846
answers question: http://stackoverflow.com/q/26126765
has body: // friend finder function function findFriends(stepNo) { var urlString = 'assets/javascripts/steps.json'; $.getJSON(urlString, function(data){ var friends = data.friends.filter(function(friend) { return friend.Step === stepNo; }); // do something with the found friends :) (e.g. fill a list) }); } // click handler $('.yourButtonSelector').click(function() { var stepNo = $(this).attr('data-stepNo'); // not sure how you store the step no. in the buttons findFriends(stepNo); }); As a side note: if you have control over the JSON format and use this service mainly for the described format, I'd recommend using the stepNo as the key: { friends: { 1: [...], 2: [...], ... } }
type: Answer
score: 0

http://stackoverflow.com/comment/40835851
comment on: http://stackoverflow.com/q/26064450
score: 0
type: Comment
type: QuestionComment
has text: If you're getting 404 errors in your console on `http://localhost.dev/socket.io/?EIO=3&transport=polling&t=1411749802784-54` then you may not be adding the script from the 8080 port correctly in your page. The fact that the url isn't `http://localhost.dev:8080/socket.io/` is a pretty good indicator that something funky is going on with the url, not node/socket.io

http://stackoverflow.com/tag/svg
tags question: http://stackoverflow.com/q/26118420
tags question: http://stackoverflow.com/q/26176404
tags question: http://stackoverflow.com/q/26188169
tags question: http://stackoverflow.com/q/26091334
tags question: http://stackoverflow.com/q/26136044
tags question: http://stackoverflow.com/q/26101256
tags question: http://stackoverflow.com/q/26152322
tags question: http://stackoverflow.com/q/26053343
tags question: http://stackoverflow.com/q/26040291
tags question: http://stackoverflow.com/q/26059093
tags question: http://stackoverflow.com/q/26108660
tags question: http://stackoverflow.com/q/26126256
tags question: http://stackoverflow.com/q/26136310
tags question: http://stackoverflow.com/q/26064914
tags question: http://stackoverflow.com/q/26083610
tag name: svg
tags question: http://stackoverflow.com/q/26191566
tags question: http://stackoverflow.com/q/26180352
tags question: http://stackoverflow.com/q/26035757
tags question: http://stackoverflow.com/q/26087828
tags question: http://stackoverflow.com/q/26078409
tags question: http://stackoverflow.com/q/26189203
tags question: http://stackoverflow.com/q/26048791
tags question: http://stackoverflow.com/q/26184476
tags question: http://stackoverflow.com/q/26191307
tags question: http://stackoverflow.com/q/26091081
tags question: http://stackoverflow.com/q/26060212
tags question: http://stackoverflow.com/q/26087890
tags question: http://stackoverflow.com/q/26068732
tags question: http://stackoverflow.com/q/26045866
tags question: http://stackoverflow.com/q/26149714
tags question: http://stackoverflow.com/q/26164800
tags question: http://stackoverflow.com/q/26053191
tags question: http://stackoverflow.com/q/26184357
tags question: http://stackoverflow.com/q/26090607
tags question: http://stackoverflow.com/q/26091207
tags question: http://stackoverflow.com/q/26152219
tags question: http://stackoverflow.com/q/26089162
tags question: http://stackoverflow.com/q/26103367
tags question: http://stackoverflow.com/q/26071243
tags question: http://stackoverflow.com/q/26174412
tags question: http://stackoverflow.com/q/26051164
tags question: http://stackoverflow.com/q/26097991
tags question: http://stackoverflow.com/q/26181731
tags question: http://stackoverflow.com/q/26064490
tags question: http://stackoverflow.com/q/26189886
tags question: http://stackoverflow.com/q/26059800
tags question: http://stackoverflow.com/q/26090389
type: Tag

http://stackoverflow.com/a/26185440
type: Answer
answers question: http://stackoverflow.com/q/26185280
has comment: http://stackoverflow.com/comment/41058191
has body: You could give your form that contains the radio buttons an ID and target them in the jquery: JS Fiddle $(document).ready(function () { $("#formID input").click(function () { if ($(this).attr("value") == "Yes") { $('form[name="Computerform"]').hide(); $('form[name="VMform"]').show(); } if ($(this).attr("value") == "No") { $('form[name="Computerform"]').show(); $('form[name="VMform"]').hide(); } }); }); Answer to question in comment. Hide one form at the beginning with CSS: form[name="VMform"] {display: none;} Also, I swapped the hide/show at the bottom. I assumed "no" should do the opposite of when "yes" is clicked.
score: 0
has comment: http://stackoverflow.com/comment/41058106

http://stackoverflow.com/comment/40909119
type: Comment
type: QuestionComment
has text: I'm not clear on your data structure. Do you have a table that is basically a list of other table names?
comment on: http://stackoverflow.com/q/26104351
score: 0

http://stackoverflow.com/comment/40968987
score: 0
type: Comment
has text: @jevgenig, yeah those options are getting hided, I have checked in DOM structure using browser DOM inspector. But you approach is good in terms of user experience as user will know which are the options available but disabled. +1 for you!!
comment on: http://stackoverflow.com/a/26137399
type: AnswerComment

http://stackoverflow.com/comment/40783187
score: 0
type: Comment
type: QuestionComment
has text: Inside a browser i.e. Firefox it works pretty well also inside the eclipse browser. I just tried to add an element
comment on: http://stackoverflow.com/q/26034288

http://stackoverflow.com/a/26178903
has body: Here is a list of some transpilers from ES6 to ES5: https://github.com/sindresorhus/grunt-es6-transpiler https://github.com/sindresorhus/broccoli-es6-transpiler https://github.com/sindresorhus/gulp-es6-transpiler https://github.com/termi/es6-transpiler https://github.com/google/traceur-compiler
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26177776
upvote count: 3
score: 3

http://stackoverflow.com/comment/40927234
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26114390
type: Comment
has text: @Alnitak....broken ajax request..well i don't think there is anything broken in above ajax request...

http://stackoverflow.com/comment/41045215
score: 0
has text: They can run js snippets, there no method exposed from which client can access db, but there snippet might have ajax requests which can do.
comment on: http://stackoverflow.com/q/26178675
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26161881
score: 1
has comment: http://stackoverflow.com/comment/41014836
upvote count: 1
type: AcceptedAnswer
has body: The common practice is to remove the old handler and add a new one. function requestHandler(details){ /* ... do stuff ... */ } function setListener(ArrayOfURLs) { chrome.webRequest.onBeforeRequest.removeListener(requestHandler); chrome.webRequest.onBeforeRequest.addListener( requestHandler, { urls: ArrayOfURLs, types: ["main_frame"] }, ["blocking"] ); chrome.webRequest.handlerBehaviorChanged(); } The last call is needed, since Chrome caches the rules, but it's very expensive in terms of performance.
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26157036
answers question: http://stackoverflow.com/q/26157036

http://stackoverflow.com/a/26121680
has comment: http://stackoverflow.com/comment/40943495
type: Answer
score: 2
upvote count: 2
has body: You can use the bind() method to tackle these kinds of problems. Instead of something.method(f.bar) call something.method(f.bar.bind(f)) to get the bar method always called on the expected context (f). If you don't want to use bind in every location where you pass bar around as a callback, you can also put it in the constructor to create a dedicated bound function for every instance by default: function Foo() { this._hello = "world!"; this.bar = this.bar.bind(this); } Foo.prototype.bar = function () { console.log(this._hello); }; var f = new Foo; something.method(f.bar); // works!
accepted answer of: http://stackoverflow.com/q/26088207
answers question: http://stackoverflow.com/q/26088207
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40944798
has comment: http://stackoverflow.com/comment/40944181

http://stackoverflow.com/comment/40886118
score: 0
comment on: http://stackoverflow.com/q/26051070
has text: Hi, I tried the the wait function until the specific element is found and I got this error: `WARNING: WebDriverException thrown by findElement(By.xpath: //input[@name="username_input"]) org.openqa.selenium.NoSuchWindowException: Unable to find element on closed window (WARNING: The server did not provide any stacktrace information)`
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26117863
type: Answer
score: 1
upvote count: 1
has body: try this : You are trying to get name attribute of li, instead find input inside li and then get its name attribute var task_name = $(this).siblings('ul').children('li:first').find('input').attr("name");
downvote count: 0
answers question: http://stackoverflow.com/q/26117814

http://stackoverflow.com/comment/40889327
score: 0
comment on: http://stackoverflow.com/a/26093451
type: Comment
has text: I'm saying it should be `$('#dialog2').dialog("close");` not `$(this).dialog("close");` inside the `onAccept`
type: AnswerComment

http://stackoverflow.com/a/26123358
accepted answer of: http://stackoverflow.com/q/26123268
type: Answer
upvote count: 3
score: 3
has body: createShadowRoot is no longer vendor-prefixed in Chrome. Demo In case you still want to support the vendor-prefixed variant (Android 4.x, old Chrome): var root = (host.createShadowRoot || host.webkitCreateShadowRoot).call(host); Demo
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26123268

http://stackoverflow.com/comment/40793738
type: QuestionComment
has text: Its working fine for me :) i can send you the test page i have created based on the html/script you send me.
comment on: http://stackoverflow.com/q/26041060
score: 0
type: Comment

http://stackoverflow.com/comment/41074687
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26188554
type: AnswerComment
has text: Dude you are unbelievable. Thank you so much, this thing has been driving me crazy for the past two days.

http://stackoverflow.com/comment/41086384
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26049186
has text: Thank you. It worked. Now refresh 4th issue in question remains unresolved. Another issue: ff column width is small, buttons are not visible (if datepicker is used, calendar button appears in next row in this case). How to show buttons also if column width is small. Why demo code uses `$(elem).css("width", "")` which is not in answer?
type: AnswerComment

http://stackoverflow.com/q/26044188
has answer: http://stackoverflow.com/a/26045247
has title: XML to HTML function for Refreshing Information
type: Question
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
tagged with: http://stackoverflow.com/tag/xml
has body: I am making a real time train board that pulls XML data from a website, populates it and animates it in. I have laid it out and got the animation set, but now I need help getting the XML data in the right spots. Codepen of the animation: http://codepen.io/Spiderian/pen/FBjhk The XML I'm trying to populate and recheck it every so often. 2 GOOD <text/><Date/><Time/> 3 DELAYS <text/><Date/><Time/> 4 WORK <text/><Date/><Time/> 5 GOOD <text/><Date/><Time/> Will I have to use something different for the .append function to get it to work with the XML?
score: 0
type: UnansweredQuestion

http://stackoverflow.com/a/26089014
downvote count: 0
has body: I think you want something like this: $("select").on("change", function () { var selOption = $("option:selected", this).val(); if (selOption == "any") { $(this).attr("selected", false); $(this).val("any"); } }); Any twelve thirette fourteen fifteen sixteen seventeen eighteen nineteen twenty
score: 4
answers question: http://stackoverflow.com/q/26088705
type: Answer
upvote count: 4

http://stackoverflow.com/q/26074925
has comment: http://stackoverflow.com/comment/40855079
type: Question
downvote count: 4
answer count: 2
tagged with: function
upvote count: 0
tagged with: arrays
tagged with: javascript
tagged with: variables
score: -4
possible better answer: http://stackoverflow.com/a/26074953
has answer: http://stackoverflow.com/a/26074953
accepted answer: http://stackoverflow.com/a/26075143
has title: How to avoid writing thousands of variables in javascript?
has comment: http://stackoverflow.com/comment/40854562
favorite count: 0
has comment: http://stackoverflow.com/comment/40854770
has body: (I'm a beginner). If I wanted to set up a system for asking questions and returning user-inputted answers using if statements and variables, there will be a large amount of potential combinations of answers and I feel like I would be forced to write out a variable for every name in the world for example, and then do that again but with every potential age/name combination, etc. Obviously there is an easier solution. How do most people tackle this? I've tried this: var yourName = prompt("What's your name?"); if (yourName == prompt.value) { console.log("It worked!"); } It doesn't work, nothing shows up in console. important: Can this be done with only if statements, variables, functions and arrays? Or will I have to use objects and switch statements? edit: (this is just an example about shopping): function selectPants () { var jeans = "jeans"; var khakis = "khakis"; var yourPants = prompt("What kind of pants do you want?"); if (yourPants == jeans) { console.log("Okay, that will cost $10."), selectShirt (); } } function selectShirt () { var plaid = "plaid"; var v-neck = "v-neck"; var yourShirt = prompt("What shirt do you want?"); if (yourShirt == plaid) { console.log("Okay, that will cost $5, your total so far is: ??"), selectShoes (); } } selectPants (); As you can see I would also need some addition system to add up the costs. Thanks a lot for any help!
type: AnsweredQuestion
tagged with: if-statement
has answer: http://stackoverflow.com/a/26075143

http://stackoverflow.com/comment/40805139
comment on: http://stackoverflow.com/q/26047619
has text: Why not set the opacity on the div to start with or set it in css?
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/41018115
type: QuestionComment
comment on: http://stackoverflow.com/q/26163355
type: Comment
score: 0
has text: I would like to reuse set of many data-attributes. In example above there are 3 attributes which are repeated over and over again.

http://stackoverflow.com/comment/40918517
comment on: http://stackoverflow.com/q/26087010
score: 0
type: Comment
type: QuestionComment
has text: Oh yeah, IP is often used in session token generation. For remember-me, something like `md5($email.$hashed_password.$useragent)` is a better start.

http://stackoverflow.com/q/26071458
has answer: http://stackoverflow.com/a/26071630
possible better answer: http://stackoverflow.com/a/26071471
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26071630
score: 0
type: Question
tagged with: javascript
answer count: 2
has title: TypeError: Cannot call method 'matches' of undefined
has body: I am writing a node module that tests an array of words against one word to see if it is an anagram (I know the functionality below for testing that is not correct yet), but I'm running into the error that's described in the title. From what I understand, it means that the object that should contain the method 'matches' is not set, and I'm having trouble understanding how I handle this. Here is the contents of the anagram module: var Anagram = function(a){ this.word = a; this.matches = function(array){ var found = []; for(var i = 0; i &lt; array.length; i++){ if(is_anagram(array[i],this.word)) found.push(array[i]); } return found; } }; function is_anagram(word, check){ if(word.length == check.length)return true; return false; } module.exports = Anagram; In my test file (using Jasmine: var anagram = require('./anagram'); describe('Anagram', function() { it("no matches",function() { var subject = anagram("diaper"); var matches = subject.matches([ "hello", "world", "zombies", "pants"]); expect(matches).toEqual([]); }); }); I'm still a bit new to js. What am I missing here?
tagged with: jasmine
has answer: http://stackoverflow.com/a/26071471

http://stackoverflow.com/q/26056828
has comment: http://stackoverflow.com/comment/40821287
type: Question
has comment: http://stackoverflow.com/comment/40821362
answer count: 3
tagged with: javascript
has body: I am new in JQuery and I am trying to get substring from main string.I know there is function available for that but I don't know how to do my task using that. here is my string //Page 1 <l> 30, St.Bishop Road, 30min </l> <l> 10, St.Bishop Road, 10min </l> //Page 2 <l> 30, St.Bishop Road, 30min </l> <l> 10, St.Bishop Road, 10min </l> I want to separate and store each in array and same way for each I want to store <l></l> value in array. Keep in mind that this is not html element.this is string which I get from other task. so How can I do this using jquery ? Thanks
tagged with: jquery
has answer: http://stackoverflow.com/a/26057237
has answer: http://stackoverflow.com/a/26056936
has title: how to get substring from string using jquery
has comment: http://stackoverflow.com/comment/40821377
has answer: http://stackoverflow.com/a/26057141
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40821361
has comment: http://stackoverflow.com/comment/40821317

http://stackoverflow.com/a/26101070
has comment: http://stackoverflow.com/comment/40902690
has comment: http://stackoverflow.com/comment/40902605
downvote count: 0
type: Answer
has body: on you app config App.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/:id', { .... controller: 'DetailsController' }). use on your controller $routeParams .controller("DetailsController", ['$routeParams',function($routeParams){ var id = $routeParams.id; // this name is from config :id }]);
answers question: http://stackoverflow.com/q/26100931
score: 3
upvote count: 3

http://stackoverflow.com/a/26187956
has body: Whether you prefer to code an email by hand, or use a pre-existing template, there are a few rules to keep in mind in creating an HTML email: Utilize Tables in your Layouts Fixed-Width Positioning (for non-responsive emails) Pixel Units The Possibilities with CSS (check Ultimate Guide to CSS link below) Inline CSS Anchor Links Best Practices Test in All Major Clients Always Offer Web-Based Views Adding Image Content Avoid the Spam Folder! Add Un-Subscribe Option Take a look at these sites for more info on this subject: How to Code HTML Email Newsletters 9 Tricks to Design The Perfect HTML Newsletter How To Code An Email Newsletter in 6 Simple Steps The Ultimate Guide to CSS - A complete breakdown of the CSS support for every popular mobile, web and desktop email client
score: 8
downvote count: 0
answers question: http://stackoverflow.com/q/26187838
upvote count: 8
type: Answer

permissions
tag name: permissions
type: Tag
tags question: http://stackoverflow.com/q/26172928
tags question: http://stackoverflow.com/q/26136616

http://stackoverflow.com/q/26156721
tagged with: jquery
has body: I would like to find each element's id but I "each" doesnt work (there is no metode each...) How can I return each element's ID? var libxmljs = require("libxmljs"); var xml = ('/SomePath/filexmlxml'); var xmlDoc2 = libxmljs.parseXmlString(xmlStr); fs.readFile(__dirname + '/filexml.xml', function (err, data) { var xmlStr = data.toString(); var id = xmlDoc2.get('Objects').get('Object').attr('id').value(); // It works and get the first element id = 'Title 1' xmlDoc2.get('Objects').get('Object').each(function () { var whatid = xmlDoc2.get('Objects').get('Object').attr('id').value(); console.log('wasd: ' + whatid); // Doesnt work - because of each. }) console.log('idss: ' + id); here I can see the only first's element's ID.
tagged with: node.js
accepted answer: http://stackoverflow.com/a/26157043
has title: Node JS Find all element's attr
type: AnsweredQuestion
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41004487
has answer: http://stackoverflow.com/a/26157043
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41010513
type: QuestionComment
score: 0
has text: I wanted to do it when I was posting, but I am unavailable to do this because I just registered on this site and I need 10 points to do this, but I have only 6.
comment on: http://stackoverflow.com/q/26122695
type: Comment

http://stackoverflow.com/q/26150312
has body: here is my code below I can't figure out what I'm doing wrong. when I preview it, the image isn't there, just the canvas border. Page Title
type: Question
has title: drawImage() isn't working for canvas
tagged with: canvas
has answer: http://stackoverflow.com/a/26150535
accepted answer: http://stackoverflow.com/a/26150535
has comment: http://stackoverflow.com/comment/40996047
tagged with: javascript
tagged with: image
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40995448
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40992786

http://stackoverflow.com/q/26098901
has body: var CustomerBoxesLoad = function () { var handleAjaxBoxesSelectedCountry = function() { $.ajax({ type: "POST", url: 'ajax/selectbox/country_selected.php', dataType:'json', success: function(data) { var select = $("#countryCodeBox"), options = ''; select.empty(); options += " Select ... "; for(var i=0;i<data.length; i++) { options += " "+ data[i].name +" "; } select.append(options); } }); } var handleAjaxBoxesCustomerType = function() { $.ajax({ type: "POST", url: 'ajax/selectbox/customer_type.php', dataType:'json', success: function(data) { var select = $("#customerTypeBox"), options = ''; select.empty(); options += " Select ... "; for(var i=0;i<data.length; i++) { options += " "+ data[i].name +" "; } select.append(options); } }); } return { //main function to initiate the module init: function () { handleAjaxBoxesSelectedCountry(); handleAjaxBoxesCustomerType(); } }; }(); I have a function calling from a PHP file. At the end of the PHP file i am calling the Ajax function: jQuery(document).ready(function() { CustomerBoxesLoad.init(); }); All the Ajax select boxes filling works good. Now i want to trigger the Ajax script from a (a href="") tag. But the function will not trigger like this: a href="javascript:handleAjaxBoxesSelectedCountry();">Refresh Select Box THIS reference to the JavaScript dont work!!
has title: Call Second Function in a Scriptfile
score: 1
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26099523
has answer: http://stackoverflow.com/a/26109006
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/40898844

google-chrome-extension
tags question: http://stackoverflow.com/q/26036345
tags question: http://stackoverflow.com/q/26126179
tags question: http://stackoverflow.com/q/26067928
tags question: http://stackoverflow.com/q/26096646
tags question: http://stackoverflow.com/q/26142323
tags question: http://stackoverflow.com/q/26190589
tag name: google-chrome-extension
tags question: http://stackoverflow.com/q/26187834
tags question: http://stackoverflow.com/q/26102366
tags question: http://stackoverflow.com/q/26157036
tags question: http://stackoverflow.com/q/26119027
tags question: http://stackoverflow.com/q/26168732
tags question: http://stackoverflow.com/q/26090563
tags question: http://stackoverflow.com/q/26134230
tags question: http://stackoverflow.com/q/26112960
tags question: http://stackoverflow.com/q/26068921
tags question: http://stackoverflow.com/q/26075340
tags question: http://stackoverflow.com/q/26156978
tags question: http://stackoverflow.com/q/26152335
tags question: http://stackoverflow.com/q/26171357
type: Tag
tags question: http://stackoverflow.com/q/26108394
tags question: http://stackoverflow.com/q/26047914
tags question: http://stackoverflow.com/q/26132684
tags question: http://stackoverflow.com/q/26140443
tags question: http://stackoverflow.com/q/26093069
tags question: http://stackoverflow.com/q/26070369
tags question: http://stackoverflow.com/q/26057571
tags question: http://stackoverflow.com/q/26179360
tags question: http://stackoverflow.com/q/26130386
tags question: http://stackoverflow.com/q/26172928
tags question: http://stackoverflow.com/q/26102576
tags question: http://stackoverflow.com/q/26056449
tags question: http://stackoverflow.com/q/26046369

http://stackoverflow.com/q/26167836
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Why can't I use jquery validate?
has comment: http://stackoverflow.com/comment/41025425
linked to: http://stackoverflow.com/q/4128001
upvote count: 0
type: UnansweredQuestion
downvote count: 2
has body: I'm using jquery validate plugin but the following code does not is not working - Anything I enter works. I have spent many hours trying to figure it out and I have trimmed the code to have just one sample. The "billtoFirstName" should have between 2 and 5 characters and should not validate when I enter more that 5 or 1 char. I get no errors and the submit reveals that whatever I enter is passed to the submit. I am stumped. How can I fix it to validate? TODO supply a title First Name*:
has answer: http://stackoverflow.com/a/26168241
type: Question
tagged with: validation
score: -2
answer count: 1

http://stackoverflow.com/q/26136775
favorite count: 0
has title: What are the advantages of bridging from iOS to an UIWebView?
downvote count: 1
tagged with: objective-c
answer count: 0
type: UnansweredQuestion
type: Question
score: 1
has body: I'm a beginner to the iOS app development and I tried to implement an UI using UIWebView. What are the features of this approach? What are the features of Bridging From iOS to an UIWebView?
upvote count: 2
tagged with: native
tagged with: ios
tagged with: javascript
tagged with: uiwebview

http://stackoverflow.com/comment/41049695
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26180938
has text: @TiMESPLiNTER: Libraries aren't needed. XHR is simple enough.

http://stackoverflow.com/comment/41011808
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26103311
has text: @LoganMurphy I am learning some jQuery on the side - but have a question regarding editing localStorage [Edit User Question](http://stackoverflow.com/questions/26160759/edit-localstorage-user) if you have time
type: AnswerComment

http://stackoverflow.com/comment/40891891
comment on: http://stackoverflow.com/a/26062108
score: 0
type: AnswerComment
type: Comment
has text: And (for the sake of laziness) a Javascript variant: https://gist.github.com/tedbarth/d7688c24835d39f13291

http://stackoverflow.com/comment/40789751
type: Comment
comment on: http://stackoverflow.com/a/26039443
has text: Hey Abdul, thank you very much for the answer. But I still have a problem. I did the change, and yeah it indeed works in the demo, but if I paste in my file it stops working anymore. I updated the question. Would you have another look please?
type: AnswerComment
score: 0

http://stackoverflow.com/q/26066797
has comment: http://stackoverflow.com/comment/40840448
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26067895
has comment: http://stackoverflow.com/comment/40840521
has comment: http://stackoverflow.com/comment/40840434
has answer: http://stackoverflow.com/a/26068078
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26067075
score: 1
has answer: http://stackoverflow.com/a/26067895
has comment: http://stackoverflow.com/comment/40842892
upvote count: 1
has body: I have a function that starts on mouse wheel scroll but, if i do a longer scroll, it executes for 2-3 times. So i have to find a way to prevent it running if it is called more then 1 time in 2 sec let's say. Any ideas? PS : this is my function. if you know a better way to start it on scroll and not taking in consideration how long it's the scroll, i would appreciate it as well. if (window.addEventListener) { // IE9, Chrome, Safari, Opera window.addEventListener("mousewheel", MouseWheelHandler, false); // Firefox window.addEventListener("DOMMouseScroll", MouseWheelHandler, false); } // IE 6/7/8 var s = 0; function MouseWheelHandler(e) { // cross-browser wheel delta var e = window.event || e; // old IE support var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail))); e.preventDefault(); ... } UPDATE: I worked out my own version of the code, based on the ideas that i've read in the comments and answers. This is it : function MouseWheelHandler(e) { var e = window.event || e; // cross-browser wheel delta // old IE support var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail))); e.preventDefault(); GoUpDown(delta,e); } function GoUpDown(delta,e) { if(timer ==0){ timer =1; setTimeout(function () {timer =0;},4200); /*function stuff*/ }
type: Question
tagged with: function
has comment: http://stackoverflow.com/comment/40840730
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40840475
possible better answer: http://stackoverflow.com/a/26068078
has title: using a function no more then 1 time in 2 sec in javascript
answer count: 3
has comment: http://stackoverflow.com/comment/40841803

http://stackoverflow.com/comment/40943821
comment on: http://stackoverflow.com/q/26123781
score: 0
has text: Yeah, always read the documentation before you use an unfamiliar method.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26172242
tagged with: qunit
has body: if ($(window).width() &lt; 500) { // do stuff } else if ($(window).width() &lt; 800) { // do stuff } else { // do stuff } Within the test, doing a console.log($(window).width()); outputs 400, so if &lt; 500 is covered. Unfortunately not all the JS can be converted to SASS/CSS.
answer count: 0
type: UnansweredQuestion
tagged with: chutzpah
upvote count: 1
score: 1
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41150983
has title: How to unit test conditional window width with QUnit / Chutzpah

http://stackoverflow.com/comment/40971163
has text: Well no. You are issuing a query that "asks" to match the "users" you provide, so in just about every ( well a actually, every ) database system you can think of will do what you asked. So what are you really asking? How to get what matches and what does not match in one result? Or can you really just live with two queries?
comment on: http://stackoverflow.com/q/26137444
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40936214
comment on: http://stackoverflow.com/a/26119515
has text: hmmm.. Code is dynamically generated actually. One thing, I using in header.php that is included, then text fields in user.php
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26106366
has body: people[0].provider should be pointing at a resolved promise. If you attach a then handler to it you will see the expected provider value: people[0].provider.then(function(provider) { console.log(JSON.stringify(provider); }); If you wanted to have the provider to be a value on each person of the people array you could update your addProvider function as follows: function addProvider() { var promises = []; people.forEach(function(person){ promises.push(getProvider(person.id, db) .then(function(provider) { person.provider = provider; }); }); return Q.all(promises).spread(function(provider) { console.log('provider = '); console.log(provider); // SHOWS CORRECT PROVIDER HERE }); }
has comment: http://stackoverflow.com/comment/40912506
upvote count: 2
has comment: http://stackoverflow.com/comment/40912869
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26106184
type: Answer
answers question: http://stackoverflow.com/q/26106184
has comment: http://stackoverflow.com/comment/40913018
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40913733
has comment: http://stackoverflow.com/comment/40912578

function
tags question: http://stackoverflow.com/q/26152809
tags question: http://stackoverflow.com/q/26179861
tags question: http://stackoverflow.com/q/26063688
tags question: http://stackoverflow.com/q/26043614
tag name: function
tags question: http://stackoverflow.com/q/26146700
tags question: http://stackoverflow.com/q/26046967
tags question: http://stackoverflow.com/q/26180128
tags question: http://stackoverflow.com/q/26042198
tags question: http://stackoverflow.com/q/26073120
tags question: http://stackoverflow.com/q/26045534
tags question: http://stackoverflow.com/q/26175887
tags question: http://stackoverflow.com/q/26068850
tags question: http://stackoverflow.com/q/26125412
tags question: http://stackoverflow.com/q/26174390
tags question: http://stackoverflow.com/q/26111788
tags question: http://stackoverflow.com/q/26154150
tags question: http://stackoverflow.com/q/26074925
tags question: http://stackoverflow.com/q/26102037
tags question: http://stackoverflow.com/q/26087802
tags question: http://stackoverflow.com/q/26077690
tags question: http://stackoverflow.com/q/26092517
tags question: http://stackoverflow.com/q/26108331
tags question: http://stackoverflow.com/q/26149964
tags question: http://stackoverflow.com/q/26156354
type: Tag
tags question: http://stackoverflow.com/q/26194244
tags question: http://stackoverflow.com/q/26066797
tags question: http://stackoverflow.com/q/26117691
tags question: http://stackoverflow.com/q/26064993
tags question: http://stackoverflow.com/q/26159520
tags question: http://stackoverflow.com/q/26119275
tags question: http://stackoverflow.com/q/26049381
tags question: http://stackoverflow.com/q/26165922
tags question: http://stackoverflow.com/q/26098158
tags question: http://stackoverflow.com/q/26088693
tags question: http://stackoverflow.com/q/26176870
tags question: http://stackoverflow.com/q/26034115
tags question: http://stackoverflow.com/q/26177870
tags question: http://stackoverflow.com/q/26077848
tags question: http://stackoverflow.com/q/26071019
tags question: http://stackoverflow.com/q/26119659
tags question: http://stackoverflow.com/q/26111564
tags question: http://stackoverflow.com/q/26147571
tags question: http://stackoverflow.com/q/26111118
tags question: http://stackoverflow.com/q/26107125
tags question: http://stackoverflow.com/q/26188355
tags question: http://stackoverflow.com/q/26180269
tags question: http://stackoverflow.com/q/26058876
tags question: http://stackoverflow.com/q/26171386

http://stackoverflow.com/comment/40874867
comment on: http://stackoverflow.com/q/26085668
has text: Ah yes, I see now. Thank you @Quentin and andrew for pointing it out.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26100149
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26100091
score: 1
has body: Using jQuery you can try this using contains selector. Like this: $('#select-list').val( $( '#select-list option:contains("' + country + '")' ).val() ); And if value attribute in your &lt;option&gt; elements equal text content you can do this using only val() method: $('#select-list').val( country );
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26100091

http://stackoverflow.com/comment/40803107
has text: @Bergi — Because *usually* you want scripts to be easily cacheable static resources. JSONP is a hack to use JS as a data serialisation format in browsers that don't support CORS.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26046525

http://stackoverflow.com/comment/41028359
type: QuestionComment
type: Comment
has text: why do you need to split, that object property IS the array you're after. just assign it `items = data["42"];`
comment on: http://stackoverflow.com/q/26169230
score: 0

http://stackoverflow.com/comment/83641796
comment on: http://stackoverflow.com/a/26117585
score: 0
type: AnswerComment
has text: I'm downvoting this answer because it sounds like a marketing pitch, and does not give an actual technical solution to the problem.
type: Comment

http://stackoverflow.com/a/26175920
type: Answer
has comment: http://stackoverflow.com/comment/41040257
answers question: http://stackoverflow.com/q/26175851
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41040340
has body: Edit: Looks like it can be done with CSS: .animate-show { line-height:20px; opacity:1; padding:10px; border:1px solid black; background:white; } .animate-show.ng-hide-add.ng-hide-add-active, .animate-show.ng-hide-remove.ng-hide-remove-active { -webkit-transition:all linear 0.5s; transition:all linear 0.5s; } .animate-show.ng-hide { line-height:0; opacity:0; padding:0 10px; } so just add class="animate-show" for the div https://docs.angularjs.org/api/ng/directive/ngShow#usage_animations a working example: http://plnkr.co/edit/xmkBjvPY5OjFLnxcuVKz?p=preview&amp;s=jBzeCEpWphlOpSRv
upvote count: 1
has comment: http://stackoverflow.com/comment/41040282
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26175851

http://stackoverflow.com/q/26120206
has comment: http://stackoverflow.com/comment/40937120
score: 1
tagged with: angularjs-scope
type: Question
downvote count: 0
has title: Push non-angular object to AngularJs controller scope
tagged with: javascript
has comment: http://stackoverflow.com/comment/40936902
upvote count: 1
has comment: http://stackoverflow.com/comment/40948301
favorite count: 0
has comment: http://stackoverflow.com/comment/40939162
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
has body: I have a Angular controller that have a FormData scope, e.g: $scope.FormData. Data is collected via model connected to a simple form. Also, I have an external non-angular js code on the page. I need to push one of its variables to $scope.FormData.name. How can I do that? Already tried acces it as a global variable via $window, but no luck. Here is the example code: Angular code: app.controller('mainController', function ($scope, $http) { $scope.formData = {}; $scope.formData.day = "1"; $scope.formData.month = "January"; ... And non-angular code: var data = [{data1: value1}, {data2:value2}]; Binding this data to a model in a form is not a good option, because this is an object, so, I will get a string in a formData, like [Object, Object].
has comment: http://stackoverflow.com/comment/40979266

http://stackoverflow.com/q/26063406
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26063654
type: Question
answer count: 1
tagged with: javascript
has title: Show/hide section based on dropdown -js
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: Hi all I got my code all nice and pretty but the problem is that it is a bit buggy. When you select the field that actually un-hides a section and then another one that hides it- the "hidden" section is still there for some time! Below you will see my code on codepen:http://codepen.io/Nestalna/details/qpjsy Javascript: function show(aval) { if (aval == "1") { optionyes.style.visibility='visible'; optionyes.style.display='block'; Form.fileURL.focus(); } if (aval == "0") { optionyes.style.visibility='hidden'; optionyes.style.display='none'; } } HTML: Which degree are you interested in? Please select one Concurrent Enrolment 2015 Applied Bioethics Summer Study Non Degree (9 hours or less) You have selected red option so i am here
has answer: http://stackoverflow.com/a/26063654
has comment: http://stackoverflow.com/comment/40833944
has comment: http://stackoverflow.com/comment/40833996

http://stackoverflow.com/comment/40926729
type: Comment
comment on: http://stackoverflow.com/a/26114392
score: 0
type: AnswerComment
has text: Does that mean, that you would add the above code like Or somewhere else?

http://stackoverflow.com/a/26090032
score: 1
has body: Try rearranging blocks within the piece , adding a filter , to prevent both handleCancel and handleAccept being called by default; e.g., (function($){ $.fn.dialog = function(command, options) { var $el = this; // access , pass arguments to methods $.fn.dialog.handleCancel = function(c) { $el.html(c + "led") }; $.fn.dialog.handleAccept = function(a) { $el.html(a + "ed") }; // call `handleCancel` or `handleAccept` , // based on `command` $.fn.dialog.defaults = { // some other props onCancel: command === "cancel" ? $.fn.dialog.handleCancel(command) : null, onAccept: command === "accept" ? $.fn.dialog.handleAccept(command) : null }; var opts = $.extend( {}, $.fn.dialog.defaults, options ); //code return this; }; // code }(jQuery)); $("button").on("click", function(e) { $("#result").dialog(e.target.id) }) accept cancel Result:
answers question: http://stackoverflow.com/q/26089603
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/40803010
comment on: http://stackoverflow.com/q/26046328
score: 0
has text: possible duplicate of [Service vs provider vs factory?](http://stackoverflow.com/questions/15666048/service-vs-provider-vs-factory)
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26049255
has body: You might check this pout too: https://github.com/Prinzhorn/skrollr skrollr can do a lot more than just what you have in mind, but its pretty easy to handle and can take care of your design and much more.
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26048601

http://stackoverflow.com/q/26074755
has comment: http://stackoverflow.com/comment/40854264
has comment: http://stackoverflow.com/comment/40854297
has comment: http://stackoverflow.com/comment/41407933
has comment: http://stackoverflow.com/comment/40856399
tagged with: compression
has body: In a short amount of time, I ran twice into the same problem: I have a list of coordinates ( latitude, longitude in the case of geo-coordinates — or x,y,z in the case of a 3D OBJ file) the coordinates are stored as numbers written out in ASCI decimals,... e.g. 3.14159265 the coordinates have decimals the coordinates are stored as text in a text file or database the whole bunch gets too large Now, we could simply ignore the problem and accept a slow response or a more jagged shape - but it nags. A decimal in ASCII uses 8 bits (where we only need 4 to represent the numbers 0…10) and many coordinates share the same first couple of digits... It feels like these files could be compressed easily. Zipping obviously reduces the files a bit, although it varies. Base-encoding also seems to help, but it turns out not to be as efficient as I hoped (about 30%) Using PHP, What would be a pragmatic approach to compress coordinates stored in text files? ( Pragmatic meaning: reasonably fast, preferably using vanilla PHP )
downvote count: 1
tagged with: coordinates
type: Question
has comment: http://stackoverflow.com/comment/40854390
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40854272
tagged with: ascii
upvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26075208
has title: Efficiently compress numbers in ASCII (using PHP or JS)
tagged with: php

http://stackoverflow.com/q/26156317
has comment: http://stackoverflow.com/comment/41008803
has title: custom extenders KnockoutJS
has comment: http://stackoverflow.com/comment/41618758
tagged with: javascript
downvote count: 0
favorite count: 0
has body: So I've been trying to work this out but to no success. Basically I am trying to implement an extender to validate my object in knockout when filling in a form. I got the object bound like this: noVatReason: ko.observable().extend({ noVatCheck: "You need to fill in a reason!" }) This is a basic check to see if a string is filled in or not. The code for the validator looks like this: ko.extenders.noVatCheck = function (target, message) { target.hasError = ko.observable(); target.validationMessage = ko.observable(); function validate(newValue) { target.hasError(newValue ? false : true); target.validationMessage(newValue ? "" : message); } validate(target()); target.subscribe(validate); return target; }; This does not work sadly enough yet it is almost a full copy of the extender example on the knockout documentation. Can someone figure out what I am doing wrong? I believe it to be something super silly but I'm just looking right next to it I guess.
has comment: http://stackoverflow.com/comment/41003843
has comment: http://stackoverflow.com/comment/41003685
type: UnansweredQuestion
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/41005600
upvote count: 1
tagged with: knockout.js
type: Question

http://stackoverflow.com/a/26077269
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26077211
has body: setTimout(callback, delay) will call the callback function provided after delay ms, in your case 2 seconds after you load the page. Try this instead: &lt;script&gt; function doajax_products_check(){ $('#myplace_data').hide(); $("#loading").fadeIn("slow"); //show loading before waiting for timeout setTimeout(function () { $.ajax({ url: 'data.php', type: 'POST', data: $('#form1id').serialize(), cache: false, success: function (data) { $("#loading").fadeOut("slow"); $('#myplace_data').show(); $('#myplace_data').html(data); } }); }, 2000); } &lt;/script&gt; Check it out here: http://jsfiddle.net/o5vrbqjy/1/

http://stackoverflow.com/comment/40924688
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26113247
has text: i understand, when i put redirect(array('site/index')); it redirects to the index in side the yii instead of redirecting to the index of my web application. btw thanks for your response

http://stackoverflow.com/comment/41115669
type: AnswerComment
type: Comment
has text: @Chuck what browser are you using? Works fine in firefox.
comment on: http://stackoverflow.com/a/26213899
score: 0

http://stackoverflow.com/comment/40830444
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26060525
has text: Thanks @laruiss. **initialize()** is a backbone function (http://backbonejs.org/#Model-constructor), am I right ??
type: Comment

http://stackoverflow.com/a/26085796
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26085774
has body: You have 3 errors. Correct code: var elem = document.getElementsByClassName('check'); // check, not .check var temp = elem[0].cloneNode(true); // cloneNode, not clonenode document.body.appendChild(temp); // appendChild, not append Demo: http://jsfiddle.net/hAw53/379/
upvote count: 2

http://stackoverflow.com/comment/40835889
score: 0
comment on: http://stackoverflow.com/q/26064351
type: Comment
type: QuestionComment
has text: I'd have to say this question it's too broad, you should show some "code" you have been working on,but one option could be load a simple div with css (maybe a box as you showed) while you are loading the data, you can do a lot just with a cobination of ng-cloak and resource promises

http://stackoverflow.com/a/26092853
answers question: http://stackoverflow.com/q/26079026
has comment: http://stackoverflow.com/comment/41106220
type: Answer
has comment: http://stackoverflow.com/comment/40910450
has comment: http://stackoverflow.com/comment/40913824
has comment: http://stackoverflow.com/comment/40939364
has body: In the analytics tool section or your rule, set the eVar using the following, not a data element. %this.text% Your evar box will show something like this. eVarX="%this.text%"
has comment: http://stackoverflow.com/comment/41106216
score: 0
has comment: http://stackoverflow.com/comment/40947771

http://stackoverflow.com/q/26152053
has comment: http://stackoverflow.com/comment/94287646
has answer: http://stackoverflow.com/a/26152074
type: Question
tagged with: javascript
tagged with: webgl
answer count: 1
downvote count: 0
tagged with: opengl-es
favorite count: 0
has body: I'm working to port a native OpenGL application to WebGL by using the three.js framework. I'm stumbling on the implementation of spherical impostors. Spherical Impostors are basically quads (or two triangles) that are rendered in a way that they always face the camera (much alike billboards). By employing custom vertex and fragment shaders, for every point on the rendered quad, a new position and normal are generated in a way that emulates a sphere. For a more detailed description you can check out the following link: [link broken] What is a possible strategy to port this feature in Three.js?
type: UnansweredQuestion
tagged with: three.js
has title: Spherical Impostors in three.js
has comment: http://stackoverflow.com/comment/86440357
has comment: http://stackoverflow.com/comment/94315876
score: 1
upvote count: 1

mobile
tags question: http://stackoverflow.com/q/26042065
tags question: http://stackoverflow.com/q/26192378
type: Tag
tags question: http://stackoverflow.com/q/26076004
tags question: http://stackoverflow.com/q/26086633
tags question: http://stackoverflow.com/q/26159557
tags question: http://stackoverflow.com/q/26138708
tags question: http://stackoverflow.com/q/26145292
tags question: http://stackoverflow.com/q/26104398
tags question: http://stackoverflow.com/q/26182986
tags question: http://stackoverflow.com/q/26168950
tags question: http://stackoverflow.com/q/26063591
tags question: http://stackoverflow.com/q/26129702
tag name: mobile
tags question: http://stackoverflow.com/q/26163776
tags question: http://stackoverflow.com/q/26175887

http://stackoverflow.com/q/26186105
score: 2
has body: I am trying to figure out how to route my GET individual objects route parameter by title as opposed to ID. I know that body-parser allows for the request, but can't figure out how to modify my current route setup to allow for this to happen. My thoughts were to change all blogpost_id to blogpost_title, but I'm running into this error. { "message":"Cast to ObjectId failed for value \"Data Cost Upload\" at path \"_id\"", "name":"CastError", "type":"ObjectId", "value":"Data Cost Upload", "path":"_id" } routes.js: //Route for individual blogs router.route('/blog/:blogpost_id') // START GET method blog by ID .get(function(req, res) { Blogpost.findById(req.params.blogpost_id, function(err, blogpost) { if (err) res.send(err); //res.json(blogpost); res.render('pages/blogpost', { blogpost: blogpost }); }); }) // END GET method blog by ID // START PUT method .put(function(req, res) { Blogpost.findById(req.params.blogpost_id, function(err, blogpost) { if (err) res.send(err); blogpost.title = req.body.title; // update the blog title blogpost.author = req.body.author; // update the author name blogpost.tagline = req.body.tagline; // update the tagline blogpost.content = req.body.content; // update the blog content blogpost.category = req.body.category; // update the category blogpost.tags = req.body.tags; //update the tags blogpost.save(function(err) { if (err) res.send(err); res.json({ message: 'Blog updated.' }); }); }); }) // END PUT method // START DELETE method .delete(function(req, res) { Blogpost.remove({ _id: req.params.blogpost_id }, function(err, bear) { if (err) res.send(err); res.json({ message: 'Successfully deleted' }); }); }); How I'm linking through to each individual object: <% blogpost.forEach(function(blogpost) { %> <%= blogpost.title %> <%= blogpost.date %> <%= blogpost.category %> <%= blogpost.tagline %> <%=: blogpost.content | truncate:800 | append:'...' %> <a href="/blog/<%= blogpost.title %>" class="blog-read-more">Read More <% }); %> Result URL from cli…
has title: Expressjs Using object title as dynamic url
type: Question
tagged with: mongodb
tagged with: javascript
tagged with: express
answer count: 1
has answer: http://stackoverflow.com/a/26195907
downvote count: 0
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: node.js

http://stackoverflow.com/q/26136991
tagged with: ruby-on-rails
accepted answer: http://stackoverflow.com/a/26137068
type: Question
downvote count: 0
has body: I had this working code with one event in backbone but now I need to have two events defined. But I am having ExecJsProgramError. I would appreciate if someone could tell me what I am doing wrong in the following code? class Hcm.Views.GlobalHeader extends Backbone.View template: JST["backbone/templates/global/header"] id: "header" events: -&gt; "submit #sign-in": "update" "click .fb-login": "login_with_facebook" render: -&gt; $(@el).html(@template()) return this login_with_facebook: (e) -&gt; alert 'ghanta prajeep'
tagged with: javascript
has title: Cannot define two events in backbone view
answer count: 1
favorite count: 0
tagged with: backbone.js
has answer: http://stackoverflow.com/a/26137068
type: AnsweredQuestion
score: 1
tagged with: coffeescript
upvote count: 1

http://stackoverflow.com/q/26108470
tagged with: javascript
score: 0
has title: Javascript shows variable string instead of calling variable
type: UnansweredQuestion
has body: I have script that builds a global variable name, and I need the value of that global variable to be called, instead, it's displaying the text of the variable I built, which is the variable I need to be called. Below is an example of what I mean: &lt;head&gt; &lt;script&gt; var speechCount = 0; var speech1 = 'This should display'; &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="speechText" onclick="myFunction()"&gt; Whatever here. &lt;/div&gt; &lt;script&gt; function myFunction() { speechCount = speechCount + 1; var text = 'speech'+speechCount; &lt;----This is what actually gets displayed (As speech1) document.getElementById("speechText").innerHTML = text; } &lt;/script&gt; So on my page, in the div, it says "speech1" instead of "This should display". How do I force JavaScript to realize I want the global variable value pulled, not the actual value of the text variable? Hopefully this all makes sense!
answer count: 0
linked to: http://stackoverflow.com/q/5117127
has comment: http://stackoverflow.com/comment/40916444
duplicate of: http://stackoverflow.com/q/5117127
type: Question
has comment: http://stackoverflow.com/comment/40916591

http://stackoverflow.com/q/26124575
type: Question
accepted answer: http://stackoverflow.com/a/26128388
has title: EO.WEB dynamically generated JavaScript fails with 404
tagged with: javascript
score: 0
answer count: 1
tagged with: asp.net
has body: I am using EO.Web dll for my ASP.Net application for progress bar. My app server is load balanced. I also put my script physically in a different folder but after deployment for first few requests I get 404 on the scripts: scripts/eo_script/eo.7e55b231-d9db-40f6-ad56-84f5b0d0f4b5.js - 404 (not found) After 3 or 4 loads everything seems to be working fine, but 404s right after deployment is breaking my automated tests. My guess is that the requests go from one server to another and that's why its 404ing. Is there a way to initialize all the scripts before run time?
tagged with: ashx
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26128388

http://stackoverflow.com/comment/41032689
comment on: http://stackoverflow.com/q/26170692
score: 0
has text: I have set a breakpoint in PHP's debugger, it is called exactly three times.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40903522
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26101586
score: 1
has text: @turkey3 If this solved your problem mark it as the right answer.

http://stackoverflow.com/q/26163999
has comment: http://stackoverflow.com/comment/41018618
score: 7
accepted answer: http://stackoverflow.com/a/26308560
has comment: http://stackoverflow.com/comment/41018193
tagged with: javascript
has answer: http://stackoverflow.com/a/26164556
answer count: 3
has comment: http://stackoverflow.com/comment/41018422
upvote count: 7
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41018227
has comment: http://stackoverflow.com/comment/41018624
has comment: http://stackoverflow.com/comment/41019984
has comment: http://stackoverflow.com/comment/41019050
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/26164556
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26308598
has body: Is it possible to scroll a web page by sub pixels using JavaScript? I'd like to do something like the following: document.querySelector('body').scrollTop += 0.5 This doesn't work, since scrollTop converts the given number to an integer, which results into cutting off the decimal part of the number. I'd need this in order to scroll a webpage automatically but very slowly. If I use full pixels the scrolling doesn't look smooth. The only thing I can think of, is changing translateY, since this accepts sub pixels. But that would break my regular scroll behaviour, which is something I'd really like to avoid. Edit: I've created two JSFiddles to show the differences: scrollTop translateY They scroll at the same speed. But the first one isn't smooth. However, the second one breaks the native scrolling (you can't scroll to top afterwards). I know that the second one can be fixed by using plugins like iScroll or similar, but if not absolutely necessary, I would like to avoid that. Any suggestions?
type: Question
has title: Scroll web page by subpixels
has answer: http://stackoverflow.com/a/26308560

parsing
tags question: http://stackoverflow.com/q/26144069
tag name: parsing
tags question: http://stackoverflow.com/q/26147461
tags question: http://stackoverflow.com/q/26191717
tags question: http://stackoverflow.com/q/26116981
tags question: http://stackoverflow.com/q/26111455
tags question: http://stackoverflow.com/q/26134855
type: Tag
tags question: http://stackoverflow.com/q/26118697
tags question: http://stackoverflow.com/q/26155029
tags question: http://stackoverflow.com/q/26134699

http://stackoverflow.com/comment/40872827
comment on: http://stackoverflow.com/a/26084474
type: AnswerComment
score: 0
has text: @Kartikeya: Sorry, it isn't that. I try again :D and thank you for your patience. Look, when clicking at the link 'a' I want the content in my files in the case.php to fadeIn in the dynamicDiv div-element.
type: Comment

http://stackoverflow.com/comment/40883592
type: Comment
type: QuestionComment
score: 0
has text: Please provide a [Minimal, Complete, Tested and Readable example](http://stackoverflow.com/help/mcve).
comment on: http://stackoverflow.com/q/26077904

http://stackoverflow.com/q/26177140
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41042346
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/41046430
has comment: http://stackoverflow.com/comment/41042494
has body: I'm building a CSS parser based on JS and what it does it gets every script referenced in the of the page, tries to get all of them with AJAX request, and parses them for specific rules. The problem is when my js script bumps into something like: &lt;link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'&gt; The script fails and it is stopped from being executed further with a console message in Chrome XMLHttpRequest cannot load http://fonts.googleapis.com/css?family=Roboto&amp;text&amp;_=1412330695993. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://mydoma.in' is therefore not allowed access. I understand that this is Chrome specific security settings that can be tuned up, but what I want is to prevent the script from being terminated every time it bumps into something unreachable like this. Please feel free to ask for any clarification!
tagged with: css
has comment: http://stackoverflow.com/comment/41043830
has comment: http://stackoverflow.com/comment/41050574
has comment: http://stackoverflow.com/comment/41042388
has comment: http://stackoverflow.com/comment/41049153
has answer: http://stackoverflow.com/a/26232240
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/41042301
has title: How to avoid "No 'Access-Control-Allow-Origin' header is present ... " error with javascript
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41042373
tagged with: ajax

http://stackoverflow.com/a/31548510
score: 0
type: Answer
has body: Try to check $watchGroup, I think is exactly your problem, pass an array as first param, right?
answers question: http://stackoverflow.com/q/26044668

http://stackoverflow.com/q/26068847
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/32757837
favorite count: 0
type: Question
upvote count: 2
answer count: 2
tagged with: requirejs
has answer: http://stackoverflow.com/a/26069108
has title: Uncaught TypeError: undefined is not a function when using require.js
downvote count: 1
has body: I'm new to require.js so I may not be using it correctly, but as far as I know, I can't find what's causing the error. Structure index.html Scripts\ - jquery-2.1.1.min.js - require.js \app - main.js \lib - work-requests.js - controller-base.js - util.js index.html &lt;script src="Scripts/require.js" data-main="Scripts/app/main"&gt;&lt;/script&gt; main.js requirejs.config({ baseUrl: 'Scripts/lib', paths: { jquery: '../jquery-2.1.1.min', }, }); requirejs(['jquery', 'util', 'work-requests'], function ($, util, work_requests) { $(function () { var foo = new work_requests.get_all(); // &lt;-- error "Uncaught TypeError: undefined is not a function }); work-requests.js define(['controller-base'], function (controller_base) { return function () { var that = controller_base('work-requests') return that; } }); controller-base.js define(['jquery'], function ($) { return function (controller_name) { var that = {}; that.controller = controller_name; that.get_all = function () { return $.ajax({ type: 'get', contentType: 'application/json', url: _api_root + '/' + that.controller, }); }; return that; }; }); util.js define({ foo: function(data){}, });
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/16233372
accepted answer: http://stackoverflow.com/a/26069108
has answer: http://stackoverflow.com/a/32757837

http://stackoverflow.com/comment/41054372
type: Comment
comment on: http://stackoverflow.com/a/26183384
score: 0
type: AnswerComment
has text: Correct, which is "one way" isn't it?

http://stackoverflow.com/comment/40891931
score: 0
type: Comment
has text: I've change from createWindow to `function openhome() { settingshome.openWindow(home);`
type: AnswerComment
comment on: http://stackoverflow.com/a/26094586

http://stackoverflow.com/comment/41720211
score: 0
type: AnswerComment
has text: when i submit like this, nothing happens. i clicked the button and put the mail address and wait and wait. but nothing happened.
type: Comment
comment on: http://stackoverflow.com/a/26035425

http://stackoverflow.com/q/26178493
tagged with: javascript
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41045035
score: 2
has title: AngularJS 1.3.0 input date type seems incorrect
has comment: http://stackoverflow.com/comment/41044776
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/41044695
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41044994
type: Question
tagged with: date
has body: I seem to be having some issues with angular 1.3.0-rc4 and the input type date. I have set up a plunker to try and illustrate my problem http://plnkr.co/edit/6YeNKhfigDAqv14XNHfI?p=preview The issue seems to be when using 1.3.0-rc4, the value from the date input field seems to be incorrect by 1 day? When the date 19/07/1982 (dd/MM/yyyy) is entered into the input field the following value is set in the model: {"date": "1982-07-18T12:00:00.000Z"} Yet when 1.2.x is used, the following is set in the model: {"date": "1982-07-19"} Is this an issue with the release candidate? Or am I missing something obvious? Updates Have tested this in both Chrome v37.x and IE11 and same result. Unsure why the value is midnight of the day before?
upvote count: 2
has comment: http://stackoverflow.com/comment/41044765

http://stackoverflow.com/q/26165211
has answer: http://stackoverflow.com/a/26165389
has comment: http://stackoverflow.com/comment/41020762
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41020820
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41020714
has comment: http://stackoverflow.com/comment/41020681
has answer: http://stackoverflow.com/a/26165365
type: UnansweredQuestion
has title: How to tag different parts in image using CSS3/JS
tagged with: css
has body: I am building an interactive educational small app, where I help kids discover the different parts of body. http://www.easypacelearning.com/images/TheWholeBody.jpg Technically, I want to know how can I select some parts in the image, to let users click on a portion of an image and link to a new more specific image. Example: I am putting the body of human as a background, and I would like to click on an eye, it would pop-up and say it's an eye. How can I get points so I can hover using the mouse to recognize the part .. function getData() { return { 'Head': { color: ... points: .. }, 'body': { color: ... points: .. }, 'leg': { color: ... points: .. } } } Link that I use to experiment : http://jsfiddle.net/ozgsvc61/1/

http://stackoverflow.com/q/26146252
has title: in iOS8 using .focus() will show virtual keyboard and scroll page after touch
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/31532978
type: Question
possible better answer: http://stackoverflow.com/a/31532978
has answer: http://stackoverflow.com/a/26150073
tagged with: autofocus
has answer: http://stackoverflow.com/a/50049661
has comment: http://stackoverflow.com/comment/40990967
has answer: http://stackoverflow.com/a/31665061
downvote count: 0
tagged with: ios
answer count: 7
tagged with: javascript
has answer: http://stackoverflow.com/a/27425632
has comment: http://stackoverflow.com/comment/40986311
favorite count: 0
accepted answer: http://stackoverflow.com/a/26150073
has answer: http://stackoverflow.com/a/26185118
score: 48
tagged with: uikeyboard
has answer: http://stackoverflow.com/a/29394894
upvote count: 48
has body: Prior to iOS8, using the Javascript .focus() method on an input element would appear to have no effect (the virtual keyboard would not display). After the latest iOS 8 release, running the .focus() method seemed to have no effect on page load but once a user touched anywhere on the screen the virtual keyboard would instantly appear and scroll the page to the element in focus. (This is also an issue when I use the HTML attribute "autofocus") This change has caused issues with iOS8 users on my site. When a user attempts to click a button on my page the sudden scroll and keyboard appearance causes them to unintentionally click a button that was lower on the screen. I am assuming this is a bug in iOS8 and was not intentional feature, my question is what is the most efficient solution to fixing this problem? Do I have to check navigator.userAgent to see if the device is iOS8, every time I use the .focus() method?
has comment: http://stackoverflow.com/comment/44154000

http://stackoverflow.com/q/26164843
type: Question
score: 1
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/26145831
has answer: http://stackoverflow.com/a/26164889
has comment: http://stackoverflow.com/comment/41020098
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: Could someone help me with this: I am getting an unexpected token error, I have validated my json file and the JS. But I still get an error. HTML &lt;div class="load"&gt;&lt;/div&gt; Here is the JS /* Table load */ var uri = 'http://*****.com/TestFiles/'; $.ajax({ url: uri + 'json/banks.json', dataType: 'jsonp', success: function(data){ var account = data; console.log(data); $.each(account, function(Key, Val) { var row=$('&lt;div class="row"&gt;&lt;/div&gt;'); console.log(account); $.each(Val, function(k, v){ console.log(account); $('&lt;div class="cell"&gt;&lt;p&gt;' + v + '&lt;/p&gt;&lt;/div&gt;').appendTo(row); }); row.appendTo('.load'); }); } }); This is the json file { "count": 5, "records": [ { "name": "Big Guy", "apy": "0.75", "earnings": "376.41" }, { "name": "URGrant", "apy": "0.87", "earnings": "436.89" }, { "name": "CheatandGrace", "apy": "0.01", "earnings": "5.00" }, { "name": "The Onion", "apy": "0.01", "earnings": "5.00" }, { "name": "Pellet Grant", "apy": "0.01", "earnings": "5.00" } ] } Any help could be great.
linked to: http://stackoverflow.com/q/2067472
has comment: http://stackoverflow.com/comment/41019799
has comment: http://stackoverflow.com/comment/41020437
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26164889
has comment: http://stackoverflow.com/comment/41019901
upvote count: 1
has title: JS/JSON Uncaught SyntaxError: Unexpected token :

http://stackoverflow.com/q/26135100
has title: JQuery Mobile canvas field(signature) style issue
tagged with: cordova
score: 1
has answer: http://stackoverflow.com/a/33896029
upvote count: 1
type: Question
tagged with: javascript
tagged with: canvas
has body: In my cordova application i used Jquery mobile(v 1.3.2) and thomas jbradly Sign plugin.In my application i have one signature field(canvas to draw sign) and some fields. Like below code: Button1 Label 1 Put Your Sign Here Clear When put signature in canvas filed the duplicate of canvas field is displayed above the original field. Before Signing the canvas: After Signing the canvas:(Create duplicate of original canvas) NOTE*: When remove the Jquery mobile the signature field working fine. For reference: Signature Css Signature Js Please help me to solve the problem..
downvote count: 0
tagged with: jquery-mobile
answer count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/40934332
score: 1
comment on: http://stackoverflow.com/q/26118833
type: Comment
type: QuestionComment
has text: just a guess, but you set usNumberFormat false, the sorter should then expect numeric values like 430,95... either change your values or use true

http://stackoverflow.com/q/26159691
has comment: http://stackoverflow.com/comment/41010212
has comment: http://stackoverflow.com/comment/41009843
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26166387
accepted answer: http://stackoverflow.com/a/26166387
has comment: http://stackoverflow.com/comment/41011796
has comment: http://stackoverflow.com/comment/41012836
linked to: http://stackoverflow.com/q/26172757
tagged with: backbone.js
tagged with: model
has comment: http://stackoverflow.com/comment/41012960
has comment: http://stackoverflow.com/comment/41019189
has body: I would like to know your opinion about this structure. you have 3 or 4 part in the same page. And you used a main Model to control and communication between the another Model. I'm thinking that this is a good practice to reuse de code. What do you think about it? mainModel(comunication betwen submodel) / | \ model model model Thank you
type: AnsweredQuestion
has title: Backbone good model structure
has comment: http://stackoverflow.com/comment/41009983
type: Question
has comment: http://stackoverflow.com/comment/41035540
tagged with: javascript

http://stackoverflow.com/q/26167305
has answer: http://stackoverflow.com/a/26167349
has title: Showing products with angular in the html
answer count: 1
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26167349
tagged with: angularjs
has body: I'm trying to make a table that shows products with angular, but the items are not showing up in HTML. If anyone notice anything wrong with the code, please help me. This is my app.js: (function (){ var app = angular.module('confirmados', []); app.controler('ListaController', function (){ this.product = gem; }); var gem = { id: 1, name: 'cool', email: 'cool@' }; And this is my HTML: &lt;tr ng-controller="ListaController as lista" class="reservas"&gt; &lt;td&gt; {{lista.product.id}} &lt;/td&gt; &lt;td&gt; {{lista.product.name}} &lt;/td&gt; &lt;td&gt; {{lista.product.email}} &lt;/td&gt; &lt;/tr&gt;
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/41034826
type: AnswerComment
comment on: http://stackoverflow.com/a/26172904
has text: Thanks @steely. I'll try the method that you had just mentioned while waiting for your solution.
score: 0
type: Comment

http://stackoverflow.com/comment/40898960
has text: *"the answer is 160"*. Really ?
comment on: http://stackoverflow.com/q/26099091
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/comment/41120375
has text: The routing option is what I tried to outline above, although it looks like you have provided the proper way to access the method in question. I would recommend giving this a try.
type: AnswerComment
comment on: http://stackoverflow.com/a/26214851
type: Comment
score: 0

http://stackoverflow.com/a/26150903
type: Answer
has body: Just in case you don't want to modify the document and don't want to use jQuery... var output = ''; var p = document.getElementsByTagName('p')[0]; var nodes = p.childNodes; for (var i = 0; i &lt; nodes.length; i++) { var node = nodes[i]; switch (node.nodeType) { case Node.TEXT_NODE: output += node.nodeValue; break; case Node.ELEMENT_NODE: output += node.value; break; } } console.log(output);
answers question: http://stackoverflow.com/q/26149927
score: 0

http://stackoverflow.com/comment/129996111
score: 0
has text: If the JavaScript code in the callback specified to `requestAnimationFrame()` runs longer than a single frame, then, yes, you will force a frame skip which is itself automatic throttling. You should only put things in `requestAnimationFrame()` if they are things which cause a user-visible change (such as calculating positions). Wanting to skip frames to “increase performance” will result in less fluidity in your animations and a perception of lower performance/jagginess on your page.
comment on: http://stackoverflow.com/q/26120838
type: Comment
type: QuestionComment

reactive-programming
tags question: http://stackoverflow.com/q/26074432
tag name: reactive-programming
type: Tag

http://stackoverflow.com/q/26080340
type: UnansweredQuestion
tagged with: angular-ui-typeahead
has answer: http://stackoverflow.com/a/26080369
has comment: http://stackoverflow.com/comment/40866250
tagged with: angularjs-directive
has title: How do I dynamically add a AngularJS typeahead component that has its own unique typeahead-on-select event?
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/65529302
score: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40864989
has body: I'm able to dynamically add the typeahead component, but not able to give it its own typeahead-on-select event. (this part works) For the second input, when selecting an item from the list, it should populate the cost and amount base on the data from the database like this. (This part doesn't work) How do I dynamically add a AngularJS typeahead component that has its own unique typeahead-on-select event? It would populate the first item's cost and amount because the template is apparently static and not dynamic. I've tried using jquery to add the attribute, typeahead-on-select, with a function that it'd call, but that didn't work... Here's my code. The autocomplete is the typeahead control for the item name. The addautobtn, is the "New Item" button you seen in the pictures. It adds a new item row that has the typeahead input, cost and amount. app.directive('autocomplete', function($compile) { return { restrict: 'E', scope: { itemName: '@' }, template: "&lt;input type='text' name='name' ng-model='item' typeahead='item as item.name for item in getItems() | filter:$viewValue | limitTo:4' typeahead-on-select='updateItemInputValues(item, "+getNumItems()+")' class='inputStr form-control'&gt;", controller: function ( $scope, $element ) { $scope.getItems = function() { return JSON.parse(sessionStorage.getItem('items')); }; $scope.updateItemInputValues = function( item, itemNumber ) { $('#itemCost'+itemNumber).val( item.cost.toFixed(2) ); $('#itemAmount'+itemNumber).val( item.amount ); } } } }); app.directive('addautobtn', function($compile) { return { restrict: 'E', scope: { text: '@' }, template: "&lt;input type='button' class='btn btn-primary btn-sm' value='New Item' ng-click='add()'&gt;", controller: function ( $scope, $element ) { $scope.add = function () { numItems++; var itemRow = document.createElement('div'); itemRow.setAttribute( 'id', 'item'+(numItems) ); itemRow.setAttribute( 'class', 'row itemRow' ); var itemColTitle = document.createElement('div'); itemColTitle…
has comment: http://stackoverflow.com/comment/40864901

http://stackoverflow.com/a/26098222
accepted answer of: http://stackoverflow.com/q/26098158
has body: getElementById gets a single element, by its id. You're passing in a tag name and expecting it to return a list. If your goal is to remove the last tr element anywhere on the page, you can use querySelectorAll instead: function RemoveData() { var elements = document.querySelectorAll('tr'); // <== Main change var last = elements[elements.length-1]; // <== Note I added `var` last.parentNode.removeChild(last); } querySelectorAll works on all modern browsers, and IE8. I added var to the last line because your code was falling prey to The Horror of Implicit Globals without it. Re your comment below: How would I remove a selected element... I'd probably have a single event handler on the table and then trigger removal based on the event's target (e.g., delegated handling). That looks something like this: "use strict"; var tbody = document.getElementById("the-tbody"); // Add rows when the button is clicked document.getElementById("btn-add").addEventListener("click", addRow, false); function addRow(e) { var row = document.createElement('tr'); row.innerHTML = ' Hi there ' + Math.floor(Math.random() * 1000) + ' [x] '; tbody.appendChild(row); } // Remove rows when their ".remove" span is clicked tbody.addEventListener("click", removeRow, false); function removeRow(e) { var elm; for (elm = e.target; elm !== this; elm = elm.parentNode) { if (/\bremove\b/.test(elm.className)) { // On modern browsers you could use `classList` // It's a remove link, remove its parent tr and we're done removeElement(elm.parentNode); e.stopPropagation(); return; } } } function removeElement(elm) { elm.parentNode.removeChild(elm); } .remove { cursor: pointer; } There I'm using addEventListener. If you need to support older browsers, you can use the hookEvent function in this other answer instead.
has comment: http://stackoverflow.com/comment/40897596
answers question: http://stackoverflow.com/q/26098158
type: AcceptedAnswer
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/40903905
downvote count: 0
has comment: http://stackoverflow.com/comment/40905214
upvote count: 2
has comment: http://stackoverflow.com/comment/40897642

http://stackoverflow.com/comment/45171711
score: 0
type: AnswerComment
type: Comment
has text: why the extra parentheses? if (! /iPad|iPhone|iPod/.test(navigator.userAgent))
comment on: http://stackoverflow.com/a/26150073

http://stackoverflow.com/a/26164612
has comment: http://stackoverflow.com/comment/41021057
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26164529
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/26164529
score: 2
has comment: http://stackoverflow.com/comment/41019903
has body: To do it the way you attempted would have just taken a syntax fix: $("#fieldOfBusinessSelectBox option[value=" + answer[0].yearOfEstablishment +"]").attr('selected', 'selected'); However, you can do it the same way you did all the others: $("#fieldOfBusinessSelectBox").val(answer[0].yearOfEstablishment);
downvote count: 0
has comment: http://stackoverflow.com/comment/41020138

http://stackoverflow.com/a/26098280
score: 0
has body: I found that dataGrouping is appliable only to HighStock charts. I was using highcharts instead of highstock. Changed to highstock, no it works
type: Answer
answers question: http://stackoverflow.com/q/26077283

http://stackoverflow.com/q/26080350
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26080495
has answer: http://stackoverflow.com/a/26080400
score: 1
has title: proces sliders tags in my specific php code
type: UnansweredQuestion
upvote count: 1
tagged with: php
has body: Hello i'm near at the end of my form and have a little problem with collection values in php from my sliders. Slider code structure: Simple Complex Playful Serious Javascript $(function() { // Regular slider $('#slider1').slider({ min: 0, max: 100, values: [50], slide: function(event, ui) { $('#slider1-value').text(ui.value); } }); $('#slider2').slider({ min: 0, max: 100, values: [50], slide: function(event, ui) { $('#slider1-value').text(ui.value); } }); PHP: I don't get any values from slider1 , with this code structure , what should i do i'm not very familiar with php , any javascript or jquery ? Thanks in advance

http://stackoverflow.com/a/26060669
score: 1
type: Answer
answers question: http://stackoverflow.com/q/26060351
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26060351
type: AcceptedAnswer
has body: I assume db.cards is one module of yours, but a well formed filter looks like this: var filter= { field: "Title", operator: "contains", value: txt }; datasource.filter(filter); the operator contains exists: http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-filter.operator
downvote count: 0

http://stackoverflow.com/q/26078050
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: ngsanitize
has comment: http://stackoverflow.com/comment/40875764
has body: I'm new to angular JS... I have //HTML src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular-sanitize.min.js" //JS var app = angular.module('myApp.view2', ['ngRoute','ngSanitize']) However I received the error message : "either I spelled ngSanitize wrong or forget to load it". I'm sure the link is correct and my ngRoute has been successfully loaded... can anybody help me please?
tagged with: javascript
has comment: http://stackoverflow.com/comment/40860688
downvote count: 0
favorite count: 0
tagged with: ajax
has title: Failed to load ngSanitize using angular cdn with the correct src
tagged with: angularjs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26052415
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: constructor
has comment: http://stackoverflow.com/comment/40878333
answer count: 0
has comment: http://stackoverflow.com/comment/40877529
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40813665
upvote count: 1
has title: Can I override behavior of literal object construction?
tagged with: object
has comment: http://stackoverflow.com/comment/40878750
score: 1
has comment: http://stackoverflow.com/comment/40868634
has body: I can override the Object function to customize it were I so inclined: Object = function (Object) { return function() { var obj = Object.apply(Object, arguments); obj.myprop = 99; return obj; }; }(Object); &gt; Object({a:1}) Object {a: 1, myprop: 99} My question is if there's any way to do something similar to override the behavior of object construction when the object is specified as an object literal (in full cognizance of the potential horrible consequences): &gt; {a:1} Object {a: 1, myprop: 99}

http://stackoverflow.com/a/26067333
has comment: http://stackoverflow.com/comment/40841838
downvote count: 0
has body: No, this is not possible. You could instead move/clone the child element and insert it somewhere else in the markup (e.g. via JavaScript). var element = jQuery('.Inner-Div').clone(); and then append to any visible element that be appropriate. element.appendTo('some element'); Example http://jsfiddle.net/xmo9bpot/ EDIT Another clever way would be to hide all siblings of the chosen child element and in fact leave the parent visible DEMO http://jsfiddle.net/xmo9bpot/1/ $(".child").siblings().hide();
answers question: http://stackoverflow.com/q/26067284
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/40905025
type: QuestionComment
comment on: http://stackoverflow.com/q/26074414
has text: That's a problem with the snippet (I fixed it). However, that did not fix the issue.
score: 0
type: Comment

http://stackoverflow.com/q/26123225
has title: Expressjs : issue with image file encoding during res.download
upvote count: 1
tagged with: node.js
type: AnsweredQuestion
score: 1
type: Question
tagged with: encoding
tagged with: javascript
has answer: http://stackoverflow.com/a/26919570
tagged with: image
tagged with: express
answer count: 1
downvote count: 0
has body: I have a pretty run-of-the-mill node.js server with expressjs installed locally for development purposes; I store various files and request them via a basic HTTP call that returns the file through express' res.download feature. Most of the time, this works without a hitch. For a very small subset of files, however, the end-user receives a file that is much larger than expected (almost 2x) and is unreadable by any conventional viewer. Out of maybe a hundred files, this has only happened twice, and both were JPG files, but the sample is too small to draw any conclusion. What I know : The issue is reproductible : if it happens with a file, it always happens; The issue is not related to the way files are stored : if I swap the problematic file with another one but keep everything else the same (name, location, etc.), it works fine; Right before the res.download happens, the file is okay : checking its size with fs.stats returns the correct value The HTTP response encounters no visible problem : no error, 200 response code... The source file seems to have normal metadata and JPG markers UPDATE I did some tests, and the issue seems to be somehow related to encoding : the mangled response file is, for reasons unknown, encoded in UTF-8 ; the size discrepancy comes from all non-UTF-8 characters being replaced by EF BF BD (the unknown character symbol) ! I still can't understand why it happens, what makes these few files different from others, and if it can be detected and/or corrected upstream. UPDATE 2 After some additional tests, I still can't quite pinpoint the cause, but I can add the following info : Systems-wise, the issue happens during the data streaming in fs.js The root cause is located somewhere in the EXIF data of the image For those interested, the source image (source.JPG) and download result (response.JPG) can be found here : http://www.sycomor.fr/test/ ; I also added a similar image that isn't affected by the download and comes out clean. For what it's worth,…
favorite count: 0
accepted answer: http://stackoverflow.com/a/26919570

http://stackoverflow.com/comment/40865106
has text: my problem is not the prototype, as the different time - it does not matter what task i set - the point is: the same task in two big different times - you understand me - and - The purpose of a test is the Different -
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26080382
type: AnswerComment

http://stackoverflow.com/q/26161686
downvote count: 0
has comment: http://stackoverflow.com/comment/41016785
has title: Ember CLI dependencies are undefined (moment is undefined)
type: Question
has comment: http://stackoverflow.com/comment/45566105
tagged with: javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/41016472
has body: I am using version 0.0.46 of Ember CLI. In my bower.json file I have defined { "name": "my-app", "dependencies": { "handlebars": "~1.3.0", "jquery": "^1.11.1", "ember": "1.7.0", "ember-data": "1.0.0-beta.10", "ember-resolver": "~0.1.7", "loader": "stefanpenner/loader.js#1.0.1", "ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3", "ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4", "ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.2", "ember-qunit": "0.1.8", "ember-qunit-notifications": "0.0.4", "qunit": "~1.15.0", "interact": "~1.0.26", "moment": "2.8.3" } } Did a bower install which loaded moment into bower_components. And in my Brocfile.js I have imported it. app.import('bower_components/moment/moment.js'); module.exports = app.toTree(); And in my .jshintrc I have included it. "predef": [{ "document": true, "window": true, "-Promise": true, "moment": true }] And I created an application route just to see about getting it working. import Ember from "ember"; var ApplicationRoute = Ember.Route.extend({ currentDate: null, setupController: function(controller, model) { this._super(controller, model); this.set('currentDate', moment()); } }); export default ApplicationRoute; It comes back saying moment is undefined. I have tried with momentjs and interactjs but neither want to work. I tried adding /* global moment */ to the application route. I also tried /* global moment:true */ but still nothing. Does anyone see what I'm doing wrong? Or is this a bug in version 0.0.46 of Ember CLI? Thanks!
has comment: http://stackoverflow.com/comment/41015818
tagged with: ember.js
answer count: 1
has comment: http://stackoverflow.com/comment/41016876
tagged with: ember-cli
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26164681
tagged with: momentjs
score: 2

http://stackoverflow.com/comment/43291322
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26034778
has text: I'm a little late to seeing this, but have you tried rendering it full-size but off-screen (eg, via `left:-3000px`), then moving it into position when switching to your tab?
score: 0

http://stackoverflow.com/comment/41059331
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26181833
has text: Please show us the actual HTML that you are trying to append.

http://stackoverflow.com/a/26063384
has comment: http://stackoverflow.com/comment/40833910
accepted answer of: http://stackoverflow.com/q/26063070
type: Answer
answers question: http://stackoverflow.com/q/26063070
upvote count: 1
has comment: http://stackoverflow.com/comment/40834602
type: AcceptedAnswer
downvote count: 0
has body: Change this[ check + 'S' ] += '&lt;input type="checkbox" ... &gt;' // this[ check + 'S' ] = this[ check + 'S' ] + '&lt;input type="checkbox" ... &gt;' // this[ check + 'S' ] = undefined + '&lt;input type="checkbox" ... &gt;' to this[ check + 'S' ] = '&lt;input type="checkbox" ... &gt;' Check your code plz this[ check + 'S' ] = '&lt;input type="checkbox" id="'+this[ check + 'S' ]+'"' // this[ check + 'S' ] is undefined +(data.this[ check + 'S' ] == 1 ? 'checked="checked"':'')+'/&gt;'; // this[ check + 'S' ] is undefined //$("#" + check ).is(":checked") ? 1 : 0; to this[ check + 'S' ] = '&lt;input type="checkbox" id="'+check + 'S'+'"' // modified +(data[ check + 'S' ] == 1 ? 'checked="checked"':'')+'/&gt;'; // modified //$("#" + check ).is(":checked") ? 1 : 0; "this" means "var checks" on your update function in this case "data[this]" is really wrong access, why this means object(instance) not string(object's key)
score: 1

http://stackoverflow.com/comment/43423251
score: 0
type: AnswerComment
type: Comment
has text: I don't see why you deleted my answer, as: 1/ It was correct (see the accepted answer) 2/ I can't comment on posts that aren't mine anyway.
comment on: http://stackoverflow.com/a/27494462

http://stackoverflow.com/comment/40934466
type: Comment
type: QuestionComment
score: 0
has text: Did OP ask how he should add his business?
comment on: http://stackoverflow.com/q/26115523

http://stackoverflow.com/q/26132374
has comment: http://stackoverflow.com/comment/40959600
type: Question
tagged with: javascript
upvote count: 0
answer count: 1
tagged with: calculator
has comment: http://stackoverflow.com/comment/40959602
favorite count: 0
has comment: http://stackoverflow.com/comment/40959669
has title: Java Script Gross/Net Pay Calculator
score: -3
has body: Hey I have been having trouble getting the code for the calculate button to function with the code I have.For some reason it isn't displaying correctly. When I click the calculate button to figure out the gross pay and net pay, the button does not calculate the gross pay and net in the input boxes. After I enter the hours worked and pay rate. PLEASE HELP.... Gross Pay and Net Pay. Gross Pay and Net Pay. Hours: Rate: Gross: Net:
has answer: http://stackoverflow.com/a/26132423
type: AnsweredQuestion
tagged with: java
downvote count: 3
accepted answer: http://stackoverflow.com/a/26132423

http://stackoverflow.com/comment/40851534
type: Comment
has text: let me try this once.
comment on: http://stackoverflow.com/a/26073093
type: AnswerComment
score: 0

http://stackoverflow.com/q/26081181
favorite count: 0
has comment: http://stackoverflow.com/comment/40867087
tagged with: angularfire
tagged with: angularjs
has body: I am following a tutorial online for AngularJS. Of which there are several updates that amends the codes for the newer version of angularfire or firebase: However after taking those codes in, everything started failing. //For Post.js var posts = $firebase(ref); //var posts = $firebase(ref).$asArray(); this gives error //For Postview.js $scope.post = Post.find($stateParams.postId); //$scope.post = Post.find($stateParams.postId).$asArray(); gives error when transit Theres also several changes for example: &lt;!--For HTML --&gt; &lt;div class="post row" ng-repeat="(postId, post) in posts"&gt; &lt;!-- &lt;div class="post row" ng-repeat="post in posts"&gt; gives error--&gt; Theres nothing displayed and it seems something broke while communicating with Firebase. F12 shows the error as: "TypeError: undefined is not a function". Any thoughts? Is it because of the version of angularfire or firebase?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40878838
has answer: http://stackoverflow.com/a/26081421
upvote count: 1
has title: AngularJS & Firebase tutorial: 'TypeError: undefined is not a function;' issue
has comment: http://stackoverflow.com/comment/40875479
downvote count: 1
has comment: http://stackoverflow.com/comment/40867856
tagged with: firebase
has comment: http://stackoverflow.com/comment/40903880
type: Question
score: 0
has comment: http://stackoverflow.com/comment/40866990
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/40838047
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26065587
score: 0
has text: I'll remove the tag, I use jQuery towards the end of the document to select an element's .text.

http://stackoverflow.com/a/27622543
has body: We've added official support for Phaser with TexturePacker 3.6.0. The JSON array and JSON data are now available from the framework selector. We've also created a simple tutorial showing you how to use it.
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26150405
upvote count: 3
type: Answer

http://stackoverflow.com/comment/40878660
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26087828
has text: You need to give consideration to operator precedence and associativity. There are rules that govern the association of an operator like `+` and `-` to its operands. You're assuming that it will just know that you want to perform math in some places and string concatenation in others, and that it'll just work it out for you. That's not the way it goes. There are rules that are followed, and as it is right now, you're performing mathematical operations on strings that can't be converted to numbers.
type: QuestionComment

http://stackoverflow.com/comment/98547671
type: AnswerComment
has text: IE11 does not understands `require()`.
type: Comment
comment on: http://stackoverflow.com/a/36758352
score: 1

http://stackoverflow.com/comment/40796124
comment on: http://stackoverflow.com/q/26042910
type: QuestionComment
has text: Kibana is far more than the graphs displayed. There is a lot of dynamic data going on.
score: 0
type: Comment

http://stackoverflow.com/comment/41039974
type: Comment
has text: Hi easeee. Thank you for the help. However i've still got one issue. If I want each fold to be different heights how could I do this? As for example I want fold 1 to be 300px and fold 2 to be 500px, but this also breaks the fold effect. Is there anyway to make each fold automatically fit the content.
comment on: http://stackoverflow.com/a/26175645
type: AnswerComment
score: 0

http://stackoverflow.com/q/26099192
has comment: http://stackoverflow.com/comment/40927317
tagged with: javascript
tagged with: jwplayer
has comment: http://stackoverflow.com/comment/40899646
has comment: http://stackoverflow.com/comment/40900643
tagged with: jwplayer6
has answer: http://stackoverflow.com/a/73202653
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40900549
favorite count: 0
has comment: http://stackoverflow.com/comment/40899493
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40927100
has comment: http://stackoverflow.com/comment/40899082
has comment: http://stackoverflow.com/comment/40919130
score: 3
has comment: http://stackoverflow.com/comment/40985520
has title: jwplayer memory leak / not releasing memory on subsequent loads
upvote count: 3
has comment: http://stackoverflow.com/comment/41025761
type: Question
has comment: http://stackoverflow.com/comment/40899179
has comment: http://stackoverflow.com/comment/41007885
has body: I've an HTML Page crafted using JavaScript on which I've used JW Player. For some reason, its not releasing memory. The logical flow is like: Step 1: Load HTML Page. Step 2: Fetch content details using AJAX Request. Step 3: Load first Video using JW Player. Step 4: Unload JW Player using jwplayer("#jwplayerdivcontainer").remove(). Step 5: Load next Video using JW Player. Somehow, between Step 4 and Step 5, memory is not getting freed despite calling remove() method and it gets subsequently increased causing memory leak and browser crash at later stage. Any help will be greatly appreciated. Thanks !!! UPDATE I've tried to call .remove() method, .detachMedia() method and nothing is working as expected. On digging more using Chrome and Mozilla Profilers, I found that jwplayer instance is not getting destroyed.

http://stackoverflow.com/a/26156876
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41004618
downvote count: 0
answers question: http://stackoverflow.com/q/26156801
has comment: http://stackoverflow.com/comment/41004684
has body: Javascript runs in the users browser.We dont have any control over it. The thing you can do is to obfuscate or hash variable names and/or values. See here
type: Answer

http://stackoverflow.com/q/26168804
has answer: http://stackoverflow.com/a/41488921
type: UnansweredQuestion
has body: I am trying to retrieve data from an external JSON file. The website has an api which allows public access. My problem is that I can not access the data. Now I display undefined. Well to be honest I think this is impossible to do with some access from te sever side. Now is there a way with php and the curl function? var dataFromServer; function getPrice() { $.ajax({ dataType: "jsonp", url: "http://forums.zybez.net/runescape-2007-prices/api/flax", success: handleData(dataFromServer) }); } function handleData(data) { document.write(data); //do some stuff }
has comment: http://stackoverflow.com/comment/41027228
score: 2
has answer: http://stackoverflow.com/a/26168918
tagged with: http://stackoverflow.com/tag/json
type: Question
upvote count: 2
answer count: 2
downvote count: 0
tagged with: javascript
has title: Retrieving Data from an URL JSON
has comment: http://stackoverflow.com/comment/41027147
has comment: http://stackoverflow.com/comment/41026982
tagged with: http://stackoverflow.com/tag/html
tagged with: xmlhttprequest
favorite count: 0

http://stackoverflow.com/comment/40983813
type: Comment
has text: Could this be because the div I want to add the event to isn't added until later, after initialize and render?
type: QuestionComment
comment on: http://stackoverflow.com/q/26143408
score: 0

http://stackoverflow.com/q/26096068
tagged with: javascript
has comment: http://stackoverflow.com/comment/40917613
tagged with: pdf.js
tagged with: http://stackoverflow.com/tag/pdf
tagged with: node.js
answer count: 0
score: 0
type: UnansweredQuestion
has title: pdf.js:"pdf.js throwing Null response for external pdf URL."
type: Question
has body: I am using pdf.js to render pdf files on browser. It's working fine when I give a file which is located in root folder, but when I give any external URL it throws null response. Here is error. PDF.js v? (build: ?) Message: Unexpected server response (0) while retrieving PDF "http://nodetuts.com/pdf/handson-nodejs-sample.pdf". your suggestions will be appreciated.
has comment: http://stackoverflow.com/comment/40893911

http://stackoverflow.com/a/43333491
has comment: http://stackoverflow.com/comment/92336385
score: 17
has comment: http://stackoverflow.com/comment/110969277
has comment: http://stackoverflow.com/comment/108289489
has comment: http://stackoverflow.com/comment/112784396
downvote count: 2
has comment: http://stackoverflow.com/comment/112801969
upvote count: 19
has comment: http://stackoverflow.com/comment/94440200
has comment: http://stackoverflow.com/comment/112823991
has comment: http://stackoverflow.com/comment/112803999
type: Answer
has comment: http://stackoverflow.com/comment/118822682
has comment: http://stackoverflow.com/comment/112624913
has comment: http://stackoverflow.com/comment/108322090
has body: to keep this question up to date: here is an approach i'd choose over the regex function using the ES6 spread operator. function trimByChar(string, character) { const first = [...string].findIndex(char =&gt; char !== character); const last = [...string].reverse().findIndex(char =&gt; char !== character); return string.substring(first, string.length - last); } Improved version after @fabian 's comment (can handle strings containing the same character only) function trimByChar1(string, character) { const arr = Array.from(string); const first = arr.findIndex(char =&gt; char !== character); const last = arr.reverse().findIndex(char =&gt; char !== character); return (first === -1 &amp;&amp; last === -1) ? '' : string.substring(first, string.length - last); }
has comment: http://stackoverflow.com/comment/94408343
has comment: http://stackoverflow.com/comment/112690942
has comment: http://stackoverflow.com/comment/108318673
has comment: http://stackoverflow.com/comment/94440065
answers question: http://stackoverflow.com/q/26156292
has comment: http://stackoverflow.com/comment/112775411

http://stackoverflow.com/a/26127921
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40952121
answers question: http://stackoverflow.com/q/26127531
has body: Try this: HTML: TTILE DATE ACTIVITY TTILE DATE ACTIVITY delete approved noapproved sort PHP: if(count($_POST['selectedposts']) > 0){ if($_POST['action'] == 'delete'){ delete_posts($_POST['selectedposts']); } //Your other if-statements } function delete_posts($array){ $ids = array(); foreach($array as $key => $value){ $ids[] = $value; } //Use PDO for your deletion $db = new PDO(...); //Use YOUR PDO instantiation $inQuery = implode(',', array_fill(0, count($ids), '?')); $stmt = $db->prepare( "DELETE FROM `table` WHERE id IN (" . $inQuery . ")" ); $stmt->execute(array_values($ids)) } I haven't tested it, but see where that gets you!

http://stackoverflow.com/a/26047871
upvote count: 2
answers question: http://stackoverflow.com/q/26047619
score: 2
accepted answer of: http://stackoverflow.com/q/26047619
has body: First case document.getElementById("toto").style.opacity = 0; document.getElementById("toto").style.transition = "all 5s ease"; document.getElementById("toto").style.opacity = 1; This happens because each line in above javascript is invoked immediately and it is similar to setting these css rules: #toto { opacity: 0; transition: all 5s ease; opacity: 1; } as you can see the second occurence of opacity will override the value 0, so in result it will be 1. #toto { transition: all 5s ease; opacity: 1; } There is no animation in this case just static opacity that isn't going to change. Second case document.getElementById("toto").style.opacity = 0; window.setTimeout(function(){ document.getElementById("toto").style.transition = "all 5s ease"; document.getElementById("toto").style.opacity = 1; }, 1); In this case you initially set the opacity to 0. And after 1ms you change the css rules, so there is a change in opacity from 0 to 1. That's why the animation was fired. Regards.
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/26162638
score: 4
tagged with: express
answer count: 1
tagged with: callback
accepted answer: http://stackoverflow.com/a/26163037
favorite count: 0
upvote count: 4
has answer: http://stackoverflow.com/a/26163037
tagged with: node.js
type: AnsweredQuestion
downvote count: 0
type: Question
has title: Execution order of callbacks in Express Post function
has body: I am having trouble with [express's route handing methods], specifically a Post function. (http://expressjs.com/api.html#app.VERB) I am trying to parse through a piece of code from this passport example app.post('/login', passport.authenticate('local', { failureRedirect: '/login', failureFlash: true }), function(req, res) { res.redirect('/'); }); The express documentation says multiple callbacks are given, all are treated equally and behave just like middleware. My questions is, is the following statement accurate: middleware is like a bunch of tubes linked together. The middleware that comes first is the middleware that is listed first. If data is water, it will flow through the pipe that is listed first. The same is true for the callbacks in route handing methods: the callbacks are pipes linked together, and if you pour data through these 'pipes', you are pouring it through the first callback listed and then the second callback in sequence. Is that true? As a followup question, what are these callbacks supposed to return? Is the first callback returning a response, which the second callback recieves and treats as a request? what is supposed to come out of the pipe, and can I stick it into the second pipe?
tagged with: javascript

http://stackoverflow.com/q/26072849
downvote count: 0
tagged with: objective-c
tagged with: macos
favorite count: 0
has title: Calling Objective-C function from Javascript & Anonymous functions
type: UnansweredQuestion
tagged with: cocoa
answer count: 0
score: 1
tagged with: webview
upvote count: 1
has body: I've set up the bridge between Objective-C and JavaScript numerous times. So, anything like this works fine: objc.callSomeFunc(); objc.callAnotherOne_("param"); Now, what I'm trying to do is : Call an Objective-C function, passing an anonymous function as a parameter. In a few words, call an Objective-C function and WHEN it's over call back a custom, user-defined Javascript function. Like this: objc.callSomeFunc_WithCallback_("param", function() { echo "I got called back" }); An "easy" way would be to pass the "callback" call as pure js (perhaps a string format), which Objective-C would simply have to execute, like: objc.callSomeFunc_WithCallback_("param", "myfunc('%@');"); myfunc(param) { } And from my Objective-C code doing something like: - (void)callSomeFunc:(NSString*)param WithCallback:(NSString*)callback { // Do stuff NSString* callbackCommand = [NSString stringWithFormat:callback,@"myparam"]; [webView stringByEvaluatingJavaScriptFromString:callbackCommand]; } So far so good. But is it the correct approach? How would you do it?
type: Question
tagged with: javascript

http://stackoverflow.com/comment/40900407
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26099683
has text: @Brewal : I am trying to create a demo

http://stackoverflow.com/q/26097231
type: Question
has comment: http://stackoverflow.com/comment/40895957
has comment: http://stackoverflow.com/comment/40896857
tagged with: javascript
has title: How to convert jquery.on('mouseenter') to native javascript?
linked to: http://stackoverflow.com/q/23508221
answer count: 1
has comment: http://stackoverflow.com/comment/40909196
tagged with: jquery
has comment: http://stackoverflow.com/comment/40895751
has comment: http://stackoverflow.com/comment/40895712
has answer: http://stackoverflow.com/a/26098398
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/40896842
accepted answer: http://stackoverflow.com/a/26098398
has comment: http://stackoverflow.com/comment/40927398
has body: I have following code: $('body').on('mouseenter', 'label', function(){ if(this.offsetWidth &lt; this.scrollWidth){ if(!this.getAttribute('title')) { this.setAttribute('title', this.innerHTML); } } else{ this.removeAttribute('title'); } }); But in my project we need to have less dependencies with jquery. So i need to rewrite on('mouseenter') method. I tried something like this: var matches; (function (doc) { matches = doc.matchesSelector || doc.webkitMatchesSelector || doc.mozMatchesSelector || doc.oMatchesSelector || doc.msMatchesSelector; })(document.documentElement); document.addEventListener('mouseenter', function (e) { if (matches.call(e.target, 'label')) { if (this.offsetWidth &lt; this.scrollWidth) { if (!this.getAttribute('title')) { this.setAttribute('title', this.innerHTML); } } else { this.removeAttribute('title'); } } }, false); But it doesn't work, cause it firing only once ( on mouseenter on document ). I can't get all elements with tag label and add event listener to them, cause i have many labels in different parts of my application. Is this possible to get full equivalent of jquery function?

http://stackoverflow.com/comment/40793216
type: QuestionComment
comment on: http://stackoverflow.com/q/26041227
score: 0
has text: Do you expect it to do any caching?
type: Comment

http://stackoverflow.com/q/26153140
possible better answer: http://stackoverflow.com/a/26153196
score: 1
type: Question
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/26153189
tagged with: javascript
tagged with: jquery
has title: How to temporarily modify the CSS of an element
favorite count: 0
accepted answer: http://stackoverflow.com/a/26153189
has body: I am adding a CSS rule to an element with jQuery. E.g. $('#any-el').css('outline', '1px solid red'). I later remove the style with $('#any-el').css('outline', ''). I don't want to disturb any other styles this element may have, and I've found that this method works well for CSS added with external or inline stylesheets, but it will (obviously) modify and then remove any 'outline' given added via JavaScript at any previous point. What is the best way to ensure that the value of the 'outline' style attribute is restored to the way it was before I modified it? Here is the whole relevant part of the code: var last_el = null $('#mask').mousemove(function(e) { var mask = $(this).detach() var el = window.document.elementFromPoint(e.clientX, e.clientY) if (el != last_el) { if (last_el) { $(last_el).css('outline', '') } if (el) { $(el).css('outline', '1px solid red') } last_el = el } $('body').append(mask) }) (Basically the #mask overlays the whole page and I outline the element which the mouse is hovering over, underneath the mask.)
has answer: http://stackoverflow.com/a/26153196
upvote count: 1
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/q/26156777
tagged with: javascript
tagged with: jquery
has body: Ok, here's my problem. I have a select dropdown with different values. If i select one of them, a template is cloned into an unordered list. The thing is, i want to make sure that you cant clone the same element twice. In the cloned list-elements there is a which has an inner-text that is the same as the corresponding label of the option in the select dropdown. Alas i try to find a label in the unordered-list with the same text as the currently selected option in the dropdown. If there is such a label, it should not proceed with the cloning. Here's my code: $ -&gt; $('#add_feature').change -&gt; //#add_feature is the id of my select option dropdown features = $('ul#features') //features is the unordered list, where i append my //cloned list elements ... selected = $(this).find('option:selected') //here i find the currently selected //option //this is where i want to have an if clause or something that compares the //inner text of all the labels in the UL to the text of the currently //selected option //this is the cloning procedure which should only be called if there is //no label found above feature = $('#template_feature li').clone() features.append(feature) $(feature).find('#home_features_attributes_new_type').val(selected.data('type')) $(feature).find('#home_features_attributes_new_name').val($(this).val()) $(feature).find('label[for="home_features_attributes"]').prepend(selected.text())
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26156874
type: UnansweredQuestion
has title: How to find a label by it's innertext in an unordered list with jquery
tagged with: coffeescript
type: Question
answer count: 1

http://stackoverflow.com/comment/41097303
type: Comment
comment on: http://stackoverflow.com/a/26172568
score: 0
type: AnswerComment
has text: That's right, using the dom object you can't access the fallbacks, you can only get the HTML5 genuine properties / methods

http://stackoverflow.com/a/26050144
has comment: http://stackoverflow.com/comment/40817510
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26050082
has body: The reason myText2 produces a different result is because the backslash in string literals is an escape character. to escape a backslash, simply use it twice: myText2 = "\\u00257b"; Here is a some further information about escape characters in JavaScript EDIT There's probably a better way, but this will work: (eval is generally frowned upon and has security implications if the value from your text is uncontrolled input) myText = eval("\"" + decodedText + "\"")
answers question: http://stackoverflow.com/q/26050082
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40834017
score: 1

http://stackoverflow.com/q/26179428
answer count: 0
downvote count: 0
type: UnansweredQuestion
score: 1
type: Question
tagged with: javascript
has body: I'm in a bit of a pickle. I'm new to the project I'm working on and have been tasked to debug an error that's been put aside for so long no one remembers when it came up. I don't even know how or where to begin debugging this. The issue is as such: We have multiple states in our project using ui-router. The first time I open a state called insight everything works fine. When I transition to another state called live everything works fine. However when I now transition back to insight I get an error: Error: [$compile:multidir] Multiple directives [, select] asking for 'select' controller on: and if I go back to live I get the error: Multiple directives [, select] asking for 'select' controller on: As I said before both views work fine on the first load. The code for the selects is as follows: Live: Event Category Event types Involved entities Sent from origin Live analytics Observations Insight: Filter by entity type ... This issue was also present while using ngRoute. Does anyone have any ideas what may be causing this?
has title: Strange Angular issue concerning multiple directives
upvote count: 1
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/a/26078655
answers question: http://stackoverflow.com/q/26078623
upvote count: 2
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/40862082
has comment: http://stackoverflow.com/comment/40862025
has body: You're not converting the function to an expression. You're evaluating the function (with the trailing ()), and its result can be used in an expression. If you wanted to have something "if-like" inline in your code, use the ternary operator: var a = b + (x &gt; y ? c : d); This is equivalent to the pseudocode you seem interested in: // Of course the below isn't actually legal... var a = b + if (x &gt; y) { c; } else { d; }
type: Answer
has comment: http://stackoverflow.com/comment/40861951
score: 1
accepted answer of: http://stackoverflow.com/q/26078623
has comment: http://stackoverflow.com/comment/40862547

http://stackoverflow.com/a/26192616
answers question: http://stackoverflow.com/q/26191310
has body: jQM doesn't offer an out-of-the-box solution for this, therefore, you have to do it through JS. The column toggle popup inherits table's id followed by -popup. You need to target it when tablecreate event fires to change checkbox(es) property. Note that only thead elements with data-priority will be added to column toggle popup. Moreover, you will need to target checkbox(es) by their index using .eq() method or :eq() selector. $(document).on("pagebeforecreate", "#pageID", function () { $("#tableID").on("tablecreate", function () { $("#tableID-popup [type=checkbox]:eq(1)") /* second checkbox */ .prop("checked", false) /* uncheck it */ .checkboxradio("refresh") /* refresh UI */ .trigger("change"); /* trigger change to update table */ }); }); Demo
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26191310
has comment: http://stackoverflow.com/comment/41577518

http://stackoverflow.com/comment/40892643
has text: Thank you. I am going to try it out soon.
type: Comment
comment on: http://stackoverflow.com/a/26090611
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41028777
comment on: http://stackoverflow.com/q/26168946
has text: [Getting Contents of Iframe with Pure JavaScript](http://stackoverflow.com/questions/16755347/getting-contents-of-iframe-with-pure-javascript)
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26035022
has answer: http://stackoverflow.com/a/26036568
tagged with: twitter-bootstrap
type: UnansweredQuestion
has body: I'm working on an editable table with HTML5 attribute called contenteditable. Everything works well until I have another idea of telling user which cell is just updated. By highlight it with a class from bootstrap called alert-danger. After a cell is successfully sent. A data is sent back to a parent page telling the result div what the status is. It only shows the status on top of the table but I'd like to add another class in the cell. So I added $("td[id="+cols3_key+"").addClass('alert-danger'); when a data calls back. Expecting the latest cell is apply with alert-danger class. But it doesn't work. Here's my script. javascript var message_status = $("#status"); $("td[contenteditable=true]").blur(function(){ var cols3_key = $(this).attr("id") ; var value = $(this).text() ; $.post('inc/ajax.php' , cols3_key + "=" + value, function(data){ if(data != ''){ $("td[id="+cols3_key+"]").addClass('alert-danger'); message_status.slideDown(); message_status.text(data); //hide the message setTimeout(function(){message_status.slideUp()},3000); } }); }); The question is : How can I change this line to refer to a cell that has been just processed? $("td[id="+cols3_key+"").addClass('alert-danger'); Regards,
has answer: http://stackoverflow.com/a/26035178
tagged with: css
answer count: 4
has comment: http://stackoverflow.com/comment/40782287
has comment: http://stackoverflow.com/comment/40781574
has title: How to apply a CSS class to an ID that just succeed
type: Question
has answer: http://stackoverflow.com/a/26035099
has comment: http://stackoverflow.com/comment/40782314
tagged with: javascript
has answer: http://stackoverflow.com/a/26035134
has comment: http://stackoverflow.com/comment/40781625
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26126008
answers question: http://stackoverflow.com/q/26125831
upvote count: 1
downvote count: 1
score: 0
has comment: http://stackoverflow.com/comment/40952600
has comment: http://stackoverflow.com/comment/40954491
type: Answer
has body: You need to have a new XMLHttpRequest for each file. Replace your last loop with: var xmlhttp; for (var i=0, length = urlArray.length; i&lt;length; i++) { xmlhttp = new XMLHttpRequest(); // xmlhttp.onreadystatechange = function() { //parse json file if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) { var myArr = JSON.parse(xmlhttp.responseText); console.log(myArr); } } console.log(urlArray[i]);// check that loop is working xmlhttp.open("GET", urlArray[i], true); xmlhttp.send(); }}

http://stackoverflow.com/q/26183642
tagged with: javascript
has title: How to use AngularJS in ASP.NET MVC ajax-loaded popup
tagged with: asp.net
type: AnsweredQuestion
has body: I am just starting with AngularJS, and I want to integrate it into existing ASP.NET MVC application. I created simple angular HelloWorld app, that I return in a simple view rendered by a controller action: Hello {{1+1}} you This worked great - I could see angular expression evaluated properly. However in our app, the data is often shown in ajax-loaded popups. So bascially the JavaScript makes request to MVC controller, the view gets renderred and is sent back. Then JavaScript stuffs it into a prepared div and shows that div as a popup. In that case, the angular expression is not processed and {{1 + 1}} is rendered verbatim to the screen. The main page that hosts the popup is standard ASP.NET page - it does not use angular at all, it does however import angular scripts. From what I understand I should use angular $compile service to let angular know about it - however I am not sure how to set the $scope variable. Could anybody point me in the right direction? In most of the samples I could see $compile service being used within angular controller or directive, but in my case I am trying to do it from outside of the angular world. The main page is massive, and I do not want to convert it to angular at this point - so having the popup use angular only would work great for me.
linked to: http://stackoverflow.com/q/20383294
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/26188246
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26188246
tagged with: asp.net-mvc

http://stackoverflow.com/comment/40950902
has text: The `It's not really that hard` comment is rude and unnecessary. Nice solution, by the way, but won't get my upvote. Also, reversing a string by creating an array is slow http://jsperf.com/reverse-words-in-string
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26127460

http://stackoverflow.com/q/26049916
downvote count: 0
score: 1
has body: I have this code where the developer is trying to test the value: expect(browser.executeScript('return !!obj.isCustomer();')).toBe(myCurrentVal); I am trying to find out what !! means in !!obj.isCustomer() and also how can I get it's value? Can I add console.log somewhere in browser.executeScript without just getting some nonsense logs?
type: Question
has answer: http://stackoverflow.com/a/26049956
accepted answer: http://stackoverflow.com/a/26049956
tagged with: protractor
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
tagged with: angularjs
has title: bowser.execute logging and finding about?
type: AnsweredQuestion

http://stackoverflow.com/comment/40963158
has text: nopt a duplicate since I refer to an element WITHOUT ID.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26134327

http://stackoverflow.com/q/26193394
has comment: http://stackoverflow.com/comment/41072436
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26193413
has title: How to show result data in id follow value in input type text?
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26193485
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has body: i want to show result data in id myplace follow value in id="number" if &lt;input type="text" id="number" name="number" value="5"&gt; i want to show result in id="myplace5" if &lt;input type="text" id="number" name="number" value="7"&gt; i want to show result in id="myplace7" How can i do that ? &lt;script&gt; function Check_register() { setTimeout(function(){ $.ajax ( { url: 'test.php', type: 'POST', data: $('#form_setup').serialize(), cache: false, success: function (data) { $('input').prop('readonly', false); // this line will enable all input after success // $('#myplace').show(); $('#myplace').html(data); } } ) }, 2000); } &lt;/script&gt;

http://stackoverflow.com/comment/40933825
score: 0
has text: The DOM of what? A page inside `<webview>` tag?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26118171

http://stackoverflow.com/a/26041044
has comment: http://stackoverflow.com/comment/40833613
has comment: http://stackoverflow.com/comment/40793187
type: Answer
has comment: http://stackoverflow.com/comment/40814163
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40850863
has body: I ported the Bootstrap (2.3.2) components to PrototypeJS/Script.aculo.us, which does a very nice carousel repo https://github.com/jwestbrook/bootstrap-prototype examples http://cwaadmin.com/bootstrap/
has comment: http://stackoverflow.com/comment/40795731
accepted answer of: http://stackoverflow.com/q/26034567
answers question: http://stackoverflow.com/q/26034567
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41169465
comment on: http://stackoverflow.com/q/26145428
score: 0
type: Comment
type: QuestionComment
has text: I'll take a note about the wrapSelection poor docs - It's basically a wrapper for `execCommand` but we fix some of the inconsistent calls.

http://stackoverflow.com/comment/41027585
type: Comment
comment on: http://stackoverflow.com/q/26168031
type: QuestionComment
has text: Good idea. I gave that a try, and it does the job! Only thing is now I have an additional 45px high white space above each section. Because my site is basic, I can color them the same as the background, but then I would have to go into each section and make them each 45px shorter. Before I go ahead and do that work, are there any other suggestions? -I tried using display: none; but then the id cannot be linked on the page. -also tried visibility: hidden; does nothing.
score: 0

http://stackoverflow.com/comment/40824308
comment on: http://stackoverflow.com/a/26050298
type: Comment
has text: Why? Could you give more details?
score: 0
type: AnswerComment

http://stackoverflow.com/a/26121171
has comment: http://stackoverflow.com/comment/40940982
has body: You can do like this: http://fiddle.jshell.net/oqzekcv8/5/ The script will use javascript (and jquery) to show and hide the images, one thing worth noting is that the script will behave badly if the coordinates for the image you are showing are the same as your cursors, so i have offset them with 5 pixels down and to the left. If for some reason fiddle is down here is the script itself: $(document).ready(function() { $('.Enlarge').mouseenter(function(){ $(this).find('.expandedImage').show(); var container = $(this); var containerOffset = container.offset(); var largeImage = container.find('.expandedImage'); $(container).on('mousemove.imageFollow', function(event){ var left = event.pageX - containerOffset.left + 5; var top = event.pageY - containerOffset.top + 5; if(event.clientX + largeImage.width() + 5 >= $(window).width()) left = $(window).width() - largeImage.width() - containerOffset.left -2; if(event.clientY + largeImage.height() + 5 >= $(window).height()) top = $(window).height() - largeImage.height() - containerOffset.top -2; largeImage.css('left', left).css('top', top); }); }).mouseleave(function(){ $(this).off('mousemove.imageFollow'); $(this).closest('.Enlarge').find('.expandedImage').hide(); }); }); and it will work on a structure like this: small image 1 large image 1 the css for this is: .Enlarge { position:relative; height:150px; width:250px; border:1px solid black; overflow:visible; } .Enlarge .expandedImage { position:absolute; display:none; white-space:nowrap; background-color:blue; width:600px; height:300px; z-index:10000; pointer-events:none; } the white-space:nowrap is to prevent the browser from cutting your demo text into smaller pieces, it will work without that if you only display an image instead of text Also note that it binds the mousemove event on mouseenter and unbinds it on mouseleave, i can't motivate that, i just happend to do that out of old habit, but now you know how to do that as well :) Also note: pointer-events:none; does not wo…
type: Answer
has comment: http://stackoverflow.com/comment/40939263
has comment: http://stackoverflow.com/comment/40940223
has comment: http://stackoverflow.com/comment/40939083
score: 0
accepted answer of: http://stackoverflow.com/q/26120391
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26120391

http://stackoverflow.com/comment/40950845
has text: Thank you very much for the example! I appreciate it very much. Question? If I made the `handle` function a subset of `namespace`, would addEventListener fire only once? I want to keep function declarations inside `namespace`, if at all possible. Thanks again.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26127535
type: Comment

http://stackoverflow.com/comment/40825864
has text: @GeraldSchneider Yes, indeed, but they're not present in `morseCode`. I suppose they are all letters.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26059284
type: Comment

http://stackoverflow.com/a/26066586
has body: I think your method of checkDonation is a good approach, you could call it after removing the element. However, you'd need to check all inputs in order to see if there's a donation or not. I've tinkered a bit the method: function checkDonation() { $('.continue').prop('disabled', true); $("input").each(function () { if ($(this).val().length !== 0) { console.log("One is not empty, reactivating."); $('.continue').prop('disabled', false); return false; } }); } Calling this method would imply checking all inputs (maybe you could use a class instead of input to restrict the search and not include other inputs that the page could have). First, we disable the continue button. If any input contains value, we re-enable it and immediately return (we don't need to keep searching, one is condition enough). Hope it helps.
type: Answer
answers question: http://stackoverflow.com/q/26065572
score: 0

http://stackoverflow.com/q/26162918
answer count: 2
upvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41016005
type: UnansweredQuestion
tagged with: php
has body: Would it be possible to add an external .js file to put in this current image position that I have set up right now? I'm fairly new to javascript and php so any help would be greatly appreciated. echo "&lt;div style=\"margin-bottom:50px;clear:both\"&gt;"; if ($result == 8) {echo "&lt;div style=\"width:300px;height:250px;background-color:#f6f6dd;margin-left:10px;margin-bottom:20px;\"&gt;"; **echo "&lt;!-- No script tag --&gt; &lt;a href=\"http://" target=\"_blank\"&gt;&lt;img border=\"0\" width=\"100%\" height=\"auto\" src=\"myadspt.png\" alt=\"Ad spot text goes here\"&gt;&lt;/a&gt;";** echo "&lt;/div&gt;";} Sorry I should have mentioned this part before as well. This .php code is for a newsletter with ad positions inside of it. The .js file that needs to be placed in this .php code is an .swf ad uploaded onto an external news site (I'll call it "SITE A") In "SITE A", the ad has it's own .js script that goes with it. When this ad is uploaded onto "SITE A", I want it to automatically place into the newsletter, that way it's less hassle for me, and also on "SITE A" it will count the amount of clicks the ad gets each time the newsletter is sent out. This is the .js script below. Hopefully this helps clarify on what I am wanting to do. &lt;!-- Global Ad Manager javascript file --&gt; &lt;script type="text/javascript" src="http://www.mysite.js"&gt;&lt;/script&gt; &lt;!-- Ad Manager call to display ads for position testa--&gt; &lt;script type="text/javascript"&gt; TNCMS.AdManager.render ({ domain: 'www.mysite.com', secureDomain: 'mysite-dot-com.', section: testa', region: 'test', slot: '1' }); &lt;/script&gt;
has title: Is there a way to include an external .js file in this php code?
has comment: http://stackoverflow.com/comment/41015936
has answer: http://stackoverflow.com/a/26163027
has comment: http://stackoverflow.com/comment/41016000
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26163174
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41016244

extjs-grid
tags question: http://stackoverflow.com/q/26078294
type: Tag
tag name: extjs-grid

http://stackoverflow.com/comment/40974396
type: Comment
score: 2
has text: The question can be resolved with a few words in a comment, it has no value in the future for anyone else. (http://meta.stackoverflow.com/questions/260104/dissuade-answers-to-simple-typos)
comment on: http://stackoverflow.com/a/26140645
type: AnswerComment

http://stackoverflow.com/comment/40922114
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26111788
has text: you would have to check the $scope for that function rather than just the function I think.

http://stackoverflow.com/a/26118806
has body: use : $xml=simplexml_load_file("http://meteo.arso.gov.si/uploads/probase/www/plus/timeline/timeline_radar_si_short.xml"); do not use json_decode.
has comment: http://stackoverflow.com/comment/40934105
type: Answer
answers question: http://stackoverflow.com/q/26118697
score: 0

http://stackoverflow.com/comment/41033159
type: Comment
has text: When the user clicks on the button, the onClick event can handle/call both his methods
type: AnswerComment
comment on: http://stackoverflow.com/a/26171012
score: 0

search-engine
type: Tag
tag name: search-engine
tags question: http://stackoverflow.com/q/26131634

http://stackoverflow.com/q/26059922
has comment: http://stackoverflow.com/comment/40827342
has body: I have created a simple Javascript Validation script: var el = document.getElementById("username"); var el_pwd = document.getElementById("password"); var el2 = document.getElementById("feedback"); var el3 = document.getElementById("ok"); var el4 = document.getElementById("ok2"); function checkUsername() { var username = el.value; var password = el_pwd.value; if((username.length &lt; 5) &amp; (password.length &lt;= 0)) { el2.className = 'warning'; el2.textContent = "Username Not long enough yet.."; el2.style.color = "red"; } else { el2.textContent = " "; } } function checkPassword() { var username = el.value; var password = el_pwd.value; if((username.length &gt;= 5) &amp; (password &lt; 7) ) { el2.textContent = "Password MUST be 7 or more characters"; el2.style.color = "red"; } else if ((username.length &lt;= 4) &amp; (password.length &lt;= 0)) { el2.className = 'warning'; el2.textContent = "Username Not long enough yet.."; el2.style.color = "red"; } else { el2.textContent = " "; } } function usernameOK() { var username = el.value; if(username.length &gt;= 5) { el3.style.display="block"; } else { el3.style.display = "none"; } } function passwordOK() { var password = el_pwd.value; if(password.length &gt;= 7) { el4.style.display="block"; } else { el4.style.display = "none"; } } function feedBack() { el2.className = 'tip'; el2.textContent = "The username MUST be at least 5 characters"; el2.style.color = "blue"; } el.addEventListener("focus", feedBack, false); el.addEventListener("blur", checkUsername, false); el.addEventListener("blur", usernameOK, false); el_pwd.addEventListener("focus", checkPassword, false); el_pwd.addEventListener("blur", passwordOK, false); What I want do be able to do is make a green tick appear next to the password input when a user finishes typing in the required amount of characters. I have it working so that the green tick appears on "blur", but I'm not sure how to go about the way I would like. I'm guessing it has something to either do with …
type: Question
tagged with: validation
tagged with: javascript
has answer: http://stackoverflow.com/a/26060145
score: 0
has title: How can I make an element appear (for instance a tick) when a certain amount of characters have been typed into an input field?
answer count: 1
has comment: http://stackoverflow.com/comment/40827143
has comment: http://stackoverflow.com/comment/40827096
accepted answer: http://stackoverflow.com/a/26060145
type: AnsweredQuestion

http://stackoverflow.com/q/26164702
possible better answer: http://stackoverflow.com/a/26165726
downvote count: 1
has answer: http://stackoverflow.com/a/26165726
type: Question
accepted answer: http://stackoverflow.com/a/26164918
upvote count: 0
tagged with: javascript
tagged with: encapsulation
has comment: http://stackoverflow.com/comment/41025912
has body: I'm trying to fully grasp JavaScript inheritance and encapsulation. Take the following example (and here is a fiddle of it): myPage = { someObj: function() { var x = 0; //PRIVATE: increment by 10 var inc10 = function() { x = x+10; }; //PUBLIC: increment this.inc = function() { x = x+1; }; //PUBLIC: decrement this.dec = function() { x = x-1; }; //PUBLIC: output the current value of x this.getValue = function() { return x; } inc10(); //as soon as obj1 is created lets add 10 this.inc(); //as soon as obj1 is created lets add 1 more } }; obj1 = new myPage.someObj(); //x starts out at 11 // obj1.inc10(); won't work because it's private, excellent obj1.dec(); obj1.inc(); alert(obj1.getValue()); My question is about the inc() method. I need it to be callable from inside and outside of the object. Is this the proper way to do that?
answer count: 2
has comment: http://stackoverflow.com/comment/41051190
score: -1
favorite count: 0
has comment: http://stackoverflow.com/comment/41024478
has answer: http://stackoverflow.com/a/26164918
has title: How to define a javascript internal method that needs to be accessible from inside obj and out
type: AnsweredQuestion

http://stackoverflow.com/comment/40911561
score: 0
type: AnswerComment
has text: This is pretty neat and exactly what I needed. Thanks.
type: Comment
comment on: http://stackoverflow.com/a/26105768

http://stackoverflow.com/comment/41036240
score: 0
comment on: http://stackoverflow.com/a/26171435
type: AnswerComment
type: Comment
has text: I already read through the overview. Just looking for a working extension I can use as a starting point, to capture keystrokes.

http://stackoverflow.com/comment/40806559
comment on: http://stackoverflow.com/a/26048447
score: 0
type: AnswerComment
type: Comment
has text: Thanks a lot, it was the window.onload function that I was missing.

http://stackoverflow.com/q/26053931
downvote count: 0
tagged with: vba
score: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26054526
upvote count: 1
tagged with: excel
has body: I want to read an excel file using JavaScript. As we all know, IE supports following logic to read. var excel = new ActiveXObject("Excel.Application"); var excel_file = excel.Workbooks.Open("attachData.xlsx"); var excel_sheet = excel.Worksheets("Sheet1"); repCount = excel_sheet.Cells(cell,row).Value; document.getElementById('div1').innerText = repCount; But I want to make it cross-browser.Since the above lines of code does not work in other browsers, I was thinking to use Ajax request. I tried with the following piece of code: var xhr = new XMLHttpRequest(); xhr.open('POST','../attachData.xlsx',true); xhr.send(); xhr.onreadystatechange= readystatechange; function readystatechange(){ if(xhr.readyState === 4){ console.log(xhr.response); } } Here, the response comes unreadable format ( like encoded).Is there any other way to achieve this. My biggest concern is that can we read excel by ajax or not?
has title: Can excel sheet be read by Ajax request
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 1

http://stackoverflow.com/comment/41131554
has text: Just add if it was not clear: The "mimetype.js" is a simple lookup table. It works based on the extension of the file and search within a catalog the type corresponding.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26222177
type: Comment

http://stackoverflow.com/q/26040162
has comment: http://stackoverflow.com/comment/40791019
type: Question
tagged with: javascript
duplicate of: http://stackoverflow.com/q/23667086
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40798240
linked to: http://stackoverflow.com/q/23667086
has comment: http://stackoverflow.com/comment/40791062
tagged with: node.js
has title: Push an array into another array inside underscore's forEach in js/node
answer count: 0
tagged with: underscore.js
score: 1
upvote count: 1
has body: I have this function to get some data from the internet: function GetData(callback) { var data = [ ["username", "password", "email"]//Header values ]; doc.getInfo(function (err, sheet_info) { //the doc is an google spreadsheet object sheet_info.worksheets[0].getRows(function(err, rows) { _.forEach(rows, function(row) { data.push([row.name, row.password, row.email]); } ); }); }); callback(data); } But when i try to use this function: GetData(function (data) { console.log(data) //Has only first initial values ["username", "password", "email"] }); Any idea what might be the problem ?

http://stackoverflow.com/comment/41067484
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26186571
type: AnswerComment
has text: Well you have changed the classes that you were assigning the filter to work with. Check the updated answer :) And you can accept the answer :)

http://stackoverflow.com/q/26145226
answer count: 1
has comment: http://stackoverflow.com/comment/40983589
has comment: http://stackoverflow.com/comment/40987155
has comment: http://stackoverflow.com/comment/40983648
has comment: http://stackoverflow.com/comment/40984131
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/40987735
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40983691
has title: ASP.NET MVC Script Bundle Takes Too Long To Load
has comment: http://stackoverflow.com/comment/40983784
has comment: http://stackoverflow.com/comment/40985124
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40983680
has comment: http://stackoverflow.com/comment/40983170
has comment: http://stackoverflow.com/comment/40985510
has comment: http://stackoverflow.com/comment/40985322
type: Question
has comment: http://stackoverflow.com/comment/40992314
has answer: http://stackoverflow.com/a/26146355
has comment: http://stackoverflow.com/comment/40983965
has body: I am out of ideas on this one. An MVC site we developed takes too long to load. The Network tool shows it takes over seconds to load the JavaScript! It is in a bundle and being minimized. I can't figure out why this bundle could take so long. Any ideas? bundles.Add(new ScriptBundle("~/scripts/site").Include( "~/Scripts/lib/jquery-1.10.2.js" , "~/Scripts/lib/jquery-migrate-{version}.js" , "~/Scripts/lib/json2.js" , "~/Scripts/lib/knockout-{version}.js" , "~/Scripts/lib/jquery.unobtrusive*" , "~/Scripts/lib/jquery.validate*" , "~/Scripts/lib/jquery-ui*" , "~/Scripts/lib/jquery.lockSubmit*" , "~/images/jquery.js" , "~/images/script.js" )); Here is the Network Tab of the Dev Tools:
has comment: http://stackoverflow.com/comment/40984795
has comment: http://stackoverflow.com/comment/40983635
upvote count: 1
has comment: http://stackoverflow.com/comment/40983737

jsp
tags question: http://stackoverflow.com/q/26116627
tags question: http://stackoverflow.com/q/26136158
tags question: http://stackoverflow.com/q/26094094
tags question: http://stackoverflow.com/q/26051702
tags question: http://stackoverflow.com/q/26082721
tags question: http://stackoverflow.com/q/26119474
tags question: http://stackoverflow.com/q/26174503
tags question: http://stackoverflow.com/q/26046641
tags question: http://stackoverflow.com/q/26081457
tags question: http://stackoverflow.com/q/26104873
tags question: http://stackoverflow.com/q/26099675
tags question: http://stackoverflow.com/q/26042496
tags question: http://stackoverflow.com/q/26134846
tags question: http://stackoverflow.com/q/26113673
type: Tag
tags question: http://stackoverflow.com/q/26069211
tags question: http://stackoverflow.com/q/26168633
tags question: http://stackoverflow.com/q/26096080
tags question: http://stackoverflow.com/q/26095068
tag name: jsp
tags question: http://stackoverflow.com/q/26156336
tags question: http://stackoverflow.com/q/26114388
tags question: http://stackoverflow.com/q/26128303
tags question: http://stackoverflow.com/q/26060261
tags question: http://stackoverflow.com/q/26072990
tags question: http://stackoverflow.com/q/26122780
tags question: http://stackoverflow.com/q/26189650
tags question: http://stackoverflow.com/q/26161404
tags question: http://stackoverflow.com/q/26036876
tags question: http://stackoverflow.com/q/26108857
tags question: http://stackoverflow.com/q/26059711
tags question: http://stackoverflow.com/q/26117912
tags question: http://stackoverflow.com/q/26108614
tags question: http://stackoverflow.com/q/26119656
tags question: http://stackoverflow.com/q/26182150
tags question: http://stackoverflow.com/q/26097953

http://stackoverflow.com/comment/40970355
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26135345
type: AnswerComment
has text: I think 'on' function is from SVG. I actually went through the D3 sources and tried it. You can try finding for 'defaultDrawNodes' in D3 sources, and see how node are being drawn. For edges you might have to try overriding 'drawEdgePaths', I my self didn't try it, but it should work. Try finding 'defaultDrawEdgePaths' in D3 sources, to see how edges are being drawn.

http://stackoverflow.com/comment/40816771
type: Comment
type: QuestionComment
has text: think of the ':' values as a bit like fields in a Java class.
score: 1
comment on: http://stackoverflow.com/q/26054097

http://stackoverflow.com/comment/41049484
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26170631
has text: Just don't include the columns with no data in your columnDefs. Or be more specific on what your issue is.
score: 0

http://stackoverflow.com/comment/40916186
score: 1
has text: If I'm understanding correctly, if the element is reloaded you'll need to rebind the click event to it. Alternatively to the way you are doing it you could bind to the window/body and just specify the `id` as the selector like `$('body').on('click', '#emailLink', function () {});`.
comment on: http://stackoverflow.com/q/26108331
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26165389
has body: You can add elements to you image and position them absolute like this: #eye { position: absolute; height: 10px; // size of area width: 10px; top: 20px; // position left: 20px; cursor: pointer; // make it "feel" clickable // maybe you want to make a circle instead of a rectangle, you can do this with // border-radius (thanks to J148) border-radius: 10px; } Now you can use JS to get the click and display anything you want, in JQuery e.g.: $('#eye').click(function(){ // this is an eye !!! }); Its maybe easier to use a data attribute to get the content easier. &lt;div class="area" data-content="This is an eye"&gt;&lt;/div&gt; In JQuery: $('.area').click(function(){ content = $(this).data("content"); // show content in any way });
type: Answer
has comment: http://stackoverflow.com/comment/41021079
score: 1
has comment: http://stackoverflow.com/comment/41020944
upvote count: 1
has comment: http://stackoverflow.com/comment/41020919
downvote count: 0
answers question: http://stackoverflow.com/q/26165211

http://stackoverflow.com/a/26186593
has body: I know that mongoose.js allows you to define a schema. For example: var mongoose = require('mongoose'); var Schema = mongoose.Schema; var blogSchema = new Schema({ title: String, author: String, body: String, comments: [{ body: String, date: Date }], date: { type: Date, default: Date.now }, hidden: Boolean, meta: { votes: Number, favs: Number } }); With that you can define the schema of your collection.
score: 1
accepted answer of: http://stackoverflow.com/q/26185991
answers question: http://stackoverflow.com/q/26185991
type: AcceptedAnswer
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/a/26187457
type: AcceptedAnswer
has body: var iframe = document.createElement("iframe"); iframe.src = "simpleinner.htm"; if (iframe.attachEvent){ iframe.attachEvent("onload", function(){ alert("Local iframe is now loaded."); }); } else { iframe.onload = function(){ alert("Local iframe is now loaded."); }; } http://www.nczonline.net/blog/2009/09/15/iframes-onload-and-documentdomain/
type: Answer
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26187252
answers question: http://stackoverflow.com/q/26187252
downvote count: 0
has comment: http://stackoverflow.com/comment/41062315

http://stackoverflow.com/a/26090000
answers question: http://stackoverflow.com/q/26089580
accepted answer of: http://stackoverflow.com/q/26089580
type: AcceptedAnswer
downvote count: 0
has body: d3js See elastic node demo here and here, collision demo here. This page contains tons of d3js demos For easing effects, you could look into d3 transition. Good luck!
type: Answer
score: 3
upvote count: 3

http://stackoverflow.com/q/26074600
type: Question
has body: I am using the chosen plugin to create dynamic selects and inputs. What I am trying to do is, based on the result from php, instead of the default placeholder, append text to the placeholder and disable the input. At the moment, the echo is displaying in the select and I can change that to reflect any code changes. I thought perhaps an if statement to check the val of 'data' and if it == 'No files in that box', but I am still learning so need some help. The input I need to disable is: #file_dstr. I have looked at various ways of possibly achieving this, but my jQuery skills are sadly lacking. I would appreciate it if someone could help me to achieve this. many thanks. Plugin: http://harvesthq.github.io/chosen/options.html html Select Your File(s) jquery submitHandler: function () { if ($("#USRfiledstr").valid() === true) { var data = $("#USRfiledstr").serialize(); $.ajax( { type: "POST", url: "fdstr.php", data: data, dataType: "json", success: function (data) { if (data.opp == 'error') { var messageOutput = ''; for (var i = 0; i < data.length; i++) { messageOutput += data[i].file + ' '; } notif({ msg: "There was an error destroying the following file: " + ' ' + '' + data.file + ' ' + ' Please correct this error and try again. If this error persists, please contact us quoting ref: ' + '' + '#FDSTR0001. ' + '' + ' ' + 'Thank you.', type: "frtvError", position: "center", width: 490, height: 75, multiline: true, timeout: 6000, opacity: 0.8, fade: 10, }); } else { var messageOutputs = ''; for (var i = 0; i < data.length; i++) { messageOutputs += data[i].file + ' '; } $("#USRfiledstr").get(0).reset(); $("#file_dstr").load("refreshFdstr.php"); //$(".chosen-select").val('').trigger("chosen:updated"); $("#fdstr_dept").trigger("chosen:updated"); $("#fdstr_address").trigger("chosen:updated"); notif({ msg: "You have successfully destroyed the following file(s)." + ' ' + '' + data.file + ' ' + ' This transaction was successfully entered into the database. Thank you.', type: "Fil…
has title: Disable input based on result from php
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26074790
type: UnansweredQuestion

http://stackoverflow.com/comment/40946380
comment on: http://stackoverflow.com/q/26124598
score: 0
type: QuestionComment
has text: this http://stackoverflow.com/questions/25760591/trying-to-get-a-load-more-button-working-on-an-instagram-instafeed-script-but-it
type: Comment

http://stackoverflow.com/comment/136053182
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26068642
type: AnswerComment
has text: I asked this question here, https://stackoverflow.com/questions/77175414/how-schedule-audiobuffer-when-dealing-with-10-second-chunks -- I seem to be doing it wrong

http://stackoverflow.com/q/26124931
has title: AngularJS : chaining promises over forEach loop
tagged with: angularjs
tagged with: angular-promise
has answer: http://stackoverflow.com/a/26125099
type: AnsweredQuestion
downvote count: 0
score: 7
type: Question
possible better answer: http://stackoverflow.com/a/26125099
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26125105
answer count: 2
upvote count: 7
linked to: http://stackoverflow.com/q/15504921
linked to: http://stackoverflow.com/q/20100245
has body: I'm having trouble wrapping my head around promises. I'm using the Google Earth API to do a 'tour' of addresses. A tour is just an animation that lasts about a minute, and when one completes, the next should start. Here's my function that does a tour: var tourAddress = function (address) { return tourService.getLatLong(address).then(function (coords) { return tourService.getKmlForCoords(coords).then(function (kml) { _ge.getTourPlayer().setTour(kml); _ge.getTourPlayer().play(); var counter = 0; var d = $q.defer(); var waitForTour = function () { if (counter &lt; _ge.getTourPlayer().getDuration()) { ++counter; setTimeout(waitForTour, 1000); } else { d.resolve(); } }; waitForTour(); return d.promise; }); }); } This seems to work pretty well. It starts the animation and returns a promise that resolves when the animation is complete. Now I have an array of addresses, and I want to do a tour foreach of them: $scope.addresses.forEach(function (item) { tourAddress(item.address).then(function(){ $log.log(item.address + " complete"); }); }); When i do this, they all execute at the same time (Google Earth does the animation for the last address) and they all complete at the same time. How do I chain these to fire after the previous one completes? UPDATE I used @phtrivier's great help to achieve it: $scope.addresses.reduce(function (curr,next) { return curr.then(function(){ return tourAddress(next.address) }); }, Promise.resolve()).then(function(){ $log.log('all complete'); });
has answer: http://stackoverflow.com/a/26125105
favorite count: 0
tagged with: promise

http://stackoverflow.com/q/26143592
has comment: http://stackoverflow.com/comment/40980251
has body: I am adding a piece of tracking code for adwords that is meant to track the amount of the sale. here is the code: &lt;script type="text/javascript"&gt; /* &lt;![CDATA[ */ var google_conversion_id = 1234; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; if (1.0) { var google_conversion_value = &lt;?php echo round($order_total['value'],2);?&gt;; } var google_conversion_label = "labelid"; var google_conversion_value = 0; var google_remarketing_only = false; /* ]]&gt; */ &lt;/script&gt; The part I don't understand is the if statement if (1.0) What is that checking for? why if 1.0? Is this a javascript thing?
has comment: http://stackoverflow.com/comment/40980299
has comment: http://stackoverflow.com/comment/40979984
has answer: http://stackoverflow.com/a/26143632
has comment: http://stackoverflow.com/comment/40980363
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40980090
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40980250
has comment: http://stackoverflow.com/comment/40980188
type: Question
has comment: http://stackoverflow.com/comment/40981324
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40980046
has comment: http://stackoverflow.com/comment/40979990
has title: What is "if (1.0)" checking for?
score: 0

http://stackoverflow.com/q/26191820
has comment: http://stackoverflow.com/comment/41069678
has body: somewhat new to Javascript and just needed some help on the following. Example from Eloquent Javascript. var journal = []; function addEntry(events, didITurnIntoASquirrel) { journal.push({ events: events, squirrel: didITurnIntoASquirrel }); } addEntry(['work', 'lunch', 'peanuts', 'exercise'], false); console.log(journal[0]); How do i get the console to list the journal array? Any help is much appreciated. Thanks
has answer: http://stackoverflow.com/a/26191861
type: AnsweredQuestion
downvote count: 3
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41069686
score: -2
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/41069646
has comment: http://stackoverflow.com/comment/41069692
accepted answer: http://stackoverflow.com/a/26191861
has comment: http://stackoverflow.com/comment/41069703
has comment: http://stackoverflow.com/comment/41070795
answer count: 1
has title: Accessing Object Arrays in Javascript
favorite count: 0

http://stackoverflow.com/q/26052170
possible better answer: http://stackoverflow.com/a/26053368
accepted answer: http://stackoverflow.com/a/26052235
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
tagged with: recursion
score: 1
has answer: http://stackoverflow.com/a/26053368
upvote count: 1
has body: I'm trying to keep track of the sum of a particular n property of a nested tree-like array, but I'm not getting very good results. Plunkr Here JavaScript var myApp = angular.module('myApp', []); myApp.directive('layout', function() { return { templateUrl: 'layout', controller: function($scope) { // Running total function $scope.count = function(n) { if (!$scope.total) $scope.total = 0; $scope.total += parseInt(n, 10); return $scope.total; } // Tree-like array $scope.data = { 'nodes': [{ 'name': 'layout', 'n': 1, 'nodes': [ {'name': 'box','n': 1}, {'name': 'box','n': 1}, {'name': 'box','n': 1}, {'name': 'box','n': 1} ] }, { 'name': 'layout', 'n': 1, 'nodes': [ {'name': 'box','n': 1}, {'name': 'box','n': 1}, {'name': 'box','n': 1}, {'name': 'box','n': 1} ] }] }; } } }); HTML Somehow, the count seems to start at 93. - I've been pointed out by @Josep that this is because $digest is making that function recurse. The order is wrong. Count isn't being reset at each new recursion level. Problem: Expected outcome: I've experimented with the following methods, with no luck: Counter as a service (Plunkr). At least the numbers went down No ng-repeat-start, ng-repeat-end (Plunkr). We miss the nested counts. And besides those things, I've been mostly tinkering to see if I get lucky. Honestly I don't really have a clue how this is supposed to work. Please, any help figuring this out?
has answer: http://stackoverflow.com/a/26052235
type: Question
has title: Keep count of same-level elements in recursive ng-repeat

http://stackoverflow.com/q/26055152
score: 9
answer count: 2
has answer: http://stackoverflow.com/a/26055216
downvote count: 0
has body: I'm using iframe to load faroo.com as default src in frame when i search and move to other webpage using faroo.But still in the iframe src its display faroo.com only i wanted to capture url of page that has loaded in iframe The o/p at console.log is always faroo.com not the current website that has loaded
tagged with: javascript
linked to: http://stackoverflow.com/q/938180
tagged with: jquery
duplicate of: http://stackoverflow.com/q/938180
tagged with: http://stackoverflow.com/tag/html
has title: How to get current page loaded url from iframe
possible better answer: http://stackoverflow.com/a/41982241
accepted answer: http://stackoverflow.com/a/26055216
favorite count: 0
has answer: http://stackoverflow.com/a/41982241
linked to: http://stackoverflow.com/q/3420004
has comment: http://stackoverflow.com/comment/68236435
type: AnsweredQuestion
upvote count: 9
type: Question

http://stackoverflow.com/comment/40964533
score: 0
has text: You have contents inside body tag? If not it will return zero.
comment on: http://stackoverflow.com/q/26135175
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26103523
score: 7
has comment: http://stackoverflow.com/comment/40908754
accepted answer of: http://stackoverflow.com/q/26103471
has comment: http://stackoverflow.com/comment/40909013
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26103471
has comment: http://stackoverflow.com/comment/40909522
has comment: http://stackoverflow.com/comment/40909355
type: Answer
upvote count: 7
has body: Assuming the relevant class is always the only class on those elements, you can do it with an "attribute starts with" selector combined with Array#map: var list = document.querySelectorAll("div[class^=userName_]"); var classArr = Array.prototype.map.call(list, function(div) { return div.className; }); Matt Burland points out that that will return an array with duplicate entries if there are multiple elements with the same class. Two ways to address that: Array#reduce, but this use of it isn't very efficient: var list = document.querySelectorAll("div[class^=userName_]"); var classArr = Array.prototype.reduce.call(list, function(array, div) { if (array.indexOf(div.className) === -1) { array.push(div.className); }; return array; }, []); ...or using a temporary map: var list = document.querySelectorAll("div[class^=userName_]"); var map = {}; Array.prototype.forEach.call(list, function(div) { map[div.className] = true; }); var classArr = Object.keys(map); Array#map, Array#reduce, Array#forEach, and Object.keys are all ES5 features, but if you need to support older engines, they can all be shimmed. querySelectorAll is available on all modern browsers, and IE8.
has comment: http://stackoverflow.com/comment/40907477
has comment: http://stackoverflow.com/comment/40907588

http://stackoverflow.com/q/26104635
type: Question
accepted answer: http://stackoverflow.com/a/26104783
tagged with: javascript
answer count: 1
downvote count: 0
score: 1
has title: I want to change the cursor to wait then back to default after the click event happens
favorite count: 0
has comment: http://stackoverflow.com/comment/40909257
has comment: http://stackoverflow.com/comment/40909122
linked to: http://stackoverflow.com/q/12337419
has answer: http://stackoverflow.com/a/26104783
has body: I have an anchor tag when click it activates a function to bring in some database. But while the database is loading I would like to show the wait cursor then back to default cursor when the database is loaded. I have this code: $(document).ready(function () { $('a').click(function() { $('*').css("cursor", "progress"); }); }); but what it does is replace the cursor all time when the "a" tag is lcicked
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40909131
upvote count: 1

http://stackoverflow.com/comment/40928351
has text: @KarlenKishmiryan: This can skip a generation. Should rather use `>` operators like dystroy, or XPath.
comment on: http://stackoverflow.com/q/26115412
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40822410
has text: @excluded_once I'm glad you did.
comment on: http://stackoverflow.com/a/26056483
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26139008
type: Question
accepted answer: http://stackoverflow.com/a/26139086
tagged with: javascript
score: 3
has title: jquery appended input not passing data to server
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: In my div with the class sets, I want to dynamically append to the last element another set of reps and kilos input fields so that the user can add as many as he needs. I have done that with my jQuery code below, but am running into a problem when I submit the the input data. Only the values form the original input fields are getting sent to the server. How could I write my jQuery code so that the input data from the new divs is also submitted? HTML form : Fill in your workout and then click Save Workout when you are done. To add an extra group for reps and kg's, click the sign on your screen. Exercise Muscle-Group Reps Kg's Save Workout The jQuery : $(document).ready(function() { console.log('Document ready'); // function to add sets to specific exercise $('#add-set').on('click', function() { console.log ('Button add-set clicked'); var htmlSets = ' ' + ' Reps ' + ' Kg\'s ' + ' '; $('div.sets:last').append(htmlSets); }); });
type: AnsweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/26139086

http://stackoverflow.com/comment/41141197
type: AnswerComment
score: 0
type: Comment
has text: You do not need to write it to disk, you can in memory cache it and let the controller return the image using a GUID as identfier. Use SignalR to publish that GUID
comment on: http://stackoverflow.com/a/26185492

http://stackoverflow.com/q/26045296
score: 0
tagged with: meteor
tagged with: text
type: AnsweredQuestion
tagged with: tags
has title: How to add text after # but not #?
has answer: http://stackoverflow.com/a/26045530
type: Question
accepted answer: http://stackoverflow.com/a/26045530
answer count: 1
tagged with: javascript
has body: This is the code that I am currently using to put tags in text into a array hashtags that is put into a mongodb collection. It currently puts every bit of text that starts with # into the array hashtags. Thanks to @saimeunt's help; but I need to not include the # in the hashtags array just the text after it. Thanks in advanced. Template.postSubmit.events({ 'submit form': function(e) { e.preventDefault(); var posttext=$(e.target).find('[name=posttext]').val(); var hashtags=posttext.match(/#\w+/g); var post = { title: $(e.target).find('[name=title]').val(), posttext:posttext, hashtags:hashtags }
has comment: http://stackoverflow.com/comment/40800662

http://stackoverflow.com/comment/40963715
type: QuestionComment
has text: @Incodeveritas & Imperative lol yeah, also that. Please actually do research before asking questions on SO, Rahul :)
type: Comment
comment on: http://stackoverflow.com/q/26134124
score: 0

http://stackoverflow.com/comment/40832358
score: 0
has text: Does your iframe also contains jQuery and they are on same domain?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26062636

http://stackoverflow.com/comment/40856039
comment on: http://stackoverflow.com/a/26075165
type: AnswerComment
has text: Still have no idea how I can make it work. Your example will never trigger for single user/conversation combinations if another combination is emitted before the 500ms
score: 0
type: Comment

http://stackoverflow.com/comment/41031014
score: 7
comment on: http://stackoverflow.com/q/26170830
has text: First off, please learn about `parseInt()` and `parseFloat()`. Secondly, look into the `value` property of DOM elements. Finally, check out the `onchange` or `onkeyup` events.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26160596
score: 0
has comment: http://stackoverflow.com/comment/41013894
tagged with: jquery
has comment: http://stackoverflow.com/comment/41011409
has comment: http://stackoverflow.com/comment/41011487
has title: JavaScript write rowCount to table
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
answer count: 0
has comment: http://stackoverflow.com/comment/41012717
type: Question
has body: I'm using the following JavaScript function to add a row to my table. I want to write to the table the value of the current rowCount. My function is: function addRow(tableID) { var table = document.getElementById(tableID); var rowCount = table.rows.length; var row = table.insertRow(rowCount); var colCount = table.rows[0].cells.length; for(var i=0; i<colCount; i++) { var newcell = row.insertCell(i); newcell.innerHTML = table.rows[0].cells[i].innerHTML; newcell.childNodes[0].value = rowCount; } } My HTML table: I have tried and . The first returning the error: Can't find variable rowCount and the second: undefined is not an object. It sounds a bit messy but the idea is that I want to pass the rowCount value into the name of giving me:
has comment: http://stackoverflow.com/comment/41013505
tagged with: javascript
has comment: http://stackoverflow.com/comment/41012814

http://stackoverflow.com/q/26057963
has body: I have an auto-generated list of sections that looks like that: And a checkbox: If checkbox is checked I want to hide the first section .list-0 and show next section list-1. Then if checkbox is checked again, hide list-0 and list-1 and show list-2. Please note that the amount of sections in unknown and can be up to about 25. The following code is what I wrote by now. $('#accept').on('click',function() { var count_sections = $('.list > section').length; $('.list-0').removeClass('visible').addClass('hidden'); $('.list-1').removeClass('hidden').addClass('visible'); // this should uncheck the checkbox $('#accept').attr('checked', false); }); I want to automate it so it will work no matter how many sections I have. Any help is very appreciated. Thanks.
has comment: http://stackoverflow.com/comment/40823417
has answer: http://stackoverflow.com/a/26058240
has comment: http://stackoverflow.com/comment/40823358
type: Question
has answer: http://stackoverflow.com/a/26058168
tagged with: javascript
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/26058030
has answer: http://stackoverflow.com/a/26058198
downvote count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/26058176
has comment: http://stackoverflow.com/comment/40823539
favorite count: 0
has comment: http://stackoverflow.com/comment/40823315
answer count: 5
type: UnansweredQuestion
has title: Show/hide div on checkbox click with unknown amount of divs
tagged with: checkbox

http://stackoverflow.com/comment/40830914
score: 0
comment on: http://stackoverflow.com/a/26061859
type: AnswerComment
has text: Adding absolute positioning to a messed-up layout is not a good solution. In many cases, the need to use absolute positioning to force something to be where you want it is a sign you need to step back and re-design the html.
type: Comment

http://stackoverflow.com/q/26192976
accepted answer: http://stackoverflow.com/a/27433614
has comment: http://stackoverflow.com/comment/41071756
favorite count: 0
has comment: http://stackoverflow.com/comment/41071717
has body: I had problem that i added custom java script its included but when i changes its contents it doesn't effect. it runs older java script file. since i cleared cache. i deleted every folder of /var/ also. but still it runs older java script code. while i see it in uploaded file also it shows updated code but using URL of that java script in browser it shows old code. I flushed magento cache storage. flushed cache of css/javascript also. In case if any guy have solution let me know. Thanks in advance. EDITED Same problem with css also. Changes doen't reflect. cleared cache a lot of times from back-end as well as cleared var folder also.
tagged with: php
tagged with: css
type: AnsweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/27433614
downvote count: 1
possible better answer: http://stackoverflow.com/a/26194512
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26194512
tagged with: magento
tagged with: javascript
has title: Magento js and css changes not reflect
score: 0

abide
type: Tag
tags question: http://stackoverflow.com/q/26102626
tag name: abide

obfuscation
tags question: http://stackoverflow.com/q/26191263
type: Tag
tag name: obfuscation
tags question: http://stackoverflow.com/q/26034167
tags question: http://stackoverflow.com/q/26137677

http://stackoverflow.com/comment/41124629
score: 0
comment on: http://stackoverflow.com/q/26193654
type: QuestionComment
type: Comment
has text: I'm calling the callback and hand over the `err`: https://github.com/electerious/zbarimg/blob/master/index.js#L28

http://stackoverflow.com/comment/41058641
comment on: http://stackoverflow.com/a/26176310
type: AnswerComment
score: 0
has text: I've got version 36 apparently, are you saying being able to custom script the settings was a very recent feature?
type: Comment

http://stackoverflow.com/comment/40883608
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26086284
has text: That's a much nicer solution than what I have, but this dropdown is buried deep in the project code so changing it to something else now is not easy. I load the list of files, for example, into the select options with Ajax that calls a php script that reads the directory on the server. I'm not up to making that all work with a new approach, right now. But Thanks!
score: 0

http://stackoverflow.com/comment/40976652
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26129552
has text: One of these should work for you. Welcome to stack overflow. http://www.jqueryrain.com/demo/jquery-treeview/
score: 0

http://stackoverflow.com/q/26068504
type: Question
score: 0
has comment: http://stackoverflow.com/comment/40858201
has body: I'm trying to familiarize myself with both ruby and javascript through a hobby project to create a conversation editor (perhaps a google drive app) that shares i/o formats compatible with Neverwinter Nights (ergo https://github.com/niv/nwn-lib). I thought I'd take a look at Opalrb to see if it could translate those nwn tools into a form I could use or examine; but I can't seem to get the opal-build command to produce anything but errors attempting to convert gff.rb. I don't know if I'm making a simple syntactic error entering options or have a deeper, flawed understanding of the process (probably both). I'm confident I've installed the gems and used nwn-gff successfully. That's about it. My question(s) then: what specific steps must I take to accomplish this conversion with Opal? What options do I have to utilize these tools, considering my ultimate platform? (link to nwn gff file format: http://social.bioware.com/bw_projects_file_download.php?project_file_id=10782) Cheers and thanks
has answer: http://stackoverflow.com/a/28405897
answer count: 1
has title: Opal ruby (opal-build) to transform nwn-lib (nwn-gff) to javascript? Lost
has comment: http://stackoverflow.com/comment/40889854
tagged with: ruby
type: UnansweredQuestion
tagged with: opalrb
has comment: http://stackoverflow.com/comment/40939127
tagged with: javascript

http://stackoverflow.com/comment/40848003
type: Comment
type: AnswerComment
has text: I think its the same sort of issue... try replacing 'data : function(term, page){...}' with 'data : { startsWith : "Test" }'
score: 0
comment on: http://stackoverflow.com/a/26047074

http://stackoverflow.com/comment/40810896
score: 0
type: Comment
type: QuestionComment
has text: You will need to apply the filter to the `canvas` element directly. Then download, this method downloads exactly what is on the context of the canvas.
comment on: http://stackoverflow.com/q/26050668

http://stackoverflow.com/comment/40892556
type: Comment
comment on: http://stackoverflow.com/a/26095326
score: 0
type: AnswerComment
has text: Yeah - I'm not looking to store a function in the JSON string. All I want to do is deserialize the object back INTO my object type.

http://stackoverflow.com/comment/40861154
has text: @Bergi I didn't spend too much time on it as you can tell, since i also made mistakes when posting the answer. In my view, the OP should look further into the methods presented in the answers. Maybe i am wrong on that count and higher code quality is desirable.
comment on: http://stackoverflow.com/a/26077967
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41000652
score: 0
comment on: http://stackoverflow.com/q/26154596
type: Comment
type: QuestionComment
has text: @Mrchief, thanks for that - I completely missed the C# tag.

http://stackoverflow.com/q/26094896
downvote count: 0
has answer: http://stackoverflow.com/a/26098880
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: css
has answer: http://stackoverflow.com/a/26099206
score: 1
has comment: http://stackoverflow.com/comment/40893122
has body: I have a menu next to my bxslider which i can slide in and out. Therefore my slider is going to resize itself. When I do this bxslider is either hiding parts of my images or showing already parts of the next slide. I solved this by destroying and reloading the slider. I need to wait until the css transition is finished otherwise it doesn't work but it looks pretty strange now. Is there another solution for my problem? edit: I would like it too look like when you resize the window with the responsive slider. So no jumping transitions. http://jsfiddle.net/r6fvg3ov/2/ men1 men2.1 men2.1.1 men2.1.2 men2.1.3 men2.2 this is my solution so far: $(document).ready(function () { var slider = $('.bxslider').bxSlider({ pagerCustom: '#navi', }); $('#menu-btn').click(function () { $('#navigation').toggleClass('visible'); $('#navigation').toggleClass('hidden'); $('#slider').toggleClass('resized'); $('#slider').toggleClass('full'); setTimeout(function () { slider.destroySlider(); slider.reloadSlider(); }, 500); }); }); thank you for your help!
tagged with: transition
type: Question
has title: bxslider change width onclick
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40891792
has comment: http://stackoverflow.com/comment/40891945
has comment: http://stackoverflow.com/comment/40897516
has answer: http://stackoverflow.com/a/26117819
answer count: 3
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41070426
comment on: http://stackoverflow.com/a/26192188
has text: @mithunasatheesh yup scary example. map sends (value,index) to the function, so it's parsing '2' with base 2, '3' with base 3. It's more a mistake on the use of map, than an issue of parseInt
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26099807
possible better answer: http://stackoverflow.com/a/26100719
has body: I have two blocks, "draggable" and "sortable". Inside "draggable" I have few items which I can drag them to "sortable". I want to have the possibility to click an item inside "draggable" and automatically drag it into "sortable". Here is my JS: $(".sortableList").sortable({ placeholder: 'ui-state-highlight', }); $('.sortableList').disableSelection(); $(".draggable").draggable({ connectToSortable: '.sortableList', cursor: 'pointer', helper: 'clone', revert: 'invalid', start: function (event, ui) { $(this).addClass('testing'); } }); and this is a jsbin Any ideas how can I drag the elements to "sortable" by clicking on them ?
accepted answer: http://stackoverflow.com/a/26100620
has answer: http://stackoverflow.com/a/26100719
has comment: http://stackoverflow.com/comment/40900446
linked to: http://stackoverflow.com/q/8804633
type: AnsweredQuestion
tagged with: jquery-ui-sortable
tagged with: jquery-ui
has title: jQuery UI sortable - drag element on click
has comment: http://stackoverflow.com/comment/40900420
type: Question
has answer: http://stackoverflow.com/a/26100620
answer count: 2
has comment: http://stackoverflow.com/comment/40900396
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40900324

http://stackoverflow.com/comment/40984221
has text: Create a `$routeChangeStart` or `$stateChangeStart` listener (for ui router), check the auth status, redirect to login if not authenticated.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26145871
score: 2

http://stackoverflow.com/a/26154303
has comment: http://stackoverflow.com/comment/41001578
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26153893
score: 2
answers question: http://stackoverflow.com/q/26153893
has comment: http://stackoverflow.com/comment/41997325
type: AcceptedAnswer
downvote count: 0
has body: You can refactor the function to store the initialHeight in a "private" variable the first time it's run: var expand = (function() { var initialHeight; // Return a function that holds initialHeight in a closure return function (btn) { // Get box before setting/getting initialHeight var box = btn.parentNode.parentNode; // Set initialHeight only if undefined initialHeight = initialHeight || window.getComputedStyle(box, null).getPropertyValue('height'); // Do other variables var ipsum = box.getElementsByTagName("p")[0], textSize = window.getComputedStyle(ipsum, null).getPropertyValue('font-size'), lineHeight = window.getComputedStyle(ipsum, null).getPropertyValue('line-height'), boxWidth = window.getComputedStyle(box, null).getPropertyValue('width'), numText = parseInt(textSize), numWidth = parseInt(boxWidth), numHeight= parseInt(initialHeight); if(box.style.height == "150px"){ box.style.height = "40px"; ipsum.style.display = "none"; } else { box.style.height = "150px"; // If ipsum is a P, probably better to use "" (empty string) here // so it returns to its default or inherited value // ipsum.style.display = "inline"; ipsum.style.display = ""; } console.log(lineHeight); } }()); The above is a proper refactoring, tested with the following markup: box notBox ipsum
has comment: http://stackoverflow.com/comment/41000171
has comment: http://stackoverflow.com/comment/41997306
type: Answer

http://stackoverflow.com/a/26154868
has comment: http://stackoverflow.com/comment/41001029
has comment: http://stackoverflow.com/comment/41001056
upvote count: 1
score: 1
has body: First of all, the random number you are generating, generates 3 everytime so no wonder you are getting all the repeats of third div.. change your random number generation code with this one: var randomNumber = Math.floor(Math.random() * (7)) + 1; This will generate a random number between 1 and 7 randomly. Then to display that particular div, instead of so many if or switch statements, you can simply do it in one line considering your div ids are n1, n2, n3 and so on.. document.getElementById("n"+randomNumber).style.display = "inline"; Put these two lines inside window.onload function so everytime window loads, a new random number gets generated and that div gets displayed. This will work perfectly for many visitors as each visitor will get it's unique random number and that particular div will be displayed. No need to go into cookies or stuff like that. See the Working snippet below, everytime you run it, a random div will be displayed: var randomNumber = Math.floor(Math.random() * (7)) + 1; document.getElementById("n"+randomNumber).style.display = "inline"; DIV1 DIV2 DIV3 DIV4 DIV5 DIV6 DIV7 EDIT: After understanding your question better (hopefully) and doing some research, i came up with a solution where you can retain the value of current div between page reloads, make a new html file on your computer, copy paste the following code and keep refreshing the page to see each div being displayed incrementally.. DIV1 DIV2 DIV3 DIV4 DIV5 DIV6 DIV7
answers question: http://stackoverflow.com/q/26154744
has comment: http://stackoverflow.com/comment/41001127
accepted answer of: http://stackoverflow.com/q/26154744
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41001057
downvote count: 0
has comment: http://stackoverflow.com/comment/41001005
has comment: http://stackoverflow.com/comment/41001552
type: Answer

http://stackoverflow.com/q/26176017
type: Question
answer count: 1
tagged with: slideshow
tagged with: javascript
tagged with: jquery
score: 0
linked to: http://stackoverflow.com/q/12487352
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26176224
type: UnansweredQuestion
has title: Resume interval in a jQuery slideshow
has body: I'm using this slideshow for a project, and I need to know if it is possible to resume its interval. What's going on here as you can see, is when you hover/mouseover, the progressbar (green thing at the bottom) stops. As you remove/mouseout, it continues. The problem here is that the whole interval (8000 ms) starts over again. What I'm trying to figure out is: how can I just let it continue, without starting from zero to eight seconds? If you check it out here The JavaScript/jQuery: ; (function ($) { $.fn.slider = function (o) { var defaults = { animation_duration: 700, animation_interval: 8000, touch_draglimit: 80 } // states var state = { slide_length: 0, slide_current: 1, slide_next: 0, index_current: 1, index_next: 0, interval: null, paused: false, resizing: false, doTransition: false, clickEvent: "click" } if (Modernizr) { Modernizr.csstransitions ? doTransition = true : doTransition = false; Modernizr.touch ? clickEvent = "touchstart" : clickEvent = "click"; } var settings = $.extend({}, defaults, o); // create namespace var slider = {}; // set reference to slider element var el = this; // the clones var clone_first, clone_last; // responsive stuff var windowWidth = $(window).width(), windowHeight = $(window).height(), sliderWidth = el.width(); /* * Internal functions * * */ // initiate slider var init = function () { setup(); update_proportions(); start_slider(); i_interact(); }; var setup = function () { // wrap the slider el.wrap('&lt;div class="as-wrap"&gt;&lt;div class="as-view"&gt;&lt;/div&gt;&lt;/div&gt;'); // set namespace slider.view = el.parent(); slider.wrap = slider.view.parent(); // mark slider list slider.slider = $("&gt; ul", el); slider.slider.addClass("as-slider").attr("data-current-slide", state.slide_current).attr("data-current-index", state.index_current); state.slide_length = slider.slider.children("li").length; // add progress bar slider.wrap.append('&lt;div class="as-progress"&gt;&lt;div class="as-progress-value"&gt;&lt;/div&gt;&lt;/div&…

http://stackoverflow.com/comment/40865477
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26080621
has text: @user2270924 Please ask a different question if that is your goal.
type: AnswerComment

http://stackoverflow.com/comment/40831844
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26062182
has text: I tried foo.1 = {}; and foo."1" = {}; but certainly it doesn't work. How to make the numerical number as a property name?
score: 0

http://stackoverflow.com/comment/41024726
score: 1
comment on: http://stackoverflow.com/q/26165919
type: QuestionComment
type: Comment
has text: Can you try the following: swap lines `$scope.$apply(function()` and `reader.onload = function(e) {` and now move `var reader = new FileReader();` before `reader.onload` and `reader.readAsText(csvFile);` after `reader.onload` block

http://stackoverflow.com/comment/40878699
type: Comment
has text: Please remove MS cruft. It applies only to IE6 and below. You can also remove all other XMLHttpRequest boilerplate while you're at it, we know how that works. Just out of curiosity, what 8-year-old book did you copy this from?
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26087838

http://stackoverflow.com/comment/40798496
type: QuestionComment
score: 0
has text: @Quentin Yes I got it now:) thank you very much
comment on: http://stackoverflow.com/q/26043846
type: Comment

http://stackoverflow.com/comment/59223334
has text: The problem lies with grunt-contrib-jshint, who ignore that the options property is reserved for this purpose and use it to configure the tool in the node environment, but do not ignore properties they themselves are not using. This causes the linter to throw errors on valid command line flags, hence the `Bad option: 'verbose'. (E001)`, in spite of the fact that the verbose flag is correctly appended to the jsHint command when it runs (ironically, the "bad option" error is displaying in verbose mode!)
comment on: http://stackoverflow.com/a/35775392
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26052208
favorite count: 0
tagged with: three.js
tagged with: splunk
tagged with: css
answer count: 1
has comment: http://stackoverflow.com/comment/40942212
upvote count: 3
tagged with: webgl-globe
has answer: http://stackoverflow.com/a/33759036
has comment: http://stackoverflow.com/comment/40923001
has comment: http://stackoverflow.com/comment/40995256
downvote count: 0
has comment: http://stackoverflow.com/comment/40925830
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40942150
has body: I am trying to add a WebGL Globe visualization into a custom SaaS application (Splunk) and instead of getting lines out of the globe, I only see dots. I suspect the application has its own CSS or something that is overriding and hiding or preventing the lines from coming out. But I have no idea where to start debugging and what "troublesome" CSS properties I should be looking for. I'm not sure if this helps, but here are 2 screenshot of the CSS properties of the 2 elements: the &lt;div&gt; and the &lt;canvas&gt; that is inside the &lt;div&gt;: https://www.dropbox.com/s/x7qqkhimkh34h8q/Screenshot%202014-09-26%2000.40.35.png?dl=0 https://www.dropbox.com/s/h79190dgf2k99w6/Screenshot%202014-09-26%2000.40.44.png?dl=0 My sample JSON data is from this tutorial and it is valid. I even tried a very simple dataset of [['series1', [0, 0, 1]]] and even that didn't work (there was just one dot).
type: Question
has title: 3D lines not rendering out of WebGL Globe (potential CSS conflict?)
score: 3

http://stackoverflow.com/q/26133569
tagged with: angularjs-scope
tagged with: ionic-framework
type: Question
has answer: http://stackoverflow.com/a/26138686
answer count: 2
has comment: http://stackoverflow.com/comment/40977498
tagged with: javascript
has answer: http://stackoverflow.com/a/26133973
upvote count: 1
favorite count: 0
has body: I'm building a Ionic application with angular.js, I'm almost done, but now I have a minor trouble. In my templates/menu.html I have: Filter and my controller.js: .controller('Home', ['$scope', '$ionicModal', '$cordovaGeolocation', function($scope, $ionicModal, $cordovaGeolocation) { App = { init: function() { setTimeout(function(){ $scope.map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions); }, 200); }, }; $scope.addMarkersToMap = function(reports, map) { var newCenter = new google.maps.LatLng(reports[0].latitude, reports[0].longitude); map.setCenter(newCenter); map.setZoom(12); } $scope.filterByPeriod = function(beginDate, endDate) { var cityId = window.localStorage.getItem('cityId'); serviceReports.getDenunciasFromPeriod(cityId, beginDate, endDate) .success(function(reports){ $scope.addMarkersToMap(reports.dados, $scope.map); }); } App.init(); }]); I already try do this with a `$scope.apply(function(){}) that encapsulates this method but with both ways I'm catching this error: http://cl.ly/image/200O1d2F1C46 Anyone have any idea how to solve this problem?
tagged with: cordova
has title: Can't update variable in angular.js
linked to: http://stackoverflow.com/q/23049904
tagged with: angularjs
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40961762
score: 1

http://stackoverflow.com/q/26167282
has comment: http://stackoverflow.com/comment/41024348
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26167373
accepted answer: http://stackoverflow.com/a/26167373
score: 0
has title: jQuery trigger click event
answer count: 1
has comment: http://stackoverflow.com/comment/41024390
has comment: http://stackoverflow.com/comment/41024327
type: AnsweredQuestion
has body: I have a page with a search button on it. in my Javascript i have a click event that looks like this: if(blah){ $('#search').click(); } $('#search').on('click', function(){ // Do something }); What would be the reason the if statement wouldn't click the button to cause the onclick to fire? All of this is wrapped in an onReady as well. The html on the page is a standard button: Search RefID
has comment: http://stackoverflow.com/comment/41024344
type: Question
has comment: http://stackoverflow.com/comment/41024425

http://stackoverflow.com/comment/40821788
has text: Your right its not called but i have set class ViewController_webView_news: UIViewController, UIWebViewDelegate As well the WebView Delegates to the MainView see here http://i.epvpimg.com/Uc5ib.png
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26056845
type: Comment

http://stackoverflow.com/comment/41025961
score: 0
type: QuestionComment
type: Comment
has text: Error is "ElementNotVisible: [POST http://10.0.1.34:4444/wd/hub/session/204fe805-74f6-401d-a22f-5afd976b547c/element/9/click] element not visible" on line 29
comment on: http://stackoverflow.com/q/26166758

http://stackoverflow.com/comment/53545520
comment on: http://stackoverflow.com/a/26131085
score: 1
has text: Thank you. I spent two hours trying to figure out why it wasnt working.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26193702
accepted answer: http://stackoverflow.com/a/26197858
linked to: http://stackoverflow.com/q/283956
has title: Three.js: How can I make a 2D SnapShot of a Scene as a JPG Image?
type: AnsweredQuestion
tagged with: webgl
has answer: http://stackoverflow.com/a/26197858
upvote count: 42
type: Question
linked to: http://stackoverflow.com/q/16431318
downvote count: 0
has comment: http://stackoverflow.com/comment/41079647
tagged with: javascript
score: 42
has comment: http://stackoverflow.com/comment/41072885
has comment: http://stackoverflow.com/comment/105005675
tagged with: http://stackoverflow.com/tag/html
answer count: 1
linked to: http://stackoverflow.com/q/38896297
linked to: http://stackoverflow.com/q/26431862
favorite count: 0
has comment: http://stackoverflow.com/comment/41075073
linked to: http://stackoverflow.com/q/34847293
tagged with: three.js
has body: I have a three.js scene like the following: 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); document.body.appendChild(renderer.domElement); var geometry = new THREE.BoxGeometry(1,1,1); var material = new THREE.MeshBasicMaterial({color: 0x00ff00}); var cube = new THREE.Mesh(geometry, material); scene.add(cube); camera.position.z = 5; var render = function () { requestAnimationFrame(render); cube.rotation.x += 0.1; cube.rotation.y += 0.1; renderer.render(scene, camera); }; render(); Is it possible to make a 2D SnapShot or ScreenShot from a Scene and export it as a JPG Image?
linked to: http://stackoverflow.com/q/15558418

http://stackoverflow.com/a/26096745
score: 1
upvote count: 1
has body: If the problem is the class="row" attribute you can use something like this: &lt;div ng-class="{ 'row': $index % 5 === 0 }"&gt;
answers question: http://stackoverflow.com/q/26096263
has comment: http://stackoverflow.com/comment/40895012
has comment: http://stackoverflow.com/comment/40897417
downvote count: 0
type: Answer

http://stackoverflow.com/q/26149717
type: AnsweredQuestion
tagged with: audio
linked to: http://stackoverflow.com/q/5368596
has body: HTML5 has an onboard volume detection. &lt;video controls width="320" height="176" onvolumechange="alert('The volume has been changed')"&gt; This is for the player only. Is it possible to detect volume from the system? Say a phone. Can I get volume readings of my phone from the mobile browser? Or can I use JS to detect if the audio jack is plugged in? Can Volume level be detected for audio out using GetUserMedia?
downvote count: 1
type: Question
score: 10
tagged with: javascript
has comment: http://stackoverflow.com/comment/96138491
has answer: http://stackoverflow.com/a/26763182
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: getusermedia
has title: Javascript to detect system's volume (sound) and audio jack plugged in
favorite count: 0
accepted answer: http://stackoverflow.com/a/26763182
tagged with: volume
upvote count: 11

http://stackoverflow.com/a/26158385
answers question: http://stackoverflow.com/q/26157981
downvote count: 0
type: Answer
has body: First, div cannot be a child of ul and second you shouldn't really use tables for layout (unless making an email template). If you are just trying to change the src of the main image on the click of the thumbnails, you can use the following js: var images = new Array('img/Plane1.jpg', 'img/Plane2.jpg', 'img/Plane3.jpg', 'img/Plane4.jpg'), thumbnails = document.getElementById('thumb').getElementsByTagName('img'), mainImage = document.getElementById('main'); for (i = 0; i &lt; thumbnails.length; i++) { setClickFunction(i); } function setClickFunction(currentIndex) { thumbnails[currentIndex].onclick = function() { mainImage.src = images[currentIndex]; }; } Example Using links for your large images instead of an array
score: 1
upvote count: 1

http://stackoverflow.com/comment/41010589
type: Comment
has text: Fine just wanted to know. Nice answer. +1 for using CSS
score: 1
comment on: http://stackoverflow.com/a/26160135
type: AnswerComment

http://stackoverflow.com/q/26146897
has answer: http://stackoverflow.com/a/26147226
tagged with: indexeddb
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26156067
tagged with: jquery
has title: IndexedDB No Callback
has body: I have a plugin written in JavaScript that creates/connects to an IDB, checks the data inside the stores and populates if necessary and then returns data requested. The plugin works fine in Chrome/FF however does not seem to want to work in Safari 7.1. The problem I am having at present is that when I create the database on an iOS device I do not get a callback to the on success or on error functions and furthermore when I create the database on Safari on Mac I get a blank error back. Here is a snippet of the code, it is within a function inside a plugin called database. var dbName = string and var dbVersion = 1 database = { init: function(callback){ //TEMP FOR DEBUG - DELETE DB IF EXISTS window.indexedDB.deleteDatabase(dbName); //Now create &amp; init var req = window.indexedDB.open(dbName,dbVersion); console.debug('DBName/Version',dbName,dbVersion); req.onabort = function(event){ console.error('Aborted!',event.target,req); } req.onerror = function(event){ console.error('DB Init',event.target); } req.onblocked = function(event){ console.error('Blocked',event); alert("Please close other tabs with this website open!"); return; }; req.onsuccess = function(event){ //Will be called after upgrade if that is called console.info('success called'); db = req.result; console.debug(db); dbOpen = true; //Check Object Stores Are Correct var obs = db.objectStoreNames; if((!!(typeof callback == 'function'))) callback.call(); }; req.onupgradeneeded = database.upgrade; console.debug('Did something happen?',req); }, After the open() function I have a console debug that prints the parameters supplied to open &amp; at the end after all the callbacks I have a debug which prints 'Did Something Happen' along with the request. On Safari for Mac when I run the function it will print this into the console: https://www.dropbox.com/s/vrshdjhzazg2ixo/Screenshot%202014-10-01%2018.11.01.png?dl=0 And when run on iOS and having the web inspector on mac open an error is not even produced, just seems…
has comment: http://stackoverflow.com/comment/40986500
type: Question
tagged with: macos
tagged with: safari
score: 0
answer count: 2

http://stackoverflow.com/comment/41048112
comment on: http://stackoverflow.com/a/26179868
has text: I did [ask that question](http://stackoverflow.com/questions/17386706/) but no one seemed to have a good answer. Part of the issue is that with a language like Haskell, where every function takes only a single parameter, this is never a problem, and I think the question just leads to confusion.
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26083712
has answer: http://stackoverflow.com/a/26084553
score: 0
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26084553
has comment: http://stackoverflow.com/comment/40875480
has comment: http://stackoverflow.com/comment/40871277
possible better answer: http://stackoverflow.com/a/26085648
tagged with: javascript
has answer: http://stackoverflow.com/a/26085648
has body: I wrote this code that works, but I don't see nested function usually so I think I can write it in a better way: function onSuccess(imageURI) { function errorHandlerFS(e) { //code managing error } function onSuccessFS(fs){ window.resolveLocalFileSystemURL(imageURI,function(fileEntry){//here I reference the variable imageURI //do something }, errorHandlerFS); } window.requestFileSystem(LocalFileSystem.TEMPORARY, 0, onSuccessFS, errorHandlerFS); } $('#shootImg').click(function(){ cameraProp.sourceType = Camera.PictureSourceType.CAMERA; navigator.camera.getPicture(onSuccess, onFail,cameraProp); }); Here the click on #shootImg activates the onSuccess passing imageURI. Then if window.requestFileSystem succeeds calls onSuccessFS. Here my problem arises. Since I need imageURI in onSuccessFS I wrote onSuccessFS nested inside onSuccess. I think this is something to avoid, but if I had written onSuccessFS outside onSuccess the variable imageURI was outside its scope. Please concentrate only on the javascript.
answer count: 2
has comment: http://stackoverflow.com/comment/40871439
favorite count: 0
has comment: http://stackoverflow.com/comment/40871085
has comment: http://stackoverflow.com/comment/40872359
has title: javascript correct style avoid nested functions
has comment: http://stackoverflow.com/comment/40877239
type: AnsweredQuestion

http://stackoverflow.com/comment/40843751
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26068689
has text: Would be a lot more useful if there was a link to someting like jsfiddle with all the required code to reproduce the problem.

http://stackoverflow.com/comment/40932858
comment on: http://stackoverflow.com/a/26117464
has text: can somebody find me a way to call this logout function... that will be more than enough
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40833518
type: Comment
has text: Ah, stupid typo - fixed... What does your HTML look like? This solution should work for just a list of .post elements with no other selectors in-between.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26062917

http://stackoverflow.com/q/26054209
has answer: http://stackoverflow.com/a/26057797
tagged with: javascript
favorite count: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/26057214
tagged with: grouping
has answer: http://stackoverflow.com/a/26057214
has body: I have a problem with grouping an array of numeric value: I have values in an array like this var numb = [5,10,11,6,7,18,1,8,2,1,15,12,4,5,3,4,6,7,15,20]; that are then sorted into ascending numerical order var sortedNumb = [1,1,2,3,4,4,5,5,6,6,7,7,8,10,11,12,15,15,18,20]; Now I want to create a group of numbers like 1-4 , 5-8 , 9-12 , 13-16 , 17-20 Is it possible to create groups dynamically, like that?
type: AnsweredQuestion
downvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/40816668
tagged with: indexing
score: 1
has title: Javascript Array grouping category
accepted answer: http://stackoverflow.com/a/26057797
has answer: http://stackoverflow.com/a/26055061
has comment: http://stackoverflow.com/comment/40817406
upvote count: 1
tagged with: arrays

http://stackoverflow.com/q/26109915
possible better answer: http://stackoverflow.com/a/26110128
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40918938
tagged with: underscore.js
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/40919457
tagged with: javascript
has comment: http://stackoverflow.com/comment/40918918
has body: I'm racking my brain here and need some quick help. I have the following JSON object: "product": { "diagnostics": null, "skus": [{ "itemCode": "Q28988", "salesCode": "Q2898800", "listPrice": 22, "salePrice": 22, "numberOfBottles": 1, "salePricePerBottle": 22, "id": "esku580806", "vppApplier": false, "vppPrice": null, "vppDiscountPct": null }, { "itemCode": "C28988", "salesCode": "C2898800", "listPrice": 264, "salePrice": 264, "numberOfBottles": 12, "salePricePerBottle": 22, "id": "esku580811", "vppApplier": false, "vppPrice": null, "vppDiscountPct": null }], "id": "eprod440905", } And I need to filter the skus array and only return itemCodes that begin with the letter 'Q'. I'm using underscore and JavaScript, and this is the closest I could get, but it doesnt seem to return anything. var codes = _.filter($scope.cb.recommendations, function(obj){ var startLetter = obj.product.skus.slice(); return startLetter[0] === 'Q'; }); $scope.cb.recommendations is the JSON object - snippet is above. Big thanks!
has answer: http://stackoverflow.com/a/26110128
score: 0
has comment: http://stackoverflow.com/comment/40918897
answer count: 2
has comment: http://stackoverflow.com/comment/40918851
accepted answer: http://stackoverflow.com/a/26110083
has comment: http://stackoverflow.com/comment/40918859
has comment: http://stackoverflow.com/comment/40918816
has comment: http://stackoverflow.com/comment/40918936
has comment: http://stackoverflow.com/comment/40919128
has title: How to return object if it contains a letter in JavaScript
has answer: http://stackoverflow.com/a/26110083
has comment: http://stackoverflow.com/comment/40919107
tagged with: lodash

http://stackoverflow.com/q/26154233
answer count: 1
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
tagged with: hammer.js
has title: Trying to enable swipe left
has answer: http://stackoverflow.com/a/26154653
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41000075
type: Question
has body: The following is my code: And I do not see "Swipe Left" alert. What is wrong?
tagged with: swipe
accepted answer: http://stackoverflow.com/a/26154653
score: 0

http://stackoverflow.com/comment/41034920
has text: var uListID = heading.getAttribute('id') + j; uList.setAttribute('id', uListID); //document.write("ab " + uList.id + ' '); uList.style.display = 'none'; //uList.onmouseover = display(this.id); uList.setAttribute('onclick', 'display(this.id)');
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26172761

http://stackoverflow.com/a/26148603
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26148543
has body: In principle it's probably not a bad idea, but I would combine it with "use strict" to also ensure that variables used without var are caught too. Double-nesting won't actually break anything, but do be aware that there might be a (hopefully very) small performance hit when resolving global variables because there'd now be two scopes to climb out of instead of one.
upvote count: 1
type: Answer

http://stackoverflow.com/comment/41048686
type: Comment
has text: Note that there is an [$interval](https://docs.angularjs.org/api/ng/service/$interval) service. I'm guessing the answer explaining why no $interval existed in August of 2013 is just outdated now :)
comment on: http://stackoverflow.com/a/26180552
type: AnswerComment
score: 1

http://stackoverflow.com/comment/40931020
has text: Updated - use your old code but remove the toggle line.
comment on: http://stackoverflow.com/a/26116330
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41030261
has text: sss, can u please answer me something??? how can i transform the data into a json object?.. assuming it is a string..
type: Comment
comment on: http://stackoverflow.com/a/26169197
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40891110
comment on: http://stackoverflow.com/a/26094427
type: Comment
has text: can you expand on the part where you are setting null and undefined?
type: AnswerComment
score: 0

http://stackoverflow.com/q/26182847
possible better answer: http://stackoverflow.com/a/26183374
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26184519
accepted answer: http://stackoverflow.com/a/26184519
favorite count: 0
tagged with: angularjs
upvote count: 2
has title: Angularjs (select): Show other attribute from array than the one stored in ng-model
has answer: http://stackoverflow.com/a/26183374
has body: I have a select input that give me a choice between thoses objects: $scope.items = [{"id": "0", "name": "AAA"}, {"id": "1", "name": "BBB"}, {"id": "2", "name": "CCC"}] I need to store the Id and show the name attribute in the select box when it is selected or when the Id has already been stored in the object to be modified. The object: $scope.object I have this has html code, it stores the selected item Id in $scope.object.itemId without problem but the selected item name doesn't show in the select input when it's selected or has been already selected. &lt;select ng-model="object.itemId" ng-options="item.id as item.name for item in items track by item.id"&gt; &lt;/select&gt; Note that the select list is correctly populated with the items names. Thank's for you help!
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/41053643
tagged with: select
type: Question
answer count: 2
tagged with: ng-options
tagged with: angular-ngmodel

http://stackoverflow.com/a/26228597
type: Answer
has body: Can one use differently defined models defined via require.js/AMD in a single central view? I mean separately defined models, not ones of a collection. If yes, how they are referenced in the json part of the callback function of define() that defines that central view, in its vars, in functions of its attributes etc. There can only one this.model, right? A View's this.model is just one way to provide a view with a model. You can also pass whatever other options you want to a view, like so: var YourView = Backbone.View.exend({ initialize: function(options) { this.foo = options.foo; } }); var modelA = new Backbone.Model(); var modelB = new Backbone.Model(); var yourView = new YourView({model: modelA, foo: modelB}); // yourView.model == modelA // yourView.foo == modelB Is it possible to Render different templates, possibly populated by vars from those different models, conditionally, from within this single central view? Yup. For instance, here's an example if we add a render method to YourView: render: function() { if (this.model.get('bar')) { this.$el.html(this.templateA(this.model.toJSON()); } else { this.$el.html(this.templateB(this.foo.toJSON()); } } Can one use differently defined collections defined via require.js/AMD in a single central view? Yup, the same way as you pass in multiple models. It doesn't matter if you use Require; you can pass around Backbone objects/classes through it just fine. Can one use differently defined models defined via require.js/AMD in a single collection? (this alone could achieve first goal with referencing only this capable collection.) Yup, just throw all the models in to a single collection, like so: var modelA = new ModelClass(); var modelB = new SomeOtherModelClass(); var collection = new Backbone.Collection([modelA, modelB]); The only limit is that a Collection can only have a single model property, which means that whenever you create a new Model through the Collection (eg. via fetch or create) they will all be of that model.…
answers question: http://stackoverflow.com/q/26070972
score: 0

http://stackoverflow.com/a/26185837
has body: A simple example: .progress-bar{height:20px; width:400px;} .status{height:20px; background:green; width:0px; text-align:center;} #btn{paddding:10px; width:100px; background:red;cursor:hand;cursor:pointer;} click here - - - - - Javascript function: function Call(){ var nRows = $(".modem_row").length; if(nRows > 0){ var width = $(".progress-bar").width(); var unit = width/nRows; var unitPercent = 100/nRows; var $statusDiv = $(".progress-bar").children('.status').eq(0); var oldWidth = 0; var newWidth = 0; var percent = 0; var msTimer =0; var count = 1; $(".modem_row").each(function(){ msTimer += 800;//miliseconds setTimeout(function(){ //this code should be in ajax's success function: oldWidth = $statusDiv.width(); newWidth = oldWidth + unit; percent = unitPercent*count; //here you can use animate() with jqueryUI. $statusDiv.width(newWidth).text(percent + " %"); count++; }, msTimer); });//each }//if } Test it in jsfiddle. Define a width for progress bar and the script will detect it and will calculate how much must increment.
answers question: http://stackoverflow.com/q/26181060
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26181060
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41064487

http://stackoverflow.com/a/26054249
answers question: http://stackoverflow.com/q/26054079
upvote count: 1
has body: you do not have define the ids so change the condition to if ($.trim($('[name="postTitle"]').val()) === "" || $.trim($('[name="postDesc"]').val()) === "" || $.trim($('[name="postCont"]').val()) === "")
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/26099417
answers question: http://stackoverflow.com/q/26099071
downvote count: 0
score: 1
type: Answer
upvote count: 1
has body: If I have understood your question right away then $("#people").click(function(){ var content = $('#people').html(); $("#testbox").val(content); }); should do the work. But I think you should use something like custom attribute instead of id as there can be only one id for a specific tag.

http://stackoverflow.com/comment/40948304
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26125965
has text: Could you give me an example of this? I am semi new to web development and jQuery in specific
score: 0

http://stackoverflow.com/a/26112848
type: Answer
has body: When you use $complie it will return a jqLite object, not a HTML string. However, the value of the variable for ngBindHTML should be a string including HTML. That's why you can see nothing as result. For your situation, it's better to use Directive than Controller to insert your HTML. See my Codepen: http://codepen.io/jennieji/pen/jhnCk JS: angular.module('bindHtmlExample', ['ngSanitize']) .controller('ExampleController', ['$scope', '$interpolate', function($scope, $interpolate) { var templateHTML = 'I am an HTMLstring with ' + '{{ bindText }}'; $scope.bindText = 'Refresh()'; $scope.refresh = function() { console.log('refresh() runned.'); }; $scope.interpolate = $interpolate(templateHTML)($scope); } ]) .directive('exampleDirective', ['$compile', function($compile){ return function(scope, element){ var templateHTML = ' I am an HTMLstring with ' + '{{ bindText }} '; element.append( $compile(templateHTML)(scope) ); }; }]); HTML:
answers question: http://stackoverflow.com/q/26112365
score: 0

http://stackoverflow.com/q/26151543
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40995575
has title: How to dynamically bind function to ng-click using the function expression from model
type: Question
has body: I have the following element in my Angular template to generate a button bar with Font Awesome icons: navigation.buttonBar is the following array of arrays: [ [ "fa-minus", "less()", "Show fewer cloud buttons." ], [ "fa-plus", "more()", "Show more cloud buttons." ], [ "fa-minus-square", "smaller()", "Make cloud buttons smaller." ], [ "fa-plus-square", "bigger()", "Make cloud buttons bigger." ], [ "fa-bars", "toggleShowStrings()", "Toggle display of matching strings." ], [ "fa-refresh", "initialize();", "Load more content." ], [ "fa-undo", "resetQuery()", "Clear query." ] ] The text and icons render correctly, but the resulting buttons don't work. When I inspect the element, I see that btn[1] was expanded correctly. What do I replace {{ btn[1] }} with to make this work properly?
tagged with: javascript
tagged with: angularjs-scope
score: 0
has answer: http://stackoverflow.com/a/26151960
accepted answer: http://stackoverflow.com/a/26151960
answer count: 1
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40996526
tagged with: angularjs-ng-repeat

http://stackoverflow.com/comment/40814806
type: QuestionComment
score: 0
has text: EXP is also a custom function. Ok I will in into uppercase
comment on: http://stackoverflow.com/q/26034657
type: Comment

http://stackoverflow.com/comment/40833673
comment on: http://stackoverflow.com/a/26061367
score: 0
type: AnswerComment
type: Comment
has text: http://stackoverflow.com/questions/14519041/how-to-read-a-json-object-in-js brought the solution, had to parse the object using JSON.parse

http://stackoverflow.com/q/26148834
has title: While running this program I am not getting any response in web browser
type: Question
has body: I am new to JavaScript and while trying to run this code in Notepad++ latest version. Nothing is loading into the browser. Is this a problem with my browser or code? How would I modify this code to get output? This is my code: &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;script type="text/javascript"&gt; Document.write("Hello Am Midhun"); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26148900
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26148964
score: 0
accepted answer: http://stackoverflow.com/a/26148900
upvote count: 1
downvote count: 1
possible better answer: http://stackoverflow.com/a/26148964
type: AnsweredQuestion

http://stackoverflow.com/q/26080029
has comment: http://stackoverflow.com/comment/40900240
has comment: http://stackoverflow.com/comment/40865962
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40900483
has title: images rotation javascript not working
has comment: http://stackoverflow.com/comment/40865126
answer count: 0
type: UnansweredQuestion
has body: Can not get my query to work. Please advise what I'm missing: HTML: Javascript $.fn.imagesRotation = function (options) { var defaults = { images:["U:\emalcolm\BTHOW\web design\sladex-images-rotation-4430259\imagestub.jpg", "U:\emalcolm\BTHOW\web design\sladex-images-rotation-4430259\imageseverafter.jpg", "U:\emalcolm\BTHOW\web design\sladex-images-rotation-4430259\imagesoneday.jpg", "U:\emalcolm\BTHOW\web design\sladex-images-rotation-4430259\infinity.jpg"] ,// urls to images dataAttr: 'images', // html5 data- attribute which contains an array with urls to images imgSelector: 'img', // element to change interval: 1000, // ms intervalFirst: 500, // first image change, ms callback: null // first argument would be the current image url },
type: Question
has comment: http://stackoverflow.com/comment/40865066
tagged with: rotation
has comment: http://stackoverflow.com/comment/40864420
has comment: http://stackoverflow.com/comment/40865204
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/40865211

http://stackoverflow.com/a/26181119
type: Answer
answers question: http://stackoverflow.com/q/26178640
score: 1
accepted answer of: http://stackoverflow.com/q/26178640
upvote count: 1
has body: I did install Jquery-turbolinks gem and everything is working fine now. So if anyone else than me have the same problem is there a link to jquery turbolinks here. https://github.com/kossnocorp/jquery.turbolinks
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40825403
has text: can you create a fiddle for this?
comment on: http://stackoverflow.com/q/26059023
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26070007
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26070136
has comment: http://stackoverflow.com/comment/40846255
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/40846298
has comment: http://stackoverflow.com/comment/40846199
tagged with: ruby
has comment: http://stackoverflow.com/comment/40846270
upvote count: 1
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/26070136
type: AnsweredQuestion
score: 1
has body: I am sure this is a simple solution but it's driving me crazy. I have a Ruby on Rails app whereby I am making a simple AJAX call to a controller action on a jQuery button click event to submit data and initiate a modal pop-up when it successfully submits. See code below. The only HTML that is relevant in the view for this issue is below (the modal div and the link HTML). Again, this works fine when the Javascript is in the view: <%= link_to "Submit your info", "/controller_name_name/action_name/#{product.id}", :id => product.id, :class => "linkclass" %> Your data has been successfully submitted! This code works perfectly when the Javascript is in the view and the page does not reload, as I want. However, when I place this Javascript code (minus the script tags) in a separate Javascript file, it refreshes the page when the link is clicked. Everything submits fine but the page reloads/refreshes and I don't want it to reload. Am I forgetting to add something extra to the code when I put it in a separate file? The separate js file is in the assets/javascript folder and is included in the HTML (I see it in view source) so that's not the problem. Any advice would be appreciated.
has title: Page keeps reloading with AJAX call in Ruby on Rails App
type: Question
has comment: http://stackoverflow.com/comment/40846353
has comment: http://stackoverflow.com/comment/40846389

http://stackoverflow.com/comment/40868245
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26082044
score: 0
has text: yes, but index is required also for each row value

http://stackoverflow.com/q/26123709
score: 0
has answer: http://stackoverflow.com/a/26123836
accepted answer: http://stackoverflow.com/a/26123836
has title: Sencha Ext JS ArrayStore in Grid Empty
type: Question
type: AnsweredQuestion
has body: Good Morning, I am brand new to Sencha EXT JS, like literately this is my first day. I have created a small application that creates a Grid inside a panel and then fills the grid with some data form an ArrayStore (hardcoded). The application runs fine but I get three empty entries in the grid and no data. Any idea's? Ext.application({ name : 'MyApp', launch : function() { Ext.onReady(function () { var store = new Ext.data.ArrayStore({ idProperty: 'storeTest', autoDestroy: true, storeId: 'myStore',idIndex: 0, fields: [{name: 'name', type: 'string'},{name: 'age', type: 'int'},]}); var myData = [ ['Person1',31], ['Person2',30], ['Person3',6] ]; store.loadData(myData); var resultsPanel = Ext.create('Ext.panel.Panel', { title: 'Results', width: 1000, height: 400, renderTo: Ext.getBody(), layout: { type: 'hbox', align: 'stretch', padding: 5 }, items: [{ xtype: 'grid', columns: [{header: 'Name'}, { header: 'Age' }], store: store, flex: 1 }, { xtype: 'splitter' }, { title: 'Details', bodyPadding: 5, items: [{ fieldLabel: 'Data item', xtype: 'textfield'}], flex: 2 }] }); }); } });
answer count: 1
tagged with: javascript
tagged with: extjs

http://stackoverflow.com/comment/40846651
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26070225
has text: Why not pick the distances between the numbers and then compute the numbers with a scan? By scan I mean that [2,4,1,5,2] becomes [2,6,7,12,14].
score: 1

http://stackoverflow.com/comment/41006843
score: 0
type: Comment
type: QuestionComment
has text: are you sure? http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html#ResponseCustomCaching
comment on: http://stackoverflow.com/q/26156822

http://stackoverflow.com/comment/40870457
type: Comment
type: QuestionComment
has text: hi, I read some guides on how to do it, but I wrote it my self, I am open to all suggestions for improvements. The reason I compare the characters one at a time is to ensure that the operation always takes the same amount of time in order to protect against timing attacks
comment on: http://stackoverflow.com/q/26083231
score: 0

http://stackoverflow.com/q/26151058
has comment: http://stackoverflow.com/comment/40999466
score: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/40994249
has answer: http://stackoverflow.com/a/26151168
type: Question
has answer: http://stackoverflow.com/a/26151594
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40994186
has comment: http://stackoverflow.com/comment/40994523
has body: Is it possible to write a jQuery selector that only selects the first element that matches the criteria and stops there? I am aware of the not-so-performant :first selector and the better .first() call, but both appear to select all the elements and then only return the one at position [0]. Let's say I have 100 rows in a table and I need to do something to all of them. They don't have IDs, but rather a data-guid attribute with a unique value. Here's an example with a list: A B C D . var data = [ {guid: "guid_1", new_value: "I"}, {guid: "guid_2", new_value: "II"}, {guid: "guid_3", new_value: "III"}, {guid: "guid_4", new_value: "IV"} ]; var $ol = $('#list'); for (var i = 0; i < data.length; ++i) { $('li[data-guid="' + data[i].guid + '"]', $ol).text(data[i].new_value); } Unfortunately, this would run through each element 100 times, making the total DOM iterations reach 10,000. In reality, since GUIDs are unique, it should run through the first element 100 times and the last one only once, making it run 5,050 times. I guess I'm wondering if there's a way to treat it like an ID selector, where it stops when it finds an element that meets the criteria and then breaks out of the loop. -- squint's Solution (if my interpretation is correct) var data = [ {guid: "guid_1", new_value: "I"}, {guid: "guid_2", new_value: "II"}, {guid: "guid_3", new_value: "III"}, {guid: "guid_4", new_value: "IV"} ]; // Hashmap in case array is not the same order as list items, look up by GUID var hashmap = {}; for (var i = 0, l = data.length; i < l; ++i) { hashmap[data[i].guid] = data[i]; } var $ol = $('#list'); $('li[data-guid]', $ol).text(function () { var item = hashmap[$(this).attr('attr-guid')]; return item ? item.new_value : 'N/A'; });
answer count: 2
tagged with: css-selectors
has comment: http://stackoverflow.com/comment/40994348
has comment: http://stackoverflow.com/comment/40999185
has comment: http://stackoverflow.com/comment/40997802
has comment: http://stackoverflow.com/comment/40994293
favorite count: 0
has comment: http://stackoverflow.com/comment/40994188
upvote count: 2
type: UnansweredQuestion
has title: jQuery - Select only the first element that matches for performance
tagged with: performance

http://stackoverflow.com/q/26109649
answer count: 2
tagged with: knex.js
tagged with: heroku
tagged with: javascript
type: UnansweredQuestion
has title: Connecting Postgres Heroku with Knex not working
score: 6
has answer: http://stackoverflow.com/a/26304562
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/61160059
tagged with: postgresql
type: Question
upvote count: 6
tagged with: node.js
has body: We're having difficulty setting up a Heroku/Postgres database with Knex running our queries. We've set up our heroku/postgres db and created our tables, but we're having difficulty connecting to it with Knex. To make matters worse, there's almost no documentation on connecting Heroku/Postgres with Knex or any ORM so trying to figure this stuff out has been a real pain. These are the connection patterns that I've tried. var knex = require('knex')({ client: 'pg', connection: { user: username, password: password, host: host, port: port, database: database, ssl: true } } }); And... Note the ssl true was toggle and removed all together to no avail. var knex = require('knex')({ client: 'pg', connection: HEROKU_POSTGRESQL_COLOR_URL, ssl: true } }); We've also tried this pattern as well: var pg = require('knex')({ client: 'pg', connection: HEROKU_POSTGRESQL_COLOR_URL }); We haven't yet pulled down a copy of our localdb, so every test we run is basically a git commit. We're basically testing an insert query on a GET request to our root (index.html) page. So on any get request to the main page, it should insert something into our waterrates table. If I switch it from insert to select, it returns an object but you can't actually see any of the data in the object. The inserts we're attempting to use are: knex.select('*').from('waterrates').then(function(rows){ return rows; }); knex('waterrates').insert({name: 'pleeeaseee work'}, {rate: 100}).then(function(rows){ console.log(rows); }) knex.select(). We're actually uncertain where the error could be as attempting to connect doesn't yield any errors. It's probably something silly, but we have no idea where/how to troubleshoot this. Any help would be greatly appreciated! Thanks, B

http://stackoverflow.com/q/26185819
type: UnansweredQuestion
type: Question
tagged with: indexeddb
upvote count: 2
tagged with: offline-storage
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26189529
favorite count: 0
has body: Is there anything like ondelete event handler, or way to warn user before they want to clear the indexedDB database. Background: There is a offline first app, that works by saving most of the data on indexedDB while offline. Now, when the user goes online, it tries to sync the data to the server, but, now, if someone mistakenly resets browser or clears the indexedDB, they might create a disaster, since they have important data that needs to sync to server. So, is there any way to overcome this problem? Is there a way to save indexedDB as a persistent file system or disable deletion or raise an event and handle properly when there is a deletion?
has title: Is there a way to execute a function when user tries to delete an indexedDB database?
tagged with: http://stackoverflow.com/tag/html
score: 2
downvote count: 0

http://stackoverflow.com/comment/40809022
type: Comment
comment on: http://stackoverflow.com/a/26048542
type: AnswerComment
has text: I guess the thing to do then is encrypt it on the server just prior to storing it?
score: 0

http://stackoverflow.com/q/26073453
favorite count: 0
has body: I am learning GWT and to create a new project I call webappcreator with -templates sample,ant,eclipse,readme Using template sample is a great start, but the "sample" is very limited. Where can I find more templates like "sample"? I guess I am looking for a simple GWT code generator.
tagged with: gwt
type: AnsweredQuestion
score: 3
downvote count: 0
tagged with: java
type: Question
has title: Where can I find more GWT webappcreator templates?
answer count: 1
tagged with: javascript
upvote count: 3
has answer: http://stackoverflow.com/a/36316131
accepted answer: http://stackoverflow.com/a/36316131

http://stackoverflow.com/a/26143067
has body: I was able to fix this AJAX request problem by changing a few lines in the html and one line in the jQuery. Here are html changes: changed to: Delete Checked Documents Here is the one jQuery change $("#frmDelFiles").submit(function(event) { changed to: $("button").click(function() { Now the AJAX request works fine in both IE and Firefox.
answers question: http://stackoverflow.com/q/26106352
score: 0
type: Answer

http://stackoverflow.com/comment/40935622
score: 0
type: Comment
has text: Sorry Alex G. I corrected my code above. I am using tblData in the function
type: QuestionComment
comment on: http://stackoverflow.com/q/26119668

http://stackoverflow.com/comment/41042377
type: Comment
has text: Hmm, I assume the concern is merging changes? Breeze takes care of that. I just need to make sure each tab reads/writes to localstorage in the correct order.
comment on: http://stackoverflow.com/a/26144101
type: AnswerComment
score: 0

http://stackoverflow.com/q/26039412
has title: AngularJS - No Error but no view
has comment: http://stackoverflow.com/comment/40789809
type: Question
answer count: 1
tagged with: javascript
favorite count: 0
score: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26039689
has body: I'm making a project with angularJS and PHP. I've made some edit but now it do not work... The problems is that I've got no error in console and angular work (I can get it version) but my views are not displayed... Can you help to uderstand why ? Before I was getting serviceProvider error but I don't know if I fix it because no I'm stuck with this problems and I really don't know why... Here is my app.js 'use strict'; var app = angular.module('MyApp', ['ngRoute']); app.factory('services', ['$http', function($http) { var serviceBase = '/services/'; var obj = {}; obj.getConseils = function(){ return $http.get(serviceBase + 'conseils'); }; obj.getConseil = function(conseilID){ return $http.get(serviceBase + 'conseil?id=' + conseilID); }; obj.getRoulottes = function(type, marque, dimension, couche, prix){ return $http.get(serviceBase + 'roulottes?type=' + type + '&marque=' + marque + '&dimension=' + dimension + '&couche=' + couche + '&prix=' + prix); }; obj.getRoulotte = function(roulotteID){ return $http.get(serviceBase + 'roulotte?id=' + roulotteID); }; return obj; }]); /** * @ngdoc overview * @name MataneCaravaneGoApp * @description * # MataneCaravaneGoApp * * Module principal de l'application */ app.config(function ($routeProvider) { $routeProvider .when('/', { title: 'Accueil', templateUrl: 'views/main.html', controller: 'MainCtrl' }) .when('/conseils', { title: 'Nos conseils', templateUrl: 'views/conseils.html', controller: 'ConseilsCtrl' }) .when('/conseil/:conseilID', { title: 'Conseil', templateUrl: 'views/conseil.html', controller: 'ConseilCtrl' }) .when('/roulottes/type/:type/marque/:marque/dimension/:dimension/couche/:couche/prix/:prix', { title: 'Roulottes', templateUrl: 'views/roulottes.html', controller: 'RoulottesCtrl' }) .when('/roulottes/type/:type', { title: 'Roulottes', templateUrl: 'views/roulottes.html', controller: 'RoulottesCtrl' }) .when('/roulotte/:roulotteID', { title: 'Roulotte', templateUrl: 'views/roulotte.html', controller: 'RoulotteCtrl' …
accepted answer: http://stackoverflow.com/a/26039689
upvote count: 1
tagged with: php
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40790544

http://stackoverflow.com/comment/40974060
has text: I found this post http://stackoverflow.com/questions/26046373/iframe-scrolling-ios-8 with the same problem, but with no solution yet
comment on: http://stackoverflow.com/q/26117642
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26144021
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26143562
has body: You can use .wrap(). $('[data-hint]').each(function() { $(this).prev('label').addBack().wrap('&lt;div&gt;'); }); This will run through each element that has a data-hint attribute, while iterating them, it will add the accompanying label to the stack of selected elements, and wrap them both with a div. You can add attributes to that div to change it to your liking.
has comment: http://stackoverflow.com/comment/40981984

http://stackoverflow.com/comment/40928342
has text: made your updates despite syntax error. updated my question with update 2.
comment on: http://stackoverflow.com/a/26110842
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/42421180
comment on: http://stackoverflow.com/a/26870113
score: 0
type: Comment
has text: the jsfiddle above directly fetches ol.js v3.0.0 from http://openlayers.org/en/v3.0.0/build/ol.js - as could be seen based on the fiddle, .clear() on the vector source for some reason does not actually remove the visible polygon from the map - am I doing something silly? EDIT: Yes, I am :) I have featureOverlay set to the instance of a map.. D'Oh! Thanks guys!
type: AnswerComment

http://stackoverflow.com/q/26128150
has comment: http://stackoverflow.com/comment/40952022
answer count: 1
has answer: http://stackoverflow.com/a/26128325
type: UnansweredQuestion
has body: I have the follwoing JSON model. var oModel = new sap.ui.model.json.JSONModel({ "people": { "a": { "name": "csr", "number": 1 }, "b": { "name": "abc", "number": 2 } } }); and I want oModel to get binded to sap.m.List . ex: new sap.m.List("asd") .placeAt('content') .setModel(oModel) .bindItems("/people", blah blah ...) Problem: I see I can only bind arrays, i.e if people is array, List is getting binded fine...,but how to bind an object and loop through object ?????
tagged with: sapui5
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: How to bind Aggregate a list to Object rather than array in a JSON model?
tagged with: javascript
score: 0

http://stackoverflow.com/a/26143697
score: 3
upvote count: 3
has body: You must add two conditionals validations for those text fields. Set field template as required, but leave it "Is Required" as "No". Add a validation for each field and make it "Conditional" setting it condition type to "Value of Item / Column in Expression 1 = Expression 2". On "Expression 1" set your select Name and "Expression 2" to desired value. Add Condition Validation Level Validation Type Condition
accepted answer of: http://stackoverflow.com/q/26120323
answers question: http://stackoverflow.com/q/26120323
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/85129731
has text: thanks so much... i needed this.. i figured there was scope and so the memory references would be different. .. guess not. Thanks for this solution :)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26100485

http://stackoverflow.com/q/26123053
downvote count: 0
tagged with: jquery
possible better answer: http://stackoverflow.com/a/42523843
favorite count: 0
tagged with: css
tagged with: datatable
type: AnsweredQuestion
tagged with: twitter-bootstrap
score: 1
has answer: http://stackoverflow.com/a/42523843
upvote count: 1
has answer: http://stackoverflow.com/a/26123455
accepted answer: http://stackoverflow.com/a/26123455
type: Question
has title: Can't get Datatables integrates with Bootstrap 3
tagged with: javascript
has body: I'm trying to get TB3 integrated with DataTables as this example show but I can't get it at all as you may see on the attached pic. What's not working? The select element hasn't TB class applied, also the same with search box and finally the previous|next buttons. The only thing I do it here is add the dataTableBootstrap.js script and the dataTableBootstrap.css styles, the rest is a common TB3 table markup: Tipo de Trámite No. Solicitud Tipo de Solicitud Estado Fecha Acciones ... something goes here If I debug the page through Chrome I can see this errors in the console: Uncaught TypeError: Cannot read property 'pageButton' of undefined dataTables.bootstrap.js:38 Is the plugin/script outdated or I'm missing something here? Any help or advice?
answer count: 2

http://stackoverflow.com/q/26171386
upvote count: 2
downvote count: 1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26171397
accepted answer: http://stackoverflow.com/a/26171401
has answer: http://stackoverflow.com/a/26171397
score: 1
has title: Shorthand for calling a function with an argument more than once in JavaScript/jQuery?
type: Question
answer count: 2
tagged with: function
has body: I have a function with an argument, e.g: function doThisThing(toThis){ // some function } So far I've been calling the function multiple times with different arguments like this: doThisThing ( bananas ); doThisThing ( apples ); doThisThing ( pears ); Is there a way of doing this more succinctly? I've tried things like doThisThing ( bananas, apples, pears ); and so on, but to no avail...
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26171401
favorite count: 0

http://stackoverflow.com/comment/41046175
type: AnswerComment
score: 0
has text: @NietDarkAbsol Have you any technologies to propose? I have to say I am novice in web development. I'm used to Java backend development.
type: Comment
comment on: http://stackoverflow.com/a/26178972

http://stackoverflow.com/a/26114555
has comment: http://stackoverflow.com/comment/85941755
type: Answer
answers question: http://stackoverflow.com/q/26114277
accepted answer of: http://stackoverflow.com/q/26114277
has body: <?php echo $html; ?>
upvote count: 38
has comment: http://stackoverflow.com/comment/51828054
type: AcceptedAnswer
downvote count: 0
score: 38

http://stackoverflow.com/comment/40870298
score: 0
type: Comment
type: QuestionComment
has text: I tried that, in that case in javascript it returns response.valid = "undefined" and in response.d = "{ "valid": true }"
comment on: http://stackoverflow.com/q/26075028

http://stackoverflow.com/a/26146875
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26146753
answers question: http://stackoverflow.com/q/26146753
type: Answer
score: 1
has body: I wrote pretty much the same answer as @thefoureye, but instead I am using an object to store the results. var result = yourArray.reduce(function(acumulator, current) { var values = current.split('\t'); acumulator.products.push(values[0]); acumulator.prices.push(values[1]); return acumulator; }, { products: [], prices: [] }) console.log(result.products, result.prices); Another way (maybe simpler) var array1 = [], array2 = []; yourArray.forEach(function(item) { var values = item.split('\t'); array1.push(values[0]); array2.push(values[1]); });
upvote count: 1

http://stackoverflow.com/comment/41002850
comment on: http://stackoverflow.com/q/26096581
has text: I have do some research on it, and i know at this moment that the error means that its not collecting any data in the range, i have to find a way to extract the data from the json into the spreadsheet.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26146068
has comment: http://stackoverflow.com/comment/40987356
has comment: http://stackoverflow.com/comment/40986097
has comment: http://stackoverflow.com/comment/40999467
has comment: http://stackoverflow.com/comment/40984917
accepted answer of: http://stackoverflow.com/q/26145953
has body: You need to include the image in the a-tag. And add href attribute like: Twitter EDIT: Because of the conversation below: Twitter and in your CSS it has to look like this: .icon_3 { display: block; background-image: url('ebab_mbur9s_ico_2.png'); background-repeat: no-repeat; background-position: center 28px; height: 100%; } It is necessary to use display: block; because an anchor is an inline element basically. Do this with all your icon classes. You may have to edit the actual background position.
has comment: http://stackoverflow.com/comment/41022464
has comment: http://stackoverflow.com/comment/40986872
answers question: http://stackoverflow.com/q/26145953
has comment: http://stackoverflow.com/comment/40986485
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40984736
has comment: http://stackoverflow.com/comment/41011739
has comment: http://stackoverflow.com/comment/41008583
type: Answer
has comment: http://stackoverflow.com/comment/40984970
has comment: http://stackoverflow.com/comment/41011242
has comment: http://stackoverflow.com/comment/40986036
has comment: http://stackoverflow.com/comment/41004030
has comment: http://stackoverflow.com/comment/41011142

http://stackoverflow.com/a/26164296
type: Answer
accepted answer of: http://stackoverflow.com/q/26163800
has body: SIGINT is generally triggered after a user-invoked shutdown (e.g. Ctrl+C). Assuming pm2 is triggering an abrupt shutdown then SIGINT won't be triggered. Instead, you should listen for the termination signal SIGTERM which should cover both scenarios process.on('SIGTERM', function() { // clean up });
downvote count: 0
type: AcceptedAnswer
score: 8
answers question: http://stackoverflow.com/q/26163800
upvote count: 8

http://stackoverflow.com/q/26133437
has body: I am using bootstrap-3, collection-fs and iron-router. I have successfully created a download button before, but since upgrading to iron-router version 1.0.0-pre2, I have not been able to successfully replicate the download button. Download where this.url provides the url to the file. However iron-router tries to route the entire app to the file location rather then downloading the file. Any thoughts?
score: 0
answer count: 1
tagged with: meteor
has title: Download File Link using iron-router version 1.0.0-pre2
tagged with: iron-router
linked to: http://stackoverflow.com/q/21565991
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26135091
accepted answer: http://stackoverflow.com/a/26135091
tagged with: javascript

http://stackoverflow.com/q/26190706
answer count: 3
score: 2
has body: I am new to web development , and here I know that the problem is very minor but even after two days I a m not able to find it. Could you people look at this code and point out my mistake please my code id here @ JSFiddle thanks HTML Signup JS $(document).ready(function () { $('.registerForm').bootstrapValidator({ message: 'This value is not valid', feedbackIcons: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, fields: { email: { validators: { notEmpty: { message: 'The email is required and cannot be empty' }, emailAddress: { message: 'The input is not a valid email address' } } }, pass1: { validators: { identical: { field: 'pass2', message: 'The password and its confirm are not the same' } } }, pass2: { validators: { identical: { field: 'pass1', message: 'The password and its confirm are not the same' } } } } }); });
has comment: http://stackoverflow.com/comment/41067910
downvote count: 0
tagged with: jqbootstrapvalidation
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
upvote count: 2
type: Question
has answer: http://stackoverflow.com/a/26190757
has answer: http://stackoverflow.com/a/55443380
has comment: http://stackoverflow.com/comment/41067891
tagged with: javascript
tagged with: jquery
has title: Why is BootstrapValidator not working?
has answer: http://stackoverflow.com/a/26430268

http://stackoverflow.com/q/26055142
tagged with: javascript
has answer: http://stackoverflow.com/a/26106256
favorite count: 0
tagged with: navigation-properties
has body: Is it possbible to call loadNavigationProperty with expanding the entities? Something like: myGarage.entityAspect.loadNavigationProperty('car.wheels'); Or is this only possible with a new query?
tagged with: breeze
type: AnsweredQuestion
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/39520875
accepted answer: http://stackoverflow.com/a/26106256
has answer: http://stackoverflow.com/a/39520875
has title: Breeze.js loadNavigationProperty with expand
type: Question
answer count: 2
upvote count: 1

http://stackoverflow.com/a/26091548
has comment: http://stackoverflow.com/comment/40885749
score: 0
answers question: http://stackoverflow.com/q/26091474
type: Answer
has body: $('#tblbahan tr').last().after(function(){ $.ajax({ url: "test.php"//php page url }).done(function(data) { console.log(data); }); } } )

http://stackoverflow.com/a/26121327
type: Answer
has comment: http://stackoverflow.com/comment/40940482
has body: You can use .filter() against each tags html whether its text is "Related Topics" $("*").filter(function() { return $(this).html() == "Related Topics"; }).css("text-decoration", "underline"); Demo
accepted answer of: http://stackoverflow.com/q/26121241
answers question: http://stackoverflow.com/q/26121241
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40940083
score: 0
downvote count: 1
has comment: http://stackoverflow.com/comment/40940408

http://stackoverflow.com/comment/40876592
type: AnswerComment
score: 0
type: Comment
has text: @Puibo: I'm afraid that's not clear. If you give an example of what you want to do, I can show you how to do it. If you want to use `X` in other functions, you can; they'll see its value as of when they run. If they run before the event handler fires, they'll see `0`; if they run after it fires, they'll see the value assigned by the event handler. The issue is timing.
comment on: http://stackoverflow.com/a/26086791

http://stackoverflow.com/q/26079183
linked to: http://stackoverflow.com/q/4797286
favorite count: 0
has title: Finding Mode in Javascript
has answer: http://stackoverflow.com/a/50127909
has answer: http://stackoverflow.com/a/50128067
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/26079265
linked to: http://stackoverflow.com/q/2125066
has comment: http://stackoverflow.com/comment/40862982
type: Question
tagged with: object
has body: I am having a difficult time with my code. I am working on a coderbyte problem and one part of the challenge is to find the mode of an array of numbers. So my first step I think is to create an object with numbers and their frequency. Here's what I have so far: arr = [1,1,1,6,2,3,4]; mapping = {}; counter = 0 for(var i = 0;i &lt; arr.length; i++){ mapping[arr[i]] = 0; if(arr[i] == mapping[i.toString]) mapping[i.toString] += 1 } mapping but this is giving me { '1': 0, '2': 0, '3': 0, '4': 0, '6': 0 } Any ideas?
tagged with: arrays
has answer: http://stackoverflow.com/a/26079265
tagged with: javascript
possible better answer: http://stackoverflow.com/a/50127909
upvote count: 3
answer count: 3
downvote count: 0

google-oauth
type: Tag
tags question: http://stackoverflow.com/q/26140533
tag name: google-oauth

http://stackoverflow.com/a/26171841
downvote count: 0
type: Answer
has body: Finally found the issue. Source of answer can be found here. According to him(Calendee), dot notation and prototypal inheritance should be observed always. So I updated my view into the ff: &lt;input type="range" min="0" ng-model="data.seek" ng-change="seeked();" max="{{max}}" value="{{data.seek}}"&gt; Then on my controller: app.controller('PlayerController', function($timeout, $scope, audio) { //init vars $scope.data = {}; //triggered by ngChange to update audio.currentTime $scope.seeked = function(){ audio.currentTime = this.data.seek; }; $scope.updateUI = function(seek, max){ $scope.max = max; $scope.data.seek = seek; }; audio.addEventListener('timeupdate', function(){ seek = audio.currentTime; max = audio.duration; //did a little change here by using $timeout $timeout(function(){ $scope.updateUI(seek, max) }, 0); }); } Additional references can be found here.
score: 1
accepted answer of: http://stackoverflow.com/q/26167671
upvote count: 1
answers question: http://stackoverflow.com/q/26167671
type: AcceptedAnswer

http://stackoverflow.com/comment/41061204
has text: Ok, so now point the AJAX form to a dummy PHP page containing: `<?php var_dump($_POST, $_SERVER['REQUEST_METHOD'], file_get_contents('php://input')) ?>`. What's the result? PS: you need to tag me in comments, by writing @ + Qualcuno
type: QuestionComment
comment on: http://stackoverflow.com/q/26186765
score: 0
type: Comment

http://stackoverflow.com/a/26154474
type: Answer
accepted answer of: http://stackoverflow.com/q/26152478
score: 0
answers question: http://stackoverflow.com/q/26152478
has body: Following the OP design, a simple approach to refresh only the component is by getting it from the view and calling rerender on that. To get the component from the view just add a viewName. For example, hbs ....{{form-error errors=fooErrors foo=model field="fooId" viewName="theErrorsCmp"}} js export default Ember.View.extend({ errorsChanged: function() { //if this fires for some reason at the very beginning before the view has been inserted to the DOM and the component is not yet available then just check before using it, i.e. uncomment the following line //if(!Em.isEmpty(this.get("theErrorsCmp"))) this.get("theErrorsCmp").rerender(); }.observes('controller.fooErrors') });
type: AcceptedAnswer

http://stackoverflow.com/comment/40911767
has text: var b = function(){ } is totally different from function b(). Function expression won't be hoisted while function declaration will be.
comment on: http://stackoverflow.com/a/26095460
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26183798
has body: You can do this by many possible way. What I recommande you is to add class to your images like so: HTML &lt;img class="logo1 hidden london" src="image1"/&gt; &lt;img class="logo1 hidden manchester" src="image2"/&gt; CSS .hidden{display:none} **JS* if (venue == "london"){ $('.london').removeClass('hidden'); } else if (venue == "Manchester") { $('.manchester').removeClass('hidden); }
answers question: http://stackoverflow.com/q/26183712
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/41055097

http://stackoverflow.com/comment/41040172
type: AnswerComment
comment on: http://stackoverflow.com/a/26175497
type: Comment
has text: the code from above is all my code, i just added now the code for pagination, now in the question is the full code that am using, please could u help me? @aSeptik
score: 0

http://stackoverflow.com/comment/40864260
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26079868
type: Comment
has text: Man I'm too soft, need to stop answering questions like this

http://stackoverflow.com/a/26044986
has comment: http://stackoverflow.com/comment/40800068
score: 0
has comment: http://stackoverflow.com/comment/40800254
answers question: http://stackoverflow.com/q/26044299
type: Answer
has body: Change "onDomReady" to "no wrap - in head" in the left panel "Frameworks &amp; Extensions" panel Also, in your module call, you want to pass a second parameter, an array containing all of your module's dependencies. In your case, an empty array [] angular.module('mymailApp',[]).controller(...) Without the second parameter, it assumes you are trying to extend an existing module, not define a new one. Updated your fiddle: http://jsfiddle.net/z2bvx2oh/11/
has comment: http://stackoverflow.com/comment/40800133

http://stackoverflow.com/comment/41025289
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26167798
has text: Why you put input values assign into `parseFloat`?

http://stackoverflow.com/a/26098963
has body: This will work fine for setting value $("#checkkBoxId").prop("checked") ? ($("#checkkBoxId").val(1)) : ($("#checkkBoxId").val(0));
type: Answer
answers question: http://stackoverflow.com/q/26098816
score: 0

http://stackoverflow.com/q/26057349
has comment: http://stackoverflow.com/comment/40822216
has comment: http://stackoverflow.com/comment/40822368
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26057599
downvote count: 1
type: Question
has title: How to expand ul and li in jquery manually
has body: I want to expand li inside ul manually in jquery. my HTML A S T V B G H J C O P Q //how to expand ul inside li manually
has comment: http://stackoverflow.com/comment/40822133
has answer: http://stackoverflow.com/a/26058960
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40822213
answer count: 2
upvote count: 0

http://stackoverflow.com/a/26082699
has comment: http://stackoverflow.com/comment/40870451
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26082474
score: 1
has comment: http://stackoverflow.com/comment/40869692
has body: Edit, Updated Try var boxids = $('.outerbox').map(function() { return [[$.trim($(".text + *", this)[0].innerText), this.id]] ; }).get(); var boxids = $('.outerbox').map(function() { return [[$.trim($(".text + *", this)[0].innerText), this.id]] ; }).get(); $("body").text(boxids); console.log(boxids); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div class="outerbox" id="12345"&gt; &lt;div class="headerbox" id="title12345"&gt; &lt;div class="text"&gt;&amp;nbsp;&lt;/div&gt; &lt;h2&gt;Foo Bar &lt;/h2&gt; &lt;/div&gt; &lt;div class="outerbox" id="67890"&gt; &lt;div class="headerbox" id="title678905"&gt; &lt;div class="text"&gt;&amp;nbsp;&lt;/div&gt; &lt;h2&gt;bar foo &lt;/h2&gt; &lt;/div&gt;
upvote count: 1
has comment: http://stackoverflow.com/comment/40870499
accepted answer of: http://stackoverflow.com/q/26082474

http://stackoverflow.com/q/26038681
tagged with: http://stackoverflow.com/tag/html
has title: JQuery fadeTo()
tagged with: css
accepted answer: http://stackoverflow.com/a/26038797
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/26038808
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26038808
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40787945
has comment: http://stackoverflow.com/comment/40787926
has answer: http://stackoverflow.com/a/26038797
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I got this code so far: $(window).scroll(function() { if ($(this).scrollTop() &gt; 400) { $( ".top-bg" ).fadeTo("slow", 0.99); } The idea is a menu with low opacity and when I scroll down, it fades in but the problem is that I can't bring it back to low opacity (0.7) when I scroll back up to &lt;400. I have been searching around and I didn't find my solution. Any idea? Thanks in advance.
score: 0

http://stackoverflow.com/q/26115004
favorite count: 0
type: UnansweredQuestion
has body: I've a little problem with jQplot. I'm trying to do a DateAxisRenderer like this : http://tinyurl.com/p8v5coh And i've this : http://tinyurl.com/qd2lbxh I don't want to make a rotation on my test. I just want to input a line break between my hour and my date. There is my code : var plot1 = $.jqplot('chart1', [test2], { title:'Plot to test JQPLOT', legend: { show: true, placement: 'outsideGrid' }, axesDefaults: { tickRenderer: $.jqplot.CanvasAxisTickRenderer, tickOptions: { angle: 0, fontSize: '10pt' } }, axes: { xaxis: { label: "X Axis", renderer:$.jqplot.DateAxisRenderer, tickOptions: { formatString: '%H %#.2f %n %#.2f %#d-%#m-%Y', }, //min:'June 16, 2008 8:00AM', tickInterval:'14400000', }, yaxis: { label: "Y Axis", renderer: $.jqplot.LogAxisRenderer, tickOptions: { angle: 0 } } }, highlighter: { show: true, sizeAdjust: 20, }, cursor:{ show: true, zoom: true, showTooltip:false }, series:[{showMarker:false}], }); As you can see, i've tried '%n' as it's write in the [official doc][1]. I think it's idiot, but I can't solve this problem myself. The line break doesn't work. Can you show me the right way? Ty jqplot.com/docs/files/plugins/jqplot-dateAxisRenderer-js.html
tagged with: jqplot
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26121318
tagged with: javascript
has title: jQplot formatString "%n"
answer count: 1
downvote count: 0

http://stackoverflow.com/q/26129552
score: 0
has comment: http://stackoverflow.com/comment/40976652
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40954906
has comment: http://stackoverflow.com/comment/40993340
tagged with: css
answer count: 0
type: UnansweredQuestion
has title: Drop-down arrow and expand/collapse option
has body: I am having a really hard time trying to add 3 simple things to my current page: A visual cue like a sideways triangle to show if the list is currently collapsed or expanded Within the same structure (list + triangle) an extra dotted line treemap visual aid for a upcoming resources column like this A decent good working expand all and collapse all toggle like link/button. The "gueto" solution implemented was not approved as it does not always collapse all or expand all (*it really just toggle all div), the one below lacks consistency.. The sample: http://jsfiddle.net/brunorl/kL70z8ky/7/ : /*toggle to expand/collapse all description items*/ $("a.listexpand").on('click', function () { $('div.descriptions').slideToggle(600).toggleClass('active'); }); Thanks a bunch, -b
tagged with: javascript
type: Question

http://stackoverflow.com/comment/40903506
comment on: http://stackoverflow.com/a/26101621
score: 0
type: AnswerComment
has text: This is a decent solution however it breaks if I have more than one substep. That said my question does only allow for two sub-steps, so I suppose it'll do :p
type: Comment

http://stackoverflow.com/comment/40802466
type: AnswerComment
comment on: http://stackoverflow.com/a/26044984
type: Comment
has text: @trevordmiller well, as posted in other comments, you could just change your iteration order: `for (var i = passedArray.length-1; i >=0; i--) {`
score: 1

http://stackoverflow.com/q/26088145
has comment: http://stackoverflow.com/comment/40879354
has comment: http://stackoverflow.com/comment/40879332
type: Question
has answer: http://stackoverflow.com/a/32991947
tagged with: javascript
tagged with: jquery
upvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/54290466
has comment: http://stackoverflow.com/comment/40880240
favorite count: 0
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Keep jquery dropdown menu open after opening another page of website
has body: I have a dropdown menu by mouse click. When I click on the some "dropdown link", another page of my website is opening but the menu is closed. I need to keep it open and actual "dropdown link" should be shown in bold. Here is an example of what I have http://jsfiddle.net/dmitry313/dfgjx22j/1/ HTML: Click me 1 Dropdown link Dropdown link Click me 2 Dropdown link Dropdown link Here I have a redirect to another page of website: Dropdown link AJAX: $(document).ready(function(){ var toggleClick = function(){ var divObj = $(this).next(); var nstyle = divObj.css("display"); if(nstyle == "none"){ divObj.slideDown(false,function(){ $("html").bind("click",function(){ $("html").unbind("click"); }); }); } else { divObj.slideUp(true,function(){ $("html").bind("click",function(){ $("html").unbind("click"); }); }); } }; $(".clickme").click(toggleClick); }); Thanks for any help!
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/32991947
downvote count: 0

http://stackoverflow.com/q/26117306
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26117358
upvote count: 2
has answer: http://stackoverflow.com/a/26117358
has answer: http://stackoverflow.com/a/26117502
has comment: http://stackoverflow.com/comment/42128925
tagged with: jquery
favorite count: 0
answer count: 5
accepted answer: http://stackoverflow.com/a/26117413
tagged with: http://stackoverflow.com/tag/html
has body: function Myfunc(obj1) { alert(obj1.prop('outerHTML')); } Value 1 Value 2 Value 3 I have the above two snippets. When i do alert of the object i get the complete <select&tg; tag along with all it's options. But, What i want is the object passed should only just be the option which i have selected and not the complete select element block.
has title: Call a javascript function from select element in HTML
has answer: http://stackoverflow.com/a/26117475
has answer: http://stackoverflow.com/a/26117433
type: AnsweredQuestion
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/26117413
type: Question

http://stackoverflow.com/q/26188802
has title: Duck Typing: Translating Ruby Code into Javascript Utilizing Duck Typing
has comment: http://stackoverflow.com/comment/41067805
has comment: http://stackoverflow.com/comment/41065024
has answer: http://stackoverflow.com/a/26191754
type: AnsweredQuestion
tagged with: oop
score: 1
tagged with: duck-typing
has comment: http://stackoverflow.com/comment/41064643
type: Question
linked to: http://stackoverflow.com/q/12762550
has comment: http://stackoverflow.com/comment/41065048
has body: This is an example from the Practical Object-Oriented Design in Ruby book. I am interested in translating this ruby code into javascript to have a better understanding of duck-typing in JS. Can anyone help translate this code to clarify how best to write this in Javascript or at least help get me started? The trip class here is acting as the interface to the other classes (Mechanic, Trip_Coordinator, Driver). Where the prepare method in the class Trip uses the Duck type preparer. class Trip attr_reader :bicycles, :customers, :vehicle def prepare(preparers) preparers.each {|preparer| preparer.prepare_trip(self)} end end class Mechanic def prepare_trip(trip) # Does something with trip.bicycles end end class Trip_Coordinator def prepare_trip(trip) # Does something with trip.customers end end class Driver def prepare_trip(trip) # Does something with trip.vehicle end end Update: I have added code that I believe is a possible translation of the Ruby code above. However, when I run the code I get the following output and error: mountain 2 jeep /home/ubuntu/user/tests/trip.js:3 preparer.prepare_trip(this) TypeError: Object [object Object] has no method 'prepare_trip' Advice or suggestions would be appreciated to further improve the understanding of duck-typing in JS. Javascript Code: var Trip = function(preparers){ return preparers.forEach(function(preparer){ preparer.prepare_trip(this) } )}; var Mechanic = function(trip){ // does something with trip.bicycles prepare_trip: console.log(trip.bicycles); }; var TripCoordinator = function(trip){ //does something with trip.customers prepare_trip: console.log(trip.customers); }; var Driver = function(trip){ //does something with trip.vehicle prepare_trip: console.log(trip.vehicle); }; // customer wants to go on a trip for two and needs a car var planA = { bicycles: "mountain", customers: 2, vehicle: "jeep" }; //customer wants to go a trip for one and only ride a bike var planB = { bicycles: "road", customers: 1 }; Trip([new Mechan…
has comment: http://stackoverflow.com/comment/41065168
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26191754
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ruby
has comment: http://stackoverflow.com/comment/41065052
upvote count: 1

http://stackoverflow.com/comment/40923425
score: 0
type: AnswerComment
type: Comment
has text: Well I tested with "off", "OFF" and "oFF". All gave the same result. Anywho, no problem!
comment on: http://stackoverflow.com/a/26112335

http://stackoverflow.com/comment/41051700
has text: @BenjaminGruenbaum I always like reading your criticisms. I always learn something new. This impedance mismatch issue: it's only a problem when converting relations into objects if I am not mistaken. Does the same problem arise when you use [functional relational programming](https://github.com/papers-we-love/papers-we-love/blob/master/design/out-of-the-tar-pit.pdf)?
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26181105
score: 0

http://stackoverflow.com/q/26168950
has comment: http://stackoverflow.com/comment/41033335
tagged with: samsung-mobile
has answer: http://stackoverflow.com/a/27116456
score: 0
has comment: http://stackoverflow.com/comment/41028843
type: Question
tagged with: mobile
tagged with: firefox
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41033564
has body: I have a navigation menu that shows and hides on mobile devices when an element is clicked. It works everywhere except in Firefox on Samsung Galaxy 3. Here's the HTML: &lt;nav id="nav" role="navigation"&gt; &lt;ul&gt; &lt;li&gt;Menu Item 1&lt;/li&gt; &lt;li&gt;Menu Item 2&lt;/li&gt; Etc . . &lt;/ul&gt; &lt;/nav&gt; &lt;div id="nav-arrow"&gt;&amp;#9660;&lt;/div&gt; The element with the click event attached is "nav-arrow". Here is the jQuery: $("#nav-arrow").click(function() { if ($("#nav").is(":visible")) { $("#nav").slideUp(800, function() { $("#nav-arrow").html("&amp;#9660;"); }); } else { $("#nav").slideDown(800, function() { $("#nav-arrow").html("&amp;#9650;"); }); } }); The container is has a property of display:none until the nav-arrow is clicked. Can anyone help me get this working on Mobile Firefox?
has comment: http://stackoverflow.com/comment/41027729
linked to: http://stackoverflow.com/q/21776570
answer count: 1
has comment: http://stackoverflow.com/comment/41033312
has title: jQuery click event not working in mobile Firefox
type: UnansweredQuestion

http://stackoverflow.com/comment/40839894
score: 0
has text: Rhumborl, i really appreciate your sarcasm, seems to be working out for you
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26066463

http://stackoverflow.com/comment/40875061
comment on: http://stackoverflow.com/q/26085609
score: 0
has text: Maybe the search-page should switch templates when it encounters an error, but give normal results when there is no error. Are you using any kind of templating-framework on the web-site?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26112493
has comment: http://stackoverflow.com/comment/40942431
tagged with: nested-loops
tagged with: javascript
score: -1
has body: I am having trouble with this code and can not figure it out. It appears to add to "data" rather than to "ticket" from "data" like it should. Using code in Google Script function consolidate(){ var data = [[1,1,1,1,1,1],[1,1,1,1,1,1],[1,2,1,2,1,2],[1,2,1,2,1,2],[1,1,1,1,1,1],[1,2,1,2,1,2],[1,1,1,1,1,1],[1,2,1,2,1,2],[1,2,1,2,1,2]]; var ticket = []; ticket[0] = data[0]; for(var x=0;x&lt;data.length;x++){ for(var i=0;i&lt;ticket.length;i++){ if(ticket[i][0]==data[x][0]&amp;&amp;ticket[i][1]==data[x][1]&amp;&amp;ticket[i][2]==data[x][2]&amp;&amp;ticket[i][4]==data[x][4]){ ticket[i][3]=ticket[i][3]+data[x][3]; ticket[i][5]=ticket[i][5]+data[x][5]; break; } } ticket[i]=data[x]; } } my result for data is [[1, 1, 1, 3, 1, 3], [1, 1, 1, 2, 1, 2], [1, 2, 1, 4, 1, 4], [1, 2, 1, 4, 1, 4], [1, 1, 1, 2, 1, 2], [1, 2, 1, 4, 1, 4], [1, 1, 1, 1, 1, 1], [1, 2, 1, 4, 1, 4], [1, 2, 1, 2, 1, 2]] but data should not change
answer count: 2
tagged with: for-loop
upvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40923222
type: UnansweredQuestion
has title: JavaScript Nested for showing wrong results
has answer: http://stackoverflow.com/a/26112639
has answer: http://stackoverflow.com/a/26124383
has comment: http://stackoverflow.com/comment/40923224
downvote count: 1
type: Question

http://stackoverflow.com/a/26144972
accepted answer of: http://stackoverflow.com/q/26144887
has comment: http://stackoverflow.com/comment/40983148
has comment: http://stackoverflow.com/comment/40985516
has comment: http://stackoverflow.com/comment/40982965
score: 0
has comment: http://stackoverflow.com/comment/40982857
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26144887
has body: In this particular line, results[index] = iteratee(obj[currentKey], currentKey, obj); iteratee will be actually called like this iteratee(&lt;actual value of obj[currentKey]&gt;, currentKey, obj); So, obj will not be passed on to the iteratee function. In your case, since you are passing an object as the first argument, on each and every iteration the results accumulation line would evaluate something similar to this results[0] = iteratee(1, "one", obj); results[1] = iteratee(2, "two", obj); results[2] = iteratee(3, "three", obj); iteratee = And when this line is executed, _.iteratee(iteratee, context); iteratee is actually the function you passed as one of the arguments to _.map. And since you are not passing a context object explicitly, by default, the value would be undefined. So, if (context === void 0) return func; check in the createCallback function will evaluated to true (since undefined == void 0), the function you actually passed to the _.map will be used as the call back function.
type: Answer
has comment: http://stackoverflow.com/comment/40984061
has comment: http://stackoverflow.com/comment/40982816

grover
tags question: http://stackoverflow.com/q/26180057
tag name: grover
type: Tag
tags question: http://stackoverflow.com/q/26186101

http://stackoverflow.com/a/26061114
type: Answer
has body: You should either set the controls and width property out of the loop or set these by video.setAttribute call before appending into '#Data' div. $('video') is targeting all video elements, so calling inside loop is trying to make unnecessary and wrong multiple binding $.each(data.reports, function(i, report) { var video = document.createElement("video"); video.setAttribute('src', 'friday.mp4'); video.setAttribute('type', 'video/mp4'); document.getElementById("Data").appendChild(video); }); $('video').prop("controls", true); $('video').prop("width", 400);
answers question: http://stackoverflow.com/q/26060666
score: 0

http://stackoverflow.com/a/26140557
downvote count: 0
type: AcceptedAnswer
has body: In javascript, an object can be access like that data.name, where name is the key, or like that data["name"] So you should do this $(this).val(data[name]); Instead of this $(this).val(data + "." + name); The first one is retrieving the value stored at the key name in the object data, while the second one is only writing text.
answers question: http://stackoverflow.com/q/26140503
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26140503
score: 1

http://stackoverflow.com/q/26169217
has answer: http://stackoverflow.com/a/26170081
upvote count: 0
has comment: http://stackoverflow.com/comment/41027977
type: Question
has title: Parse Javascript Variable
has comment: http://stackoverflow.com/comment/41028504
tagged with: javascript
has comment: http://stackoverflow.com/comment/41028411
score: -1
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/41028149
favorite count: 0
type: UnansweredQuestion
has body: I'm loading a JavaScript from an external URL: jQuery(document).ready(function () { if (HasFlash()) { EmbedViewerSwf( "/static/flash/CBV_2p645.swf", 'mia7777', 'edge33-b.stream.highwebmedia.com', '/xml/viewer.xml', '0', 'login_required_true_if_loggedin', '0' , "https://ssl-ccstatic.highwebmedia.com/flash/playerProductInstall.swf", 'mario4025', "$.mydefchatconn('join_group_show')", "$.mydefchatconn('spy_on_private')", 'registration_required()', '0', "https://ssl-ccstatic.highwebmedia.com/images/flashwatermark.png", "chaturbate.com", 'pbkdf2_sha256%2412000%242NlTeIelZxcU%24j9/x/yjBjRqHJkntlLjDUkBJkh1dEC7XR8sh78/4T2w%3D', 'd2278438db4d37ad094a07e221b30c89ff07627cd1b1732d2f298328a71e9985', '100', '100' ); } else { var html = "&lt;div id='still_video' style='display: none'&gt;"; html += "&lt;video id='still_video_object'"; html += "src='http://origin13.stream.highwebmedia.com:1935/live-origin/mia7777-sd-5fd38820138291f9bcf6baa6ac062829f12567166a09f34d50fd93de58a65c79_aac/playlist.m3u8'"; html += "width='498px' height='407px'"; html += "webkit-playsinline autoplay&gt;&lt;/video&gt;&lt;/div&gt;"; $('#still_video_container').html(html); $('#still_video').show(); } var userAgent = navigator.userAgent; if (!($.cookie('supress_bline')) &amp;&amp; userAgent.indexOf('bline') == -1 &amp;&amp; (userAgent.indexOf('iPhone') &gt;= 0 || userAgent.indexOf('iPod') &gt;= 0)) { $('#bline_notice').show(); } $('#dismiss_bline_notice').click(function(e) { e.preventDefault(); $('#bline_notice').hide(); $.cookie('supress_bline', 1, { expires: 30, path: '/' }); }); }); } How can I get the contents of the html variable declared in the code above (using PHP or JavaScript): html += "src='http://origin13.stream.highwebmedia.com:1935/live-origin/mia7777-sd-5fd38820138291f9bcf6baa6ac062829f12567166a09f34d50fd93de58a65c79_aac/playlist.m3u8'"; I tried it with document.getElementById and also by parsing the whole HTML on my site and then using document.writeln and getting out the variable, but I'm stuck…

http://stackoverflow.com/comment/41618758
type: QuestionComment
has text: maybe you're just not binding `validationMessage` to anything to see the extender working? Either way, just set breakpoints in your extender to see it being called, don't be afraid of developer tools :)
score: 0
comment on: http://stackoverflow.com/q/26156317
type: Comment

relative-path
type: Tag
tag name: relative-path
tags question: http://stackoverflow.com/q/26106072

http://stackoverflow.com/q/26140923
has answer: http://stackoverflow.com/a/26141885
type: Question
has title: Return a Javascript array to action
has answer: http://stackoverflow.com/a/26141033
has body: Here's my problem: i have a JS array that i want to pass it to an action and then render that action's View. this is my array and i fill it Using Jquery like so : var factorlist = []; factorlist.push({ ID: data.ID, Name: data.Name, number: data.number, SingelPrice: data.SingelPrice, TotalPrice: data.TotalPrice }) (data come from an AJAX Call) then i put a hidden input element in my page to put my array in it and send it with a submit. here is hidden input and submit button : &lt;input type="submit" id="input" name="input" /&gt; &lt;input type="hidden" id="list" name="list"/&gt; This is how i send it : $('form').submit(function (event) { $('#list').val(JSON.stringify(factorlist)); }); and this is the action that i'm sending the array to : public ActionResult PrePayment(List&lt;Order&gt; list) { return View(list); } and my order class : public class Order { public int ID { get; set; } public string Name { get; set; } public int number { get; set; } public float SingelPrice { get; set; } public float TotalPrice { get; set; } } **Now the thing is i get and empty list in action not null...what is the problem and is there any other way to do this? **
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26141033
score: 0
accepted answer: http://stackoverflow.com/a/26141430
answer count: 3
has comment: http://stackoverflow.com/comment/40976386
tagged with: asp.net
has comment: http://stackoverflow.com/comment/40976211
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26141430

http://stackoverflow.com/comment/40838860
type: AnswerComment
has text: Please limit your question to the exact problem at hand. Stack Overflow is not an interactive debugger. :) See [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve).
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26064843

http://stackoverflow.com/q/26109253
tagged with: karma-runner
upvote count: 2
tagged with: indexeddb
type: Question
tagged with: firefox
tagged with: javascript
has answer: http://stackoverflow.com/a/26109899
answer count: 1
downvote count: 0
has title: Is it possible to disable firefox error messages during karma tests
has body: I'm running tests with jasmine/karma and although all tests run ok, process exits with 1. I suspect that these are Firefox's web console error messages, which are produced when I try to add existing record into IndexedDB object store. Is there any option to disable these messages or ignore them in Karma runner? UPD: These errors occur in web console even if I wrap my code inside try..catch, so it's browsers default behaviour. https://travis-ci.org/1999/sklad/builds/36609101
tagged with: jasmine
favorite count: 0
type: UnansweredQuestion
score: 2

http://stackoverflow.com/comment/40856711
type: AnswerComment
comment on: http://stackoverflow.com/a/26070703
has text: @CharlesWood Yes! If you disable '#input3' using `.prop('disabled', true)`, the final check will return a `1` and not a `0`. You can see for yourself in the updated example - http://jsfiddle.net/aniketpant/kf7dve0h/1/
score: 0
type: Comment

http://stackoverflow.com/comment/40913817
comment on: http://stackoverflow.com/q/26107009
score: 0
type: Comment
type: QuestionComment
has text: @forgivenson `setTimeout` and `setInterval` are asynchronous client side and has nothing to do with sending a callback to the server... [This blog entry helped me understand it](http://ejohn.org/blog/how-javascript-timers-work/)

http://stackoverflow.com/q/26059274
has answer: http://stackoverflow.com/a/26059847
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: date
has body: I have a problem with date validation from database, some years in the date fields are incorrect (like 28.02.0302), i must validate them. I try some functions from web but they validate this date as valid. How to get them work? Here function that i tried: function isValidDate(d) { if ( Object.prototype.toString.call(d) !== "[object Date]" ) return false; return !isNaN(d.getTime()); } function isValidDate11(s) { // format D(D)/M(M)/(YY)YY var dateFormat = /^\d{1,4}[\.|\/|-]\d{1,2}[\.|\/|-]\d{1,4}$/; if (dateFormat.test(s)) { // remove any leading zeros from date values s = s.replace(/0*(\d*)/gi,"$1"); var dateArray = s.split(/[\.|\/|-]/); // correct month value dateArray[1] = dateArray[1]-1; // correct year value if (dateArray[2].length&lt;4) { // correct year value dateArray[2] = (parseInt(dateArray[2]) &lt; 50) ? 2000 + parseInt(dateArray[2]) : 1900 + parseInt(dateArray[2]); } var testDate = new Date(dateArray[2], dateArray[1], dateArray[0]); if (testDate.getDate()!=dateArray[0] || testDate.getMonth()!=dateArray[1] || testDate.getFullYear()!=dateArray[2]) { return false; } else { return true; } } else { return false; } }
type: Question
has comment: http://stackoverflow.com/comment/40826259
has title: inncorrect date validation when year like 'dd.mm.0302' or '27.08.0974' in JS
tagged with: validation
tagged with: javascript

http://stackoverflow.com/q/26185754
has body: In situations of storing sets of values, should objects really be used in Javascript? In this case, I don't see an advantage of using an object over using an array. Although logic dictates its only preference, I can't shake the feeling that there's something I don't see. Here is my example. Lets say we have have a bunch of cars, each car contains data with a specific format: { model: ''; color: ''; max_speed: ''; } And we have a few functions, for which the (somewhat terse) pseudo code is: function compareCarSpeeds(a, b){ if a is faster than b then return a else return b } function findFastestCar(){ loop through all cars and return car with greatest speed } The OOP way would be create an object for car, maybe convert compareCarSpeeds into a prototype. While the array way would be to create a 2D array, where one dimension is for the list of cars, and the second is for the set of data inside each car.
has comment: http://stackoverflow.com/comment/41058968
has comment: http://stackoverflow.com/comment/41059081
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41058738
has comment: http://stackoverflow.com/comment/41059010
has comment: http://stackoverflow.com/comment/41059009
has comment: http://stackoverflow.com/comment/41058871
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41059210
has title: Storing information Object vs Array?
tagged with: oop
answer count: 0
has comment: http://stackoverflow.com/comment/41058937
linked to: http://stackoverflow.com/q/17295056
has comment: http://stackoverflow.com/comment/41059046
type: Question

http://stackoverflow.com/comment/41071515
has text: @T.J. Crowder: Thanks for the heads up about ul.getElementsByTagName("li")[4] not always selecting the last element. It reminded me of the fact that there will be times I wouldn't know which would be the last element.
comment on: http://stackoverflow.com/a/26175103
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26126462
accepted answer of: http://stackoverflow.com/q/26126076
type: Answer
answers question: http://stackoverflow.com/q/26126076
has body: Given: HTML: &lt;input id='text'&gt;&lt;/input&gt; You can do this: JS: document.getElementById('text').addEventListener('keyup', function(e) { var text = document.getElementById('text').value; if (text.search('MMM') !== -1) { alert('MMM is not allowed!'); } if (text.search('XXX') !== -1) { alert('XXX is not allowed!'); } text = text.replace(/MMM/g,''); text = text.replace(/XXX/g,''); document.getElementById('text').value = text; },false); DEMO OR this: JS: var banned = ['MMM','XXX']; document.getElementById('text').addEventListener('keyup', function(e) { var text = document.getElementById('text').value; for (var x=0;x&lt;banned.length;x++) { if (text.search(banned[x]) !== -1) { alert(banned[x]+' is not allowed!'); } var regExp = new RegExp(banned[x]); text = text.replace(regExp,''); } document.getElementById('text').value = text; },false); DEMO However, you also need to sanitize these form responses on your server. Any client code can be circumvented.
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/26123580
upvote count: 8
answers question: http://stackoverflow.com/q/26123410
type: Answer
has body: Just use document instead of body (your body element has a calculated height of 0, but document is always the full size of the window): http://jsfiddle.net/TrueBlueAussie/95vczfve/5/ $(document).ready(function () { $(document).click(function (ev) { mouseX = ev.pageX; mouseY = ev.pageY console.log(mouseX + ' ' + mouseY); var color = '#000000'; var size = '1px'; $("body").append( $('&lt;div&gt;&lt;/div&gt;') .css('position', 'absolute') .css('top', mouseY + 'px') .css('left', mouseX + 'px') .css('width', size) .css('height', size) .css('background-color', color)); }); }); As a side note: Your original JSFiddle is also a great example of why you should not connect delegated events to body instead of document. The body element can be styled out of existence (also document exists before the DOM is even loaded) :) Or, as Brian provided, a reduced version http://jsfiddle.net/BrianDillingham/95vczfve/7/: $(document).ready(function(){ $(document).click(function (ev) { $("body").append( $('&lt;div&gt;&lt;/div&gt;').css({ position: 'absolute', top: ev.pageY + 'px', left: ev.pageX + 'px', width: '10px', height: '10px', background: '#000000' }) ); }); }); And Brian's final update with limit of 3 dots: http://jsfiddle.net/BrianDillingham/95vczfve/8/
has comment: http://stackoverflow.com/comment/75646625
score: 8
has comment: http://stackoverflow.com/comment/40943556
has comment: http://stackoverflow.com/comment/40943552
has comment: http://stackoverflow.com/comment/40944070
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26123410

http://stackoverflow.com/comment/41029423
has text: Can you please explain in more detail Omidam81? Please.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26168918
type: Comment

http://stackoverflow.com/a/26092309
has comment: http://stackoverflow.com/comment/40893798
score: 0
has comment: http://stackoverflow.com/comment/40890810
has comment: http://stackoverflow.com/comment/40890926
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40901277
has comment: http://stackoverflow.com/comment/40891244
type: Answer
has comment: http://stackoverflow.com/comment/40890505
has comment: http://stackoverflow.com/comment/40890974
has comment: http://stackoverflow.com/comment/40890150
has comment: http://stackoverflow.com/comment/40891123
has comment: http://stackoverflow.com/comment/40891097
has comment: http://stackoverflow.com/comment/40900747
accepted answer of: http://stackoverflow.com/q/26092223
answers question: http://stackoverflow.com/q/26092223
has comment: http://stackoverflow.com/comment/40901582
has body: The busregform method is expecting a dom element reference for form so you need $('#business-reg-form').validate({ rules: { address: { required: true, minlength: 6 }, email: { required: true, email: true, minlength: 6 }, company: { required: true }, pass: { required: true, minlength: 6 }, confirmpw: { required: true, minlength: 6, equalTo: "#pass" } }, submitHandler: function() { var pw = $("#pass"); var form = $("#business-reg-form"); //pass the dom element reference busregform(form[0], pw[0]); return false; } }); function busregform(form, password) { // Create a new element input, this will be our hashed password field. var p = document.createElement("input"); // Add the new element to our form. form.appendChild(p); p.name = "p"; p.type = "hidden"; p.value = hex_sha512(password.value); // Make sure the plaintext password doesn't get sent. password.value = ""; // Finally submit the form. form.submit(); return true; } if (!window.hex_sha512) { //stub method window.hex_sha512 = function(value) { return 'hex_sha512-' + value; } } Demo: Fiddle - You can inspect the request using the network tab to see the hashed password

http://stackoverflow.com/q/26077904
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Create non-looping Polylines in Google Maps
has comment: http://stackoverflow.com/comment/40862651
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/40600525
score: 1
has comment: http://stackoverflow.com/comment/40883592
type: Question
has answer: http://stackoverflow.com/a/26077994
answer count: 2
tagged with: google-maps
has body: I've got an array of Coordinates for which I want to create PolyLines in the Maps API v3. I've done the following so far. for (i = 0; i &lt; locations.length; i++) { //locations is an array of Lat, Long var a = new google.maps.LatLng(locations[i][0], locations[i][1]); plans.push(a) bounds.extend(a); } var roadPath = new google.maps.Polyline({ path: plans, geodesic: true, strokeColor: '#FF0000', strokeOpacity: 1.0, strokeWeight: 2 }); roadPath.setMap(map); Now the problem here is, on creating the polylines, the last and first point get connected too as illustrated where the leftmost point is the first point and the rightmost is the last coordinate in the array locations. How do I make the red line stick only to the road and not as the crow flies?

http://stackoverflow.com/q/26110091
has comment: http://stackoverflow.com/comment/40920173
has comment: http://stackoverflow.com/comment/40920292
tagged with: angularfire
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/40920382
has comment: http://stackoverflow.com/comment/40920438
tagged with: firebase
has comment: http://stackoverflow.com/comment/40920331
has comment: http://stackoverflow.com/comment/40920330
score: 0
has body: I can't seem to display the items sorted here in reverse order. I want to display the last item added to the list at the top instead of the bottom: Weeks appear in descending order (correctly) but items do not. I'm also using a compare to move completed tasks to the bottom. app.directive('repeatByWeek', function($parse, $window) { return { restrict: 'E', transclude: true, template: '&lt;div ng-transclude&gt;&lt;/div&gt;', link: function(scope, el, attrs) { // get the global moment lib var moment = $window.moment; scope.weeks = []; updateList(); // whenever the source collection changes, update our nested list scope.list.$watch(updateList); scope.$watch(function(){ return scope.list; }, updateList); function compare(a, b) { return a.completeTime - b.completeTime; } function updateList() { scope.list.$loaded().then(function(){ scope.list.sort(compare); scope.weeks = sortItems(parseItems(scope.list)); }); } function sortItems(sets) { var items = []; // get a list of weeks and sort them var weeks = sortDescending(Object.keys(sets)); for(var i=0, wlen=weeks.length; i &lt; wlen; i++) { var w = weeks[i]; // get a list of days and sort them var days = Object.keys(sets[w]); var weekEntry = { time: w, days: [] }; items.push(weekEntry); // now iterate the days and add entries for(var j=0, dlen=days.length; j &lt; dlen; j++) { var d = days[j]; weekEntry.days.push({ time: d, // here is the list of tasks from parseItems items: sets[w][d] }); } } // console.log('sortItems', items); return items; } // take the array and nest it in an object by week and then day function parseItems(list) { var sets = {}; angular.forEach(list, function(item) { var week = moment(item.$priority).startOf('week').valueOf(); var day = moment(item.$priority).startOf('day').valueOf(); if( !sets.hasOwnProperty(week) ) { sets[week] = {}; } if( !sets[week].hasOwnProperty(day) ) { sets[week][day] = []; } sets[week][day].push(item); }); // console.log('parseItems', sets); return sets; } function sortDescending(l…
has comment: http://stackoverflow.com/comment/40920191
has title: A way to display an array of objects in reverse?
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40920409

http://stackoverflow.com/q/26106830
type: Question
score: 0
has title: Matching element heights
has body: I have a menu on the left side of a slider. The slider's height is in direct correlation to the size of the image file that it loads. I want the menu's parent element to be at an equal height to the slider at all time. I tried to code this with CSS and I looked around on here and realized that doing it with CSS is impossible. So, I tried to code it with Java, but it isn't right. Any help with this would be amazing! --Update-- This part is an edit. I tried a few of the suggestions, however they are not working. The slider changes height as it responds to the width of the screen. So, when I drag it out, it will change and the menu is left shorter than the slider. If I max-height the slider, the width will not display at 100% of the 60% allowance. I believe what I need is a snippet of jquery that: - grabs the nav element - detects the height of the .Slider - makes the nav element the same height as the .Slider element. I have tried the js code below, but it didn't work. Does anyone know how to do this? Here is the code: window.jQuery( function() { window.jQuery('nav').height(window.jQuery('.Slider').height ()) }); nav { display: block; float: left; width: 40%; height: 100%; } nav ul { background: lightgreen; } nav ul li { display: inline; width: 100%; height: 33.3333%; margin-left: 0; } .Slider { display: block; float: right; width: 60%; } Item 1 Item 2 Item 3 Pics are here.
tagged with: javascript
tagged with: height
tagged with: css
has answer: http://stackoverflow.com/a/26107055
tagged with: menu
answer count: 4
has answer: http://stackoverflow.com/a/26107512
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26107080
has answer: http://stackoverflow.com/a/26108621

http://stackoverflow.com/a/26148404
has body: It appears that promises, as used in my code example, work fine. Parse waits until one of the response callbacks is called, even if it reaches the end of the invoking function's block, as long as there are outstanding callbacks or unresolved promises.
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26105793
type: Answer
answers question: http://stackoverflow.com/q/26105793

http://stackoverflow.com/comment/40919501
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26110293
has text: maybe if you explained what you're trying to accomplish, or posed a question, you wouldn't get the down votes.

http://stackoverflow.com/q/26087296
has answer: http://stackoverflow.com/a/71356401
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/26087359
type: Question
has comment: http://stackoverflow.com/comment/40877609
possible better answer: http://stackoverflow.com/a/26087646
has answer: http://stackoverflow.com/a/26087646
answer count: 3
has body: I have a little script here that counts clicks when link is clicked and stores it in .txt file, but it works fine when I have only "click=yes" under href. But I can't make it to track clicks when I have link to external site. Here is my code: <?php if(!file_exists('counter.txt')){ file_put_contents('counter.txt', '0'); } if($_GET['click'] == 'yes'){ file_put_contents('counter.txt', ((int) file_get_contents('counter.txt')) + 1); header('Location: ' . $_SERVER['SCRIPT_NAME']); die; } ?> counter example <?php echo file_get_contents('counter.txt'); ?> clickMe My guess is it has to do something with header('Location: ' . $_SERVER['SCRIPT_NAME']); but I can't figure it out so I could really use some help. And is it somehow possible to have multiple links save to the same file, and when I show it on website it's sorted from largest number to smallest? I have an idea how to do it with MySQL database but I can't use it at place where this will be implemented. Thanks in advance! Cheers!
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Click counter when link is clicked PHP/JS
favorite count: 0
has answer: http://stackoverflow.com/a/26087359
tagged with: click-counting
tagged with: php
type: AnsweredQuestion

http://stackoverflow.com/q/26091879
score: 0
has answer: http://stackoverflow.com/a/26131662
tagged with: angularjs
type: UnansweredQuestion
has title: Add settings to embeddable angular widget
tagged with: widget
has comment: http://stackoverflow.com/comment/40887742
type: Question
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40888211
has body: We're nearing the completion of working on an embedible JavaScript widget which has been built with AngularJS, to date everything it working fine, however we're now at the point where we need to allow the site owner to inject config settings into the JavaScript such as: company_id user name email id default overrides In a previous iteration of our widget we used raw JavaScript, and were able to add settings like this: Widget = window.Widget || []; (function () { var i, e; i = document.createElement("script"), i.type = 'text/javascript'; i.async = 1, i.src = "https://path/to.js", e = document.getElementsByTagName("script")[0], e.parentNode.insertBefore(i, e); })(); Widget.push(['set', { 'account_id': 'konami', }]); Inside our JavaScript, we simply had a window.Widget object which we overwrote with their settings and used wherever we needed. However I'm at a loss as to how / where to receive this information and use it from inside our angular app, would appreciate any help on the best way to add in settings / configuration from when the JavaScript is loaded, and be able to use this in our services / controllers.

http://stackoverflow.com/a/26104601
accepted answer of: http://stackoverflow.com/q/26104545
has body: Set a flag - I'll use window but you should use your app scope. window.uploading = false; window.onbeforeunload = function () { if (window.uploading) { return 'You are uploading! CHILL OUT!'; } }; function uploadFile(formdata) { var xhr = new XMLHttpRequest(); window.uploading = true; xhr.upload.addEventListener("progress", progressHandler, false); xhr.addEventListener("load", completeHandler, false); // complete handler sets uploading to false xhr.addEventListener("error", errorHandler, false); xhr.addEventListener("abort", abortHandler, false); xhr.open("POST", "upload.php"); xhr.send(formdata); }
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26104545
score: 1
upvote count: 1

http://stackoverflow.com/comment/40851523
type: QuestionComment
comment on: http://stackoverflow.com/q/26072835
has text: As for the side note, the documentation says that the js minifies/uglifiers break the code if explicit $inject, or the array notation is not used. (http://code.angularjs.org/1.2.25/docs/guide/di) That's why I've been using it.
score: 0
type: Comment

http://stackoverflow.com/comment/40809920
comment on: http://stackoverflow.com/q/26050179
has text: I run it inside Cordova, so can't test on the desktop. Tried with Windows Phone as well, doesn't work either.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26104954
has answer: http://stackoverflow.com/a/26105139
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40909737
upvote count: 0
tagged with: javascript
score: -1
has body: On the results page of this quiz, when you get an answer wrong, there's explanatory text given. For some reason, html tags like are stripped out of that text, even though they display correctly everywhere else in the quiz. I've checked both js files but can't find the culprit. Any ideas? I'm trying to add formatting in this line of Q/A js $('#quiz-form').append(' Correct answer(s): '+answer+' '+special+' ');
has title: HTML tags selectively stripped out
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40909724
type: UnansweredQuestion

http://stackoverflow.com/a/26166269
answers question: http://stackoverflow.com/q/26165173
has body: Give your form a name and on ng-submit, check the validity of the form with the $valid property. &lt;form id="signup-form" name="signUpForm" novalidate ng-submit="signUpForm.$valid &amp;&amp; processForm()" ng-hide="showConfirm"&gt; Add validation attributes to your inputs. ex: &lt;input type="text" ng-model="formData.email" required&gt; Then once the form is submitted, set the showConfirm property to true Read more about validation here https://docs.angularjs.org/guide/forms and http://www.ng-newsletter.com/posts/validations.html
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26165173
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/40851841
type: QuestionComment
has text: Also is transaction always the first query parameter?
comment on: http://stackoverflow.com/q/26073120
score: 0
type: Comment

http://stackoverflow.com/a/26102230
accepted answer of: http://stackoverflow.com/q/26043145
score: 2
answers question: http://stackoverflow.com/q/26043145
downvote count: 0
upvote count: 2
type: AcceptedAnswer
has body: Edited: Cleaned up the answer. So, this solution is a bit messy but it works: Fiddle for centered only on x Fiddle for centered on both x and y In the widget constructor: this.$oldview = $img.parent(); //store original container element Then in the update method: $(this.view).position({ my: "left top", at: "left top", of: this.$oldview }); This shifts the viewport back into position (for some reason the code you added makes the viewport go to absolute(0,0)). At the end of update, I add an offset to zLeft. var offsetx = //offset need to horizontally center image (this.$oldview.width() / 2) - (((this.zimg).width() / 2) / zoom); $(this.zimg).css({ //center image left: zLeft + offsetx + "px" }); And this at the start of update because it was misbehaving when zoomed out all the way: if (zoom &lt; 1) { this.options.zoom = 1; zoom = 1; } I also removed the text-align:center.I think that's all the changes I made. If you want it centered vertically too, same thing: http://jsfiddle.net/qontbr9e/10/ Same thing but for both x and y: var offsetx = //offset need to horizontally center image this.$oldview.width() / 2 - (this.zimg).width() / 2 / zoom; var offsety = //offset need to vertically center image this.$oldview.height() / 2 - (this.zimg).height() / 2 / zoom; $(this.zimg).css({ //center image left: zLeft + offsetx + "px", top: zTop + offsety + "px" });
type: Answer

http://stackoverflow.com/q/26159228
has answer: http://stackoverflow.com/a/26239054
has answer: http://stackoverflow.com/a/26159464
has body: I'm trying to bind a click event to .ui-state-default after a jQuery datepicker has been rendered (I don't have any control over the html that's creating the datepicker so I can't use any datepicker specific events) and it works fine using $.bind() but not with $.on(). $.bind() that works in console: $('[data-handler=selectDay] a.ui-state-default').bind('click', function(){ if($(this).hasClass('ui-state-active')) return; alert('changed date'); $("button.checkout").addClass('disabled'); $("button.checkout span").html('Choose Your Payment Method'); $(".stage3").html(tmpl('stage3_tpl')).removeClass('noBg'); }); $.on() that doesn't work on the page: $(document.body).on('click', '[data-handler=selectDay] a.ui-state-default', function(){ if($(this).hasClass('ui-state-active')) return; alert('changed date'); $("button.checkout").addClass('disabled'); $("button.checkout span").html('Choose Your Payment Method'); $(".stage3").html(tmpl('stage3_tpl')).removeClass('noBg'); }); The datepicker is not always on the page so I don't believe I can use $.bind()? Where am I going wrong?
downvote count: 0
favorite count: 0
tagged with: datepicker
has answer: http://stackoverflow.com/a/26351427
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/41193985
upvote count: 3
possible better answer: http://stackoverflow.com/a/26320113
has answer: http://stackoverflow.com/a/26320113
accepted answer: http://stackoverflow.com/a/26351427
type: Question
has answer: http://stackoverflow.com/a/50606651
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/41272511
tagged with: javascript
tagged with: jquery
answer count: 6
has comment: http://stackoverflow.com/comment/41157066
has title: Issue binding click event in jQuery datepicker
has answer: http://stackoverflow.com/a/26339860
has comment: http://stackoverflow.com/comment/41157920
has comment: http://stackoverflow.com/comment/41360524

http://stackoverflow.com/a/26153486
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26153390
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40998763
answers question: http://stackoverflow.com/q/26153390
has comment: http://stackoverflow.com/comment/40998723
has comment: http://stackoverflow.com/comment/41010612
has body: Since you are using the alternation operator in context matching either A- or [AW]?F this could get misinterpreted and match A and F as single characters instead of the actual complete subpattern you want to match. var r = 'AF'.match(/^A-?|[BCD][+-]?|[AW]?F$/); if (r) console.log(r[0]); //=&gt; A I would use a non-capturing group to group your expressions if you don't plan on listing them out. var r = 'AF'.match(/^(?:A-?|[BCD][+-]?|[AW]?F)$/); if (r) console.log(r[0]); //=&gt; AF
has comment: http://stackoverflow.com/comment/40998842
has comment: http://stackoverflow.com/comment/61845841
type: AcceptedAnswer

http://stackoverflow.com/comment/41069646
score: 4
comment on: http://stackoverflow.com/q/26191820
type: Comment
type: QuestionComment
has text: `console.log(journal);`

http://stackoverflow.com/comment/54290466
score: 0
type: Comment
type: QuestionComment
has text: perhaps an up-vote as well?
comment on: http://stackoverflow.com/q/26088145

http://stackoverflow.com/a/26374572
accepted answer of: http://stackoverflow.com/q/26130914
downvote count: 0
answers question: http://stackoverflow.com/q/26130914
type: Answer
upvote count: 1
has body: I had the same issue and solved it by installing imagemagik.exe on Windows as recommended here: imagemagick with nodejs not working. Download: Link Hope it helps!
score: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26067701
tagged with: css
has body: Okay, so here is the concept. My HTML document has a button that onClick runs a Javascript function. On the web page there are two big divisions, and the purpose of the button is to swap the divisions' places. For example, the one that was on the left goes the right, and the one on the right to the left. The problem is, the "left" CSS property has dominance over the "right" property, so if both the left and right properties are set to 0 on a div with a fixed width, it will go to the left. Therefore, I cannot get what is on the left over to the right because the "left" property is still present. I need some way to make the left property invalid, as if I had never even set it so the div will go to the right. The two divs are called "content" and "navigation" and here is my JS: var order = 0; var current; var switchLayout = function() { if(order === 0) { current = document.getElementById('content'); current.style.position = 'absolute'; current = document.getElementById('navigation'); current.style.left = '0'; order = 1; } else { current = document.getElementById('content'); current.style.position = 'relative'; current = document.getElementById('navigation'); current.style.left = 'null'; current.style.right = '0'; order = 0; } } Any help is appreciated. Thanks!
has comment: http://stackoverflow.com/comment/40842403
has comment: http://stackoverflow.com/comment/40842077
tagged with: invalidation
type: Question
has answer: http://stackoverflow.com/a/26067986
tagged with: javascript
has comment: http://stackoverflow.com/comment/40842097
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: How to Disable a CSS Property and Make It Invalid
answer count: 1
linked to: http://stackoverflow.com/q/2027935
has comment: http://stackoverflow.com/comment/40842122
type: UnansweredQuestion

http://stackoverflow.com/comment/41378209
type: Comment
has text: I added the HTML you'd need to include it in your page. Unsure why you unaccepted my answer but if that code works please consider re-accepting it.
comment on: http://stackoverflow.com/a/26183582
score: 0
type: AnswerComment

http://stackoverflow.com/a/26131080
upvote count: 1
type: AcceptedAnswer
downvote count: 1
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26131052
has body: It should be like this $(vendorsPopUp).on('change', 'input', function (e) { alert($(this).attr('class')); });
accepted answer of: http://stackoverflow.com/q/26131052
has comment: http://stackoverflow.com/comment/40957655

http://stackoverflow.com/q/26182061
has comment: http://stackoverflow.com/comment/41051661
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/26182131
accepted answer: http://stackoverflow.com/a/26182131
type: Question
has body: I am using a modified version of a JavaScript Slider bar from a tutorial by Thoriq Firdaus I am trying to print the variable value to my Firefox console using console.log(value) but I keep getting the below error ReferenceError: value is not defined console.log(value) Can anyone tell me what is going wrong? $(function () { var initX=0,minX=50,width=400; var slider = $('#slider'), tooltip = $('.tooltip'); slider.slider({ //Config min: -50, max: +50, value: 0, start: function (event, ui) { tooltip.fadeIn('fast'); }, //Slider Event slide: function (event, ui) { var value = slider.slider('value'), volume = $('.volume'); tooltip.css('left', initX+(value*width)/100).text(ui.value); }, stop: function (event, ui) { }, }); initX=slider.slider("value"); console.log(value) var txt=initX; initX+=(minX*width)/100; tooltip.css('left',initX).text(txt); });
has comment: http://stackoverflow.com/comment/41051665
tagged with: javascript
score: -1
answer count: 1
downvote count: 1
favorite count: 0
has title: JavaScript "ReferenceError: value is not defined" error when using Console.log

http://stackoverflow.com/q/26099317
has answer: http://stackoverflow.com/a/26100165
score: 0
has body: I want to add div structure everytime I click the button to add an address using jQuery Address Add Address and this is what I've tried but not working
has comment: http://stackoverflow.com/comment/40899484
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/26099369
has comment: http://stackoverflow.com/comment/40899427
has comment: http://stackoverflow.com/comment/40899884
has comment: http://stackoverflow.com/comment/40899428
upvote count: 1
accepted answer: http://stackoverflow.com/a/26099369
tagged with: css
answer count: 4
has comment: http://stackoverflow.com/comment/40899402
type: AnsweredQuestion
has title: Add div dynamically on button click using jQuery
has answer: http://stackoverflow.com/a/26099479
has comment: http://stackoverflow.com/comment/40900341
has comment: http://stackoverflow.com/comment/40899487
has comment: http://stackoverflow.com/comment/40899809
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/26099510
tagged with: javascript
has answer: http://stackoverflow.com/a/26099510
tagged with: jquery

http://stackoverflow.com/q/26110220
tagged with: node.js
has answer: http://stackoverflow.com/a/26110702
type: Question
has body: I started reading about Derby.js and Meteor to do some research on an project I'm working on. It uses a lot of real time functionalities so they both seem handy. But I have some major concerns and am wondering if it makes sense to use them at this time. Are they yet production ready? Or are there still major security issues? Do they by now support sessions and authentication? Am I right with the assumption that by relying on frameworks that do a lot of the work you might have it easier for the simple stuff but much, much harder if it get's a bit more complicated? Am I right with the assumption, that I could achieve exactly the same effects (from a user-experience perspective) when I just use Express + Socket.io (or express.io) and that I just have to invest more time/work? At the moment I'm more drawn to Express + Socket.io and think Derby and Meteor are a bit hyped. What do you think? To get a better idea of what I'm planning: User authentication is needed Complex routing is needed SEO is an issue Full Text Search using Elasticsearch DB probably MongoDB Complex relations between objects Realtime updates (Socket.io) Security is an issue Performance and scalability are issues. Thanks!
tagged with: mongodb
has answer: http://stackoverflow.com/a/26145338
score: 10
tagged with: javascript
upvote count: 13
tagged with: derbyjs
answer count: 3
downvote count: 3
tagged with: meteor
favorite count: 0
has title: Is it already worth to give Derby.js or Meteor a shot for an app for production with authentication?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26141618

http://stackoverflow.com/q/26115530
has answer: http://stackoverflow.com/a/26115594
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26117107
has body: My users have a list of friends, they can click a button to remove the friend from their firends list. This is done as per below. Once this is happened I need to refresh #containerFriendsRequestSent because the contents of it have changed. I cannot use location.reload(true); because there are filters on the page and this will reset them meaning the user would have to reselect the filter option. I thought I could use something like $( "#containerFriendsRequestSent" ).load but this does not seem to refresh the page? $('#containerFriendsRequestSent').append(wrapper); wrapper.children('.destroy').click(function() { $(".destroy").click(function() { item.fetchedObject.set("status", "Deleted"); $('#containerFriendsRequestSent').load(); item.fetchedObject.destroy(null, { success: function(results) { console.log("DELETED"); },
score: 0
answer count: 3
has title: How can I refresh the contents of a DIV using JQuery?
linked to: http://stackoverflow.com/q/18490026
duplicate of: http://stackoverflow.com/q/18490026
tagged with: javascript
has answer: http://stackoverflow.com/a/26117107
has answer: http://stackoverflow.com/a/26117724
type: AnsweredQuestion
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26115594

http://stackoverflow.com/q/26178675
answer count: 0
tagged with: javascript
tagged with: jquery
has body: I am developing a wordpress plugin, where user can write their custom js function which is executed by plugin. They can share the codes to other and can import other's codes also. My concern is user can do ajax request via their function and can mess with database. So how do I check if a function is making ajax request and stop it from executing. Solution i can think of are:- Block all ajax related keywords like AJAX, xmlhttp, GET, POST Having some global switch ajax = false; which line will turn off all AJAX functions, and turn it on when required and turning off once done. I have never faced security issues like this before, so don't have any idea. What can be different ways user can mesh with database?
has comment: http://stackoverflow.com/comment/41045142
tagged with: ajax
has comment: http://stackoverflow.com/comment/41045067
has title: Check if a function is doing AJAX request?
type: Question
has comment: http://stackoverflow.com/comment/41045031
score: 0
tagged with: wordpress
has comment: http://stackoverflow.com/comment/41055628
has comment: http://stackoverflow.com/comment/41045109
has comment: http://stackoverflow.com/comment/41045111
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41045672
has comment: http://stackoverflow.com/comment/41045215

http://stackoverflow.com/a/26108510
type: Answer
answers question: http://stackoverflow.com/q/26107993
score: 0
has body: You could do this by looking at the childnodes of each p and grabbing the ones that do not have a class of external-link: var otherText = []; $("p").each(function(){ console.log(this.childNodes); var kids = this.childNodes; for(var i = 0; i &lt; kids.length; i++) { if(!($(kids[i]).hasClass("external-link"))) { otherText.push(kids[i]); //or do what you want with the node here } } }); console.log("other Text", otherText); jsFiddle

http://stackoverflow.com/a/26050535
type: Answer
has body: You could also do... $('theForm') .onsubmit = process.bind(window, 'firstName', 'lastName', 'department'); If your target platforms don't support bind(), you can polyfill it.
score: 0
answers question: http://stackoverflow.com/q/26050499

http://stackoverflow.com/comment/40990530
comment on: http://stackoverflow.com/q/26149037
type: Comment
score: 2
type: QuestionComment
has text: Just interested, why you didn't use `Math.PI`?

http://stackoverflow.com/comment/62248751
score: 4
type: AnswerComment
has text: whats the best way to specify the root as being up a dir?
type: Comment
comment on: http://stackoverflow.com/a/26079640

http://stackoverflow.com/comment/40998459
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26111857
has text: Just make `bta_merchant` a public member. Maybe protected will do. I don't understand the access protection relationship between ASP.NET inline code and code-behind classes very well, sorry.

http://stackoverflow.com/q/26180550
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41048632
has title: Setting number value in JavaScript via Razor in ASP.NET MVC
upvote count: 1
downvote count: 1
type: Question
tagged with: asp.net-mvc
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26186648
answer count: 1
has body: I have an ASP.NET MVC app. My app is using Razor in the views. I am putting values in the ViewBag to use in my view. I have a property on the ViewBag called 'ItemId'. That value may be assigned an int value. Or, it may not be set at all. If it is set, I want to assign it to a value in JavaScript. If it is not set, I want to use -1. Currently, I am trying the following: var id= @((String.IsNullOrEmpty(ViewBag.ItemId)) ? ViewBag.ItemId : "-1"); Unfortunately, when this gets run, my JavaScript looks like this: var id = ; What am I doing wrong?
favorite count: 0
accepted answer: http://stackoverflow.com/a/26186648
tagged with: razor

http://stackoverflow.com/comment/41032561
type: Comment
has text: What do you mean, "modern strings"? Shouldn't it be possible to do that rewrite programmatically?
comment on: http://stackoverflow.com/q/26171152
score: 0
type: QuestionComment

http://stackoverflow.com/q/26071405
upvote count: 3
has title: How to change or color after one another
type: Question
has answer: http://stackoverflow.com/a/26071454
score: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26071437
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26071422
favorite count: 0
has answer: http://stackoverflow.com/a/26071459
has body: i want to change the color of li or tr whatever possible after one another. Note:- I want to call this in while loop so static class will be no solution I want the output lke:- line1 //white background line2 //red background line3 //white background line4 //red background or if possible in like:- line1 //white background line2 //red background line3 //white background line4 //red background What i am trying yet is:- <?php $fields = CFS()->get('gallery'); foreach ($fields as $field) { <? <?php echo $field['slide_title']; ?> <?php echo $field['upload']; ?> <?php } ?>
type: UnansweredQuestion
tagged with: php
tagged with: css
downvote count: 1
answer count: 4
has comment: http://stackoverflow.com/comment/40848741

http://stackoverflow.com/comment/40923506
comment on: http://stackoverflow.com/a/26111857
type: Comment
score: 0
has text: Thank you Jeremy. There is one last question: to fill this hidden fields with a string how to I have to convert the string? e.g EPS_MERCHANT (TEXT) = bta_Merchant (STRING)
type: AnswerComment

http://stackoverflow.com/q/26056937
answer count: 3
accepted answer: http://stackoverflow.com/a/26058121
possible better answer: http://stackoverflow.com/a/26056993
tagged with: jquery
has answer: http://stackoverflow.com/a/26056993
has title: Accessing Elements returned by Jquery Ajax
tagged with: ajax
has answer: http://stackoverflow.com/a/26057045
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26058121
type: Question
tagged with: javascript
has body: Hi I inject a piece of HTML code dynamically inside a DIV on click using Jquery Ajax. After injecting i am not able to select the elements from this injected HTML. I need to write click events for these elements to change some data on the main page. If i write jquery inline i am not able to access the elements on the main page. Can anyone help? My Jquery Ajax call $(".template-2-column-std a").not('.emptyMessage').click(function () { var parentidVal = $(this).data('parentid') $.ajax({ url: '/Navigation/GetBreadCrumbList', contentType: 'application/html; charset=utf-8', data: { id: parentidVal }, type: 'GET', dataType: 'html' }) .success(function (result) { $('#breadcrumb').html(result); }) .error(function (xhr, status) { alert(status); }) });

http://stackoverflow.com/comment/40973847
score: 0
type: Comment
type: QuestionComment
has text: Its most likely your js paths. Show the full html.
comment on: http://stackoverflow.com/q/26140421

http://stackoverflow.com/a/26034725
upvote count: 1
has comment: http://stackoverflow.com/comment/40827916
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/26034167
has body: I'm not aware of a tool that would meet your specific requirements, but it seems to be relatively easy to create, given that the vital parts already exist. parse the source into an AST, using esprima or similar manipulate the tree in the way you want (eg. remove comments, mangle identifiers etc) rebuild the source from the tree using escodegen
score: 1

http://stackoverflow.com/a/26125510
has body: You have 24 bars in a confined space. You want more space between the groups of bars. Your options are: 1.) you increase width of your plot. 2.) you decrease the size of each bar. You can't adjust the space between the bars directly. From the comments to the plugin: The plugin adjust the point by adding a value depanding of the barwidth * Exemple for 3 series (barwidth : 0.1) : * * first bar décalage : -0.15 * second bar décalage : -0.05 * third bar décalage : 0.05 Here's some code snips with possible fixes: var d1 = []; for (var i = 0; i <= 23; i += 1) d1.push([i, parseInt(Math.random() * 30)]); var d2 = []; for (var i = 0; i <= 23; i += 1) d2.push([i, parseInt(Math.random() * 30)]); ds = []; ds.push({ data: d1, bars: { show: true, barWidth: 0.3, order: 1, lineWidth: 2 } }); ds.push({ data: d2, bars: { show: true, barWidth: 0.3, order: 2 } }); $.plot($("#placeholder"), ds, { grid: { hoverable: true } }); ds1 = []; ds1.push({ data: d1, bars: { show: true, barWidth: 0.005, order: 1, lineWidth: 2 } }); ds1.push({ data: d2, bars: { show: true, barWidth: 0.005, order: 2 } }); $.plot($("#placeholder1"), ds1, { grid: { hoverable: true } }); EDITS - UPDATED ANSWER Another idea if you could drop the plugin and jitter the values yourself. This would allow better control on the spacing. See this snip: var barWidth = 0.2; var jitterVal = barWidth / 1.5; var d1 = []; for (var i = 0; i <= 23; i += 1) d1.push([i - jitterVal, parseInt(Math.random() * 30)]); var d2 = []; for (var i = 0; i <= 23; i += 1) d2.push([i + jitterVal, parseInt(Math.random() * 30)]); ds = []; ds.push({ data: d1, bars: { show: true, barWidth: barWidth } }); ds.push({ data: d2, bars: { show: true, barWidth: barWidth } }); $.plot($("#placeholder"), ds, { grid: { hoverable: true } });
type: Answer
has comment: http://stackoverflow.com/comment/40969206
answers question: http://stackoverflow.com/q/26117333
upvote count: 2
score: 2
accepted answer of: http://stackoverflow.com/q/26117333
has comment: http://stackoverflow.com/comment/40976473
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41044578

http://stackoverflow.com/q/26143167
tagged with: ajax
has comment: http://stackoverflow.com/comment/40979264
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26143223
upvote count: 0
type: UnansweredQuestion
has title: How to get span value onchange?
score: -2
has comment: http://stackoverflow.com/comment/40979283
has answer: http://stackoverflow.com/a/26144158
type: Question
has comment: http://stackoverflow.com/comment/40979094
answer count: 2
downvote count: 2
has body: ON CHANGE get span value editable spane
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40979083
favorite count: 0

http://stackoverflow.com/q/26098024
type: AnsweredQuestion
downvote count: 1
type: Question
upvote count: 0
has answer: http://stackoverflow.com/a/26098197
has answer: http://stackoverflow.com/a/26098103
accepted answer: http://stackoverflow.com/a/26098103
tagged with: javascript
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/26098202
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has body: Why function hide/show element not work , when cover with tag form ? When i test check radio button for hide/show elements , it's not work. But when i remove tag form , and test it's OK How to using this function hide/show elements with tag form Fiddle here RED BLUE RED RED RED RED RED BLUE BLUE BLUE BLUE BLUE
favorite count: 0
has comment: http://stackoverflow.com/comment/40897101
possible better answer: http://stackoverflow.com/a/26098197
tagged with: css
has title: Why function hide/show element not work , when cover with tag form?

http://stackoverflow.com/a/26128011
score: 0
has body: Thanks Bjorn, I ended up using a count query instead of a find. If the number of results is greater than 0 then send the email. Also realized that I was not querying for the specific objectId so this was my final code: Parse.Cloud.afterSave(Parse.User, function(request) { var Mandrill = require('mandrill'); query = new Parse.Query(Parse.User); query.equalto("objectId",request.object.id); query.equalTo("user_ispro", true); query.count({ success: function(count) { if (count &gt; 0) { Mandrill.initialize('xxxx'); Mandrill.sendEmail({ message: { text: "Email Text", subject: "Subject", from_email: "test@test.com", from_name: "Test", to: [{ email: "test@test.com", name: "Test" }] }, async: true }, { success: function(httpResponse) { console.log(httpResponse); response.success("Email sent!"); }, error: function(httpResponse) { console.error(httpResponse); response.error("Uh oh, something went wrong"); } }); }, else { console.log("User is not Pro"); } }); });
answers question: http://stackoverflow.com/q/26102196
type: Answer

cytoscape-web
type: Tag
tags question: http://stackoverflow.com/q/26123468
tag name: cytoscape-web

http://stackoverflow.com/q/26034167
tagged with: uglifyjs
has answer: http://stackoverflow.com/a/26034725
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/26035166
type: Question
has body: I know about JS minfiers, obfuscators and minifiers. I was wondering if there is any existing tool (or any fast-to-code solution) to partially obfuscate JavaScript. By partially I mean that it should become difficult to read, but not appear as uglified/minified. It should keep indentation, but lose comments, and partially change variable names, making them unclear without converting them to "a, b, c" like an obfuscator. The purpose of this could be to take an explicit and reusable code and make it implicit and difficult to be reused by other people, without making it impossible to work with for yourself. Any idea from where to start to achieve this ? Maybe editing an existing obfuscator ?
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40780321
tagged with: minify
tagged with: obfuscation
favorite count: 0
has comment: http://stackoverflow.com/comment/40780455
has title: Semi-obfuscate/uglify JavaScript
possible better answer: http://stackoverflow.com/a/26034725
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26035166

http://stackoverflow.com/comment/40930943
type: Comment
comment on: http://stackoverflow.com/a/26115818
has text: Genius... Where abouts is this in the docs? I assume I missed it completely :)
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40900230
type: AnswerComment
comment on: http://stackoverflow.com/a/26098226
has text: Your strategy of taking the OP to your answer using a comment quite worked, but your solution doesn't.
score: 0
type: Comment

http://stackoverflow.com/q/26112503
possible better answer: http://stackoverflow.com/a/26112600
score: 0
has comment: http://stackoverflow.com/comment/40923367
has answer: http://stackoverflow.com/a/63687846
has answer: http://stackoverflow.com/a/26112831
has comment: http://stackoverflow.com/comment/40923390
accepted answer: http://stackoverflow.com/a/26112831
tagged with: jquery
has comment: http://stackoverflow.com/comment/40923507
has comment: http://stackoverflow.com/comment/40923356
linked to: http://stackoverflow.com/q/19635188
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26112600
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/77429443
has comment: http://stackoverflow.com/comment/40923309
type: Question
has body: i have a webpage that is full of div's with huge length, so whenever I refresh my page or manual document loading through actions, i need to scroll my window or document to same or previous position, but i want that to be done by browser automatically. i searched it in web and found no help, but i came to know that solution is there with out any other lib inclusion. I have a page of height more exceeds window height with some divs and select boxes whenever i select any thing in middle of page, it refresh my page and sends loads new document here i want to move to my previously selected select box placed div so that i can avoid manual scrolling on each selection
tagged with: javascript
has title: Scroll to same Position on reload and load

http://stackoverflow.com/comment/65908401
has text: Hi @chris T, I was wondering if you want to take a look at this question I posted http://stackoverflow.com/questions/39287211/angularjs-ui-router-extras-sticky-states . Thank you.
type: Comment
comment on: http://stackoverflow.com/a/26086823
score: 0
type: AnswerComment

http://stackoverflow.com/q/26110835
type: Question
has comment: http://stackoverflow.com/comment/40920447
has body: How do I loop over this javascript object structure to group each key by it's index. For example mobile_1 and desktop_1 should be grouped. Each _1 should be together, and _2. and so on. Here is the object: { "mobile_1": "source/test.jpg", "mobile_2": "source/test.jpg", "mobile_3": "source/test.jpg", "desktop_1": "source/test.jpg", "desktop_2": "source/test.jpg", "desktop_3": "source/test.jpg", "link_1": "#", "link_2": "#", "link_3": "#", "tag_1": "Test 1", "tag_2": "Test 2", "tag_3": "Test 3", "linkLabel_1": "Test 1 Go", "linkLabel_2": "Test 2 Go", "linkLabel_3": "Test 3 Go", "title_1": "Test 1 Desc", "title_2": "Test 2 Desc", "title_3": "Test 3 Desc" } Is there an easy way to group these keys by a portion of the key name?
score: -2
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/26112110
has answer: http://stackoverflow.com/a/26112110
answer count: 1
has comment: http://stackoverflow.com/comment/40922178
tagged with: javascript
has comment: http://stackoverflow.com/comment/40922608
favorite count: 0
tagged with: rest
type: AnsweredQuestion
has title: How to group javascript object properties based on a portion of the key name?
downvote count: 3
upvote count: 1

http://stackoverflow.com/q/26046062
tagged with: datetimepicker
type: AnsweredQuestion
favorite count: 0
type: Question
score: 0
upvote count: 1
answer count: 1
downvote count: 1
accepted answer: http://stackoverflow.com/a/26046260
has body: I have a field that utilizes a date picker as well as a validator. In the example below, I have pre-filled the date input. Now, erase the data and you will see it is no longer valid. Then click on the calendar icon to select a date. It does not re-validate until you move away from the input (blur), but I would rather it validate any time new text is entered from the date selector. Any suggestions? JSFiddle $(document).ready(function () { $('#app').bootstrapValidator(); }); $("#dob").on('blur', function () { $('#app').bootstrapValidator('revalidateField', 'dob'); }); $(function () { $('#dobpicker').datetimepicker({ pickTime: false, }); });
has title: On Change validate field - datetimepicker
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26046260

http://stackoverflow.com/a/26098184
has body: I don't know the real explanation, but this code worked like charm $(document).on('click', ".myCheckBox" , function() { var checkIndex = $(this).closest('.myCheckBox').index('.myCheckBox'); alert(checkIndex); });
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26097216
type: Answer
answers question: http://stackoverflow.com/q/26097216

http://stackoverflow.com/q/26121650
score: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/40939382
downvote count: 1
has answer: http://stackoverflow.com/a/26121835
tagged with: asp.net
favorite count: 0
has title: MVC 4 and JavaScript
answer count: 4
tagged with: asp.net-mvc-4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26121789
has answer: http://stackoverflow.com/a/26121915
type: Question
has answer: http://stackoverflow.com/a/26122132
possible better answer: http://stackoverflow.com/a/26121789
has comment: http://stackoverflow.com/comment/40940535
tagged with: javascript
has body: What is the best practice for adding javascript to a page? Should I create a folder and add a .js file for each page? Then, I can add a reference to the javascript file at the bottom my view page. should I embed the javascript code at the bottom of the page instead of create the .js file? Does it make a difference?
accepted answer: http://stackoverflow.com/a/26121835

http://stackoverflow.com/q/26134846
has answer: http://stackoverflow.com/a/26144460
tagged with: jsp
tagged with: javascript
has comment: http://stackoverflow.com/comment/40964341
score: 0
has comment: http://stackoverflow.com/comment/40963888
has comment: http://stackoverflow.com/comment/40963946
has title: How to call a controller method from jsp in Spring mvc using onchange method
type: UnansweredQuestion
has body: I have a Spring mvc project with an html form in jsp. The form has a date field which I have to validate. But, we cannot enter an already existing date in the database, so I want to get that message to the web page when we enter an already existing date. I have to call back end java methods to check that. How can I do that? What is the way to call a back end java method when we enter a Date field ? How can we use onchange method for that?
has answer: http://stackoverflow.com/a/26135916
tagged with: spring
tagged with: spring-mvc
tagged with: java
type: Question
answer count: 2

http://stackoverflow.com/comment/41075826
has text: edit the post with altenrative method. should work in add-sdk as well
comment on: http://stackoverflow.com/a/26174960
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26173591
favorite count: 0
accepted answer: http://stackoverflow.com/a/26173617
type: Question
score: 5
answer count: 1
has title: How to remove the setter from a JavaScript object?
has body: Consider the following code: var x = 0; var o = {}; function getter() { return x; } Object.defineProperty(o, "y", { get: getter, set: function (y) { x = y; Object.defineProperty(o, "y", { get: getter }); }, configurable: true }); My objective is to remove the setter and make the property o.y non-configurable after the setter has been called once. However it doesn't work as expected: &gt; x // 0 &gt; o.y // 0 &gt; o.y = 1 // 1 &gt; x // 1 &gt; o.y // 1 &gt; o.y = 2 // 2 &gt; x // 2 &gt; o.y // 2 So my code did not work as expected, and I can't think of any other solution. Hence this question.
upvote count: 5
tagged with: setter
has answer: http://stackoverflow.com/a/26173617
downvote count: 0
tagged with: javascript
tagged with: getter
tagged with: defineproperty
tagged with: getter-setter
type: AnsweredQuestion

http://stackoverflow.com/a/26184766
score: 1
has body: Try using Object.keys() Example: var myArray = [{ '10/3/2014': "some value"}, {'10/4/2014': "some value"}, {'10/5/2014': "some value"}]; Object.keys(myArray[0])[0]; // will return '10/3/2014' Object.keys(myArray[1])[0]; // will return '10/4/2014' Object.keys(myArray[2])[0]; // will return '10/5/2014' Hope this helps!
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26184658
answers question: http://stackoverflow.com/q/26184658
downvote count: 0

http://stackoverflow.com/a/26090156
upvote count: 1
has body: This might work: (function(a) { return function(a) { console.log('msg' + a); } })(3)(5); It says msg5, and you figure out why ;)
answers question: http://stackoverflow.com/q/26090098
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/q/26053191
has comment: http://stackoverflow.com/comment/40816457
score: 0
has title: Doughnut graph is not working in d3 with two Arc object dynamically
has comment: http://stackoverflow.com/comment/40815840
type: UnansweredQuestion
has body: I'm trying to create a doughnut graph, I have two entities to represent on the dougnut graph and need to show one with thick line i.e wider arc and one with narrow arc. I tried to achieve like this. Here is the FIDDLE I made two arc in beginning arc and arc2 and in the function var slice_path = slice_group.append("path") .attr("fill", function(d, i) { return color(i); }) .attr("d", function(d,i){console.log(d); return arc;}) .each(function(d) { this._current = d; }) here in the third line I want to do something like this .attr("d", function(d,i){ if(based on condition in d.series) return arc; else return arc2; }) But I'm not able to make it work, If i write it as .attr("d", function(d,i){console.log(d); return arc;}) It do not work ,but if i write as .attr("d", arc) It works. Could you guide me in case... !..
tagged with: data-visualization
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
tagged with: d3.js
type: Question
tagged with: charts
tagged with: javascript

http://stackoverflow.com/a/26071096
has body: that is not an array, that is an object that has a 2 properties "1" : { "deal" : { "deal_id" : "1", "qty" : "1", "option_price_sale" : "7900", "price_ship" : "2500", "ship_price_type" : "1" } } and "2" : { "deal" : { "deal_id" : "2", "qty" : "1", "option_price_sale" : "3880", "price_ship" : "2500", "ship_price_type" : "1" } } to make it an array it should be var deal_info = [ { "deal" : { "deal_id" : "1", "qty" : "1", "option_price_sale" : "7900", "price_ship" : "2500", "ship_price_type" : "1" } }, { "deal" : { "deal_id" : "2", "qty" : "1", "option_price_sale" : "3880", "price_ship" : "2500", "ship_price_type" : "1" } } ]; and as mentioned you can push new objects like deal_info.push({"3" : { "deal" : { "deal_id" : "3", "qty" : "1", "option_price_sale" : "3880", "price_ship" : "2500", "ship_price_type" : "1" } }});
accepted answer of: http://stackoverflow.com/q/26071079
type: Answer
answers question: http://stackoverflow.com/q/26071079
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/53737239
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40999540
comment on: http://stackoverflow.com/a/26151594
score: 0
type: AnswerComment
has text: if you need break the iteration on ordened list, return false into loop each. (http://api.jquery.com/jquery.each/)
type: Comment

http://stackoverflow.com/q/26101034
upvote count: 1
has answer: http://stackoverflow.com/a/26101097
accepted answer: http://stackoverflow.com/a/26101097
favorite count: 0
has answer: http://stackoverflow.com/a/26101093
has body: I am trying to extend the function prototype to return a singleton version of a function. Function.prototype.once = function() { var called = false, memo; return function() { console.log('AP', this); if (!called) memo = this.apply(this, arguments); called = true; return memo; } } The console logs the window object. Why is this != current function? And how to solve this?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26101094
downvote count: 0
score: 1
type: Question
possible better answer: http://stackoverflow.com/a/26101093
has title: Accessing "this" in Function.prototype not possible?
tagged with: javascript
answer count: 3

http://stackoverflow.com/comment/41055465
type: QuestionComment
comment on: http://stackoverflow.com/q/26183944
has text: @ZaheerAhmed false or undefined. It does not matter really.
score: 0
type: Comment

http://stackoverflow.com/comment/41036083
type: Comment
has text: There are quite a few issues here. First, your jsfiddle has errors even finding your controller. Second, I don't see where you define your angular app: where's your `angular.module("App", [])`? Before we get to "third", can you fix this first?
type: QuestionComment
comment on: http://stackoverflow.com/q/26173189
score: 1

http://stackoverflow.com/q/26182161
has answer: http://stackoverflow.com/a/26185797
has answer: http://stackoverflow.com/a/37467205
has comment: http://stackoverflow.com/comment/58877382
score: 27
type: Question
has answer: http://stackoverflow.com/a/33988711
has answer: http://stackoverflow.com/a/38069786
answer count: 7
has answer: http://stackoverflow.com/a/26182955
tagged with: javascript
tagged with: mocha.js
favorite count: 0
has body: I am currently using Nitrous, which shouldn't matter, but I needed to install mocha so I typed in: npm install - g mocha. Everything installed and when I try to run mocha in my command line I get the following error: /home/action/.parts/lib/node_modules/mocha/bin/_mocha:454 if (!files.length) throw new Error("cannot resolve path (or pattern) '" Error: cannot resolve path (or pattern) 'test/unit' at lookupFiles (/home/action/.parts/lib/node_modules/mocha/bin/_mocha:454:32) at runAgain (/home/action/.parts/lib/node_modules/mocha/bin/_mocha:305:24) at Array.forEach (native) at Object. (/home/action/.parts/lib/node_modules/mocha/bin/_mocha:304:6) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3 Does anyone know how to solve this?
upvote count: 28
has answer: http://stackoverflow.com/a/54257946
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/35525565
downvote count: 1
has title: Cannot resolve path in Mocha

http://stackoverflow.com/comment/41034023
has text: The problem is that you're looping `persec` times, and the click handler adds `persec` to the total each time. So that multiplies persec by persec.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26172531

http://stackoverflow.com/a/26156381
has body: You can do it this way $el = document.getElementsByClassName("b")[0]; if($el.parentNode.children.length > 0){ $firstEl = $el.parentNode.children[0]; } console.log($el == $firstEl); Using firstChild $el = document.getElementsByClassName("b")[0]; $firstEl = $el.parentNode.firstChild; console.log($el == $firstEl); will work if your dom is not when your dom is because any whitespace in between tags will cause #text node to be inserted node.firstChild
upvote count: 1
answers question: http://stackoverflow.com/q/26156107
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/26094383
has answer: http://stackoverflow.com/a/26094411
tagged with: javascript
tagged with: jquery
score: 42
duplicate of: http://stackoverflow.com/q/1009753
upvote count: 42
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has body: I want to make an element transparent to events. If I click on it, the element just behind to it get fired that event.
favorite count: 0
accepted answer: http://stackoverflow.com/a/26094411
has comment: http://stackoverflow.com/comment/40890876
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26094405
has answer: http://stackoverflow.com/a/26094405
type: Question
linked to: http://stackoverflow.com/q/1009753
has title: Can we make an element (div) transparent to mouse events?
has answer: http://stackoverflow.com/a/26094445

http://stackoverflow.com/comment/40834201
type: Comment
comment on: http://stackoverflow.com/q/26061856
type: QuestionComment
score: 0
has text: @slebetman, as DOCASAREL pointed out, eval doesnt work. (have removed the html)

http://stackoverflow.com/a/26178664
type: Answer
accepted answer of: http://stackoverflow.com/q/26178235
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26178235
has body: Try thumbnails: $("#galleria img").size()>1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26050279
linked to: http://stackoverflow.com/q/19402028
type: Question
score: 3
has title: Angular: redirecting /#%21/ to /#!/
tagged with: javascript
upvote count: 3
answer count: 2
possible better answer: http://stackoverflow.com/a/26050877
favorite count: 0
has answer: http://stackoverflow.com/a/26050877
accepted answer: http://stackoverflow.com/a/26228929
tagged with: angularjs
tagged with: http-redirect
has body: In emails that we send to users, we include links to Angular app like the following: http://example.com/#!/mypage We've noticed that some email clients or browsers, for one reason or another, upon click direct the user to this instead: http://example.com/#%21/mypage Angular then throws the following error: Uncaught Error: [$location:ihshprfx] Invalid url "http://example.com/#%21/mypage", missing hash prefix "#!". http://errors.angularjs.org/1.3.0-beta.10/$location/ihshprfx We are using $locationProvider.hashPrefix('!');. I'm trying to find a way to detect instances where $location is /#%21/ rather than /#!/ and then redirect properly, but I can't find a way to detect and/or get Angular to do this. What is the proper way to do this?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26228929
downvote count: 0

http://stackoverflow.com/comment/41062295
score: 1
comment on: http://stackoverflow.com/q/26187437
type: QuestionComment
type: Comment
has text: `fetch` is an AJAX call so you won't have anything in your collection immediately after `collection.fetch()`, you have to wait for the asynchronous operation to complete.

http://stackoverflow.com/comment/64366917
score: 0
has text: Back to 2016. I find a nice solution for divs. and publish it here to answer that question: http://stackoverflow.com/a/38479462/1919821
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26139475

uikeyboard
type: Tag
tag name: uikeyboard
tags question: http://stackoverflow.com/q/26146252

http://stackoverflow.com/a/26123941
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26123170
answers question: http://stackoverflow.com/q/26123170
upvote count: 1
has comment: http://stackoverflow.com/comment/40945469
has body: Problem here is All Section id's is getting duplicated. Section id's woda,oferta, o-firmie, galeria and kontakt.All section id's is getting duplicated double times in HTML markup. Please change their duplicated id's value for a section then it will working fine.
type: Answer
has comment: http://stackoverflow.com/comment/40945318
score: 1

http://stackoverflow.com/q/26123282
type: Question
has comment: http://stackoverflow.com/comment/40942831
has answer: http://stackoverflow.com/a/26123350
upvote count: 0
has comment: http://stackoverflow.com/comment/40942720
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40942697
downvote count: 8
has body: Please refer to the switch statement in JavaScript below and the same is not working.Please advise on the errors. function main(arg1){ switch(arg1) { case 'Jatin': alert('This is Jatin'); break; case 'Vivek': alert('This is Vivek'); break; case 'Vikas': alert('This is Vikas'); break; default: alert('The name is not found'); }; main("Jatin");
tagged with: http://stackoverflow.com/tag/html
has title: Switch Statement-JavaScript
accepted answer: http://stackoverflow.com/a/26123350
has comment: http://stackoverflow.com/comment/40942722
score: -8
has comment: http://stackoverflow.com/comment/40942689
type: AnsweredQuestion

event-loop
tags question: http://stackoverflow.com/q/26114749
type: Tag
tag name: event-loop

http://stackoverflow.com/q/26059844
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40827850
has body: I just downloaded the AngularJS SPA template for Visual studio and started with my first application. And i am facing lot of problems already !!! Below is my PersonView : Add Person First Name: Middle Name: Last Name: Name : {{firstName + middleName + lastName}} Below is my Controller class : 'use strict'; // Google Analytics Collection APIs Reference: // https://developers.google.com/analytics/devguides/collection/analyticsjs/ angular.module('app.controllers', []) // Path: / .controller('HomeCtrl', ['$scope', '$location', '$window', function ($scope, $location, $window) { $scope.$root.title = 'AngularJS SPA Template for Visual Studio'; $scope.$on('$viewContentLoaded', function () { $window.ga('send', 'pageview', { 'page': $location.path(), 'title': $scope.$root.title }); }); }]) // Path: /about .controller('AboutCtrl', ['$scope', '$location', '$window', function ($scope, $location, $window) { $scope.$root.title = 'AngularJS SPA | About'; $scope.$on('$viewContentLoaded', function () { $window.ga('send', 'pageview', { 'page': $location.path(), 'title': $scope.$root.title }); }); }]) // Path: /login .controller('LoginCtrl', ['$scope', '$location', '$window', function ($scope, $location, $window) { $scope.$root.title = 'AngularJS SPA | Sign In'; // TODO: Authorize a user $scope.login = function () { $location.path('/'); return false; }; $scope.$on('$viewContentLoaded', function () { $window.ga('send', 'pageview', { 'page': $location.path(), 'title': $scope.$root.title }); }); }]) .controller('PersonCtrl', ['$scope', function($scope) { //$scope.$root.title = 'Create Person'; $scope.firstName = 'Aditya'; $scope.lastName = 'Swami'; $scope.middleName = ' '; }]) // Path: /error/404 .controller('Error404Ctrl', ['$scope', '$location', '$window', function ($scope, $location, $window) { $scope.$root.title = 'Error 404: Page Not Found'; $scope.$on('$viewContentLoaded', function () { $window.ga('send', 'pageview', { 'page': $location.path(), 'title': $scope.$root.title }); }); }]…
has comment: http://stackoverflow.com/comment/40826956
score: 1
upvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26060248
answer count: 2
has comment: http://stackoverflow.com/comment/40831134
downvote count: 0
has answer: http://stackoverflow.com/a/26059976
tagged with: asp.net
favorite count: 0
has title: Binding not happening with AngularJS
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40826891

http://stackoverflow.com/a/55680676
answers question: http://stackoverflow.com/q/26193654
upvote count: 11
has body: If you ever run into this problem in AWS Lambda, you should consider increasing the memory allocated to the function.
type: Answer
downvote count: 0
score: 11

http://stackoverflow.com/comment/40805345
type: AnswerComment
comment on: http://stackoverflow.com/a/26047594
type: Comment
has text: No, that will find the third child among child elements of the items, not the item which is a third-child of it's parent.
score: 0

http://stackoverflow.com/comment/41002605
has text: you're right if i make IMG to div as object instead of background that will be solve...but in above that image i will put same input text so i think that not suit my case...anyway when i try to use that js code...i resize down, and mybanner gone it's seem like mybanner.div.style become 0
comment on: http://stackoverflow.com/a/26155498
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41002526
score: 0
comment on: http://stackoverflow.com/q/26115038
has text: Not sure this is what you are trying to do, but executeQuery() is returning a Q promise, so process data.results like this: executeQuery(someQuery).then(function(results){ alert(results); });
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26061348
downvote count: 1
has body: You can replace: $(this).find('legend') with: $('legend', this) The second argument sets the context in which jQuery searches for 'legend'. If it is omitted, the context defaults to be document.
answers question: http://stackoverflow.com/q/26060694
score: -1
has comment: http://stackoverflow.com/comment/40830024
upvote count: 0
has comment: http://stackoverflow.com/comment/40830315
type: Answer
has comment: http://stackoverflow.com/comment/40830734
has comment: http://stackoverflow.com/comment/40829804
has comment: http://stackoverflow.com/comment/40830261
has comment: http://stackoverflow.com/comment/40830090

http://stackoverflow.com/comment/40935181
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26118697
has text: The data format on that file seems weird. It's neither XML nor JSON. No wonder the language facility isn't working. I guess you'll have to write some custom logic.
score: 0

http://stackoverflow.com/comment/40801672
has text: Do you mean when you mouseover? In your fiddle example, when I click, nothing happens. When I mouseover, though, the color changes...
comment on: http://stackoverflow.com/q/26045660
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26150273
score: 1
answers question: http://stackoverflow.com/q/26148543
has body: The reason you see this is that JavaScript has function-based scoping rules. What we have here is an immediately invoked function expression (IIFE) which is a feature of the JavaScript language enabling a function to be declared and invoked in one convenient expression. (function(){ /*Javascript file contents here*/ })(); Any var or function declarations inside this IIFE will not be visible outside of the the IIFE unless explicitly revealed (for example, but returning them on an object). (function(){ function notRevealed() {} function revealed() {} myApp.revealed = revealed; })(myApp); notRevealed; //undefined revealed; //undefined myApp.revealed //defined In order to catch another common class of errors you'll want to add 'use strict'; to the top of your function to ensure that variables defined without var are not placed on the global object as properties and that this is not erroneously set to the global object. (function(){ 'use strict'; /*Javascript file contents here*/ })();
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/41029194
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26160048
type: QuestionComment
has text: How do you obtain the other promises? This code is as parallel/sequential as `.all`

http://stackoverflow.com/comment/41087383
has text: actually execute the Javascript code and then read the returned http. I am looking at QtWebkits as a possible solution. I just haven't found any decent sample code.
comment on: http://stackoverflow.com/a/26158333
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/q/26072835
score: 0
linked to: http://stackoverflow.com/q/11605917
has answer: http://stackoverflow.com/a/26073176
accepted answer: http://stackoverflow.com/a/26073176
has comment: http://stackoverflow.com/comment/40851472
has comment: http://stackoverflow.com/comment/40851168
has title: Model does not change without $scope.$apply
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40851572
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40851639
has comment: http://stackoverflow.com/comment/40851674
type: Question
has comment: http://stackoverflow.com/comment/40851523
answer count: 1
tagged with: javascript
has body: The question: Is there a way to get the desired model change without injecting $scope into an Angular "controller as" method in the following set up? The html: The controller: angular.module('App').controller('Buildings', ['$scope', 'BuildingService', 'Geolocation', function ($scope, BuildingService, Geolocation) { var vm = this; BuildingService.getAll().then(function (buildings) { vm.buildings = buildings; vm.selected = { // defaults building: buildings[0], room: null }; }); if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function (position) { vm.selected.building = Geolocation.closest(position, vm.buildings); vm.selected.room = null; $scope.$apply(); // <--- Why is that needed? }); } vm.changeBuilding = function () { vm.selected.room = null; console.log(vm.selected); }; vm.changeRoom = function () { console.log(vm.selected); }; } ]); The explanation: I fetch an array of buildings from a service, and then set the first one as a default into the scope. Then I calculate (using latitudes, and longitudes of the buildings) which of the buildings is the closest one to my current location, and change the model object accordingly. This all works. The default building flashes in the first html select control, which then changes into the nearest building. However, I find it awkward having to inject $scope into the controller, when I'm using the "Controller as" syntax, because usually that is not needed. You see, if I take out the $scope.$apply(); line, the view does not change. It still shows the default building, even though the vm.selected.building actually contains the closest one. (And when I try to select a room from the second html select, the first one updates to the value actually in the vm.selected.building model object. So, why is this? Is there a way to get the desired functionality without the injection? EDIT: So the real question is: Why do I have to call $scope.$apply() here? Why does the view not change without it?

http://stackoverflow.com/comment/41015712
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26162512
type: AnswerComment
has text: Add a name for input element, that's why it doesn't appears when you call $(this).serialize()

http://stackoverflow.com/comment/40863421
comment on: http://stackoverflow.com/a/26071630
has text: Not sure if it's crucial for node module. In any case if I was a teacher who gave such task, the next task would probably to change the code to use Anagram as a constructor (`var subject = new anagram("diaper");`). Current approach fits such task too without any code changes.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40907374
comment on: http://stackoverflow.com/a/26103500
type: AnswerComment
score: 0
type: Comment
has text: @FelixKling Good point. Maybe the `reverse` and `slice` can be reversed then to overcome that?

http://stackoverflow.com/comment/40963873
has text: How do you trigger periodic ajax requests?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26134803

http://stackoverflow.com/q/26135849
answer count: 1
tagged with: oauth
has body: I am trying to create a login page using google oAuth. For this i have created a clientID. In ClientID i have done created for Android since i believe i app would be running on an Android Device. Create Client Id ->Installed Application -> Android I have done keytooling and signed it with SHA1 and create a clientID then i created a Public API Access. In this i have created an Android Key. I have provided the com name and SHA1 details. Since i am using an INTEL XDK it was easy to get the COM namespane from there. In my javascript code i have done something like this to construct the URL. var clientID ="client_id="; var responeType = "&amp;response_type=code"; var scope ="&amp;scope=profile"; var scope ="&amp;scope=https://www.googleapis.com/auth/calendar.readonly"; var redirectURL ="&amp;redirect_uri=urn:ietf:wg:oauth:2.0:oob"; var url ="https://accounts.google.com/o/oauth2/auth?"+clientID+responeType+scope+redirectURL+"&amp;approval_prompt=auto"; then i have used an XHRRequest to give a call to this URL var xhr = new XMLHttpRequest(); xhr.open("GET",url,false); xhr.onload = function() { if(xhr.readyState==4 &amp;&amp; xhr.status==200) { console.log(this.response); var resp = this.response; } } xhr.onerror = function(e) { alert("Error : "+e) } xhr.send(); I have a button with event listener attached to it. I am new to android and especially to oAuth. I am getting all sort of errors such as Please copy this code, switch to your application and paste it there: when i click the button i do not see any login Page from google asking for permission but i can see data coming in console.log(). What is wrong that i am doing here. If there are any way to create Hybrid APp using html5 please share. also please tell me if i am doing it write or wrong.Please guide me. -S
type: UnansweredQuestion
tagged with: android
tagged with: http://stackoverflow.com/tag/html
tagged with: authentication
has answer: http://stackoverflow.com/a/26149798
type: Question
tagged with: javascript
score: 0
has title: oAuth using Google API creating Hybrid App

http://stackoverflow.com/q/26082525
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26082551
has comment: http://stackoverflow.com/comment/40869212
has comment: http://stackoverflow.com/comment/40869270
answer count: 1
favorite count: 0
score: 0
has comment: http://stackoverflow.com/comment/40898319
has body: This slideshow code works great but runs only once on first mouseover; how should I fix it to make it run on every mouseover (when completed)? function slideImages(slider){ // slider is the element var $active = $('.active', slider); // search for .active in this element var $next = ($('.active', slider).next().length > 0) ? $('.active', slider).next() : $('img:first', slider); $next.css('z-index',2); $active.css('z-index',1); $next.animate({left:0},"fast",function(){ $next.addClass('active'); }); } $(document).ready(function(){ $('.portfolio_slider').on('mouseover', function(){ var _this = this; // save it for other context setInterval(function(){ slideImages(_this); }, 400); $(this).off('mouseover'); }); }); HTML main small
has comment: http://stackoverflow.com/comment/40869046
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26082551
has title: make code run on every mouseover
has comment: http://stackoverflow.com/comment/40869151
type: Question
has comment: http://stackoverflow.com/comment/40869052
tagged with: javascript

http://stackoverflow.com/comment/40851796
score: 0
type: Comment
has text: The structure is `.profile-wrapper > .tabs-wrapper > .tab > .post`.
type: AnswerComment
comment on: http://stackoverflow.com/a/26073201

http://stackoverflow.com/a/26156638
answers question: http://stackoverflow.com/q/26156536
type: Answer
score: 2
downvote count: 0
upvote count: 2
has body: You can see the difference yourself, var events = require('events'), emitter = new events.EventEmitter(); console.log(typeof emitter); // object but when you do something like this var emitter = require('events').EventEmitter; console.log(typeof emitter); // function In the first case, you are invoking the EventEmitter constructor function to get an object, but in the second case, you are simply making emitter a reference to the EventEmitter function itself. As far as the new part is concerned, it operates on a function object. Since you have no parameters to pass to EventEmitter, the parenthesis is optional. But everywhere else, you need to use (...) to execute the function.

http://stackoverflow.com/a/26064801
has comment: http://stackoverflow.com/comment/40836722
type: Answer
answers question: http://stackoverflow.com/q/26064290
has comment: http://stackoverflow.com/comment/40836523
score: 0
has body: Please, put the &lt;form&gt; tag before the while loop, otherwise you'll have as many opened forms as rows in the query's result set.

http://stackoverflow.com/q/26065054
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 1
has answer: http://stackoverflow.com/a/26065151
has comment: http://stackoverflow.com/comment/40837613
answer count: 2
has comment: http://stackoverflow.com/comment/41015687
upvote count: 1
possible better answer: http://stackoverflow.com/a/26065351
has answer: http://stackoverflow.com/a/26065351
accepted answer: http://stackoverflow.com/a/26065151
has body: I have an img carousel that has the description content on the right for widescreen windows, then when the browser window reaches the breakpoint the description goes below the images. I would like to have the div be sized based on the amount of text in the longest description, otherwise as the carousel animates the rest of the page moves up and down based on the amount of text in the description. I'm assuming that I need to have some javascript that looks through all the carousel text descriptions and then sets the height of the container div based on the longest description text. Any ideas how to get this done? Update: I created this http://jsfiddle.net/chpucat0/ to show what I need. I need all the heights of all the divs to match the div with the most text in it. Small amount of text Slightly larger amount of text. And then the really, really, really long description here.
type: AnsweredQuestion
has title: Set height of container div for carousel based on length of text
downvote count: 0
linked to: http://stackoverflow.com/q/614881
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/13590322
favorite count: 0

http://stackoverflow.com/comment/40915464
has text: thanks for the answer, format outputs a string, what I want is a javascript date object. Even worse, format returns a date string that is one day behind 8-)
comment on: http://stackoverflow.com/a/26107896
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40991084
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26148875
has text: @TylerCrompton, my answer is still valid.
type: AnswerComment

http://stackoverflow.com/q/26044113
has answer: http://stackoverflow.com/a/26044629
has title: Using .append() in a loop to add text from an object after a based on the selected option
has answer: http://stackoverflow.com/a/26044228
answer count: 2
has body: I want to insert a peace of text under a dropdown menu after an option has been selected based on what option was selected. I've written code that will do exactly what I want it to. But it seems like there should be a faster and more elegant way to handle what I'm trying to do. I'm thinking loop but loops confuse me a bit and I'm not sure what I've done wrong with the function I wrote to try do this. Here is my original working code: $('#Total_Package_Pool_Size').change(function() { $('#PS_Dyn_warn').empty(); $('#PS_Dyn_warn').append("This is the exact size of the pool, this is not an up to size.") var PS_Warning_Obj = { one : " A pool 14 x 28 is track space 14 and track length 29", two : " A pool 16 x 32 is track space 16 and track length 33", three: " A pool 18 x 34 is track space 18 and track length 35", four : " A pool 20 x 40 is track space 20 and track lenght 41" }; var PS_Warning = document.getElementById('PS_Dyn_warn'); var sizeDD = document.getElementById('Total_Package_Pool_Size'); var sizeOpt = sizeDD.options[sizeDD.selectedIndex].text; switch (sizeOpt) { case "14 x 28": $('#PS_Dyn_warn').show(); $("#PS_Dyn_warn").append(PS_Warning_Obj.one); break; case "16 x 32": $('#PS_Dyn_warn').show(); $("#PS_Dyn_warn").append(PS_Warning_Obj.two); break; case "18 x 36": $('#PS_Dyn_warn').show(); $("#PS_Dyn_warn").append(PS_Warning_Obj.three); break; case "20 x 40": $('#PS_Dyn_warn').show(); $("#PS_Dyn_warn").append(PS_Warning_Obj.four); break; } }); And here is the loop I tried to write: var PS_Warning_Obj = {}; PS_Warning_Obj['14x28'] = [" A pool 14 x 28 is track space 14 and track length 29"]; PS_Warning_Obj['16x32'] = [" A pool 16 x 32 is track space 16 and track length 33"]; PS_Warning_Obj['18x36'] = [" A pool 18 x 34 is track space 18 and track length 35"]; PS_Warning_Obj['20x40'] = [" A pool 20 x 40 is track space 20 and track lenght 41"]; function Dynamic_PS_Warning() { $('#PS_Dyn_warn').empty(); $('#PS_Dyn_warn').append("This is the exact size of the pool, thi…
score: 0
tagged with: loops
accepted answer: http://stackoverflow.com/a/26044228
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
type: Question
possible better answer: http://stackoverflow.com/a/26044629

http://stackoverflow.com/q/26096059
tagged with: if-statement
tagged with: javascript
has answer: http://stackoverflow.com/a/26096246
score: 0
has answer: http://stackoverflow.com/a/26096220
has body: import java.util.Scanner; public class grade { public static void main(String args[]) { Scanner input = new Scanner(System.in); double no; System.out.print("Please enter your CPA: "); no = input.nextDouble(); if (2.00&lt;=no)//2.00&lt;=CPA&lt;= 2.49 System.out.println("forth class"); else if (2.50&lt;=no)//2.50&lt;=CPA&lt;=2.99 System.out.println("third class"); else if (3.00&lt;=no)//3.00&lt;=CPA&lt;=3.74 System.out.println("second class"); else if (3.74&lt;=no)//(no&gt;=3.75) System.out.println("first class"); else System.out.println("You did not follow the order."); } } if i enter for example i enter the grade 3.5 it will print out the forth class, also if i gave 4.00 also it will print out the forth class. Why it didnt print out the exact answer?
possible better answer: http://stackoverflow.com/a/26096137
answer count: 7
has answer: http://stackoverflow.com/a/26096137
has answer: http://stackoverflow.com/a/26096102
has answer: http://stackoverflow.com/a/26096181
has comment: http://stackoverflow.com/comment/40894848
has answer: http://stackoverflow.com/a/26098286
type: AnsweredQuestion
tagged with: java
has comment: http://stackoverflow.com/comment/40894378
has comment: http://stackoverflow.com/comment/40894811
type: Question
has answer: http://stackoverflow.com/a/26096212
has title: grading with if else statement
accepted answer: http://stackoverflow.com/a/26096102

http://stackoverflow.com/comment/40958287
score: 0
type: Comment
has text: @user2860931 But when you hide a div that wraps label and checkbox, they both won't get to be seen. Is this not OK for you?
comment on: http://stackoverflow.com/a/26116962
type: AnswerComment

http://stackoverflow.com/comment/40932425
score: 0
type: Comment
has text: Checking the tool. Will let you know if it fixes my issue. Thankyou
comment on: http://stackoverflow.com/a/26116870
type: AnswerComment

http://stackoverflow.com/a/26034588
accepted answer of: http://stackoverflow.com/q/26034314
answers question: http://stackoverflow.com/q/26034314
type: Answer
score: 14
downvote count: 0
has comment: http://stackoverflow.com/comment/101709446
type: AcceptedAnswer
has body: Once you have created an element, you can use Element.cloneNode() to copy it. It takes same time as document.createElement(), but has one advantage: if you have set several attributes or childNodes/innerHTML on the element, you can copy those too with one call: Element.cloneNode(true). Most time takes the DOM-insertion of newly created Elements, and therefor insertion of every single new element is slow. A faster way is to create a documentFragment, append all new elements to that in the structure you need and then add the complete fragment to the DOM.
upvote count: 14

http://stackoverflow.com/comment/40909519
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26104893
has text: what version of IE is this not working?
score: 0

http://stackoverflow.com/a/26148505
type: Answer
answers question: http://stackoverflow.com/q/26148452
score: 0
has body: $('.grid-cell').each(function(){ // loop through each grid-cell var currentValue = $(this).text(); // get its text $(this).closest('.grid-row').attr('data-row-key', currentValue); // add the attribute to the grid-cell's parent });

http://stackoverflow.com/q/26175348
score: 0
has comment: http://stackoverflow.com/comment/105219184
has answer: http://stackoverflow.com/a/26176675
has comment: http://stackoverflow.com/comment/41039230
has title: disable redirect after submit form
has comment: http://stackoverflow.com/comment/41039295
type: UnansweredQuestion
tagged with: razor
has body: I have form @using (Html.BeginForm("ActionName", "ControllerName", FormMethod.Post)) { ... &lt;input type="submit" /&gt; } and when i submit this form, i get redirect to /ControllerName/ActionName. I can stop this if add onsubmit like this @using (Html.BeginForm("ActionName", "ControllerName", FormMethod.Post, new {onsubmit="return Submit();"})) and script like this Submit = function() { ... return false; } Is there the true-way to prevent redirect without custom script? UPD: the server-side code [HttpPost] public JsonResult MySubmit(ParamsClass params) return new JsonResult { Data = BusinessLogicOperations(); }; }
has comment: http://stackoverflow.com/comment/41039683
linked to: http://stackoverflow.com/q/19438937
type: Question
tagged with: c#
tagged with: asp.net-mvc-5
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/41042206
answer count: 1
has comment: http://stackoverflow.com/comment/41040352
tagged with: javascript

http://stackoverflow.com/q/26153521
score: 0
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/26153670
type: Question
has body: For example, let's say I have a list of the jQuery object functions and its prototype functions: /* jQuery object functions example jQuery.isArray jQuery.isFunction jQuery.proxy jQuery.ajax */ /* jQuery prototype functions example jQuery.fn.init jQuery.fn.val jQuery.fn.css */ This is a very small subset of jQuery and I may not necessarily want to include all of jQuery when I know I will only use these functions. I could copy and paste from jQuery, but there are a lot of dependency chains between the jQuery functions and local functions and vars used within the jQuery closure, which are hard to grab all of by hand. My list is also quite bigger than this, this was just used as a small example. My question is if there is a tool to do a static analysis of jQuery whereby you list the functions you want (like above) and get back the needed bits of code.
answer count: 2
has title: How do you only include the parts of jQuery that are used by your app
tagged with: javascript
tagged with: jquery
tagged with: static-analysis
has answer: http://stackoverflow.com/a/26153545
favorite count: 0
has comment: http://stackoverflow.com/comment/40998650
upvote count: 2

http://stackoverflow.com/comment/40866714
comment on: http://stackoverflow.com/q/26079235
score: 0
type: Comment
type: QuestionComment
has text: Huh? It is not clear at all what you are trying to do.

http://stackoverflow.com/comment/40990515
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26147526
has text: Just a piece of advice: I use a lot Asp.net MVC, but when I have a situation like this (when the user interface change a lot and have different inputs and scenarios) I add to my solution Knockout.js -> http://learn.knockoutjs.com/, is very very useful for things like this.
type: Comment

http://stackoverflow.com/comment/40820855
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26055943
has text: Ya I know that but if parent and child are referring to same db which I am using at a time and at a time of writing data to db these process through an error message that's why I am looking for threads.

http://stackoverflow.com/comment/41071016
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26192634
has text: You are looking for a value named 'property', which is undefined.

http://stackoverflow.com/comment/40986225
has text: @HorstGutmann- Sorry if this doesn't relate to JSON. My lack of scripting XP to blame :( ... I was trying to use either to accomplish clicking...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26140526

http://stackoverflow.com/comment/40903751
type: AnswerComment
type: Comment
has text: I have a function for 'next', 'prev' and 'thumb click', all of which contain animations.
comment on: http://stackoverflow.com/a/26101016
score: 0

http://stackoverflow.com/comment/40893724
has text: @Ammu then after it's inserted add a `die;` to kill further execution.
type: AnswerComment
comment on: http://stackoverflow.com/a/26095519
score: 0
type: Comment

http://stackoverflow.com/comment/40868927
comment on: http://stackoverflow.com/q/26082421
score: 0
type: QuestionComment
has text: i will come up with jsfiddle wait plz.
type: Comment

http://stackoverflow.com/comment/40871377
has text: As a rule there's only one `body` element in DOM. If you have more than one - it's time to ...
type: QuestionComment
comment on: http://stackoverflow.com/q/26083948
score: 0
type: Comment

http://stackoverflow.com/comment/40896497
has text: http://pastebin.com/cuVHiewU app.js Sorry about this im not good with this website.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26094586

http://stackoverflow.com/comment/40840890
type: QuestionComment
comment on: http://stackoverflow.com/q/26066998
score: 0
type: Comment
has text: can you provide a bit more code and markup? jsfiddle?

http://stackoverflow.com/a/26146886
type: Answer
upvote count: 6
accepted answer of: http://stackoverflow.com/q/26134182
has body: You can do this in one step: moment.tz(1412144245453, 'America/Los_Angeles').format('MM/DD/YYYY h:mm a') OUTPUT: "09/30/2014 11:17 pm" Also, you had evaluated the times for this timestamp incorrectly. In UTC, this timestamp is October 1st, 2014 6:17:25 AM. The corresponding Pacific time is indeed September 30th, 2014, 11:17:25 PM. You can check this using a site like epochconverter.com, or in moment.js like so: moment.utc(1412144245453).format() // "2014-10-01T06:17:25+00:00"
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26134182
has comment: http://stackoverflow.com/comment/40990620
score: 6

http://stackoverflow.com/q/26094221
has answer: http://stackoverflow.com/a/26094313
linked to: http://stackoverflow.com/q/1707349
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/1707349
type: Question
has title: jQuery validate popover: Removing element's style class
tagged with: bootstrap-popover
accepted answer: http://stackoverflow.com/a/26094313
tagged with: javascript
tagged with: jquery
tagged with: jquery-validate
has body: Currently I am working on web application which is going to have multi-step forms. I am validating each part of the form by jquery validate plugin. Also I wanted validation messages as a pop over. For this I have used jquery validate popover plugin. Both libraries are serving my purpose. But I am facing a problem which is little bit weird. For required fields I wanted input box in red border on blur event. And when input is right I wanted to remove that error class from div element's style. I have this thing working here: http://plnkr.co/edit/369WMY7uDdRLNfC8NZrp?p=preview $(function() { $('#myform').validate({ rules: { personalEmail: { email: true } }, messages: { personalEmail: { email: "Custom Message - Please fill email id in proper format" } }, highlight: function (element) { $(element).closest('div').addClass('has-error'); }, success: function (element) { $(element).closest('div').removeClass('has-error'); }, onsubmit: false, popoverPosition: 'top' }); }) When I added validate pop over plugin everything is going good except the removal of error class from the style of input box. I don't know why jquery is not able to remove error class from the style of div element. I have this weird working demo here: http://plnkr.co/edit/7iHoypnc1P0x7eiGLtLj?p=preview $(function() { $('#myform').validate_popover({ rules: { personalEmail: { email: true } }, messages: { personalEmail: { email: "Custom Message - Please fill email id in proper format" } }, highlight: function (element) { $(element).closest('div').addClass('has-error'); }, success: function (element) { $(element).closest('div').removeClass('has-error'); }, onsubmit: false, popoverPosition: 'top' }); }) I am not able to figure out why this is happening. Is there anything breaking inside validate popover plugin?
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40905268
tagged with: twitter-bootstrap

http://stackoverflow.com/q/26131003
has answer: http://stackoverflow.com/a/26131085
type: AnsweredQuestion
has body: I need to calculate a JS date given year=2014 and month=9 (September 2014). I tried this: var moment = require('moment'); var startDate = moment( year+'-'+month+'-'+01 + ' 00:00:00' ); var endDate = startDate.endOf('month'); console.log(startDate.toDate()); console.log(endDate.toDate()); Both of logs show: Tue Sep 30 2014 23:59:59 GMT+0200 (CEST) Tue Sep 30 2014 23:59:59 GMT+0200 (CEST) End date is correct but... why the start date is not?
accepted answer: http://stackoverflow.com/a/26131085
type: Question
score: 117
has answer: http://stackoverflow.com/a/38734275
has answer: http://stackoverflow.com/a/54534679
downvote count: 0
has answer: http://stackoverflow.com/a/51883163
tagged with: javascript
has answer: http://stackoverflow.com/a/47267982
has answer: http://stackoverflow.com/a/43073544
has title: Moment JS start and end of given month
possible better answer: http://stackoverflow.com/a/47267982
has answer: http://stackoverflow.com/a/56372003
has answer: http://stackoverflow.com/a/48804863
tagged with: momentjs
favorite count: 0
upvote count: 117
has answer: http://stackoverflow.com/a/67320584
answer count: 12
has answer: http://stackoverflow.com/a/47809467
has answer: http://stackoverflow.com/a/52701533
has answer: http://stackoverflow.com/a/26131086

http://stackoverflow.com/comment/40875320
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26085997
score: 0
has text: *"I need to align three inputs inside single ` ` but I don't know how to do it"* - How do you want to align them..?

http://stackoverflow.com/q/26159234
type: Question
upvote count: 0
has comment: http://stackoverflow.com/comment/41008959
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41008861
has comment: http://stackoverflow.com/comment/41008856
answer count: 3
has answer: http://stackoverflow.com/a/26159348
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41008904
has answer: http://stackoverflow.com/a/26159324
tagged with: dom-events
favorite count: 0
possible better answer: http://stackoverflow.com/a/26159348
linked to: http://stackoverflow.com/q/17636528
has title: How to create an href that opens a div on screen?
tagged with: css
has comment: http://stackoverflow.com/comment/41009384
type: AnsweredQuestion
has body: I have a page with a link, that I want that every time a user clicks on it – it opens a div with content on it - and clicking anywhere will close it. How do I do this using CSS? Or should I do this using JavaScript? How? Is it more recommended to do this using JS? What loads faster on a webpage? Fiddle to start with: http://jsfiddle.net/dnaLqa0g/1/ A LINK this is some text. #popush{ /*display:none; */ border: 1px solid black; margin:0 auto; width: 200px; height:100px; }
accepted answer: http://stackoverflow.com/a/26159324
has answer: http://stackoverflow.com/a/26163748
downvote count: 1
has comment: http://stackoverflow.com/comment/41009471

http://stackoverflow.com/comment/41045721
has text: I've never been using this library, and I don't know what version are you using. However I take a look at: `http://zeroclipboard.org/` and I see that this is possible adding `aftercopy` event in your object with the follow code: `clip.on("aftercopy", function(event){ alert("Copied text to clipboard: " + event.data["text/plain"]); });` I just tried with 2.1.6 version and works correctly.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26178494
type: AnswerComment

http://stackoverflow.com/comment/40873594
comment on: http://stackoverflow.com/a/26074970
score: 0
type: Comment
has text: Thank you, WisdmLabs! Wow, there are many ways to do so. Thanks again
type: AnswerComment

http://stackoverflow.com/comment/40916485
type: AnswerComment
score: 0
type: Comment
has text: Ok. All of them are php files and I am certain that it's erroring out at the server side. You should be able to get to "error.log" file. How are you copying these files to the folders on the webserver? That file should be in the same location. I am pretty sure that you have PHP bug that is not letting anything sent to the browser.
comment on: http://stackoverflow.com/a/26107829

http://stackoverflow.com/q/26109568
has body: I have some users in the mongodb/mongoose database and I want to put all their names of people in the same zip code into an array. var namesArray = []; Users.find({ zip: '55555' }, function ( err, people ) { for ( i = 0, i &lt; people.length, i++ ) { namesArray[i] = people.name // How do I specify which person to use if they're all being returned at once? }; });
has comment: http://stackoverflow.com/comment/40918242
score: 0
linked to: http://stackoverflow.com/q/23667086
answer count: 1
type: UnansweredQuestion
has title: Create an array of objects from mongoose database
has answer: http://stackoverflow.com/a/26110544
tagged with: mongodb
has comment: http://stackoverflow.com/comment/40918352
has comment: http://stackoverflow.com/comment/40918286
tagged with: mongoose
tagged with: javascript
has comment: http://stackoverflow.com/comment/40918293
type: Question

http://stackoverflow.com/q/26156775
score: 0
has answer: http://stackoverflow.com/a/26157517
tagged with: internet-explorer
type: Question
has body: I use this code to detect changes to a form and then perform a get request using the serialized form data. This works in all browsers that I have tested on. But I'm on a mac and now I get emails from people saying that it doesn't work in IE 11. What could be wrong? Error message: "webpage.com is not responding due to a long running script" I've tried testing this myself using IE 11 in a VirtualBox but the webpage becomes unresponsive as soon as I change something to the form. I'm not sure how to find out what's wrong.. I have no loops so I don't get why this script would make the page unresponsive. Please help. jQuery('.appselect').change(function(e) { if (jQuery(window).width() &gt; 800) { jQuery.get('/?' + jQuery('#appfilter').serialize(), function(data) { jQuery('#postloop').replaceWith( jQuery(data).find('#postloop') ); if (!jQuery('#pagination').length) { jQuery('#postloop').after(jQuery(data).find('#pagination')); } else { jQuery('#pagination').replaceWith(jQuery(data).find('#pagination')); } }); } }); This is a wordpress page, but I think the problem is not related to Wordpress. I'm using jQuery 1.11.1.
answer count: 1
tagged with: javascript
tagged with: jquery
has title: jQuery ajax get request not working with IE 11
has comment: http://stackoverflow.com/comment/41004549
has comment: http://stackoverflow.com/comment/41004865
type: UnansweredQuestion

http://stackoverflow.com/a/26046981
downvote count: 0
type: Answer
has body: You could go a couple routes. Since your need for dialog content is pretty specific (textarea control - first dialog pops second dialog - etc), I would hard-code the needed divs on the page. So, make a "#textAreaDialog" div and put the needed controls in it ad set its style to display:none. Next, modify your function to accept parameters (the name of the div that should be popped, the funciton to execute if "OK" is clicked - and the function to execute if "Cancel" is clicked), so you're not limited to using #dialog for all of your modals and you can finely control what happens when each button is clicked (not always just closing the dialog. Then, set event handlers for the click events of the buttons you need, and call your dialog accordingly. html: &lt;input type="button" id="btnPopFirstModal" Value="Open First Modal"/&gt; &lt;div id="divFirstModal" style="display:none;"&gt; Here is the content for the first modal &lt;/div&gt; &lt;div id="divSecondModal" style="display:none;"&gt; Here is the content for the second modal &lt;/div&gt; Javascript functions: function PopDialog(divToPop, OkFunction, CancelFunction) { $("#" + divToPop).dialog({ autoOpen: false, resizable: true, width:"750", height:300, modal: true, buttons: { "Ok": function() { OkFunction(); $(this).dialog("close"); }, "Cancel": function(){ CancelFunction(); $(this).dialog("close"); } } }); }); } function PopSecondModal(){ PopDialog("divSecondModal", function(){ put code for OK Click here}, function(){put code for Cancel Click here}); } Javascript event handlers: $("#btnPopFirstModal").click(function(e){ e.preventDefault(); PopDialog("divFirstModal", PopSecondModal, function(){}); //empty function for cancel, but you can add your own code as needed return false; }); Remember, you can expand this as much as you want, adding more event handlers and custom divs to use for more tailored modals. Also, as you can see, you can write your OK and Cancel funcitons inline when calling the PopDialog function - or yo…
upvote count: 1
answers question: http://stackoverflow.com/q/26046641
score: 1

http://stackoverflow.com/a/57403554
answers question: http://stackoverflow.com/q/26103362
downvote count: 0
score: 4
upvote count: 4
type: Answer
has body: This can be accomplished by adding a for loop inside drawCallBack function. Referring to http://www.datatables.net/examples/advanced_init/row_grouping.html for drawCallBack function. Please note I am using legacy dataTable function i.e fnDrawCallBack replace that with latest equivalent. fnDrawCallback: function(settings) { var api = this.api(); var rows = api.rows({ page: "current" }).nodes(); var last = null; var storedIndexArray = []; api.column(0, { page: "current" }) .data() .each((group, i) =&gt; { if (last !== group) { storedIndexArray.push(i); $(rows) .eq(i) .before( '&lt;tr class="group"&gt;&lt;td colspan="4"&gt;' + group + "&lt;span class='group-count'&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;" ); last = group; } }); storedIndexArray.push( api.column(0, { page: "current" }).data().length ); for (let i = 0; i &lt; storedIndexArray.length - 1; i++) { let element = $(".group-count")[i]; $(element).text( storedIndexArray[i + 1] - storedIndexArray[i] ); } }

http://stackoverflow.com/comment/40791725
comment on: http://stackoverflow.com/a/26040613
score: 0
type: AnswerComment
has text: what shold i use then? divs?
type: Comment

http://stackoverflow.com/a/26084090
type: Answer
has body: Since the question is the same, the answer will be identical: 'raw' should contain the entire (RFC822) email, complete with body and headers.
score: 0
answers question: http://stackoverflow.com/q/26077023

http://stackoverflow.com/comment/40885608
comment on: http://stackoverflow.com/q/26090517
has text: I'm trying to watch file changes, but I don't want to hardcode each file. I want to watch the entire directory. And notify does seem to break it. I've edited my question
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26051359
has answer: http://stackoverflow.com/a/28908042
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28908042
has title: removing an element from an xml file using node-elementtree (nodejs)
type: Question
answer count: 1
tagged with: javascript
score: 0
tagged with: elementtree
tagged with: node.js
tagged with: http://stackoverflow.com/tag/xml
has body: I am trying to manipulate an xml file sitting on a server utilizing node-elementtree in a nodejs app... I have had no problems writing to the file and saving it on the server but am completely baffled on how to remove an element. I'm reading in the file and successfully locating the element that I want to remove from the doc before saving: fs.readFile(coursePath, function(err, data){ var XML = et.XML; var ElementTree = et.ElementTree; var element = et.Element; var subElement = et.SubElement; var _data, etree; _data = data.toString(); etree = et.parse(_data); var stringID = content.id.toString(); console.log(etree.find('./item/[@id="'+stringID+'"]')); var myitem = etree.find('./item/[@id="'+stringID+'"]'); But, when I try to remove it: etree.remove(myitem); I get the following error: [TypeError: undefined is not a function] TypeError: undefined is not a function at /Users/xxxxxxx/Sites/xxxxxx/bin/server/xxxxxxx-socket-handler.js:915:19 at fs.js:291:14 at Object.oncomplete (fs.js:97:15) The docs are kind of sparse and I've been banging my head off of something that I thought would be fairly simple, for hours - any advice would be greatly appreciated. Best, Phil

http://stackoverflow.com/a/26105652
accepted answer of: http://stackoverflow.com/q/26105036
upvote count: 2
answers question: http://stackoverflow.com/q/26105036
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
has body: Have a look at this FIDDLE var $span = $('.btnWrapper').find("span"); $span.each(function(i) { // what is near the spans var $div = $(' Hello '+i+' '); var $content = Array.prototype.slice.call($(this).prevUntil("div,span")).reverse(); $div.append($content); $('.btnWrapper').append($div).append($(this)); }); // handle the rest var $div = $(' Hello'+$span.length+' '); $('.btnWrapper > button').appendTo($div); $('.btnWrapper').append($div);

http://stackoverflow.com/q/26068751
score: 4
has answer: http://stackoverflow.com/a/26068854
upvote count: 4
answer count: 3
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26068836
has comment: http://stackoverflow.com/comment/40844221
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/26068984
type: AnsweredQuestion
has body: I have two pawns and I want to set them on the top-left corner while the text (cell number) is on left-bottom. This is what I have: This is what I want to have: CSS: td { width: 80px; height: 80px; text-align: left; vertical-align: bottom; border: 1px solid black; } .soldiers { width:20px; height:20px; } HTML: 57 58 59 60 61 62 63 64
has answer: http://stackoverflow.com/a/26068984
has title: How to set image position inside tag to be on top-left corner while text is on the left-bottom
has comment: http://stackoverflow.com/comment/40843944
accepted answer: http://stackoverflow.com/a/26068836
type: Question
tagged with: javascript

marker
tag name: marker
tags question: http://stackoverflow.com/q/26173531
type: Tag

http://stackoverflow.com/q/26053685
has body: I'm learning angular, and have attached one to a rails api. I'm rendering an object's date in my view with angular {{example.date}}. I'm assuming the best place to massage the JSON coming out of my rails api is in the angular controller, but having a hard time grasping how to do that. Here's my setup: Rails controller: class ExampleController &lt; ApplicationController def index render json: Example.all end def show render json: Example.find(params[:id]) end end Angular Service (coffeescript): App.factory 'Example', ['$resource', ($resource)-&gt; $resource '/api/examples/:id', id: '@id' ] Angular Controller (coffeescript): App.controller 'ExampleCtrl', ['$scope', 'Example', ($scope, Example) -&gt; $scope.example = Example.query() ] All of this basic plumbing culminates to an ng-repeatin my haml view: %div{"ng-controller" =&gt; "ExampleCtrl"} %ul %li{"ng-repeat" =&gt; "example in example"} %h3 {{example.date}} I believe my Example.query() in the angular controller is returning a large array of all the data. How would I write an each loop in coffeescript to transform all datetimes, such as Tue, 23 Sep 2014 00:00:00 UTC +00:00, to formatted dates? I have bower hooked up on my app and can install moment js if that helps. Thanks
tagged with: ruby-on-rails
type: AnsweredQuestion
has title: Changing a rails datetime to string in Angular controller
tagged with: coffeescript
has comment: http://stackoverflow.com/comment/40815832
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/26054076
has answer: http://stackoverflow.com/a/26392759
tagged with: javascript
has comment: http://stackoverflow.com/comment/40816636
has comment: http://stackoverflow.com/comment/40816417
has comment: http://stackoverflow.com/comment/40816247
has comment: http://stackoverflow.com/comment/40816592
score: 0
possible better answer: http://stackoverflow.com/a/26392759
tagged with: datetime
tagged with: angularjs
has answer: http://stackoverflow.com/a/26054076

http://stackoverflow.com/q/26167882
accepted answer: http://stackoverflow.com/a/26195392
has comment: http://stackoverflow.com/comment/41025719
possible better answer: http://stackoverflow.com/a/26168159
has answer: http://stackoverflow.com/a/26168159
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41028780
has answer: http://stackoverflow.com/a/26195392
tagged with: line-breaks
type: AnsweredQuestion
has body: Seemingly simple but I can't find the correct placement. I have the following function in my HTML head: I call it in the body like: Fibonacci Sequence: I can't find out where to place the '+ br /' to concatenate each writeText with a line break.
has title: Line break character while looping through an array/function
has comment: http://stackoverflow.com/comment/41025488
has comment: http://stackoverflow.com/comment/41057010
type: Question

http://stackoverflow.com/comment/40984061
type: AnswerComment
comment on: http://stackoverflow.com/a/26144972
type: Comment
has text: @thefourtheye and FelixKling - thank you both very much. What really confused me is how even though arguments are being passed, not all of them are actually used, or need to be used! This definitely helped and I see this clearer now. Thanks, Gents.
score: 0

http://stackoverflow.com/comment/40839246
has text: every thing seem's to be fine , used the exact same code http://jsfiddle.net/JQu5Q/7/
score: 1
comment on: http://stackoverflow.com/q/26066045
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/131297815
type: Comment
has text: According to the documentation: "The old one canvas.toDataURL and the new better one canvas.toBlob" https://r105.threejsfundamentals.org/threejs/lessons/threejs-tips.html
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26197858

http://stackoverflow.com/q/26104952
tagged with: c#
answer count: 2
tagged with: javascript
has body: Chrome web driver has a limitation that only loads webpage content that is in view. I have a website that has long horizontal table. I have Xpath that extracts column headers of a table that stretches more than the screen width. In chrome dev tool console if I run the xpath $x(myxpathgoeshere) I get all the headers including the ones that are not in view(the one that makes you scroll to see all). So I know my xpath is correct. But in code, when I access it by using selenium webdriver it only gives header names that are in current view. I came across various posts on chrome webdriver google group page, users mentioning this limitation and answer to it was to not fix it. So anyways, now I am trying to make it work using javascript to scroll horizontally and then do the findelement by xpath again to see if the elements to the right are loaded. But for some strange reason I cannot seem to get the scrolling horizontally to work. I am using C# Javascript executor. IJavaScriptExecutor js = (IJavaScriptExecutor) Driver; js.ExecuteScript("scrollTo(3000,0);"); // whatever X value I use chrome is not scrolling to the right. I have also tried scrollX and no luck. Is there something wrong with my code? Edited: forgot that I was using X for horizontal not Y
tagged with: webautomation
has title: Selenium Chrome WebDriver how to scroll horizontally
downvote count: 0
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28213761
has answer: http://stackoverflow.com/a/31804251
has comment: http://stackoverflow.com/comment/40909704
tagged with: selenium-webdriver
score: 2
tagged with: google-chrome-devtools
has comment: http://stackoverflow.com/comment/40909815
type: Question

http://stackoverflow.com/comment/41058176
comment on: http://stackoverflow.com/a/26184507
has text: Thanks. That helps. I used div-container with data attributes instead of input fields, so I don't need a form at all.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40918918
comment on: http://stackoverflow.com/q/26109915
has text: There will only ever be one sku starting with Q, so I just want to return that one without having to know the whole itemCode. So I would assume that would be a filter or search.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26091779
downvote count: 0
has comment: http://stackoverflow.com/comment/40886348
score: 1
has comment: http://stackoverflow.com/comment/40886369
has comment: http://stackoverflow.com/comment/40886363
has comment: http://stackoverflow.com/comment/40886337
has comment: http://stackoverflow.com/comment/40886537
answers question: http://stackoverflow.com/q/26091306
has comment: http://stackoverflow.com/comment/41001664
upvote count: 1
type: Answer
has body: Not sure if this is helpful, but I am using a simple keypress detection in the events area of my js file. This only works if the input field is selected. //keypress input detection for autofilling form with test data 'keypress input': function(e) { if (e.which === 17) { //17 is ctrl + q fillForm(); } }

pinterest
tags question: http://stackoverflow.com/q/26152662
type: Tag
tag name: pinterest
tags question: http://stackoverflow.com/q/26094674

http://stackoverflow.com/q/26056079
tagged with: paypal
has comment: http://stackoverflow.com/comment/40820346
accepted answer: http://stackoverflow.com/a/26103668
type: AnsweredQuestion
has title: Sending variable calculated with (sliders) to Paypal button's price value
has body: I'm trying to send variable calculated with multiple (sliders) to Paypal in order to make a dynamic button whose price value changes depending on the slider values. So far I have managed to take the calculated value out of the form as variable in javascript (var = mapoman). But I have been failing to pass the value to Paypal button... I'm using an unhosted Paypal button. I assume the calculated value is stored in input, is that right?? Currently oninput in form calculates for displaying through output and function Add() calculates the value for Paypal button... I cannot use PHP as my server does not handle it at the moment. So I'm trying to achieve this only using javascript. The below is my code.. I really hope it's doable!! I appreciate any advice, thanks! <!-- <--is this storing the value calculated by the sliders above???-->
tagged with: javascript
type: Question
score: 0
has comment: http://stackoverflow.com/comment/40821711
answer count: 2
has comment: http://stackoverflow.com/comment/40820141
tagged with: jquery
has answer: http://stackoverflow.com/a/26103668
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26056898
possible better answer: http://stackoverflow.com/a/26056898

http://stackoverflow.com/q/26117996
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40938612
type: UnansweredQuestion
has body: I'm trying to create a graph in mvc using flot.js. The graph will be a line graph with 3 lines on it. I have created a set of 3 list keyvaluepair with date/value to be plotted on the graph as shown in the code below. Currently i get : JavaScript runtime error: 'listvoltage' is undefined Here's what I tried already: Index.cshtml: @if (Model != null) { foreach (var item in Model.BatteryInfo) { var listvoltage = new List&lt;KeyValuePair&lt;double, int&gt;&gt;(); var listtemperature = new List&lt;KeyValuePair&lt;double, int&gt;&gt;(); var listlevel = new List&lt;KeyValuePair&lt;double, int&gt;&gt;(); listvoltage.Add(new KeyValuePair&lt;double, int&gt;( TMTMonitorAndCompare_Helpers.DateTimeHelpers.DateTimeToUnixTimestamp(item.TEST_DATE), Convert.ToInt32(item.battery_voltage))); listtemperature.Add(new KeyValuePair&lt;double, int&gt;( TMTMonitorAndCompare_Helpers.DateTimeHelpers.DateTimeToUnixTimestamp(item.TEST_DATE), Convert.ToInt32(item.battery_temperature))); listlevel.Add(new KeyValuePair&lt;double, int&gt;( TMTMonitorAndCompare_Helpers.DateTimeHelpers.DateTimeToUnixTimestamp(item.TEST_DATE), Convert.ToInt32(item.battery_level))); CustomGraphinScript.js $(document).ready(function () { $.plot($("#placeholder"), listvoltage, { yaxis: { max: 1000 } }); }); Could anyone tell me what I need to do to the above to display this data on graph? is ajax required?
type: Question
has answer: http://stackoverflow.com/a/26120975
has title: Flot.js & JQuery.Ajax: Create graph from key-value-pair
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/q/26071829
score: 0
has body: I have a Typescript object that defines a function. The object itself defines an array of some objects. So I am trying to add a function to act more like an indexer. The function always returns the parent object where it is defined and not a specific string value. Here's the code. The variables is defined as an Array of object having name and value as properties. valueOf(key: string): string { var result = ''; if (key === null || key === undefined || key.length === 0) { return result; } for (var i = 0; i &lt; this.variables.length; i++) { if (this.variables[i].name === key) { result = this.variables[i].value; break; } } return result; } UPDATE The above function is defined on a Typescript object. This object includes a property of type Array. I want to query that array based on a string key and not number key. That's why I wrote the above function to loop over the elements of property "variables", i.e. the Array, when there is a match on "name" === "key passed in", return the "value" associated with the object inside "variables property". for instance, I can use the above as: var tsObj = new TsObj(...); tsObj.valueOf('key1');
type: UnansweredQuestion
has title: Typescript function always returns parent object and not return value
has comment: http://stackoverflow.com/comment/40849828
has comment: http://stackoverflow.com/comment/40849538
tagged with: typescript
answer count: 0
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40849485

http://stackoverflow.com/comment/40986851
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26147276
type: QuestionComment
has text: What error are you getting?

http://stackoverflow.com/comment/41002779
comment on: http://stackoverflow.com/a/26155530
score: 0
has text: Hi Krzysiek, string is converted to object :).. but actually I am creating "toreturn" string dynamically after concatenating various strings by using some values in localStorage, and thats why I returned a string. Please help me in such situation in which I am preparing data from localStorage, is there some alternative way out, may be I am going in wrong direction. Please suggest.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26150991
upvote count: 1
answer count: 1
has body: I'm trying to get the ajax section to work but I have had no luck. I tried putting it in a different section but the variable "selection" does not go through and the page does not update. Basically what I"m trying to do is get the a value entered in the dropdown input item and then using that value to create a table in the Ajax function. location1 location2 location3
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/40994074
has title: Ajax section not working correctly
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40994103
has comment: http://stackoverflow.com/comment/40994069
has comment: http://stackoverflow.com/comment/40994071
has comment: http://stackoverflow.com/comment/40994045
type: Question
tagged with: jquery-mobile
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26151126
downvote count: 2

http://stackoverflow.com/q/26184434
has answer: http://stackoverflow.com/a/26184571
has comment: http://stackoverflow.com/comment/41056453
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41056415
answer count: 5
type: UnansweredQuestion
tagged with: regex
has answer: http://stackoverflow.com/a/26184752
has comment: http://stackoverflow.com/comment/41056377
has body: I want to split up a string (sentence) in an array of words and keep the delimiters. I have found and I am currently using this regex for this: [^.!?\s][^.!?]*(?:[.!?](?!['"]?\s|$)[^.!?]*)*[.!?]?['"]?(?=\s|$) An explanation can be found here: http://regex101.com/ This works exactly as I want it to and effectively makes a string like This is a sentence. To an array of ["This", "is", "a", "sentence."] The problem here is that it does not include spaces nor newlines. I want the string to be parsed as words as it already does but I also want the corresponding space and or newline character to belong to the previous word. I have read about positive lookahead that should look for future characters (space and or newline) but still take them into account when extracting the word. Although this might be the solution I have failed to implement it. If it makes any difference I am using JavaScript and the following code: //save the regex -- g modifier to get all matches var reg = /[^.!?\s][^.!?]*(?:[.!?](?!['"]?\s|$)[^.!?]*)*[.!?]?['"]?(?=\s|$)/g; //define variable for holding matches var matches; //loop through each match while(matches = reg.exec(STRING_HERE)){ //the word without spaces or newlines console.log(matches[0]); } The code works but as I said, it does not include spaces and newline characters.
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/70483438
has comment: http://stackoverflow.com/comment/41059680
has title: Splitting a string into words and keeping delimiter
has answer: http://stackoverflow.com/a/26184632
has comment: http://stackoverflow.com/comment/41056587
tagged with: javascript
has answer: http://stackoverflow.com/a/70483172
has comment: http://stackoverflow.com/comment/41059796
has comment: http://stackoverflow.com/comment/41056273

http://stackoverflow.com/comment/40959365
type: Comment
comment on: http://stackoverflow.com/q/26132086
type: QuestionComment
score: 0
has text: Seems like a frame refresh issue. If you hide and show frame refreshes. `$('body').css('animation', animation).hide().show(0);` http://jsfiddle.net/a5nv1hq3/

http://stackoverflow.com/comment/40782893
has text: www.dreamincode.net (this or any other google adsense site would be a perfect example)
type: AnswerComment
comment on: http://stackoverflow.com/a/26034694
score: 0
type: Comment

http://stackoverflow.com/comment/40823255
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26057919
has text: See also here: http://stackoverflow.com/questions/4508574/remove-hash-from-url
score: 0

http://stackoverflow.com/comment/40877090
has text: @Fred-ii-: Quite true. The click on `tagEnter` would work, though. But yes, on browsers that submit the form when you press the Enter key in a text field if the text field is the only field, pressing the Enter key in that field would not have the desired effect. :-) The missing ` ` tag probably doesn't matter.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26086933
score: 1

http://stackoverflow.com/q/26187094
type: Question
has comment: http://stackoverflow.com/comment/41061410
has comment: http://stackoverflow.com/comment/41061509
has comment: http://stackoverflow.com/comment/41061379
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41061695
has comment: http://stackoverflow.com/comment/41061368
has comment: http://stackoverflow.com/comment/41061349
has comment: http://stackoverflow.com/comment/41061532
has comment: http://stackoverflow.com/comment/41061806
score: 0
has comment: http://stackoverflow.com/comment/41061634
linked to: http://stackoverflow.com/q/1295950
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41061723
has comment: http://stackoverflow.com/comment/41061544
has comment: http://stackoverflow.com/comment/41061563
answer count: 0
has title: Selecting multiple options with Javascript
has body: I am trying to use javascript on the form's load to pre-select some options. This is what I have. var mar=document.getElementById('region'); var marketarray = '@marketlistdb@'.split("|"); for( var l = 0; l &lt; mar.options.length; l++ ) { var o = mar.options[l]; if ( marketarray.indexOf( o.text ) != -1 ) { mar.selected = true; } } But this will not select the elements in the select tag. I saw this solution elsewhere (Javascript to Select Multiple options) I tried this solution, but it will not work for whatever reason. Does anyone see anything wrong that would cause this not to select? We have placed alerts within the for loop and within the if statement to verify that we have true matches between the array and each individual option.

http://stackoverflow.com/comment/46380092
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26049186
has text: This requires specifying date format in every column in colmodel. If date format is not specified `cm.formatoptions.newformat` is undefined and exception occurs. How to fall back to default locale date format if date format is not specified in colmodel so that same colmodel supports multiple locales automatically ?

http://stackoverflow.com/comment/40883949
has text: Can you see the compile status in a status bar when its compiling?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26085516

http://stackoverflow.com/comment/41057279
has text: Thanks @fgshepard the problem is that script at "Webform_OnSubmit()" function listens to all enter key presses. So I can be on the webpage, just scrolling through content, and hit the enter key, and it fires - refreshing the page. So I need a way to prevent that function from firing, or at the very least ignore it if the user is within my search textbox.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26183995

http://stackoverflow.com/comment/40949372
has text: $('.c-T-S.a-b.a-b-B.a-b-Ma.oU.v2').trigger('click'); does exactly that. - simulates the click. Onlcick handler and alert is for demonstration only.
type: Comment
comment on: http://stackoverflow.com/a/26126793
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40820253
comment on: http://stackoverflow.com/a/26055851
has text: Hi. I having some condition in my logic and I different lightbox display logic wise. Check my question I have updated with bold text. Thanks.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40904998
score: 0
type: Comment
type: QuestionComment
has text: you have a Titanium course in your school?
comment on: http://stackoverflow.com/q/26094486

http://stackoverflow.com/a/26173291
accepted answer of: http://stackoverflow.com/q/26173241
has body: When you update the _length variable it doesn't change the x.length property. That was initialized with the length when you created the object, but you never update it. You need to make that property a function that returns the length from the closure variable: function _getLength() { return _length; } ... length: _getLength Then you can use x.length() to get the current length.
score: 1
answers question: http://stackoverflow.com/q/26173241
has comment: http://stackoverflow.com/comment/41035533
has comment: http://stackoverflow.com/comment/41035653
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41035586

http://stackoverflow.com/comment/40978646
type: Comment
has text: You will need to put this in a document.ready callback (see edit)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26131108

http://stackoverflow.com/comment/40877469
has text: I wouldn't take things from books as chapter and verse. For instance, to say "...key/value pairs...are really objects" is just flat out wrong. I guess he meant to say "key/value pair collections" (aka hashes), but that just goes to show the sloppiness in this and many other books.
type: Comment
score: 2
comment on: http://stackoverflow.com/q/26087142
type: QuestionComment

http://stackoverflow.com/comment/40906820
has text: Yeah, there's no reason at all for the first `slice` in the OP's code.
comment on: http://stackoverflow.com/a/26103405
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26094183
has comment: http://stackoverflow.com/comment/40897396
tagged with: cookies
linked to: http://stackoverflow.com/q/1106377
tagged with: java
type: Question
has title: Set cookie in java, read in javascript
tagged with: javascript
has comment: http://stackoverflow.com/comment/40891731
upvote count: 2
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40898313
has answer: http://stackoverflow.com/a/26112800
has comment: http://stackoverflow.com/comment/40891207
favorite count: 0
type: UnansweredQuestion
has body: I'm trying something similar to this: Detect when browser receives file download I'm using Chromes Developer Tools to monitor my cookies and my problem is that the cookies I set in my server side code (java in my case) are only visible on the request. Not when I check the Resources tab in Chrome Dev Tools. I think it might have something to do with the fact that my request is submitted by constructing a hidden form and submitting this (I'm using ExtJS 4.2.2). All I can see in my Resources tab is the JSESSIONID cookie from Tomcat. Can anyone help me set cookies from java that I can read in JavaScript after the request completes? Screenshots:
score: 2

http://stackoverflow.com/q/26140577
tagged with: jquery
has answer: http://stackoverflow.com/a/26140654
tagged with: ajax
has title: Store current page data in a variable, in the same format/structure as an Ajax html response
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26140649
accepted answer: http://stackoverflow.com/a/26140657
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26140657
score: 0
answer count: 3
has body: I'm storing/saving my History Ajax call responses in an array (jQuery). So on ajax load success I store the response data in an array so I can use it and apply/clone later on (for js side cache). page_cache = []; $.ajax({ url: url, type: 'get', dataType: 'html', success: function (data) { var $response = $(data); page_cache[url] = $response; } }); So far so good, BUT now I need the equivalent of the ajax call response data, but on the current page so that I can stor/save it already on page load. But struggled finding a way.. Been trying: page_cache[url] = $('html').data(); ... but no luck.. Any suggestions?
has answer: http://stackoverflow.com/a/26140649
has comment: http://stackoverflow.com/comment/40975249

http://stackoverflow.com/q/26122019
has comment: http://stackoverflow.com/comment/40941189
has comment: http://stackoverflow.com/comment/40943106
tagged with: post
answer count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40941610
has comment: http://stackoverflow.com/comment/40940954
tagged with: asp.net
has title: Javascript array as parameter for JQuery $.post call to aspx file
type: Question
has body: It seems that this question was asked several times, but never with the combination of components that I'm using, therefore a new question: My current problem is that I cannot seem to provide a javascript array to the POST call, it always splits every entry in the array up and makes non.unique POST parameters out of them. This is what I currently have: var arr = new Array(); // filled with strings var brr = new Array(); // also filled with strings var id = 1; // filling the arrays here, everything looks fine in JS debugging, array properly filled param2 = { "type": "getXY", "firstArray": arr, "secondArray": brr, "someID": id } $.post("process.aspx", param2, function (result) { // If successfull, do stuff }, "json"); This is the result that gets sent to the aspx( Form Data in Chrome dev tools): type:getXY arr[]:225 arr[]:226 secondArray[]:Hardware secondArray[]:Hardware someID:1 On the other side (the aspx): protected void Page_Load(object sender, EventArgs e) { Response.Clear(); Response.ClearContent(); if (Request.Form["type"] != null) { // Determine what kind of data shall be retrieved switch(Request.Form["type"].ToString()) { case "getXY": System.Collections.Generic.List&lt;ResultStuff&gt; result = new System.Collections.Generic.List&lt;ResultStuff&gt;(); JavaScriptSerializer jsonID = new JavaScriptSerializer(); System.Collections.Generic.List&lt;String&gt; assetIDList = jsonID.Deserialize&lt;System.Collections.Generic.List&lt;String&gt;&gt;(Request.Form["firstArray"]); //more stuff here Response.Write(result); break; default: Response.Write("Request string invalid."); break; } } else { Response.Write("Request string missing."); } } I'd also like to get some results as a response, but I never came that far to peroperly test the code in the aspx. I also tried the traditional flag in the ajaxSetup, but it didn' improve. I did this with simpel data types, which worked fine. What am I doing wrong? Thanks a lot in advance.
score: 0

http://stackoverflow.com/a/26040525
has comment: http://stackoverflow.com/comment/40793027
has comment: http://stackoverflow.com/comment/40791605
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/40792112
upvote count: 1
answers question: http://stackoverflow.com/q/26040282
has comment: http://stackoverflow.com/comment/40793016
has comment: http://stackoverflow.com/comment/40792439
has body: Here's one way to do it, recursively: function convertToNestedObject(arr) { var result = {}; if (arr.length === 1) { result[arr[0]] = ''; } else { result[arr[0]] = convertToNestedObject(arr.slice(1, arr.length)); } return result; } You could pass the start index in to the function instead of using slice and creating copies of the array: function convertToNestedObject(arr, startIndex) { var result = {}; if (arr.length - startIndex === 1) { result[arr[startIndex]] = ''; } else { result[arr[startIndex]] = convertToNestedObject(arr, startIndex + 1); } return result; } Example: http://jsfiddle.net/jwcxfaeb/1/
downvote count: 0
has comment: http://stackoverflow.com/comment/40791795

http://stackoverflow.com/comment/41032513
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26171646
score: 0
has text: Can you just replace `BMI.value = "parseInt(myResult)";` with `BMI.value = myResult;`? Also, your `onclick` for the button could just be `calcBMI()`.

http://stackoverflow.com/comment/40821349
type: Comment
type: QuestionComment
has text: do you even have an audio element created? please add it to your markup
score: 0
comment on: http://stackoverflow.com/q/26056223

http://stackoverflow.com/a/26047200
type: Answer
score: 1
upvote count: 1
has body: Well, you need to have a way of targeting which user you want to move in your UI. Then, it's just a matter of removing the user from one array and append it to the other. For exemple, if you want to remove the second user of aBlocked (if there was one) and add it to arrayAdmins you could do: var unblockedUser = aBlocked.splice(1, 1)[0]; arrayAdmins.push(unblockedUser);
downvote count: 0
answers question: http://stackoverflow.com/q/26046967

http://stackoverflow.com/a/26081170
has comment: http://stackoverflow.com/comment/40866761
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/26080873
type: Answer
has comment: http://stackoverflow.com/comment/40866734
has comment: http://stackoverflow.com/comment/40866679
has body: I think there's some confusion about sending data over sockets using socket.io. You can elect to emit events or data using rooms or private namesspaces, you can broadcast to all connected sockets, or you can emit data to a specific ID. In your case you should just be selecting a socket.id, to emit an event to a particular connection. You can do this by: io.sockets.connected[ socket.id ].emit('privateMsg', 'hello this is a private msg'); You can also use the to() method in conjunction with broadcast as well: socket.broadcast.to( socket.id ).emit('privateMsg', 'hello this is a private msg'); This will reach the user which matches the socket.id you pass in as the argument. To contact users within a "room" or private namespace, you can also use the to() method: io.to('some room').emit('some event'); In this case some room would be the channel var you've defined, and it should match a predefined variable that has already been instantiated. For more information about rooms/namespaces/and reaching specific socket connections: http://socket.io/docs/rooms-and-namespaces/#
accepted answer of: http://stackoverflow.com/q/26080873

http://stackoverflow.com/q/26152658
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
type: Question
score: 0
has answer: http://stackoverflow.com/a/26152906
has body: I made an auto-hiding navbar and it works great in chrome, but IE11 freaks out. the idea is that when you scroll down it hides, but it reappears if you scroll up. In IE11, I scrolled down and it hid the navbar. And then when I scrolled back up nothing happened for a second... and then the navbar appeared and disappeared 3 times in rapid succession... then a few seconds later it did it again. Any idea what's wrong? &lt;script&gt; var lastScrollTop = 0; $(window).scroll(function(){ var st = $(this).scrollTop(); if (st &gt; lastScrollTop){ $('#header').animate({ marginTop: '-70px', opacity: 0 }, 200); } else { $('#header').animate({ marginTop: '0px', opacity: 1 }, 200); } lastScrollTop = st; }); &lt;/script&gt;
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26152900
has title: Auto-hiding navbar that works in IE

http://stackoverflow.com/comment/40855011
has text: I'm not great at selectors either. Something like this? http://jsfiddle.net/92400whm/
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26075040
type: AnswerComment

http://stackoverflow.com/q/26086629
type: Question
accepted answer: http://stackoverflow.com/a/26086684
possible better answer: http://stackoverflow.com/a/26086675
tagged with: javascript
score: 0
has body: Im giving my users the possibility to filter products without refreshing the page with ajax. i update the url to make it look like : http://mywebsite.com/products/filter?style=7-1-2&amp;price=4-5-7&amp;brand=48-12-5&amp;color=8-4 where the int values are id's split by -. so i have the options: style price brand color what i want is get these values in a var for each filter option so that i end with : var styleValues = 7,1,2 var priceValues = 4,5,7 if only price filter is selected the url will look like http://mywebsite.com/products/filter?price=4-5-7 so i cant split on the tags for the filters. I really like to know what would be the best way to turn the url to different vars. What i already know : how to get the filter part: var filterPart =window.location.search;
has answer: http://stackoverflow.com/a/26087575
has answer: http://stackoverflow.com/a/26087047
has answer: http://stackoverflow.com/a/26086675
answer count: 4
type: AnsweredQuestion
has title: Javascript split url on filters
has comment: http://stackoverflow.com/comment/40876373
has answer: http://stackoverflow.com/a/26086684

http://stackoverflow.com/comment/40946775
type: QuestionComment
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26124321
has text: Sorry, couldn't get a solution from your comment. Also tried repacing my JS with the code below, to no effect: `var source = $("#audioList-template").html(), template = Handlebars.compile(source), html = template(audioList); $("#audioList").html(html); $("#audioList").listview();`

http://stackoverflow.com/comment/41030347
comment on: http://stackoverflow.com/q/26170505
type: Comment
type: QuestionComment
has text: it's converted before it ever becomes a key. quote it to preserve zeros. all object keys are strings anyway, so just start with a strign and avoid the issue you demonstrate.
score: 1

http://stackoverflow.com/comment/41674657
has text: However, the documentation is writing this wrong. http://openlayers.org/en/v3.0.0-beta.1/apidoc/ol.style.Text.html says that the ol.style.Text can take http://openlayers.org/en/v3.0.0-beta.1/apidoc/ol.style.html#TextOptions as in parameters, fontSize does however NOT work.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26060048
type: Comment

http://stackoverflow.com/a/26127756
downvote count: 0
answers question: http://stackoverflow.com/q/26127498
type: Answer
score: 1
upvote count: 1
has body: Most web servers expect to treat query parameters (everything after the "?") as dynamic information that would be consumed by a web application. For the purpose of static resources (like html files), they just ignore everything after the question mark. In other words, your web server is probably looking to serve up a file called workOne.html, and not finding it. Because you're dealing with static resources rather than dynamic ones, I'd recommend you forget about trying to add data dynamically with jQuery, and just use URL paths and file structures that include the number. For example, put your html in ./ajax/workOne/5678.html and say: loadAjax: function (){ $.ajax('ajax/workOne/5678.html', { success: function(response){ $('#answer').children('h3').html(response); } }); }
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26127498

http://stackoverflow.com/comment/40849538
has text: [`Object#valueOf` already exists](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf), you should reconsider your function name.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26071829

http://stackoverflow.com/q/26125965
tagged with: jquery
has answer: http://stackoverflow.com/a/26128314
has comment: http://stackoverflow.com/comment/40948484
has comment: http://stackoverflow.com/comment/40948688
has title: jQuery not setting global variables
favorite count: 0
has comment: http://stackoverflow.com/comment/40950466
has body: I have searched and messed around with my code for about 2 days now but I cant seem to find the solution, and I am hoping its something very small that someone can point out for me. Here is my JSFiddle I have the two global variables, window.goal and window.sales, that are being set to 1 and 0. I would like jQuery to set them to the variables found on another page. I have confirmed that the variables are being populated correctly, but then they are being ignored, and the javascript is using the global values. Can anyone assist me with this? it seems like: $GetGoals() is being called before init() and it is setting the global variable back to their global values window.goal = 1; window.sales = 0; when they should be window.goal = 500000; window.sales = 200000; The jsFiddle contains all of my code. The CSS and HTML dont really matter, its just the javascript/jquery i am concerned with. I forgot to mention. Sometimes, it actually works properly and the variables are grabbed and displayed on screen correctly, but that is only about a 1 in 20 reloads from what I have seen.
downvote count: 2
has comment: http://stackoverflow.com/comment/40948197
upvote count: 1
has comment: http://stackoverflow.com/comment/40948851
accepted answer: http://stackoverflow.com/a/26128314
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40948304
score: -1
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26126133
tagged with: javascript
has answer: http://stackoverflow.com/a/26126133

http://stackoverflow.com/q/26049327
tagged with: javascript
has comment: http://stackoverflow.com/comment/40843550
score: 0
has comment: http://stackoverflow.com/comment/40959680
has body: I am using cocoon gem to handle polygon map coordinates. class Polygon &lt; ActiveRecord::Base has_many :coordinates, :dependent =&gt; :destroy accepts_nested_attributes_for :coordinates end class Coordinate &lt; ActiveRecord::Base attr_accessible :latitude, :longitude, :polygon_id belongs_to :polygon end I have a form which allows adding multiple coordinates to the polygon model and save it, it works manually. Now I am using google maps drawing library to get the points on the map and I am stuck at how to invoke the cocoon to insert these points to the form on the page dynamically from the callback. The google maps sends 'overlaycomplete' event and in that callback, I have the full array of points. How should I accomplish this ?
type: UnansweredQuestion
tagged with: cocoon-gem
answer count: 0
has title: Adding nested models based on javascript data
tagged with: ruby-on-rails
type: Question
tagged with: google-maps

http://stackoverflow.com/a/56649358
type: Answer
answers question: http://stackoverflow.com/q/26036797
has body: outerWidth is not guaranteed to be accurate as stated in docs. Simply write outerWidth(true) and you will get the exact value as on .resize() function. http://api.jquery.com/outerWidth/
score: 0

http://stackoverflow.com/comment/70855655
has text: Looks like `add(-1,"month")` was added in an edit. I've removed it, looks like the code works properly now. In general though, if you use this (or any code from stack overflow), please rewrite and test drive it! (and then let me know what I screwed up so I can fix the answer :))
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26131085

http://stackoverflow.com/q/26188162
has comment: http://stackoverflow.com/comment/41063634
type: AnsweredQuestion
score: 1
has title: How do I make an element the height of the browser window?
has body: I've written code to make a section's height (#home) match the window height, but it's bugging out. Here's what I use: // Make Home section height of window function fitHomeToScreen() { var windowHeight = $(window).innerHeight(); $("#home").css("height", windowHeight); alert(windowHeight); } $(window).load(fitHomeToScreen); $(window).resize(fitHomeToScreen); Every time I refresh the browser (no matter what size I drag the browser to), windowHeight stays the same. Then, if I resize the browser window a bit, the windowHeight doubles. Every time. Forever. Like so: 902px [drag browser a few pixels wider] 1804px [drag browser a few pixels wider] 3608 ... etc. ... Here's all my code: HTML What we do How it works Team Contact Headline. Blah blah blah. What we do Some stuff Lorem ipsum Some stuff Lorem ipsum Firstname Lastname Title Firstname Lastname Title Firstname Lastname Title Firstname Lastname Title Firstname Lastname Title Firstname Lastname Title Firstname Lastname Title Firstname Lastname Title Some stuff Lorem ipsum Lorem ipsum dolor sit amet Email us Address Phone number info@company.com Lorem ipsum CSS /** * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/) * http://cssreset.com */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } body { line-height: 1; } ol…
has answer: http://stackoverflow.com/a/26222868
type: Question
has answer: http://stackoverflow.com/a/26188287
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 3
has comment: http://stackoverflow.com/comment/41063483
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26188199
tagged with: css
accepted answer: http://stackoverflow.com/a/26188287
favorite count: 0
has comment: http://stackoverflow.com/comment/41063514
possible better answer: http://stackoverflow.com/a/26188199
upvote count: 1

http://stackoverflow.com/q/26059123
tagged with: jquery
has comment: http://stackoverflow.com/comment/40825812
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40825672
has comment: http://stackoverflow.com/comment/40825997
score: 0
has title: JQuery Edit Page from another Page
has comment: http://stackoverflow.com/comment/40825631
has body: I am using jquery mobile and I have two pages both using data-role="page". Now from page 1, I have a list of items (code below) and according to what the user has selected, I want them to be displayed on Page 2. Is this possible? HTML find school materials use an app read/write to me go over my day send a message help me read Dragon App Calculator Brain Academy Root Words JQuery var sel = 'url(images/FavStarSel.png)'; var unsel = 'url(images/FavStarUnSel.png)'; $('#FavListApp li > a').on("click",function (e) { e.preventDefault(); $link = $(this); $link.toggleClass("selected"); $link.parent().css('listStyleImage', $link.hasClass("selected")?unsel:sel); });
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40825710
has comment: http://stackoverflow.com/comment/40825792
answer count: 0
tagged with: javascript

http://stackoverflow.com/comment/40910019
type: AnswerComment
type: Comment
has text: @chuckg1979 I updated my answer with some references, but your use case is a little too specific for me to have an end all be all tutorial, though there are some great resources there you can use to piece together your own implementation.
comment on: http://stackoverflow.com/a/26102696
score: 0

http://stackoverflow.com/comment/41044638
comment on: http://stackoverflow.com/q/26176607
type: Comment
type: QuestionComment
score: 0
has text: @IsmaelMiguel edited again. not sure if it is much help.

http://stackoverflow.com/comment/40956765
type: Comment
comment on: http://stackoverflow.com/a/26130652
score: 0
type: AnswerComment
has text: Downvoter .. you could leave some comment prior to downvoting the answer .. I hate haters

http://stackoverflow.com/q/26139741
has comment: http://stackoverflow.com/comment/40973359
has comment: http://stackoverflow.com/comment/40973504
type: AnsweredQuestion
has title: Scroll to Bootstrap Panel body on click of related link
tagged with: twitter-bootstrap
type: Question
linked to: http://stackoverflow.com/q/20633087
has comment: http://stackoverflow.com/comment/40973007
has comment: http://stackoverflow.com/comment/40973730
score: 0
has comment: http://stackoverflow.com/comment/40974021
has comment: http://stackoverflow.com/comment/40973059
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40973983
has answer: http://stackoverflow.com/a/26142272
accepted answer: http://stackoverflow.com/a/26142272
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40973109
has body: I have a long list of panels that are tiresome to scroll though. I'm trying to put a shortcut of links at the top of the page. Shortcut code: Going to: // rest of panel1's code // panel body This seems to work in some regard. When I click on the shortcut it opens the panel. Now I just need to scroll to it. I've tried: $('#accordion').on('shown.bs.collapse', function (e) { var id = $(e.target).prev().find("[id]")[0].id; navigateToElement(id); }) function navigateToElement(id) { $('html, body').animate({ scrollTop: $("#" + id).offset().top }, 1000); } But to no avail. Any ideas? Thanks!

http://stackoverflow.com/a/26261341
type: Answer
answers question: http://stackoverflow.com/q/26192614
has body: Johnny Estilles wrote: I think want you're looking for is a negative lookbehind. Unfortunately these are not available in the Javascript Regex engine. If your curious though, you can try (? so the answer is: currently there doesn't seem to be a way to achieve the desired behaviour using a single regex (JavaScript regex engine) the primary factors contributing to this seem to be: • use of regex 'start of string' ^ does not work when .lastIndex != 0 • negative lookbehinds not supported by JavaScript
score: 0
accepted answer of: http://stackoverflow.com/q/26192614
type: AcceptedAnswer

http://stackoverflow.com/comment/40946137
has text: It may help if you could provide more examples or attempts.
score: 1
comment on: http://stackoverflow.com/q/26124991
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40912642
score: 0
comment on: http://stackoverflow.com/q/26106257
type: Comment
type: QuestionComment
has text: Even if the extension that loaded them is the same?

http://stackoverflow.com/comment/41064060
score: 0
comment on: http://stackoverflow.com/q/26188480
type: Comment
type: QuestionComment
has text: yeah I know that, I am using Firebug it seems that everything is good except changing the css as I want.

http://stackoverflow.com/comment/41018987
has text: If _"simplicity is the key"_, why not permanently change the source, rather than dynamically change the DOM on every page load?
comment on: http://stackoverflow.com/q/26164437
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41000618
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26154643
has text: Thanks...floating on the tags instead of container!! Spent like three hours messing with it! :) Will ask stack overflow sooner next time

http://stackoverflow.com/a/26185999
score: 1
has body: HTML: Click here First Name: First Name: Favorite Color: Select a Color Red Green Blue JS: $('button').on('click', function() { $('.form-computer').toggle("slow"); })
upvote count: 1
answers question: http://stackoverflow.com/q/26185280
downvote count: 0
type: Answer

http://stackoverflow.com/q/26151560
tagged with: jquery
has body: I am trying to load a object using an jquery ajax call. I have a global variable called videos which I am trying to update. The ajax call returns a valid json object, but how to I copy the result to the global variable. var videos = null; //trying to load using ajax load_vids(); console.log(videos); //outputting null function load_vids() { $.ajax({ url: "ajax.php", cache: false, type: "POST", dataType: "json", success: function(data) { ajaxCallBack(data); //loads json object } }); } function ajaxCallBack(data){ //wont update videos videos = data; } Thanks in advance.
tagged with: ajax
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/23667086
duplicate of: http://stackoverflow.com/q/23667086
answer count: 0
has comment: http://stackoverflow.com/comment/40995078
has comment: http://stackoverflow.com/comment/40995068
type: Question
has title: Updating Global Variable in Javascript
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
score: 0

http://stackoverflow.com/comment/40929336
score: 0
has text: But that is not the thing, she wants to do. window.location is a javascript function, which will redirect your browser to the new location. Sarah wants to load some data and set it as 'href' attribute to a html element in her page.
type: Comment
comment on: http://stackoverflow.com/a/26115458
type: AnswerComment

http://stackoverflow.com/q/26115971
has answer: http://stackoverflow.com/a/26116174
possible better answer: http://stackoverflow.com/a/26116018
has answer: http://stackoverflow.com/a/26116018
answer count: 5
has answer: http://stackoverflow.com/a/26116011
has body: I have an array of values to which I want to add some prefix: var arr = ["1.jpg", "2.jpg", "some.jpg"]; Adding the prefix images/ should result in this: newArr = ["images/1.jpg", "images/2.jpg", "images/some.jpg"];
has answer: http://stackoverflow.com/a/26116035
accepted answer: http://stackoverflow.com/a/26116011
type: AnsweredQuestion
score: 35
has title: How to add prefix to array values?
type: Question
has answer: http://stackoverflow.com/a/26116469
upvote count: 35
downvote count: 0
tagged with: javascript
favorite count: 0

internet-explorer
tags question: http://stackoverflow.com/q/26122321
tags question: http://stackoverflow.com/q/26138916
tags question: http://stackoverflow.com/q/26147064
tags question: http://stackoverflow.com/q/26129633
tags question: http://stackoverflow.com/q/26096293
tags question: http://stackoverflow.com/q/26156775
tags question: http://stackoverflow.com/q/26162906
tag name: internet-explorer
tags question: http://stackoverflow.com/q/26176158
tags question: http://stackoverflow.com/q/26109822
tags question: http://stackoverflow.com/q/26115535
tags question: http://stackoverflow.com/q/26066808
tags question: http://stackoverflow.com/q/26159285
tags question: http://stackoverflow.com/q/26135380
tags question: http://stackoverflow.com/q/26093497
tags question: http://stackoverflow.com/q/26062878
tags question: http://stackoverflow.com/q/26187252
tags question: http://stackoverflow.com/q/26104893
tags question: http://stackoverflow.com/q/26144163
tags question: http://stackoverflow.com/q/26138234
type: Tag
tags question: http://stackoverflow.com/q/26131569
tags question: http://stackoverflow.com/q/26061922
tags question: http://stackoverflow.com/q/26057280

http://stackoverflow.com/comment/41028188
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26168306
has text: sorry, I use windows. Neither knew this command.
score: 0

http://stackoverflow.com/a/26098069
answers question: http://stackoverflow.com/q/26097917
type: Answer
score: 0
has body: This way you just open the next on the close of the previus function toggle_visibility(id,next) { var e = document.getElementById(id); if (e.style.display == 'none') e.style.display = 'block'; else e.style.display = 'none'; if (next != undefined) { toggle_visibility(next); } } call it like: INCOME http://jsfiddle.net/txa2x9qq/3/

http://stackoverflow.com/comment/41126036
score: 0
comment on: http://stackoverflow.com/a/26222056
type: Comment
has text: If you have an element like 158x67, you can't use the grid option
type: AnswerComment

http://stackoverflow.com/comment/40949149
has text: Tip: Some semi colons and indentation would make your code even better.
score: 0
comment on: http://stackoverflow.com/q/26126744
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41015168
type: Comment
has text: @dreyescat showing valid url...
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26157767

http://stackoverflow.com/comment/52298989
has text: @Flimzy thanks for taking the time reviewing this 1 year old answer, it could indeed use some improvement / clarification. I didn't say __any__ of the things your critisize it for, but that means my answer must be confusing. So I'm trying to make it less confusing.
comment on: http://stackoverflow.com/a/26071579
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26082305
has body: There's a few problems here.. First off ID's are suppose to be unique therefore if you use an ID and are dynamically manipulating it such as style. That style will apply to the other ID's. My suggestion is use classes. If you're code doesn't work with classes then make it work! This is all the help you're getting from me. $(document).ready(function() { $("label").on('click', function() { $(this).children("img").toggleClass('active'); }); }); .hide { display: none; } img { border-top: 2px solid rgba(102, 170, 255, 0); border-left: 2px solid rgba(102, 170, 255, 0); border-right: 2px solid rgba(102, 170, 255, 0); border-bottom: 2px solid rgba(102, 170, 255, 0); } .active { border-top: 2px solid rgba(102, 170, 255, 0); border-left: 2px solid rgba(102, 170, 255, 0); border-right: 2px solid rgba(102, 170, 255, 0); border-bottom: 2px solid rgba(102, 170, 255, 1); }
score: 0
answers question: http://stackoverflow.com/q/26079780
type: Answer

http://stackoverflow.com/a/26056845
has comment: http://stackoverflow.com/comment/40821965
upvote count: 3
has comment: http://stackoverflow.com/comment/40822420
has comment: http://stackoverflow.com/comment/40821299
has comment: http://stackoverflow.com/comment/40822244
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40821585
type: Answer
accepted answer of: http://stackoverflow.com/q/26056670
has comment: http://stackoverflow.com/comment/40821697
has comment: http://stackoverflow.com/comment/40821788
score: 3
has body: Use UIWebViewDelegate method and set it return to NO always. this way it will never load any other url. This is objective c code you need change it to swift. - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { return NO; } For swift read here Swift: func webView(WebViewNews: UIWebView!, shouldStartLoadWithRequest request: NSURLRequest!, navigationType: UIWebViewNavigationType) -&gt; Bool { return false; }
answers question: http://stackoverflow.com/q/26056670

http://stackoverflow.com/a/26101527
answers question: http://stackoverflow.com/q/26101227
type: Answer
score: 3
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26101227
has body: If you put z-index:0 on the input-group in the 2nd form it works ok. ... &lt;form class="form-horizontal" action="/compare/" method="get" role="form"&gt; &lt;div class="input-group" style="z-index:0;"&gt; ... http://jsfiddle.net/kme2j8ma/
upvote count: 3

http://stackoverflow.com/q/26129655
tagged with: jquery
score: 0
has title: Make Body's width as a doubling of Screen with CSS and JS
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
has body: I want to make Body's width as a doubling of Screen. for exmaple, If the width of screen(exactly, window) is 500px, Then Body's width should be 1000px. and I can only use HTML, CSS, and Javascript because server doesn't let me use neither PHP nor others. So, How to make it with CSS, and JS?
has answer: http://stackoverflow.com/a/26129701
has answer: http://stackoverflow.com/a/26129678
type: Question
answer count: 2
tagged with: javascript

http://stackoverflow.com/comment/41007552
score: 0
type: Comment
has text: If you are interested about a detailed picture based issue description just let me know and I'll create it so you can actually see the problem on an example. If you would like to see a live presentation it's also no problem, just add me in Skype or elsewhere. Thank you.
type: QuestionComment
comment on: http://stackoverflow.com/q/26149714

http://stackoverflow.com/comment/58106137
score: 0
type: AnswerComment
has text: If you have a profile page template, how do you get the values of fields of the user of that specific profile page on the js side?
comment on: http://stackoverflow.com/a/26086406
type: Comment

http://stackoverflow.com/comment/41035300
comment on: http://stackoverflow.com/q/26173175
score: 0
type: QuestionComment
has text: I got this message: `pagedown@1.1.0 node_modules\pagedown`
type: Comment

http://stackoverflow.com/a/26096489
score: 0
type: AcceptedAnswer
has body: the MSDN sample sample_/Scripts/JavaScriptRESTDataOperationsSample is connected to the sample_/JavaScriptRESTDataOperationsSample.htm web resource. Sample: Create, retrieve, update, and delete using the OData endpoint with JavaScript If you look inside the CreateAccount function you will find these lines: startButton = document.getElementById("start"); output = document.getElementById("output"); so the script is expecting that inside the HTML file these objects are present. In your example you only include the button, but the sample_/JavaScriptRESTDataOperationsSample.htm web resource contains the requested objects: Start Reset
accepted answer of: http://stackoverflow.com/q/26094957
type: Answer
answers question: http://stackoverflow.com/q/26094957

foreach
tags question: http://stackoverflow.com/q/26084674
tags question: http://stackoverflow.com/q/26090870
type: Tag
tag name: foreach

http://stackoverflow.com/q/26186919
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41061946
has comment: http://stackoverflow.com/comment/89138812
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/42534591
type: Question
tagged with: rotation
tagged with: cesiumjs
tagged with: javascript
has comment: http://stackoverflow.com/comment/56840880
score: 4
upvote count: 4
has title: Cesium WebGL Camera Rotate, How to Stop the Rotation
has body: OK, first time using Cesium. I have a simple, non-advanced question that I posted a couple times on their forms but no one is responding. So I thought I'd try here. All I need to do is figure out how to stop an event before invoking another. Here's an example of what's happening. The globe spins on user-connect, but I need it to stop if they then click on "fly me home", etc. Code below. So the arg in spinGlobe is the spinRate. If I pass in 0.0 on the inital connect, it won't rotate. Perfect. So I though that if a click event ( user clicks fly me home ) then invoked spinGlobe(0.0) that the globe would stop rotating. But it doesn't. Can I not dynamically change the spinRate? Or am I going about this all wrong? spinGlobe( 0.5 ) function spinGlobe( dynamicRate ) var previousTime = Date.now(); viewer.clock.onTick.addEventListener(function( clock ) { var spinRate = dynamicRate; var currentTime = Date.now(); var delta = ( currentTime - previousTime ) / 1000; previousTime = currentTime; viewer.scene.camera.rotate(Cesium.Cartesian3.UNIT_Z, -spinRate * delta); }); }
answer count: 1

http://stackoverflow.com/comment/41034438
has text: @KiranNath so this is actually a form? could you post a markup, and the PHP that actually handles that submission
score: 0
comment on: http://stackoverflow.com/q/26172496
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26147451
favorite count: 0
has answer: http://stackoverflow.com/a/26173023
linked to: http://stackoverflow.com/q/26147276
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/40987306
has comment: http://stackoverflow.com/comment/40987347
has title: load html form in onclick page
score: 1
has body: Am using onclick method to select form type. I have many form types- here is the example When I click one onclick sub menu will open and when I select form type the selected form should open bellow the menu How do I load a form when I select option in sub menu I need to load HTML form in same page but the HTML code will be store in separate HTML file form.php &lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="utf-8"&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;title&gt;1st indian site&lt;/title&gt; &lt;link rel="shortcut icon" href="../../../../images/ico/fav.ico" &gt; &lt;link rel="stylesheet" href="formoid_files/formoid1/formoid-solid-blue.css" type="text/css" /&gt; &lt;link href="../../../css/proper align.css" rel="stylesheet"&gt; &lt;link href="../../../css/main.css" rel="stylesheet"&gt; &lt;link href="../../../css/bootstrap.min.css" rel="stylesheet"&gt; &lt;style&gt; a{text-decoration:none;}a:hover{} &lt;/style&gt; &lt;/head&gt;&lt;!--/head--&gt; &lt;body data-spy="scroll" data-target="#navbar" data-offset="0"&gt; &lt;header id="header" role="banner"&gt; &lt;div class="container"&gt; &lt;div id="navbar" class="navbar navbar-default"&gt; &lt;div class="navbar-header"&gt; &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"&gt; &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;/button&gt; &lt;a class="navbar-brand" href="../index.php?hfgjiii4wg4fgww86g4gg41"&gt;&lt;/a&gt; &lt;/div&gt; &lt;div class="collapse navbar-collapse"&gt; &lt;ul class="nav navbar-nav"&gt; &lt;li class="active"&gt;&lt;a href="#pricing"&gt; &amp;nbsp;&amp;nbsp;Post&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/header&gt;&lt;!--/#he…
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40999538
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41020623
tagged with: javascript
tagged with: forms
accepted answer: http://stackoverflow.com/a/26173023
answer count: 1
downvote count: 0
tagged with: jquery

http://stackoverflow.com/comment/40910363
type: Comment
type: QuestionComment
has text: why don't you just call that code after the page loads? then you can call `editor` where you need it.
score: 1
comment on: http://stackoverflow.com/q/26105332

http://stackoverflow.com/comment/40789646
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26039520
has text: They are probably trying to keep two displays in sync. This will not do that.
type: AnswerComment

knockout-components
type: Tag
tags question: http://stackoverflow.com/q/26094858
tag name: knockout-components

http://stackoverflow.com/comment/40988281
score: 1
has text: possible duplicate of [Jquery add css to head](http://stackoverflow.com/questions/12093509/jquery-add-css-to-head)
comment on: http://stackoverflow.com/q/26147604
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40887738
type: Comment
has text: Can you fiddle your code please .Thanks
comment on: http://stackoverflow.com/q/26092609
score: 0
type: QuestionComment

http://stackoverflow.com/a/26098046
type: Answer
has body: Why not just use: &lt;input type="number" ng-model="numericfield" /&gt; html5 behaviour is implemented by angular in older browsers.
upvote count: 2
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26097944

http://stackoverflow.com/comment/40867760
type: Comment
comment on: http://stackoverflow.com/a/26081372
type: AnswerComment
score: 0
has text: @X33 I posted an example.. Did I help you at all?

http://stackoverflow.com/a/26060078
has body: ngRepeat supports strict filter comparison. You just need to set :true as comparator in filter definition: ng-repeat="skill in skills | filter:{skillset_id: filterbySkillset}:true"
has comment: http://stackoverflow.com/comment/40828725
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40827356
accepted answer of: http://stackoverflow.com/q/26060035
has comment: http://stackoverflow.com/comment/40828622
has comment: http://stackoverflow.com/comment/40832195
type: Answer
answers question: http://stackoverflow.com/q/26060035
has comment: http://stackoverflow.com/comment/40827302
has comment: http://stackoverflow.com/comment/40830456
score: 1
upvote count: 1

http://stackoverflow.com/comment/40898415
has text: after resizing it gets the new size but page doesn't load.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26098676

http://stackoverflow.com/a/26177974
has body: Don't use the APIModules_all.js script. That loads an older version of the API that only works with Flash players. Add params to the player embed code to load the smart player API: &lt;param name="includeAPI" value="true"&gt; &lt;param name="templateLoadHandler" value="onLoad"&gt; &lt;param name="templateReadyHandler" value="onReady"&gt; onLoad could look like this var videoPlayer; function onTemplateLoad(id) { var experience = brightcove.api.getExperience(id); videoPlayer = experience.getModule(brightcove.api.modules.APIModules.VIDEO_PLAYER) } The template load event is too early to interact with playback, as no video is loaded yet. Wait for the ready event before using videoPlayer.play().
answers question: http://stackoverflow.com/q/26147503
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/26078752
has comment: http://stackoverflow.com/comment/40861876
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/40861840
has comment: http://stackoverflow.com/comment/40861796
answers question: http://stackoverflow.com/q/26078681
has body: When detaching you have to actually store a reference to the element, otherwise it's gone var elements = $(".masterImage:below-the-fold").detach(); // stuff $('body').append(elements); I'll leave figuring out how to combine that with those pseudo selectors up to you. Another issue is that once an element is detached, it's no longer in the DOM, hence it has no parent, so $(this).parent() doesn't do anything. It seems like it would be a lot easier to just hide and show the elements instead of removing them from the DOM ?
has comment: http://stackoverflow.com/comment/40862240

http://stackoverflow.com/q/26034115
tagged with: controller
score: 0
tagged with: templates
has comment: http://stackoverflow.com/comment/40779989
has comment: http://stackoverflow.com/comment/40781670
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40781117
has comment: http://stackoverflow.com/comment/40781236
has comment: http://stackoverflow.com/comment/40780009
type: Question
has body: I'm working on a Themeforest-Template,where the controllers looks like this: (function () { "use strict"; angular.module("app.tables", []).controller("articlesCtrl", ["$scope", "$http", function ($scope, $http) { $http.get('www/articles.php?method=fetchAll').success(function (data) { $scope.articles = data; console.log($scope.articles); }). error(function (data) { // log error }) } ])}.call(this)) Everywhere in the web I find guides and tutorials where the controllers looks like this: app.factory('articlesFactory', function ($http, $resource) { $http.get('www/articles.php?method=fetchAll').success(function (data) { return $resource(data); }); app.controller('articlesCtrl', function ($scope, articlesFactory) { $scope.articles = articlesFactory.query(); })}); why does this not work for me ? my app.js looks like this: (function () { 'use strict'; angular.module('app', [ 'ngRoute', 'ngAnimate', 'ui.bootstrap', 'easypiechart', 'textAngular', 'ui.tree', 'ngMap', 'ngTagsInput', 'app.controllers', 'app.directives', 'app.directives', 'app.localization', 'app.nav', 'app.ui.ctrls', 'app.ui.directives', 'app.ui.services', 'app.ui.map', 'app.form.validation', 'app.ui.form.ctrls', 'app.ui.form.directives', 'app.tables', 'app.task', 'app.chart.ctrls', 'app.chart.directives', 'app.page.ctrls', 'app.calls', 'app.avgLic' ]).config([ '$routeProvider', function ($routeProvider) { var routes, setRoutes; routes = [ "calls/calls", "calls/archive", "calls/statistics", "calls/sms", "contacts/contacts", "configurator/configurator", "configurator/offers", "configurator/search", "configurator/articles", "configurator/orders", "configurator/distributors", "orders/new_orders", "orders/archive", "avg/active_lic", "avg/new_lic" ]; setRoutes = function (route) { var config, url; url = '/' + route; config = { templateUrl: 'views/' + route + '.html' }; $routeProvider.when(url, config); return $routeProvider; }; routes.forEach(function (route) { return setRoutes(route); }); return $routeProvider.when(…
linked to: http://stackoverflow.com/q/17977082
tagged with: function
tagged with: javascript
has title: AngularJS Controller notation

http://stackoverflow.com/comment/40922178
comment on: http://stackoverflow.com/q/26110835
type: QuestionComment
has text: ohh sorry, i updated my question, i need the key to be grouped by index number in its current structure.
score: 0
type: Comment

http://stackoverflow.com/comment/40898357
type: Comment
has text: I agree with your answer, except the 'no out-of-the-box private variables' part. All JS variables are lexically scoped 'out-of-the-box', which is a more powerful/general mechanism than "private" variables (eg. as found in Java); therefore JS supports "private" variables as a special-case of the way it handles all variables.
type: AnswerComment
score: 4
comment on: http://stackoverflow.com/a/26092342

http://stackoverflow.com/q/26131052
has comment: http://stackoverflow.com/comment/40957441
has comment: http://stackoverflow.com/comment/40957635
favorite count: 0
has answer: http://stackoverflow.com/a/26131080
has comment: http://stackoverflow.com/comment/40957625
has comment: http://stackoverflow.com/comment/40992434
tagged with: jquery-on
accepted answer: http://stackoverflow.com/a/26131080
score: -1
has comment: http://stackoverflow.com/comment/40957481
linked to: http://stackoverflow.com/q/8752321
has comment: http://stackoverflow.com/comment/40957695
downvote count: 2
upvote count: 1
has body: I read that .live() has been deprecated, and that I should use .on instead. But .on doesn't seem to be working for elements added to the DOM. My script adds a table with any number of text boxes (input type="text"), and I want to run some script when the content in any of those text boxes changes. Here's part of my code. vendorsPopUp references the div that contains my table. $('input', vendorsPopUp).on('change', function (e) { alert($(this).attr('class')); }); But this code does not run when the content in a text box changes.
duplicate of: http://stackoverflow.com/q/8752321
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40957679
has comment: http://stackoverflow.com/comment/40957509
type: Question
has title: Problems Using .on() with Dynamically Added Elements
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40808828
comment on: http://stackoverflow.com/a/26049289
score: 0
type: Comment
has text: The complexity aside, you can run this on the same server/vps as your web server/php application. That's how it's written to work (on localhost).
type: AnswerComment

http://stackoverflow.com/q/26120008
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/26120144
tagged with: javascript
tagged with: jquery
tagged with: asp.net
has title: how to call javascript confirm dialog function in html.actionlink in asp.net mvc?
score: 0
has body: I want to show a confirm dialog menu, when user clicks DELETE button. But button doesn't trigger my script. After triggering JavaScript, if user chose OK, script must go to the action. Else, if user clicks the CANCEL, nothing should happen. Here is the JavaScript code; Here is MVC codes; @Html.ActionLink("Delete", "Your-Action", new { @class = "confirmDialog" }) Are you sure ?
tagged with: asp.net-mvc-4
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40936361
tagged with: asp.net-mvc

http://stackoverflow.com/q/26145813
tagged with: javascript
score: 4
has body: Hi so I've used the command: &lt;script type='text/javascript'&gt; $(document).ready(function() { $('.carousel').carousel({ interval: 4500 }) }); right before my closing body tag in order to get my bootstrap carousel to start and scroll through automatically. The problem is that the last slide briefly resizes to a smaller height (moving the whole page up with it) before sliding back to the first slide. To explain: All the slide images are the same size and all show at the same size as they slide through. But the last slide shortens (decreases in height) quickly before the first slide appears again (the first slide is shown back at the correct/original height of the slides). This is annoying because the temporary decrease in slide height causes the entire page to shift upwards. To clarify, the last slide is initially starting at the correct height, then for a split second before sliding back to the first slide the last slide shortens in height. The first slide is then shown at the correct height again. I have no idea what is causing this?
has answer: http://stackoverflow.com/a/26145896
answer count: 1
tagged with: carousel
has title: bootstrap carousel resizing image when changing slide
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: image-resizing
type: Question
upvote count: 4
downvote count: 0

http://stackoverflow.com/comment/40970547
type: Comment
comment on: http://stackoverflow.com/q/26138416
score: 0
has text: use ajax and a server side language like php or asp to pull the data and push it out as json. use the result to then populate what OSM needs
type: QuestionComment

http://stackoverflow.com/a/28149187
type: Answer
has body: A signalR connection does not open instantly. You need to wait until the open connection promise is fulfilled. Try the following code $.connection.hub.start().done(function () { // Declare a function on the blog hub so the server can invoke it myHub.client.BroadcastMessage= function ( message) { alert(message); }; myHub.server.SentInfo(" message"); });
answers question: http://stackoverflow.com/q/26088314
score: 0

http://stackoverflow.com/comment/40966626
type: QuestionComment
has text: You dont need to get the scope from the element, replace `element.scope()` with `$scope`.
comment on: http://stackoverflow.com/q/26136363
score: 0
type: Comment

youtube-javascript-api
type: Tag
tags question: http://stackoverflow.com/q/26124567
tags question: http://stackoverflow.com/q/26189144
tag name: youtube-javascript-api
tags question: http://stackoverflow.com/q/26155330
tags question: http://stackoverflow.com/q/26051626
tags question: http://stackoverflow.com/q/26183307

http://stackoverflow.com/comment/40984048
has text: Sure; I just wanted to make sure that your confusion wasn't related to `push` specifically, but applies more broadly to array references.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26145616

http://stackoverflow.com/comment/40858877
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26077146
has text: No jQuery sorry. Plain JS.
score: 0

video
tags question: http://stackoverflow.com/q/26182986
type: Tag
tags question: http://stackoverflow.com/q/26042739
tags question: http://stackoverflow.com/q/26153836
tags question: http://stackoverflow.com/q/26132494
tags question: http://stackoverflow.com/q/26109462
tags question: http://stackoverflow.com/q/26111919
tag name: video
tags question: http://stackoverflow.com/q/26078754
tags question: http://stackoverflow.com/q/26143051
tags question: http://stackoverflow.com/q/26137581

http://stackoverflow.com/a/34402264
has body: I resolved this issue (or possibly a very similar one) buy throttling the work I did in the zoom_changed listener. I used lodash throttle. Replace this google.maps.event.addListener(mapClass.map, 'zoom_changed', myFunction); With this google.maps.event.addListener(mapClass.map, 'zoom_changed', _.throttle(myFunction,100));
type: Answer
answers question: http://stackoverflow.com/q/26057886
score: 0

http://stackoverflow.com/comment/40900546
type: QuestionComment
has text: @Tasos: SO is an English site. Please stick to English.
score: 0
comment on: http://stackoverflow.com/q/26099532
type: Comment

http://stackoverflow.com/a/26166295
type: Answer
has body: I guess from your code that you have a "regular" view (not a view whose purpose is to handle ajax data). Redirecting can be achieved in the view, you do not need ajax. Just submit the form. In your recepcion.html file write something like some html &lt;form method="POST" action=""&gt; &lt;!-- we leave the action part blank, to send the data to the same view --&gt; {{ form }} &lt;!-- the form you are passing to the template --&gt; {% csrf_token %} &lt;!-- do not forget the token or django will return an error --&gt; &lt;input type="submit" name="submit" value="Submit"/&gt; &lt;/form&gt; some html Btw: you can use render (https://docs.djangoproject.com/en/dev/topics/http/shortcuts/#render) instead of render_to_response (you will not have to pass the request every time). you can use the reverse function to redirect to a url. Ie instead of HttpResponseRedirect('/monitor/'), write HttpResponseRedirect(reverse('name_of_the_view_you_want_to_redirect_to')), https://docs.djangoproject.com/en/1.6/ref/urlresolvers/#reverse.
answers question: http://stackoverflow.com/q/26165703
has comment: http://stackoverflow.com/comment/41023109
has comment: http://stackoverflow.com/comment/41022898
score: 0

http://stackoverflow.com/comment/41043212
score: 0
type: QuestionComment
type: Comment
has text: Have you seen [this](http://stackoverflow.com/questions/481144/equation-for-testing-if-a-point-is-inside-a-circle)?
comment on: http://stackoverflow.com/q/26177468

http://stackoverflow.com/a/26052560
has body: PHP outputs HTML, in which can contain JavaScript. Note you need to use . to concatenate in PHP. But in this case we just need to use single quotes: $question_type = "&lt;input ... onkeyup='allnumeric(this.value)' ... &gt;";
score: 0
answers question: http://stackoverflow.com/q/26052530
type: Answer

http://stackoverflow.com/q/26037618
type: Question
has body: So, I'm trying to solve a pretty simple problem here but the best part of 4 hours later I still have no idea. I'd just like to take the variable z and convert it to php so I can use the value in an array. At the moment I have managed to convert the value to php in another file now I need to get it back to the original file to use and that's where I've hit a wall. I've included the relevant code below. orders2.php Takes the javascript value of z and makes it PHP using another file (function($) { $(document).on('click', '.rowclick',function() { var z = 2; alert(z); var post = $.post('../../wp-content/themes/alma-child/includes/modes.php',{z:z}); post.done(function(data){ <?php $rownum = $_GET['z2']; echo "nei"; ?> }) $("#myModal1").modal(); }); })(jQuery); the modal part in orders2.php Close Window Track Mastering Details Track Name <?php echo $waiting[$z2][0] ?> Artist <?php echo $waiting[$z2][1] ?> Duration <?php echo $waiting[$z2][2] ?> ISRC <?php echo $waiting[$z2][3] ?> Mastering Notes <?php echo echo $waiting[$z2][4] ?> Print modes.php the other file This code is definitely not correct, I tried to take the jQuery from one of the previous solution but wasn't sure how it worked <?php $z2=$ _POST['z']; ?> <?php echo $z2; ?> Notes: I realise this may not be the best way to do this, so any other solutions to convert a javascript variable to php would be appreciated. Also, just to mention I would like it if it was possible for the page not to refresh (hence javascript)
has comment: http://stackoverflow.com/comment/40787415
has answer: http://stackoverflow.com/a/26039261
accepted answer: http://stackoverflow.com/a/26039261
tagged with: modal-dialog
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/40786108
has title: How to get a php variable from one file to another maybe using jQuery/javascript?
has comment: http://stackoverflow.com/comment/40786302
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40786065
linked to: http://stackoverflow.com/q/13840429

http://stackoverflow.com/a/26207977
has body: I asked for help at wordpress and got this javascript which works like a charm. var $ = jQuery, articles = $('.article-wrapper'), widths = 0, target = $('#primary-home'); articles.each(function() { widths += $(this).width(); }); target.css('width', widths); I have been told that it should be achievable with CSS. If I do manage to get it to work that way I'll post again with how.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26111931

http://stackoverflow.com/comment/41071058
has text: you are contradicting @torazaburo
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26192664

http://stackoverflow.com/a/26190585
type: Answer
answers question: http://stackoverflow.com/q/26180241
score: 1
upvote count: 2
has body: I wrote it in ExtendScript. Tested on Osx Photoshop 2014 CC // based on this stackoverflow // http://stackoverflow.com/a/2780624/1770432 var main = function(arguments, body) { if (app.documents.length &lt; 1) { // abort no file to place imports in return; } // filter does not work on OSX var files = File.openDialog("Select your files to place", "*.*", true); if (files.length &lt; 1 || files === null) { // abort // nothing selected or canceld return; } else { // got something var doc = app.activeDocument; // loop all files for (var i = 0; i &lt; files.length; i++) { // we use a try catch to sort out files Photoshop cant handle try { var curr_file = app.open(files[i]); // one of them curr_file.selection.selectAll(); curr_file.selection.copy(); curr_file.close(SaveOptions.DONOTSAVECHANGES); doc.paste(); } catch (e) { // need to skip files Photoshop can't open // could also be done via a file filter continue; } } } } main();
downvote count: 1
has comment: http://stackoverflow.com/comment/41118576
has comment: http://stackoverflow.com/comment/41146083

http://stackoverflow.com/q/26044773
has comment: http://stackoverflow.com/comment/40799638
linked to: http://stackoverflow.com/q/17178016
has comment: http://stackoverflow.com/comment/40799577
score: 0
has answer: http://stackoverflow.com/a/26064263
has title: HTML button(s) disappear on click
accepted answer: http://stackoverflow.com/a/26064263
has body: I am reading an XML file using JavaScript, and this part works as I am getting the data. Here is the XML file: Everyday Italian Giada 2005 30,00 Cook Book Manado 2012 44,00 Intrigue L'amion 2002 29,99 Now I use JavaScript to display that data in a table. Also, I added two buttons that each have an onclick attribute to call a specific function. One button calls the change() and the other calls remove(). Here is the code for the HTML page and JavaScript: Index When I click the change button, both buttons disappear. When I click the remove button, only remove button disappears. Here are all 3 states of my page (I cannot upload a photo because I don't have the rep): http://postimg.org/image/5lrwf7rcz/ Now, I already searched for an answer and this question or this question answers didn't help me. I couldn't find a missing closing tag and returning false doesn't change anything. UPDATE: I ran the debugger on Chrome and when I click the remove button, the remove() function never gets called but when I click the change button, the change() function does get called.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
linked to: http://stackoverflow.com/q/18119773
tagged with: dom-events
has comment: http://stackoverflow.com/comment/40799830
tagged with: http://stackoverflow.com/tag/xml
has comment: http://stackoverflow.com/comment/40799769
has comment: http://stackoverflow.com/comment/40799746
has comment: http://stackoverflow.com/comment/40799647
type: AnsweredQuestion
tagged with: html-input
linked to: http://stackoverflow.com/q/14336077
has comment: http://stackoverflow.com/comment/40799613
type: Question
has comment: http://stackoverflow.com/comment/40801424
tagged with: javascript
has comment: http://stackoverflow.com/comment/40800050

http://stackoverflow.com/q/26091447
tagged with: googlebot
tagged with: google-search
tagged with: javascript
has comment: http://stackoverflow.com/comment/40903578
has comment: http://stackoverflow.com/comment/40885566
has comment: http://stackoverflow.com/comment/40885518
has answer: http://stackoverflow.com/a/26091492
answer count: 2
has answer: http://stackoverflow.com/a/26504239
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40885601
has body: I have a simple HTML page and I need to hide a little part of the text from Google. &lt;p&gt; text i want to hide &lt;/p&gt; I could load this text with php include and use a robots.txt but the problem is - if someone would set a link to this php file - Google would again show the text I want to hide. My next idea was: $str = 'textiwanttohide'; echo base64_decode($str); but the problem is - Google encodes this within seconds and the text is shown in the Google results. So how can I hide a specific part of my text from Google? Is there a php or javascript solution?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has title: Hide part of HTML page from Google
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40903509

http://stackoverflow.com/comment/40892189
has text: What is your ouput now? Can you give us some more information?
score: 0
comment on: http://stackoverflow.com/q/26095115
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26120462
type: Answer
answers question: http://stackoverflow.com/q/26119930
score: 0
type: AcceptedAnswer
has body: You could float the icons to the right. and the remove that when the nav is open. a .fa { float: right; } .nav-open a .fa { float: none; } Codepen Demo
accepted answer of: http://stackoverflow.com/q/26119930

http://stackoverflow.com/comment/40831509
has text: That's perfect. Didn't know that there were so few codes. Expected around 1000 entries or so.
type: AnswerComment
comment on: http://stackoverflow.com/a/26062108
type: Comment
score: 0

http://stackoverflow.com/a/26166573
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26165173
has body: Something similar to the following should work. HTML Name Email
downvote count: 0

http://stackoverflow.com/q/26168732
type: Question
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26170064
tagged with: google-chrome-extension
has body: So this example chrome extension calls a selector for media streams and then the gotStream(stream) clearly is looking for a parameter of a mediaObject. However, when the gotStream function is passed in as the second parameter to navigator.webkitGetUserMedia no parameter is passed in. It merely remains states the function name. Here is the code function gotStream(stream) { console.log("Received local stream"); var video = document.querySelector("video"); video.src = URL.createObjectURL(stream); localstream = stream; stream.onended = function() { console.log("Ended"); }; } function getUserMediaError() { console.log("getUserMedia() failed."); } function onAccessApproved(id) { if (!id) { console.log("Access rejected."); return; } navigator.webkitGetUserMedia({ audio:false, video: { mandatory: { chromeMediaSource: "desktop", chromeMediaSourceId: id } } }, gotStream, getUserMediaError); } I've seen these kinds of calls before and I just don't get how they work, please help.
has title: Parameter passed without explicitly stating javascript Chrome extension
score: 0
tagged with: google-chrome
has answer: http://stackoverflow.com/a/26170064
type: AnsweredQuestion

http://stackoverflow.com/a/26211747
type: Answer
has body: The problem seems to be with your static endpointId. In their original helper libraries they have a method called generateUUID() which is in GeneralHelper. The best idea would be to use that method, however, if you feel like creating ayour own, go for it. The main point is that each of your application must have different endpointId.
has comment: http://stackoverflow.com/comment/41111014
answers question: http://stackoverflow.com/q/26174152
has comment: http://stackoverflow.com/comment/41112646
has comment: http://stackoverflow.com/comment/41345721
score: 0

http://stackoverflow.com/q/26045995
favorite count: 0
has title: What is the expected input for uninterestingTags in osmtogeojson?
upvote count: 1
type: AnsweredQuestion
tagged with: leaflet
score: 1
tagged with: geojson
has answer: http://stackoverflow.com/a/26054857
type: Question
tagged with: openstreetmap
has body: I am currently working with Leaflet.js and Overpass API and I am using osmtogeojson to do the format change between the OSM-JSON that Overpass API outputs and the GeoJSON that Leaflet.js needs as input. To do so I am using the following code: data = osmtogeojson(osm_data); This works perfectly. Here comes the problem: I am trying to ignore some data that I am getting on the OSM-JSON dataset. So I am trying to use uninterestingTags as given in the osmtogeojson API. The thing is that I don't know how to code this thing. This is not working: data = osmtogeojson( osm_data, uninterestingTags = {"source"} );
downvote count: 0
tagged with: javascript
tagged with: overpass-api
answer count: 1
accepted answer: http://stackoverflow.com/a/26054857

http://stackoverflow.com/comment/40986036
score: 0
type: AnswerComment
type: Comment
has text: you mean to add the instead if the img src? im a little bit confused
comment on: http://stackoverflow.com/a/26146068

http://stackoverflow.com/q/26055801
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40819951
tagged with: sql-server-2008-r2
tagged with: asp.net
has body: I am implementing an application which contains 24 digits in a textbox for any kind on number. I am using asp.net 4.5 and sql server 2008r2. So what kind of data type I can use for c# and sql server. How I can make any calculation with this value like add/subtract some number with this.There is any inbuilt method or function in asp.net. Can we implement this in java script also.
type: Question
has title: Implementing to support 24 digits number in asp.net sql server
has comment: http://stackoverflow.com/comment/40820175
score: 0
has comment: http://stackoverflow.com/comment/40819556
tagged with: c#
answer count: 0

http://stackoverflow.com/comment/41017862
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26161693
score: 0
has text: I tried adding `overflow-x: hidden` on all of them, the `html`, `body`, the outer page wrapper and the inner page wrapper (that is being offset to the right when the menu comes up), it doesn't have any effect. Why would `hammer.js` make any difference? Seems like a simple JS event handling issue to me, that I just can't get to work.

http://stackoverflow.com/q/26189834
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26191425
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26191425
answer count: 2
has comment: http://stackoverflow.com/comment/41066323
possible better answer: http://stackoverflow.com/a/26189866
tagged with: jquery
has answer: http://stackoverflow.com/a/26189866
has title: To pass argument from a php file to javascript file
has body: I am facing some trouble in passing a simple variable from a php to javascript file. I have a form which submits through a php file which basically updates the record at the server end. And if the updation is succesful, I just want to pass the message back to the javascript where I can update it on a certain section of the page. My codes are: Javascript code - abc.js function expand_cards(project, SlNo) { name = project['project_name']; j = "ShowForm-"+SlNo+""; s = "&lt;div class='edit_project_card'&gt;"; s += "&lt;form method='post' action='Edit_Project.php'&gt;&lt;div class='project_form'&gt; // Form Contents s += "&lt;div class='Form_button'&gt; &lt;input type='submit'&gt; &lt;/div&gt;"; s += "&lt;/form&gt;&lt;/div&gt;"; $("#"+j+"").html(s); response = $.parseJSON(data); $("#"+j+"").html(response); } PHP file - Edit_Project.php &lt;?php //The updation stuff at the server end if (!mysqli_query($connection,$sqlquery)) { $response = "'Error in your code: ' . mysqli_error($connection)"; } else { $response = "1 record updated"; } echo json_encode($response); mysqli_close($connection); ?&gt; But the problem is the screen is printing $response variable as it is and not exactly passing it back to the javascript function as wished. I know I can use a $.post function which can can receive argument but it's a long form and passing parameters would be difficult in that. Can anybody help me out here ? Thanks
tagged with: php

http://stackoverflow.com/comment/40858393
has text: @squint, just wanted to say that I've made it with pure JS and it's running with 60.000K MAX of memory usage! It's really, really fast!!! I'm really happy!! Fell free to answer this question, by saying to use pure JS, it really worked handsomely!
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26075340
score: 2

http://stackoverflow.com/comment/40819440
score: 0
type: AnswerComment
has text: Works, but changes all unit_costs. How do I get it to only change the unit_cost of the row the select is on. I guess I will have to pass an [] somewhere?
type: Comment
comment on: http://stackoverflow.com/a/26055275

http://stackoverflow.com/a/26106040
has comment: http://stackoverflow.com/comment/40913990
score: 3
has comment: http://stackoverflow.com/comment/40913003
upvote count: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26106025
has body: You want += price += 13; This is equiv to: price = price + 13; Calling price + 13 will do nothing, since your never re-assigning the result back to price.
type: Answer
has comment: http://stackoverflow.com/comment/41153441

http://stackoverflow.com/comment/40943247
has text: i add on my post the render call its call inside my route i use a rest service to get my data its already into Json format i don't think i need to call .toJSON()
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26123250

http://stackoverflow.com/q/26101704
tagged with: angularjs
type: UnansweredQuestion
has body: I created an angular service contains this code: authenticationAPI.login = function() { return $http({ method: 'GET', timeout: 10000, url:'http://serverName/apiName/Login', params : {userName : 'User', password : '12345'} }); So , currently my "authenticationController" is using the "login" method of this service and handling the .success and .error by itself. One of the reasons i chose to handle it inside the controller is to decide what to do with the html (show alert, change some elements) from the controller when encounter an error for example. But, i am new to angular and not sure if this is the best practice for handling the request. Can you help me figure out if i should handle this logic in the service or controller?
tagged with: separation-of-concerns
has comment: http://stackoverflow.com/comment/40903884
type: Question
has answer: http://stackoverflow.com/a/26101848
has comment: http://stackoverflow.com/comment/40903820
tagged with: javascript
has title: Use success and error in angular service or controller
score: 0
answer count: 1

http://stackoverflow.com/comment/40800449
comment on: http://stackoverflow.com/q/26045003
has text: Finally, `distance_of_time_in_words_to_now(todo.created_at + 7.days)` - what do you expect that to say? If I just created the todo, it should say "7 days". If I come back tomorrow, it should say "6 days". Right?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26149189
answer count: 1
has body: I am currently using dc to make a few line graphs. I also just added in a slider(i played with d3.slider, but then found a different solution) I am hoping to use the slider to filter the other graphs. Does anyone have suggestions on how to get the selected value from the slicer, and then filter? To filter I was thinking something like: d3.select("input[type=range]").on("change", function() { var gendersel = this.value; }); var data = _.where(data2, {variable: gendersel}); However, this doesn't work... I'm also thinking about using crossfilter (probably smarter) for filtering, but still having issues getting the slider value: var bytest = ndx.dimension(function(d) { return d.testvar; }); bytest.filter([gendersel, gendersel + .5]) My Slider: Test Filter: I was using this as a reference: https://www.biostat.wisc.edu/~kbroman/D3/slide_scatter.html
tagged with: d3.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26149315
type: Question
tagged with: javascript
tagged with: dc.js
has title: Getting Slider Value - d3/dc
score: 0

http://stackoverflow.com/a/55824105
score: 0
type: Answer
has body: When you want to get the year and month between two date: var dateFrom = '2017-08-10'; var dateTo ='2019-04-23'; var date1 = new Date(dateFrom); var date2 = new Date(dateTo); var diff=0; var month=31; var days=1000*60*60*24; diff=date2-date1; var day=(Math.floor(diff/days)); var years = (Math.floor(day/365)); var months = Math.round(day % 365)/month; document.write(years+"year-"+months);
has comment: http://stackoverflow.com/comment/98313507
answers question: http://stackoverflow.com/q/26159269

http://stackoverflow.com/a/26048542
score: 1
accepted answer of: http://stackoverflow.com/q/26047455
upvote count: 1
has comment: http://stackoverflow.com/comment/40809373
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40809022
answers question: http://stackoverflow.com/q/26047455
type: Answer
has body: For the client you have no alternative than to use the build in browser TLS/SSL. You can implement JavaScript SSL if it would come to that, but you cannot distribute a trusted database of certificates to the browser. Once a secure and trusted path has been created from client to server, you can additionally encrypt data using a public (RSA or EC) key send to the client and hybrid cryptography. That way you can use application level cryptography on top of transport security - although the application level crypto will always be dependent on the security and trust that TLS/SSL provides. Whatever scheme you will be using, you must understand cryptography and the issues with JavaScript cryptography in the browser if you go this route. Just coding stuff won't give you any security, only a false sense of security.

http://stackoverflow.com/a/26160772
has body: I think your closing braces may be in the wrong place... move one of the two closing braces at the end of your JavaScript to the end of the validateForm() function.
type: Answer
accepted answer of: http://stackoverflow.com/q/26160683
answers question: http://stackoverflow.com/q/26160683
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/26113445
has answer: http://stackoverflow.com/a/26113617
has comment: http://stackoverflow.com/comment/40925134
has title: JavaScript 3 Dimensional String Array
type: Question
tagged with: canvas
tagged with: 3d
tagged with: arrays
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26113645
tagged with: multidimensional-array
type: UnansweredQuestion
has body: I'm kind of stuck trying to do a 3 dimensional array. Here's the code: var text = new Array("purple", "red", "white"); text["purple", "red", "white"] = new Array("one", "two", "three"); text["purple", "red", "white"]["one", "two", "three"] = new Array(3); var color = "white"; var font = "one"; var num = "two"; text[color][font][num] = new Image(); text[color][font][num] = "destination"; It doesn't run and when I inspect element it gives me a "Uncaught TypeError: Cannot set property 'white' of undefined" on the text[color][font][num] = new Image(); line. Please help, what am I doing wrong? :(

http://stackoverflow.com/q/26122780
has title: Get value from custom html attribute
tagged with: java
has answer: http://stackoverflow.com/a/26123076
type: Question
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26123076
tagged with: jsp
has body: I took the maintenance of a really old java web application. (Recently it was passed from tomcat 4 to tomcat 6, and maybe this caused the problem.) In the jsp there is a table that have inside this column (where elenco is a java array of objects and elenco[y] means a different object for each row of the table). So basically it is a radio button for every row: &lt;form name="index" action="elencoRichiesteFotoImpronte.jsp"&gt; &lt;td width="5%"&gt;&lt;div align="center"&gt;&lt;input type="radio" value="&lt;%=elenco[y].getId()%&gt;" value1="&lt;%=state%&gt;" value2="&lt;%=elenco[y].getNameOp()%&gt;" data-val2="&lt;%=elenco[y].getNameOp()%&gt;" name="selrec" id="selrec" &gt;&lt;/div&gt;&lt;/td&gt; &lt;/form&gt; (I added the attributes data-val2, to make some attempts with html-5, but didn't worked. And I added too the id, because in the code that I inherit was not present). In the same jsp there're a lot of parts in javascript that access to the selected value of radiobutton, for example: alert(document.index.selrec.value2); But it shows that the value is undefined and so most of the code doesn't work. Does exist an easy way to access to the selected custom value of the radiobutton without making big changes to all the code (maybe some HTML tags)? (And possibly without using jquery.)
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/q/26054381
type: UnansweredQuestion
score: 0
has body: I have basic tutorial for CKEditor Samples » Replace Textarea with Inline Editor But I can't get full page. &lt;script&gt; var cfg1 = { toolbar: 'Full', fullPage:true, allowedContent:true, extraPlugins:'wysiwygarea'}; CKEDITOR.inline('bg',cfg1); CKEDITOR.inline('exp'); CKEDITOR.inline('ed'); CKEDITOR.inline('skill'); CKEDITOR.inline('other'); CKEDITOR.inline('hobby'); &lt;/script&gt; I used above code but I can used only basic tool bar. I can't see Source (Click to see how source code of text that we input) on html element.
type: Question
has comment: http://stackoverflow.com/comment/41288328
tagged with: javascript
tagged with: ckeditor
tagged with: django-ckeditor
tagged with: fckeditor
has title: How to customize CKEditor Inline Editor for full Page support?
answer count: 0
has comment: http://stackoverflow.com/comment/40929902

http://stackoverflow.com/comment/40914779
type: AnswerComment
type: Comment
has text: What does "not working" mean? Does it mean "the correct element was selected but the event code didnt work". Or does it "the selector did not select the correct element". Please provide details if you want help.
comment on: http://stackoverflow.com/a/26107515
score: 0

http://stackoverflow.com/comment/41064248
type: QuestionComment
has text: Thank you for your inspiration!!! I am not sure what was creating the issue, but by forcing z-index values I was able to resolve the issue! Thank you!!
comment on: http://stackoverflow.com/q/26188310
score: 0
type: Comment

http://stackoverflow.com/comment/41028843
has text: This is working on every mobile device and browser except for Firefox on Samsung Galaxy.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26168950

http://stackoverflow.com/comment/40915040
has text: Please read [ask] and try again
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26107679

http://stackoverflow.com/comment/41029256
type: QuestionComment
has text: Thanks, that did what I needed. If you post as an answer, I'll accept.
comment on: http://stackoverflow.com/q/26169869
score: 0
type: Comment

http://stackoverflow.com/comment/40873367
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26084973
has text: I was under the assumption that every time a request was sent to the servlet a new thread would be spawned for that particular request. Or is it only requests from a different client that spawn a new thread?
score: 0

http://stackoverflow.com/a/26080400
upvote count: 1
has body: You don't get the slider1 value in your POST request because there is no form field slider1. What you need to do is add an hidden form element and populate it when the slider is moved. Like so: HTML: Simple Complex Playful Serious Javascript: $(function() { // Regular slider $('#slider1').slider({ min: 0, max: 100, values: [50], slide: function(event, ui) { $('#slider1-value').val(ui.value); } }); $('#slider2').slider({ min: 0, max: 100, values: [50], slide: function(event, ui) { $('#slider2-value').val(ui.value); } }); PHP: <?php if(isset($_POST['name'])) { $to = 'myemail@gmail.com'; $subject = 'My Form'; $headers = 'From: ' . $_POST['email'] . "\r\n" . 'Reply-To: ' . $_POST['email']; $message = 'Name: ' . $_POST['name'] . "\n" . 'Surname: ' . $_POST['surname'] . "\n" . 'E-mail: ' . $_POST['email'] . "\n" . 'Phone: ' . $_POST['phone']. "\n" . 'Country: ' . $_POST['country']. "\n" . 'Web Site : ' . $_POST['url']. "\n" . 'Simple vs Complex : ' . $_POST['slider1-value']. "\n"; mail($to, $subject, $message, $headers); if($_POST['copy'] == 'on') { mail($_POST['email'], $subject, $message, $headers); } } ?>
answers question: http://stackoverflow.com/q/26080350
has comment: http://stackoverflow.com/comment/40865303
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/40995480
type: AnswerComment
has text: Of course as an alternative you could ask the developers of this service to enable CORS.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26146066

xmlhttprequest
tags question: http://stackoverflow.com/q/26172973
tags question: http://stackoverflow.com/q/26190705
tags question: http://stackoverflow.com/q/26146961
tags question: http://stackoverflow.com/q/26132880
tags question: http://stackoverflow.com/q/26034591
tags question: http://stackoverflow.com/q/26046659
tags question: http://stackoverflow.com/q/26172509
tag name: xmlhttprequest
tags question: http://stackoverflow.com/q/26053412
tags question: http://stackoverflow.com/q/26102697
tags question: http://stackoverflow.com/q/26038906
type: Tag
tags question: http://stackoverflow.com/q/26168804
tags question: http://stackoverflow.com/q/26100329
tags question: http://stackoverflow.com/q/26089748
tags question: http://stackoverflow.com/q/26063374
tags question: http://stackoverflow.com/q/26164705
tags question: http://stackoverflow.com/q/26058005
tags question: http://stackoverflow.com/q/26111277

http://stackoverflow.com/a/26118218
has body: You can use on method from jQuery, you can use it to bind the event with reference to parent element so even if you change the actual target DIV's content, event will get attached as we have bind event with reference to parent element. //Example: An Another Div $(function(){ $("#aDiv").on("click", "div", function(){ var a='This div override the another'; console.log(a); }); });
type: Answer
answers question: http://stackoverflow.com/q/26118000
score: 0

http://stackoverflow.com/a/26134683
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26134621
upvote count: 1
has body: because both button are setting different properties and and once it set there is no use to reset it, if you want revert first button setting on second button click than it will work. try: one suggestion pult javascript code in function and call it in onclick. function setOverflow(value){ document.getElementById("input0").style.overflow=value; document.getElementById("kpi1").style.overflow=value; document.getElementById("m_kpi1").style.overflow=value; document.getElementById("g_kpi1").style.overflow=value; } and html: scroll visible
type: Answer

http://stackoverflow.com/q/26072138
has answer: http://stackoverflow.com/a/26072157
accepted answer: http://stackoverflow.com/a/26072157
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26072533
tagged with: list
has body: I am trying to create a list which changes it's first element on click of up/down. This is what i want to do. This code is working excellent. but problem is i'm using list in main menu of my site also, and this code adds the same list item in my main menu also (on first/last position). i changed the script something like this to make change in only specified list not in all lists i have used in my page, but no effect. &lt;script&gt; $(document).ready(function () { $('#scrollup, #scrolldown').click(function(e) { e.preventDefault(); var id = e.target.id; if(id == 'scrollup'){ $('div #news ul li:first').appendTo('ul'); }else{ $('div #news ul li:last').prependTo('ul'); } }); }); &lt;/script&gt; Please help to correct it.
type: Question
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/26072533
has title: jQuery .appendTo() on a working on all not on the specified
answer count: 2

http://stackoverflow.com/q/26073172
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/26073201
favorite count: 0
has body: I've written a plugin to create long click event handler for my web application. I know it is not too advanced and that it has low functionality, but I am trying to improve it. You can see my plugin below: $(function($) { var holdTimer; var timerRunning = false; $.fn.longClick = function(handler, time) { if (time == undefined) time = 500; return this.on({ mouseup: function() { clearTimeout(holdTimer); timerRunning = false; }, mousedown: function() { var self = this; timerRunning = true; holdTimer = window.setTimeout(function() { handler.call(self) }, time); } }) }; $.fn.longClick.defaultTime = 500; }(jQuery)); What is my problem? I am in the situation of putting Ajax-generated content on my page, and you can easily know that .longClick() won't work anymore for those elements. I have the following snippet: $.ajax({ url: "/ajax/", type: "POST", data: { action: "load-posts", }, dataType: "html", success: function(data) { $(".profile-wrapper").append(data); } }); The data looks like this: Comments Then I need to use the .longClick event for .comments. I found this, on Stack Overflow, and I know which my situation is, but I don't know how to modify my plugin to work like $(selector).on(event,childSelector,data,function). How would you modify this plugin to work on dynamic content? Thank you for your patience and help. EDIT FOR @AminJafari The long-click event now fires, but inside the function, the .post seems to be undefined: $(".profile-wrapper .tabs-wrapper .tab .post").longClick(function () { var $post = $(this); var menuTop = $post.offset().top + "px"; // ... } Output from the console: Uncaught TypeError: Cannot read property 'top' of undefined
tagged with: ajax
tagged with: dynamic-content
has answer: http://stackoverflow.com/a/26073201
type: AnsweredQuestion
score: 1
has title: Long-click jQuery plugin for dynamic content
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40792883
comment on: http://stackoverflow.com/q/26041194
type: QuestionComment
type: Comment
has text: Is '#myelement' actually resizing?
score: 2

http://stackoverflow.com/comment/40934942
type: Comment
has text: no the fiddle (blue one has only stripes) does as well show the wrong striping when you do some testing there. same as my fiddle
comment on: http://stackoverflow.com/a/26117190
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40881051
score: 0
comment on: http://stackoverflow.com/q/26080411
has text: GameAlchemist: it's the same canvas.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40840434
has text: Fix the tags and title. JavaScript is *not* related to Java.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26066797

http://stackoverflow.com/comment/40814425
type: AnswerComment
comment on: http://stackoverflow.com/a/26052243
type: Comment
has text: `$("tr").wrapAll(" ")` is a bad idea. It'll traverse the entire DOM and unnecessarily wrap every single ` ` occurrence into a ` ` element! http://jsfiddle.net/tLgmnrmy/2/ Try using a selector maybe?...
score: 0

http://stackoverflow.com/comment/40932868
score: 0
has text: You're including the css file, with php, in the document, but giving a link to an external file..?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26118050

http://stackoverflow.com/a/26172892
type: Answer
answers question: http://stackoverflow.com/q/26172283
has body: You'll need to add a parser to replace the names with their value (demo): // see big list here: http://www.unc.edu/~rowlett/units/large.html var numbers = { 'zero' : 0, 'hundred' : 100, 'thousand' : 1e3, 'million' : 1e6, 'billion' : 1e9, 'trillion' : 1e12, 'quadrillion' : 1e15, 'quintillion' : 1e18, 'sextillion' : 1e21, 'septillion' : 1e24, 'octillion' : 1e27, 'nonillion' : 1e30, 'decillion' : 1e33 }; $.tablesorter.addParser({ id: "namedNumbers", is: function () { return false; }, format: function (s, table) { var v, result = 1, arry = (s || '').split(/[\-\s]+/), len = arry.length; while (len) { v = $.tablesorter.formatFloat( (arry[--len] || '').toLowerCase(), table ); if ( numbers.hasOwnProperty(v) ) { result *= numbers[v]; } else { result *= parseFloat(v); } } return result !== 1 ? result : s; }, type: "numeric" }); $(function () { $('table').tablesorter({ theme: 'blue', headers : { 1 : { sorter : 'namedNumbers' } } }); });
score: 0

http://stackoverflow.com/a/26082484
type: Answer
has comment: http://stackoverflow.com/comment/40886267
has comment: http://stackoverflow.com/comment/40886248
has body: This works fine, what seems to be the problem? var n=[1164.44,-2919.42,2500.59,-5197.15,4451.54]; s=n.reduce(function(x,y) { return parseFloat((x+y).toFixed(2)); }); console.log(s); JSFiddle here: http://jsfiddle.net/91g4qb0z/
has comment: http://stackoverflow.com/comment/40869193
score: 0
answers question: http://stackoverflow.com/q/26082373
has comment: http://stackoverflow.com/comment/40869026
has comment: http://stackoverflow.com/comment/40869114

http://stackoverflow.com/comment/40946581
type: QuestionComment
comment on: http://stackoverflow.com/q/26124912
score: 0
has text: @apsillers: yes. I'm seperating the implementation of parametrisation from the calling routines, as these could be UI or code-driven based on context. @Felix: That's it! Modifying my call to `obj['obj1']['search'].apply(obj['obj1'],['some text'])` is the solution I need.
type: Comment

http://stackoverflow.com/q/26169775
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41028931
tagged with: ajax
has title: Event Handler Waiting for AJAX Call From Other Event Handler
answer count: 1
has comment: http://stackoverflow.com/comment/41028909
has comment: http://stackoverflow.com/comment/41029142
has comment: http://stackoverflow.com/comment/41028960
has comment: http://stackoverflow.com/comment/41028963
has answer: http://stackoverflow.com/a/26169899
has comment: http://stackoverflow.com/comment/41028986
has comment: http://stackoverflow.com/comment/41028921
has comment: http://stackoverflow.com/comment/41029029
has comment: http://stackoverflow.com/comment/41028914
has body: I have a jQuery handler for the change event of several text boxes. $(vendorsPopUp).on('change', 'input', function (e) { // Call server to calculations new results $.post( ... ); // Then update client elements with new results } I have another handler for when my Save button is clicked. $('#VendorsPopUpSave', vendorsPopUp).on('click', function (e) { // Call server to save new results $.post( ... ); }); I have a problem if the user edits a text box and then clicks the Save button: First my handler for the change event is called, and then my handler for the Save button is called. (Note: The change event is not called until the text box loses focus, and this does not occur in this scenario until after the Save button is clicked.) The problem is that, when the handler for the Save button is called, the AJAX call from the first handler has not yet finished. Ideally, the Save button handler would wait until the AJAX call from the first handler has finished, and then proceed. Is there an accepted practice for handling this type of scenario?
has comment: http://stackoverflow.com/comment/41028935
has comment: http://stackoverflow.com/comment/41029053
has comment: http://stackoverflow.com/comment/41028994
has comment: http://stackoverflow.com/comment/41029158
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/41029116
accepted answer: http://stackoverflow.com/a/26169899
has comment: http://stackoverflow.com/comment/41029020
type: Question
has comment: http://stackoverflow.com/comment/41029197

http://stackoverflow.com/comment/40957136
type: QuestionComment
comment on: http://stackoverflow.com/q/26130691
type: Comment
has text: This is why I felt it was necessary to describe the usage of the panes. I thought maybe it would be an issue with those seeing as everything does work perfectly like you pointed out. Along with the fact that my local implementation works properly also upon resizing the window. I was thinking something with a javascript/style conflict between the maps and the wizard that someone may have experience dealing with.
score: 0

http://stackoverflow.com/comment/41001859
type: Comment
type: AnswerComment
has text: There are many poweful examples on D3's example page, but I didn't found anything that is similar to my task. There are many beautiful things with diagrams, charts and graphics, but I just need to connect rectangles (with text inside) with arrows. Is there any example of how it can be implemented with D3.js? *you could use a table or divs for that* But how can I connect them with arrows?
comment on: http://stackoverflow.com/a/26150492
score: 0

http://stackoverflow.com/comment/40850339
type: Comment
has text: +1 for suggesting `:nth-of-type`. In a *valid* markup the effect of `:nth-child` and `:nth-of-type` would be the same in this particular instance. However `:nth-of-type` will work even if the list element or the table contains other types of elements - in addition of list items or table rows - mistakenly.
score: 1
comment on: http://stackoverflow.com/a/26071422
type: AnswerComment

http://stackoverflow.com/a/26167197
score: 1
answers question: http://stackoverflow.com/q/26164690
has comment: http://stackoverflow.com/comment/41028294
upvote count: 1
type: AcceptedAnswer
has body: http://jsfiddle.net/y5r1kq0e/3/ var item = $('tbody')[0].children; var get = function (item) { var t = []; $.each(item, function (i) { var a = []; $.each(item[i].children, function (child) { a.push(this.innerText.trim()) }) t.push(a.join(' ').trim()); }) return t; } console.log(get(item)) gets you an array like this: 0: "Click1 Click2" 1: "Name Type Views Visitors Clicks Clickrate ▲ Interval Conf Lift Clicks Clickrate ▲ Interval Conf Lift" 2: "TOTAL 632 516 8 1.55% ±0.89% - - 3 0.5814% ±0.55% - -" 3: "" 4: "Versions" 5: "V1 Challengers 301 250 2 0.8% ±0.93% - - 1 0.4% ±0.66% - -" 6: "V2 Challengers 331 266 6 2.26% ±1.5% 91% 181.95% 2 0.7519% ±0.87% 70% 87.97%" 7: ""
type: Answer
accepted answer of: http://stackoverflow.com/q/26164690
downvote count: 0

http://stackoverflow.com/comment/40859013
type: Comment
has text: I get a solution 'document.selection.createRange().parentElement()'. Thanks everyone.
score: 0
comment on: http://stackoverflow.com/q/26077146
type: QuestionComment

http://stackoverflow.com/a/26044575
has comment: http://stackoverflow.com/comment/40801140
has comment: http://stackoverflow.com/comment/40801103
has comment: http://stackoverflow.com/comment/40801286
upvote count: 1
type: AcceptedAnswer
has body: Use jQuery libary (in JS Language) .mouseOver() method Here is an example for your issue: onHover this will open a little window Hello and the script: $( "#hover" ).mouseover(function() { $( "#hidden" ).css( "display", "block" ); }); $( "#hover" ).mouseout(function() { $( "#hidden" ).css( "display", "none" ); }); You can use onmouseout to keep visibility hidden when mouse leaving the link. You might also read about the method .css() http://jsfiddle.net/m7nqoqpr/1/
type: Answer
has comment: http://stackoverflow.com/comment/40801030
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26044342
answers question: http://stackoverflow.com/q/26044342
has comment: http://stackoverflow.com/comment/40801080
has comment: http://stackoverflow.com/comment/40800615

http://stackoverflow.com/comment/40840589
type: AnswerComment
comment on: http://stackoverflow.com/a/26066633
type: Comment
score: 1
has text: This is the way I would personally do it too, Birgit. But I thought that it would deviate too much from what Richard already got implemented. Nice one, anyway. :)

http://stackoverflow.com/comment/40992276
type: QuestionComment
has text: The problem is not with the posted code.. when you look at `all.js` on his page you see the click handler assigned twice to the same id button.
comment on: http://stackoverflow.com/q/26149885
score: 0
type: Comment

http://stackoverflow.com/q/26186526
has comment: http://stackoverflow.com/comment/41060717
has title: 403 Forbidden for Jquery.min.js when developing on localhost
has comment: http://stackoverflow.com/comment/41060637
downvote count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/41060377
has answer: http://stackoverflow.com/a/31872559
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/32313937
has body: I've looked all over google and the site and none of the solutions I've tried have worked... maybe my problem requires something a little more specific. When I have this site hosted on a test site, it works fine, but I'm getting this error when I use "Inspect Element" on Chrome: Failed to load resource: the server responded with a status of 403 (Forbidden). I can tell the jquery file isn't being accessed properly by my site because the jquery that works perfectly on my Go Daddy test site (a cool little tool called Tablesorter) isn't working anymore. The jquery.min.js file is in a directory called js. Here's the entirety of the head in my html file. Corporate Dude, Data Management The weird thing is that when I move the style.css file into the js directory and change the path to js/style.css, the css works just fine. Does this mean it's not a permissions issue or is it just a peculiarity of the way href works in the link tag? I've tried going to the terminal and typing cd /Users/myusername/mylocalhostfile/"Corporate Guy"/js then typing chmod 0755 to give permission to access the directory, but that didn't work either. Is this the proper way to assign permissions through the terminal? Thanks for any help you can give me.
answer count: 2
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41060548
favorite count: 0
has comment: http://stackoverflow.com/comment/41060268
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41061566
has comment: http://stackoverflow.com/comment/41060529
has comment: http://stackoverflow.com/comment/41060762
tagged with: css
has comment: http://stackoverflow.com/comment/41060359
tagged with: localhost

http://stackoverflow.com/a/26098892
has comment: http://stackoverflow.com/comment/40898673
score: 2
downvote count: 0
has body: Solution1 You can iterate through all elements of array with lesser elements up to answer and binary search in second array for (answer - array[index]), complexity of this algo is O(N log M). Live code in C++ Solution2 Or you can merge both arrays in linear time and apply following algorithm to find the pair in linear time. While merging, keep reverse mapping arrays mapA and mapB of size N+M in which mapA[i] points to index in array A from where ith array of merged array came and -1 otherwise. Do similar for mapB also. /* Merge the arrays */ mapA, mapB, MA all are arrays of size M+N, initialized with all -1 i = 0, j = 0 while(i &lt; M &amp;&amp; j &lt; N) if(A[i] &lt; B[j]) MA[i+j] = A[i]; mapA[i+j] = i++; else MA[i+j] = B[j]; mapB[i+j] = j++; while(i &lt; M) MA[i+j] = A[i]; mapA[i+j] = i++; while(j &lt; N) MA[i+j] = B[j]; mapB[i+j] = j++; /* Search the pair */ i = 0 j = N + M - 1 while(i &lt; j){ if(mapA[i] == -1) i++; else if(mapB[j] == -1) j--; else if (MA[i] + MA[j] == answer) return pair(mapA[i], mapB[j]); else if (MA[i] + MA[j] &lt; answer) i++; else if (MA[i] + MA[j] &gt; answer) j--; } return null_pair; // no answer found Live code example in C++ Solution3 There is a better algorithm (inspired from 3 sum algorithm) which works in linear time i.e. O(N + M) in constant space. i = 0 j = M - 1 while(i &lt; N &amp;&amp; j &gt;= 0){ if (A[i] + B[j] == answer) return pair(i, j); else if (A[i] + B[j] &lt; answer) i++; else if (A[i] + B[j] &gt; answer) j--; } return null_pair; // no answer found Proof Let's assume A[x] + B[y] = answer. Then either x will reach i first or j will reach y first or we will find some other pair such that A[i] + B[j] = answer. Without loss of generality let's assume x becomes i first. Now for all j &gt; y, A[i] + B[j] &gt; answer so j will eventually reach answer. If there is no answer, we will exit the loop.
has comment: http://stackoverflow.com/comment/40899617
has comment: http://stackoverflow.com/comment/40898645
upvote count: 2
has comment: http://stackoverflow.com/comment/40898956
has comment: http://stackoverflow.com/comment/40898936
has comment: http://stackoverflow.com/comment/40899243
answers question: http://stackoverflow.com/q/26098797
type: Answer
has comment: http://stackoverflow.com/comment/40898690
has comment: http://stackoverflow.com/comment/40898877
has comment: http://stackoverflow.com/comment/40900345
has comment: http://stackoverflow.com/comment/40898801

http://stackoverflow.com/q/26086633
has body: I'm literally starting today with titanium and had a doubt that I could not find the answer (must be why I am still a layman in this area). I wanted to make an application for testing on my Mac, which functions within the web view to work in titanium, for example: var webview = Titanium.UI.createWebView({url:'http://localhost/myfile.html'}); var window = Titanium.UI.createWindow(); window.add(webview); window.open({modal:true}); wish within the myfile.html he could access patterns titanium functions, for example as a warning or even access to the microphone.
has comment: http://stackoverflow.com/comment/40896803
type: Question
has title: How to communicate with the webview and titanium
accepted answer: http://stackoverflow.com/a/26102670
score: 0
tagged with: titanium
answer count: 1
tagged with: mobile
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26102670
tagged with: javascript

multi-device-hybrid-apps
tag name: multi-device-hybrid-apps
type: Tag
tags question: http://stackoverflow.com/q/26166525

http://stackoverflow.com/comment/41199987
comment on: http://stackoverflow.com/a/26241612
type: AnswerComment
type: Comment
has text: Sorry, it doesn't work with 3rd party keyboards. When typing in using swype (for example), the action is never triggered. It's not until we lose focus on the box that we the change is registered.
score: 0

http://stackoverflow.com/q/26160355
type: AnsweredQuestion
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41013597
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26160655
has comment: http://stackoverflow.com/comment/41011521
score: 0
has comment: http://stackoverflow.com/comment/41011434
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26162141
accepted answer: http://stackoverflow.com/a/26162141
has comment: http://stackoverflow.com/comment/41015099
has comment: http://stackoverflow.com/comment/41011383
tagged with: iframe
has title: Hide iframes during load
has answer: http://stackoverflow.com/a/26160655
has body: I would like to hide iframes during the load to prevent a white rectangle over the background color. My actual js $( '#my_frame' ) .css( 'visibility', 'hidden' ) .attr( 'src', '/my_new_page.html' ) .one( 'load', function () { $( this ).css( 'visibility', 'visible' ) }); The problem is when in the iframe I catch the onbeforeunload event and I prevent the switch of the page, because of the iframe never fire the load event so it remains hidden. How can I do that? PS: i tryed to catch the unload event before hide the page, but it never fires when changing the src. jsFiddle demo

http://stackoverflow.com/comment/40928925
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26115586
has text: anyway, Niklas already did it ;)

http://stackoverflow.com/comment/40860352
comment on: http://stackoverflow.com/a/26077582
score: 0
has text: as an additional question my humble sir, is there an ideal place i can insert this snippet to? or should i just replace what i already have? thanks for answering the root cause of my problem!
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26193170
has comment: http://stackoverflow.com/comment/41075900
has body: One way is to add a .disabled class to your link before the $.post(). // Before ajax... if ($(this).hasClass('disabled')) { return false; } else { $(this).addClass('disabled'); } // Make sure we refer to the same element var that = this; // On post success... $(that).removeClass('disabled');
type: Answer
score: 5
has comment: http://stackoverflow.com/comment/41074085
accepted answer of: http://stackoverflow.com/q/26193111
upvote count: 5
answers question: http://stackoverflow.com/q/26193111
has comment: http://stackoverflow.com/comment/41073833
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41039240
has text: The OP's linked jsfiddle wasn't his - it was an example of something he looked at - and it worked correctly without any updates.
score: 2
comment on: http://stackoverflow.com/a/26175382
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29299523
answers question: http://stackoverflow.com/q/26055943
has body: As T.J. Crowder mention, you can use JXcore for this. It is an open source project now. The simplest way to run an app multi-threaded would be: console.log("Hello thread", process.threadId); and you run it this way: $ jx mt:3 hello.js It runs 3 threads/instances inside of one process. There are also other ways with Jxcore, to use tasks in threads.
type: Answer
score: 0

http://stackoverflow.com/comment/40803379
score: 2
has text: You're missing the closing `}` on the className prop for each.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26046695

http://stackoverflow.com/comment/41861146
type: QuestionComment
type: Comment
has text: @MrPiao, Thanks for the idea. I think that I will stick on your suggestion as the last plan. I am trying to this by my app itself.
comment on: http://stackoverflow.com/q/26092938
score: 0

http://stackoverflow.com/q/26185817
has comment: http://stackoverflow.com/comment/41083341
type: Question
has answer: http://stackoverflow.com/a/26190385
has comment: http://stackoverflow.com/comment/41059927
has comment: http://stackoverflow.com/comment/41084174
answer count: 2
has answer: http://stackoverflow.com/a/26187194
has comment: http://stackoverflow.com/comment/41066973
has title: Add Different numbers for Content
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/41059021
has comment: http://stackoverflow.com/comment/41060022
type: UnansweredQuestion
has body: So I want to get information for about 6,000 profiles and they each have links to theirs with a specific number in order from 1-6000. I want to get a specific image from each of their profiles all in one page. Here is the code to get it for user 1's profile... Where it says u1 it needs to replace the 1 with each of the different numbers. &lt;span id="boutiqueimage"&gt;&lt;/span&gt; &lt;script&gt;$('#boutiqueimage').load('/u1 #field_id14 dd') &lt;/script&gt;

http://stackoverflow.com/q/26106053
has title: Passing html form's Multiple input value from one input field to a JavaScript event function
possible better answer: http://stackoverflow.com/a/26106121
type: Question
has answer: http://stackoverflow.com/a/26106121
tagged with: c#
accepted answer: http://stackoverflow.com/a/26106120
tagged with: asp.net-mvc
tagged with: forms
has body: I want to pass two input field value of html form and concatenate them by JavaScript. When I am sending one value and the concat function takes one parameter it is ok. But when sending two value and the concat function takes two parameter it is printing << title.value="Undefined" >> in concat function and is concatenate with user_name. I need to pass the title also from user_name field. Name: Email:;
has answer: http://stackoverflow.com/a/26106120
answer count: 2
tagged with: javascript
score: 4
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
type: AnsweredQuestion
downvote count: 0

universal-analytics
tag name: universal-analytics
type: Tag
tags question: http://stackoverflow.com/q/26064907

http://stackoverflow.com/q/26113680
tagged with: jquery
has title: How to remove textbox which created on run using jquery
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26113721
possible better answer: http://stackoverflow.com/a/26113719
has body: I create link button, if it clicked, it will add textboxes with a delete link automatically. The problem is after textboxes and a delete link is added, when a delete link is clicked, it cannot delete the textbox. How to solve this? View @using (Html.BeginForm()) { @foreach (var item in Model) { Html.RenderPartial("GiftEditorRow", item); } @Html.ActionLink("Add another...", "BlankEditorRow", null, new { id = "addItem" }) } @section Scripts { } Partial View for adding textboxes dynamically: @model MvcApplication1.Models.Gift @using MvcApplication1.Helpers @using (Html.BeginCollectionItem("gifts")) { Item: @Html.TextBoxFor(x => x.Name) Value: @Html.TextBoxFor(x => x.Price, new { size = 4 }) delete }
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26113719
accepted answer: http://stackoverflow.com/a/26113721
tagged with: asp.net-mvc
tagged with: javascript

http://stackoverflow.com/comment/41032332
comment on: http://stackoverflow.com/q/26171531
type: Comment
has text: http://jsfiddle.net/82y7zb97/2/
score: 0
type: QuestionComment

node.js
tags question: http://stackoverflow.com/q/26110772
tags question: http://stackoverflow.com/q/26078795
tags question: http://stackoverflow.com/q/26090517
tags question: http://stackoverflow.com/q/26174308
tags question: http://stackoverflow.com/q/26161319
tags question: http://stackoverflow.com/q/26114552
tags question: http://stackoverflow.com/q/26102576
tags question: http://stackoverflow.com/q/26147864
tags question: http://stackoverflow.com/q/26116016
tags question: http://stackoverflow.com/q/26059661
tags question: http://stackoverflow.com/q/26137978
tags question: http://stackoverflow.com/q/26118700
tags question: http://stackoverflow.com/q/26083969
tags question: http://stackoverflow.com/q/26074431
tags question: http://stackoverflow.com/q/26154758
tags question: http://stackoverflow.com/q/26109649
tags question: http://stackoverflow.com/q/26150596
tags question: http://stackoverflow.com/q/26169104
tags question: http://stackoverflow.com/q/26063746
tags question: http://stackoverflow.com/q/26131547
tags question: http://stackoverflow.com/q/26034679
tags question: http://stackoverflow.com/q/26037703
tags question: http://stackoverflow.com/q/26054690
tags question: http://stackoverflow.com/q/26089733
tags question: http://stackoverflow.com/q/26073670
tags question: http://stackoverflow.com/q/26075186
tags question: http://stackoverflow.com/q/26101669
tags question: http://stackoverflow.com/q/26061309
tags question: http://stackoverflow.com/q/26119584
tags question: http://stackoverflow.com/q/26158674
tags question: http://stackoverflow.com/q/26114530
tags question: http://stackoverflow.com/q/26079235
tags question: http://stackoverflow.com/q/26107027
tags question: http://stackoverflow.com/q/26103915
tags question: http://stackoverflow.com/q/26064740
tags question: http://stackoverflow.com/q/26069214
tags question: http://stackoverflow.com/q/26164705
tags question: http://stackoverflow.com/q/26132604
tags question: http://stackoverflow.com/q/26060855
tags question: http://stackoverflow.com/q/26193409
tags question: http://stackoverflow.com/q/26117878
tags question: http://stackoverflow.com/q/26193383
tags question: http://stackoverflow.com/q/26077865
tags question: http://stackoverflow.com/q/26167595
tags question: http://stackoverflow.com/q/26099247
tags question: http://stackoverflow.com/q/26102384
tags question: http://stackoverflow.com/q/26157729
tags question: http://stackoverflow.com/q/26114711
tags question: http://stackoverflow.com/q/26119789
tags question: http://stackoverflow.com/q/26107098
tags question: http://stackoverflow.com/q/26110575
tags question: http://stackoverflow.com/q/26123225
tags question: http://stackoverflow.com/q/26156687
tags question: http://stackoverflow.com/q/26154042
tags question: http://stackoverflow.com/q/26145778
tags question: http://stackoverflow.com/q/26133910
tags question: http://stackoverflow.com/q/26192241
tags question: http://stackoverflow.com/q/26061335
tags question: http://stackoverflow.com/q/26111277
tags question: http://stackoverflow.com/q/26107825
tags question: http://stackoverflow.com/q/26185089
tags question: http://stackoverflow.com/q/26169960
tags question: http://stackoverflow.com/q/26077052
tags question: http://stackoverflow.com/q/26083492
tags question: http://stackoverflow.com/q/26144422
tags question: http://stackoverflow.com/q/26043595
tags question: http://stackoverflow.com/q/26140593
tags question: http://stackoverflow.com/q/26078309
tags question: http://stackoverflow.com/q/26101196
tags question: http://stackoverflow.com/q/26066671
tags question: http://stackoverflow.com/q/26050677
tags question: http://stackoverflow.com/q/26125424
tags question: http://stackoverflow.com/q/26037093
tags question: http://stackoverflow.com/q/26193446
tags question: http://stackoverflow.com/q/26110220
tags question: http://stackoverflow.com/q/26154132
tags question: http://stackoverflow.com/q/26159240
tags question: http://stackoverflow.com/q/26140953
tags question: http://stackoverflow.com/q/26112223
tags question: http://stackoverflow.com/q/26114707

http://stackoverflow.com/q/26042739
has body: I'm trying to use the media attribute in the source tag in some html5 video. Firefox loads each of the correct three sized videos on page load, but Chrome is loading the small video on all page widths. Scroll to the right in the code if you can't see the media attribute. The video tag uses js to choose the appropriate poster depending on page width. In case you're wondering what is going on there. I use CSS to make the video tag fluid, but I'm trying to spare the large download for non-desktop users (based on page width). I've seen a few things that the media attribute may not be supported and was wondering if that is why this fails in Chrome or if I'm doing it wrong. Or if I should try to just accomplish this using javascript and swap out the src attribute in the source tag. If the media attribute isn't supported, can someone link me up, or even send a LetMeGoogleThatForYou link if you want to humble me. THIS BROWSER DOES NOT HAVE NATIVE VIDEO SUPPORT Thanks
tagged with: responsive-design
type: Question
has answer: http://stackoverflow.com/a/26043658
accepted answer: http://stackoverflow.com/a/26043658
answer count: 1
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Responsive HTML5 Video Tag, multiple queries
tagged with: video
type: AnsweredQuestion

http://stackoverflow.com/comment/40915080
score: 0
has text: @BillinKansasCity best thing would be to create some example on codepen or JSFiddle. Without a working example it's hard to tell what's actually the issue there
comment on: http://stackoverflow.com/q/26105469
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40971642
type: QuestionComment
type: Comment
has text: Make it a function...?
score: 1
comment on: http://stackoverflow.com/q/26139203

http://stackoverflow.com/a/26110148
answers question: http://stackoverflow.com/q/26110092
accepted answer of: http://stackoverflow.com/q/26110092
upvote count: 1
has body: You are applying the fadeIn and fadeOut to all the spans in the .more-projects-gallery-img-container, hence hover state is activated for ALL. Try this (based on the HTML you have provided): $(function galleryImageHover() { var $galleryImageContainer = $('.more-projects-gallery-img-container'); var $galleryImage = $('.more-projects-gallery-img-container a'); //var $galleryImageSpan = $('.more-projects-gallery-img-container span'); //You won't need this. $galleryImageContainer.each(function(){ $galleryImage.on("mouseover", function(){ $(this).next().fadeIn(300).show(); // changed the selector here to select the next span rather than all the spans }); }); $galleryImageContainer.each(function(){ $galleryImage.on("mouseout", function(){ $(this).next().fadeOut(300).hidden(); // changed the selector here to select the next span rather than all the spans }); }); });
type: Answer
downvote count: 0
score: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26153286
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26153319
has body: I'm using (function clicado()): document.getElementById('enviar').click(); html: I'm trying to pass data to PHP, but a problem is happening, the data simply does not pass. Have you tried using submit(); and also does not work. Whhen I click in , work fine, but when I do the JS "clicking for me" ... I hope the question is not superficial, basically my problem is to pass the data. Here is the URL: http://as4.com.br/gateway/index.php Here is the form: I really want to submit this form with JS.
has answer: http://stackoverflow.com/a/26153348
type: Question
score: 0
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/40998735
tagged with: submit-button
has title: Using submit with JS does not pass DATA
has comment: http://stackoverflow.com/comment/41014833

http://stackoverflow.com/a/26099809
answers question: http://stackoverflow.com/q/26099675
score: 2
has body: var CHKBBookingID = document.CancelForm.BookingID; Causes the problem. if you are naming it as var it is considered as the variable , as you pass a single element. so you need to initialize the javascript array as , var CHKBBookingID = Array(document.CancelForm.BookingID) will input them into the array Learn More. . Update: Using jquery you can easily get the number of checkboxes, var CHKBBookingID = new Array(); $.each($("input[name='BookingID[]']:checked"), function() { values.push($(this).val()); // or you can do something to the actual checked checkboxes by working directly with 'this' // something like $(this).hide() (only something useful, probably) :P });
accepted answer of: http://stackoverflow.com/q/26099675
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40901710
upvote count: 2
type: Answer

http://stackoverflow.com/comment/40929857
comment on: http://stackoverflow.com/a/26106061
has text: In my case it works. Safari in IOS8 cant work with symbols '=' and ':' in url when you use document.location
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/125164041
has text: interesting indeed and works!
comment on: http://stackoverflow.com/a/31299484
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41014819
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26161388
has text: And there is old-fashioned solution with replacing ` ` with ` `. Take a look at [fiddle](http://jsfiddle.net/jqnwd9ek/).
type: Comment

http://stackoverflow.com/comment/40935245
type: Comment
comment on: http://stackoverflow.com/q/26119389
score: 0
type: QuestionComment
has text: yes there is no id of flash object but there is a function called ClickFunction which perform the action of flash object

http://stackoverflow.com/comment/40917603
type: Comment
type: QuestionComment
has text: I imagine you are misunderstanding how to write async code - the post function returns immediately, before getting a response, so your variable will be undefined at that point. This is what callbacks are for. You **could** use the more verbose `$.ajax` function, which has a parameter than you can set to make a synchronous request, but sync ajax is rarely a good idea.
score: 1
comment on: http://stackoverflow.com/q/26109152

http://stackoverflow.com/a/26180709
answers question: http://stackoverflow.com/q/26180640
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: I think you only need to replace the lblValue.innerText to lblValue.value

http://stackoverflow.com/a/26177852
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26177727
has comment: http://stackoverflow.com/comment/41043542
accepted answer of: http://stackoverflow.com/q/26177727
has body: Variables are always passed by value in Javascript. It doesn't even support passing parameter by reference. The problem is that you are using a global variable: width2 = width * 0.5; When you make the first recursive call it will change the value of the global variable, so the second recursive call will use the value from the last iteration instead. Declare the variable in the function so that it is local: var width2 = width * 0.5;
type: AcceptedAnswer
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/41043527

http://stackoverflow.com/q/26083881
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26083926
answer count: 2
has comment: http://stackoverflow.com/comment/40871385
tagged with: jasmine
favorite count: 0
has body: Html code: aaa Js code: var node = $("#xxx"); var found = node.find("div:visible"); console.log(found.length); If these code are run on browser, it will output 1. (live demo: http://jsbin.com/xuqule/2/edit) But when I run it on jasmine test with phantomjs: it("should find the visible nodes", function () { var node = $(" aaa "); var found = node.find("div:visible"); console.log(found); expect(found.length).toEqual(1); }); The test is failed, and the found.length is 0. Why and how to fix it?
has answer: http://stackoverflow.com/a/26083927
type: AnsweredQuestion
tagged with: visible
possible better answer: http://stackoverflow.com/a/26083927
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26083926
has comment: http://stackoverflow.com/comment/40871307
downvote count: 0
has title: Why $("div:visible") can find nothing in jasmine test with phantomjs?
tagged with: javascript

http://stackoverflow.com/comment/41006123
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26157509
has text: @George - I have edited my question. Please see the Fiddle
type: Comment

http://stackoverflow.com/comment/40986825
comment on: http://stackoverflow.com/q/26146821
score: 0
type: Comment
type: QuestionComment
has text: selectPost is called, but getPost() return undefined, so this code is right?

http://stackoverflow.com/a/26083549
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26083116
has comment: http://stackoverflow.com/comment/40871433
answers question: http://stackoverflow.com/q/26083116
has comment: http://stackoverflow.com/comment/40871350
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/40870993
has comment: http://stackoverflow.com/comment/40871285
has body: Although your code has many errors and misunderstandings on how js works here is some simple code that solves this issue //fake an image directory var count = 3; var dir = 'http://lorempixel.com/300/300/abstract/' //setup a table var f = document.createElement("table"); var row = f.insertRow(); for (var j = 0; j &lt; count; j++) { var cell = row.insertCell(j); imagepath = dir + j; cell.innerHTML = '&lt;img src="' + imagepath + '" width="100" onclick="showmain(' + j + ')"&gt;'; } document.body.appendChild(f); //change imagesrc in main tag function showmain(image) { document.getElementById('main').src = dir + image; } This is the most basic (noob) thing you do with javascript. I strongly suggest you read some more tutorials before coming back with such basic questions. Here is a Plunker. No onload handler, so the script is at the end of the page.

http://stackoverflow.com/q/26089578
score: 1
has answer: http://stackoverflow.com/a/26089930
type: Question
has comment: http://stackoverflow.com/comment/40882630
upvote count: 1
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/14994391
favorite count: 0
has title: How to properly open and close Bootstrap modal from AngularJS
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40882592
has body: On my html page, I got just a simple Bootstrap modal and button to call it: &lt;button class="btn btn-primary" data-toggle="modal" data-target="#addUpdateGroup"&gt;Add group&lt;/button&gt; &lt;div class="modal fade" id="addUpdateGroup" tabindex="-1" role="dialog" aria-labelledby="addUpdateGrouplLabel" 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;/div&gt; &lt;form name="addUpdateGroupForm" ng-submit="addUpdateGroupForm.$valid &amp;&amp; groupCtrl.addUpdateGroup()" novalidate&gt; &lt;div class="modal-body"&gt; &lt;input type="hidden" ng-model="groupCtrl.group.id" name="groupid" /&gt; &lt;label for="groupname"&gt;Group name:&lt;/label&gt; &lt;br&gt; &lt;input ng-model="groupCtrl.group.name" type="text" name="groupname" id="groupname" required /&gt; &lt;br&gt;&lt;br&gt; &lt;label for="groupcolor"&gt;Boja grupe:&lt;/label&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="submit" class="btn btn-primary"&gt;Add&lt;/button&gt; &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Cancel&lt;/button&gt; &lt;/div&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; It's a just simple form. The validation is done by AngularJS. Now...when user submits the form, I'd like for the modal to close, but ONLY if it was valid input. So I've put the code for closing the modal into the controller: this.addUpdateGroup = function() { // Adding a new group if (typeof this.group.id === 'undefined') { this.id += 1; this.group.id = this.id; this.groups.push(this.group); // Updating an existing group } else { this.groups[this.group.id].name = this.group.name; this.groups[this.group.id].color = this.group.color; } // Clean the form and remove the modal this.group = {}; $scope.addUpdateGroupForm.$setP…
tagged with: angularjs
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/40882362
accepted answer: http://stackoverflow.com/a/26089930
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/40867801
type: AnswerComment
type: Comment
has text: i have currently added <tr value='<?php echo $sale['id']; ?>'> so one can get id as value of tr
comment on: http://stackoverflow.com/a/26081642
score: 0

http://stackoverflow.com/a/26145355
answers question: http://stackoverflow.com/q/26123468
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41046349
has body: Please follow this ticket: https://github.com/cytoscape/cytoscape.js/issues/678 From the ticket: This is probably due to the performance enhancements on style for 2.3. Now, instead of style being applied cumulatively, a highly performant diff of matching selector contexts is done. And only the properties that need to be applied as a result of the diff are applied. I suspect that because the matching contexts are the same etc, the style is not updated.
upvote count: 3
type: Answer
score: 3
accepted answer of: http://stackoverflow.com/q/26123468

http://stackoverflow.com/comment/41064278
score: 0
comment on: http://stackoverflow.com/a/26188464
has text: I know this is jquery, that's in the title. But it is used along with angularjs. And since the code doesn't work while it should, i'm only making an assumption that it's related to angularjs with jquery.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26049008
has comment: http://stackoverflow.com/comment/40807501
has comment: http://stackoverflow.com/comment/40882651
answers question: http://stackoverflow.com/q/26048910
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/40883867
upvote count: 1
downvote count: 1
has body: Why this is not working and throwing following error? The internal call looks something similar to Function.prototype.call.call.apply(undefined, function() {}, 0, []) ^--- it's `undefined` here because you haven't specified anything explicitly as a 2nd `forEach` arg And internally call expects that its this will point to the correct function (Function.prototype.call in this case), whereas "you" are passing undefined So technically this code works as expected: [ function(){console.log(1)}, function(){console.log(2)} ] .forEach(Function.prototype.call.call, Function.prototype.call) But the elclanrs' solution with bind is better

http://stackoverflow.com/q/26171985
type: Question
accepted answer: http://stackoverflow.com/a/26172025
tagged with: javascript
linked to: http://stackoverflow.com/q/56649087
answer count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/41033160
favorite count: 0
possible better answer: http://stackoverflow.com/a/26172164
has answer: http://stackoverflow.com/a/26172164
has answer: http://stackoverflow.com/a/26172025
has body: How can I convert the string... "{ name: 'John' }" ...to an actual JavaScript object literal that will allow me to access the data using its keys (I.e. varname["name"] == "John")? I can't use JSON.parse(), since the string is invalid JSON.
has answer: http://stackoverflow.com/a/26172018
type: AnsweredQuestion
has title: How can I convert the string of a JavaScript object literal to a JavaScript object literal?
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
has comment: http://stackoverflow.com/comment/110790260

http://stackoverflow.com/a/26206676
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41107447
type: Answer
has body: You most definitely can run your script as a Cron job on heroku. Step 1 - Create the app using the buildpack mentioned : heroku apps:create myapp --stack cedar --buildpack http://github.com/misza222/heroku-buildpack-casperjs.git Step 2 - Add scheduler and log addons : heroku addons:add logentries heroku addons:add scheduler Step 3 - open the scheduler : heroku addons:open scheduler or use the dashboard, click My Apps > General Info > Addons > Scheduler Step 4 - Setup your cronjob : ./vendor/casperjs/bin/casperjs myCasperScript.js and choose the frequency you want your script to run at. Hope it helps!
upvote count: 4
has comment: http://stackoverflow.com/comment/41119628
downvote count: 0
has comment: http://stackoverflow.com/comment/41108976
has comment: http://stackoverflow.com/comment/41125538
accepted answer of: http://stackoverflow.com/q/26079524
score: 4
answers question: http://stackoverflow.com/q/26079524
has comment: http://stackoverflow.com/comment/41115139

http://stackoverflow.com/q/26118814
tagged with: javascript
favorite count: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/19411586
tagged with: slider
tagged with: animation
answer count: 0
type: UnansweredQuestion
has body: I am trying to build animation slider and I found similar question here But that answer does not work in IE 8. function slideShowController($scope, $timeout) { var slidesInSlideshow = 4; var slidesTimeIntervalInMs = 3000; $scope.slideshow = 1; var slideTimer = $timeout(function interval() { $scope.slideshow = ($scope.slideshow % slidesInSlideshow) + 1; slideTimer = $timeout(interval, slidesTimeIntervalInMs); }, slidesTimeIntervalInMs); } <htm ng-app> this is header Slider's are amazing1! Slider's are amazing2! Slider's are amazing3! Slider's are amazing4! this is body body{ background-image:url('../asset/background.png'); background-repeat: repeat; margin: 0%; font-family: 'Advent Pro', sans-serif; } .slideshow { font-family: "Arial", sans-serif; text-align: center; position:relative; width:600px; overflow:hidden; background: #1a1a1a; margin: 0 auto; color: white; text-shadow: 1px 1px 1px #000; border-radius: .3em; margin-top: 30px; } #header { background-color: #FFFFFF; width:100%; height:100px; border-bottom: 4px solid #EE514B; } #withinheader { width:60%; margin: 0 auto; height: 100px; } .imageslide{ width:600px; height:400px; margin: 0 auto; margin-bottom: 20px; overflow:hidden; position:relative; text-align: center; } .imageslide .slider-content { position: absolute; width:100%; height:400px; } .animate-enter,.animate-leave { -webkit-transition:1000ms cubic-bezier(.165,.84,.44,1) all; -moz-transition:1000ms cubic-bezier(.165,.84,.44,1) all; -ms-transition:1000ms cubic-bezier(.165,.84,.44,1) all; -o-transition:1000ms cubic-bezier(.165,.84,.44,1) all; transition:1000ms cubic-bezier(.165,.84,.44,1) all; } .animate-enter { left:100%; } .animate-enter.animate-enter-active { left:0; } .animate-leave { left:0; } .animate-leave.animate-leave-active { margin-left:-100%; } #mainbody { background-color: #FFFFFF; width:50%; min-height:1024px; height: auto; border-radius: 5px; border: 1px solid #EEEEEE; margin: 0 auto; } My application is using angular js version 1.2.14. Ho…
upvote count: 1
score: 1
has title: Angular JS Animation Slider
type: Question
downvote count: 0

typescript
tags question: http://stackoverflow.com/q/26057940
tags question: http://stackoverflow.com/q/26183927
tags question: http://stackoverflow.com/q/26043433
tags question: http://stackoverflow.com/q/26138414
tags question: http://stackoverflow.com/q/26102384
tags question: http://stackoverflow.com/q/26043089
tag name: typescript
tags question: http://stackoverflow.com/q/26071829
tags question: http://stackoverflow.com/q/26137863
tags question: http://stackoverflow.com/q/26160028
tags question: http://stackoverflow.com/q/26057129
tags question: http://stackoverflow.com/q/26121307
tags question: http://stackoverflow.com/q/26085182
tags question: http://stackoverflow.com/q/26109895
type: Tag
tags question: http://stackoverflow.com/q/26114887

http://stackoverflow.com/a/26116011
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26115971
has body: Array.prototype.map is a great tool for this kind of things: arr.map(function(el) { return 'images/' + el; }) In ES2015+: arr.map(el =&gt; 'images/' + el)
type: Answer
accepted answer of: http://stackoverflow.com/q/26115971
score: 53
upvote count: 53

http://stackoverflow.com/comment/126278526
comment on: http://stackoverflow.com/q/26150232
has text: This pattern will cause a lot of unexpected issues when things start to get complex. Probably a good alternative is to use events in these cases.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40816668
score: 1
type: QuestionComment
has text: what do you mean by group.. you want to store those values in separate arrays? like 1-4 in one array.. then 5-8 in second and so on?
comment on: http://stackoverflow.com/q/26054209
type: Comment

http://stackoverflow.com/comment/40867670
type: QuestionComment
has text: First of all, there is no `jsp` in client (*browser*). You have the resulting `HTML` page as well as the array on client. If you want to display the data in the `HTML` page, use jquery to manipulate the page as you wish - stuff like `$(".nameIAarray").text(array[0].name)`. Or let me repeat the question, do you want to send the data to server..?!
score: 1
comment on: http://stackoverflow.com/q/26081457
type: Comment

http://stackoverflow.com/a/26182665
has body: You cannot. Browsers will not send cookies set by a website to a different website, nor will they send the contents of the browser's password vault. If they did, then every website you visited would be able to steal your login token / credentials for every other website you visited.
type: Answer
has comment: http://stackoverflow.com/comment/41053252
has comment: http://stackoverflow.com/comment/41053327
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41052829
has comment: http://stackoverflow.com/comment/41052958
has comment: http://stackoverflow.com/comment/41053023
answers question: http://stackoverflow.com/q/26182640
upvote count: 1
has comment: http://stackoverflow.com/comment/41053566

http://stackoverflow.com/comment/57364201
has text: The provided example doesn't make any sense. If the user sees the URL "malicious.com" in his browser and he proceeds to enter his login information security restrictions on iframes won't protect him.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26055216
type: Comment

http://stackoverflow.com/a/26291167
answers question: http://stackoverflow.com/q/26173655
score: 0
type: Answer
has body: A simple solution using JavaScript would be to do this.. $(element).bind("mouseover", function () { if ($(element)[0]) { $(element)[0].title = $(element)[0].options[$(element)[0].selectedIndex].text; } });

http://stackoverflow.com/a/26114169
type: Answer
accepted answer of: http://stackoverflow.com/q/26112935
score: 1
answers question: http://stackoverflow.com/q/26112935
upvote count: 1
has comment: http://stackoverflow.com/comment/40926451
has comment: http://stackoverflow.com/comment/40928672
has body: Main problem is DOM refreshes page, because probably regular submit is made. Without submit method can't tell anything more specifically. If you do ajax, you get all data in json data holder. Then you parse it into object and html required parts to where you want to show results. All filtering and etc. has to happen in model. Controller only passes values over to it. Make filter button as ajaxButton: &lt;?php echo CHtml::ajaxSubmitButton( 'Filter', Yii::app()-&gt;createUrl('report/index'), array( 'type'=&gt;'POST', 'data'=&gt; 'js:{"SCDcustomer_contacts_cms[brand_select_option]": $('#select_options').val(), "SCDcustomer_contacts_cms[brand_id]": $('#select_brand').val() }', 'success'=&gt;'js:function(data){ var data = JSON.parse(data); $('#search-result-holder').html(data.search-results); }' )); ?&gt; UPDATE: 2014 - 09 - 30 Some extra data for processing. You should make some extra view with html of the way you would want your results to look like. Pass attribute values to that view via renderPartial (this has to happen within controller). For example: //Controller part which passes posted data to model &lt;?php public function actionIndex() { .... if(Yii::app()-&gt;request-&gt;isAjaxRequest){ $attributes = Yii::app()-&gt;request-&gt;getParam('SCDcustomer_contacts_cms'); $model-&gt;attributes = $attributes; } ... //Part of the controller which returns resulting model after specific functions $model = $model-&gt;getDataByFilterQuery(); $search_results = $this-&gt;renderPartial('report/extra-views/search-results', array('model'=&gt;$model), true); echo CJSON::encode(array('search-results'=&gt;$search_results)); ... } ?&gt; //In model public function brandPreference() { $criteria = new CDbCriteria; $criteria-&gt;select .= ', COUNT(*) as brand_preference'; $criteria-&gt;join .= ' INNER JOIN order_table ot ON ot.billing_contactid = t.contactid'; $criteria-&gt;join .= ' INNER JOIN order_item oi ON ot.scd_order_id = oi.scd_order_id'; $criteria-&gt;join .= ' INNER JOIN johna…
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40928178

http://stackoverflow.com/comment/40926046
type: QuestionComment
type: Comment
score: 1
has text: What I mean is does the markup you use to attach the view to already exist when you instantiate the view? Since you're specifying a selector for your el, then the view is expecting the markup to already be there.
comment on: http://stackoverflow.com/q/26097685

http://stackoverflow.com/a/26056898
has comment: http://stackoverflow.com/comment/40935593
score: 0
answers question: http://stackoverflow.com/q/26056079
has comment: http://stackoverflow.com/comment/40827380
type: Answer
has body: $(function() { $( "#slider-range-max" ).slider({ range: "max", min: 1, max: 10, value: 2, slide: function( event, ui ) { $( "#amount" ).val( ui.value ); $( "#amt_id" ).val( ui.value ); } }); $( "#amount" ).val( $( "#slider-range-max" ).slider( "value" ) ); }); jQuery UI Slider - Range with fixed maximum Choose an Amount Here you go: JSfiddle I am not sure I understand your code, but I have used simple jquery slider to dynamically pass item amount to PayPal. P.S I used Jquery which I think should be easy to do the slider.
has comment: http://stackoverflow.com/comment/40827353
has comment: http://stackoverflow.com/comment/40825029
has comment: http://stackoverflow.com/comment/40870099
has comment: http://stackoverflow.com/comment/40924576
has comment: http://stackoverflow.com/comment/40824953

http://stackoverflow.com/comment/40827052
type: Comment
type: QuestionComment
has text: actually i want to save the inner html of the form and want to save this in my database, and then render that inner html in another part, normally user came design his form save form(we do inner html saving to database), then user open a form again(that is designed by him). enter the values and save them in database again
score: 0
comment on: http://stackoverflow.com/q/26059834

http://stackoverflow.com/a/26043197
answers question: http://stackoverflow.com/q/26038191
type: Answer
has comment: http://stackoverflow.com/comment/40911210
upvote count: 3
score: 3
has body: There are multiple possible ways. First of all, you may consider adding a rate-limit to IP addresses. This is NOT 100% effective, but will certainly slow down some spam attempts. For example, you can limit the number of accounts created by the same IP address to 5 every 5 minutes. Secondly, if you want to use some sort of captcha, consider reCAPTCHA. Among the different captcha services, this is particularly effective against bots, as they especially use words that fail OCR recognition. Eventually, to make sure that people actually visit your signup page before calling the API, you can use a "security token". This is the same technique that is used for example to protect against CSRF (Cross-Site Request Forgery) attacks. When the server generates the signup page, it also passes to the client an hidden field (for example "token") that contains a uniquely-generated value. The client will submit this value along with the form back to the API server when it requests the creation of a user, and the server uses the token to validate the request. There are basically two approaches to generate these tokens. First method The signup page creates a random string/number and stores it in the database to be used as token. When the user submits the form, the server searches for that token into the database: if it's present, then the submission is valid; otherwise it fails. The token is then removed from the database. Additional security can be obtained by storing into the database, along with the token, an expiration date and the client's user-agent (unlike IP's, user-agents are unlikely to change during the same session). Pros: each token can be used only once. Cons: the app needs a database, and it will be queried 3 times just for the token insertion, validation and deletion (requiring time and adding load to the database). You also should to purge regularly expired tokens from the database. Second method The signup page creates a token by digitally signing a plain-text string c…
has comment: http://stackoverflow.com/comment/40876890
has comment: http://stackoverflow.com/comment/40881208
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26038191
has comment: http://stackoverflow.com/comment/40881308

http://stackoverflow.com/q/26070173
has comment: http://stackoverflow.com/comment/40879170
has comment: http://stackoverflow.com/comment/40876405
tagged with: wordpress
has comment: http://stackoverflow.com/comment/40874683
type: Question
has answer: http://stackoverflow.com/a/26070296
tagged with: javascript
tagged with: jquery
has title: Set a group of input fields to be disabled if a checkbox is checked
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I'm trying to write a wordpress widget but the options form is giving me some grief. The widget is designed to show an two images and a counter beneath each where the counter relies on the date. That logic is sorted. However in a case where there is to be no counter on an image, i'm trying to put a checkbox which when checked will disable the input fields dealing with the image and counter so i can jsut read a boolean and output a simpler image with no counter. The problem I'm having is that the JQuery that's attached to the checkbox is disabling the inputs, but i can't click it again to enable them as it just locks in its state of limbo as the checkbox gains a blue 'glow' and doesn't look checked. I don't get why the code isn't working as i expect. It's worth noting that this is my first time using JQuery, and the solution doesn't need to be JQuery if standard javascript can do the same. I have 2 sections which will be identical in functionality, one for each image-counter pair. this is the code for one of those sections: Anime 1 <input class="check1" type="checkbox" <?php checked($instance['s1rand'], 'on'); ?> id="rand1" name="<?php echo $this->get_field_name('s1rand'); ?>" /> <label for="<?php echo $this->get_field_id('s1rand'); ?>">Label of your checkbox variable <label for="<?php echo $this->get_field_id('s1title'); ?>"><?php _e('Anime 1 Name:', 'wp_widget_plugin'); ?> <input class="widefat" id="<?php echo $this->get_field_id('s1title'); ?>" name="<?php echo $this->get_field_name('s1title'); ?>" type="text" value="<?php echo $s1title; ?>" /> <label for="<?php echo $this->get_field_id('s1date'); ?>"><?php _e('Anime 1 Start Date:', 'wp_widget_plugin'); ?> <input class="widefat" id="<?php echo $this->get_field_id('s1date'); ?>" name="<?php echo $this->get_field_name('s1date'); ?>" type="date" value="<?php echo $s1date; ?>" /> The JQuery jQuery(function($){ $(document).on('click', '#rand1', function(evt){ checked = $('#rand1').val(); $('div.ani1 :input').attr('disa…
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40956917
tagged with: checkbox

http://stackoverflow.com/a/26145833
has body: have you tried passing in a second argument as an object instead of url params? jQuery("#lcload").load(""+ruta+"/mod_register/test.php", { action: "close_session"} ).show(3000)
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40984169
answers question: http://stackoverflow.com/q/26145767

http://stackoverflow.com/q/26146831
has body: I've created as simple an OpenGraph embed for Yammer as the documentation allows: &lt;script type="text/javascript" src="https://assets.yammer.com/assets/platform_embed.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; yam.connect.embedFeed({ container: "#yammerfeed", feedType: "open-graph" }); &lt;/script&gt; In Internet Explorer 8.0 (Standards - no compatibility mode) and in Internet Explorer 9 (again, in IE9 Standards Document Mode), once I'm asked to log in (assuming I'm not already), The iframe shows the message "Please wait...", and then "Loading...", at which point it freezes. In IE9 I get the following console errors using Developer Tools: SCRIPT5009: 'Math' is undefined latest_jquery-d4465d7c4037a25f51802ce13ef899d1.js, line 14 character 12808 SCRIPT5009: 'String' is undefined js_sdk_login_proxy, line 10 character 7 The open graph embed does load successfully in IE10, IE11, Chrome and Safari. Adding various other config (such as the network name, use_sso etc.) has no effect. Changing the platform_embed.js location to: https://c64.assets-yammer.com/assets/platform_embed.js makes no difference either. Is there an issue with the JavaScript in the Yammer Embed?
has answer: http://stackoverflow.com/a/27604068
tagged with: embed
downvote count: 0
has comment: http://stackoverflow.com/comment/40988085
score: 1
type: Question
tagged with: javascript
has title: Yammer Embed won't complete load: JavaScript error in IE8 and IE9
upvote count: 1
answer count: 1
favorite count: 0
tagged with: yammer
type: UnansweredQuestion

http://stackoverflow.com/q/26054813
tagged with: http://stackoverflow.com/tag/html
tagged with: php
accepted answer: http://stackoverflow.com/a/26055088
has title: How to Force NOT receive data when submitting HTML form
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26055047
has body: I am making a form which will autosubmit when the page loads.It submits POST data to another domain, The problem is that when the form is submitted, It automatically receives JSON data in php format from another domain which is automatically downloaded by my users. I want that my form should submit data but NOT receive response or if received should discard that not download that data. index.html &lt;form name="certform" id="contactForm" action="http://example.com/submit.php" Method="POST"&gt; &lt;input type="hidden" name="VoteId" value="111AAA" /&gt; &lt;input type="hidden" name="VoteName" value="Vote&amp;#33;" /&gt; &lt;input type="hidden" name="CheckedBox" value="3" /&gt; &lt;input type="submit" value="Submit request" /&gt; &lt;/form&gt; When submitted it sends data but Also receives response and downloads it. This should not happen. The Conditions are: I dont have access to the other domain (example.com) I have full access to my own server (PHP, Jquery, JS, HTML) The Form should be submitted automatically If the other domain (example.com) sends back data it should not be automatically downloaded in user's browser.
tagged with: forms
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/26055047
tagged with: javascript
tagged with: jquery
answer count: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26055088

http://stackoverflow.com/a/26117190
upvote count: 1
score: 1
has body: Tried using bootstrap and js for your code $(document).ready(function () { (function ($) { $('#filter').keyup(function () { var rex = new RegExp($(this).val(), 'i'); $('.searchable tr').after('&lt;tr&gt;&lt;/tr&gt;').hide(); $('.searchable tr').filter(function () { return rex.test($(this).text()); }).show(); }) }(jQuery)); }); sharing the fiddle link , it mignt help you http://jsfiddle.net/52aK9/241/
downvote count: 0
answers question: http://stackoverflow.com/q/26116831
has comment: http://stackoverflow.com/comment/40934942
has comment: http://stackoverflow.com/comment/40932681
type: Answer

http://stackoverflow.com/comment/40970783
type: Comment
has text: I'm aware of ng-click, but in case i need to bind events - what would have been a better choice ?
type: AnswerComment
comment on: http://stackoverflow.com/a/26138622
score: 0

http://stackoverflow.com/comment/41055229
score: 0
type: Comment
type: QuestionComment
has text: what kind of error do you get in the console?
comment on: http://stackoverflow.com/q/26183875

http://stackoverflow.com/a/26109866
score: 2
has body: When you write to the document after the document is initially closed by the browser, the effect is to start all over with a fresh, empty document.
upvote count: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26109835
answers question: http://stackoverflow.com/q/26109835
type: Answer

http://stackoverflow.com/q/26136301
has answer: http://stackoverflow.com/a/26136358
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26136381
has title: AngularJs ng-click VS jquery on('click')
accepted answer: http://stackoverflow.com/a/26136495
has body: I'm new to angular and failing to understand why should i use angular ng-click over jQuery event listeners? Since the best practice is to use only one of them in my App (according to this highly up voted answer) Isn't there any elegant solution in angular to listen to events such as in jquery? jQuery Box 1 Box 2 Box 3 $("span").on('click',function() { // do something }); Angular Box 1 Box 2 Box 3 $scope.doSomething = function(){ // do something }; What will happen if i'll need to change the function name, or remove it completely, in angular i'll have to go over the entire code and remove the ng-clicks.
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26136381
upvote count: 3
type: Question
has answer: http://stackoverflow.com/a/26136476
score: 3
tagged with: javascript
linked to: http://stackoverflow.com/q/14994391
has answer: http://stackoverflow.com/a/26136495
downvote count: 0
tagged with: jquery

http://stackoverflow.com/q/26170692
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41032689
has comment: http://stackoverflow.com/comment/41032759
tagged with: http-headers
type: Question
answer count: 1
tagged with: javascript
has title: Page loads three times on Google Chrome (Mac)
has comment: http://stackoverflow.com/comment/41032702
score: 0
has body: Check out this page: http://tinyurl.com/chrome-loads-thrice. When accessed via Google Chrome (OSX, 37.0.2062.122), it loads three times. The number you see is the number of times the page has loaded. The first load give me 1, the second load gives 3, then 5, 7 , 9, 11... It looks like this in code: session_start(); $count = isset($_SESSION['test_counts']) ? $_SESSION['test_counts'] : 1; $_SESSION['test_counts'] = $count + 1; printHeader(); echo '&lt;p&gt;'.$_SESSION['test_counts'].'&lt;/p&gt;'; printFooter(); I can't give the contents of those functions, but you can see their output. Without printHeader and printFooter, the page loads with normal counts.
has comment: http://stackoverflow.com/comment/41030813
has answer: http://stackoverflow.com/a/26228090
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26228090
tagged with: php
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/41031056

http://stackoverflow.com/comment/40811145
score: 0
has text: From the problem statement, it appears so. I realize that the MD5 cannot be decrypted. (Hashes are one way) But since there is more information -- like string prefixes being generated with lengths increasing by 2, my email address -- it might be possible.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26050688

http://stackoverflow.com/comment/94440200
type: Comment
comment on: http://stackoverflow.com/a/43333491
type: AnswerComment
score: 0
has text: :) sorry to disappoint but all the other solutions contain for loops (for with strl.length and index, for of, etc.) with a closure for saving the findings...you can look at some here: https://stackoverflow.com/a/41573058/5242207 also this solutions is quite fast since as soon as the index is found, the find functions stops iterating through the string. the reverse should come cheap on an optimization level too since we can just iterate from the back to the front and dont need to sort the array.

http://stackoverflow.com/q/26089607
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26089726
has body: I have 2 variables var firstThumb = 2; var thumbRel = "0" + firstThumb; This sets the number for my first thumbnails rel attribute rel="02" - I like things looking nice, there are 15 thumbs so it just makes my code line up and look nicer. That's the reason for the 0. I have a function. function thumbIncrease() { firstThumb++ }; this runs in an interval - Every 2 seconds. setInterval(function(){ thumbIncrease(); console.log(firstThumb); console.log(thumbRel); }, 2000); the console log for firstThumb increases as expected - 2, 3, 4, 5 and so on every 2 seconds. BUT - The console log for thumbRel stays at 02 every time and doesn't increase So I guess thumbRel isn't updating when firstThumb does for some reason? Could anybody help with this? Thanks!!
has answer: http://stackoverflow.com/a/26089623
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/26089185
accepted answer: http://stackoverflow.com/a/26089726
type: Question
possible better answer: http://stackoverflow.com/a/26089650
has comment: http://stackoverflow.com/comment/40882056
has answer: http://stackoverflow.com/a/26089650
has title: jQuery - Variable not "updating" on increment
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40879078
comment on: http://stackoverflow.com/a/26074555
has text: i mentioned above please change locatStr = window.location.search. Value is whatever that appears in the url.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26090870
tagged with: javascript
type: Question
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26090947
tagged with: foreach
has answer: http://stackoverflow.com/a/26090947
type: AnsweredQuestion
has body: I have 2 lots of json data being loaded on the page. I want to append a different list depending on what loaddata equals. How can I do this? In console.log myList equals myjson2 however I am getting an undefined error when I try and put myList.forEach(createList); in. function createList(element, index, array) { var li = document.createElement("li"); li.setAttribute("data-rank",index); li.appendChild(document.createTextNode(element['name'])); ul.appendChild(li); } var ul = document.createElement("ul"); ul.setAttribute("id","test"); document.body.appendChild(ul); var myjson1 = [{ "name": "Tom", "rank": 1 },{ "name": "Richard", "rank": 3 }]; var myjson2 = [{ "name": "Kate", "rank": 1 },{ "name": "Sarah", "rank": 3 }]; var loaddata=2; var myList = "myjson" + loaddata; console.log(myList); //myList.forEach(createList); /* commented out as not working */ myjson1.forEach(createList); /* appends myjson1 list */ myjson2.forEach(createList); /* appends myjson2 list */
has title: Append different data depending on variable value

http://stackoverflow.com/comment/41040217
score: 3
comment on: http://stackoverflow.com/q/26175918
has text: Create the table once, and subsequently append not to `#result` but to your new table.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26081105
has body: A: Node.js will not respond to any request unless you write code that actively sends a response. It doesn't matter whether that code runs synchronously or asynchronously. The client (or even the server's networking stack) cannot know or care whether asynchrony happened in the meantime. B: There is only one Node.js thread, period. When a response arrives for an asynchronous operation kicked off in Node.js code, an event is raised in the Node.js event loop thread, and the appropriate callback/handler is called.
has comment: http://stackoverflow.com/comment/40866841
has comment: http://stackoverflow.com/comment/40866486
has comment: http://stackoverflow.com/comment/40868858
score: 0
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/26081093
has comment: http://stackoverflow.com/comment/40866463
type: Answer

http://stackoverflow.com/a/26089726
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26089607
has body: When you say var thumbRel = "0" + firstThumb; Javascripts uses the current value of firstThumb to calculate thumbRel, in this case "02". However, after that, the variable are completely seperate from each other. It will behave as if you wrote: var thumbRel = "02"; Most programming languages behave that way. If you use the = sign to assign a vaiable to a value, it will stay the same until you assign another value to it. If you want the value to change based on the value of firstThumb, you should consider using a function instead of a variable, like this: var firstThumb = 2; var thumbRel = "0" + firstThumb; function thumbRel () { return "0" + firstThumb; } function thumbIncrease() { firstThumb++ }; setInterval(function(){ thumbIncrease(); console.log(firstThumb); console.log(thumbRel()); }, 2000); EDIT: fixed function call
accepted answer of: http://stackoverflow.com/q/26089607
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/a/74555816
upvote count: 1
has body: If you don't want to use $scope.$apply(), you can use $timeout: const fileReader = new FileReader(); fileReader.onload = (event) =&gt; { this.$timeout(() =&gt; { // Logic goes here... }, 0); }; ...
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26165919
score: 1

http://stackoverflow.com/q/26101015
has title: Load different CSS files on button click with JavaScript
possible better answer: http://stackoverflow.com/a/26101172
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26101119
has answer: http://stackoverflow.com/a/26101122
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40903168
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: Question
linked to: http://stackoverflow.com/q/10873942
score: 0
linked to: http://stackoverflow.com/q/17314797
has comment: http://stackoverflow.com/comment/40902571
has answer: http://stackoverflow.com/a/26101193
has answer: http://stackoverflow.com/a/26101119
has comment: http://stackoverflow.com/comment/40902480
answer count: 5
has answer: http://stackoverflow.com/a/26101172
has answer: http://stackoverflow.com/a/26101183
has body: I want to allow the user to change the 'theme' of the website when he clicks on theme 1 it loads a different CSS file then when the user clicks on theme 2. How is this possible? This is what I have tierd to do with so far. &lt;script type="text/javascript"&gt; window.onload = function() { var fontButton = document.getElementById('changeFont'); fontButton.addEventListener('click', function(){ document.write('&lt;link rel="stylesheet" type="text/css" href="/France2014/css/test.css"&gt;'); }); } &lt;/script&gt; This loads the file when I click on the button, but it removes everything else inside the website and just leaves the HTML tag and CSS file, I know this because I launch the development tool inside of Google chrome. What can I do? Is there a better way to implement this feature?I am open to suggestions.

http://stackoverflow.com/comment/41033967
comment on: http://stackoverflow.com/q/26172489
score: 1
has text: I don't think that plugin allows for a footer , it is called "FULL PAGE" meaning it take up the FULL amount of the PAGE, I could be wrong , but I looked at that plugin as well for a project and it seems that each section is meant to use the full page , why dont you put the footer in the section???
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26177716
downvote count: 0
has body: Is it what you're looking for? $("body").mousemove(function(event) { var radius = 10, yourX = 40, yourY = 10; var xDimenion = yourX &gt; event.pageX ? yourX - event.pageX : event.pageX - yourX; var yDimenion = yourY &gt; event.pageY ? yourY - event.pageY : event.pageY - yourY; if(Math.sqrt(xDimenion * xDimenion + yDimenion * yDimenion ) &lt; radius){ //do some stuff } }); I think it's ok now.
accepted answer of: http://stackoverflow.com/q/26177468
type: Answer
answers question: http://stackoverflow.com/q/26177468
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/40875310
score: 0
type: AnswerComment
type: Comment
has text: Geez, you're right. What a stupid mistake. Thanks!
comment on: http://stackoverflow.com/a/26086101

http://stackoverflow.com/a/26122138
type: Answer
score: 2
has body: Set the select value to the value of the matching option: $(".shade_custom_option").each(function (index, value) { $(this).val( $(this).find('option[data-isnone=true]').val() ); });
upvote count: 2
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26121886
accepted answer of: http://stackoverflow.com/q/26121886

http://stackoverflow.com/comment/40962730
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26133689
has text: I would probably start by using [ngMousemove](https://docs.angularjs.org/api/ng/directive/ngMousemove) to get the mouse's position within your element. Monitor when it is near the edge of the element and then tell the element to scroll.

http://stackoverflow.com/a/26076369
score: 0
has body: You underestimate the complexity of DOM elements with javascript. Using jQuery you can archive movement with: $("#moving").click(function() { $("#exam").stop().css("marginTop", "0").animate({ marginTop: "+=500" }, 1000, function() { display(""); } ); }); DEMO: http://jsfiddle.net/margusmartsepp/dhq5p7n5/1/
answers question: http://stackoverflow.com/q/26075719
type: Answer

http://stackoverflow.com/comment/40896727
type: QuestionComment
type: Comment
has text: Problem is solved. Above is working code.
comment on: http://stackoverflow.com/q/26076309
score: 0

http://stackoverflow.com/a/26096899
answers question: http://stackoverflow.com/q/26096403
score: 0
has body: You could simply scroll by JS. $('body').scrollLeft($(document).outerWidth()); DEMO /* Write JavaScript here */ $(document).ready(function() { $('body').scrollLeft($(document).outerWidth()); }); $("button").click(function() { $('body').scrollLeft($(document).outerWidth()); }); .container { height: 200px; white-space: nowrap; width: 4000px; } .box { color: #FFFFFF; border: 1px solid red; box-sizing: border-box; height: 200px; width: 200px; float: left; background: black; } ScrolltoEnd Content Content Content Content Content Content Content Content Content Content Content Content Content Content Content Content Content Content Content I'm the End
type: Answer

http://stackoverflow.com/comment/40795399
comment on: http://stackoverflow.com/a/26042014
score: 0
type: AnswerComment
type: Comment
has text: @AlessandroCorradini, is the output of the data.post response different then what you provided above?

http://stackoverflow.com/comment/40926189
comment on: http://stackoverflow.com/a/26110495
type: Comment
has text: just a tip : prefer the term `assert` instead of `cast` as there isn't any runtime support
type: AnswerComment
score: 0

http://stackoverflow.com/q/26086081
has comment: http://stackoverflow.com/comment/40896210
has comment: http://stackoverflow.com/comment/40883446
has comment: http://stackoverflow.com/comment/40897896
answer count: 0
score: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40921288
type: Question
has comment: http://stackoverflow.com/comment/40883267
tagged with: javascript
has title: If/Else statement for localStorage?
has comment: http://stackoverflow.com/comment/40875762
has comment: http://stackoverflow.com/comment/40875326
has body: I am trying to make an If/Else statement with localStorage but run into problems. I can't seem to link the If-statement to my localStorage User(s) and always get the Else-statement. How do i iterate through the localStorage keys and get the value of the user(s)? It would make sense to me if i could somehow target ID 1, ID 2, ID 3 etc. but how? Code for IF/ELSE: User.$button_login.addEventListener("click", function(entry) { for (var i = 0, len = localStorage.length; i &lt; len; ++i) { console.log(localStorage.getItem(localStorage.key(i))); } if (document.getElementById("firstName").value == User.$form.user_name.value) { if (document.getElementById("passWord").value == User.$form.password.value) { alert("You have logged in"); } } else { document.getElementById("negative").innerHTML = "Username or Password does not match" } }, true); }, Code for User(s): var User = { index: window.localStorage.getItem("User:index"), $form: document.getElementById("userReg"), $button_register: document.getElementById("registerUser"), $button_login: document.getElementById("logIN"), init: function() { // initialize storage index if (!User.index) { window.localStorage.setItem("User:index", User.index = 1); } User.$form.addEventListener("submit", function(event) { var entry = { id: parseInt(this.id_entry.value), user_name: this.user_name.value, password: this.password.value }; if (entry.id == 0) { User.storeAdd(entry); } }, true); storeAdd: function(entry) { entry.id = User.index; window.localStorage.setItem("User:index", ++User.index); window.localStorage.setItem("User:" + entry.id, JSON.stringify(entry)); }, };
tagged with: session-storage
has comment: http://stackoverflow.com/comment/40878679
has comment: http://stackoverflow.com/comment/40882916
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40878259
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40877380
tagged with: local-storage
has comment: http://stackoverflow.com/comment/40922106

http://stackoverflow.com/comment/41054364
type: Comment
has text: Have you tried my plunker sample? Is this the behaviour you want?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26181627

http://stackoverflow.com/comment/40893508
type: Comment
comment on: http://stackoverflow.com/a/26095252
type: AnswerComment
score: 0
has text: when i set time 00:00:10 ..it runs from -ve .eg: -1:58:30

http://stackoverflow.com/comment/40993921
type: Comment
has text: How does your answer effectively differ from the questioners code?
score: 0
comment on: http://stackoverflow.com/a/26150535
type: AnswerComment

http://stackoverflow.com/comment/136581818
score: 0
type: Comment
has text: `document.createNode` does not exist. Use `document.createElement` instead.
comment on: http://stackoverflow.com/a/26181675
type: AnswerComment

http://stackoverflow.com/a/26053258
downvote count: 0
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/26053156
has body: As I said in the comments, jQuery(selector) will return a jQuery object which will always be a truthy value. So your if condition will get executed every time. I will try something like var log = (function() { var $log = $('#log'); return function(msg) { $(' ', { text: msg }).appendTo($log) } })(); var map = { 'fieldSize': 'size', 'sizeXSmall': 'xs', 'sizeSmall': 'small', 'sizeMedium': 'medium', 'sizeLarge': 'large', 'sizeXLarge': 'xl', 'fieldName': 'name', 'fieldNum': 'number' }; selectedObj = { 'fieldSize': false, 'sizeXSmall': false, 'sizeSmall': false, 'sizeMedium': false, 'sizeLarge': false, 'sizeXLarge': false, 'fieldName': false, 'fieldNum': false }; var $els = jQuery('.field div'); $.each(map, function(key, value) { selectedObj[key] = $els.is(':contains("' + value + '")') }); log('After: ' + JSON.stringify(selectedObj)) size large medium number
score: 2
accepted answer of: http://stackoverflow.com/q/26053156
type: AcceptedAnswer

http://stackoverflow.com/comment/41044820
comment on: http://stackoverflow.com/a/26178494
type: AnswerComment
has text: Lol, your comment up there helped and I had been forgetting to hit Ctrl+f5 :\ Umm, I do not know why the original author of that blog(code) had added that. Not knowing the basics of js, i was unsure if this line of code was unnecessary. I assumed the same and went ahead removing that line of code, but it still did not help me. Oh, wait, while trial and error I changed my custom.js multiple times. And some older one was cached and I guess all the solutions I tried might had worked. :|
score: 0
type: Comment

http://stackoverflow.com/q/26161914
type: Question
has answer: http://stackoverflow.com/a/26162627
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26162627
has body: I do want to render my page and exit PhantomJS in the evaluate function, because I want to trigger it when a specific event is fired. I've tried something like this: page.evaluate(page, function (page, phantom) { //do some stuff on my page //i want to execute this in an eventhandler of my page though thats not the problem page.render('imgName.png'); page.render('pdfName.pdf'); phantom.exit(); }, page, phantom); This doesn't work in my example, because page.render seems to be undefined. Maybe there is a serializer for the arguments which is not serializing functions of the obj? Is this even possible? Does anyone know a solution for my issue? I know I could set a while loop in my evaluate function and prevent its termination and do this page render stuff outside afterwards. I don't like this though.
answer count: 1
has comment: http://stackoverflow.com/comment/71100442
favorite count: 0
score: 6
has title: How to execute page.render inside page.evaluate?
upvote count: 6
tagged with: phantomjs
type: AnsweredQuestion

http://stackoverflow.com/q/26123250
upvote count: 0
has comment: http://stackoverflow.com/comment/40943305
tagged with: javascript
has comment: http://stackoverflow.com/comment/40943247
answer count: 1
has body: i am new to backbone trying to send a collection directly to a view template but i fail. Type Error saying that string is not a function. I know that i return correctly my collection maybe i am taking the wrong way to pass my collection into view. Anyway help will be appreciate. here my view code var EncoursView = Backbone.View.extend({ el: "#contentEncours", //Container div template: "tpl/EncoursView.html", initialize: function () { console.log('Encours View Initialized'); this.collection.fetch(); console.log(this.collection); }, render: function () { $(this.el).empty(); var that = this; //Fetching the template contents $.get(this.template({lists:this.collection}), function (template) { that.$el.html(template); //adding the template content. }, 'html'); return that; } }); this is my view trying to iterate my collection inside my route i call this function i pass collection to my view and call render remencour: function(){ var collectionSupport = new SupportCollection(); this.encoursView = new EncoursView({collection:collectionSupport}); this.encoursView.render(); }
favorite count: 0
tagged with: backbone.js
has answer: http://stackoverflow.com/a/26184819
has title: can pass backbone collection to view error string is not a function
has comment: http://stackoverflow.com/comment/40942847
downvote count: 1
tagged with: underscore.js-templating
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40943354
tagged with: underscore.js
score: -1
accepted answer: http://stackoverflow.com/a/26184819
type: Question

http://stackoverflow.com/a/26171435
type: Answer
has comment: http://stackoverflow.com/comment/41032174
has comment: http://stackoverflow.com/comment/41032248
score: 1
has comment: http://stackoverflow.com/comment/41036230
upvote count: 1
has comment: http://stackoverflow.com/comment/41036240
has body: From the API description: Use the chrome.input.ime API to implement a custom IME for Chrome OS. As such, this will only work on ChromeOS (i.e., on Chromebooks). It will not have any effect running in Chrome on Windows / OS X / Linux.
downvote count: 0
answers question: http://stackoverflow.com/q/26171357

http://stackoverflow.com/comment/40833189
score: 0
type: AnswerComment
has text: Oh ok, is XML always using ` QWERTY ` type tags?
type: Comment
comment on: http://stackoverflow.com/a/26062824

http://stackoverflow.com/q/26039637
tagged with: php
has answer: http://stackoverflow.com/a/26039774
has comment: http://stackoverflow.com/comment/40789960
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26040818
possible better answer: http://stackoverflow.com/a/26039774
has title: Populate Select drop down list with Jquery based on button click
type: Question
has answer: http://stackoverflow.com/a/26039827
tagged with: javascript
tagged with: forms
has comment: http://stackoverflow.com/comment/40790292
score: 0
has comment: http://stackoverflow.com/comment/40790141
tagged with: jquery
has body: I have 2 buttons and a select dropdown list Monthly Yearly Please Choose a Plan On the button click of month i need the select drop down list populated with 4 choices. Or the click of year the list needs to be populated with the 4 year choices. But if you go back and forth between month and year i need the list to not have 1000 of the same choices. I used jquery .show and .hide on two different selects but the form was submitting both of them even if the year select was hidden so I didnt know which was actually chosen. So it has to be one select drop down
accepted answer: http://stackoverflow.com/a/26039827
answer count: 3
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26103864
answers question: http://stackoverflow.com/q/26101502
has body: Though I've not included the async part but I believe overall searching approach could be like this: // Input Array var inpArr = [{ id: 1, foo: [{ a: "dog", b: "cat" }] }, { id: 2, foo: [{ a: "kutta", b: "billi" }] }]; var myFilter = function(val, item, index, array) { var searchResult = scanProperties(item, val); return searchResult; }; // Note: pass additional argument to default filter. // using Function.Prototype.Bind var filterResult = inpArr.filter(myFilter.bind(null, "dog")); alert(filterResult); console.log(filterResult); // Recursively scan all properties function scanProperties(obj, val) { var result = false; for (var property in obj) { if (obj.hasOwnProperty(property) &amp;&amp; obj[property] != null) { if (obj[property].constructor == Object) { result = result || scanProperties(obj[property], val); } else if (obj[property].constructor == Array) { for (var i = 0; i &lt; obj[property].length; i++) { result = result || scanProperties(obj[property][i], val); } } else { result = result || (obj[property] == val); } } } return result; }; JS Fiddle Searching an Array of Objects
score: 0
type: Answer

http://stackoverflow.com/comment/41031651
type: AnswerComment
comment on: http://stackoverflow.com/a/26170734
type: Comment
score: 0
has text: Well, `** some data if you want to **` should be replaced. That's just a container for the data (if any) you want to return with the callback function.

http://stackoverflow.com/comment/41053572
type: Comment
has text: You are welcome. By the way thanks for let me know these plugins :)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26159314

http://stackoverflow.com/comment/41056720
score: 0
comment on: http://stackoverflow.com/q/26167188
type: QuestionComment
type: Comment
has text: Updated my snippet to include the whole function. The fiddle worked, interesting... can't see how to relate what you did there to make changes on my end, though.

http://stackoverflow.com/q/26064211
has comment: http://stackoverflow.com/comment/40835444
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I am creating a div and giving it some styles like this: var div = document.createElement("div"); div.style.width = "100px"; div.style.height = "100px"; div.style.background = "red"; div.style.color = "white"; div.style.border = "2px solid rgba(0, 0, 255, 0.5)"; Is there a way to assign a name to this div so I can reference it in other places, like in other JavaScript code or in CSS? Update Now doing this: $( document ).ready(function() { var div = document.createElement("div"); div.style.width = "100px"; div.style.height = "100px"; div.style.background = "red"; div.style.color = "white"; div.style.border = "2px solid rgba(0, 0, 255, 0.5)"; div.setAttribute("id", "Div1"); }); and am getting Uncaught TypeError: undefined is not a function on div.setAttribute("id", "Div1");
has comment: http://stackoverflow.com/comment/40835487
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26064339
has comment: http://stackoverflow.com/comment/40835508
has comment: http://stackoverflow.com/comment/40835400
has title: Assign a name to a div created through JavaScript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40835556
linked to: http://stackoverflow.com/q/9422974
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26064339
has comment: http://stackoverflow.com/comment/40835540

http://stackoverflow.com/comment/40975431
type: Comment
type: QuestionComment
has text: The php page has been tested independently and with the javascript it always returns the correct result and stores it in the variable (data)
comment on: http://stackoverflow.com/q/26141012
score: 0

http://stackoverflow.com/q/26175280
downvote count: 0
has answer: http://stackoverflow.com/a/26175571
favorite count: 0
has answer: http://stackoverflow.com/a/26175441
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/41039128
answer count: 4
has comment: http://stackoverflow.com/comment/41039302
has comment: http://stackoverflow.com/comment/41040061
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/34840316
linked to: http://stackoverflow.com/q/15226744
has title: Javascript or PHP back button
has body: Follow me on this one :-) Pages: index.php contact.php I go from index.php to contact.php, do a HTML POST to contact.php (where I send the data to a DB...), and then have a back button to go back to index.php. Now im looking for a Javascript or PHP solution to go back (exactly link javascript history.back(-1)) but I don't want the page to do the POST of contact.php again and I don't want to use history.back(-1). Now i know I can just say Back but I dont want to hard code it. And suggestions?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41039056
has answer: http://stackoverflow.com/a/38360979
has comment: http://stackoverflow.com/comment/41040074
has comment: http://stackoverflow.com/comment/41039538

http://stackoverflow.com/a/26451603
has body: once user is sending offer to agents, fastpath creates a multiuser chat room in a workgroup queue. You have to join that MUC room and send messages. Make sure you have queues under you workgroups in Openfire server and have appropriate settings to serve customers.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26114922

http://stackoverflow.com/q/26056107
has answer: http://stackoverflow.com/a/26056890
has comment: http://stackoverflow.com/comment/40844220
tagged with: javascript
answer count: 2
accepted answer: http://stackoverflow.com/a/26056371
has body: I have a problem. I'm studying javascript but I have no idea how to create tables working only on javascript files. I have to create a table for each output of letter frequency but I have no idea how to do it. Here is the output I should have to have: At the beginning I thought to work on the HTML but I can't as that part is related to test my code has to pass. Here I will show some of them: display_letter_frequency(letter_frequency("Hello"),document.getElementById("frequency_table")); var rows = document.getElementById("frequency_table").querySelectorAll('tr') equal(rows.length, 4, "With input String 'Hello' there should be 4 table rows") equal(rows[0].querySelectorAll('td')[0].innerHTML, 'H', "1st td of 1st tr should have the value H"); equal(rows[0].querySelectorAll('td')[1].innerHTML, '1', "2nd td of 1st tr should have the value 1"); equal(rows[1].querySelectorAll('td')[0].innerHTML, 'E', "1st td of 2nd tr should have the value E"); equal(rows[1].querySelectorAll('td')[1].innerHTML, '1', "2nd td of 2nd tr should have the value 1"); equal(rows[2].querySelectorAll('td')[0].innerHTML, 'L', "1st td of 3rd tr should have the value L"); equal(rows[2].querySelectorAll('td')[1].innerHTML, '2', "2nd td of 3rd tr should have the value 2"); equal(rows[3].querySelectorAll('td')[0].innerHTML, 'O', "1st td of 4th tr should have the value O"); equal(rows[3].querySelectorAll('td')[1].innerHTML, '1', "2nd td of 4th tr should have the value 1"); Also I cannot use the console.log but write just the code of the function that will be called back by the tester. Here is what I did but I don't know if it's right and how to go forward: function display_letter_frequency(a,dom) { if(a === undefined){ return undefined } else { var tbl = document.createElement("table"); var tblBody = document.createElement("tbody"); for(var x in a){ var row = document.createElement("tr"); } } } This code is related to a function I wrote before which count in command line the frequency letters of the user: f…
downvote count: 0
favorite count: 0
has title: Creating tables in Javascript
score: 2
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/26056371
possible better answer: http://stackoverflow.com/a/26056890
type: Question

http://stackoverflow.com/comment/40863585
type: Comment
type: QuestionComment
has text: I will post the code, it prompts the user.
score: 0
comment on: http://stackoverflow.com/q/26079643

encryption
tags question: http://stackoverflow.com/q/26083231
tags question: http://stackoverflow.com/q/26081791
tag name: encryption
tags question: http://stackoverflow.com/q/26129426
tags question: http://stackoverflow.com/q/26050688
tags question: http://stackoverflow.com/q/26047455
tags question: http://stackoverflow.com/q/26165821
tags question: http://stackoverflow.com/q/26186377
type: Tag

http://stackoverflow.com/q/26123803
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/26124121
tagged with: javascript
has answer: http://stackoverflow.com/a/26123970
has comment: http://stackoverflow.com/comment/40944110
accepted answer: http://stackoverflow.com/a/26123970
has body: I'm using AngularJS to build a small SPA. Coming from a jQuery background I have trouble with things like DOM manipulation (or lack thereof) in AngularJS. I have an ng-repeat that creates tr's - what I'd like to happen, is when the end-user clicks on one of the p tags within the td, it converts into an editable input field. From: On p tag click: Here's the code that I currently have: index.html &lt;tr ng-repeat="test in tests"&gt; &lt;td&gt; &lt;span ng-click='edit()'&gt;{{test.name}}&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; controllers.js $scope.edit = function() { something in here that will help me convert to input type='text' } I'm thinking I need to use a directive, so if someone can point me in the right direction or let me know what I can do, that would be greatly appreciated. Thank you for all the help.
upvote count: 2
has comment: http://stackoverflow.com/comment/40943888
answer count: 2
has comment: http://stackoverflow.com/comment/40944208
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/26124121
type: AnsweredQuestion
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40944158
has title: Change p tag to input

http://stackoverflow.com/comment/40906746
score: 0
type: Comment
type: QuestionComment
has text: @BenjaminGruenbaum, T.J. Crowder I am sorry for the formatting issue. Fixed it. Thanks a lot Undefined
comment on: http://stackoverflow.com/q/26102999

http://stackoverflow.com/q/26118805
has title: Interactive donut chart Google Charts API
upvote count: 1
type: Question
tagged with: donut-chart
has comment: http://stackoverflow.com/comment/40936405
tagged with: google-visualization
tagged with: javascript
has comment: http://stackoverflow.com/comment/40935748
downvote count: 0
favorite count: 0
has body: I have created a donut chart from Google Charts API. When clicking on each slice, it should increase by 10 units and decrease the adjacent slice (clockwise) by 10 units. What I have thus far is a alert popup that explains this, but I would like to redraw the chart with the new values. Here is my code: I would just like to resize the selected and adjacent slices by clicking on a single slice.
has comment: http://stackoverflow.com/comment/40998772
has comment: http://stackoverflow.com/comment/40934370
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40934069
answer count: 0
score: 1

http://stackoverflow.com/a/26188148
downvote count: 0
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/41063452
answers question: http://stackoverflow.com/q/26188076
has comment: http://stackoverflow.com/comment/41075858
has body: Use .textContent instead of .innerHTML. Then the data will be inserted literally, instead of being parsed as HTML, so you don't need to convert special characters to entities. HTML: JS: document.getElementById("target").textContent = "This is not a link & you can't click on it"; DEMO IE8 and earlier doesn't support .textContent, use .innerText. Here's a polyfill
has comment: http://stackoverflow.com/comment/41063721
score: 2
has comment: http://stackoverflow.com/comment/41063405
has comment: http://stackoverflow.com/comment/41063730

http://stackoverflow.com/q/26036441
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26036791
accepted answer: http://stackoverflow.com/a/26036791
type: Question
has comment: http://stackoverflow.com/comment/40784017
answer count: 1
tagged with: javascript
has body: Thank you everyone in advance. I need some help hidding an iframe youtube video when it ends can someone guide me how to do that?? i need something like this but i cant find how to make it
score: 0
has title: Hide iframe when Youtube video ends
tagged with: iframe
tagged with: youtube

http://stackoverflow.com/a/26175775
upvote count: 1
type: Answer
downvote count: 0
has body: Try $(window).load(function(){ $('#fullwidth-content img').capty(); }); $(document).ready fires after the DOM is loaded, $(window).load fires after all elements (graphic included) are loaded http://api.jquery.com/load-event/
answers question: http://stackoverflow.com/q/26175752
score: 1

http://stackoverflow.com/q/26042962
answer count: 1
has body: I'm trying to get stripe integrated into my meteor app using an Atmosphere package(https://atmospherejs.com/mrgalaxy/stripe) and I can't figure out exactly why I'm getting this error. Here's what I have at the moment: Repo cloned into packages/stripe meteor list returns -- mrgalaxy:stripe 1.5.6 Stripe.js and Node-Stripe brought to Meteor. When I tried to run 'meteor add stripe', I received 'stripe: no such package', so I added it the way it said on Atmosphere. (meteor add mrgalaxy:stripe). It looks like the JS file for the package is loaded in the browser when I inspect it, but I'm still getting this error, which leads me to believe I'm not including the package correctly. Any thoughts? If any additional debugging information is needed, I'd be happy to provide it. Thanks in advance! Main.js 'click #submit-btn': function() { Stripe.setPublishableKey('PUBLISHABLE_KEY'); var Stripe = StripeAPI('SECRET_KEY'); Stripe.charges.create({ amount: 10, currency: "USD", card: { number: "4242424242424242", exp_month: "03", exp_year: "2014" } }, function (err, res) { console.log(err, res); return false; }); }
tagged with: javascript
has title: Adding Stripe to Meteor -- Cannot read property 'setPublishableKey' of undefined
has answer: http://stackoverflow.com/a/26044368
type: AnsweredQuestion
score: 3
downvote count: 0
tagged with: meteor
tagged with: stripe-payments
favorite count: 0
type: Question
tagged with: package
accepted answer: http://stackoverflow.com/a/26044368
upvote count: 3

http://stackoverflow.com/comment/40815584
type: Comment
comment on: http://stackoverflow.com/a/26052563
score: 0
type: AnswerComment
has text: Simply, I want, If I mousedown on child, parent event should trigger ignoring child event.

http://stackoverflow.com/q/26122115
favorite count: 0
has body: I have a web application and when the user is logged in, I would like to display a popup after some time if the user doesn't do anything to warn him that he will be logged out soon. So I used intervals and I reset it each time the user interacts : $(this).mousedown(function () { reset(); }); $(this).mousemove(function () { reset(); }); $(this).scroll(function () { reset(); }); $(this).mouseup(function () { reset(); }); $(this).click(function () { reset(); }); $(this).keypress(function () { reset(); }); But in some case, the timer is not reset and the popup shows up when the user is still using the application, for example when scrolling in a div. Do I have to add my reset function to all possible events in my application or is there a simpler way to detect any interaction ?
type: UnansweredQuestion
tagged with: events
score: 11
upvote count: 11
tagged with: user-interaction
has answer: http://stackoverflow.com/a/59538170
has comment: http://stackoverflow.com/comment/40940421
has comment: http://stackoverflow.com/comment/40940354
has answer: http://stackoverflow.com/a/26122160
type: Question
tagged with: javascript
has title: Detect any user interaction
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40940391

http://stackoverflow.com/comment/40885680
score: 0
type: AnswerComment
has text: You'd need to copy it somehow. Look at this thread: http://stackoverflow.com/questions/122102/what-is-the-most-efficient-way-to-clone-an-object?rq=1
type: Comment
comment on: http://stackoverflow.com/a/26091161

http://stackoverflow.com/comment/40922635
comment on: http://stackoverflow.com/a/26111852
has text: I tried it but the position: absolute; on image does not keep it in the with of the span12. The images are now in full page width.
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/40819741
has text: Sorry to bother you, but i am new to web programming can you tell me where do we specify the text, clicking on which i will be redirected to my link in new tab ? Thanks
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26054553

http://stackoverflow.com/comment/40979831
comment on: http://stackoverflow.com/q/26142569
has text: Unless you show a minimal example of the code you have that doesn't work, nobody here will be able to help you.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40997426
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26152721
has text: sidenote: HTML5 doesn't use ` ` and ` `, they're just ` ` and ` ` now (parsers are in fact instructed to throw away the "self-closing" slash, because HTML is expressly not XML, so "self closing" doesn't mean anything. ` `, ` `, ` ` and friends shouldn't have a "self-closing" slash)

http://stackoverflow.com/a/26066400
has comment: http://stackoverflow.com/comment/84499644
has comment: http://stackoverflow.com/comment/40842135
upvote count: 12
accepted answer of: http://stackoverflow.com/q/26066198
has body: $.when() doesn't do progress notifications for you. Register for progress notifications on each individual promise or you could make your own version of $.when() that wraps it by first registering for done notifications on each one and then calling $.when(). $.whenWithProgress = function(arrayOfPromises, progessCallback) { var cntr = 0; for (var i = 0; i &lt; arrayOfPromises.length; i++) { arrayOfPromises[i].done(function() { progressCallback(++cntr, arrayOfPromises.length); }); } return jQuery.when.apply(jQuery, arrayOfPromises); } $.whenWithProgress(requests, function(cnt, total) { console.log("promise " + cnt + " of " + total + " finished"); }).then(function() { // done handler here }, function() { // err handler here }); I've been thinking about this some more and it bothered me a bit that you want progress notifications, jQuery promises have a progress mechanism and we're not using it. That means progress notifications aren't as extensible as they could be. Unfortunately, because $.when() returns a promise (not a deferred) and you can't use .notify() on a promise to trigger progress notifications, the above code is the simplest way to do it. But, in the interest of using .progress notifications instead of a custom callback, it could be done like this: $.whenWithProgress = function(arrayOfPromises) { var cntr = 0, defer = $.Deferred(); for (var i = 0; i &lt; arrayOfPromises.length; i++) { arrayOfPromises[i].done(function() { defer.notify(++cntr, arrayOfPromises.length); }); } // It is kind of an anti-pattern to use our own deferred and // then just resolve it when the promise is resolved // But, we can only call .notify() on a defer so if we want to use that, // we are forced to make our own deferred jQuery.when.apply(jQuery, arrayOfPromises).done(function() { defer.resolveWith(null, arguments); }); return defer.promise(); } $.whenWithProgress(requests).then(function() { // done handler here }, function() { // err handler here }, function(cnt, total) { // progre…
type: Answer
score: 11
answers question: http://stackoverflow.com/q/26066198
has comment: http://stackoverflow.com/comment/40841718
has comment: http://stackoverflow.com/comment/40839688
has comment: http://stackoverflow.com/comment/84498854
type: AcceptedAnswer
downvote count: 1

http://stackoverflow.com/comment/40861325
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26062647
has text: @Pars I have created the same scneario on apex.oracle.com. You can find the login credentials in the Edit#1 section of question.

http://stackoverflow.com/q/26073570
tagged with: node.js
accepted answer: http://stackoverflow.com/a/26073700
has title: Node.js: Returning value from function with async call inside
downvote count: 0
has body: I'm trying to create a synchronous function which creates a random string and checks if there's already a file with that name on Amazon Web Service S3. How could I make the function synchronous as inside of it is the asynchronous web service call to AWS? If the filename already exists, the function should call itself again (recursive) until a available filename is found. var generateUniqueAWSKey = function(prefix) { var unique = generateRandomString(); // generates a random string var name = prefix + unique + '.png'; awss3.headObject({ Bucket: 'pics', Key: name }, function(error, result) { if (!error) { unique = generateUniqueAWSKey(prefix); } }); return unique; }; var filename = generateUniqueAWSKey('prefix_'); // more code below using the filename
tagged with: javascript
tagged with: amazon-web-services
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26073700
score: 1
tagged with: asynchronous
favorite count: 0
type: Question
upvote count: 1
answer count: 1

http://stackoverflow.com/a/26042873
score: 0
answers question: http://stackoverflow.com/q/26042405
has comment: http://stackoverflow.com/comment/40797837
type: Answer
has body: I think it's decoding the response, not encoding the url. Try this: var https = require('https'), qs = require('querystring'); // ... var url = 'https://url.com/?' + qs.stringify({ param: 'foo' }); https.get(url, function(res) { if (res.statusCode === 200) { var bufs = [], bufsize = 0; res.on('data', function(data) { bufs.push(data); bufsize += data.length; }).on('end', function() { var buffer = Buffer.concat(bufs, bufsize), body = iconv.decode(buffer, 'iso-8859-1'); console.log('Body: ' + body); }); return; } else console.log('Non-OK status code: ' + res.statusCode); res.resume(); });
has comment: http://stackoverflow.com/comment/40798710
has comment: http://stackoverflow.com/comment/40800975

http://stackoverflow.com/comment/40918253
score: 0
type: QuestionComment
has text: I tried this ([0-9]*\.[0-9]+|[0-9]+)
type: Comment
comment on: http://stackoverflow.com/q/26108938

http://stackoverflow.com/comment/40943248
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26105884
type: Comment
has text: Yes. it is exactly a timer on a loop.

http://stackoverflow.com/a/26090199
has comment: http://stackoverflow.com/comment/40883189
downvote count: 0
has comment: http://stackoverflow.com/comment/40883249
has comment: http://stackoverflow.com/comment/40883163
score: 3
type: Answer
answers question: http://stackoverflow.com/q/26090191
has comment: http://stackoverflow.com/comment/40883157
upvote count: 3
has comment: http://stackoverflow.com/comment/40883154
has body: To replace mulitple instances of a pattern, with String.replace() you have to use a regular expression, rather than a string, to identify the specific instance(s) to be replaced, along with the g modifier: var test = "A-Test (One Two 3)" test.toLowerCase().replace(/ /g, "").replace("-", ""); var test = "A-Test (One Two 3)", modifiedTest = test.toLowerCase().replace(/ /g, "").replace("-", ""); console.log(modifiedTest);
has comment: http://stackoverflow.com/comment/40883123
has comment: http://stackoverflow.com/comment/40883156
has comment: http://stackoverflow.com/comment/40883166
has comment: http://stackoverflow.com/comment/40883217

http://stackoverflow.com/a/75603493
answers question: http://stackoverflow.com/q/26153066
has body: you can use the getUserMedia API to request access to the camera and then pass in a MediaStreamConstraints object that specifies the desired camera. Here's an example code snippet that selects the front-facing camera: const constraints = { video: { facingMode: { exact: "user" } } }; navigator.mediaDevices.getUserMedia(constraints) .then((stream) => { // do something with the stream }) .catch((error) => { console.error(error); });
score: 0
type: Answer

http://stackoverflow.com/comment/41037553
has text: output from console helped me :) there was "GM_addStyle is not definied". I added your grant and it worked finally. Thanks
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26162129

http://stackoverflow.com/q/26089394
answer count: 6
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26089486
has answer: http://stackoverflow.com/a/26089451
has body: I have an array that is sorted in the following way var items = [2.99, 5.99, 23.99, 1.99]; items.sort(function(a,b) { return a - b;}); This outputs the following: [1.99, 2.99, 5.99, 23.99] But I need a way to sort it but keep an index of the original index, e.g. [3: 1.99, 0: 2.99, 1: 5.99, 2:23.99] Any help would be appreciated.
has answer: http://stackoverflow.com/a/26089536
accepted answer: http://stackoverflow.com/a/26089451
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/26089479
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26089479
has answer: http://stackoverflow.com/a/26089490
has title: Convert array to object with saving original index field
has answer: http://stackoverflow.com/a/26089492
type: Question
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41010503
has text: This is really strange, I tried it in JS Bin and nothing would happen. The only difference was that I did not split it between the HTML and JS windows but embeded the JS code in the HTML. I'll check it out in Webstorm when I get home, thanks!
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26160000
score: 0

http://stackoverflow.com/q/26106855
score: 0
has answer: http://stackoverflow.com/a/26107020
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40913508
has body: Here is the code I am using to escape html tags: var ne = document.createElement('textarea'); ne.appendChild(document.createTextNode(str)); return ne.innerHTML; I do not want to escape tags e.g sasasashello should be sasasashello how can i do that?
type: UnansweredQuestion
type: Question
has title: Escape html tags except few given tags

http://stackoverflow.com/comment/41037384
has text: @milkandtang 1. On installing `npm install pagedown` i got this message: `pagedown@1.1.0 node_modules\pagedown` in command prompt. 2. I have no such folder named `node_modules`. 3. This is my first module. 4. Windows
comment on: http://stackoverflow.com/q/26173175
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26089861
type: Question
tagged with: adobe-illustrator
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/26092903
has title: Illustrator - batch insert filename in textpath script crashes Illustrator
possible better answer: http://stackoverflow.com/a/26103645
has answer: http://stackoverflow.com/a/26103645
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: extendscript
has answer: http://stackoverflow.com/a/26092903
has body: First off: I am not a programmer. Just playing around with code and trying to get it to work for a specific task: Here is a script I made for the purpose of inserting a text with the file name in over 600 pdf files. This is suppose to work on all files in a selected folder. The problem: Illustrator crashes. First test code, after a few edited files Illustrator crashed, so I tried to introduce a delay after each save in order to slow down the batch process. $.setTimeout(function () {sourceDoc.close(SaveOptions.SAVECHANGES)}, 1000); No idea what to do next. The code works if I delete this line: sourceDoc.close(SaveOptions.SAVECHANGES); Here is the complete script: var destFolder, sourceFolder, files, fileType, sourceDoc, layers, writeText, finLabel; // Select the source folder. sourceFolder = Folder.selectDialog( 'Select the folder with Illustrator files you want to convert to PNG', '~' ); // If a valid folder is selected if ( sourceFolder != null ) { files = new Array(); fileType = prompt( 'Select type of Illustrator files to you want to process. Eg: *.ai', '*.pdf' ); // Get all files matching the pattern files = sourceFolder.getFiles( fileType ); if ( files.length &gt; 0 ) for ( i = 0; i &lt; files.length; i++ ) { sourceDoc = app.open(files[i]); // returns the document object layers = unlock(); writeText = getFilename(); finLabel = remText(); sourceDoc.close(SaveOptions.SAVECHANGES); //if save command line is deleted the code works WTF??? $.setTimeout(function () {sourceDoc.close(SaveOptions.SAVECHANGES)}, 1000); // still crashes using delay ... } //alert( 'Files are saved as PNG in ' + destFolder ); else { alert( 'No matching files found' ); } } function unlock() { //get the total number of layers in the active document doc = app.activeDocument; var totalLayers = doc.layers.length; //looping on layers to create one artboard per layer for ( var i = 0 ; i &lt; totalLayers ; i++){ var currentLayer = doc.layers[i]; //We don't want to deal with hidden layers if(currentL…
upvote count: 3

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/26163044
tags question: http://stackoverflow.com/q/26176999
tags question: http://stackoverflow.com/q/26157409
tags question: http://stackoverflow.com/q/26069499
tags question: http://stackoverflow.com/q/26057166
tags question: http://stackoverflow.com/q/26182477
tags question: http://stackoverflow.com/q/26114402
tags question: http://stackoverflow.com/q/26098930
tag name: ruby-on-rails-4
tags question: http://stackoverflow.com/q/26075348
tags question: http://stackoverflow.com/q/26085147

http://stackoverflow.com/comment/41011898
type: QuestionComment
comment on: http://stackoverflow.com/q/26160000
type: Comment
has text: I would suggest using the jquery to make this easy. Here is the fiddle updated with jquery included, http://jsfiddle.net/wqq4pmte/2/
score: 0

http://stackoverflow.com/comment/40911251
has text: It's very theoretical, say you've a bunch of variables in that scope you'll need later in the function, then one more _might_ slow down the execution, but the difference is meaningless. If you've a time intensive task, the first to drop off is jQuery.
comment on: http://stackoverflow.com/q/26105543
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/26171506
score: 1
favorite count: 0
tagged with: extjs4
has answer: http://stackoverflow.com/a/26244379
type: AnsweredQuestion
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/16694012
has body: I'm trying to append some logic to all the stores. I want this logic to execute before the one that is defined all through the app's stores Basically, I want one chunk of code to look at the response from the server, if it gets something back in particular, do something, if not, then proceed with whatever was going to happen by calling this.callParent() I guess. This seemed to do what I want but it's old and not working for 4.2.1 http://www.learnsomethings.com/2011/09/01/adding-some-error-detection-to-all-your-extjs-stores-with-one-simple-block-of-code/ Now here's what I do in 4.2.1 and it seems to be working Ext.define('App.overrides.Data.Store', { override: 'Ext.data.Store', load: function (options) { if (options != null) { options.callback = storeLoad; } this.callParent(arguments); } }); storeLoad: function (records, operation, success) { // operation.response is undefined on failures... } But as noted in the comment above, I cannot get an operation.response if the request failed with 400,401,500, etc. code. If I browse the exact URL ExtJS generates on load that is supposed to return an error with the string I want, I get this: Ext.data.JsonP.callback4({"Message":"The string!"}) This output is returned by my .NET Web API backend: actionContext.Response = actionContext.Request.CreateResponse(HttpStatusCode.Unauthorized, PortalResources.THE_STRING); If I change the HttpStatusCode to OK, I will then be able to get the response in storeLoad above, but not if the status &lt;> 200. I thought it was my backend not returning the response properly, but ExtJS and/or my comprehension of it seems to be the problem. I think it's how my store/proxy is defined since when the server return s a status of &lt;> 200, I don't even see the response content in Chrome's debugger. Here's one of my stores: Ext.define('Customer_Portal_UI.store.Contact', { extend: 'Ext.data.Store', model: 'Customer_Portal_UI.model.Contact', limitParam: false, pageParam: false, startParam: false }); //.....…
accepted answer: http://stackoverflow.com/a/26244379
tagged with: javascript
has title: Cannot get response in JSONP proxy callback when request failed
tagged with: extjs
answer count: 1
downvote count: 0

http://stackoverflow.com/a/26117335
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40931844
type: Answer
answers question: http://stackoverflow.com/q/26116813
accepted answer of: http://stackoverflow.com/q/26116813
has body: It looks strange that you use the 'GET' method to send data. createEvent:function(event){ return $http.post(url, { headers: { 'Authorization' : token }, data : event }) } seems better. Also check that your content type is correctly set.
score: 0

http://stackoverflow.com/comment/40918195
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26108481
has text: possible duplicate of [Don't destroy an Angular Bootstrap modal on close](http://stackoverflow.com/questions/24653888/dont-destroy-an-angular-bootstrap-modal-on-close)
score: 0

http://stackoverflow.com/q/26176805
favorite count: 0
has answer: http://stackoverflow.com/a/26176987
has comment: http://stackoverflow.com/comment/41041847
has comment: http://stackoverflow.com/comment/41042343
type: Question
has comment: http://stackoverflow.com/comment/41041722
has comment: http://stackoverflow.com/comment/41041877
accepted answer: http://stackoverflow.com/a/26176987
has comment: http://stackoverflow.com/comment/41041809
answer count: 2
upvote count: 1
has title: Jquery - Search in
has body: Hey guys I'm trying to search a &lt;ul&gt; Basically as I'm writing it needs to hide/show the &lt;li&gt; elements that correspond. HTML &lt;input id="searchUtil" type="search" placeholder="Pesquisa..."/&gt; &lt;ul id="ulutilizadores" class="list-group"&gt; &lt;li&gt;**some code*&lt;/li&gt; &lt;/ul&gt; As of now I have this: //#searchUtil is the &lt;input&gt; id $('#searchUtil').on('keyup', function (e) { var searchText = $(this).val(); //#ulutilizadores is the &lt;ul&gt; id $('#ulutilizadores li').each(function () { var text = $(this).val(); if (text.indexOf(searchText)) { $(this).hide(); } else { $(this).show(); } }); }); This isn't working. I've been searching but I don't really find some good answers. Can someone point me in the right direction?
possible better answer: http://stackoverflow.com/a/26177251
has comment: http://stackoverflow.com/comment/41041788
has comment: http://stackoverflow.com/comment/41041779
has answer: http://stackoverflow.com/a/26177251
tagged with: javascript
has comment: http://stackoverflow.com/comment/41041742
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41041906

http://stackoverflow.com/q/26145292
type: AnsweredQuestion
tagged with: wordpress
type: Question
has body: I've seen topics on disabling javascript for mobile but it's a little over my head. I know just enough to be dangerous. I have a hover effect for captions on photos using a script but on a mobile I've set the css so that it displays by default. Only problem is when you click the image to view a lightbox it tries to fire the hover effect. How do I disable that? &lt;script type="text/javascript"&gt; $(document).ready(function() { $('.fade').hover( function(){ $(this).find('.caption').fadeIn(250); }, function(){ $(this).find('.caption').fadeOut(250); } ); }); &lt;/script&gt;
accepted answer: http://stackoverflow.com/a/26145762
tagged with: mobile
answer count: 1
tagged with: javascript
score: 0
has title: Disabling Javascript Code on Mobile (maybe touchscreen)?
has answer: http://stackoverflow.com/a/26145762

http://stackoverflow.com/comment/40870499
comment on: http://stackoverflow.com/a/26082699
type: Comment
has text: If there are two instances of the 'outerbox' code above, one called foo bar and one called bar foo, with different IDs I get [foo bar bar foo[12345][foo bar bar foo[67890]]
score: 0
type: AnswerComment

http://stackoverflow.com/a/26054957
type: Answer
has body: Append the script element with the type attribute set to something other than text/javascript, i.e. like this: This script tag will not be parsed or run as javascript.
answers question: http://stackoverflow.com/q/26054877
score: 0

http://stackoverflow.com/comment/40899813
has text: @Regent In a case where the page is loaded with more content then you're right, but for a page in the OP's example.. it won't matter much, Of course binding on doc ready is a better choice
comment on: http://stackoverflow.com/a/26099369
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26158775
has answer: http://stackoverflow.com/a/26159268
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26159608
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/5619202
has title: How to hide a table row if date in td is older than today's date?
has comment: http://stackoverflow.com/comment/41007937
type: Question
has comment: http://stackoverflow.com/comment/41008563
has body: As a Dr. Frankenstein of coding, I have managed to cobble together a table as exampled [here][1], utilising datatables and UK Date Sorting. The final piece of this puzzle is to find a way to be able to hide an entire row if the date in the corresponding row is older than the current date (i.e. if a date in a td element is older than today's date, hide the row containing that td element). Is there a js solution to this problem? Any help much appreciated. Edit: Code as requested: Test Heading Lecture name Lecturer date time link Lecture 1 Lecturer 1 01/10/2014 11:00 Link 1 Lecture 2 Lecturer 2 02/10/2014 11:00 Link 2

http://stackoverflow.com/comment/41027930
comment on: http://stackoverflow.com/q/26167061
type: QuestionComment
type: Comment
has text: Then my apologies. My original comment truly meant merely to convey the message that it's a good idea to learn about event delegation before using it because it's an important fundamental concept to understand.
score: 1

http://stackoverflow.com/q/26102063
type: UnansweredQuestion
tagged with: django
answer count: 0
has body: I'm adding a new field to a jqGrid that acts as a foreign key between tables, but the selector that I'm using is just a bunch of options that all say 'undefined'. I've used the methods below on other places of my site, but I don't get why it isn't working here. This is a django site. view: def view_export(request): #handle what to do if it's a POST request #set other variables in infoDict infoDict['tempalte_choices'] = get_template_choices() return renderutils.render_response("export", infoDict, "export") def get_template_choices(): choices = [] for template in Template.objects.all(): choices.append((template.id, template.code)) #choices is now a list of tuples (id, display code) return choices JS: templateChoices = "{{template_choices}}"; baseGrid = new BaseGrid("export-grid", {'edit':true}); #set the other jqGrid attributes baseGrid.colNames = ['Code', 'Name', 'Status', 'Template'] baseGrid.colModel = [ {name:'code', index:'code', width:70 }, {name:'name', index:'name', width:120}, {name:'status', index:'status', width:50}, {name:'template', index:'template', width:100, editable:true, edittype:'select', editoption:{value: templateChoices} } ]
type: Question
tagged with: jqgrid
tagged with: javascript
has comment: http://stackoverflow.com/comment/40905794
score: 0
has comment: http://stackoverflow.com/comment/40905763
has title: JqGrid selector options 'undefined'

http://stackoverflow.com/comment/40958054
type: QuestionComment
score: 0
has text: The specification _"connect to any database the user wants to connect to"_ seems a bit too broad. I would suggest node.js. Have a look at the [drivers already available](http://nodejsdb.org/db-mysql/). For the HTML part any framework would do the job.
type: Comment
comment on: http://stackoverflow.com/q/26131264

http://stackoverflow.com/comment/41052958
comment on: http://stackoverflow.com/a/26182665
type: Comment
has text: do u know where are the passwords have saved in computer?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41003875
type: Comment
comment on: http://stackoverflow.com/q/26155876
has text: @DeDevelopers but how can u ensure it will trigger the same time with the earlier animate function?
score: 0
type: QuestionComment

http://stackoverflow.com/a/26176989
has body: try $( document ).ready(function() { $("input:button").click(function() { var values = ""; $("input:text").each(function(i) { var text=$(this).prev("label").text(); values+=text+" " ; values += (i &gt; 0 ? "\n" : "") + this.value; }); $("textarea").val(values); }); }); DEMO
answers question: http://stackoverflow.com/q/26176895
type: Answer
accepted answer of: http://stackoverflow.com/q/26176895
score: 1
upvote count: 1
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41042325

http://stackoverflow.com/q/26094084
upvote count: 32
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26094123
has body: I have a very strange issue. I have to set an active class on the appropriate when the $scope.selectedCat == cat.id. The list is generated with ng-repeat. If selectedCat is false, the 'Browse All Categories' list item (outside of ng-repeat) is set to active. setCat() sets the value of the $scope.selectedCat variable: Browse All Categories When the page loads, everything works fine (snapshot from FireBug): However when I set $scope.selectedClass to a cat.id value, the condition within ng-class gets evaluated correctly, but ng-class won't update the classes accordingly: Please note that in the first line active class stays set, while ng-class evaluates to false. In the last line active is not set, while ng-class evaluates to true. Any ideas why it doesn't work? What's the correct Angular way of doing this?
possible better answer: http://stackoverflow.com/a/26094164
has answer: http://stackoverflow.com/a/36300000
has answer: http://stackoverflow.com/a/26094123
favorite count: 0
tagged with: angularjs
answer count: 5
score: 32
has answer: http://stackoverflow.com/a/31692812
has title: ng-class condition changes, but not updating classes
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26094164
downvote count: 0
has answer: http://stackoverflow.com/a/57124460
tagged with: ng-class
type: Question

http://stackoverflow.com/a/26118436
has body: I think you should count checklists and tasks at submit time. Just ignore the names during "edit time" and set the names all in one block at the end, like this: http://jsfiddle.net/s3j7ok56/1/ This way if the user deletes, or moves (drag?) items, you just don't care as they will be named correctly at the end. ( example with remove: http://jsfiddle.net/s3j7ok56/2/ ) Note that I also set the val() of inputs for debug, to show the names. And I block the form submit for JsFiddle, all this should be removed to allow correct form posting. HTML: add checklist JS: $(function() { $("#addc").click(function(e) { var elem=$(' '); var link=$('Add task'); link.appendTo(elem); elem.appendTo("#all"); link.click(function(e1) { var task=$(' '); $(this).parent().children(".tasks").append(task); }); }); $("#todo").submit(function() { var countLists=0; var countTasks=0; $("#all>li.checklist>input").each(function() { $(this).attr("name","checklist["+countLists+"]"); $(this).val("checklist["+countLists+"]"); countTasks=0; $(this).parent().find("ul.tasks>li.task>input").each(function() { $(this).attr("name","checklist["+countLists+"]task["+countTasks+"]"); $(this).val("checklist["+countLists+"]task["+countTasks+"]"); countTasks++; }); countLists++; }) return true; }); });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26116975

mailto
tags question: http://stackoverflow.com/q/26059092
tag name: mailto
type: Tag
tags question: http://stackoverflow.com/q/26104378
tags question: http://stackoverflow.com/q/26167188

http://stackoverflow.com/q/26170810
answer count: 1
tagged with: javascript
tagged with: regex
accepted answer: http://stackoverflow.com/a/26170864
has title: javascript regexp does not allow my expression
has comment: http://stackoverflow.com/comment/41030952
type: AnsweredQuestion
type: Question
has body: I'm wanting to use javascript regexp to test if my string matches a regular expression. However, the regular expression that I'm trying to use causes my javascript to break. I understand that I can typically do the following: /e/.test("blah") but when I try to use my expression, my browser barfs: /(?&lt;=^| )\d+(\.\d+)?(?=$| )|(?&lt;=^| )\.\d+(?=$| )/.test("1.23") What am I missing?
score: 0
has answer: http://stackoverflow.com/a/26170864
has comment: http://stackoverflow.com/comment/41030970

http://stackoverflow.com/q/26095360
tagged with: iron-router
has body: I'm using iron-router's data function to provide data to my HTML template. snippet from router.js: data: function() { liveData = { dataA: Collection.findOne({queryA}), dataB: Collection.findOne({queryB}) }; return liveData; } Within my template, the liveData object is reactive. When the Collection changes, liveData changes - great! But my question: I have a javascript function called computation() within Template.name.rendered which uses the liveData object. It runs once on page load - great - but after the page is loaded, liveData is changing but the computation is not being re-run. How do I force computation() to re-run when iron-router's data source, liveData, changes?
accepted answer: http://stackoverflow.com/a/26098086
type: AnsweredQuestion
score: 3
upvote count: 3
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26098086
has title: Meteor: Tracker.autorun when Iron-Router Data Updates
downvote count: 0
answer count: 1
tagged with: meteor
favorite count: 0

http://stackoverflow.com/a/26056482
has body: try this. var mockdata = []; // for check whether startDayID exist //and temporary storage for data relative key(startDayID) var mockDataKeyMap ={}; for (var i = 0; i &lt; seriesData.length; i ++) { var item = seriesData[i]; var key = item.startDayID; var data = null; if(!mockDataKeyMap[key]){ // startDayID do not exist create new data = {}; // save for get after (below else sentence) mockDataKeyMap[key] = data; // push into mockdata.push(data); // set default info data.feederId = item.feederId; data.startDayID = item.startDayID; }else{ // if startDayID exist get data from map data= mockDataKeyMap[key]; } if (item.businessEventCode === 'LowVoltage') { data.servicePointEventLowCount = item.servicePointEventCount; } if (item.businessEventCode === 'HighVoltage') { data.servicePointEventHighCount = item.servicePointEventCount; } } it is very dangerous to use "i+=2" Your seriesData always do not have couple of data LowVoltage and HighVoltage. Then check all data i++ Then check only key is already exist or not
type: Answer
answers question: http://stackoverflow.com/q/26055945
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26055945
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40790492
type: AnswerComment
has text: No it's on a different form, does this target a specific form? and is there a way of doing it in Jquery?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26039799

http://stackoverflow.com/a/26037003
type: Answer
answers question: http://stackoverflow.com/q/26036888
has body: The return value of console.log is ALWAYS undefined. It prints to the console, but it doesn't actually return anything itself. var tmp = 5; console.log(tmp); // prints 5, returns undefined. tmp; // Returns 5 Also why are you printing out the result of a function that already prints out the information you want?
score: 0

http://stackoverflow.com/comment/41056785
comment on: http://stackoverflow.com/q/26184335
score: 0
type: QuestionComment
type: Comment
has text: @AvinashRaj my bad, just a mystake. I edited my question.

http://stackoverflow.com/a/26061850
score: 0
has body: Ok I worked something out: JSFIDDLE I compared $.(window).scrollTop() with the position of the footer: $('footer').position().top If the scrollTop value is bigger than the top-position of the footer I change the position value of the button to this: position: absolute And I change the top-value to the top-position of the footer.
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26060687
answers question: http://stackoverflow.com/q/26060687

http://stackoverflow.com/comment/41836616
score: 0
type: AnswerComment
type: Comment
has text: Oh, and using Angular Foundation and the default Foundation elements (dd, dl) together, results in a broken app (extra dl's being inserted by Angular Foundation).
comment on: http://stackoverflow.com/a/26612305

http://stackoverflow.com/q/26174308
answer count: 1
downvote count: 0
favorite count: 0
score: 47
tagged with: buffer
tagged with: stdin
tagged with: node.js
type: AnsweredQuestion
tagged with: stream
has answer: http://stackoverflow.com/a/26174849
type: Question
tagged with: javascript
has body: say I have process.stdin.setEncoding('utf8'); var myString = ''; What are the differences between process.stdin.on('readable', function() { myString += process.stdin.read(); }); and process.stdin.on('data', function(chunk) { myString += chunk; }); They give me the same myString if the input string is the same once stdin is end What are the best practices for each? Thanks
has title: What are the differences between readable and data event of process.stdin stream?
upvote count: 47
accepted answer: http://stackoverflow.com/a/26174849

http://stackoverflow.com/a/26124337
has body: Possibly something like this: $('#demo').fadeOut('slow').load("../user/index.php", function() { $(this).fadeIn('slow'); });
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26123698
accepted answer of: http://stackoverflow.com/q/26123698
type: AcceptedAnswer

http://stackoverflow.com/a/77823444
has comment: http://stackoverflow.com/comment/137220734
score: 1
has comment: http://stackoverflow.com/comment/137215056
has comment: http://stackoverflow.com/comment/137221052
has comment: http://stackoverflow.com/comment/137220255
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/137216127
type: Answer
has body: This question is almost 10yrs old so things have changed since it was asked. It was also asked without context on what it means to "inject functions". Do you want to inject single functions into an existing environment or do you want to run whole scripts or do you want to inject functions into scripts. In any case, you can run a script via in a worker via a blob const script = ` function doIt() { console.log('hello world'); } doIt(); `; const blob = new Blob([script], {type: 'application/javascript'}); const url = URL.createObjectURL(blob); const worker = new Worker(url); If you run the script above and check the JavaScript console you'll see it ran Another solution is to run a service worker. A service worker effectively intercepts network requests from the page and lets you apply JavaScript to them before they are sent to the network itself. So, effectively you can return your own strings from the service-worker in response to requests from the webpage or workers. You can put functions in those strings and you can provide the strings by sending them to the service-worker In pseudo-code // service-worker.js let injectString = ''; self.addEventListener('fetch', (event) => { event.respondWith(async function() { const url = new URL(event.request.url); if (url.pathname === 'inject-fn.js') const response = new Response(injectString, { headers: {'Content-Type': 'application/javascript'}, }); return response; } return await fetch(event.request); }()); } self.addEventListener('message', (event) => { injectString = event.data; }); This makes it so if the worker requests 'inject-fn.js' then it will receive the string stored in injectString, otherwise it will go the network as normal To set the string you post a message to the service-worker and the load the script const worker = navigator.serviceWorker?.controller || navigator.serviceWorker?.active; worker.postMessage(` function doIt() { console.log('hello world'); } `); new Worker('inject-fn.js'); you might need to append a…
answers question: http://stackoverflow.com/q/26068502
has comment: http://stackoverflow.com/comment/137197875
has comment: http://stackoverflow.com/comment/137221032

http://stackoverflow.com/a/26167947
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26167843
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26167843
type: AcceptedAnswer
has body: Unfortunately there is no way to do this with css only. You can either add the line break manually or write a javascript function to manage this.

http://stackoverflow.com/comment/41060340
has text: As an addendum I'd call `$(this).find('option:selected').val()` once and store the value before the comparison.
comment on: http://stackoverflow.com/a/26186561
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/a/26040932
type: Answer
has comment: http://stackoverflow.com/comment/40797259
has comment: http://stackoverflow.com/comment/40793049
has comment: http://stackoverflow.com/comment/40797222
answers question: http://stackoverflow.com/q/26040764
has body: You are concatenating with + + sign, that may be problem $('#rivit' + +haelisaanro).slideDown("slow", function () { // Animation complete. }); Thus it may be forming wrong id. Change to this: $('#rivit'+haelisaanro).slideDown("slow", function () { // Animation complete. });
has comment: http://stackoverflow.com/comment/40793055
score: 0

http://stackoverflow.com/comment/41044936
has text: You should take care of array structure when creating the array in javascript. It will be easy if category names would be keys.
comment on: http://stackoverflow.com/q/26178249
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41050804
comment on: http://stackoverflow.com/a/26178969
has text: @jevgenig, I found the solution! See my answer below.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26082737
tagged with: arrays
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26082827
has answer: http://stackoverflow.com/a/26082879
answer count: 4
has title: Javascript & jQuery push array to object based on custom attribute
has answer: http://stackoverflow.com/a/26082820
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26082773
type: Question
has body: Problem There are a couple of HTML tags with classes as follows ​Outdoors​ ​10001003​​ ​10001000​​ All the span needs to be iterated through and a new object would be created with the column-name attribute as its property and the relevant text passed into an array. Code So Far I am using the below code but the array passed consists of all the text from the span var searchCriteria = {}; var keyword = []; $('.keyword').each(function(index, elem) { col = $(elem).attr('column-name'); keyword.push($(elem).text()); searchCriteria[col] = (keyword); }); console.log(searchCriteria); The above code prepares the object as { Material Code: ['Outdoors', '10001003', '10001000'] Product Group: ['Outdoors', '10001003', '10001000'] } Result Expected The result of the object which I am expecting is { Material Code: ['10001003', '10001000'] Product Group: ['Outdoors'] } JS Fiddle Here is a JSFiddle of the same - http://jsfiddle.net/illuminatus/0g0uau4v/2/ Would appreciate any help!
has answer: http://stackoverflow.com/a/26082773
tagged with: object
has comment: http://stackoverflow.com/comment/40869463
has comment: http://stackoverflow.com/comment/40869414
accepted answer: http://stackoverflow.com/a/26082820
score: 0

http://stackoverflow.com/q/26119035
has comment: http://stackoverflow.com/comment/40937144
has body: I have AJAX call to retrieve some documents. This documents have large amount of attributes which are not needed for me. Is there a way to simply reduce properties of objects in array so I don't need to sen large JSON, but instead to send only properties which are indeed needed for me. I know that I can make it with for loop, but I'm asking if there is some built-in way of doing it? Something like: array.attributes('title','date'); (I know I can make utility like that and add method to an array, but still I am asking if there is already built-in way of doing this)
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40935574
type: Question
has comment: http://stackoverflow.com/comment/40934948
has title: How to reduce properties of object in javascript?
has comment: http://stackoverflow.com/comment/40934993
score: 0
has comment: http://stackoverflow.com/comment/40938066

http://stackoverflow.com/a/26152160
downvote count: 0
score: 2
upvote count: 2
type: Answer
has body: Use substring() to chop either the first two or first letters of a string and do a comparison var trackingNumber = "1Z9999999999999999" var ups = 'http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=' var usps = 'https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=' var fedEx = 'https://www.fedex.com/fedextrack/WTRK/index.html?action=track&trackingnumber=' if(trackingNumber.substring(0, 2) == '1Z') var link = ups + trackingNumber if(trackingNumber.substring(0, 1) == '9') var link = usps + trackingNumber if(trackingNumber.substring(0, 1) == '7') var link = fedEx + trackingNumber document.getElementById('tracking-link').href = link Tracking Link
answers question: http://stackoverflow.com/q/26152036

http://stackoverflow.com/comment/40978473
has text: You can put response in any number of div you want. What's the problem ?
comment on: http://stackoverflow.com/q/26142785
score: 1
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40898188
type: AnswerComment
comment on: http://stackoverflow.com/a/26098226
score: 0
type: Comment
has text: this is great - one issue with it, when clicked again - the divs do not collapse, and they need to

http://stackoverflow.com/comment/41822155
has text: It's probably not for commercial use but tested it and it definitely works! Good for a few hacks and personal projects. The official SDK is out now so let's hope the author updates this.
type: AnswerComment
comment on: http://stackoverflow.com/a/26551618
score: 0
type: Comment

http://stackoverflow.com/a/26127209
score: 0
type: AcceptedAnswer
has body: Here's working code. Click the button below to run it. $(function() { var friends = [{ "firstName": "Paul", "lastName": "Taylor", "Step": 2 }, { "firstName": "Sharon", "lastName": "Thomas", "Step": 3 }, { "firstName": "Thomas", "lastName": "Harris", "Step": 3 }, { "firstName": "Deborah", "lastName": "Lee", "Step": 4 }, { "firstName": "Mark", "lastName": "Young", "Step": 4 }, { "firstName": "Shirley", "lastName": "Perez", "Step": 4 }, { "firstName": "Joseph", "lastName": "Lee", "Step": 5 }, { "firstName": "Mary", "lastName": "White", "Step": 5 }, { "firstName": "Matthew", "lastName": "Garcia", "Step": 5 }, { "firstName": "Patricia", "lastName": "Allen", "Step": 5 }, { "firstName": "Larry", "lastName": "Robinson", "Step": 6 }, { "firstName": "Kimberly", "lastName": "Lopez", "Step": 6 }, { "firstName": "Jose", "lastName": "Martinez", "Step": 6 }, { "firstName": "Deborah", "lastName": "Walker", "Step": 6 }, { "firstName": "Joseph", "lastName": "Lopez", "Step": 6 }, { "firstName": "Dorothy", "lastName": "Moore", "Step": 7 }, { "firstName": "Jose", "lastName": "Jackson", "Step": 7 }, { "firstName": "Karen", "lastName": "Lee", "Step": 7 }, { "firstName": "Paul", "lastName": "Taylor", "Step": 7 }, { "firstName": "Amy", "lastName": "Gonzalez", "Step": 7 }, { "firstName": "Richard", "lastName": "Martinez", "Step": 7 }]; function findFriends(step) { var urlString = 'assets/javascripts/steps.json'; // commenting out the ajax lines for the purposes of this demo. for now we'll use the global friends variable declared above // $.getJSON(urlString, function(data) { // var friends = data.friends; var results = ''; var numFound = 0; $.each(friends, function(key, value) { if (value.Step == step) { numFound++; console.log (numFound); if (numFound <= 2) { results += value.firstName + ' ' + value.lastName + ' '; } }; }); if (numFound > 2) { results += 'and ' + (numFound - 2) + ' other friend' + (numFound == 3 ? '' : 's'); } $('#results').html(results); //}); } $('#find-friends').click(fu…
type: Answer
answers question: http://stackoverflow.com/q/26126765
accepted answer of: http://stackoverflow.com/q/26126765
has comment: http://stackoverflow.com/comment/40966198

http://stackoverflow.com/a/26178972
type: Answer
has comment: http://stackoverflow.com/comment/41045581
has comment: http://stackoverflow.com/comment/41046017
upvote count: 2
has body: I actually did this on my current project, to save 8kb of bandwidth for every pageload (and given that it's a game where there are millions of pageloads daily, that adds up REAL fast!) Basically, take all your unchanging HTML and dump it into a JavaScript file's string. Then you can just have &lt;div id="header"&gt;&lt;/div&gt; in your HTML, and do document.getElementById('header').innerHTML = "massive string of HTML here"; This means it's only downloaded once, when the JS file is, and then reused from cache every time after. You can even go more clever by having data-* attributes on the #header element to define some variable content. Hope this helps!
score: 2
answers question: http://stackoverflow.com/q/26178915
has comment: http://stackoverflow.com/comment/41045570
downvote count: 0
has comment: http://stackoverflow.com/comment/41046175
has comment: http://stackoverflow.com/comment/41046044

http://stackoverflow.com/a/26120790
downvote count: 0
has comment: http://stackoverflow.com/comment/40940601
accepted answer of: http://stackoverflow.com/q/26120680
answers question: http://stackoverflow.com/q/26120680
has comment: http://stackoverflow.com/comment/40940683
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40938503
type: Answer
has body: You put in the filename without quotes. Javascript then doesn't know it is a string containing the filename, it thinks it's an object instance called filename with a property php. ajax.open("POST", "filename.php" ,true); Don't mix PHP and JS this way,... they are totally different languages, serverside, clientside,. Build your Javascript a way so it works without PHP. Let then PHP inject some configuration using: &lt;script&gt; var config = &lt;?php json_encode($phpToJs); ?&gt;; &lt;/script&gt;
score: 2

http://stackoverflow.com/comment/40802939
comment on: http://stackoverflow.com/q/26046398
type: Comment
type: QuestionComment
has text: @AbdullaChozhimadathil what console? I don't have any 'console' to check the error. So far as I see, the codes are fine. Can you tell me the error?
score: 0

http://stackoverflow.com/q/26136261
linked to: http://stackoverflow.com/q/16456558
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26138449
tagged with: css
has comment: http://stackoverflow.com/comment/40966385
has comment: http://stackoverflow.com/comment/40966542
upvote count: 1
downvote count: 1
has title: Value from one html file to another html file
type: Question
has comment: http://stackoverflow.com/comment/40966447
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26136426
has comment: http://stackoverflow.com/comment/40966625
favorite count: 0
has body: I have some (xyz)html files in my local system which is having some integer value in it. I have created one(abc) html file having main summary of those files. I want to show that integer value in my html file. How can i parse through xyz html files and store into my abc html file? Files Errors 225 2294 This is a content i have in my xyz html files.. and i need values 225 and 2294 to be extracted from here.

http://stackoverflow.com/comment/53245676
score: 0
has text: I just ran into this same problem. Thanks for the fix!
type: Comment
comment on: http://stackoverflow.com/a/27581124
type: AnswerComment

http://stackoverflow.com/a/26115800
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40958672
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26115227
type: Answer
answers question: http://stackoverflow.com/q/26115227
has body: $ Will throw a Reference Error if jQuery is not defined before (i.e. if jquery.min.js is not imported before $ is evaluated). So you have to first add a See jsbin

http://stackoverflow.com/a/26152379
upvote count: 1
has comment: http://stackoverflow.com/comment/40997921
type: Answer
has comment: http://stackoverflow.com/comment/40997243
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26152331
has body: file: 'http://dnswebsite.tld/appz?UserSign="' + auth + '"/playpath' Is this what you're looking for ? I'm confused by the simplicity of this... I must have missed something. EDIT: This is the snippet you gave me in your comment: $.ajax({ url: your_url, type: 'GET', success: function (res) { var text = res.responseText; var auth = text.match("BEGIN(.*)/END"); } }); mplayer("content").setup({playlist: [{sources: [{file: 'http://dnswebsite.tld/appz?UserSign="I WANT MY auth VAR HERE"/playpath'}]}]}); Your problem is that your variable auth is stucked inside the scope of your success callback function. This should solve the problem: var auth; $.ajax({ url: your_url, type: 'GET', success: function (res) { var text = res.responseText; auth = text.match("BEGIN(.*)/END"); } }); mplayer("content").setup({playlist: [{sources: [{file: 'http://dnswebsite.tld/appz?UserSign="' + auth + '"/playpath'}]}]});

http://stackoverflow.com/q/26090875
tagged with: canvas
has body: EDIT: This bug was fixed in version 38. A recent version of Chrome introduced an issue in an application I maintain. I'm not sure if this is one of those weird "seems wrong but is actually correct" issues or if it's an honest-to-god bug, but it only presents in recent versions of Chrome (it started happening about a month ago, I'm not sure exactly which version introduced it) The bug presents when using the context fill() method on certain paths that are drawn using the context arc() method. Rather than drawing a filled arc, what is filled is an oddly-shaped polygon. Here's a demonstration of what I mean -- the shape in the upper right should be a filled arc: var ctx = document.getElementById('cvs').getContext('2d'); // draw stroked arc ctx.beginPath(); ctx.arc(75, 75, 50, 0, Math.PI/2); ctx.lineTo(125, 125); ctx.closePath(); ctx.stroke(); // draw filled arc ctx.beginPath(); ctx.arc(225, 75, 50, 0, Math.PI/2); ctx.lineTo(275, 125); ctx.closePath(); ctx.fill(); // draw stroked triangle ctx.beginPath(); ctx.moveTo(125, 225); ctx.lineTo(75, 275); ctx.lineTo(125, 275); ctx.closePath(); ctx.stroke(); // draw filled triangle ctx.beginPath(); ctx.moveTo(275, 225); ctx.lineTo(225, 275); ctx.lineTo(275, 275); ctx.closePath(); ctx.fill(); &lt;div&gt;&lt;canvas id="cvs" width="300" height="300" style="border: solid black 1px"&gt;&lt;/canvas&gt;&lt;/div&gt; My question is this: is there a workaround for this issue? Preferably one that doesn't require me to write my own filled-arc renderer.
has answer: http://stackoverflow.com/a/26091265
answer count: 1
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40884941
accepted answer: http://stackoverflow.com/a/26091265
has comment: http://stackoverflow.com/comment/40884452
tagged with: google-chrome
type: Question
type: AnsweredQuestion
has title: Workaround for Chrome arc path fill bug?
has comment: http://stackoverflow.com/comment/40884654

http://stackoverflow.com/a/26151697
has comment: http://stackoverflow.com/comment/40996524
has comment: http://stackoverflow.com/comment/41026249
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/40996046
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26151540
has comment: http://stackoverflow.com/comment/41026189
has comment: http://stackoverflow.com/comment/41029416
has body: To use the $n, newly-created &lt;div&gt;, given the clarifications in the comments to your question, and insert that element before the #google_map_vc_box element: $n.insertBefore('#google_map_vc_box'); JS Fiddle demo. Or: $('#google_map_vc_box').before($n); JS Fiddle demo. And, with plain JavaScript, it's not hard: var $n = document.createElement('div'); $n.id = 'new'; // remember to quote this value, unless it's a variable var googleBox = document.getElementById('google_map_vc_box'); googleBox.parentNode.insertBefore($n, googleBox); JS Fiddle demo. Or even: var googleBox = document.getElementById('google_map_vc_box'); googleBox.insertAdjacentHTML('beforebegin', '&lt;div id="new"&gt;&lt;/div&gt;'); JS Fiddle demo. References: JavaScript: Node.insertAdjacentHTML(). Node.insertBefore(). jQuery: before(). insertBefore().
answers question: http://stackoverflow.com/q/26151540
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41026278

http://stackoverflow.com/q/26056449
has answer: http://stackoverflow.com/a/26056712
tagged with: css
has title: Preventing re-paint in Google Chrome via CSS/JS/etc
tagged with: google-chrome
type: Question
score: 0
answer count: 1
tagged with: javascript
type: UnansweredQuestion
tagged with: google-chrome-extension
has body: Is it possible to cause Google Chrome to prevent painting... as in, to keep the page exactly the same, no animations or content changes. The reason I ask is because I have created an extension for people who find it difficult to read webpages when things are animating/flashing/changing/etc. It currently works by taking a screenshot and layering it over the page (position absolute, with a high value z-index). But because captureVisibleTab cannot capture the whole page (issue 45209), the screenshot needs to be re-created every time the user scrolls the page. However the change in iOS 8 Safari to not pause printing while scrolling got me thinking there may be another way around this by trying to emulate the pre iOS 8 behaviour (something I preferred, as Reader View does not always work, or stop animated gifs).

http://stackoverflow.com/q/26177664
favorite count: 0
has body: I'm trying to create an equation parser in javascript, so I'm using regex to break the equation into its individual parts. Here is the regex that I am using at the moment: var equation_string = '!#$123+456'; var operator = '(!|=|&lt;|&gt;)=|[=&lt;&gt;()^\\/*+-]'; var number = '(\\d+\\.?\\d*|\\.\\d+)([eE][-+]?\\d+)?'; var variable = '[A-Za-z](_?[A-Za-z0-9]+)*'; var separator = ','; var other = '\\S+'; var whitespace = '\\s+'; var pattern = new RegExp(number+'|'+operator+'|'+variable+'|'+separator+'|'+other+'|'+whitespace, 'g'); var equation_parts = equation_string.match(pattern); I want to keep all parts of the equation (for tracking where I need to highlight in the equation if it is malformed). But it runs into a problem if the user was to enter say '!#$123+456', which due to the '\S+' gives me a single part '!#$123+456', when it should be '!#$','123','+','456'. I could set other to '\S', but this would be '!','#','$','123','+','456', but I would prefer to keep all the "other" type patterns together. What's the best way of keeping the "other" type patterns together? Or is there a way for me to drop the "other" pattern and have the regex return both the matched patterns and all the text between them?
has answer: http://stackoverflow.com/a/26178348
has comment: http://stackoverflow.com/comment/41043520
has comment: http://stackoverflow.com/comment/41044345
upvote count: 1
accepted answer: http://stackoverflow.com/a/26178348
type: Question
has comment: http://stackoverflow.com/comment/41044062
type: AnsweredQuestion
score: 1
tagged with: regex-greedy
answer count: 1
downvote count: 0
tagged with: javascript
has title: Keep both the regex matches and the text between them
tagged with: regex

http://stackoverflow.com/comment/40981380
comment on: http://stackoverflow.com/q/26144302
has text: Have you tried it with the alert and the innerHTML write?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26123408
type: UnansweredQuestion
has body: So that if i change a div with : Datum: This is a dummy text Replace it! Is it possible to change it on the server right away instead of your local browser? So not get reset with F5 Reload? And without using cookies?
tagged with: php
has comment: http://stackoverflow.com/comment/41333567
has comment: http://stackoverflow.com/comment/40943059
has comment: http://stackoverflow.com/comment/40943184
type: Question
has title: Is there way to use javascript to sychronize the server file with yours?
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40943979
answer count: 0

http://stackoverflow.com/q/26188924
answer count: 2
tagged with: javascript
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/7356181
tagged with: jquery
has title: FB.ui dialog not showing after loading jquery ajax
tagged with: ajax
has answer: http://stackoverflow.com/a/35722501
type: Question
tagged with: facebook
has body: here is the script window.fbAsyncInit = function() { FB.init({ appId : 'xxxxxx', xfbml : true, version : 'v2.1' }); $.ajax({ url: 'save.php', dataType: 'JSON', method: 'POST', data: {image_data: img_src, save2server: 'y'}, success: function(response){ FB.ui({ method: 'feed', link: response.url, }, function(r){ }); } }); } the ajax request is succesfully, and i hande it, but the dialog doesn't show up..any clue?
has answer: http://stackoverflow.com/a/26191769
score: 0

http://stackoverflow.com/q/26113629
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: I try to display text come with typing text effect.i tried like this It's work but i need display Paragraph content like this but now to call Paragraph content in writeText. If it's not good way to display Pragraph like typing effect. Please tell me how to solved my problem .Please give me any idea. Thanks in Advanced.
has answer: http://stackoverflow.com/a/26114041
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40925238
score: 1
possible better answer: http://stackoverflow.com/a/26113976
has title: how to Paragraph text come display like text typing effect
has answer: http://stackoverflow.com/a/26113976
answer count: 2
accepted answer: http://stackoverflow.com/a/26114041
has comment: http://stackoverflow.com/comment/92193874
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26193727
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26193717
downvote count: 0
score: 4
accepted answer of: http://stackoverflow.com/q/26193717
type: Answer
has body: You need to access the first index of the array console.log(data[0].UserID);
upvote count: 4

http://stackoverflow.com/q/26165417
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41021287
upvote count: 1
accepted answer: http://stackoverflow.com/a/26165567
has comment: http://stackoverflow.com/comment/41021000
type: AnsweredQuestion
has body: I am able to populate paragraph using script below, but how can I populate input field value using this script? Any idea? $(function check(){ $(document).ready(function() { $('#forma').submit(function(e){ e.preventDefault(); $('.qty').each(function(){ if($(this).val() != '0') { $('#output').text($('#output').text()+ ' ' + $(this).attr('name') + ' ' + $(this).val()+ ';' ); } }); }); }); });
score: 1
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Populate value of input field with javascript
has comment: http://stackoverflow.com/comment/41021212
has answer: http://stackoverflow.com/a/26165567
has comment: http://stackoverflow.com/comment/41021382

http://stackoverflow.com/comment/41023926
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26166846
has text: Removing the class is actually a bit harder, but do-able. Do you need to support older browsers like ie8 or 9? Also, will the spans have other classes on it?

http://stackoverflow.com/q/26053469
has answer: http://stackoverflow.com/a/26055191
has comment: http://stackoverflow.com/comment/40815461
has comment: http://stackoverflow.com/comment/40817286
has title: how to get the good performance in the big dom with jquery?
has comment: http://stackoverflow.com/comment/40815456
tagged with: conways-game-of-life
has comment: http://stackoverflow.com/comment/40815604
has comment: http://stackoverflow.com/comment/40815451
has answer: http://stackoverflow.com/a/26055777
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40816365
has body: I wrote a little program in Javascript with jquery. var mlife = function (i, j, alive) { var face = '&lt;div class="life" id="l_' + i + '_' + j + '"/&gt;'; var f = $(face); var ps = new Array(); //var interval; this.draw=function() { if (alive) { f.addClass('l'); } else { f.removeClass('l'); } }; this.aliveCheck=function() { var alivecount = 0; for (var i = 0; i &lt; ps.length; i++) { var el = $('#l_' + ps[i]); if (el.length &gt; 0) { if (el.hasClass('l')) { alivecount++; } } } if (alive) { if (alivecount &lt; 2) { alive = false; } else if (alivecount == 2 || alivecount == 3) { alive = alive; } else if (alivecount &gt; 3) { alive = false; } } else { if (alivecount == 3) { alive = true; } } //_draw(); }; this.getface = function () { return f; }; function _init() { ps.push((i - 1) + '_' + (j - 1)); ps.push((i - 1) + '_' + (j + 1)); ps.push((i + 1) + '_' + (j - 1)); ps.push((i + 1) + '_' + (j + 1)); ps.push(i + '_' + (j - 1)); ps.push(i + '_' + (j + 1)); ps.push((i + 1) + '_' + j); ps.push((i - 1) + '_' + j); if (alive) { f.addClass('l'); } }; _init(); } $(function () { var html = ""; var alive = false; var cells = new Array(); for (var i = 0; i &lt; 100; i++) { for (var j = 0; j &lt; 100; j++) { if (Math.random() &gt; 0.90) { alive = true; } else { alive = false; } var l = new mlife(i, j, alive); cells.push(l); $('#show').append(l.getface()); } } setInterval(allAliveCheck,1000); function allAliveCheck(){ for(var i=0;i&lt;cells.length;i++){ cells[i].aliveCheck(); } for(var i=0;i&lt;cells.length;i++){ cells[i].draw(); } } }); http://jsfiddle.net/chanjianyi/upgvzm78/1/ it's about the "game of life": http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life but I found it's very bad performance that control a lot of div. So anybody have ideas to optimize my program?
score: 0
has comment: http://stackoverflow.com/comment/40816740
has comment: http://stackoverflow.com/comment/40815789
has comment: http://stackoverflow.com/comment/40815415
has comment: http://stackoverflow.com/comment/40815836
type: UnansweredQuestion

ionic-framework
tags question: http://stackoverflow.com/q/26129944
tags question: http://stackoverflow.com/q/26122246
type: Tag
tags question: http://stackoverflow.com/q/26145910
tags question: http://stackoverflow.com/q/26167671
tags question: http://stackoverflow.com/q/26153060
tags question: http://stackoverflow.com/q/26133569
tags question: http://stackoverflow.com/q/26141026
tags question: http://stackoverflow.com/q/26057201
tags question: http://stackoverflow.com/q/26035294
tags question: http://stackoverflow.com/q/26156166
tags question: http://stackoverflow.com/q/26036142
tags question: http://stackoverflow.com/q/26179180
tags question: http://stackoverflow.com/q/26072737
tags question: http://stackoverflow.com/q/26151915
tag name: ionic-framework
tags question: http://stackoverflow.com/q/26152219

http://stackoverflow.com/comment/40920338
type: QuestionComment
comment on: http://stackoverflow.com/q/26110605
type: Comment
has text: Glad you figured it ou
score: 0

http://stackoverflow.com/comment/40833441
has text: Tips: use `disabled="{{loading}}"` instead of `{{disabled}}`.
score: 0
comment on: http://stackoverflow.com/a/26062265
type: Comment
type: AnswerComment

last-modified
type: Tag
tag name: last-modified
tags question: http://stackoverflow.com/q/26119656

http://stackoverflow.com/comment/41059796
comment on: http://stackoverflow.com/q/26184434
score: 0
type: Comment
type: QuestionComment
has text: Basically your regex is this `[^.!?\s][^.!?]*(?=\s|$)` It finds a letter, then matches all the way to the end of the string `$` if there is no `[.!?]` in the way.

http://stackoverflow.com/comment/40874248
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26085181
has text: No errors in the log. the alert in function(tx, results) isn't executed ! even errorCB wont hit
type: Comment

http://stackoverflow.com/comment/40883107
score: 1
has text: You know that you cannot have HTML comments ` ` inside JS ? In JS you do it like: `// Comment...` or like: `/* Comment... */`
comment on: http://stackoverflow.com/q/26090106
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26132684
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42953123
possible better answer: http://stackoverflow.com/a/26132842
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27263262
score: 1
upvote count: 1
has body: I am implementing a webpage that simply has a video player that needs to play the stream of the users selected screen. So far I have implemented the chrome extension to run a Listener on the background.js file. Then on the webpage.js I send a message to the chrome extension in which the extension then runs the chooseDestopMedia method and allows the user to select which screen to share. The background.js then returns the corresponding ID to webpage.js via the callback method. The ID is received properly on webpage.js, but once the webpage.js runs the gotStream method it throws an error. So far some reason there is a problem receiving the video stream and I am not sure why. The error that is printed on the console is "NavigatorUserMediaError". I have attached the code below... manifest.json { "name": "Class Mate Manifest", "description": "Extension that allows for user to share their screen", "version": "1", "manifest_version": 2, "externally_connectable": { "matches": [ "https://localhost/PresenterPage/presenterpage.html" ] }, "background": { "scripts": ["background.js"] }, "permissions": [ "desktopCapture", "tabs", "https://localhost/PresenterPage/presenterpage.html" ], "browser_action": { "default_icon": "icon.png", "default_popup": "index.html" } } webpage.js function gotStream(stream) { console.log("Received local stream"); var video = document.querySelector("video"); video.src = URL.createObjectURL(stream); localstream = stream; stream.onended = function() { console.log("Ended"); }; } function getUserMediaError(err) { console.log("getUserMedia() failed." + err); } function onAccessApproved(id) { if (!id) { console.log("Access rejected."); return; } navigator.webkitGetUserMedia({ audio:false, video: { mandatory: { chromeMediaSource: 'desktop', chromeMediaSourceId: id } } }, gotStream, getUserMediaError); } var editorExtensionId = "phdabcobbnbidjflhchajebbldjblmjf"; chrome.runtime.sendMessage(editorExtensionId, {openUrlInEditor: "yes"},onAccessApproved); backgrou…
tagged with: google-chrome
type: Question
tagged with: video-streaming
tagged with: javascript
has title: Webpage accessing Chrome Extension and using desktopCature
answer count: 2
tagged with: google-chrome-extension
downvote count: 0
has answer: http://stackoverflow.com/a/27263262
favorite count: 0
has answer: http://stackoverflow.com/a/26132842

http://stackoverflow.com/q/26067284
has answer: http://stackoverflow.com/a/26067480
has answer: http://stackoverflow.com/a/26067343
has comment: http://stackoverflow.com/comment/40841390
has answer: http://stackoverflow.com/a/26068002
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40841355
has answer: http://stackoverflow.com/a/26067344
answer count: 5
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40841351
tagged with: css
upvote count: 3
has title: Display div while parent is display None
has body: I have div that is like this I need to how to make the div displayMe show while keeping the parent Div hidden
type: Question
score: 3
has comment: http://stackoverflow.com/comment/40841363
has answer: http://stackoverflow.com/a/26067333
tagged with: javascript

http://stackoverflow.com/comment/40937144
score: 0
type: QuestionComment
type: Comment
has text: Once again, that's exactly what I was saying. I'm trying to reduce it before it comes to the client side so the data needed to be sent is minimised.
comment on: http://stackoverflow.com/q/26119035

http://stackoverflow.com/a/26058441
type: Answer
answers question: http://stackoverflow.com/q/26058084
has comment: http://stackoverflow.com/comment/40824710
has body: You can create a javascript file that search for an element and change the innerHTML of the element to the slideshow you want to show. For example this could be the script: var slideshow = document.getElementById('slideshow'); slideshow.innerHTML = 'Your slideshow html'; and your main html page should have a slideshow div. but you need to know that it's not the best solution, you should learn PHP or another back-end language and than you could use include('page.html'); for example
has comment: http://stackoverflow.com/comment/40824300
has comment: http://stackoverflow.com/comment/40824512
score: 0
has comment: http://stackoverflow.com/comment/40824387

scope
tags question: http://stackoverflow.com/q/26053215
tags question: http://stackoverflow.com/q/26148500
tags question: http://stackoverflow.com/q/26090272
tags question: http://stackoverflow.com/q/26174520
tags question: http://stackoverflow.com/q/26064605
tag name: scope
tags question: http://stackoverflow.com/q/26185399
tags question: http://stackoverflow.com/q/26174053
tags question: http://stackoverflow.com/q/26105543
tags question: http://stackoverflow.com/q/26079353
type: Tag
tags question: http://stackoverflow.com/q/26087902

http://stackoverflow.com/comment/41028926
score: 0
type: Comment
type: QuestionComment
has text: @FelixKling method 3 appears to be equivalent to method 4, both returns NaN
comment on: http://stackoverflow.com/q/26169471

http://stackoverflow.com/comment/41022498
score: 0
comment on: http://stackoverflow.com/a/26166081
type: AnswerComment
has text: How exactly would I use this to run the .js file "Problem4.js" inside the node.js server?
type: Comment

http://stackoverflow.com/q/26134186
tagged with: appcelerator
type: UnansweredQuestion
tagged with: android
has comment: http://stackoverflow.com/comment/40963754
tagged with: titanium
has comment: http://stackoverflow.com/comment/40981072
has body: I am having problem in android, where I have a label had have custom fonts applied. On a button click I am actually changing the font, the text, the color and also the font size. If the text is large, it just goes out of the screen. I want to to stay in the bounds of the screen and auto adjust it. I dont mind it coming to the next line. Here is my label code: var label = Ti.UI.createLabel({ center : 0, textAlign : "center", wordWrap : true, }); $.boostMePage.add(label); I am also doing a bit of 2D matrix animation, where I rotate the label to a particular angle. For it to stay in the center i have added the following: var matrix = Ti.UI.create2DMatrix(); matrix = matrix.rotate(angle); // matrix = matrix.scale(2, 2); // I tried scaling it, but then font was truing blurred. :( label.font = { fontSize : "55", fontFamily : elementFont // This is my custom font }; matrix = matrix.translate(0, 0); // This I have applied so that the font stays in the center of the screen. I am not quite sure if this is correct. var a = Ti.UI.createAnimation({ transform : matrix, duration : 300, autoreverse : false, repeat : 1 }); label.animate(a); It is going out of the screen. Here is the link for the screenshot : Screenshot Please help. Thanks!
answer count: 0
type: Question
tagged with: javascript
has title: Label going out of screen bounds in Android, Titanium
score: 0

http://stackoverflow.com/a/26139934
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26139854
has body: The tag is a for example (a link &lt;a href=""&gt;&lt;/a&gt;), if the links are anchors you could use getElementsByTagName('a')

http://stackoverflow.com/q/26098797
has comment: http://stackoverflow.com/comment/40898601
has comment: http://stackoverflow.com/comment/40898540
has comment: http://stackoverflow.com/comment/40898621
has answer: http://stackoverflow.com/a/26099890
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/40898524
tagged with: algorithm
tagged with: arrays
downvote count: 0
tagged with: javascript
has body: I am working on following example Given: 2 sorted arrays of integers(e.g. A = [1,2,3,4,5], B = [6, 7, 8, 9, 10]) and answer(e.g 13) Find: What I have to do is to find pair of indices(1 in each array) of those two elements in both arrays so when I add them then it should be equal to the given answer. I used following 2 solutions. But the problem with both of them is that I am looping through both arrays. First I loop through first array and inside this I loop through second array. And add elements on those two indices to see if its addition is equal to answer. It works fine and outputs correct answer. The problem is performance. If we have 10,000 integers in both arrays then these loops will take a lot of resources such as time, CPU and memory to be executed and get answer. How can I solve above particular problem in more efficient way? function find (A1, A2, ans) { var a = []; for (var i = 0, len1 = A1.length; i &lt; len1; i++) { for (var j = 0, len2 = A2.length; j &lt; len2; j++) { if (ans === A1[i] + A2[j]) { a.push(i + ', ' + j); } } } return a; } second function search (A, B, ans) { var arr = []; A.map(function (v, i) { B.filter(function (val, ind) { if (ans === v + val) arr.push(i + ', ' +ind); }); }); return arr; }
tagged with: jquery
score: 4
has answer: http://stackoverflow.com/a/26098974
has answer: http://stackoverflow.com/a/26098892
answer count: 3
has title: Solve an issue using algorithm using javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40898593
type: UnansweredQuestion

http://stackoverflow.com/q/26111970
answer count: 1
has body: I have the following HTML &lt;img id="preview1" crossorigin="anonymous" src="http://www.gravatar.com/avatar/0e39d18b89822d1d9871e0d1bc839d06?s=128&amp;d=identicon&amp;r=PG"&gt; JS var img = document.getElementById("preview1"); var canvas = document.createElement("canvas"); canvas.width = img.width; canvas.height = img.width; var ctx = canvas.getContext("2d"); ctx.drawImage(img, 0, 0); var dataURL = canvas.toDataURL("image/png"); var result = dataURL.replace(/^data:image\/(png|jpg);base64,/, ""); console.log(result) For some reason, when I paste the result (base64) in an img src it shows nothing. Also when I paste the result (base64) as a url, it shows nothing. When I use use input="file" and use FileReader() to get the file. it works fine. Is it a better way to grab a remote file and convert to a working base64?
has answer: http://stackoverflow.com/a/26112148
has title: Javascript - Is it possible to base64 a remote image?
linked to: http://stackoverflow.com/q/934012
type: UnansweredQuestion
type: Question
tagged with: javascript
tagged with: base64
score: 0

redis
tags question: http://stackoverflow.com/q/26130465
type: Tag
tag name: redis

kendo-datasource
tags question: http://stackoverflow.com/q/26170816
tag name: kendo-datasource
type: Tag

http://stackoverflow.com/comment/40796567
type: Comment
comment on: http://stackoverflow.com/q/26043089
has text: that.getByDataSelected() ?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/48147225
type: Comment
has text: @Domi check out q-connection and RxJS.
comment on: http://stackoverflow.com/a/26150465
score: 1
type: AnswerComment

http://stackoverflow.com/q/26194238
has answer: http://stackoverflow.com/a/38829453
upvote count: 2
has answer: http://stackoverflow.com/a/26194327
has comment: http://stackoverflow.com/comment/41073987
score: 2
type: AnsweredQuestion
has body: The problem is, I have worked on the script jquery.min.js version 1.4. After had to upgrade to version 1.9.1, and there was a problem. Uncaught TypeError: Can not read property 'substr' of undefined. Tell me what to do. This part of the code in which the error occurred. var processCaption = function(settings){ var nivoCaption = $('.nivo-caption', slider); if(vars.currentImage.attr('title') != ''){ var title = vars.currentImage.attr('title'); if(title.substr(0, 1) == '#') title = $(title).html(); if(nivoCaption.css('display') == 'block'){ nivoCaption.find('p').fadeOut(settings.animSpeed, function(){ $(this).html(title); $(this).fadeIn(settings.animSpeed); }); } else { nivoCaption.find('p').html(title); } nivoCaption.fadeIn(settings.animSpeed); } else { nivoCaption.fadeOut(settings.animSpeed); } }
tagged with: substr
has title: Uncaught TypeError: Cannot read property 'substr' of undefined
type: Question
accepted answer: http://stackoverflow.com/a/26194327
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/38829453

http://stackoverflow.com/comment/41044679
type: QuestionComment
comment on: http://stackoverflow.com/q/26177731
has text: Yup, I can see the info from chrome console, not firefox. In order to see the parsed html in chrome, I have to wrap the console part in a $timeout, ie $timeout(function(){ console.info(clonedElement); console.info(clonedElement[0].innerHTML); }, 2000);
score: 1
type: Comment

http://stackoverflow.com/q/26125111
type: UnansweredQuestion
has title: Trying to load an ASP textbox with HTML5 input type=Date element
has comment: http://stackoverflow.com/comment/41044225
type: Question
tagged with: c#
has body: I'm trying to use the new HTML5 input type=date to load and asp:textbox with the date value. I either get nothing (empty label) back or I get (System.Web.UI.WebControls.TextBox). I'm trying just to use the HTML5 date input type. Don't know if the problem is in my javascript or where. The user will: 1. select they're birthdate via the html5 datepicker. 2. The user clicks the submit button 3. at which time the datepicker has lost focus 4. The javascript function "onblur" should kick in 5. The asp:textbox "tbDOB" should get loaded with the date 6. That date gets' sent back back to server. 7. At that point for verification purposes the date should update the lblDateReturn label. Thanks Suge &lt;div id="dpDOB"&gt; &lt;asp:TextBox ID="tbDOB" runat="server"&gt;&lt;/asp:TextBox&gt;&lt;br /&gt; &lt;input type="date" id="dpDatePicker" onblur="blurFunction()" required /&gt;&lt;br /&gt; &lt;asp:Button ID="btnDOB" runat="server" Text="Submit" OnClick="btnDOB_Click()" /&gt;&lt;br/&gt; &lt;asp:Label ID="lblDateReturn" runat="server" Text=""&gt;&lt;/asp:Label&gt; &lt;/div&gt; function blurFunction() { var dateofBirth = document.getElementById("tbDOB"); //asp.net textbox var datepicker = document.getElementById("dbDatePicker"); dateofBirth.value = datepicker.value; // Trying to load the asp.net textbox with the date alert("Date Picker lost focus"); } protected void btnDOB_Click(object sender, EventArgs e) { //lblDateReturn.Text = tbDOB.Text; blank lable lblDateReturn.Text = tbDOB.ToString(); //I get back: System.Web.UI.WebControls.TextBox }
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26196628
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41043391
has answer: http://stackoverflow.com/a/26157768
tagged with: asp.net

http://stackoverflow.com/q/26144794
has body: I am looking to hide the Approve/Reject Buttons in the Details Page of a Fiori App based on certain filter conditions. The filters are added in the Master List view (Left hand side view) thru the view/controller extension. Now, if the user selects certain type of filter ( Lets say, Past Orders) - then the approve/reject button should not be displayed in the Order Details Page. This is how I have defined the buttons in the Header/Details view this.oHeaderFooterOptions = { oPositiveAction: { sI18nBtnTxt: that.resourceBundle.getText("XBUT_APPROVE"), id :"btn_approve", onBtnPressed: jQuery.proxy(that.handleApprove, that) }, oNegativeAction: { sI18nBtnTxt: that.resourceBundle.getText("XBUT_REJECT"), id :"btn_reject", onBtnPressed: jQuery.proxy(that.handleReject, that) }, However at runtime, these buttons are not assigned the IDs I mentioned, instead they are created with IDs of __button0 and __button1. Is there a way to hide these buttons from the Master List View? Thank you.
has title: Hide Approve/Reject Buttons in Fiori Master Details Page
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26218439
tagged with: sapui5
type: Question
has answer: http://stackoverflow.com/a/30153650
has answer: http://stackoverflow.com/a/26252367
tagged with: javascript
score: 0
answer count: 3
tagged with: sap-fiori

google-apps-script
tags question: http://stackoverflow.com/q/26168714
tags question: http://stackoverflow.com/q/26172459
tags question: http://stackoverflow.com/q/26101967
tags question: http://stackoverflow.com/q/26081968
type: Tag
tag name: google-apps-script
tags question: http://stackoverflow.com/q/26136616
tags question: http://stackoverflow.com/q/26188650
tags question: http://stackoverflow.com/q/26105198
tags question: http://stackoverflow.com/q/26092149
tags question: http://stackoverflow.com/q/26037556
tags question: http://stackoverflow.com/q/26157733
tags question: http://stackoverflow.com/q/26152630

http://stackoverflow.com/q/26193675
tagged with: google-translate
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/43687668
has title: How to access Google Translate API
favorite count: 0
score: 2
upvote count: 2
type: UnansweredQuestion
has body: This is the sample code from getting started page to use Google Translate API here. I used it exactly as instructed, and I already changed the "API key" part with my API key. Can anyone tell me why this code doesn't work? Is there any other library that I need to import to this .html ?
has comment: http://stackoverflow.com/comment/41072789
has comment: http://stackoverflow.com/comment/41072780
has answer: http://stackoverflow.com/a/66670150
has comment: http://stackoverflow.com/comment/41074774

http://stackoverflow.com/comment/40834742
score: 0
comment on: http://stackoverflow.com/q/26063340
type: QuestionComment
type: Comment
has text: possible duplicate of [TinyMCE 4 disable cleanup html](http://stackoverflow.com/questions/20364133/tinymce-4-disable-cleanup-html)

http://stackoverflow.com/comment/40840229
has text: I tried debugging but invain. Do you have any pointers on debugging this code ?
score: 0
comment on: http://stackoverflow.com/q/26066671
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26111453
tagged with: javascript
tagged with: jquery
has title: Trying to load cities based on state value using select options tag and javascript
score: 0
has body: I was using the information from this site http://jsfiddle.net/Q6h5s/ to create a drop down menu of Cities and States. When the State is selected the Cities belonging to that state should be selected. However all cities are being loaded. I am not too familiar with Javascript so I can't figure out where I am making this mistake. Here is my code State: <?php $fs = new fsCreator(); $cityState = $fs->loadCityState(); $dbh = new DatabaseHandler(); echo ' State '; $temp = null; $sep = ','; $index = 0; $max = sizeof($cityState); for($i = 0; $i< $max; $i++){ if(!($temp == substr($cityState[$i], 0, strpos($cityState[$i], $sep)))){ $index++; $temp = substr($cityState[$i], 0, (strpos($cityState[$i], $sep))); echo ' '.(substr($cityState[$i], 0, strpos($cityState[$i], $sep))).' '; } } ?> City: <?php $index = 0; $cityIndex = 0; $temp = null; for($i = 0; $i < $max; $i++){ if(!($temp == substr($cityState[$i], 0, strpos($cityState[$i], $sep)))){ $index++; $temp = substr($cityState[$i], 0, strpos($cityState[$i], $sep)); } $cityIndex++; echo ' '.(substr($cityState[$i], (strpos($cityState[$i], $sep)) + 1)).' '; } ?>
tagged with: http://stackoverflow.com/tag/html
tagged with: html-select
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26111590
type: Question
answer count: 1

http://stackoverflow.com/a/26053745
answers question: http://stackoverflow.com/q/26053633
downvote count: 0
has body: Concatenate it with single quote like this if (this.checked) byBrand.push("'"+$(this).attr("value")+"'")
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/26138414
has answer: http://stackoverflow.com/a/26139792
type: Question
tagged with: javascript
has title: color extract using bitwise >> in javascript
has answer: http://stackoverflow.com/a/26138593
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26138632
upvote count: 2
type: UnansweredQuestion
has body: why is my alpha wrong? var d:number = 0xff112233; var r:number = (d &amp; 0x00ff0000) &gt;&gt; 16; var g:number = (d &amp; 0x0000ff00) &gt;&gt; 8; var b:number = d &amp; 0x000000ff; var a:number = (d &amp; 0xff000000) &gt;&gt; 24 ; console.log(r,g,b,a); output: 17,34,51,-0.00392156862745098
answer count: 4
score: 2
tagged with: typescript
has answer: http://stackoverflow.com/a/26138927
tagged with: bit-manipulation

http://stackoverflow.com/q/26068546
accepted answer: http://stackoverflow.com/a/26068609
has title: How to call the Javascript file inside Body tag
answer count: 2
downvote count: 1
has body: I am working with a popup code on a template. I am inserting Java script and HTML code in the Body of each webpage. I don't have access to the Header. I can save the codes in separate file and call it here. I would like to write the codes in a separate file and call it in body tag. How do I do that. Currently, both html code for popup and Javascript to open the popup on page loads, are in the body tag and working fine. I would like to keep minimal codes in the body tag. I would like to write these two set of codes in different file and call it in the body tag (btw, I have to have the cookie session code here in the body tag, since every page has different cookie name). How and what do I need to do here? Thanks! &lt;!--popup header--&gt; &lt;div class="popUpTitle"&gt; &lt;span style="float:left; font-family: Lucida Grande; font-weight: bold; font-size:24px;margin-left:9px; margin-top:5px; color: #353535;"&gt; Newsletter Sign Up &lt;/span&gt; &lt;span onClick="closePopUp()" &gt; &lt;img alt="Close Popup" src="location/images/close.png" width="28px" height="27px"&gt;&lt;/span&gt; &lt;/div&gt; &lt;!--rest of the popup information--&gt; Javascript inside body tag right after the above code. &lt;script type="text/javascript"&gt; var link; if(getCookie("was_here_before3")=="") { setTimeout(openPopUp, 3000); createCookie("was_here_before3", "yes"); } function createCookie(name, value, days) { var expires; if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 60 * 1000)); expires = "; expires=" + date.toGMTString(); } else { expires = ""; } document.cookie = name + "=" + value + expires + "; path=/"; } function getCookie(c_name) { if (document.cookie.length &gt; 0) { c_start = document.cookie.indexOf(c_name + "="); if (c_start != -1) { c_start = c_start + c_name.length + 1; c_end = document.cookie.indexOf(";", c_start); if (c_end == -1) { c_end = document.cookie.length; } return unescape(document.cookie.substring(c_start, c_end)); } } return ""; } function…
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 0
possible better answer: http://stackoverflow.com/a/43455157
has comment: http://stackoverflow.com/comment/40843474
has answer: http://stackoverflow.com/a/43455157
type: Question
has comment: http://stackoverflow.com/comment/40843468
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26068609

http://stackoverflow.com/a/26192141
has body: UTC is GMT for most practicable purposes. We (the English) invented it. Just add/subtract the hours. Please visit Greenwich. Just outside london.
downvote count: 1
has comment: http://stackoverflow.com/comment/41070229
score: 0
has comment: http://stackoverflow.com/comment/41070215
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41070170
type: Answer
has comment: http://stackoverflow.com/comment/41070223
accepted answer of: http://stackoverflow.com/q/26192118
answers question: http://stackoverflow.com/q/26192118
upvote count: 1

http://stackoverflow.com/comment/52409015
has text: @WayneFeltham, have you referenced the ajax js scripts?
type: AnswerComment
comment on: http://stackoverflow.com/a/26193766
score: 0
type: Comment

http://stackoverflow.com/a/26055472
accepted answer of: http://stackoverflow.com/q/26055241
answers question: http://stackoverflow.com/q/26055241
type: Answer
upvote count: 2
has body: Could use the ngChange directive to call a function binding the new value to all the elements: angular.module('changeExample', []) .controller('ExampleController', ['$scope', function($scope) { $scope.valueToCopy = ''; $scope.values = values = [1, 1, 1, 3, 6]; $scope.change = function() { for (var i = values.length - 1; i >= 0; i--) { values[i] = $scope.valueToCopy; } console.log(values); }; } ]); Copy this: Element at {{$index}} = {{value}}
score: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26149491
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40991315
tagged with: google-chrome-devtools
has body: I'm trying to see a bit how implied globals work by experimenting with my console and plunker. I'm creating a self-invoking function, (function () { toto = 1; })(); According to the book I'm reading, ... implied globals are technically not real variables, but they are properties of the global object. I'm trying to see if after this function call, I can access toto as a property of the global object - which, in the browser, is the window. When I use hasOwnProperty('toto'), (by typing it in the console directly) I get false. I figured I'd use in, and indeed, toto is "in" window (so, it's not in window itself but to a child object of it) Can you shed some light? Any idea how to use Chrome Web Tools in order to inspect the status of all variables declared at any given time?
tagged with: global-variables
type: Question
has comment: http://stackoverflow.com/comment/40991408
has answer: http://stackoverflow.com/a/26149697
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40991412
score: 0
has title: Implied globals and the global object
favorite count: 0
accepted answer: http://stackoverflow.com/a/26149697
has comment: http://stackoverflow.com/comment/40991480
upvote count: 1

http://stackoverflow.com/comment/40958434
score: 0
comment on: http://stackoverflow.com/q/26131577
type: Comment
type: QuestionComment
has text: The ` ` would usually go in the ` ` part (which you don't have). I'm not a super-expert so I don't know if it's OK to put it in the body, but I always put it in the head.

http://stackoverflow.com/q/26164055
score: 0
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41018797
has comment: http://stackoverflow.com/comment/41018400
linked to: http://stackoverflow.com/q/460644
has title: Javascript - Dispatch built-in events
tagged with: prototypejs
has body: I know that we can use element.dispatchEvent(custom_event) to dispatch a custom event that we defined. My question is how to dispatch built-in events, such as submit, click, change, ... I write form.on('submit', function(){}) to hanlde form submitting event. Then, I want to dispatch submit form by clicking on an X element. X.on('click', function(){ // dispatch form submit here }); P/s: I'm using PrototyeJS
has comment: http://stackoverflow.com/comment/41018305
duplicate of: http://stackoverflow.com/q/460644
has comment: http://stackoverflow.com/comment/41018525
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41018440

http://stackoverflow.com/a/26207163
has comment: http://stackoverflow.com/comment/41097803
score: 0
has body: (I'm using call rather than bind so the code works with older browsers.) Why? bind is a lot simpler apparently. If you want it to work with older browsers, just include this simple polyfill somewhere in your code. What changes have to be made to the pattern for onCustomKeypress to have access to the event interface / object? None. The problem is still your addEvent function, which might now invoke the callback with the correct context but without the arguments. Two solutions: Use the arguments object and apply instead: …(…, function() { callback.apply(caller, arguments); } … Just pass the event argument to call - it takes any number of normal arguments after the context: MyObj.prototype.addEvent = function(event, callback, caller) { 'use strict'; if (typeof window.addEventListener === 'function') { this.element.addEventListener(event, function(e) { callback.call(caller, e); }, false); } else { // for older versions of IE, order of test is important this.element.attachEvent('on' + event, function() { callback.call(caller, window.event); }); } };
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26159405
accepted answer of: http://stackoverflow.com/q/26159405
has comment: http://stackoverflow.com/comment/45111104
type: Answer

http://stackoverflow.com/comment/40875025
comment on: http://stackoverflow.com/q/26081093
score: 0
type: Comment
type: QuestionComment
has text: @Volune The article seems to be rather bad and I read others, but this one was the first and boldest I could find now. Actually, the image shows a single nodejs thread, and a couple of Java threads, out of which more than one is running => Java wins. ;)

http://stackoverflow.com/q/26127309
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40950700
has comment: http://stackoverflow.com/comment/40950637
has comment: http://stackoverflow.com/comment/40950648
has comment: http://stackoverflow.com/comment/40950240
answer count: 1
tagged with: arrays
favorite count: 0
has title: Multi dimensional array Uncaught TypeError: Cannot set property '0' of undefined
has body: I am creating 3 dimensional array but something goes wrong var bucket =[0]; var choose = [[],[]]; var x = 0; $.each($('.bucket'), function() { bucket[x] = [choose[0], []]; for (var i=0; i&lt;$(this).find('.choose').length; i++) { choose[i][0] = $(this).find('.serie').val(); choose[i][1] = $(this).find('.quantity').val(); choose[i][2] = $(this).find('.type').val(); choose[i][3] = $(this).find('.totali').val(); }; // end for x++; }); // end each buckets console.log(choose); and console says: Uncaught TypeError: Cannot set property '0' of undefined What's wrong?
has answer: http://stackoverflow.com/a/26127409
type: UnansweredQuestion
downvote count: 2
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40950296

http://stackoverflow.com/q/26153241
possible better answer: http://stackoverflow.com/a/51667281
has title: Fixtures won't load in Karma
has answer: http://stackoverflow.com/a/51774398
has answer: http://stackoverflow.com/a/51667281
score: 11
type: AnsweredQuestion
tagged with: karma-runner
has comment: http://stackoverflow.com/comment/65692366
has answer: http://stackoverflow.com/a/29263841
accepted answer: http://stackoverflow.com/a/29263841
downvote count: 0
favorite count: 0
tagged with: fixtures
type: Question
upvote count: 11
tagged with: gruntjs
linked to: http://stackoverflow.com/q/20690005
answer count: 3
tagged with: javascript
has body: I've been trying numerous things, but I can't seem to get an fixture to load when I run Karma. I've tried using html2js and karma-jasmine-jquery—I'm leaning toward the latter, but I'll be okay with whichever one gets my fixture loaded in the DOM)—but as far as I can tell it's not getting loaded and attached to the DOM when my tests run. My directory structure is pretty simple: img/ ↳ mac.png ↳ link.png ↳ pocketwatch.png js/ ↳ spriteloader.js ↳ spriteloader.spec.js karma/ ↳ imagelist.fix.html ↳ karma.conf.js Gruntfile.coffee index.html grunt.config.coffee package.json These are the node modules I've got installed: grunt 0.4.5 grunt-contrib-jshint 0.10.0 grunt-contrib-watch 0.6.1 grunt-karma 0.9.0 karma 0.12.23 karma-chrome-launcher 0.1.4 karma-firefox-launcher 0.1.3 karma-html2js-preprocessor": "^0.1.0", karma-jasmine 0.2.0 karma-jasmine-jquery 0.1.1 karma-safari-launcher 0.1.1 karma-story-reporter 0.2.2 And here's my karma.conf.js settings: basePath: '../', frameworks: ['jasmine-jquery', 'jasmine'], files: [ // Source and spec files { pattern: 'js/*.js', watched: true, served: true, included: true }, // Fixtures { pattern: 'karma/*.fix.html', watched: false, served: true, included: false } ], exclude: [ ], preprocessors: { }, reporters: ['story'], port: 9018, colors: true, logLevel: config.LOG_INFO, autoWatch: true, browsers: ['Chrome', 'Firefox', 'Safari'], singleRun: true In my spec, I start off my describe() with a beforeEach() that runs the following two lines: jasmine.getFixtures().fixturesPath = '../'; jasmine.getFixtures().load('/karma/imagelist.fix.html'); Then the it() functions start. They're testing a function that adds an event listener to some &lt;img&gt; elements using document.getElementById(). That's where the fixture needs to come in, because without it the getElementById() will return null. (Which is the issue I'm hitting.) I've scoured the web for almost a full day looking for things to try, but I can't seem to get anything out of Karma other than…
tagged with: jasmine
linked to: http://stackoverflow.com/q/15938580

http://stackoverflow.com/a/26183419
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Ok, I end up resolving that by defining a method in test_helper.rb that wraps the test within the capybara driver assigning: def js Capybara.current_driver = Capybara.javascript_driver yield Capybara.current_driver = Capybara.default_driver end And using it like: test 'checks some feature on some scenario with javascript goin on' do js do # code end end I read that minitest-data could be of use here, but I didn't dig out any further.
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26182272
score: 1
answers question: http://stackoverflow.com/q/26182272

http://stackoverflow.com/comment/40945627
type: Comment
type: QuestionComment
has text: @SukieC Thought so! Glad i could help you
score: 1
comment on: http://stackoverflow.com/q/26109152

http://stackoverflow.com/q/26112346
tagged with: math
type: Question
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/588004
score: 0
has comment: http://stackoverflow.com/comment/40923167
has comment: http://stackoverflow.com/comment/40923131
has comment: http://stackoverflow.com/comment/40922916
answer count: 1
has comment: http://stackoverflow.com/comment/40922930
has answer: http://stackoverflow.com/a/26112370
has body: I'm getting error 2.7755575615628914e-17 when I try to add 15 minutes and then subtract 5 minutes 3 times. Should be zero instead. Please help. http://jsfiddle.net/3zq4napd/ $(document).on('click', '.add', function(event) { var input = $('input'); var inputVal = parseFloat($('input').val()); var addVal = parseFloat($(this).data('num')); var newVal = inputVal + (addVal / 60); $(input).val(newVal); }); $(document).on('click', '.sub', function(event) { var input = $('input'); var inputVal = parseFloat($('input').val()); var subVal = parseFloat($(this).data('num')); var newVal = inputVal - (subVal / 60); $(input).val(newVal); });
accepted answer: http://stackoverflow.com/a/26112370
type: AnsweredQuestion
has title: Add/subtract minutes to/from hours decimal

http://stackoverflow.com/q/26059293
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
favorite count: 0
has answer: http://stackoverflow.com/a/26059743
type: Question
has answer: http://stackoverflow.com/a/26059608
has answer: http://stackoverflow.com/a/26059488
tagged with: http://stackoverflow.com/tag/html
has body: I need to create a div that will auto refresh every 10 seconds, and stop when it successfully loads. I created this jQuery script: &lt;script type="text/javascript"&gt; $(document).ready(function(){ var j = jQuery.noConflict(); j(document).ready(function() { j(".refresh").everyTime(1000,function(i){ j.ajax({ url: "pin.php", cache: false, success: function(html){ j(".refresh").html(html); } }) }) }); j('.refresh'); }); &lt;/script&gt; It works but the refresh continues every 10 seconds. I need it to stop if pin.php returns a numeric output. How can I edit it to stop refresh if pin.php returns a numeric output?
has answer: http://stackoverflow.com/a/26059452
score: 1
has answer: http://stackoverflow.com/a/26059866
upvote count: 1
tagged with: php
answer count: 5
has title: auto refresh div every x seconds and stop to successsful load
downvote count: 0

http://stackoverflow.com/comment/41121013
type: AnswerComment
type: Comment
has text: Thanks a lot OrionMelt. I tried making use of colour blending. Though it is quite clever and the node colour is taken care of, link colour is still a challenge. there is a contrast in colour from one way import only, the colours displayed are different when node 1 and node 2 are moused over (in this case node 1 and node 2 have a 2 way import). I tried combinations of several colours and opacity, but this seems to persist. I am trying to explore your other idea- playing with the links array. Any pointers/advice on where to target will be helpful? Thanks again
comment on: http://stackoverflow.com/a/26173460
score: 0

http://stackoverflow.com/a/26157993
accepted answer of: http://stackoverflow.com/q/26155330
answers question: http://stackoverflow.com/q/26155330
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41086422
downvote count: 0
has comment: http://stackoverflow.com/comment/41017347
has body: If you want the time only watched on a video by a user you need to use a counter. I also simplify your code. The function onPlayerStateChange: function onPlayerStateChange(event) { if (event.data == YT.PlayerState.PLAYING) { //player play timer = setInterval( function() { seconds++; console.log("you watch: "+ seconds +" seconds of the video"); }, 1000 ); } else { //player pause clearInterval(timer); } } The output : I have see only 8 seconds of the video, the 4 first seconds, and 4 seconds at 2:03 There is a live example (UPDATED) The full code: var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); // 3. This function creates an &lt;iframe&gt; (and YouTube player) // after the API code downloads. var player; function onYouTubeIframeAPIReady() { player = new YT.Player('player', { height: '390', width: '640', videoId: 'l-gQLqv9f4o', events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange } }); } // 4. The API will call this function when the video player is ready. var seconds = 0; var timer; function onPlayerReady(event) { event.target.playVideo(); } function onPlayerStateChange(event) { if (event.data == YT.PlayerState.PLAYING) { //player play timer = setInterval( function() { seconds++; console.log("you watch: "+ seconds +" seconds of the video"); }, 1000 ); } else { //player pause clearInterval(timer); } } function stopVideo() { player.stopVideo(); }
has comment: http://stackoverflow.com/comment/41007676
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/a/26051935
has body: Try this jQuery code: var table = $(' ').addClass('foo'); for(i=0; i<3; i++){ var row = $(' ').addClass('bar'); var td1 = $(' ').addClass('bartd'); var td2 = $(' ').addClass('bartd'); row.append(td1); row.append(td2); var div=" hi div "; td1.append(div); td2.append(div); table.append(row); } $('html').append(table); http://jsfiddle.net/rfa7Lh3g/3/
answers question: http://stackoverflow.com/q/26051832
has comment: http://stackoverflow.com/comment/40813008
has comment: http://stackoverflow.com/comment/40812862
score: 0
has comment: http://stackoverflow.com/comment/40813022
type: Answer

http://stackoverflow.com/a/26043851
has body: var myArray = [[0,1],[1,1],[1,2]]; Above line store three array object inside myArray object. Now you are trying to check the index of a new array on it. var a = myArray .indexOf([0,1]);//Here [0,1] is the new array object,it has different reference so it will always return -1. Just for verification,you can do like below. function myFunction() { var a1 = [0,1]; var a2 = [1,1]; var a3 = [1,2]; var myArray = [a1,a2,a3]; var a = myArray.indexOf(a1); document.getElementById("demo").innerHTML = a; } Click the button to display the position of the element "[0,1]": Try it it returns 0 ,because here a1 is not new object
downvote count: 0
has comment: http://stackoverflow.com/comment/40800682
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26043639

http://stackoverflow.com/a/28600474
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26190445
accepted answer of: http://stackoverflow.com/q/26190445
has body: your options are in the wrong place, they need to be one level higher: copy: { main: { files: [ { expand: true, src: 'index.html', dest: 'build/' }, options: { process: function (content, srcpath){ return content.replace(/&lt;script src = "http:\/\/localhost:9090\/livereload.js"&gt;&lt;\/script&gt;/g, " "); } }
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40942114
has text: possible duplicate of [preventDefault() on an tag](http://stackoverflow.com/questions/265478/preventdefault-on-an-a-tag)
comment on: http://stackoverflow.com/q/26123001
type: Comment
type: QuestionComment
score: 3

http://stackoverflow.com/q/26052367
downvote count: 0
has body: This question might be asked earlier, but I was not able to grasp the answers since there were a lot bunch of codes in every questions. I don't know how to put it in words. I think you guys will understand the situation once you see the code. HTML By Christian Christiansen Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ex, quasi nisi optio, earum facilis perspiciatis temporibus nobis nam velit incidunt. Recusandae accusamus pariatur, explicabo iure ea ex perspiciatis perferendis quam! Comments (3) Reply Report Submit By Christian Christiansen Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ex, quasi nisi optio, earum facilis perspiciatis temporibus nobis nam velit incidunt. Recusandae accusamus pariatur, explicabo iure ea ex perspiciatis perferendis quam! Comments (3) Reply Report Submit Submit I have the same html multiple times in my code, What I want to achieve is, I want the div with classname reply_box to appear whenever I click the element with classname inline_reply. I have used jQuery toggle method to achieve this and the code is, jQuery $(".inline_rply").click(function() { $(".reply_box").toggle(); }); My Problem: Whenever I click the reply button, all the elements having the classname reply_box are toggled whereas I just want to toggle only the one that I have clicked. I don't want to add different classnames to all div's since there will be numerous posts. Is there an easy way to do it? I heard that this can be done using this. But I donno how. Anyone with a simple example will be much appreciated. I think I have not confused you guys.
tagged with: jquery
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26052400
has comment: http://stackoverflow.com/comment/40813501
tagged with: css
possible better answer: http://stackoverflow.com/a/26052417
upvote count: 2
has answer: http://stackoverflow.com/a/26052417
answer count: 3
has title: Apply click event only to the targeted class jQuery
has answer: http://stackoverflow.com/a/26052407
tagged with: javascript
has comment: http://stackoverflow.com/comment/40813574
tagged with: class
accepted answer: http://stackoverflow.com/a/26052407
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/41020236
has text: No, the second method is valid. Normally people use the second method with Asynchronous Calls.
comment on: http://stackoverflow.com/a/26164790
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26153091
has title: Grab form fields and calculate based on inputs
tagged with: javascript
type: AnsweredQuestion
has body: I'm getting an undefined error and don't know why this isn't working. It's supposed to divide the rent by the amount of roommates: function splitRent() { var roommates = document.getElementById("rent"); var rent = document.getElementById("rent"); var rentEach = rent / roommates; if (document.getElementById("submit") == true) { document.write("You each should pay" + " " + rentEach) } else { document.alert("Gimme info") } }; Roommate Room Splitter Roommates: Rent:
has comment: http://stackoverflow.com/comment/40997916
has answer: http://stackoverflow.com/a/26153156
type: Question
possible better answer: http://stackoverflow.com/a/26153099
has answer: http://stackoverflow.com/a/26153099
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/26153156

http://stackoverflow.com/q/26130463
tagged with: prototype
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/40956433
has comment: http://stackoverflow.com/comment/40956713
has title: Javascript using prototype how can I set the value of "this" for a number?
has answer: http://stackoverflow.com/a/37880291
has answer: http://stackoverflow.com/a/26130527
has answer: http://stackoverflow.com/a/26130528
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26130528
tagged with: numbers
linked to: http://stackoverflow.com/q/37878330
tagged with: set
has body: So if we can get past the "should you?" question ... does anyone know how to set the value of an integer in prototype? Number.prototype.add = function(num){ var newVal = this.valueOf() + num; this.valueOf(newVal); return newVal; } var rad = 4001.23; document.write(rad.add(10) + '&lt;br/&gt;' + rad); You'll notice rad.add(10) returns the number contained in the variable "rad" plus 10, but I would really like to change the value of rad from within the prototype add function (something I know this.valueOf(newVal) does not accomplish). Can this be done? If so, how?
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26130527

timer
tag name: timer
tags question: http://stackoverflow.com/q/26075096
type: Tag

http://stackoverflow.com/a/26123734
type: AcceptedAnswer
downvote count: 0
score: 8
upvote count: 8
answers question: http://stackoverflow.com/q/26121785
type: Answer
accepted answer of: http://stackoverflow.com/q/26121785
has body: After creating the axis svg nodes with the .call to axis component, you can go back and select specific text nodes to change their styling. In this example I'm simply checking which of the axis nodes parse to a number, which is true only of the year values: axisNodes.selectAll('text').each(function() { if(+this.textContent) { this.classList.add("year"); } }); And then the 'year' css class can apply whatever extra styling you want. //adapted from http://bl.ocks.org/mbostock/4149176 var margin = {top: 250, right: 40, bottom: 250, left: 40}, width = 960 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; var x = d3.time.scale() .domain([new Date(2012, 0, 1), new Date(2013, 0, 1)]) .range([0, width]); var xAxis = d3.svg.axis() .scale(x); var svg = d3.select("body").append("svg") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.top + margin.bottom) var axisNodes = svg.append("g") .attr("class", "x axis") .attr("transform", "translate(20,50)") .call(xAxis); axisNodes.selectAll('text').each(function() { if(+this.textContent) { this.classList.add("year"); } }); .axis text { font: 10px sans-serif; } .axis line, .axis path { fill: none; stroke: #000; shape-rendering: crispEdges; } .year { fill: none; stroke: black; shape-rendering: crispEdges; } &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"&gt;&lt;/script&gt;

http://stackoverflow.com/comment/41040921
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26176184
type: Comment
has text: Thanks, it a start but not what I looked for. I want that it will be like a stock chart with time line but in horizontal bars.

http://stackoverflow.com/q/26102656
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Why does jQuery need `getWindow(doc)` here?
has answer: http://stackoverflow.com/a/26102727
favorite count: 0
upvote count: 2
possible better answer: http://stackoverflow.com/a/26102735
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/26102735
accepted answer: http://stackoverflow.com/a/26102727
has body: In the source for jQuery's offset(), why can't it just use window directly?
type: Question
answer count: 2

http://stackoverflow.com/q/26186815
type: UnansweredQuestion
has body: I have a variable that shows various combinations of numbers: var sequence = [ '01-02-03-04-05-06', '01-02-03-04-05-12', '01-02-03-04-12-30', '05-10-15-20-25-30', '02-04-06-08-10-12', '03-06-09-12-15-17', '04-08-12-16-20-24', '05-10-15-20-25-30' ]; This loop I created allows me to check each value of this variable separately: for (var i=0; i&lt;sequence.length; i++){ number = sequence[i].split('-'); for (var j=0; j&lt;number.length; j++){ number = number[j]; } }; From then on I couldn't advance the argument. I don't often work with loops and I get a bit lost. I need help and guidance to achieve get the following results and insert them into assigned inputs: The number that is most repeated in every sequence. The two numbers,in sequence or not, that are most repeated in every sequence. The three numbers, in sequence or not, that are most repeated in every sequence. The four numbers, in sequence or not, that are most repeated in every sequence. The five numbers, in sequence or not, that are most repeated in every sequence. The six numbers, insequence or not, that are most repeated in every sequence. Example: 01, 02, 03, 04, 05 (four times each) 01-02, 01-03, 01-04, 02-03, 02-04, 03-04 (three times each) ... FIDDLE: http://jsfiddle.net/v8r6gojz/
has comment: http://stackoverflow.com/comment/41061127
linked to: http://stackoverflow.com/q/17787754
has comment: http://stackoverflow.com/comment/41060976
has answer: http://stackoverflow.com/a/26186900
has answer: http://stackoverflow.com/a/26186885
tagged with: loops
type: Question
has title: How to check a value or combination of values that is most repeated in a variable?
answer count: 2
linked to: http://stackoverflow.com/q/5667888
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/41060905

http://stackoverflow.com/comment/40797715
type: QuestionComment
has text: Rectify means?, to any specific format or just the value
comment on: http://stackoverflow.com/q/26043784
score: 0
type: Comment

http://stackoverflow.com/comment/41017161
type: Comment
comment on: http://stackoverflow.com/q/26162349
has text: but with moment its simple this code I'm getting the date of moment everyday and subtract one day, so I'm showing with handlebars the Database so today will show 10/02/2014, I just don't want to show days of saturday and sunday.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41021877
has text: Thank you for your answer. This is for my backend code - I have an object that contains several nested fields, and currently I have two separate methods to modify and save to mongodb two separate fields within that object (the first is basically obj.x and the second is obj.y.z). I was hoping to combine the two methods into a single function and then pass in the field to modify as a string ('x' or 'y.z'). I figured that this way, I wouldn't have to deal with too many conditional statements to determine what was passed in, etc.
comment on: http://stackoverflow.com/a/26165537
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40787370
has text: Looks like a facebook bug https://developers.facebook.com/bugs/295178237341368/
comment on: http://stackoverflow.com/q/26038096
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26079780
has answer: http://stackoverflow.com/a/26082305
downvote count: 2
has comment: http://stackoverflow.com/comment/40864275
upvote count: 0
has comment: http://stackoverflow.com/comment/40863968
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40863811
has comment: http://stackoverflow.com/comment/40864237
has body: i'm at coding a form and have these chekboxes here: Word Mark Logo Letter Mark Logo Emblerm Logo The problem is this i need that the image over my checkboxes be selectable if i click over them without changing the id of my checkboxes the id have to be the same because of a javascript code. What can I use instead of the tag ? Why the same id watch this: Any idea thanks in advance
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40864578
has comment: http://stackoverflow.com/comment/40863936
favorite count: 0
type: Question
has title: How to select label without having to change id?
score: -2
has comment: http://stackoverflow.com/comment/40863876
has comment: http://stackoverflow.com/comment/40863802
answer count: 1
has comment: http://stackoverflow.com/comment/40863813

http://stackoverflow.com/q/26116120
has body: I am using KendoUI Scheduler control and here is initialization code $("#Scheduler").kendoScheduler({ dataSource: [], selectable: true, height: 500, editable: false, eventTemplate: $("#event-template").html(), views: [ "day", { type: "week", selected: true }, "month", "agenda" ], resources: [ { field: "resourceviewid", name: "ResourceViews", dataColorField: "key", dataSource: [ { text: "Appointments", value: 1, key: "orange" }, { text: "Delivery Specialist", value: 2, key: "blue" }, { text: "Orientation Specialist", value: 3, key: "green" } ] } ], group: { resources: ["ResourceViews"], orientation: "horizontal" } }); Here "Appointments" group is default, it will be available always I have check box in my screen Delivery Specialist Orientation Specialist On change event I wrote below code to get selected values from checkbox and updating GROUP datasource of KendoUI scheduler as below $("#divResourceView :checkbox").change(function (e) { var checked = $.map($("#divResourceView :checked"), function (checkbox) { return parseInt($(checkbox).val()); }); }); var scheduler = $("#Scheduler").data("kendoScheduler"); var arrayOfStrings = checked.toString().split(","); for (var i = 0; i < arrayOfStrings.length; i++) { if(arrayOfStrings[i] == 1) { var data = [{ text: "Delivery Specialist", value: 2, color: "blue" }]; scheduler.resources[1].dataSource.data(data); } if (arrayOfStrings[i] == 2) { var data = [{ text: "Orientation Specialist", value: 3, color: "green" }]; scheduler.resources[2].dataSource.data(data); } } scheduler.refresh(); But it removes all groups and add only one. I want to see both groups when arrayOfStrings has values "1,2", I can see all groups during initialization But it disappears when i check the check box. Images for reference During Initialization After As you can see clearly, Delivery Specialist is missing in scheduler control Found some link: http://www.telerik.com/forums/add-filter-to-resource-datasource But not sure what they talking about? seems lik…
tagged with: kendo-ui
score: 2
favorite count: 0
upvote count: 2
tagged with: kendo-scheduler
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/37208280
has title: How to dynamically add and remove GROUPS to KendoUI Scheduler
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40913875
comment on: http://stackoverflow.com/a/26106247
type: AnswerComment
type: Comment
score: 0
has text: I am planning on doing this in a grid of images using inline-block. When I use position: absolute for the images, it doesn't fit right. Example: this should have a grid of 8 dogs and one cat, but the cat (whose position is absolute) overlaps the dogs. Any idea why? http://jsfiddle.net/cdno7svf/6/

http://stackoverflow.com/q/26051702
type: Question
has title: How to make use of external JavaScript source file in JSP through simple java class
tagged with: jsp
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40820106
answer count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/18784920
has comment: http://stackoverflow.com/comment/40819966
has comment: http://stackoverflow.com/comment/40820528
tagged with: java
has comment: http://stackoverflow.com/comment/40818166
has body: I am creating one project in which I am making call to a JavaScript function which resides in index.jsp from my java class ( .java file). As in this context we shouldnt write &lt;script&gt; tag in our index.jsp, what should I do if I want to make use of some dependent .js file like stomp.js source file in my index.jsp file??

http://stackoverflow.com/comment/40812360
type: Comment
has text: Of course! Let me know if you need anything else or further explanation!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26051656

http://stackoverflow.com/q/26074414
has answer: http://stackoverflow.com/a/26104244
has body: I am working on an app that uses Select2 (version 3.5.1). The HTML to setup this drop down / autocomplete field looks like this: &lt;input id="mySelect" class="form-control" type="hidden"&gt; The form-control class in this snippet comes from Bootstrap. I am initializing this field from JavaScript using the following: function getItemFormat(item) { var format = '&lt;div&gt;' + item.ItemName + '&lt;/div&gt;'; return format; } $(function() { $('#mySelect').select2({ minimumInputLength: 5, placeholder: 'Search for an item', allowClear: true, ajax: { url: '/api/getItems', dataType: 'json', quietMillis: 250, data: function (term, page) { return { query: term }; }, results: function (data, page) { return { results: data, id: 'ItemId', text: 'ItemText' }; } }, formatResult: getItemFormat, dropdownCssClass: "bigdrop", escapeMarkup: function (m) { return m; } }); }); When my select field loads, it successfully renders. Once I type at least the fifth character, it successfully pulls items from the server and lists them as options. However, if I try to select one of them, nothing happens. The drop-down popup stays open. Nothing gets put in the actual field. There are no errors in the JavaScript console. Its like I didn't click anything. In addition, I noticed that nothing is highlighted when I put my mouse over an item or attempt to navigate the list of options with the arrow keys. What am I doing wrong?
answer count: 4
has comment: http://stackoverflow.com/comment/40903637
type: AnsweredQuestion
score: 36
has answer: http://stackoverflow.com/a/53391643
accepted answer: http://stackoverflow.com/a/26102668
type: Question
upvote count: 36
tagged with: javascript
has title: Unable to select item in Select2 drop down
has comment: http://stackoverflow.com/comment/40905025
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/26102668
possible better answer: http://stackoverflow.com/a/26102455
favorite count: 0
has answer: http://stackoverflow.com/a/26102455
tagged with: jquery-select2
has comment: http://stackoverflow.com/comment/40905142

http://stackoverflow.com/q/26037379
downvote count: 0
tagged with: javascript
tagged with: http-request
score: 6
has comment: http://stackoverflow.com/comment/40786922
favorite count: 0
type: UnansweredQuestion
upvote count: 6
has answer: http://stackoverflow.com/a/26037834
tagged with: node.js
has body: I was wondering if we can measure the time it takes for an http request to be completed using node.js. Modifying slightly an example from the documentation (here), one can easily write down the following code. var http = require('http'); var stamp1 = new Date(); var stamp2, stamp3, stamp4; var options = { hostname: 'www.google.com', port: 80, path: '/upload', method: 'POST' }; var req = http.request(options, function(res) { stamp3 = new Date(); console.log('STATUS: ' + res.statusCode); console.log('HEADERS: ' + JSON.stringify(res.headers)); res.setEncoding('utf8'); res.on('data', function (chunk) { console.log('BODY: ' + chunk); }); res.on('end', function () { stamp4 = new Date(); console.log ("Stamp 3: " + stamp3); console.log ("Stamp 4: " + stamp4); }); }); req.on('error', function(e) { console.log('problem with request: ' + e.message); }); // write data to request body req.write('data\n'); req.write('data\n'); req.end(); stamp2 = new Date(); console.log ("Stamp 1: " + stamp1); console.log ("Stamp 2: " + stamp2); Now let me come to my point. On the response one can easily measure the time it takes for the response, since in the beginning stamp3 is set and on end stamp 4 is set. So, in principle for relatively large amounts of data these two timestamps will be different. However, the question that I have is whether stamps 1 and 2 actually measure what is happening when the request is being prepared and dispatched. In other words, is req.write(....) a synchronous operation? Based on node.js principles I would expect req.write(...) to be an asynchronous operation where one can pass an arbitrarily large document and then upon successful completion we can have a callback knowing that the request has finished. Comments?
has answer: http://stackoverflow.com/a/26038762
tagged with: timing
type: Question
has comment: http://stackoverflow.com/comment/40787203
answer count: 2
has title: Measuring time on node.js http requests

http://stackoverflow.com/comment/41076766
type: Comment
comment on: http://stackoverflow.com/a/26186759
score: 4
type: AnswerComment
has text: From http://www.html5rocks.com/en/tutorials/cors/ HTTP Headers matches (case-insensitive): Accept Accept-Language Content-Language Last-Event-ID Content-Type, but only if the value is one of: application/x-www-form-urlencoded multipart/form-data text/plain

http://stackoverflow.com/comment/41072012
has text: Right, in that case I think a database is indeed the best option.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26192978

http://stackoverflow.com/comment/40934890
has text: @fuchs777 Yes it would. When usNumberFormat was set to false - it was assuming the values were German number format. In German number format thousands are denoted by periods and not commas.
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26118947

http://stackoverflow.com/comment/40990180
has text: This looks good, but again. The output will be wrong, but I sure will use this sometime ;)
type: AnswerComment
comment on: http://stackoverflow.com/a/26148854
type: Comment
score: 0

http://stackoverflow.com/a/26178376
has comment: http://stackoverflow.com/comment/41044621
has comment: http://stackoverflow.com/comment/41044473
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26178322
answers question: http://stackoverflow.com/q/26178322
type: Answer
has comment: http://stackoverflow.com/comment/41045869
score: 2
has body: You cannot share cookies across sites, I'm afraid. This is basic security feature. Otherwise malicious websites could steal your banking session cookies.
upvote count: 2
has comment: http://stackoverflow.com/comment/41044783

http://stackoverflow.com/comment/40953137
score: 0
has text: This ended up being the solution with some changing of exactly HOW the HTML was generated (pointing a textarea attribute directly to the desired script). This is what I get for trying to embedded HTML into Objective-C for text formatting :\
comment on: http://stackoverflow.com/a/26108622
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44036969
has text: Where is DoThisThing() being called inside your worker ?
score: 0
comment on: http://stackoverflow.com/q/26100037
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26143779
type: Answer
has comment: http://stackoverflow.com/comment/41005654
answers question: http://stackoverflow.com/q/26142426
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26142426
has comment: http://stackoverflow.com/comment/40981090
has comment: http://stackoverflow.com/comment/40980880
has comment: http://stackoverflow.com/comment/40984558
has body: I mocked up your app. Your issue was you are returning a string from your hub action: public string SendNotifications() { return context.Clients.All.RecieveNotification(role, descrip); } this should be void (you aren't returning anything, but actually calling the clients), and you also don't need to use GlobalHost to get the context here, only when the context isn't available (I.E. calling the hub from the server). Try making these changes: [HubMethodName("sendNotifications")] public void SendNotifications() { //using... //IHubContext context = GlobalHost.ConnectionManager.GetHubContext&lt;notificationHub&gt;(); //return context.Clients.All.RecieveNotification(role, descrip); Clients.All.RecieveNotification(role, descrip); } Put a breakpoint at Clients.All... and see if it is being triggered. Let me know if these updates fix your issue.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40982473
score: 1

http://stackoverflow.com/q/26076150
has answer: http://stackoverflow.com/a/26076180
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26076180
has comment: http://stackoverflow.com/comment/40856951
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/40856989
has comment: http://stackoverflow.com/comment/40857230
type: AnsweredQuestion
has title: jQuery AJAX onclick get DOM of a specified URL
has body: I would like to make an AJAX pagination withot php and mysql, so when I click a link than I would like to get the next page DOM without reloading page and than in that DOM find the elements I need to append to the current page. I now that jQuery IAS does this but I have a three col design and I need only one next button which onclick appends the data into the aproppriate col based on its parent class and IAS can't handle tree col layout. So basicly something like this: $('a.button').click(function(){ var url = $('a.next').attr('href'); $.ajax({ type: 'GET', //or POST i don't know which one data: url, //or should this be the url: ? success: function(data){ //data should be the DOM of the second page $html = $(data); $html.find('.col1 .child').appendTo('.col1'); $html.find('.col2 .child').appendTo('.col3'); $html.find('.col3 .child').appendTo('.col3'); } }); return false; }); Obviously this doesn't work I just put it here to make my question undersandable. How can I do this?
tagged with: dom

http://stackoverflow.com/a/26173299
score: 3
has body: I think your issue has more to do with how you are setting up your code, rather than a specific syntax problem. In general, jQuery and Angular don't mesh too well together. From the Angular docs: Does Angular use the jQuery library? Yes, Angular can use jQuery if it's present in your app when the application is being >bootstrapped. If jQuery is not present in your script path, Angular falls back to its own >implementation of the subset of jQuery that we call jQLite. Angular 1.3 only supports jQuery 2.1 or above. jQuery 1.7 and newer might work correctly with >Angular but we don't guarantee that. I see that you're using jQuery 1.11 with Angular 1.2.15, so you fall in that "might" work correctly category. If I were you, I would pick one of these tools and go with it. Finally, if you are to go with Angular, you need to first instantiate your module, then define your controllers. Something like this would work: var myAppModule = angular.module('myApp', []); myAppModule.controller('scoreController', '$scope', function($scope) { $scope.score_one = player1.score; $scope.score_two = player2.score; } And you would build the ways to increment the scores in a similar fashion. In short, I would keep everything in Angular, and not even think about jQuery. Angular is great for the two way bindings that you're doing in an app like this, so I think it's the best way to go. Good luck.
has comment: http://stackoverflow.com/comment/41038266
upvote count: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26173189
type: Answer

http://stackoverflow.com/comment/41055546
score: 0
type: AnswerComment
has text: That's not true. You can communicate using `postMessage`. However, my question was about getting the domain for the parent iFrame.
type: Comment
comment on: http://stackoverflow.com/a/26184009

http://stackoverflow.com/comment/40788874
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26036915
type: Comment
has text: Nope. Some work could be done by the user. I explained the problem and showed a way to go. But it is not meant to be complete. Still works :)

http://stackoverflow.com/q/26166758
possible better answer: http://stackoverflow.com/a/26173783
answer count: 2
downvote count: 0
tagged with: intern
favorite count: 0
has comment: http://stackoverflow.com/comment/41025961
has answer: http://stackoverflow.com/a/26246234
upvote count: 6
type: AnsweredQuestion
has body: I'm having an issue getting Intern 2 to wait for elements to be present. In Intern 1 I was using wait()to set express time periods for the page to wait for an element to be present after some user action. With Intern 2 there seems to be setFindTimeout() which should always tell a find() method to wait a bit for the element to be present. I've set setFindTimeout() and tried using pollUntil to handle these waits but the tests are still failing with the error "element not visible". Here is a sample test that is using the same requirements as my real tests and is looking for an element Id which appears 5 seconds after this page loads. define([ 'intern!object', 'intern/chai!assert', 'require', 'tests/util', 'intern/dojo/node!leadfoot/Command', 'intern/dojo/node!leadfoot/Session', 'intern/dojo/node!leadfoot/helpers/pollUntil' ], function (registerSuite, assert, require, util, Command, Session, pollUntil) { registerSuite([ { name: 'testing_find_by_wait', test_create_form_on_web: function() { console.log('Create a form with account, number, number and formula fields') return this.remote .setFindTimeout(10000) .setWindowSize(1280, 960) .get("http://www.kgstew.com/waittest.html") .then(pollUntil('return document.getElementById("demo")', 10000)) .findById('demo') .click() .end() } } ]); });
has comment: http://stackoverflow.com/comment/41027677
score: 6
type: Question
has answer: http://stackoverflow.com/a/26173783
has comment: http://stackoverflow.com/comment/41025338
has title: setFindTimeout and pollUntil with Intern for elements that are not visible on initial page load
accepted answer: http://stackoverflow.com/a/26246234
tagged with: javascript

http://stackoverflow.com/comment/40828518
type: AnswerComment
comment on: http://stackoverflow.com/a/26060632
has text: @squint I realised `.filter` and hence converted it to an array and thanks for other suggestions. Incorporated :)
score: 0
type: Comment

http://stackoverflow.com/comment/40892832
has text: Can you please explain why you need to do the redirections in the same tab?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26087944
type: AnswerComment

http://stackoverflow.com/a/26038230
type: Answer
has body: In both cases the value will be converted to a string. When you add a number to a string or a string to a number, the result is a string. Simply use parseInt(value) or toString(value) to force the conversion.
score: 2
upvote count: 3
downvote count: 1
has comment: http://stackoverflow.com/comment/40795197
answers question: http://stackoverflow.com/q/26037997

http://stackoverflow.com/comment/40878990
score: 0
has text: PLEASE specify what browsers you'd like to support.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26087184

http://stackoverflow.com/comment/40902079
comment on: http://stackoverflow.com/q/26099103
has text: ok, the reason I am doing this is because I need something for global use, I would just rely on the model return and that would be it, but I set the property to use in everywhere in the app, and I learned global variables is not good.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40961050
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26131885
score: 0
has text: $('#grid').html(data); Is the data contains any element which has ".buscar" class?

http://stackoverflow.com/a/26172164
has comment: http://stackoverflow.com/comment/110780423
has comment: http://stackoverflow.com/comment/110772252
has comment: http://stackoverflow.com/comment/110787298
downvote count: 0
has body: Example with new Function var str = "{ name: 'John' }"; var fnc = new Function( "return " + str ); var obj = fnc(); console.log(obj.name);
type: Answer
answers question: http://stackoverflow.com/q/26171985
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/110790324

http://stackoverflow.com/comment/40996179
type: AnswerComment
comment on: http://stackoverflow.com/a/26151903
has text: One note, Application has a few DateTime objects in it. They are being displayed like this: `/Date(1365098312483)/` . How would I get them to display correctly as a date? I'll keep looking on my own as well.
score: 0
type: Comment

http://stackoverflow.com/comment/40991008
comment on: http://stackoverflow.com/q/26148956
score: 0
type: Comment
type: QuestionComment
has text: No, it seems that one of the textfields has length 0.

http://stackoverflow.com/a/26084073
has comment: http://stackoverflow.com/comment/40872501
has comment: http://stackoverflow.com/comment/40873153
has comment: http://stackoverflow.com/comment/40871732
has comment: http://stackoverflow.com/comment/40872589
has comment: http://stackoverflow.com/comment/40871725
has comment: http://stackoverflow.com/comment/40873262
accepted answer of: http://stackoverflow.com/q/26083987
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40875329
has comment: http://stackoverflow.com/comment/40872750
has comment: http://stackoverflow.com/comment/40872361
has comment: http://stackoverflow.com/comment/40873617
has comment: http://stackoverflow.com/comment/40872297
has comment: http://stackoverflow.com/comment/40873210
type: Answer
has comment: http://stackoverflow.com/comment/40873295
has comment: http://stackoverflow.com/comment/40875282
answers question: http://stackoverflow.com/q/26083987
has comment: http://stackoverflow.com/comment/40871761
has body: Easiest way is with a get request: ..... Search and on used-cars.php: var_dump($_GET['make']); EDIT lets suppose on the form on the first page you have: ford pontiac fiat when you hit the submit button $_GET['make'] on used-cars.php will be whatever was selected lets say fiat. so now on used-cars.php you can do this: <?php while($make = $makeFilter->fetch(PDO::FETCH_ASSOC)){ $selected = $make['Make'] == $_GET['make']?'selected="selected"':''; echo ' '.$make["Make"].' '; } ?>
score: 1
has comment: http://stackoverflow.com/comment/40873516
upvote count: 1

http://stackoverflow.com/a/26180433
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: You need to assign the map to the global scope. In your initialize function change var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); to map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); since you are already initializing the variable map into the global scope above. By adding the 'var' you are limiting the scope of the map object to the initialize function
type: Answer
accepted answer of: http://stackoverflow.com/q/26180348
answers question: http://stackoverflow.com/q/26180348
score: 1

http://stackoverflow.com/comment/40950857
comment on: http://stackoverflow.com/a/26127202
has text: `while ($row = mysqli_fetch) { $arr[] = $row; } echo json_encode($arr);`
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40803451
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26046564
has text: @Will Thank you Will, and yes indeed an example with my (otherwise painfully learned, working) code as context would be greatly appreciated :) Cheers,svs

http://stackoverflow.com/comment/40814333
comment on: http://stackoverflow.com/a/26052563
score: 0
type: Comment
type: AnswerComment
has text: Your question and description are still is a bit confusing. Can you provide a code sample of what you have tried so far?

http://stackoverflow.com/q/26103264
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26103329
has title: How to hide HTML elements before they load on the page
has comment: http://stackoverflow.com/comment/40906620
has comment: http://stackoverflow.com/comment/40907026
type: Question
score: 3
has comment: http://stackoverflow.com/comment/40906938
tagged with: sharepoint
upvote count: 3
answer count: 3
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26103329
tagged with: jquery
favorite count: 0
has body: I have a SharePoint list with a customized "New" and "Edit" forms. I'm using jQuery to hide certain fields on $(document).ready(). What happens on page load is that you see all the fields shown (for a split second) before they become hidden. It's a little unpleasant to see that flash-like transition. Is there any way to manipulate the style of the HTML elements before they are loaded? (i.e.: display: none) Sample code: $(document).ready() { // Hides fields 1 and 3 on page load // Users can see it being hidden in fraction of a second $('#field-1').hide(); $('#field-3').hide(); }
has answer: http://stackoverflow.com/a/26103334
has comment: http://stackoverflow.com/comment/40906621
has answer: http://stackoverflow.com/a/26103468
accepted answer: http://stackoverflow.com/a/26103468

http://stackoverflow.com/comment/40974513
has text: @NiettheDarkAbsol I agree with you on your last comment. I have updated my answer.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26140645

http://stackoverflow.com/q/26066145
has comment: http://stackoverflow.com/comment/40839098
possible better answer: http://stackoverflow.com/a/26066212
answer count: 2
has answer: http://stackoverflow.com/a/26066212
tagged with: javascript
has comment: http://stackoverflow.com/comment/40839263
favorite count: 0
has answer: http://stackoverflow.com/a/26066324
has comment: http://stackoverflow.com/comment/40839342
has comment: http://stackoverflow.com/comment/40839131
tagged with: http://stackoverflow.com/tag/html
has body: The problem I'm having is getting my external JavaScript file to work with my html. The point of the javascript is to highlight required fields when they are submitted empty and then return to their original color when clicked on or (onfocus). I don't know how to correctly link the javascript to make it apply to the html I tried using onload="function();" within the &lt; body > but I know that isn't right. I'm just completely lost, so any help or guidance would be greatly appreciated. HTML here: http://pastebin.com/Zwsqn7kr CSS here: http://pastebin.com/zpNkpALd JavaScript here: window.onload = function () { document.getElementById('mainForm').onsubmit = function (e) { var t = document.getElementsById("title"); var d = document.getElementsById("description"); var l = document.getElementsById("license"); var tv = document.getElementsById("title").value; var dv = document.getElementsById("description").value; if (tv == null || tv === "") { e.preventDefault(); title.style.backgroundColor = "red"; title.parentNode.style.backgroundColor = "red"; } if (dv == null || dv === "") { e.preventDefault(); description.style.backgroundColor = "red"; description.parentNode.style.backgroundColor = "red"; } if (!l.checked) { e.preventDefault(); license.style.backgroundColor = "red"; license.parentNode.style.backgroundColor = "red"; } t.onfocus = function () { title.style.backgroundColor = "white"; title.parentNode.style.backgroundColor = "white"; }; d.onfocus = function () { description.style.backgroundColor = "white"; description.parentNode.style.backgroundColor = "white"; }; l.onfocus = function () { license.style.backgroundColor = "EBF4FB"; license.parentNode.style.backgroundColor = "EBF4FB"; }; }; };
type: AnsweredQuestion
score: -4
upvote count: 1
accepted answer: http://stackoverflow.com/a/26066324
type: Question
has title: external javascript will not work
downvote count: 5

http://stackoverflow.com/q/26117441
has answer: http://stackoverflow.com/a/26117669
tagged with: angularjs
has title: Angular service calling another service
accepted answer: http://stackoverflow.com/a/26117669
type: AnsweredQuestion
type: Question
has body: I'm making a simple Angular app to manage incomes. The incomes come from projects that I store in json (for testing purpose). So, basically, I use a service in Angular to get this json and I would like to have another service that call Projects service and filter the incomes of each projects. Here's the code : facturateApp.service('Projects', function($http){ var Projects = { async: function() { var promise = $http.get('base.json').then(function (response) { return response.data; }); return promise; } }; return Projects; }); facturateApp.service('Incomes', function(Projects){ var incomes = []; Projects.async().then(function(d) { var projects = d; angular.forEach(projects, function(project){ if(typeof(project.account.accountAmount) == 'number' &amp;&amp; project.account.accountAmount &gt; 0){ var newIncome = {}; newIncome.projectName = project.projectName; newIncome.clientName = project.clientName; newIncome.typeIncome = "Accompte"; newIncome.amount = project.account.amountAccount; newIncome.date = project.account.accountDate; newIncome.notes = project.account.accountType; incomes.push(newIncome); } }); angular.forEach(projects, function(project){ if (typeof(project.total.totalAmount) == 'number' &amp;&amp; project.total.totalAmount &gt; 0){ var newIncome = {}; newIncome.projectName = project.projectName; newIncome.clientName = project.clientName; newIncome.typeIncome = "Accompte"; newIncome.amount = project.total.totalAmount; newIncome.date = project.total.totalDate; newIncome.notes = project.total.totalType; incomes.push(newIncome); } }); }); console.log(incomes); // still returns []; return incomes; }); My problem is that the last log returns an empty array. Actually it works as supposed : incomes is returned before Projects.async().then(function(d) is executed. But I don't know wait for this function to be executed before returning incomes in a service that call another service... Any help ?
downvote count: 0
tagged with: javascript
score: 4
upvote count: 4
answer count: 1
favorite count: 0

http://stackoverflow.com/a/26094991
has body: You should try this simple code snippet. You don't need jQuery to do this operation. Simple JS would do. var sum = 0; for(var item in fruits){ sum += ~~(fruits[item].price) } console.log(sum) Cheers!
type: Answer
answers question: http://stackoverflow.com/q/26094309
score: 0

http://stackoverflow.com/q/26137677
has comment: http://stackoverflow.com/comment/40969007
downvote count: 1
type: AnsweredQuestion
has title: How to implement Obfuscated javascript code
accepted answer: http://stackoverflow.com/a/26137780
has comment: http://stackoverflow.com/comment/40969051
type: Question
upvote count: 0
answer count: 1
has body: Help me out! I would like to ask how to implement my Obfuscated code? heres my sample code var accessToken = $('#access_token').val(); var myapp = angular.module("loginApp", []); myapp.controller("loginCtrl", function ($scope, $http) { $scope.log_username = ''; $scope.log_password = ''; $scope.loginfirst = $("#reqerr").val(); sample code obfuscated code eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('3 4=$(\'#8\').2();3 1=7.6("5",[]);1.g("9",e($0,$f){$0.d=\'\';$0.c=\'\';$0.a=$("#b").2();',17,17,'scope|myapp|val|var|accessToken|loginApp|module|angular|access_token|loginCtrl|loginfirst|reqerr|log_password|log_username|function|http|controller'.split('|'),0,{})) my problem is how do i implement it? i tried to replace my sample code with obfuscated code, i got an error, and i have no idea on how should i implement it? PS dont mind the code above , its just a sample..
has comment: http://stackoverflow.com/comment/40969348
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/18782324
has comment: http://stackoverflow.com/comment/40969245
has answer: http://stackoverflow.com/a/26137780
has comment: http://stackoverflow.com/comment/40969096
duplicate of: http://stackoverflow.com/q/18782324
tagged with: obfuscation
score: -1

http://stackoverflow.com/q/26066707
type: UnansweredQuestion
score: 2
answer count: 0
downvote count: 0
type: Question
tagged with: deep-linking
linked to: http://stackoverflow.com/q/6964515
has body: I have a script like this and will be called when the button is clicked. Open App $scope.openIOSApp = function() { // url format: myapp:// $window.location.href = $scope.assets.urls.iosAppCustomUrl + "action/signupdone?email=" + $scope.myInfo.email; }; There is a technique using timeout for failover (https://stackoverflow.com/a/6965646/772481). However, angular $timeout won't cancel automatically if the link works. What is the alternative to open app store on angular if the custom app link doesn't exist?
tagged with: url-scheme
tagged with: javascript
upvote count: 2
has title: AngularJs open iOS app custom url and fail over
tagged with: ios
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/40998546
has text: Well, you're already making the value extremely public by putting it on the internet! (Even if it's in a hidden field, people can still e.g. look at the source.) This is pretty far outside the scope of the original question, though, so if you have more general questions, could you try finding someone in chat?
comment on: http://stackoverflow.com/a/26111857
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26143334
has comment: http://stackoverflow.com/comment/40979428
has body: Given css class: .red { color: rgb(255,0,0); background-color: rgb(0, 255, 0); } I then add a div to the dom via: $("&lt;div&gt;&lt;/div&gt;").addClass("red").hide().appendTo("body"); I can get single properties using: $(".red").css("color"); Which returns rgb(255, 0, 0); My question is how can I loop through the css class properties and return them all without directly using the property name?
has comment: http://stackoverflow.com/comment/40979881
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40980143
tagged with: jquery
linked to: http://stackoverflow.com/q/1004475
has comment: http://stackoverflow.com/comment/40980290
has comment: http://stackoverflow.com/comment/40979646
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26144711
has comment: http://stackoverflow.com/comment/40980210
has comment: http://stackoverflow.com/comment/40981250
has title: How do I return all CSS properties applied to an element by an external stylesheet class (not get computed styles!)?
type: Question
has answer: http://stackoverflow.com/a/26144711
tagged with: javascript
has comment: http://stackoverflow.com/comment/40980898
tagged with: dom

http://stackoverflow.com/a/26115519
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41088275
has body: jjs is just the name of a command-line tool, distributed with the JDK, that invokes Nashorn. See the Java Platform Tools Reference for details.
answers question: http://stackoverflow.com/q/26114978
type: Answer
accepted answer of: http://stackoverflow.com/q/26114978
has comment: http://stackoverflow.com/comment/41088205
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41088031

http://stackoverflow.com/comment/40821544
has text: You cannot gave same id to more than one div. please edit it
type: QuestionComment
comment on: http://stackoverflow.com/q/26056928
type: Comment
score: 2

http://stackoverflow.com/q/26056162
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26674044
tagged with: font-awesome
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
has title: Spinning icon on JQuery setTimeout
accepted answer: http://stackoverflow.com/a/26674044
possible better answer: http://stackoverflow.com/a/26056823
has answer: http://stackoverflow.com/a/26056823
has body: I have a slide in search box, and to search the products I call this function: $('#json_search').keyup(function(){ clearTimeout(timeoutP); $('#search-resultlist').append(' '); timeoutP = setTimeout(searchItem, 1000); }); This just calls a function which loads a partial html page: var searchItem = function() { if($('#json_search').val()) { $('#search-resultlist').load('/search/quick/q/'+ $('#json_search').val() ); } else { $('#search-resultlist').html(''); } } HTML: Now the spinning icon shows up when I start searching, but it shows a new icon everytime I press a key,and I just want it to show up 1 time. Anyone have an idea on how to achieve this?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: Question

http://stackoverflow.com/comment/40931961
type: QuestionComment
comment on: http://stackoverflow.com/q/26117191
has text: getJSON function is async, which means it makes a request to server, then it executes the callback you pass. It means that console.log just runs earlier than response is received try console.log before ajax call and on response received, you'll see my point
score: 0
type: Comment

http://stackoverflow.com/a/26162153
has comment: http://stackoverflow.com/comment/41023132
answers question: http://stackoverflow.com/q/26162081
score: 0
has comment: http://stackoverflow.com/comment/41024673
has comment: http://stackoverflow.com/comment/41024419
type: Answer
has body: When you do the form.submit() you tell the form to perform the action which is stated in the forms action attribute. Thus it will automatically be redirected to whatever is set there. Example: &lt;form action="submit.php" method="POST"&gt; You code will redirect the user to the submit.php after he dismisses the alert message. When redirected to the submit.php you will have to handle a redirect from there on. This is of course unless you are using AJAX to post the form or something like that. Then you can just add: window.location.href = "/index.html"; Although, in that case, it would better be placed in the success-function of the AJAX call: function Confirm(form){alert("Thank you for your feedback.");form.submit(); window.location.href = "/index.html";}

http://stackoverflow.com/a/26052837
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/26052766
has comment: http://stackoverflow.com/comment/40814624
has comment: http://stackoverflow.com/comment/40814881
upvote count: 1
answers question: http://stackoverflow.com/q/26052766
has body: Change ngModel: "=" to sth: "=ngModel" to get the input model working. Use {{}} notation as you pointed out in the comments here for the attributes. And then make your parent attributes something like data-min so you don't have ugly source code.
has comment: http://stackoverflow.com/comment/40814738
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40814765
has comment: http://stackoverflow.com/comment/40814918

http://stackoverflow.com/q/26121909
has answer: http://stackoverflow.com/a/26122614
has body: I have a form separated in three parts. Each part is dynamic and populated by data from database. For example, every item saved in database can be shown in form as input only if its status is 1. Also, together with selected data my PHP script generates buttons with + and - javascript function as shown in this fiddle The problem that I don't know how to resolve is how to save name and value for each input where value is greater than 0. I was wandering if some of this two javasripts are usable for resolving my problem? Script 1, see this jsfiddle: $('forma').submit(function(){ $('.qty').each(function(){ if($(this).val() != '0') { $('output').text($('output').text()+ ' ' + $(this).attr('name') + ' ' + $(this).val()+ ';' ); } }); return false; }); Script 2: var inputs = document.getElementById('forma').children; var data = {}; for(var i in inputs ){ if(inputs[i].value != 0)data[inputs[i].name] = inputs[i].value; } save.php file example: &lt;?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("article_db") or die(mysql_error()); $sql="INSERT INTO article (order) VALUES ('".$_POST['output']."')"; $save = mysql_query($sql); mysql_close(); ?&gt; Script 3: $(document).ready(function() { $('#forma').submit(function(e){ e.preventDefault(); $('.qty').each(function(){ if($(this).val() != '0') { $('#output').text($('#output').text()+ ' ' + $(this).attr('name') + ' ' + $(this).val()+ ';' ); } }); var e=$(this); var output = document.getElementById('#output'); var out = $(e).val(); $.ajax({ type: "POST", url: "save.php", dataType: "json", data: "out="+out, success: function(response) { if (response.ok){ alert("Saved: " + response) }else{ alert(response.error); } }, error: function(){ alert("This won't gonna work like that!"); } }); }); }); and save.php: &lt;?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("caffe") or die(mysql_error()); if(isset($_POST['forma'])){ $sql="INSERT INTO narudzbe(narudzba) VALUES ('".$_POST…
has comment: http://stackoverflow.com/comment/40940415
possible better answer: http://stackoverflow.com/a/26159891
tagged with: php
has answer: http://stackoverflow.com/a/26159891
type: Question
has comment: http://stackoverflow.com/comment/40940212
tagged with: mysql
accepted answer: http://stackoverflow.com/a/26122614
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: ajax
has title: Save data into MySQL database if value is greater than 0 using AJAX or XMLHttprequest
has comment: http://stackoverflow.com/comment/40940143
type: AnsweredQuestion

http://stackoverflow.com/q/26062963
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26063077
has comment: http://stackoverflow.com/comment/41738161
score: 0
tagged with: jquery-ui
accepted answer: http://stackoverflow.com/a/26063077
has body: This is my problem: i've got this: $("table").selectable({ filter: "td", start: function() { so, every td and every tr are "Selectable", but, i did something like this: selecting: function(){ if(posicionInicial.posy == arregloObjetos[1].posy) //Esta seleccionando por columnas { if(direccionSeleccion.posy != posicionInicial.posy) { $(".ui-selectee").unbind(); } } } i want to "unbind" the event of the "Selectable" of other "td"s that are not in the same row or column... (Please, remember that i need to cut the event from inside of itself...) But i tried with that "unbind" of the class created by the jqueryUI (".ui-selectee")... But it doesn't work... Some help, please? thanks
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26063024
has title: How to remove event "selectable" of jQueryUI with javaScript/jQuery?
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26063024

http://stackoverflow.com/comment/40878072
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26087573
has text: Chain on a `fail` and see what fails ?

http://stackoverflow.com/comment/41793382
score: 0
type: Comment
has text: "according to the author", "Version 0.0.3 last updated 19 days ago" - can anyone confirm this actually works?
type: AnswerComment
comment on: http://stackoverflow.com/a/26551618

http://stackoverflow.com/q/26126076
has body: I have a contact form in my website. Subject is a text field in this form. I want to restrict users to type certain words in that field. For example a user type XXX or MMM in subject field, we need to show error message.
has title: How to restrict certain words in text field using javascript?
answer count: 1
has answer: http://stackoverflow.com/a/26126462
tagged with: javascript
has comment: http://stackoverflow.com/comment/40947912
downvote count: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26126462
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
score: -1
upvote count: 3

http://stackoverflow.com/a/36545905
has body: Try this tutorial- https://www.youtube.com/embed/A5SkbcId-v0 U should have your answer. Update- According to Google Policy, if u like to have your document viewed with a iFrame, then embedded=true should be in the URL. Demo Code-
answers question: http://stackoverflow.com/q/26079476
downvote count: 1
score: 3
has comment: http://stackoverflow.com/comment/107288851
upvote count: 4
type: Answer

http://stackoverflow.com/comment/40997642
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26152725
has text: A quick [Google search](http://www.google.com/search?q=change+input+value+with+javascript) would have yielded the answers you're looking for.
score: 0

http://stackoverflow.com/q/26163397
has comment: http://stackoverflow.com/comment/41016974
type: Question
has title: Javascript message box doesnot get closed after ajax call
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/41017506
score: 0
has comment: http://stackoverflow.com/comment/41017034
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41017292
has comment: http://stackoverflow.com/comment/41017070
answer count: 0
type: UnansweredQuestion
has body: aMy scenario is like this. I want to delete a resource. When I click on delete href I pop-up a javascript message box (delete confirmation) When The okay button is clicked my call is going to backend though ajax function as I want to capture the response of the backend. This is the href &lt;a data-href="javascript:subscriptionLookup('+full.appId+');" data-toggle="modal" data-target="#confirm-delete" href="#"&gt;[Delete]&lt;/a&gt; My confirmation message box pops-up correctly. Then I click on okay button on that box. The resource is deleting but my message box don't get closed. Also I want to open ajax dialog box to capture the response. What would be the reason for this ? Here is my ajax function &lt;script type="text/javascript"&gt; function subscriptionLookup(appID) { $.ajax({ url:'deleteApplication?appId='+appID, type: "GET", success: function (response) { alert(response); }, error: function(response) { alert(response); } }); } &lt;script&gt; $('#confirm-delete').on('show.bs.modal', function(e) { $(this).find('.danger').attr('href', $(e.relatedTarget).data('href')); $('.debug-url').html('Delete URL: &lt;strong&gt;' + $(this).find('.danger').attr('href') + '&lt;/strong&gt;'); }) &lt;/script&gt;
has comment: http://stackoverflow.com/comment/41016988

http://stackoverflow.com/q/26039294
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: dhtmlx
score: 2
downvote count: 0
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26039537
accepted answer: http://stackoverflow.com/a/26039537
upvote count: 2
has title: How to create bottom toolbar (statusbar) in DHTMLX?
has body: I've created a toolbar at the top of a cell, but I would like to put it to the bottom. How is it possible? var toolbar = acc2.cells(cell_id).attachToolbar(); The constructor of dhtmlXToolbar has 4 constructor parameter (doc), there is nothing about it's position: id - {string} id of menu item text - {string} caption of menu item img - {string} url of image related to menu item img_disabled - {string} url which will be used for item in disabled state I've searched a lot, but I have no idea, if it's possible somehow. And if it is, then how.
answer count: 1

http://stackoverflow.com/q/26121824
type: Question
has comment: http://stackoverflow.com/comment/40940007
has body: I'm using Azure API Management to deliver a clean interface to third parties for integration purposes. I want do a POST with a JSON object to create this object in the backend. This works fine in the test console available in the portal site, but it doesn't work when I try to do a simple client script from a web page: $.ajax({ url: 'https://.azure-api.net/api/samplerequest/create?' + $.param(params), type: 'POST', data: JSON.stringify(sampleRequest), contentType: "application/json; charset=utf-8", dataType: "json", success: function (data, par2, par3) { $("#txtResult").val(JSON.stringify(data)); } }); Setting the contentType header to 'application/json' forces the browser to perform an OPTIONS call first. My WebAPI project is setup to enable CORS and I have tested this. My WebAPI project returns the following headers for the OPTIONS method: Access-Control-Allow-Head... content-type Access-Control-Allow-Orig... * However, if I try to call this operation by using the Azure Management API, I get a 200 status for the OPTIONS method, but no other headers are present. I've tried many policy-configurations, this was my latest attempt: * POST OPTIONS contentType What am I missing to make this work?
has comment: http://stackoverflow.com/comment/62987667
upvote count: 13
has comment: http://stackoverflow.com/comment/44780011
has comment: http://stackoverflow.com/comment/70335385
has comment: http://stackoverflow.com/comment/43839022
answer count: 1
has title: Azure API Management > CORS and POST
tagged with: javascript
type: UnansweredQuestion
score: 13
downvote count: 0
tagged with: azure-api-management
favorite count: 0
has answer: http://stackoverflow.com/a/54990079

http://stackoverflow.com/q/26081457
has title: How to bring JavaScript array data from .js file into .jsp file
type: Question
has comment: http://stackoverflow.com/comment/40867167
has comment: http://stackoverflow.com/comment/40867547
tagged with: arrays
tagged with: jsp
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40867248
has comment: http://stackoverflow.com/comment/40867670
score: 0
type: UnansweredQuestion
answer count: 0
has body: I have a JavaScript file that prompts a form. After the user fills the data and clicks on "submit", the data will be stored in a JavaScript array. How can I retrieve/display this array from the .js file in my .jsp file? $(document).ready(function() { var table = []; //data filled will be stored in array called table[] $("#send").click(function() { var kpiName = $("#kpiName").val(); var startDate = $("#startDate").val(); var endDate = $("#endDate").val(); var value = $("#value").val(); var unit = $("#unit").val(); if (kpiName === "" || startDate === "" || endDate === "" || value === "" || unit=== "") { alert("Please Fill All Fields"); } else { table.push({ kpiName: kpiName, startDate: startDate, endDate: endDate, value: value, unit: unit }); $("#contactdiv").css("display", "none"); });

http://stackoverflow.com/comment/40817935
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26054139
type: QuestionComment
has text: @Omar thanks for your reply ..i refresh(change) the page even though the popup is not refreshed ..then there is no use in refresh(changepage) in JQM..

http://stackoverflow.com/comment/40899761
comment on: http://stackoverflow.com/q/26099408
has text: Are you sure your cookie is not rejected? According to this [post](http://stackoverflow.com/questions/5258126/domain-set-cookie-for-subdomain) it should be rejected.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41005747
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26124515
score: 0
has text: I posted it. My question is only about pure JS loop and inner loop I think. But as you can see I'm getting lost into it...

http://stackoverflow.com/comment/40831712
score: 1
comment on: http://stackoverflow.com/q/26062251
has text: It should work, when/how are you calling those two lines?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41034674
comment on: http://stackoverflow.com/a/26172759
score: 1
type: AnswerComment
type: Comment
has text: Wow. It works. Thanks a million Dalorzo. Haber un buena mannana.

http://stackoverflow.com/comment/40954119
has text: Thanks! But I want to disable that week the selected date is in. That tricks me.
comment on: http://stackoverflow.com/a/26129004
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26119766
has answer: http://stackoverflow.com/a/26121552
has title: mmenu dont work for undersites in a href
type: Question
tagged with: typo3-6.2.x
possible better answer: http://stackoverflow.com/a/26120054
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26121232
has body: i have a problem. the cms TYPO3 build ever the url in the a-Tag / href: i use this mobile menu: mmenu.frebsite.nl here the frontend html: &lt;a class="mMenuButton" href="site2.html#menu"&gt;&lt;/a&gt; URL after click: http://www.domain.com/site2.html#menu Template HTML - close/open Button: &lt;a class="mMenuButton" href="#menu"&gt;&lt;/a&gt; and here the js: $(document).ready(function() { $("#menu").mmenu({ header: { add: true, update: true, title: "Menü / Startseite", }, offCanvas: { position: "top", zposition: "front" } }) }); the MMenu works fine on the home-site! How can i remove the "site2.html" ? thanks link: https://github.com/BeSite/jQuery.mmenu/issues/184
score: 0
tagged with: typo3
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has comment: http://stackoverflow.com/comment/40935849
accepted answer: http://stackoverflow.com/a/26121232
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26120054
has answer: http://stackoverflow.com/a/26123085

http://stackoverflow.com/comment/41011615
type: QuestionComment
has text: `window.setTimeout(window.close, 600);`
comment on: http://stackoverflow.com/q/26160358
score: 0
type: Comment

http://stackoverflow.com/q/26064496
possible better answer: http://stackoverflow.com/a/59831009
favorite count: 0
has body: I have a link with an inline attribute of style="color: #FF0000;". I recently upgraded to latest CKEditor, after years of neglect. Now when I call CKEDITOR.inline, it strips all the links. I found http://docs.ckeditor.com/#!/api/CKEDITOR.dtd-property-S-editable, which doesn't have an a in there. I did CKEDITOR.dtd.$editable.a = 1; and it still strips links. What am I missing here? I literally followed the flow from the API inline call to that, but it seems that I'm doing something wrong. EDIT I also find that is removing the class attribute from elements. Everything else seems okay.
accepted answer: http://stackoverflow.com/a/26069043
type: AnsweredQuestion
score: 3
upvote count: 3
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/59831009
has title: Why is CKEditor removing links and attributes
downvote count: 0
has answer: http://stackoverflow.com/a/26069043
tagged with: javascript
tagged with: ckeditor

http://stackoverflow.com/comment/58723869
type: QuestionComment
has text: You aren't changing any items in the collection, you're just updating some child value of one of the objects in the collection. So, angular doesn't think that anything has changed in the collection, and doesn't re-render anything. Easy ways to solve this: $scope.historydata = scope.slice(0); but it really isn't a solution because it has bad performance.
comment on: http://stackoverflow.com/q/26043575
score: 0
type: Comment

http://stackoverflow.com/comment/41237130
score: 0
has text: Yes.... It's the second loop that killed it all... but when I dig around found out that one of my other scripts actually multiplying the data by factor of... not adding the additional data in to it... causing the site to crash...
comment on: http://stackoverflow.com/q/26126694
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26050136
has comment: http://stackoverflow.com/comment/40837900
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40837970
has comment: http://stackoverflow.com/comment/40837835
answers question: http://stackoverflow.com/q/26043433
has comment: http://stackoverflow.com/comment/40842687
has body: I awarded this to @wired_in for the help provided. Here I will provide a working version of the code that finally resolved my issue. My theory - if the mapping can take the result of an AJAX call and auto-magically map it to an observable, why can't any ordinary POJO? Well, it can! This basic ability is liberating. Now I am free to create models without polluting them with 'observable'. The models can behave like any ordinary object with no special handling. Manipulate the model to desire, then when needed to be represented on the view, bind it via the ko.mapping.fromJS call. Here is the final solution. I will present it in the same order I presented the original question... Basic POJO Class: class DefaultModel { public myField: string; } export = DefaultModel; View: TypeScript HTML App TypeScript HTML App View Model: /// <reference path="../Scripts/typings/knockout/knockout.d.ts" /> /// <reference path="../Scripts/typings/knockout.mapping/knockout.mapping.d.ts" /> import DefaultModel = require("Models/DefaultModel"); import ko = require("knockout"); class DefaultViewModel { public basicModelInstance: DefaultModel; public boundModel: KnockoutObservable<DefaultModel>; constructor() { // SETUP A BASIC INSTANCE OF A POJO this.basicModelInstance = new DefaultModel; this.basicModelInstance.myField = "Hello World!"; // LOAD THE POPULATED POJO INTO THE BOUND OBVSERVABLE OBJECT this.boundModel = ko.mapping.fromJS(this.basicModelInstance); } myButton_Click() { // UPDATE THE POJO this.basicModelInstance.myField = "Goodbye Moon..."; // RELOAD THE POJO INTO THE BOUND OBJECT this.boundModel = ko.mapping.fromJS(this.basicModelInstance, this.boundModel); } } export = DefaultViewModel; RequireJS Configuration: /// <reference path="../Scripts/typings/requirejs/require.d.ts" /> require.config({ baseUrl: "", paths: { "jQuery": "Scripts/jquery-2.1.1", "knockout": "Scripts/knockout-3.2.0.debug", "utilities": "Application/utilities", "ViewModelMapper": "Application/ViewModelMapper", "kom…
downvote count: 0

http://stackoverflow.com/comment/40980701
type: QuestionComment
has text: Why is `form` a string at all, and not an element?
comment on: http://stackoverflow.com/q/26143562
score: 0
type: Comment

http://stackoverflow.com/q/26109538
type: Question
has title: read a html checkbox in javascript
tagged with: javascript
tagged with: jquery
answer count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: websocket
has answer: http://stackoverflow.com/a/26109571
has answer: http://stackoverflow.com/a/26109584
type: UnansweredQuestion
tagged with: checkbox
has body: Not sure if this is the correct question but baiscally I have html form which has a checkbox. i'm using websockets that need to pull that value with the javascript code. But regardless of weather the box is checked or not, it shows the value of 'yes'. How should I go about getting the coorect value to pull into python...? Flask-SocketIO Test Flask-SocketIO Test Send: Receive:
score: 0
linked to: http://stackoverflow.com/q/987967

http://stackoverflow.com/comment/41055063
type: Comment
has text: Why not `var imgs={london:'image1',manchester:'image2'}; [...].attr('src',imgs[(venue+'').toLowerCase()]);`?
score: 2
type: AnswerComment
comment on: http://stackoverflow.com/a/26183762

http://stackoverflow.com/q/26059928
has body: Lets say I have large number html elements with different id's that I want to repeatedly change the style of in my controller (for spectrum visualisation). What is the easiest way to do this (The angular way) without having to write repeating HTML code like //.. And so on In my .js file i have var sp = [] for(var i = 1; i < 41; i++) sp[i] = document.getElementById('sp_' + i); //Some Calculations for(var i = 1; i < 41; i++) sp[i].style.height = '' + 50*vecAverageAmp[i-1] +'px'; This works fine, but my .html file is very long. Maybe I can use ng-repeat in some way?
accepted answer: http://stackoverflow.com/a/26060672
tagged with: javascript
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/26060168
possible better answer: http://stackoverflow.com/a/26060563
has answer: http://stackoverflow.com/a/26060563
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26060672
has title: Manipulate multiple divs with different id using Angular
upvote count: 1
tagged with: css
type: AnsweredQuestion
score: 1
type: Question

http://stackoverflow.com/comment/40961687
score: 2
has text: This is valid, but `$(".edit_main").on("keydown", "textarea:last" function(e) {...` would be easier on the eyes.
type: AnswerComment
comment on: http://stackoverflow.com/a/26129034
type: Comment

http://stackoverflow.com/comment/40934836
score: 0
has text: That should not be `$.ready`. Use this shortcut instead `$(function(){ YOUR CODE HERE});`.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26119241

http://stackoverflow.com/q/26125880
has answer: http://stackoverflow.com/a/26128034
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40951480
tagged with: master-pages
type: Question
score: 0
tagged with: .net
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net
has body: I am trying to use JQuery in Master Page. I do not get any error, but the JQuery is working. I am trying to use Table Sorter function. MasterFile: .cs FIle (Using Master Page) <uc1:CERDisplayControl ID="displayControl" runat="server" class="tablesort" /> When I try to load the page, I do not get any error but the contents are not loaded properly.
has title: Using JQuery with Master Page

http://stackoverflow.com/comment/40787343
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26037051
has text: Ok, here you have two option: 1. button trigger wrapped inside `<ContentTemplate>` or use 2. ` <asp:AsyncPostBackTrigger ControlID="Button1" /> ` in both cases use on click handler UpdatePanel1.Update();

http://stackoverflow.com/q/26082840
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/26082895
tagged with: http://stackoverflow.com/tag/html
score: -2
has body: This code is a automatic slideshow and i want to make it so when you click next it goes to the next image and back to go to the previous image My current code: &lt;head&gt; &lt;script type="text/javascript"&gt; var image1 = new Image() image1.src = "http://www.adactushousing.co.uk/images/upload/coverImage/Local%20Offer%20CCH.jpg" var image2 = new Image() image2.src = "http://www.northantspfg.co.uk/resources/uploads/news/wordal13-021142.JPG" var image3 = new Image() image3.src = "http://hmstack.files.wordpress.com/2011/07/swimming-for-the-disabled.jpg" var image4 = new Image() image4.src = "http://www.northantspfg.co.uk/resources/uploads/news/HiResLocalOffer13-041205.jpg" &lt;/script&gt; &lt;/head&gt; &lt;img src=\"images/pentagg.jpg\" width=\"500\" height=\"300\" name=\"slide\" /&gt;&lt;/p&gt; &lt;script type=\"text/javascript\"&gt; var step=1; function slideit() { document.images.slide.src = eval(\"image\"+step+\".src\"); if(step&lt;4) step++; else step=1; setTimeout(\"slideit()\",2500); } slideit(); &lt;/script&gt;
downvote count: 2
has title: How to make this Slideshow not automatic but click to change image
has comment: http://stackoverflow.com/comment/40869554
has comment: http://stackoverflow.com/comment/40869543
has comment: http://stackoverflow.com/comment/40869518
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40869541
has answer: http://stackoverflow.com/a/26082895
has comment: http://stackoverflow.com/comment/40869567
upvote count: 0
answer count: 1

http://stackoverflow.com/a/26145540
has body: This works correctly in the latest 0.11 version!
downvote count: 0
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/41134505
has comment: http://stackoverflow.com/comment/41135634
score: 6
has comment: http://stackoverflow.com/comment/41134777
answers question: http://stackoverflow.com/q/26111766

http://stackoverflow.com/comment/40925893
has text: im using 32bit Excel 64 bit Win 7
score: 0
comment on: http://stackoverflow.com/q/26037393
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26099890
has comment: http://stackoverflow.com/comment/40969949
answers question: http://stackoverflow.com/q/26098797
has comment: http://stackoverflow.com/comment/40900571
downvote count: 0
has comment: http://stackoverflow.com/comment/41174781
has body: // get all pairs of number from array a and b, that a[i] + b[j] = sum // return array of pairs function getSumPairs(a, b, sum) { var pa = 0, pb = b.length - 1; var pairs = []; while (pa &lt; a.length &amp;&amp; pb &gt;= 0) { if (a[pa] + b[pb] &gt; sum ) { pb = pb - 1; } else if (a[pa] + b[pb] &lt; sum) { pa = pa + 1; } else { pairs.push([a[pa], b[pb]]); pa = pa + 1; pb = pb - 1; } } return pairs; } // data for test var arr1 = [-1, 1, 2, 3, 4, 5, 7, 9], arr2 = [5, 7, 10, 12, 13, 14, 15]; console.log(getSumPairs(arr1, arr2, 14)) console.log(getSumPairs(arr1, arr2, 15)) The algorithm is to sum the data from array a and b from different end. As the arrays are sorted: if a[i] + b[j] &lt; sum, a[i] + b[j-1] will still less than sum, so just need to increase i. if a[i] + b[j] &gt; sum, a[i+1] + b[j] will still larger than sum, so just need to decrease j. Thus, all the elements from the tow arrays are only looped once. The complexity is O(M + N), for a[N] and b[M]. Try for yourself http://jsfiddle.net/9L4p1j3L/
has comment: http://stackoverflow.com/comment/40969583
upvote count: 2
has comment: http://stackoverflow.com/comment/41174879
type: Answer
score: 2

http://stackoverflow.com/comment/40802219
score: 4
has text: Then either the function isn't defined, or it isn't in the global scope. We can't see the code in your scripts to tell.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26046120

http://stackoverflow.com/a/26128484
type: Answer
has body: If possible, try not to use the eval statement in JS. It's considered a bad practice. See: Why is using the JavaScript eval function a bad idea? Demo: http://codepen.io/anon/pen/Kxekc Instead use the following to convert your input to a number: var newArg = parseInt(document.calculator.display.value,10); if (newArg == 42) { alert("You have found the meaning of life, the universe, and everything."); } The function at the bottom is also mistyped: //fuction meaning(document.calculator.display.value)
answers question: http://stackoverflow.com/q/26128272
score: 0

http://stackoverflow.com/a/26178718
answers question: http://stackoverflow.com/q/26178596
has comment: http://stackoverflow.com/comment/41110883
has comment: http://stackoverflow.com/comment/41047629
type: Answer
has body: Here is solution Generally, the problem is that this element does not have initial "right:" value. And what jQuery's animation does - is increasing existing (initial) value to the target value. I've added right: 78px to "aside" and removed top:78px. Also, you can give pure integers to .css() method CSS: aside { float: right; right:78px; JS: $("aside").addClass("animate").animate({ right: 0 }); UPDATED and here is update for Back animation: JSFiddle UPDATE2 Here is improved version: JSFiddle It has more complex logic, that is ready for different "main" sizes. It might not work for you for you 100%, but gives the idea about the direction
has comment: http://stackoverflow.com/comment/41046733
has comment: http://stackoverflow.com/comment/41047527
has comment: http://stackoverflow.com/comment/41045586
upvote count: 1
has comment: http://stackoverflow.com/comment/41050379
downvote count: 0
has comment: http://stackoverflow.com/comment/41048987
has comment: http://stackoverflow.com/comment/41045627
accepted answer of: http://stackoverflow.com/q/26178596
type: AcceptedAnswer
score: 1

http://stackoverflow.com/comment/40926448
has text: @Brad It solved the undefined issue. Could you explain why so I can understand the issue??
comment on: http://stackoverflow.com/q/26107939
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26115776
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40928940
has body: I would create the data object outside the $post and then just pass it as a variable: $('#goBtn').click(function(){ alert("done!"); var data = { from:$('#from_oq').val(), to:$('#to_oq').val(), radioG:$('#radioGroup').val(), // If a and b are required then create them here with empty values. a: "", b: "" }; if ($('#type_oq').val() == "fruit") { data.a = $('#a_oq').val(); data.b = $('#b_oq').val(); }; $.post('sessions.php', data, function(response) { $('#postrequest').html(response); }); }); Just to be extra clear, it turns out that you can't use conditions inside of the object creation, e.g. this wouldn't work: var data = { if (true) { a:"a", } b: "b" };
accepted answer of: http://stackoverflow.com/q/26115586
answers question: http://stackoverflow.com/q/26115586
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40929147
score: 1
upvote count: 1

http://stackoverflow.com/q/26079240
tagged with: javascript
has answer: http://stackoverflow.com/a/26080695
has body: SAy, i have script for uploading image to servor and display.It is also working fine.But, i want not to upload image manually to form,just double click the image and it will be uploaded in a same way as we have option in google "search chrome for this image" or just a button using jquery when clicked image will be uploaded.Any idea,my code i use to upload files: &lt;?php $target_path = "./"; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)){ echo "&lt;img src='".$target_path."' class='healthfood' /&gt;"; } ?&gt; &lt;body&gt; &lt;form enctype="multipart/form-data" action="&lt;?php $_PHP_SELF ?&gt;" method="POST"&gt; &lt;input type="hidden" name="file" value="upload file" /&gt; Choose a file to upload: &lt;input name="uploadedfile" type="file" /&gt;&lt;br /&gt; &lt;input type="submit" value="Upload File" /&gt; &lt;/form&gt;
score: 0
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/26079326
has title: Automatic image uploading in php issue
type: Question
answer count: 2

http://stackoverflow.com/q/26101648
linked to: http://stackoverflow.com/q/25968141
score: 0
has comment: http://stackoverflow.com/comment/40912192
has comment: http://stackoverflow.com/comment/40914274
tagged with: android
answer count: 1
has comment: http://stackoverflow.com/comment/40911805
tagged with: cordova
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/21448992
has comment: http://stackoverflow.com/comment/40914666
tagged with: swipe
has comment: http://stackoverflow.com/comment/40919454
linked to: http://stackoverflow.com/q/17131815
type: Question
has comment: http://stackoverflow.com/comment/40917184
has title: Swipe a div prints a message and disappear instead of display another div ( PhoneGap 2.9 - Android )
has body: I want to have a swipe function in my first html page of the mobile application that I am implementing. I use Phonegap 2.9 and Eclipse. For this function, I used from this files the Page_scrolling.html and the JavaScripts it calls. My head in .html file that I want to have the swipe function: Guide-Me For-All According to the link, I needed the last .css link and the last four .js links. The forth JavaScript is the one that is inside the Page_scrolling.html in the tutorial I put above. The only file that I changed, is the last JavaScript: My Swipe.js contains : $(function() { $("#trust_us").swipe( { swipeLeft:swipe2, swipeRight:swipe2} ); $("#how_it_works").swipe( { swipeLeft:swipe2, swipeRight:swipe2} ); $("#owners").swipe( { swipeLeft:swipe2, swipeRight:swipe2} ); $("#sign_up_in").swipe( { swipeLeft:swipe2, swipeRight:swipe2} ); //Swipe handlers. function swipe1(event, direction, distance, duration, fingerCount) { $(this).text( "You have swiped " + direction +' with ' + fingerCount +' fingers' ); } function swipe2(event, phase, direction, distance) { $(this).text( phase +" you have swiped " + distance + "px in direction:" + direction ); } }); //{ swipeStatus:swipe2, allowPageScroll:"horizontal"} My body file is divided in the divs I want to swipe: Why you should trust us : All the info about the shops, are being validated with their owners. You can send your thoughts or complaints to the shops' owners, so that they will do improvements to it. * *Only for occasions when there was a contact between administrator - shop's owner! How it works : First: 1. Register 5. Rate it according to your experience For the owners of a shop : Register After that, you can take interesting reports and useful statistics about your shop. * Now, you can do improvements to your shop according to what the customers need so you can get even more of them. *Contact the admin of the app for more information. ...REGISTER NOW OR SIGN IN... Sign-Up Now! Copyright (c) 2014 Guide-Me For-All. Desig…
tagged with: javascript
has answer: http://stackoverflow.com/a/26150530

http://stackoverflow.com/a/26073093
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/40851963
has body: http://www.bootply.com/rbuS0mHLvd check out this link if it will help. If not then please explain the problem in detail with this code relevant to your code. Basically i have removed the data-toggle=collapse as it will add the "in" class to your dropdown by which the dropdown is opened untill the class "in" is removed.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40851597
has comment: http://stackoverflow.com/comment/40851534
accepted answer of: http://stackoverflow.com/q/26072955
answers question: http://stackoverflow.com/q/26072955
type: Answer
has comment: http://stackoverflow.com/comment/40853515
has comment: http://stackoverflow.com/comment/40851938

http://stackoverflow.com/comment/40954988
type: QuestionComment
type: Comment
has text: Just so you know, this has nothing to do with XSLT. If the HTML is being rendered as expected, then XSLT has been and gone. Not sure why you've got a comment inside the script tag; when loading an external script, the tag should be empty.
comment on: http://stackoverflow.com/q/26129676
score: 0

http://stackoverflow.com/comment/40811736
type: QuestionComment
has text: Hi I agree and disagree at the same time with @Dennis R. Check out my answer and you'll know why. :-)
comment on: http://stackoverflow.com/q/26049483
score: 0
type: Comment

http://stackoverflow.com/comment/41002723
type: Comment
type: QuestionComment
has text: @HendryTanaka I want Auto play only moveLeft.
comment on: http://stackoverflow.com/q/26155717
score: 0

http://stackoverflow.com/comment/40872893
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26084427
has text: @Keblovszki Is it visible at all before clicking on the `a`?
score: 0

http://stackoverflow.com/a/26194549
answers question: http://stackoverflow.com/q/26194495
has body: Fiddle Demo imageLoader(0); //call the function with first image to load `0` as index starts from `0` function imageLoader(i) { //function to load images one by one and pass the array index var image = new Image(50, 50); //create a new image image.src = images[i]; //set src of the image from images array image.onload = function () { //on image load $('body').append(image); //append to the the body if (++i &gt;= images.length) return; //increment i check the length of images is exceeded than return imageLoader(i); //more images are present in array then call the function again } }
accepted answer of: http://stackoverflow.com/q/26194495
downvote count: 0
type: AcceptedAnswer
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/q/26056633
favorite count: 0
has answer: http://stackoverflow.com/a/26056705
has answer: http://stackoverflow.com/a/26056834
accepted answer: http://stackoverflow.com/a/26056674
has answer: http://stackoverflow.com/a/26056701
has answer: http://stackoverflow.com/a/26056844
has answer: http://stackoverflow.com/a/26056811
possible better answer: http://stackoverflow.com/a/26056701
has answer: http://stackoverflow.com/a/26056961
has body: I have a checkbox that, when checked, will display a div. As expected, when it is unchecked, the div will be hidden. I've got as far as the following code but I need a way to check if the checkbox itself is toggling from check to uncheck! $(function(){ if($('#guess_the_score').is(':checked')){ $("#guess_score_show").toggle(); } }); The checkbox has an id of guess_the_score The div to be displayed has an id of guess_score_show Any help would be appreciated :)
upvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26056674
type: Question
has title: Checkbox state needs to show or hide a div
answer count: 8
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26056744

http://stackoverflow.com/q/26155876
tagged with: css
has comment: http://stackoverflow.com/comment/41003875
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41003859
has title: Jquery animation faking the async
has comment: http://stackoverflow.com/comment/41003301
score: 0
has body: I googled and confirmed that there is no async thing in animate(), but couldn't find any solution for my case. Demo http://www.bootply.com/mTPm9tr8Iu in my demo, when you hover over first box u will see the 4th (bottom right) change it's css to margin-top:-100px and vice versa for the right first box. As you can see it seem not so smooth, how to fix that?
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41002981
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41002897
has answer: http://stackoverflow.com/a/26160282

http://stackoverflow.com/q/26143435
has comment: http://stackoverflow.com/comment/40979736
type: Question
has body: does anyone know how to recognize the error, when an Folder will be moved in itself? with the FSO.moveFolder no Problem to move them: fso.MoveFolder("C:\\Temp\\folder1", "C:\\Temp\\folder2\\"); but whats happen when i try to move fso.MoveFolder("C:\\Temp\\folder1", "C:\\Temp\\folder1\\"); in the console i will get an error, thats OK, but how recognize ist, lets say like the "FolderExists Method " if (fso.FolderExists("C:\\Temp\\myFolder")) { document.write("myFolder exists."); } else { document.write("myFolder does not exist."); }
tagged with: fso
has title: FSO (FileSystemObject) Move folder in itself
score: 0
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41010669
has comment: http://stackoverflow.com/comment/40979886
answer count: 0
tagged with: javascript
type: UnansweredQuestion
favorite count: 0

http://stackoverflow.com/comment/40898913
score: 0
type: Comment
type: QuestionComment
has text: no it's not a duplicate because I don't want the image to be visible and in this case onLoadStart is not fired.
comment on: http://stackoverflow.com/q/26098443

http://stackoverflow.com/comment/83041575
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/48035659
type: Comment
has text: The drawing of the page can sometimes take longer than the loading of the script does, so the position isn't that important in all cases. Adding a listener is the preferred way, but `load` is also deprecated for the same reason. [DOMContentLoaded](https://stackoverflow.com/questions/2414750/difference-between-domcontentloaded-and-load-events) is the preferred way, since it fires only after the DOM is fully drawn.

http://stackoverflow.com/q/26149649
upvote count: 2
has answer: http://stackoverflow.com/a/26304163
type: AnsweredQuestion
has body: How can I disable the click-drag multi selection in fabricjs? In this image you can see the selection area with a red border: https://i.sstatic.net/5olYf.jpg I want to prevent that kind of selection, but still allow single object selections.
tagged with: fabricjs
type: Question
has title: prevent click and drag multi selection in fabricjs
score: 2
accepted answer: http://stackoverflow.com/a/26304163
downvote count: 0
tagged with: javascript
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/40801669
score: 4
has text: Im not sure what you're asking..
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26045836

typo3-6.2.x
tags question: http://stackoverflow.com/q/26119766
type: Tag
tag name: typo3-6.2.x

http://stackoverflow.com/comment/41008776
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26159217
has text: Do you want to get mentioned value inside `posts` function?
type: Comment

http://stackoverflow.com/comment/41182321
has text: That looks like a great solution on the Browser side, hyper - BUT do you know what can be done on the iOS/Android side with this? Cheers!
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26201378
type: Comment

http://stackoverflow.com/a/26037952
has body: pushState: true has nothing to do with preventing loading full page when you click links, it's only a way to update url address in the browser address bar. It's evt.preventDefault() that should prevent default behaviour of links. Your provided code applies evt.preventDefault() very selectively in a sense that, according to your code, links that don't start with # work just like links are usually expected to work - loading that page afresh.
answers question: http://stackoverflow.com/q/26035993
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40788695
has comment: http://stackoverflow.com/comment/40792066

http://stackoverflow.com/a/70666791
type: Answer
has comment: http://stackoverflow.com/comment/124925642
has body: You could do something like is provided in Python itertools.tee, i.e. let a function return multiple iterators that take off from where the given iterator is at. Once you call tee, you should no longer touch the original iterator, since tee is now managing it. But you can continue with the 2 or more "copies" you got back from it, which will have their independent iterations. Here is how that function tee can be defined, with a simple example use of it: function tee(iter, length=2) { const buffers = Array.from({length}, () => []); return buffers.map(function* makeIter(buffer) { while (true) { if (buffer.length == 0) { let result = iter.next(); for (let buffer of buffers) { buffer.push(result); } } if (buffer[0].done) return; yield buffer.shift().value; } }); } // Demo function* naturalNumbers() { let i = 0; while (true) yield ++i; } let iter = naturalNumbers(); console.log(iter.next().value); // 1 console.log(iter.next().value); // 2 let saved; [iter, saved] = tee(iter); console.log("Saved. Continuing..."); console.log(iter.next().value); // 3 console.log(iter.next().value); // 4 console.log("Restored"); iter = saved; console.log(iter.next().value); // 3 console.log(iter.next().value); // 4 console.log(iter.next().value); // 5
answers question: http://stackoverflow.com/q/26179693
score: 1
has comment: http://stackoverflow.com/comment/124928740
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/124925558

http://stackoverflow.com/comment/41051636
comment on: http://stackoverflow.com/a/26161797
type: Comment
has text: thanks for replying. I want to stop the instance, depending on the screensize, but then reactive it on another point. One can say I want to stop the button click slides out the sidebar (not for any click handler in general, cause I have others attached to the button too)
score: 0
type: AnswerComment

http://stackoverflow.com/q/26131190
possible better answer: http://stackoverflow.com/a/35319750
has answer: http://stackoverflow.com/a/27398634
type: Question
accepted answer: http://stackoverflow.com/a/27398634
has title: How to get MetroUI CSS Datepicker value with javascript
tagged with: javascript
score: 0
answer count: 2
tagged with: datepicker
has answer: http://stackoverflow.com/a/35319750
tagged with: metro-ui-css
type: AnsweredQuestion
has body: I'd like to be able to see the date selected with a Metro UI CSS datepicker using javascript. Eventually this data would be used for building a JSON object to be sent in an AJAX request. For now though, I'd be happy just to see it in a browser alert message. Here's the datepicker control: http://metroui.org.ua/datepicker.html Notice the second datepicker has a default value. How can I use the browser console to get that default value into an alert message? Surely I'm missing something obvious, but I've had no luck doing things like checking "val()" of the input element, etc.

http://stackoverflow.com/comment/41064781
type: QuestionComment
type: Comment
score: 0
has text: Revisiting that problem. I removed the else statement and placed the final console log outside of the for loop. Other than that all four statements still printed from the if/else loop.
comment on: http://stackoverflow.com/q/26188693

http://stackoverflow.com/comment/41060494
type: Comment
has text: The functions are called in the order that the user types in the fields, not the order that they're defined.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26186679

http://stackoverflow.com/comment/41065126
score: 3
has text: The only issue I see with your answer is that the op only provided the string as an example, and while your code does work for that one specific example, it would fail if the string was `"It'sOver9000And1"`, turning it into `"It's Over 9000 And1"` due to the missing `g` flag, but if you were to add it, then it would become `"It's Over 9 0 0 0 And 1"`. It does work as long as only 1 number is present in the string, but another case where it will fail would be `"IAmAGuy"`, leaving the `I` and `A` alone, because it is not followed by a lower-case letter.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26188945

http://stackoverflow.com/a/26161567
has body: You can target the &lt;img&gt; (which is inside a &lt;div&gt; with data-index="0") directly in your selector: var image = document.querySelectorAll('[data-index="0"] img')[0].src
type: Answer
downvote count: 0
score: 3
answers question: http://stackoverflow.com/q/26161405
accepted answer of: http://stackoverflow.com/q/26161405
upvote count: 3
type: AcceptedAnswer

http://stackoverflow.com/a/26143505
has comment: http://stackoverflow.com/comment/40981025
upvote count: 2
has body: Sure: jQuery(document).ready(function(){ // find a-href on page with matching current location URL jQuery("a[href='"+window.location.href+"']").each(function(){ if ($(this).hasClass('aaa')) { // BBB } if ($(this).hasClass('bbb')) { // CCC } }); }); Edits to your code: Removed the unnecessary jQuery("*") coupled with find, and removed $ as an argument. (at the suggestion of comments)
has comment: http://stackoverflow.com/comment/40979759
has comment: http://stackoverflow.com/comment/40980954
type: Answer
answers question: http://stackoverflow.com/q/26143467
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40979796

http://stackoverflow.com/comment/40983693
type: QuestionComment
has text: If you use Pure, see http://purecss.io/grids/
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26145513

http://stackoverflow.com/comment/41061723
comment on: http://stackoverflow.com/q/26187094
score: 0
type: QuestionComment
type: Comment
has text: We have it set as a select type = multiple

http://stackoverflow.com/q/26059477
accepted answer: http://stackoverflow.com/a/26059556
tagged with: javascript
score: 0
has body: I am working on an ASP.NET MVC 4 app. This app has a controller with an action that looks like the following: public class MyController : System.Web.Http.ApiController { [ResponseType(typeof(IEnumerable&lt;MyItem&gt;))] public IHttpActionResult Get(string id, string filter) { IEnumerable&lt;MyItem&gt; results = MyItem.GetAll(); List&lt;MyItem&gt; temp = results.ToList&lt;MyItem&gt;(); var filtered = temp.Where(r =&gt; r.Name.Contains(filter); return Ok(filtered); } } I am calling this action using the following JavaScript, which relies on the Select2 library: $('#mySelect').select2({ placeholder: 'Search here', minimumInputLength: 2, ajax: { url: '/api/my', dataType: 'json', quietMillis: 150, data: function (term, page) { return { id: '123', filter: term }; }, results: function (data, page) { return { results: data }; } } }); This code successfully reaches the controller action. However, when I look at id and filter in the watch window, I see the following errors: The name 'id' does not exist in the current context The name 'filter' does not exist in the current context What am I doing wrong? How do I call the MVC action from my JavaScript? Thanks!
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/40826585
has answer: http://stackoverflow.com/a/26059556
type: AnsweredQuestion
tagged with: asp.net-mvc
has title: ASP.NET MVC Action Not Getting Parameter Values
type: Question
answer count: 1

http://stackoverflow.com/comment/40850362
has text: If you look at the call stack, your test seems to be failing because of an error at line 10: `var err = new ReferenceError('This is a bad function.');` Seems like your runtime environment doesn't recognize `ReferenceError`. What browser/environment are you using to run this test?
score: 1
comment on: http://stackoverflow.com/q/26072381
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26117126
tagged with: bower
has comment: http://stackoverflow.com/comment/40933814
has answer: http://stackoverflow.com/a/26124251
has body: I am trying to install ember-simple-auth in ember CLI, but something is wrong. I have created a new ember CLI project, and run the following to install ember-simple-auth. npm install --save-dev ember-cli-simple-auth ember generate ember-cli-simple-auth I also ran bower install just to make sure I wasn't missing anything else, and have checked that ember-simple-auth does exist in bower_components. However, when I try to import it using import Base from 'simple-auth/authorizers/base'; ember server throws an error: ENOENT, no such file or directory '/home/me/Projects/spa_client/tmp/tree_merger-tmp_dest_dir-8L6qfwzZ.tmp/simple-auth.js' What have I missed? Edit Ember CLI version: $ ember -v version: 0.0.46 node: 0.10.25 npm: 1.4.27
type: Question
has comment: http://stackoverflow.com/comment/40956831
has title: Installing addon in ember-cli
tagged with: javascript
has comment: http://stackoverflow.com/comment/40942592
score: 0
has comment: http://stackoverflow.com/comment/40938420
has comment: http://stackoverflow.com/comment/40940901
answer count: 1
has comment: http://stackoverflow.com/comment/40965088
tagged with: ember-cli
has comment: http://stackoverflow.com/comment/40942413
type: UnansweredQuestion
tagged with: ember.js
tagged with: ember-simple-auth

http://stackoverflow.com/a/26039454
answers question: http://stackoverflow.com/q/26039251
type: Answer
has comment: http://stackoverflow.com/comment/40790157
score: 1
upvote count: 1
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26039251
has body: You can simply add a flag (in the example "first") and check if this is your first iteration - if so, don't add a comma but set it to false ... see here: http://jsfiddle.net/fdfxc5zq/ var first = true; //have a flag that tells you if this is your first iteration - don't add a comma the first time around for (i = 0; i &lt;= number; i++) { if (first) { first = false; } else { result += ", "; } result += i; }

http://stackoverflow.com/a/26100376
answers question: http://stackoverflow.com/q/26100004
upvote count: 1
type: Answer
has body: Like that? var listItems = document.querySelectorAll('li'); var clickcnt = 0; var myList = document.querySelector('#mylist'); myList.addEventListener('click', function(event) { var itemClassList, selected, canAdd; itemClassList = event.target.classList; canAdd = clickcnt < 3; if (itemClassList.contains('clicked')) { itemClassList.remove('clicked'); clickcnt -= 1; } else if (canAdd) { itemClassList.add('clicked'); clickcnt += 1; } }); .clicked { background-color:red; } select up to 3 of your favourite items below. item 1 item 2 item 3 item 4 item 5
downvote count: 0
score: 1

http://stackoverflow.com/comment/41009578
type: Comment
comment on: http://stackoverflow.com/a/26149816
score: 0
type: AnswerComment
has text: I played around a bit and found out that the script was working (it showed results in network overview) but not in my search. I checked the actual DOM and saw that I was getting a list of empty P elements. After changing `name` in the template and the value to `original_title` (which is the name of the movie in the JSON) it actually works :).

http://stackoverflow.com/comment/40989428
type: Comment
has text: use `ng-show` instead: http://plnkr.co/edit/JLeY7aR6Md37bWoI0B0b?p=preview. why? https://github.com/angular/angular.js/issues/3225
comment on: http://stackoverflow.com/a/26135465
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41006310
type: AnswerComment
has text: If you wanna somehting next to your button, then I guess we need to see your HTML to provide a full answer.
type: Comment
comment on: http://stackoverflow.com/a/26157700
score: 0

http://stackoverflow.com/comment/40855737
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26075340
has text: How are you measuring the consumption?

http://stackoverflow.com/comment/122046416
comment on: http://stackoverflow.com/a/26156806
score: 1
type: AnswerComment
type: Comment
has text: Why I like this answer most is: I can read it and I can understand it. The garbage collector will work proper. And with this solution I can apply string instead of chars and I can still read and understand what it does without diving into Regex syntax.

http://stackoverflow.com/q/26037284
has body: EDIT So as it stands, this method doesn't actually work as expected. This issue was due to my changeUrl method, I fixed it and now this "does work". I have it in quotes because, I'm not sure what is and isn't needed to have a proper working binding. Here is the binding handler: ko.bindingHandlers.formatUrl = { init: function(element, valueAccessor, allBindingsAccessor, viewModel, context) { var data = valueAccessor(); var href = appStrap.changeUrl(ko.unwrap(data.url), ko.unwrap(data.id), data.replace); $(element).attr("href", href); ko.applyBindingsToNode(element, { attr: { href: href } }, context); return { controlsDescendantBindings: true }; }, update: function (element, valueAccessor) { var data = valueAccessor(); var href = appStrap.changeUrl(ko.unwrap(data.url), ko.unwrap(data.id), data.replace); $(element).attr("href", href); } }; Here is it's usage: Details So generic url is something like this: http://www.somehost.com/SomeController/SomeAction/[ID] And the url will need to look like this: What do I need, and what shouldn't been in my binding handler. For example, should ko.applyBindingsToNode be there? is it currently being used incorrectly? etc. etc. etc.
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40785537
type: Question
has answer: http://stackoverflow.com/a/26037695
score: 0
answer count: 2
tagged with: knockout.js
has title: Knockout Bindings what is required in this function
has comment: http://stackoverflow.com/comment/40785495
has answer: http://stackoverflow.com/a/26066504

http://stackoverflow.com/q/26039221
has title: Set background image by week day and time using javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26039468
type: Question
has answer: http://stackoverflow.com/a/26048324
tagged with: javascript
has body: I'm using the following javascript to display a different image depending on the time of day: $(document).ready(function(){ var d = new Date(); var n = d.getHours(); if (n &gt; 19 || n &lt; 6) // If time is after 7PM or before 6AM, apply night theme to ‘body’ document.body.className = "night"; else if (n &gt; 16 &amp;&amp; n &lt; 19) // If time is between 4PM – 7PM sunset theme to ‘body’ document.body.className = "sunset"; else // Else use ‘day’ theme document.body.className = "day"; }); http://codepen.io/jamesbarnett/pen/kdDBL However I need to define the background image by a day of the week as well. So for example Monday, times between 6am - 12pm show an open image and 12pm -6am show close image then Tuesday 6am - 4pm show an open image and 4pm-8am show a close image. As you can see from the example each day has different opening and closing times. So each day of the week need to be defined in the javascript. I've played around using the following javascript and defined each image and time under each day, but cannot seem to get it working: var days = [ 'SUN', //Sunday starts at 0 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT' ]; Anyone who can help would be greatly appreciated. Thanks
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26039659

http://stackoverflow.com/q/26109988
type: AnsweredQuestion
has body: I want to create an online test,but there is something wrong with my first question.The code below doesn't work and returns "your score is 0" even when the right answer is checked. sssdsdsdsd Mypage.com myPage Question 1-first option Question 1- second option Question 1- third option Show my score
has comment: http://stackoverflow.com/comment/40918997
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/40918960
downvote count: 0
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/40919344
has title: Javascript - I can't find my mistake.(radio buttons)
answer count: 3
has answer: http://stackoverflow.com/a/26110376
tagged with: radio-button
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26110273
favorite count: 0
possible better answer: http://stackoverflow.com/a/26110273
has answer: http://stackoverflow.com/a/26110115
has comment: http://stackoverflow.com/comment/40920297
accepted answer: http://stackoverflow.com/a/26110376

http://stackoverflow.com/comment/40974124
has text: is `JSONFile` a previous defined varialbe? If not, then correct the `url`
comment on: http://stackoverflow.com/q/26140435
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40976008
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26141454
type: Comment
has text: i assume it's means `javascript`.

http://stackoverflow.com/comment/40793049
comment on: http://stackoverflow.com/a/26040932
type: AnswerComment
score: 0
type: Comment
has text: @TrueBlueAussie you always catch me :) But OP is not responding.

list
type: Tag
tags question: http://stackoverflow.com/q/26139144
tags question: http://stackoverflow.com/q/26171875
tag name: list
tags question: http://stackoverflow.com/q/26141026
tags question: http://stackoverflow.com/q/26110525
tags question: http://stackoverflow.com/q/26061082
tags question: http://stackoverflow.com/q/26072138
tags question: http://stackoverflow.com/q/26116714
tags question: http://stackoverflow.com/q/26066054
tags question: http://stackoverflow.com/q/26069477

http://stackoverflow.com/a/26178009
downvote count: 0
score: 1
type: Answer
upvote count: 1
has body: var xs = document.getElementsByClassName('el')[0]; xs.innerText; in firefox you may need to user textContent
answers question: http://stackoverflow.com/q/26177969
has comment: http://stackoverflow.com/comment/41043815

http://stackoverflow.com/comment/40914151
comment on: http://stackoverflow.com/a/26106949
type: AnswerComment
score: 0
type: Comment
has text: I currently have a variable in global scope, defined at the top of the js file var theInfoWindow = null; –

http://stackoverflow.com/a/26129034
answers question: http://stackoverflow.com/q/26129023
has comment: http://stackoverflow.com/comment/40953661
accepted answer of: http://stackoverflow.com/q/26129023
type: Answer
has comment: http://stackoverflow.com/comment/40962113
has body: This is a one-time selector. In order to get it to dynamically update, you need to use event delegation. $(document).on("keydown", ".edit_main li:last-child div.edit_two textarea:last-child", function (e) { if (e.which == 9){ add_card(); } });
score: 4
upvote count: 4
has comment: http://stackoverflow.com/comment/40961687
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26103863
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26104072
answer count: 2
possible better answer: http://stackoverflow.com/a/26104492
has answer: http://stackoverflow.com/a/26104492
accepted answer: http://stackoverflow.com/a/26104072
has comment: http://stackoverflow.com/comment/40907995
type: AnsweredQuestion
has title: Knockout execute function after visible binding check
tagged with: knockout.js
has body: I have a list that is being rendered inside an foreach loop with knockout. I can remove items from the list, and for doind that, i'm using a "fadeOut" effect. I achieved this with this function binded to 'beforeRemove': self.fade = function(elem) { if (elem.nodeType === 1 ) { $(elem).fadeOut(function() { $(elem).remove(); }) } } I have a message that shows up if I don't have any itens on the list. The problem is that when I remove the last item, it starts to fadeOut, but the message shows up before the item is removed. How to show this message only after the last item is completely hidden? JSFIDDLE: http://jsfiddle.net/v2774x0f/

routes
tags question: http://stackoverflow.com/q/26169960
tags question: http://stackoverflow.com/q/26129224
tag name: routes
tags question: http://stackoverflow.com/q/26177058
type: Tag
tags question: http://stackoverflow.com/q/26180220
tags question: http://stackoverflow.com/q/26091417
tags question: http://stackoverflow.com/q/26063895
tags question: http://stackoverflow.com/q/26074013

http://stackoverflow.com/a/26118863
type: Answer
answers question: http://stackoverflow.com/q/26118418
has body: This should do what you want: var items = [ { id: 1, name: 'aa' }, { id: 1, name: 'bb' }, { id: 2, name: 'cc' }, { id: 1, name: 'dd' } ]; function removeDupIds(items){ var result = [], uniqIds = {}, i = 0, l = items.length; for(; i&lt;l; i++){ uniqIds[items[i].id] = items[i].name; } for(var k in uniqIds){ result.push({id: k, name: uniqIds[k]}); } return result; } console.log(removeDupIds(items));
score: 0

http://stackoverflow.com/comment/40980813
type: Comment
type: QuestionComment
has text: The 'event id' is just an anti-cache parameter, it won't affect your ajax request
comment on: http://stackoverflow.com/q/26135676
score: 0

http://stackoverflow.com/q/26094648
has answer: http://stackoverflow.com/a/26094852
accepted answer: http://stackoverflow.com/a/26094852
has answer: http://stackoverflow.com/a/26094931
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26094890
score: 0
possible better answer: http://stackoverflow.com/a/26094830
tagged with: ajax
has title: Ajax loading new message after operation
has body: Ok i write ajax script for adding data to db. My problem is when i add data same message stay on, so its hard to see if new operation is completed. Is any way to hide message after showing it, and display new after next ajax operation . My code is function change_data(id){ var data = document.getElementById('update'+id).innerText; var new_data = prompt(data,'Unesite novi podatak!').trim(); if(new_data !=='' &amp;&amp; new_data !== null){ $.ajax({ url: "&lt;?php echo base_url().'admin/crud/changes'?&gt;", type: 'post', data: {'id' : id, 'new_data':new_data }, success: function(resp){ if(resp==""){ $('#warning').html('Podatak je azuriran'); $('#update'+id).html(new_data); } } }); } in this part i add html to div, so i have same message, each time $('#warning').html('Podatak je azuriran');
has answer: http://stackoverflow.com/a/26094904
answer count: 5
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26094830

http://stackoverflow.com/comment/40837136
comment on: http://stackoverflow.com/q/26065019
type: QuestionComment
type: Comment
has text: my original comment still stands.
score: 0

http://stackoverflow.com/q/26119389
has answer: http://stackoverflow.com/a/26119657
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/26119685
type: Question
has comment: http://stackoverflow.com/comment/40935170
has comment: http://stackoverflow.com/comment/40935382
has comment: http://stackoverflow.com/comment/40935292
has comment: http://stackoverflow.com/comment/40935245
score: 0
answer count: 2
has body: hi all i have flash button in my project what i want when i click this button it should get the id from it`s parent anchor tag here is the screenshot as you can see in the image the id is "coupon-link-18" which is creating dynamically and further on like coupon-link-19, 20, 21 etc.. The Flash Object is created by the plunging which copy the text into clipboard &lt;?php echo do_shortcode( '[pw-clippy caption="'. $button_text . '" js="Clickfuntion()"]'. $button_text . '[/pw-clippy]' ) ?&gt; and Flash object is accepting the parameter for a function and the function name is "ClickFunction" so i create the function like so function Clickfuntion() { alert("do something"); } Now when i click on Flash object the alert popup will appear. what i really need is to get the parent id of anchor tag by clicking on flash button, the id is generating dynamically
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40935795
has comment: http://stackoverflow.com/comment/40935460
has title: get Id by clicking on flash object
has comment: http://stackoverflow.com/comment/40935178

http://stackoverflow.com/comment/41011945
type: Comment
comment on: http://stackoverflow.com/q/26160799
type: QuestionComment
has text: Most likely, your links that fail are **relative** links as opposed to **absolute**. ```some/page.html``` will be relative, meaning it'll take your current path, *APP_SETTINGS.baseUrl/links/some/page.html*. Absolute path ```/some/page.html``` will always start from base, giving you *APP_SETTINGS.baseUrl/some/page.html*. Try changing links that don't work to absolute (add a forward slash to beginning, if this is the case.
score: 0

http://stackoverflow.com/comment/40835455
type: Comment
type: QuestionComment
score: 2
has text: I don't think this is the proper forum for your question. SO is for coding specific questions. I'm going to flag for this to be moved to Super User where more general computing questions can be addressed.
comment on: http://stackoverflow.com/q/26064207

http://stackoverflow.com/q/26147864
has comment: http://stackoverflow.com/comment/40988905
has comment: http://stackoverflow.com/comment/40988198
tagged with: javascript
has comment: http://stackoverflow.com/comment/40988759
has comment: http://stackoverflow.com/comment/40988997
upvote count: 3
answer count: 2
has comment: http://stackoverflow.com/comment/40988885
has title: Deep "npm update"?
favorite count: 0
has answer: http://stackoverflow.com/a/26148090
tagged with: npm
type: UnansweredQuestion
tagged with: node.js
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/40988786
has answer: http://stackoverflow.com/a/26148225
type: Question
has body: Running npm update updates items listed in package.json; however, the dependencies of those items are still outdated. The obvious workaround is to run npm update once more. Sometimes I need to run it 3+ times to have clean npm outdated. Is there a flag in npm update to perform a deep update? Another extreme workaround is to reinstall rm -rf node_modules npm install Update It has bee 5 years, and I am still running the code above with the addition of rm package-lock.json when I really need to shake it. Seeing "red lines" in npm out output after npm up is no longer a problem.

http://stackoverflow.com/a/26136361
has body: data[i] variable is a string as far as it is shown in your question. To fix this, either make that variable an object (the better solution) or use JSON.parse to parse that string and convert it to an object I'd construct object for data[i] like so data[i] = {"Name":car[i],"Price":retail[i]};
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26136310
accepted answer of: http://stackoverflow.com/q/26136310
upvote count: 1

http://stackoverflow.com/comment/40844708
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26068609
has text: This is exactly what you need to do. The thing is, there is a place in your HTML, where the popup template will load. There is a script which will load and manage the popup. There is an HTML file which contains the HTML of the popup. By using the jQuery load you've found, you can load the popup HTML into the right place easily.
type: AnswerComment

http://stackoverflow.com/comment/41028108
type: Comment
has text: Why define any functions inside `$(function () { ... });`? I don't see any reason why you would need to do this. I would just put them all outside.
type: QuestionComment
comment on: http://stackoverflow.com/q/26169111
score: 0

http://stackoverflow.com/comment/40873301
type: QuestionComment
has text: it depends on which async action gets completed first, before modifying the array
comment on: http://stackoverflow.com/q/26084891
score: 1
type: Comment

http://stackoverflow.com/comment/40841438
has text: I have so far only read and not tested any of this but I'm assuming the same url as usual, I have a node server running atm, I'll mock up an example and report back
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26063431

http://stackoverflow.com/a/36397467
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26067106
downvote count: 0
has body: Set event "onrendered" like this, for example: onrendered: function () { var $$ = this; var circles = $$.getCircles(); for(var i = 0; i &lt; circles.length; i++){ for(var j = 0; j &lt; circles[i].length; j++){ $$.getCircles(j).style("fill", '#FFF') .style("stroke", $$.color) .style("stroke-width", 3); } } } https://jsfiddle.net/wfn1s41t/
upvote count: 2

http://stackoverflow.com/comment/40787672
comment on: http://stackoverflow.com/q/26038003
score: 0
has text: The plugin seems to work. So where's the problem?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26156444
score: -1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26156499
tagged with: javascript
has title: Parent & grandparent div class checking
tagged with: window.location
tagged with: parent
upvote count: 0
answer count: 1
tagged with: jquery
has body: Is there a way to test if your current URL location matches with a link on your page, but also checking that the matching link's parent (or maybe grandparent) div has a particular div class? e.g. jQuery(document).ready(function($){ // find a-href on page with matching current location URL link jQuery("*").find("a[href='"+window.location.href+"']").each(function(){ // if matching a-href's parent contains class .aaa // then BBB action // else if matching a-href's grand-parent contains class .bbb // then CCC action })});
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/60817272
score: 1
answers question: http://stackoverflow.com/q/26034778
type: Answer
upvote count: 1
has body: In my case the solution was to use the timeout to wait for the div to be displayed. setTimeout(function() { map.updateSize(); }, 100);
downvote count: 0

http://stackoverflow.com/comment/40889354
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26093451
has text: @ArunPJohny hmm, still your `var self = this` in line one would mean `window` in browser rt?

http://stackoverflow.com/q/26038148
tagged with: calendar
type: Question
score: 0
has body: var year = 2014 ; var dagen = new Array("Mo ", "Tu ", "Wed ", "Th ", "Fri ", "Sat ", "Sun "); var dag = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31] document.write(" januari "); for(i = 0 ; i < dagen.length ; i++) { document.write(dagen[i]); if( i == 2) { for(x = 0 ; x < dag.length ; x++) document.write(dag[x]) } else{ } } Hi I've got a question to ask about how to write my code. The thing is what I get now is: Mo Tu Wed 12345678910111213141516171819202122232425262728293031Th Fri Sat Sun. And what I want is that the 1,2,3 etc go below the Mo, Tu, Wed so it looks like a calender and also binds them together like what a real calender does. Example: when its 13th it goes to monday. What I also want it that u can put something inside the 1,2,3 etc like an input box but it also saves it. Thanks for the help in advance. :)
has comment: http://stackoverflow.com/comment/40787380
tagged with: javascript
has comment: http://stackoverflow.com/comment/40787109
answer count: 0
type: UnansweredQuestion
tagged with: loops
has title: Calendar in javascript with loops

http://stackoverflow.com/q/26176158
has comment: http://stackoverflow.com/comment/41041073
has answer: http://stackoverflow.com/a/26177179
tagged with: browser
score: 0
has answer: http://stackoverflow.com/a/26176214
answer count: 2
has comment: http://stackoverflow.com/comment/41041409
has comment: http://stackoverflow.com/comment/41040913
has comment: http://stackoverflow.com/comment/41041349
type: UnansweredQuestion
has title: javascript.window.open:open page only in internet explorer
has comment: http://stackoverflow.com/comment/41040690
linked to: http://stackoverflow.com/q/20118868
has comment: http://stackoverflow.com/comment/41040649
linked to: http://stackoverflow.com/q/19999388
type: Question
tagged with: internet-explorer
tagged with: activex
tagged with: javascript
has body: window.open("http://www.w3schools.com"); This code opens a page but with the user's default browser. but i want to open page only in internet explorer. Is it possible? i want to open page only in internet explorer Because i use Activex.(is it possible that run activex in mozila?)

http://stackoverflow.com/a/26120656
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26119108
type: Answer
accepted answer of: http://stackoverflow.com/q/26119108
score: 1
upvote count: 1
has body: You can add an extra in the LineItemDataTemplate template when it's being rendered for the last field (grootboek) for each row that is not the header row: Last field when: $index() == $parentContext.$data.length - 1 Not header row (first row): $parentContext.$index() > 0 Which results in:

http://stackoverflow.com/q/26182437
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/41052512
answer count: 2
has comment: http://stackoverflow.com/comment/41052481
has title: Fade in an animated div
tagged with: javascript
has comment: http://stackoverflow.com/comment/41052609
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41052572
tagged with: animation
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26182626
tagged with: css
score: 2
downvote count: 0
possible better answer: http://stackoverflow.com/a/26182626
has answer: http://stackoverflow.com/a/26182504
has comment: http://stackoverflow.com/comment/41052688
accepted answer: http://stackoverflow.com/a/26182504
has comment: http://stackoverflow.com/comment/41052634
has comment: http://stackoverflow.com/comment/41052541
has comment: http://stackoverflow.com/comment/41053134
has comment: http://stackoverflow.com/comment/41052703
has comment: http://stackoverflow.com/comment/41052435
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41052507
has body: I have a div thats slides down when the page loads but I can not figure out how to have it fade in as it animates. I tried different fadIn effects but nothing seems to work. $(function(){ // $(document).ready shorthand $("#headerWrapper").animate({top: '+=200px'}, 1000).fadeIn(); }, function() { $("#headerWrapper").animate({top: '-=100%'}, 1000).fadeIn(); }); http://jsfiddle.net/oq83qc7o/

http://stackoverflow.com/a/26178936
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/41047395
has comment: http://stackoverflow.com/comment/41049528
answers question: http://stackoverflow.com/q/26178519
has body: You're overwriting the baseInitMethod of Base inside Specific, with Specific's definition, so why would you ever want to call the Base version? If you simply remove the overwrite of the function you should call the Base definition: var Base = function() { this.baseMethod = function(){ return 'baseMethod'; }; this.baseInitMethod = function() { return 'baseInitMethod'; } } Base.prototype.basePrototypeMethod = function() { return "basePrototypeMethod"; }; var Specific = function() { Base.call(this); this.baseInitMethod(); // calls the Base definition only this.specificMethod = function(){ return 'specificMethod'; } this.specificInitMethod = function() { return this.basePrototypeMethod(); } }

http://stackoverflow.com/comment/41047335
type: Comment
score: 0
type: AnswerComment
has text: I get my img like so: `var img = cropper.getAvatar()` which looks like `img = data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...` how can I get this data to my form field?
comment on: http://stackoverflow.com/a/26179675

http://stackoverflow.com/comment/40948310
type: AnswerComment
comment on: http://stackoverflow.com/a/26126212
type: Comment
score: 0
has text: Picture me embarrassed and sighing. It is indeed, after I re-enabled the Security messages in the console (I must have disabled that a while ago, for some reason). Thanks very much!

http://stackoverflow.com/q/26129108
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26129430
score: 1
has answer: http://stackoverflow.com/a/26129451
has title: JavaScript scrollTop scrolling to wrong div
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: So, I am dynamically adding a "side navigation" bar using JavaScript. It has circles, which when clicked, will take you to a certain DIV on the page. For some reason, it isn't scrolling to the correct div. For example, I have a div Circle1, which when clicked, should you the user to the top of the page. BUT, it is taking the user to the div A (which should be scrolled to when Circle2 is clicked). Basically, every onClick function for each of my circles is off by 1. Here is JSFiddle to demonstrate: http://jsfiddle.net/zu6516eu/9/ Any ideas? Thanks document.getElementById('Circle1').onclick = function() { scrollToTop(); }; Full Code var offset = 0; //initialize side nav bar jQuery(document).ready(function() { var SideBar = document.createElement("Div"); SideBar.setAttribute("id", "SideBarNav"); SideBar.style.color = "white"; SideBar.style.display = "inline-block"; SideBar.style.position = "fixed"; SideBar.style.top = "50%"; SideBar.style.right = "0"; SideBar.style.transform = "translate(-50%, -50%)"; SideBar.style.textAlign = "center"; SideBar.style.border = "2px solid rgba(0, 0, 255, 0.5)"; var Circle1 = document.createElement("Div"); Circle1.innerHTML = "&amp;bull;"; Circle1.setAttribute("id", "Circle1"); Circle1.style.textAlign = "center"; Circle1.style.fontSize = "3.5em"; Circle1.style.margin = "0 auto"; Circle1.style.opacity = ".7"; Circle1.style.color = "blue"; Circle1.style.lineHeight = ".5em"; var Circle2 = document.createElement("Div"); Circle2.innerHTML = "&amp;bull;"; Circle2.setAttribute("id", "Circle2"); Circle2.style.textAlign = "center"; Circle2.style.fontSize = "3.5em"; Circle2.style.margin = "0 auto"; Circle2.style.opacity = ".1"; Circle2.style.color = "blue"; Circle2.style.lineHeight = ".5em"; var Circle3 = document.createElement("Div"); Circle3.innerHTML = "&amp;bull;"; Circle3.setAttribute("id", "Circle3"); Circle3.style.textAlign = "center"; Circle3.style.fontSize = "3.5em"; Circle3.style.margin = "0 auto"; Circle3.style.opacity = ".1"; Circle3.st…
has answer: http://stackoverflow.com/a/26129534
answer count: 3
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26129451
favorite count: 0
upvote count: 1
tagged with: css
possible better answer: http://stackoverflow.com/a/26129430

http://stackoverflow.com/a/26081184
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Car.prototype = Object.create(Vehicle.prototype); This one creates an object whose prototype is Vehicle.prototype. In this object, you put your shared methods for Car instances while "inheriting" from Vehicle. This is the right way to go. Car instance -&gt; Car prototype -&gt; Vehicle prototype Car.prototype = Vehicle.prototype; This one uses the same prototype for Vehicle to Car. This means that you'll be clobbering the same object for both classes. Adding to Car.prototype would mean also adding it to Vehicle.prototype, which you don't want. Car instance -&gt; Car prototype (which is also Vehicle prototype) Car.prototype = Object.create(Vehicle);, Car.prototype is an object whose prototype is Vehicle, a function. You don't want this either. Car instance -&gt; Car prototype -&gt; Vehicle function
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/26081163
accepted answer of: http://stackoverflow.com/q/26081163

http://stackoverflow.com/comment/41072441
has text: Thanks for the answers, I'll immediately take a look at that, I want to finish this as soon as possible. I already fixed the new element input, embarrasing error :P Hmmm what input type="hidden" does? If automatically activates the input "button" that's what I'm looking for, something like submit (you can press enter instead of clicking).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26189710

http://stackoverflow.com/comment/40898593
score: 0
comment on: http://stackoverflow.com/q/26098797
type: Comment
type: QuestionComment
has text: Iterate first array and use binary search in second. Time complexity will be O(n log m). Your current time Complexity is O(n * m). binary search will save your time.

http://stackoverflow.com/a/26177607
answers question: http://stackoverflow.com/q/26177521
type: Answer
upvote count: 1
score: 1
has body: function check(obj, key, value) { return (obj[key]) ? (obj[key].indexOf(value) != -1) : false; }
downvote count: 0

http://stackoverflow.com/comment/41040394
score: 0
comment on: http://stackoverflow.com/q/26087660
type: Comment
type: QuestionComment
has text: Paint me surprised. My main work horse is CS4 and so I just checked for that version, and you cannot lock a graphic. But: starting from the next version you *can*. I don't know if locking or unlocking a container also modifies its contents. It seems the documentation is unclear on that as well.

http://stackoverflow.com/q/26037876
tagged with: jquery
has title: Open modal with javascript instead of link using a wordpress plugin
has answer: http://stackoverflow.com/a/26038152
type: AnsweredQuestion
type: Question
tagged with: javascript
has body: I am using the wordpress plugin Easy Modal I can open a modal like that Open Modal. Now I want to open the modal with javascript like that if (var == true) { openmodal-11(); } Is there a way I can do this, without looking at the plugin code? So I can "open" the class with javascript like fake clicking on the link.. I am kind of a newbe in coding... Thank you
accepted answer: http://stackoverflow.com/a/26038152
score: 0
tagged with: modal-dialog
answer count: 1

http://stackoverflow.com/a/26104294
accepted answer of: http://stackoverflow.com/q/26095424
has comment: http://stackoverflow.com/comment/40928430
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/40941244
score: 2
has comment: http://stackoverflow.com/comment/44760457
answers question: http://stackoverflow.com/q/26095424
has body: The overload of group by that you want looks like this: // Overload:function(keySelector,elementSelector,resultSelector,compareSelector) First you'll need the key which is a combination of the distributor id and name. Then collect all years and months that have the same distributor id and name. The result of course and a way to compare the key objects (the properties as strings is a simple way to achieve that). var query = Enumerable.from(data) .groupBy( "{ Id: $.DistributorId, Name: $.DistributorName }", "{ Year: $.Year, Month: $.Month }", "{ DistributorId: $.Id, DistributorName: $.Name, PriceLists: $$.toArray() }", "String($.Id) + $.Name" ) .toArray(); Just note that I'm using the linq.js 3.x names: methods using lowerCamelCase. Change to UpperCamelCase for older versions.

http://stackoverflow.com/comment/40909959
type: Comment
has text: @Bergi : yes, this might be a concern depending on your target. I updated to summarize the compatibility table. ( yet within a few month all should be ok since Harmony is (somehow) welcome by everyone ).
comment on: http://stackoverflow.com/a/26097871
score: 0
type: AnswerComment

http://stackoverflow.com/a/26160523
score: 1
upvote count: 1
has body: After clicking on button click-event is propagationing up from button, to div, to window. You need first to catch and to stop propagation of button click event, for example: $('input[type="button"]').click(function(event){ /* your code here */ //stop event propagation event.stopPropagation() });
has comment: http://stackoverflow.com/comment/41024724
has comment: http://stackoverflow.com/comment/41037785
accepted answer of: http://stackoverflow.com/q/26160193
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26160193

http://stackoverflow.com/comment/41016761
has text: @ApulGupta - Ok, but why? Obviously, I have a misunderstanding about how the submit function and event argument work. So an explanation of why I need to do this with click instead of submit is better much than a directive. If you don't want to bother with that, fine. But I'm just putting it out there for answerers in general.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26162904

http://stackoverflow.com/comment/40875326
type: QuestionComment
has text: Very bad idea to do a login like that; should always check server-side. May be you can do a "remember me" functionality with localstorage but not if (document.getElementById("passWord").value == User.$form.password.value) then "you're logged in"
score: 1
comment on: http://stackoverflow.com/q/26086081
type: Comment

http://stackoverflow.com/q/26172489
answer count: 1
tagged with: fullpage.js
type: UnansweredQuestion
has body: I'm using the fullPage js plugin to develop my website, and I have full page sections throughout the home page. At the bottom of the page, I have a &lt;footer&gt; block which isn't a full page section. After installing and using the plugin, I can't seem to scroll to the footer anymore. My plugin call code: $('#fullpage').fullpage({ 'scrollingSpeed': 500, 'navigation': true, 'navigationPosition': 'right' }); $('#right_bot').click(function(e) { e.preventDefault(); $.fn.fullpage.moveSectionDown(); }); $('#right_top').click(function(e) { e.preventDefault(); $.fn.fullpage.moveSectionUp(); }); $('#backtop').click(function(e) { e.preventDefault(); $.fn.fullpage.moveTo(1); });
has comment: http://stackoverflow.com/comment/41033967
type: Question
has title: fullPage jquery adding a content block after the slides
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/26181623
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41021998
has text: @rsanchez You should make that into an answer.
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26152335

http://stackoverflow.com/comment/41052507
type: QuestionComment
comment on: http://stackoverflow.com/q/26182437
score: 0
type: Comment
has text: You can use the `.animate()` callback: http://api.jquery.com/animate/#animate-properties-duration-easing-complete

http://stackoverflow.com/q/26103912
has comment: http://stackoverflow.com/comment/40924504
type: Question
score: 0
answer count: 1
has title: Kendo UI / set datasource from ajax call
tagged with: jquery
has answer: http://stackoverflow.com/a/26112756
tagged with: kendo-ui
has body: I start using Kendo UI editable grid, but I want to set my own datasource coming from php script which echoes a array of objects (copy/paste from the original Kendo UI datasource). The thing is nothing populate the grid. Here is the content of my html file. ` Back &lt;div id="example"&gt; &lt;div id="grid"&gt;&lt;/div&gt; &lt;script&gt; $(document).ready(function () { var crudServiceBaseUrl = "http://localhost/telererik-kendoui", dataSource = new kendo.data.DataSource({ transport: { read: { url: "../../datasource.php", dataType: "json", type:"GET", contentType: "application/json; charset=utf-8", cache: false }, /* update: { url: crudServiceBaseUrl + "/Products/Update", dataType: "jsonp" }, destroy: { url: crudServiceBaseUrl + "/Products/Destroy", dataType: "jsonp" }, create: { url: crudServiceBaseUrl + "/Products/Create", dataType: "jsonp" },*/ parameterMap: function(options, operation) { if (operation !== "read" &amp;&amp; options.models) { return {models: kendo.stringify(options.models)}; } } }, batch: true, pageSize: 20, schema: { model: { id: "ProductID", fields: { ProductID: { editable: false, nullable: true }, ProductName: { validation: { required: true } }, UnitPrice: { type: "number", validation: { required: true, min: 1} }, Discontinued: { type: "boolean" }, UnitsInStock: { type: "number", validation: { min: 0, required: true } } } } } }); $("#grid").kendoGrid({ dataSource: dataSource, navigatable: true, pageable: true, height: 550, toolbar: ["create", "save", "cancel"], columns: [ "ProductName", { field: "UnitPrice", title: "Unit Price", format: "{0:c}", width: 120 }, { field: "UnitsInStock", title: "Units In Stock", width: 120 }, { field: "Discontinued", width: 120 }, { command: "destroy", title: "&amp;nbsp;", width: 120 }], editable: true }); }); &lt;/script&gt; &lt;/div&gt;` The content of my datasource.php file is as follow &lt;?php echo "[{'ProductID':1,'ProductName':'Chai','UnitPrice':18,'UnitsInStock':39,'Discontinued':false},{'ProductID':2,'Product…
tagged with: php
type: UnansweredQuestion
tagged with: kendo-grid
tagged with: javascript

http://stackoverflow.com/a/26153575
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26153339
has body: Try function keyFilters(keys) { var $els = $('.container .keywords'), $result = $(); $.each(keys, function(i, key) { $result = $result.add($els.filter(':contains(' + key + ')')); }); return $result; } function test(keys) { $('#results').append(' Keys: ' + keys.join(', ') + ': ' + keyFilters(keys).length + ' ') } test(['Global', 'Global']); test(['Main', 'Global']); Global, City1 Results one for Global City1 Global, City2 Results one for Global City2 Global, City3 Results one for Global City3 Global, City4 Results one for Global City4 Main1, City1 Results one for Main1 City1 Main2, City2 Results one for Main2 City2
downvote count: 0

http://stackoverflow.com/a/26158277
score: 1
type: AcceptedAnswer
downvote count: 0
has body: You can try something like: var l = document.location, m = l.search.match(/counter=(\d+)/), counter = parseInt(m&amp;&amp;m[1]) || 0; if (counter&lt;5) setTimeout(function() { l.href = l.origin+l.pathname+"?counter="+(++counter); },500);
type: Answer
answers question: http://stackoverflow.com/q/26158080
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26158080

http://stackoverflow.com/comment/40795639
type: Comment
comment on: http://stackoverflow.com/q/26042365
has text: It might be worth filing a bug in the bindonce repository for this. The `README` in the repo specifically states that filters can be used in this way.
score: 0
type: QuestionComment

http://stackoverflow.com/a/26143914
type: Answer
has comment: http://stackoverflow.com/comment/40983349
answers question: http://stackoverflow.com/q/26143860
has comment: http://stackoverflow.com/comment/40980521
upvote count: 3
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26143860
score: 3
has body: result['results'] is actually an Array. So, you should iterate it with normal for loop like this for (var i = 0; i &lt; result['results'].length; i += 1) { console.log(result['results'][i]['title']); } Or you can use Array.prototype.forEach like this result['results'].forEach(function(currentObject) { console.log(currentObject['title']); }); Also, you can access the attributes with the dot operator, like this console.log(result.results[i].title); or console.log(currentObject.title);

http://stackoverflow.com/comment/41074378
has text: Have you checked if, while you were testing your code, there was popup block or ads-blocker activated in your browser?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26194473

http://stackoverflow.com/comment/40859552
type: Comment
has text: I considered a timeout, but that seems really messy. Again, I cannot add to the existing Angular files. I tries to add a directive, but it is not working. I've tried several variations, none seem to work... Any chance you could help make this work? Thanks! http://jsfiddle.net/6gdfx29x/2/
type: AnswerComment
comment on: http://stackoverflow.com/a/26071379
score: 0

http://stackoverflow.com/comment/40963632
type: QuestionComment
has text: Show line 2 of the file `Khoreiza\xampp\htdocs\ABRN\content\users\form.php`
comment on: http://stackoverflow.com/q/26134699
score: 0
type: Comment

http://stackoverflow.com/a/26135528
has body: From the documentation you can use the following: $('.myElement').featherlight($content, configuration); $content being a jQuery object, and configuration being an object: In your example: var configuration = ({ afterOpen: function(event){ //code here }, beforeOpen: function(event){ //code here } }); $('#openbox').click(function() { $.featherlight('#fl1', configuration); }); I haven't tested it, but this should help you in the right direction.
has comment: http://stackoverflow.com/comment/40970640
score: 0
answers question: http://stackoverflow.com/q/26135458
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40965161
type: Answer
has comment: http://stackoverflow.com/comment/40965932

http://stackoverflow.com/comment/40912029
comment on: http://stackoverflow.com/q/26106023
score: 0
type: Comment
type: QuestionComment
has text: seems you forgot to include ui.bootstrap module into your module: angular.module('yourappmodule', ['ui.bootstrap']);

http://stackoverflow.com/q/26034288
type: Question
has title: JavaFX AceEditor
has comment: http://stackoverflow.com/comment/40783187
has comment: http://stackoverflow.com/comment/40783318
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40780663
has body: i have a problem with initializing the Ace editor inside WebView. The content of the HTML is shown (Sample Text), but if i'm trying to call a javascript function inside the HTML nothing happens. The javascript files are in the same folder as the HTML The content of the HTML Sample text Initialization of WebView WebEngine webEngine = ((WebView)scene.lookup("#myWebView")).getEngine(); webEngine.load(getClass().getResource("../../../html/editor.html").toExternalForm()); Thanks
answer count: 0
type: UnansweredQuestion
tagged with: java
tagged with: javafx

http://stackoverflow.com/comment/41113871
score: 0
type: Comment
type: QuestionComment
has text: Sorry if that was not clear, but that is what I was looking to do is write a shell script.
comment on: http://stackoverflow.com/q/26185337

http://stackoverflow.com/a/26034748
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26034690
downvote count: 0
type: Answer
has body: Remove quotes from your regex and use regex delimiters /.../: var obj = { "/without flags/": new RegExp("without flags"), "/something/gi": new RegExp("something", "gi"), "/with\/slashes\//gi": new RegExp("with\/slashes\/", "gi"), "/with \/some\/(.*)regex/gi": new RegExp("with \/some\/(.*)regex", "gi"), "/^dummy.*[a-z]$/gmi": new RegExp("^dummy.*[a-z]$", "gmi"), "/singlehash": new RegExp("/singlehash"), "single/hash": new RegExp("single/hash"), "raw input": new RegExp("raw input") }; var re = /^(?:\/(.*?)\/([a-z]*)|(.+))$/i; try { for (var s in obj) { var c = obj[s]; var m = s.match(re); if (m === null || m[1]+m[3] === undefined) { console.error("null result for: " + s, m); continue; } var regex = (m[1]==undefined)?m[3]:m[1]; var r = (m[2]==undefined) ? new RegExp(regex) : new RegExp(regex, m[2]); if (r.toString() !== c.toString()) { console.error("Incorrect parsing for: " + s + ". Expected " + c.toString() + " but got " + r.toString()); } else { console.info("Correct parsing for: " + s); } } } catch (e) { console.error("!!!! Failed to parse: " + s + "\n" + e.stack); } - JSFiddle Demo - RegEx Demo

http://stackoverflow.com/a/26157338
score: 0
has comment: http://stackoverflow.com/comment/41005477
type: Answer
has comment: http://stackoverflow.com/comment/41005533
answers question: http://stackoverflow.com/q/26157287
has body: i think you should use $interval in controller ot in service $interval(tempService.getTemp(), 5000);
has comment: http://stackoverflow.com/comment/41005645

http://stackoverflow.com/comment/40942839
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26121286
type: Comment
has text: Yeah I did, and there's no chance to catch any errors as I get directed away from the page by the submission :/

http://stackoverflow.com/q/26191777
has title: do not display pop up window while navigating to another page
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26192085
score: 0
has body: In my page a pop up window display of confirmation only when am going to close the browser/tab. It works for my page but it also ask while am going to navigate to another page. I want the pop up window when i close tab not while navigating to another page. Can anyone plz help me. Here is code. var PreventExitPop = false; function ExitPop() { if(PreventExitPop == false) { PreventExitPop=true; window.alert("hi!\n\click ok to go on next page"); var frm = document.forms['exitpopform']; frm.action = 'deals.html'; frm.submit(); scroll(0, 0); return "\n\n\n***************************************\n\n"; } } window.onbeforeunload = ExitPop; &lt;/SCRIPT&gt; &lt;form id='exitpopform' method='post' action='#'&gt; &lt;input type='hidden' value='' /&gt; &lt;/form&gt;
answer count: 1
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/comment/40817515
comment on: http://stackoverflow.com/q/26054387
score: 0
type: Comment
type: QuestionComment
has text: I want to do that for first level it takes min 2 or max 4 character after the dot and In second level it takes the co.country code

http://stackoverflow.com/a/26048352
score: 0
answers question: http://stackoverflow.com/q/26048296
type: Answer
has body: Apply z-index. z-index defines the layer which an element must be placed in, and only non-statically positioned elements can have z-index, i.e relative, absolute. This is how you do it: .overlay { position: relative; z-index: 1; } section p { position: relative; z-index: 2; } Here's a good introduction to z-index at MDN: Understanding CSS z-index

http://stackoverflow.com/q/26073537
has comment: http://stackoverflow.com/comment/40852295
has answer: http://stackoverflow.com/a/26073617
has comment: http://stackoverflow.com/comment/40852281
has comment: http://stackoverflow.com/comment/40852348
tagged with: http://stackoverflow.com/tag/json
answer count: 2
downvote count: 3
has answer: http://stackoverflow.com/a/26073605
has comment: http://stackoverflow.com/comment/40852306
has comment: http://stackoverflow.com/comment/40852483
has comment: http://stackoverflow.com/comment/40852432
has comment: http://stackoverflow.com/comment/40852437
has comment: http://stackoverflow.com/comment/40852655
has comment: http://stackoverflow.com/comment/40852592
tagged with: javascript
has body: I know, this thing was asked like billion times here. but i cannot read the inner json objects from this: {"issuccess": "yes", "downloads": "[{\"pk\": 39, \"model\": \"home.accessinfo\", \"fields\": {\"title\": \"weblink test bezugsquelle\", \"accesstype\": \"Kostenpflichtiger Download\", \"weblink\": \"google.de\", \"content\": \"weblink test bezugsquelle\", \"person\": 20, \"date\": \"2014-09-22T13:56:38.647Z\"}}, {\"pk\": 43, \"model\": \"home.accessinfo\", \"fields\": {\"title\": \"wefwef\", \"accesstype\": \"Kostenfreier Download\", \"weblink\": \"google.de\", \"content\": \"\", \"person\": 20, \"date\": \"2014-09-26T17:27:29.336Z\"}}]" } i cannot get the things inside []. I tried data.downloads[0].fields i am getting undefined. I want to be able to loop over [].
score: -3
has comment: http://stackoverflow.com/comment/40852301
has comment: http://stackoverflow.com/comment/40852385
type: AnsweredQuestion
upvote count: 0
accepted answer: http://stackoverflow.com/a/26073605
has comment: http://stackoverflow.com/comment/40852406
has comment: http://stackoverflow.com/comment/40852524
has comment: http://stackoverflow.com/comment/40852641
has comment: http://stackoverflow.com/comment/40852420
favorite count: 0
has comment: http://stackoverflow.com/comment/40852480
type: Question
has title: list of json - javascript - how to parse
tagged with: django
has comment: http://stackoverflow.com/comment/40852375
possible better answer: http://stackoverflow.com/a/26073617

http://stackoverflow.com/q/26120162
has comment: http://stackoverflow.com/comment/40936568
downvote count: 0
tagged with: error-handling
type: Question
score: 5
has answer: http://stackoverflow.com/a/26120353
tagged with: javascript
tagged with: runtime-error
has comment: http://stackoverflow.com/comment/91473938
answer count: 1
has title: Is there any way to log browser console errors
linked to: http://stackoverflow.com/q/5328154
favorite count: 0
upvote count: 5
tagged with: frontend
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4844643
has body: Suppose a particular user is using Chrome, and gets a runtime error which is logged in Chrome's Console. I'd like to know what that error is. Currently I would have to reach out to the specific user, get them to open up the console and tell me what the error is (or send a screenshot). Is there a way for me to automatically catch or log that error (regardless of what the error is) and send it to the server? As a follow-up question is there a way to do this for all major browsers?

http://stackoverflow.com/comment/40869143
has text: Personally, I think the use of `dataset` goes against the point of using jQuery; for example IE only supports this in v11 and not earlier versions (based on MDN Browser compatibility statement) https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement.dataset
type: Comment
comment on: http://stackoverflow.com/a/26082468
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40968398
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26116797
type: Comment
has text: I found the solution to the problem, used ```UInt8Array```, it would take care of the odd/even problem, thx for the time spent on this.

http://stackoverflow.com/q/26150085
favorite count: 0
has title: Bootstrap switchChange event still firing when changing state
has answer: http://stackoverflow.com/a/26150597
upvote count: 2
tagged with: twitter-bootstrap
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26150597
answer count: 2
score: 2
possible better answer: http://stackoverflow.com/a/38951851
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/38951851
tagged with: jquery
has body: I have this switch below: &lt;input id="upperLightSwitch" type="checkbox" checked data-size="mini"&gt; With this, switchChange (on change) event in the $(document).ready triggers fine when the switch state is changed by clicking on it. $('#upperLightSwitch').on('switchChange.bootstrapSwitch', function (event, state) { sendStateToArduino("upperLight"); updateLightState("upperLight",state); }); My problem is when I check a value from the database and it is 0. I am setting the toggle switch state to false and setting the 3rd parameter to false which says to not fire the event on change, but the event still triggers as both methods in the event above are being executed. Quote from Bootsrap website: $('#toggle-state-switch').bootstrapSwitch('state', false, false); // Set the state as off and do not trigger switchChange event The one I am using $('#upperLightSwitch').bootstrapSwitch('state', false,false ); Before the code of the event, I am calling a method to check that value with the database when everything loads. What am I missing? EDIT: Bootstrap switch link

http://stackoverflow.com/comment/40870887
type: Comment
score: 0
type: AnswerComment
has text: i have a last question. do i have to enclose this with a function.ready() block????
comment on: http://stackoverflow.com/a/26083076

http://stackoverflow.com/q/26193198
tagged with: php
has body: Here is my goal: Create some JavaScript action (some function call) that will be timed perfectly between two different clients. Explanation: I want a function to be called exactly on the same millisecond on two different browsers/computers no matter when the client accessed the web page. I thought about creating a time base using the server time but im not sure this will work.
has answer: http://stackoverflow.com/a/26193487
downvote count: 3
has comment: http://stackoverflow.com/comment/41072316
has title: Javascript + PHP timed actions
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26193487
tagged with: javascript
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26193448
upvote count: 0
has answer: http://stackoverflow.com/a/26193448
tagged with: jquery
has comment: http://stackoverflow.com/comment/41072394
favorite count: 0
score: -3

http://stackoverflow.com/comment/40870797
has text: The `return;` is necessary. The asker wants to do nothing the first time the image is clicked. That is why I check inside the if statement to see if it had been clicked yet. If it has not, then it returns (doing nothing). Every time after that, wasClicked will be true, and it will evaluate the rest of the function.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26083547
type: Comment

http://stackoverflow.com/comment/43876561
has text: Hi, @SjoerdDeWit, can I ask what is the actual functionality of `labelClass` on the marker's options? :)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26339865
type: Comment

http://stackoverflow.com/q/26069214
tagged with: dom-events
favorite count: 0
type: UnansweredQuestion
tagged with: node.js
has comment: http://stackoverflow.com/comment/40909527
has comment: http://stackoverflow.com/comment/40845633
has answer: http://stackoverflow.com/a/26070849
upvote count: 1
tagged with: google-chrome
type: Question
has body: I just want to confirm that any websocket(s) open on a page and connected to the server with close right away (or eventually?) when a user closed the tab. Since the console for the page is gone when closing the tab, I am not exactly sure how to test this. The reason I want to confirm this is to figure out whether its possible to trigger a function call on the websocket close event. Testing this on Chrome only and websockets are connect to my node server on Amazon EC2.
score: 1
answer count: 1
downvote count: 0
tagged with: websocket
has title: Websocket when closing window/tab - Chrome
tagged with: javascript

cors
tags question: http://stackoverflow.com/q/26084594
type: Tag
tag name: cors
tags question: http://stackoverflow.com/q/26105069
tags question: http://stackoverflow.com/q/26185490
tags question: http://stackoverflow.com/q/26150692
tags question: http://stackoverflow.com/q/26089320
tags question: http://stackoverflow.com/q/26141578
tags question: http://stackoverflow.com/q/26082410
tags question: http://stackoverflow.com/q/26083657
tags question: http://stackoverflow.com/q/26035638

http://stackoverflow.com/comment/41025987
comment on: http://stackoverflow.com/a/26167831
type: Comment
has text: I see! That makes sense. Thanks. Previously I thought it might have to do with being a string, so I tried parsing it, but I still couldn't get it to work. Can you help in getting it to work? Also, I seem to have trouble in understanding parsing since others say I don't need it on the subtotal and taxRate variables. When I remove the parse, it doesn't work due to the parentheses (which I can't find where to put). var subtotal = parseFloat(document.getElementById("subtotal").value).toFixed(3);
score: 0
type: AnswerComment

http://stackoverflow.com/q/26053462
tagged with: ajax
has comment: http://stackoverflow.com/comment/40838901
tagged with: angularjs
type: UnansweredQuestion
has title: Trying to understand angularjs service and $http
answer count: 0
has comment: http://stackoverflow.com/comment/40815592
type: Question
has comment: http://stackoverflow.com/comment/40816014
has body: I am trying to make jQuery backstretch to work with AngularJS. I know that there is backstretch fork for AngularJS too, but now that I can't make it work with the jQuery one, I would like to understand why. So, let's get started with the code. This is my view {{$index}} (I know it's not good to have the styles here, but it is just for the test and I didn't want to embed it into my css) The idea is that once I have entered the list of images via backstretch to #bs I could change them by swiping left or right (which works) or by clicking from a list that the link tags make (which doesn't work). Also, the animated change that backstretch does works. The clicking does not work, because when I click, the controller is reran and images in #bs are reset. Correspondingly, the index will be 0 always after any click. The backend shuffles the list of images always. And this is my controller app.controller('main', ['$scope', '$http', function($scope, $http) { $http({ method: 'get', url: 'rest/bg' }).success(function(data) { console.log('Loaded images'); $scope.images = data.images; $scope.index = 0; var height = $($($('#bs').parent()).parent()).height(); $('#bs').css('height', height); $('#bs').backstretch($scope.images, {duration: 2000, fade: 700}); $(window).on("backstretch.after", function(e, instance, index) { $scope.$apply(function() { console.log('running scope'); console.log(index); $scope.index = index; }); }); }); $scope.prevImage = function() { $scope.index = $scope.index === 0 ? $scope.images.length - 1 : $scope.index - 1; $('#bs').backstretch("show", $scope.index); }; $scope.nextImage = function() { $scope.index = $scope.index === ($scope.images.length - 1) ? 0 : $scope.index + 1; $('#bs').backstretch("show", $scope.index); }; $scope.isCurrentImageIndex = function(index) { return $scope.index === index; }; $scope.setCurrentImageIndex = function(index) { $scope.index = index; $('#bs').backstretch("show", $scope.index); }; }]);
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40815781
tagged with: jquery
linked to: http://stackoverflow.com/q/14994391

http://stackoverflow.com/a/26056863
has body: You can use filter and every together with Object.keys: var where = function(obj, xs) { return xs.filter(function(x) { return Object.keys(obj).every(function(k) { return obj[k] === x[k]; }); }); }; var jsonFiltered = where(filterParameters, json); DEMO: http://jsfiddle.net/pxjLhoqo/2/
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26056458

http://stackoverflow.com/a/26074953
answers question: http://stackoverflow.com/q/26074925
type: Answer
has comment: http://stackoverflow.com/comment/40854589
has comment: http://stackoverflow.com/comment/40854673
has comment: http://stackoverflow.com/comment/40854723
has comment: http://stackoverflow.com/comment/40854650
score: 0
has body: Prompt is a function not a class, prompt."something" means nothing, you must write prompt() var yourName = prompt("What's your name?"); if (yourName == prompt()) { console.log("It worked!"); // Open your console to see this }

http://stackoverflow.com/q/26120928
has title: Scroll on click not on hover with jquery
has body: i don't really know jquery so i wanted your help with something.. I found a custom scroller (horizontal slider), which has images in and arrows for navigation. When you hover over the arrow it automatically starts moving to the right when you hover on the left arrow it goes to the left. What i want is to make it "move" when i click on the arrow and not when i hover on it. Here's the code of the file, jQuery(function($) { // check for touchable device var isTouch = false; if( jQuery('html').hasClass('touch') ){ isTouch = true; } //scrollpane parts var scrollPane = jQuery( ".scroll-pane" ), scrollContent = jQuery( ".scroll-content" ); // set scrollInterval var scrollInterval = 25, // scroll steps in px timer_speed = 15 // scroll timer speed in milliseconds // show scroll arrows on hover scrollPane.hover( function(){ jQuery(".scroller-arrow:(.disabled)").stop(false, true).fadeIn(); }, function(){ jQuery(".scroller-arrow:(.disabled)").stop(false, true).fadeOut(); } ); var speed = 0; function prepareScrollerComponents() { if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod'){ jQuery("#scroll_left, #scroll_right").css({ display: 'block' }); } $cw = 0; jQuery('li.item', scrollContent).each(function(){ $cw = $cw + jQuery(this).outerWidth(true); }) scrollContent.width( $cw ); // calculate the scrolling speed speed = (scrollInterval * 30) / $cw; setScrollerWidth(); if(isTouch === true){ scrollPane.css({ overflow: 'hidden'}).overscroll({ direction: 'horizontal' }).on('overscroll:dragstart overscroll:dragend overscroll:driftstart overscroll:driftend', function(event){ }) }else{ scrollbar.slider('option', 'value', 0); } scrollContent.css({ visibility: 'visible' }); scrollPane.css({ background: 'none' }); } jQuery(window).load(function(){ prepareScrollerComponents(); }); jQuery(window).smartresize(function(){ prepareScrollerComponents(); }); var slide_handler = function(e, ui) { if(isTouch === false){ if(ui.value == 0){ jQuery("#scroll…
score: 0
tagged with: slider
answer count: 1
has answer: http://stackoverflow.com/a/26121189
tagged with: hover
type: AnsweredQuestion
tagged with: onclick
accepted answer: http://stackoverflow.com/a/26121189
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40794599
type: QuestionComment
comment on: http://stackoverflow.com/q/26041869
type: Comment
has text: Is the `week` your sorting comparator?
score: 0

http://stackoverflow.com/comment/40869240
type: QuestionComment
has text: outstanding. Thanks a lot. I am sure it is useful to all multi-select users like me. Thanks again
comment on: http://stackoverflow.com/q/26082421
score: 0
type: Comment

http://stackoverflow.com/q/26164774
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41019886
has answer: http://stackoverflow.com/a/30056047
score: 2
has comment: http://stackoverflow.com/comment/41020145
has title: Why adBlock doesn't like the string
has comment: http://stackoverflow.com/comment/41020595
type: Question
has body: My website was loading for really a long time if user have installed adBlock.. I founded out that the reason of it is query.preload.js file. I guess that the problem was the string: var imgUrls = cssPile.match(/[^(]+.(gif|jpg|jpeg|png)/g); The problem is in regex to get a string of between a "(" and a ".filename", as it's written in the code comments. cssPile is string getting with .cssText method. So do anybody knows why adBlock doesn't like the strgin I'm talikng about? I'd be also happy if anybody could write another regex. And if it doesn't cause this problem, it will solve all my problems :)
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41020785
tagged with: javascript
has comment: http://stackoverflow.com/comment/41021038
tagged with: adblock
tagged with: regex

http://stackoverflow.com/q/26138612
has comment: http://stackoverflow.com/comment/40970692
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I want this function to show div after a time interval and then hide it after some time with no looping function myfun(){ setInterval(function(){$("#welcome").show(100)}, 2000); setInterval(function(){$("#welcome").hide(500)}, 7000); } but from this function it generates a infinite loop can anyone help me
score: 0
has title: Show and Hide div (with some delay) using setInterval (no loop)
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40970638
has answer: http://stackoverflow.com/a/26138626
accepted answer: http://stackoverflow.com/a/26138626
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/40886439
score: 0
type: Comment
type: QuestionComment
has text: I understand the performance bottleneck if we have to make so many calls on page load. I was thinking to ease page load time using lazy-loading. Say i have to show only 5 documents thumbnail on page load, how can i do the same on client side. I am very much interested to know how we can achieve this on client side ?
comment on: http://stackoverflow.com/q/26087656

http://stackoverflow.com/comment/41062076
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26187183
has text: I tried that makes no difference i tried running everything separate no change tried without prop same no difference. `$("#Myelement").val(this.selectedValue);` `$("#Myelement").trigger("change");` value gets sent but change event never gets triggered. My issue is that the event doesn't get triggered not the binding i have inside my loop.
score: 0

http://stackoverflow.com/q/26098287
score: 0
answer count: 2
tagged with: sencha-touch
has title: Sencha by default adding readonly attribute to 'Ext.field.Number' type
tagged with: sencha-touch-2
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26119447
has comment: http://stackoverflow.com/comment/40937436
tagged with: javascript
has answer: http://stackoverflow.com/a/26098374
has body: After upgrading my application from sencha 2.1.1 to 2.3.1, we got a wired issue. We have the below code to create a number filed. Ext.create( 'Ext.field.Number', { cls: 'timee_1', inputCls: 'listitemtitle', name: 'itemValue', labelWidth:'0', minValue: 0, clearIcon: false }) Here is generated HTML of the above number field copied from chrome developer tools. &lt;input class="listitemtitle" type="number" id="ext-element-780" name="itemValue" min="0" readonly="false"&gt; The readonly atribute is getting added by default. Though it is getting added as 'false', html is not considering it. As per the HTML spec, if readonly is present, it considers that input field as read only irrespective of the value. This attribute was not added by default in sencha 2.1.1. How to stop adding that attribute by default.

http://stackoverflow.com/q/26102698
tagged with: jquery-select2
score: 0
has body: I am having the following ko select2 binding: ko.bindingHandlers.select2 = { init: function (element, valueAccessor) { $(element).select2(valueAccessor()); ko.utils.domNodeDisposal.addDisposeCallback(element, function () { $(element).select2('destroy'); }); } }; Following is my input with select2 binding: &lt;input type="text" class="form-control" data-bind="value: $root.Name, attr: { 'placeholder': 'Full Name' }, select2: { minimumInputLength: 1, query: $root.list_item, allowClear: true, multiple: true}"&gt; Everything is working perfectly fine. The problem I am facing is when I am clearing the Name observable through a Clear button, the values selected by the select2 div are not getting cleared. What change I have to do in the select2 ko binding to reflect the changes in the UI when the observable is cleared?
has title: Clear select2 div when the ko observable is cleared
has answer: http://stackoverflow.com/a/26104154
type: AnsweredQuestion
tagged with: knockout.js
type: Question
accepted answer: http://stackoverflow.com/a/26104154
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/40951057
comment on: http://stackoverflow.com/q/26125499
score: 0
type: Comment
type: QuestionComment
has text: [No.](http://github.com/mbostock/d3/wiki/Ordinal-Scales) Ordinal scales don't "move" things, necessarily; it's the `gravity()` function which does that in a force layout. [Read this](http://vallandingham.me/bubble_charts_in_d3.html) - it's a very helpful tutorial, explains the components of gravity functions.

http://stackoverflow.com/a/26094747
has body: Js Fiddle you will get the selected text when you click on the menu
answers question: http://stackoverflow.com/q/26094550
score: 0
type: Answer

http://stackoverflow.com/comment/41048116
score: 0
has text: yes!.. so I have moved the JavaScript code to a file and how do I call it using action ? your logic is write but I have someother problem implementing it.
type: Comment
comment on: http://stackoverflow.com/a/26167704
type: AnswerComment

http://stackoverflow.com/comment/40820384
type: QuestionComment
comment on: http://stackoverflow.com/q/26055945
has text: @springbo It is not displaying second last value... json value can be in any format so i cant compare i and i+2 value.. I guess u understood
score: 0
type: Comment

http://stackoverflow.com/q/26070383
has comment: http://stackoverflow.com/comment/40847216
has comment: http://stackoverflow.com/comment/40847240
score: 1
has comment: http://stackoverflow.com/comment/40847206
tagged with: angularfire
favorite count: 0
tagged with: angularjs
type: Question
has title: How can I run $scope functions from a templateUrl in a directive?
has comment: http://stackoverflow.com/comment/40847202
accepted answer: http://stackoverflow.com/a/26070614
has body: Here's a plnkr to show you all the code: http://plnkr.co/edit/0EdLH3gGoUrWcQkOeukt (I tried to only show what's necessary but I want to show what's going on with task sorting because that is ultimately what I want to achieve) I am able to run $scope functions in the controller if they are triggered from index.html but not from repeat.html (the templateUrl). @Kato has made it clear that I will need use a transclude but after trying for a while I cannot figure it out. Nothing seems to show up for me when I set transclude:true and add ng-transclude to the in repeat.html. //index.html //repeat.html (the templateUrl file) x //the controller (I can access $scope.addTask but not update, delete, or complete) angular.module('app').controller('MainCtrl', function($scope, $firebase){ var ref = new Firebase('https://plnkr.firebaseio.com/tasks'); $scope.list = $firebase(ref).$asArray(); $scope.addTask = function(newTask) { $scope.list.$add({ title: newTask.title, $priority: Firebase.ServerValue.TIMESTAMP, complete: false, completeTime: '', createTime: Firebase.ServerValue.TIMESTAMP }); }; $scope.deleteTask = function(task){ alert('delete task was clicked'); $scope.list.$remove(task); }; $scope.updateTask = function(task){ $scope.list.$save(task); }; $scope.isCompleteTask = function(task){ if(task.completeTime){ task.completeTime = ''; } else{ task.completeTime = Firebase.ServerValue.TIMESTAMP; } $scope.list.$save(task); }; }); //the directive angular.module('app').directive('repeatByWeek', function($parse, $window) { return { restrict: 'E', replace: true, templateUrl: 'repeat.html', scope: { 'master': '=collection' }, link: function(scope, el, attrs) { // get the global moment lib var moment = $window.moment; scope.weeks = []; updateList(); // whenever the source collection changes, update our nested list scope.master.$watch(updateList); function updateList() { scope.weeks = sortItems(parseItems(scope.master)); } function sortItems(sets) { var …
tagged with: firebase
has comment: http://stackoverflow.com/comment/40847230
upvote count: 2
has comment: http://stackoverflow.com/comment/40847186
has comment: http://stackoverflow.com/comment/40847775
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40847222
tagged with: javascript
has answer: http://stackoverflow.com/a/26070614
has comment: http://stackoverflow.com/comment/40847158
type: AnsweredQuestion

http://stackoverflow.com/comment/104231661
has text: As @Joe Aspara mentions, and you have already seen datatables, the example you saw uses PHP but you can provide any data source of your choice. See https://datatables.net/examples/data_sources/js_array
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26096790

http://stackoverflow.com/comment/40949377
type: QuestionComment
has text: Ah, it's `contentType` … although I wouldn't put it past them to alias `Content-Type` to it quietly.
score: 0
comment on: http://stackoverflow.com/q/26122812
type: Comment

http://stackoverflow.com/comment/41022364
type: Comment
type: QuestionComment
has text: The output you want has nothing to do with permutations. You want all [words of length <=3 over the alphabet `abc`](https://en.wikipedia.org/wiki/Formal_language#Words_over_an_alphabet) (which has a completely different, albeit quite trivial algorithm to construct)
comment on: http://stackoverflow.com/q/26166104
score: 0

http://stackoverflow.com/q/26087049
tagged with: javascript
has comment: http://stackoverflow.com/comment/40877282
has comment: http://stackoverflow.com/comment/40877064
has comment: http://stackoverflow.com/comment/40877145
has comment: http://stackoverflow.com/comment/40877359
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40877264
tagged with: jquery
has answer: http://stackoverflow.com/a/26087152
has comment: http://stackoverflow.com/comment/40877110
type: Question
has answer: http://stackoverflow.com/a/26087100
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/26087152
has comment: http://stackoverflow.com/comment/40877098
has comment: http://stackoverflow.com/comment/40877199
has body: I'm building a new website for myself, looks like this.. HTML A Day At The Races (2014) 3 x 8-bit instruments Back to the Mansion! (2013) fl, ob, cl, bsn, xyl, vibes, vln, vla, vlc. .... etc etc etc. CSS (all boxes have identical CSS except the background colour) .orange{ width:150px; height:150px; background:#F90; display:inline-block; margin:10px; cursor:pointer; box-shadow:#CCC 4px 4px 4px; border-radius: 10px; padding:10px; font-family:Arial, Helvetica, sans-serif; font-size:11px; line-height:1.5; } Basically, when you click on one of the boxes, it shows a content DIV telling you about that piece of music, based on the row it's in. JQuery function itemLoad(){ if($(event.target).parent().is("#row1")){ $("#row1content").fadeIn("slow"); }else if($(event.target).parent().is("#row2")){ $("#row2content").fadeIn("slow"); } } This function works absolutely fine when the boxes are empty, but when they have content in them as you seen in the picture, the function only runs when I click around the padding. I've never had this problem before. Any help would be appreciated :)
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40877223
accepted answer: http://stackoverflow.com/a/26087100
has title: 'onClick' event on div not happening when there are child elements present

http://stackoverflow.com/comment/41013006
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26161303
has text: Sirko. but how should I literate in xml using "for" ?

http://stackoverflow.com/a/26140930
type: Answer
score: -2
accepted answer of: http://stackoverflow.com/q/26140884
downvote count: 2
has comment: http://stackoverflow.com/comment/41010327
answers question: http://stackoverflow.com/q/26140884
has comment: http://stackoverflow.com/comment/41015068
has comment: http://stackoverflow.com/comment/41018476
has comment: http://stackoverflow.com/comment/40976051
upvote count: 0
has comment: http://stackoverflow.com/comment/41018350
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41011097
has body: Try using parseFloat() and use keyup and focus event as shown :- $('#permup').on('keyup focus', function() { $('.perm').each(function(){ var defaultval = $('#permup').val(); var myValue; if(defaultval == "0"){ myValue = $(this).attr('value') } else{ myValue = parseFloat( parseFloat($(this).attr('value')) * parseFloat(defaultval) ) || $(this).attr('value') } $(this).val( myValue ); }); }); DEMO Side Note :- Always try to use parseInt() or parseFloat() while dealing in numbers in javascript/jquery otherwise numbers are also treated as string.

http://stackoverflow.com/a/26191372
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41302832
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26190211
has body: Here's a way to do it by creating another array with the proper grouping and using two ng-repeat: $scope.data2 = (function(data, count) { var arr = []; var len = data.length / count; for (var i=0 ; i&lt;len ; i++) { arr.push(data.slice(i*count, (i+1)*count)); } return arr; })($scope.data, 3); - &lt;section ng-repeat="group in data2"&gt; &lt;div ng-repeat="item in group"&gt; &lt;span&gt;{{item.a}}&lt;/span&gt; &lt;span&gt;{{item.b}}&lt;/span&gt; &lt;/div&gt; &lt;/section&gt; data is the original array, and count is the number of items in each group Here's the fiddle: http://jsfiddle.net/a9n1e7w5/2/ There's likely be a better way to do this, but this works.
accepted answer of: http://stackoverflow.com/q/26190211

http://stackoverflow.com/comment/44395064
score: 0
type: Comment
has text: @Undefined_variable: Please help me on [my question here](http://stackoverflow.com/questions/27983248/need-help-in-plotting-a-chart-using-highcharts-in-angularjs)
type: AnswerComment
comment on: http://stackoverflow.com/a/26086290

http://stackoverflow.com/a/26058488
upvote count: 1
has comment: http://stackoverflow.com/comment/40857462
answers question: http://stackoverflow.com/q/26056188
score: 1
has body: The best solution in my opinion is to add a context method to promises to specify the this for function calls in future then invocations. This is something I seem to recall having seen in some libraries, can't remember where, and implemented in my own as well. The idea is to write promise.context(this).then(myfunc) I don't know Q, so I don't know if it would be easy or even possible to extend it/customize it to have this behavior. Here is a toy implementation of this idea using native JS promises: Promise.prototype.context = function (ctxt) { this.ctxt = ctxt; return this; } Promise.prototype.then = (function() { var old_then = Promise.prototype.then; return function(fulfill, reject) { return old_then.call(this, fulfill &amp;&amp; fulfill.bind &amp;&amp; fulfill.bind(this.ctxt), reject &amp;&amp; reject.bind &amp;&amp; reject.bind(this.ctxt) ); }; }()); Actually, you can often write your code so that it doesn't end up littered with context calls, by doing it once where you create the promise. So: var MyTrip = { gotoMars: function() { return InterPlanetaryTrip(Mars).context(this); }, report: function() { console.log("I'm back, Mom!"); }, go: function() { gotoMars.then(this.report).then(this.drink); } }; This approach saved me boundless aggravation and has zero downsides that I can see. I cannot see a more "native" way to do this, whatever that might mean. Less intrusive approach? As a more direct answer to your question, you could possibly introduce a small bit of sugar--a method which binds and calls Q.fcall in one fell swoop, as follows: AsyncCounter.prototype.fcall = function(fn) { return Q.fcall(fn.bind(this)); }; AsyncCounter.prototype.increment = function() { return this.fcall(function() { return ++this.value; }); };
has comment: http://stackoverflow.com/comment/40825708
has comment: http://stackoverflow.com/comment/40824817
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40825030

http://stackoverflow.com/comment/40963244
type: AnswerComment
has text: or is there a live site i can see this on?
type: Comment
comment on: http://stackoverflow.com/a/26134264
score: 0

http://stackoverflow.com/q/26102576
tagged with: google-chrome-extension
tagged with: node.js
has answer: http://stackoverflow.com/a/26103112
has comment: http://stackoverflow.com/comment/40912335
type: UnansweredQuestion
tagged with: google-chrome
type: Question
score: 0
has comment: http://stackoverflow.com/comment/40913937
answer count: 1
has body: I'm making a chrome extension that injects JavaScript into a certain forum website. The JavaScript uses jQuery to add a button to the webpage whenever you're viewing a profile on the forum. There's a link already on every profile page that can show all of that profile's posts on the forum. The button added by jQuery (by the chrome extension) is supposed to use the 'show last posts' link already on each profile page to scrape through all of a profile's last posts and find posts which are actually new topics and not just replies to other topics on the forum. The chrome extension's purpose is to display all of a profile's last topics. The problem is that the Node.js code that I use to scrape the webpages can't run in the context of a webpage. I think it doesn't work because it uses node modules 'request' and 'cheerio,' which don't have browserify support. Right now I can only run the Node.js scraper by manually inserting into its code the link to the 'show last posts' page that I want to be scraped and then executing it in my local command prompt. There's two questions to all of this: How do I make the Node.js scraper execute to run out of the webpage's context when someone clicks the button that's added by the chrome extension? How do I send the 'show last posts' link from the chrome extension's content script (jQuery button) to the scraper? (since the scraper can't run in the browser to grab the link itself) Please provide a number before your answers so everyone can tell which questions you're answering. Thanks
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40913874
has title: Getting webpage data to a JavaScript that can only run out of the webpage

http://stackoverflow.com/a/26138913
has body: You could try something like $("#adults :checked").length + $("#young :checked").length. This counts and adds the number of checked checkboxes in each fieldset.
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40971137
answers question: http://stackoverflow.com/q/26138785

http://stackoverflow.com/q/26043705
has comment: http://stackoverflow.com/comment/40797645
has body: How do I access the content of link to by JavaScript and jquery content
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40797553
has comment: http://stackoverflow.com/comment/40797630
score: -6
has comment: http://stackoverflow.com/comment/40797830
has comment: http://stackoverflow.com/comment/40797655
upvote count: 0
type: Question
has title: How do I access the link to the content?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26043790
accepted answer: http://stackoverflow.com/a/26043790
has comment: http://stackoverflow.com/comment/40797534
answer count: 1
tagged with: javascript
tagged with: jquery
downvote count: 6

http://stackoverflow.com/q/26127521
tagged with: datepicker
type: UnansweredQuestion
tagged with: jquery-ui
has body: I have a .datepicker() created using jQuery UI, I now want to do so: Disable all weekends and holidays, Disable the entire week once user select a day in a week. Say users select Tuesday, 09/23/2014, then the datepicker should disable Monday, 09/22/2014 -- Sunday, 09/28/2014. I was thinking about beforeShowDay and onSelect function, but I don't know how to combine my requirement together. A little code might help: $("#datepicker").datepicker({ showOn: "button", buttonImage: "/painstorder/jquery-ui/images/calendar.gif", buttonImageOnly: true, minDate: "dateToday", maxDate: new Date(2016, 2, 6), buttonText: "Select date", dateFormat: "DD, d MM, yy", beforeShowDay: $.datepicker.noWeekends });
tagged with: jquery-plugins
has comment: http://stackoverflow.com/comment/40953367
type: Question
has title: Disable entire week based on date selected on datapicker
has answer: http://stackoverflow.com/a/26129004
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40953252
score: 0
has comment: http://stackoverflow.com/comment/40951565

http://stackoverflow.com/comment/41039056
type: QuestionComment
has text: Use AJAX to do your POST rather than loading another page
score: 3
comment on: http://stackoverflow.com/q/26175280
type: Comment

http://stackoverflow.com/q/26170021
possible better answer: http://stackoverflow.com/a/26170057
has answer: http://stackoverflow.com/a/26170057
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26170059
has comment: http://stackoverflow.com/comment/41029437
accepted answer: http://stackoverflow.com/a/26170076
score: 1
linked to: http://stackoverflow.com/q/6658752
upvote count: 1
has comment: http://stackoverflow.com/comment/41029515
type: Question
linked to: http://stackoverflow.com/q/203198
tagged with: javascript
answer count: 3
has body: I have a button that is loaded into my page using ajax: Submit I am using this code on the page that the button is being loaded into: Why is it not detecting the click from the ajax content?
has title: Detecting .click() from ajax loaded element
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/41029421
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/26170076

http://stackoverflow.com/comment/42565660
has text: Hey @AgustinHaller I'm sorry to say I have not solved it yet. I am currently working on other projects.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26178399
score: 0

http://stackoverflow.com/comment/41003329
type: Comment
has text: Whilst I think this is the correct source of the issue, I wonder if just applying css may be a simpler idea, as I think it should override the svg fill. That way the fills don't need to be changed.
comment on: http://stackoverflow.com/a/26153371
type: AnswerComment
score: 0

http://stackoverflow.com/q/26086716
score: 6
has title: Bootstrap table plugin not working in 'rtl' table
has answer: http://stackoverflow.com/a/26127221
has comment: http://stackoverflow.com/comment/40879390
accepted answer: http://stackoverflow.com/a/26128579
has comment: http://stackoverflow.com/comment/40876499
type: Question
has comment: http://stackoverflow.com/comment/40953062
has comment: http://stackoverflow.com/comment/40879447
has comment: http://stackoverflow.com/comment/40879348
tagged with: javascript
has body: I'm working with Arabic bootstrap for rtl support . I have a table and Bootstrap table plugin. HTML : Title Category Created date Status Actions 2323 Project 09-19-2014 Published Now, I designed my table with bootstrap table plugin. Plugin works using: data-fixed="right" or data-fixed="left". With data left and normal this works fine. But in Arabic Bootstrap and data right , this plugin is not working and shows horizontal scroll and displaced border. how can I fix this for rtl table? DEMO RTL NOT WORK : JSFIIDDLE DEMO NORMAL LTR WORK : JSFIDDLE Screenshot in FF last version: (SEE scroll and right border Displaced for status and create date..)
has comment: http://stackoverflow.com/comment/40878832
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26128579
has comment: http://stackoverflow.com/comment/40879245
tagged with: twitter-bootstrap
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40879306
tagged with: css
upvote count: 6
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26127221

http://stackoverflow.com/q/26105788
answer count: 2
accepted answer: http://stackoverflow.com/a/26105958
has comment: http://stackoverflow.com/comment/40911331
possible better answer: http://stackoverflow.com/a/26105852
has answer: http://stackoverflow.com/a/26105852
has comment: http://stackoverflow.com/comment/40911351
favorite count: 0
has title: Repeat prompt until condition
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40911353
has answer: http://stackoverflow.com/a/26105958
upvote count: 1
downvote count: 1
type: Question
has body: Cant manage to ask an user to input text again in case his text is empty, this is my code: var userText = prompt("Introduce some words."); var counter = 0; while(counter!=0){ if(userText){ document.getElementById("text").innerHTML = "Im not null"; counter = 1; }else{ userText = prompt("Introduce some words."); document.getElementById("text").innerHTML = "Im null"; } } Even if i introduce a long word or simply press enter OK or Cancel wont do anything. It must ask user for some words again in case they press either OK or Cancel...
tagged with: javascript
score: 0

http://stackoverflow.com/a/26174505
has body: I assume your javascript function will mimic the &lt;a&gt; natural behavior of navigation. I suggest using other HTML tags like &lt;div&gt;, &lt;span&gt; etc. By doing so, will prevent the browser from showing the "Open in new tab" option in the context menu. @tliokos's answer might work but i think it will confuse users and change the behavior of click events, especially on using mousedown(), if you noticed, your browser usually starts navigating only on mouseup instead, etc..
downvote count: 1
score: -1
upvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26171983

http://stackoverflow.com/comment/42202564
comment on: http://stackoverflow.com/q/26092101
type: QuestionComment
type: Comment
score: 1
has text: You've already got good answers, but I'd like to add that there is a great chapter in 'eloquent javscript' that describes the use of modules as a form of namespacing: http://eloquentjavascript.net/10_modules.html - They can get rather complicated though with things like commonjs, requirejs, and curljs and a number of formats like AMD, UMD, etc. I personally hope to use ECMAscript 6's module format and then go with a transpiling approach.

http://stackoverflow.com/q/26068744
tagged with: knockout.js
has answer: http://stackoverflow.com/a/26068812
possible better answer: http://stackoverflow.com/a/26068828
has answer: http://stackoverflow.com/a/26068828
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/26068812
score: 1
favorite count: 0
has title: Knockout VIewModel triggers function inside foreach
type: Question
has body: I am fighting with strange issue and i am running out of ideas. The problem is that my view model is triggering function inside foreach on click. So in this case if i click on div menuConnections testcall function is being triggered. Even if i send other value to testcall (such as div id) same value is being sent when I click on menuConnections. How to stop this and force testcall to be executed only when i click on TheDivWhoCalls? function ProfileViewModel(userId) { var self = this; self.connectionRequests = ko.observableArray(); self.getConnections = function () { $("#menuConnections").css({ "display": "block" }); //other code which returns data }; self.testcall = function(data) { alert(target); };; } Connections
has comment: http://stackoverflow.com/comment/40843927
answer count: 2
upvote count: 1

http://stackoverflow.com/comment/40992670
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26150225
score: 0
has text: You should post the rendered HTML, not the PHP, as the PHP is irrelevant here.

http://stackoverflow.com/comment/40786390
comment on: http://stackoverflow.com/q/26034757
score: 0
has text: Run PDF.js in the SVG mode? Just to notice, PDF.js is designed to run on any browser that supports HTML5. Apperently Safari is not a such thing (Chrome for iPad is just a Safari in different dress)
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40870289
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26083141
has text: what do you have an array in the first place? your inputs are just two, and where did `answerArray` come from? and what is your real intent? an ajax submit? or a normal refresh form submission?
score: 0

http://stackoverflow.com/comment/40891820
comment on: http://stackoverflow.com/q/26094940
score: 3
has text: One difference is that the first is plain, vanilla Javascript, while the second uses a widely known library called [jQuery](http://jquery.com/).
type: Comment
type: QuestionComment

cordova
tags question: http://stackoverflow.com/q/26157810
tags question: http://stackoverflow.com/q/26047170
tags question: http://stackoverflow.com/q/26144677
tags question: http://stackoverflow.com/q/26146734
tags question: http://stackoverflow.com/q/26108767
tags question: http://stackoverflow.com/q/26089192
tags question: http://stackoverflow.com/q/26171642
tags question: http://stackoverflow.com/q/26075918
tags question: http://stackoverflow.com/q/26090311
tags question: http://stackoverflow.com/q/26116057
tags question: http://stackoverflow.com/q/26192653
tags question: http://stackoverflow.com/q/26043787
tags question: http://stackoverflow.com/q/26161742
tags question: http://stackoverflow.com/q/26098788
tags question: http://stackoverflow.com/q/26144256
tags question: http://stackoverflow.com/q/26096790
tags question: http://stackoverflow.com/q/26036324
tags question: http://stackoverflow.com/q/26108612
tags question: http://stackoverflow.com/q/26045307
tags question: http://stackoverflow.com/q/26142308
tags question: http://stackoverflow.com/q/26057605
tags question: http://stackoverflow.com/q/26153326
tags question: http://stackoverflow.com/q/26179861
tags question: http://stackoverflow.com/q/26162271
tags question: http://stackoverflow.com/q/26135100
tags question: http://stackoverflow.com/q/26133569
tags question: http://stackoverflow.com/q/26130805
tags question: http://stackoverflow.com/q/26107033
tags question: http://stackoverflow.com/q/26085826
tags question: http://stackoverflow.com/q/26107307
tag name: cordova
tags question: http://stackoverflow.com/q/26165641
tags question: http://stackoverflow.com/q/26063022
tags question: http://stackoverflow.com/q/26085181
tags question: http://stackoverflow.com/q/26145522
tags question: http://stackoverflow.com/q/26038789
tags question: http://stackoverflow.com/q/26060383
tags question: http://stackoverflow.com/q/26047180
tags question: http://stackoverflow.com/q/26165879
tags question: http://stackoverflow.com/q/26139679
tags question: http://stackoverflow.com/q/26129944
tags question: http://stackoverflow.com/q/26170641
tags question: http://stackoverflow.com/q/26096115
tags question: http://stackoverflow.com/q/26102037
tags question: http://stackoverflow.com/q/26092121
tags question: http://stackoverflow.com/q/26126870
tags question: http://stackoverflow.com/q/26101648
tags question: http://stackoverflow.com/q/26147246
tags question: http://stackoverflow.com/q/26194417
tags question: http://stackoverflow.com/q/26147644
type: Tag
tags question: http://stackoverflow.com/q/26052462
tags question: http://stackoverflow.com/q/26128622

http://stackoverflow.com/q/26164509
tagged with: ajax
has title: Combine Form Submit button with Dialog submit button
has comment: http://stackoverflow.com/comment/41019672
has body: Thanks for taking a look at my question here.. I have a dialog box that i have opening and the form that i have there works and gets the recurly key that i want. but i would like to replace the form button with the button that is with the Jquery UI dialog box button at the moment i have to use both buttons... Form button (BLACK ARROW) to get the Recurly Key(Yellow Arrow) and then the Submit payment button (GREEN ARROW) to actually submit the form to the server... i have 2 sets of javascript that is being used for this operation... i am tring to figure out how to combine them into the Submit payment button(Green Button) and not have to have 2 seperate buttons Code Is below picture: I believe i am on jquery 1.11.1 Gems gem 'jquery-rails' gem 'jquery-ui-themes' gem 'jquery-ui-rails' Dialog script (in application.js) $(document).ready(function() { $(function() { $("#pay_window").dialog({ autoOpen: false, width: 600, buttons: { "Submit Payment": function() { $(this).dialog("close"); $.ajax({ url: "/payment", data: $("#PaymentForm").find([company_id, billing_email, first_name, last_name, recurly_token, plan]).serialize(), type: "POST", success: function (data) { alert('Payment Completed') }, error: function (jqXHR, textStatus, errorThrown) { alert('error: ' + textStatus + ': ' + errorThrown); } }); return false; } } //$(this).dialog("close"); }); $("#pay_button").on("click", function() { $("#pay_window").dialog("open"); }); }); }); Form script (in the html of the form) Form HTML coding <%= javascript_include_tag 'https://js.recurly.com/v3/recurly.js' %> <%= stylesheet_link_tag "creditcard" %> <.. removed most of the form fields...> Get Token
type: Question
has comment: http://stackoverflow.com/comment/41019627
tagged with: ruby-on-rails
score: 0
tagged with: coffeescript
has comment: http://stackoverflow.com/comment/41019185
has comment: http://stackoverflow.com/comment/41019577
answer count: 0
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/a/26137399
has body: Try this : Instead of removing options from the list you can show / hide it, so that if user change selected option then same option should get restored in rest of the select boxes. $(document).ready(function(){ $('select').on('change', function(event ) { //restore previously selected value var prevValue = $(this).data('previous'); $('select').not(this).find('option[value="'+prevValue+'"]').show(); //hide option selected var value = $(this).val(); //update previously selected data $(this).data('previous',value); $('select').not(this).find('option[value="'+value+'"]').hide(); }); }); DEMO
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40968987
score: 15
upvote count: 15
has comment: http://stackoverflow.com/comment/40968783
accepted answer of: http://stackoverflow.com/q/26137309
has comment: http://stackoverflow.com/comment/40968868
type: Answer
has comment: http://stackoverflow.com/comment/40968558
answers question: http://stackoverflow.com/q/26137309

http://stackoverflow.com/q/26141942
tagged with: javascript
type: UnansweredQuestion
downvote count: 0
score: 1
favorite count: 0
has body: I'm building an application with Spring 3, Spring MVC, Tomcat7. I'm triying to refresh content in a jsp when something changes in server side. For this purpose I followed this tutorial: https://netbeans.org/kb/docs/javaee/maven-websocketapi.html and this one http://self-learning-java-tutorial.blogspot.com.es/2014/08/annotated-server-endpoint.html. Now I want to trigger one message to all clients (want to see the message in all oppened jsp pages) but I'm not sure how to do this. (For example when an entity is removed in server-side) As far as I undesrstand, will I need to trigger somehow the method annotated with @OnMessage? and how would I do this? maybe injecting this @ServerEndpoint... class? Thanks you all
type: Question
upvote count: 1
has title: Java websocket trigger event to javascript client
tagged with: java
answer count: 0
tagged with: websocket

http://stackoverflow.com/q/26148691
has comment: http://stackoverflow.com/comment/40990714
tagged with: javascript
linked to: http://stackoverflow.com/q/1635800
has body: I'm new to Javascript and was wondering how a public variable in a prototype can be modified. function Thing (val) { this.x = val; this.addToX = function (valIn) { this.x += valIn; }; } function ChildThing () { this.y = 55; } ChildThing.prototype = new Thing(10); var frank = new ChildThing(); console.log("out1: " + frank.x); frank.addToX(10); console.log("out2: " + frank.x); This code takes the value in the prototype x which is 10 and adds 10 to it in the addToX function. The new x value is stored in the top level object rather than replacing the current x value in the prototype. Is there a way to overwrite the existing x in the prototype or am I using Javascript wrong?
has comment: http://stackoverflow.com/comment/40996014
possible better answer: http://stackoverflow.com/a/26149648
has answer: http://stackoverflow.com/a/26149648
tagged with: prototype-programming
has answer: http://stackoverflow.com/a/26148757
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26148757
has comment: http://stackoverflow.com/comment/40990038
tagged with: prototype
has comment: http://stackoverflow.com/comment/40990024
type: Question
score: 0
has title: How does one manipulate a variable in a prototype?
answer count: 2

http://stackoverflow.com/a/26244736
type: Answer
answers question: http://stackoverflow.com/q/26114749
score: 2
upvote count: 2
has body: You should use a priority queue, something like priorityqueuejs In this way you can dequeue an item with the max priority and execute it. Some code: 'use strict'; var PriorityQueue = require('priorityqueuejs'); var queue = new PriorityQueue(function(a, b) { return a.value - b.value; }); queue.enq({ value: 10, func: function() { console.log("PRIORITY: 10"); } }); queue.enq({ value: 500, func: function() { console.log("PRIORITY: 500"); } }); queue.enq({ value: 300, func: function() { console.log("PRIORITY: 300"); } }); queue.enq({ value: 100, func: function() { console.log("PRIORITY: 100"); } }); (function executeNext() { if(queue.size()) { var next = queue.deq(); next.func(); if(queue.size()) { setTimeout(executeNext, 0); } } })(); And the output is: PRIORITY: 500 PRIORITY: 300 PRIORITY: 100 PRIORITY: 10 Here is the executeNext function extracts the next top-priority item and executes it.
downvote count: 0

http://stackoverflow.com/a/26138500
has comment: http://stackoverflow.com/comment/40973181
has body: when the app launches i.e with $.index.open() save a property i.e Ti.App.Properties.setString("lastwin",nameofwindow) Whenever you open any other window from this window save the name of the window in the String. in the focus event of each window also update the name in the string.something like : window.addEventListener("focus",function(){ Ti.App.Properties.setString("lastwin",window); }); Hope it helps.
score: 1
answers question: http://stackoverflow.com/q/26112012
upvote count: 1
downvote count: 0
type: Answer

arrays
tags question: http://stackoverflow.com/q/26039457
tags question: http://stackoverflow.com/q/26049381
tags question: http://stackoverflow.com/q/26187553
tags question: http://stackoverflow.com/q/26191820
tags question: http://stackoverflow.com/q/26161424
tags question: http://stackoverflow.com/q/26105198
tags question: http://stackoverflow.com/q/26079353
tags question: http://stackoverflow.com/q/26039558
tags question: http://stackoverflow.com/q/26143304
tags question: http://stackoverflow.com/q/26121929
tags question: http://stackoverflow.com/q/26126713
type: Tag
tags question: http://stackoverflow.com/q/26123114
tags question: http://stackoverflow.com/q/26118697
tags question: http://stackoverflow.com/q/26155010
tags question: http://stackoverflow.com/q/26192807
tags question: http://stackoverflow.com/q/26155764
tags question: http://stackoverflow.com/q/26122766
tags question: http://stackoverflow.com/q/26059955
tags question: http://stackoverflow.com/q/26054209
tags question: http://stackoverflow.com/q/26048970
tags question: http://stackoverflow.com/q/26148714
tags question: http://stackoverflow.com/q/26043639
tags question: http://stackoverflow.com/q/26070481
tags question: http://stackoverflow.com/q/26066463
tags question: http://stackoverflow.com/q/26129544
tags question: http://stackoverflow.com/q/26091271
tags question: http://stackoverflow.com/q/26181733
tags question: http://stackoverflow.com/q/26036200
tags question: http://stackoverflow.com/q/26138416
tags question: http://stackoverflow.com/q/26186997
tags question: http://stackoverflow.com/q/26034264
tags question: http://stackoverflow.com/q/26145616
tags question: http://stackoverflow.com/q/26193393
tags question: http://stackoverflow.com/q/26146753
tags question: http://stackoverflow.com/q/26132888
tags question: http://stackoverflow.com/q/26098797
tags question: http://stackoverflow.com/q/26082373
tags question: http://stackoverflow.com/q/26160963
tags question: http://stackoverflow.com/q/26127814
tags question: http://stackoverflow.com/q/26165922
tags question: http://stackoverflow.com/q/26103365
tags question: http://stackoverflow.com/q/26080946
tags question: http://stackoverflow.com/q/26173684
tags question: http://stackoverflow.com/q/26162271
tags question: http://stackoverflow.com/q/26061427
tags question: http://stackoverflow.com/q/26111024
tags question: http://stackoverflow.com/q/26140640
tags question: http://stackoverflow.com/q/26140067
tags question: http://stackoverflow.com/q/26163792
tags question: http://stackoverflow.com/q/26163833
tags question: http://stackoverflow.com/q/26126765
tags question: http://stackoverflow.com/q/26084891
tags question: http://stackoverflow.com/q/26094641
tags question: http://stackoverflow.com/q/26188759
tags question: http://stackoverflow.com/q/26131547
tags question: http://stackoverflow.com/q/26187576
tags question: http://stackoverflow.com/q/26168153
tags question: http://stackoverflow.com/q/26119668
tags question: http://stackoverflow.com/q/26036236
tags question: http://stackoverflow.com/q/26168657
tags question: http://stackoverflow.com/q/26063760
tags question: http://stackoverflow.com/q/26043294
tags question: http://stackoverflow.com/q/26082737
tags question: http://stackoverflow.com/q/26065505
tags question: http://stackoverflow.com/q/26157870
tags question: http://stackoverflow.com/q/26152655
tags question: http://stackoverflow.com/q/26071079
tags question: http://stackoverflow.com/q/26096905
tags question: http://stackoverflow.com/q/26126051
tags question: http://stackoverflow.com/q/26044813
tags question: http://stackoverflow.com/q/26151928
tags question: http://stackoverflow.com/q/26127309
tags question: http://stackoverflow.com/q/26108249
tags question: http://stackoverflow.com/q/26110240
tag name: arrays
tags question: http://stackoverflow.com/q/26041869
tags question: http://stackoverflow.com/q/26132905
tags question: http://stackoverflow.com/q/26158428
tags question: http://stackoverflow.com/q/26079183

http://stackoverflow.com/comment/40852020
comment on: http://stackoverflow.com/a/26073111
score: 0
type: Comment
has text: seems to work ok in [jsbin](http://jsbin.com/wonoretuziji/1/edit), maybe the fa class is on the wrong element?
type: AnswerComment

http://stackoverflow.com/comment/40805653
type: Comment
type: QuestionComment
score: 0
has text: I'm not sure...it just seems weird that the random UUID is generated in Javascript, but a hacker could submit their own UUID. It seems like if the client is going to generate it, then the server needs a way to validate that it was generated correctly.
comment on: http://stackoverflow.com/q/26047892

http://stackoverflow.com/a/26101165
upvote count: 1
has comment: http://stackoverflow.com/comment/40902707
score: 1
has comment: http://stackoverflow.com/comment/40902761
has body: You need to remove last comma from your array: var musicJsonObjString='{"music":[' + musicEntry.substr(0, musicEntry.length - 1 ) + ']}';
downvote count: 0
answers question: http://stackoverflow.com/q/26101129
type: Answer

http://stackoverflow.com/q/26037393
has body: Im trying to get the Text Statistics function from https://github.com/cgiffard/TextStatistics.js/blob/master/index.js Working in Excel I have minified the JavaScript code to shorten the concatenations Function Text_Statistics1(textString As String) Dim code As String code = "function text_stats(teststringtoprocess){(function(e){function t(e){var t=['li','p','h1','h2','h3','h4','h5','h6','dd'];t.forEach(function(t){e=e.replace('&lt;/'+t+'&gt;','.')});e=e.replace(/&lt;[^&gt;]+&gt;/g,'').replace(/[,:;()\-]/,' ').replace(/[\.!?]/,'.').replace(/^\s+/,'').replace(/[ ]*(\n|\r\n|\r)[ ]*/,' ').replace(/([\.])[\. ]+/,'.').replace(/[ ]*([\.])/,'. ').replace(/\s+/,' ').replace(/\s+$/,'');e+='.';return e}function r(e){return new n(e)}var n=function(n){this.text=n?t(n):this.text};n.prototype.fleschKincaidReadingEase=function(e){e=e?t(e):this.text;return Math.round((206.835-1.015*this.averageWordsPerSentence(e)-84.6*this.averageSyllablesPerWord(e))*10)/10};n.prototype.fleschKincaidGradeLevel=function(e){e=e?t(e):this.text;return Math.round((.39*this.averageWordsPerSentence(e)+11.8*this.averageSyllablesPerWord(e)-15.59)*10)/10};n.prototype.gunningFogScore=function(e){e=e?t(e):this.text;" code = code + "return Math.round((this.averageWordsPerSentence(e)+this.percentageWordsWithThreeSyllables(e,false))*.4*10)/10};n.prototype.colemanLiauIndex=function(e){e=e?t(e):this.text;return Math.round((5.89*(this.letterCount(e)/this.wordCount(e))-.3*(this.sentenceCount(e)/this.wordCount(e))-15.8)*10)/10};n.prototype.smogIndex=function(e){e=e?t(e):this.text;return Math.round(1.043*Math.sqrt(this.wordsWithThreeSyllables(e)*(30/this.sentenceCount(e))+3.1291)*10)/10};n.prototype.automatedReadabilityIndex=function(e){e=e?t(e):this.text;" code = code + "return Math.round((4.71*(this.letterCount(e)/this.wordCount(e))+.5*(this.wordCount(e)/this.sentenceCount(e))-21.43)*10)/10};n.prototype.textLength=function(e){e=e?t(e):this.text;return e.length};n.prototype.letterCount=function(e){e=e?t(e):this.text;e=…
has comment: http://stackoverflow.com/comment/40925893
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26132020
tagged with: javascript
has comment: http://stackoverflow.com/comment/40925883
has title: VBA JavaScript object doesn't support this property or method
has comment: http://stackoverflow.com/comment/40942271
answer count: 1
downvote count: 0
tagged with: vba
tagged with: scriptcontrol
favorite count: 0
accepted answer: http://stackoverflow.com/a/26132020
has comment: http://stackoverflow.com/comment/40946658

http://stackoverflow.com/q/26144760
has body: With fileA userID = (userName) -&gt; id = 0 someAPI.getUser userName, (err, data, res) -&gt; id = data.id if data console.log id # Outputs ID return id console.log userID('someUsername') # Outputs 0 fileB getUser: (username, callback) -&gt; return api.get 'users/show', { 'username': username }, callback how can I get console.log userID('someUsername') to output the ID as well, instead of 0? I.e. have it wait before returning id. I have tried randomly wrapping stuff with Meteor.wrapAsync and Meteor.bindEnvironment but can't seem to get anywhere.
tagged with: javascript
has answer: http://stackoverflow.com/a/26145446
has answer: http://stackoverflow.com/a/26150055
accepted answer: http://stackoverflow.com/a/26150055
score: 0
tagged with: meteor
has comment: http://stackoverflow.com/comment/40982952
has title: Waiting for async callback before returning a value
linked to: http://stackoverflow.com/q/23667086
has comment: http://stackoverflow.com/comment/40982181
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40982438
tagged with: coffeescript
type: Question
possible better answer: http://stackoverflow.com/a/26145446
answer count: 2

http://stackoverflow.com/a/26118028
type: Answer
accepted answer of: http://stackoverflow.com/q/26058617
answers question: http://stackoverflow.com/q/26058617
type: AcceptedAnswer
has body: Retrieved answer from a related question, by gertas Angular-UI modals are using transclusion to attach modal content, which means any new scope entries made within modal are created in child scope. This happens with form directive. This is known issue: https://github.com/angular-ui/bootstrap/issues/969 I proposed the quick workaround which works for me, with Angular 1.2.16: &lt;form name="$parent.userForm"&gt; The userForm is created and available in modal's controller $scope. Thanks to scope inheritance userForm access stays untouched in the markup. &lt;div ng-class="{'has-error': userForm.email.$invalid}"}&gt; So, in my form I would have to set a name="$parent.friendForm" attribute to &lt;form&gt;, and then bind the radio button model to it, ng-model="friendForm.chosenFriend" to be able to read it from the modal scope at $scope.friendForm.chosenFriend.
score: 0

http://stackoverflow.com/comment/40912009
type: Comment
type: QuestionComment
has text: Not an answer but the code you presented is unmaintainable mess. Consider at least not mixing HTML, JS, PHP and SQL in one file.
comment on: http://stackoverflow.com/q/26106138
score: 0

http://stackoverflow.com/comment/41072320
comment on: http://stackoverflow.com/q/26193406
has text: If language is a barrier to explain things clearly, I recommend [Stack Overflow em Português](http://pt.stackoverflow.com/)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41049512
comment on: http://stackoverflow.com/q/26180520
score: 0
type: QuestionComment
has text: @SergiuParaschiv My $rootScope.signedIn functionally return true or false. So I am running ng-show="signedIn" in my view. My problem is that $rootScope.signedIn is false, or undefined, until the service loads the data. So it briefly shows the navbar with the "false" ng-show value until the user clicks something.
type: Comment

http://stackoverflow.com/comment/40789002
comment on: http://stackoverflow.com/q/26036139
has text: @Moob i have updated my code with css please check - http://jsfiddle.net/3u24c1nw/1/
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41000299
type: Comment
has text: I have solved by the following code $('#tableID tr:has(td)').not('table table tr')
comment on: http://stackoverflow.com/a/26154364
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41003995
score: 0
type: Comment
has text: I shouldn't post answers before coffee… fixed.
comment on: http://stackoverflow.com/a/26156185
type: AnswerComment

http://stackoverflow.com/comment/40874674
has text: Apostrophes delimit string literals. You also have a variable with a string in it. `+` concatenates strings together. Look at where you should have string literals and where you should have string variables.
comment on: http://stackoverflow.com/q/26085668
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/26110161
answers question: http://stackoverflow.com/q/26110119
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26110119
has comment: http://stackoverflow.com/comment/40919231
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: Javascript, like many C-like languages, will fall through from one case to the next if you forget to include a break (as noted here) So: switch(type) { case "radio": if($(this).prop("checked")) { var name = $(this).attr("name"); var value = $(this).val(); jsonAdd(name, value); } break; case "checkbox": if($(this).prop("checked")) { var name = $(this).attr("name"); var value = $(this).val(); jsonAdd(name, value); } break; default: var name = $(this).attr("name"); var value = $(this).val(); jsonAdd(name, value); break; } should sort you out.

http://stackoverflow.com/comment/41026739
type: QuestionComment
has text: Why you dont do what you have to do inside the `success` callback itself?
comment on: http://stackoverflow.com/q/26168645
score: 0
type: Comment

http://stackoverflow.com/q/26191307
upvote count: 5
type: UnansweredQuestion
tagged with: css
downvote count: 0
answer count: 0
type: Question
score: 5
has comment: http://stackoverflow.com/comment/41117510
has comment: http://stackoverflow.com/comment/41144304
tagged with: javascript
has title: jsfiddle - embed svg is not supported in jsfiddle
tagged with: jquery
has comment: http://stackoverflow.com/comment/41113724
has comment: http://stackoverflow.com/comment/41106832
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/15234184
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
has body: I've built a visualisation component library using javascript and jquery. In a component called Flags, I am getting svg document as repsonse in jquery's ajax call. First I tried to append that svg document with dataType:xml in jquery ajax() and the below code: var container = $(document.createElement("div")); var importedSVGRootElement = document.importNode(this.flag.documentElement, true); container.append(importedSVGRootElement); This works fine in Chrome and on jsfiddle as well. Later I changed it to embed tag as below to maintain the sequence of flags as per my requirements. var stampDiv = $(document.createElement("embed")).attr("src", this.flag + '?apikey=' + Data.apiKey).attr("type", "image/svg+xml"); container.append(flagDiv); This was also working fine in Chrome and on jsfiddle. But 2 days ago it stopped working on jsfiddle. I could not identify the issue so I finally changed it to img tag as below: var stampDiv = $(document.createElement("img")).attr("src", this.flag+ '?apikey=' + Data.apiKey); container.append(flagDiv); svg as img works in all three major browsers and on jsfiddle as well. My question is why embed src=svg stopped workding on jsfiddle ??? I couldn't modify svg document in case of it's displayed as img on browser. After appending the svg I need to edit it. Update: JSFiddle on IE and FF supports object and embed tags for svg. But JSFiddle on Chrome does not display svg from object and embed. Example JSFiddle example to demonstrate the issue. This fiddle works fine in FF and IE but does not work in Chrome. I am using Chrome Version 37.0.2062.120. How do I make embed tag works for svg in 3 major browsers (Chrome,FF,IE) and on jsfiddle as well ???

http://stackoverflow.com/q/26180241
has answer: http://stackoverflow.com/a/26299807
tagged with: applescript
has body: I need to group a few images into one photoshop file and try to look for a more optimized path. I know I can use applescript to do something like this. tell application id "com.adobe.Photoshop" activate open file (CurrentImg) duplicate layer 1 of current document to end of NewDocRef end tell -- CurrentImg is some file path and NewDocRef is a path to some other open document I can use the open to open every image one at a time and move it into one document. My Question is, does anyone have some better way to place images directly into the open document. Looking for the effect of just dragging an image in. I am open to having a javascript function to do it. (I don't know javascript but I can manage to mostly understand what I read.)
type: Question
answer count: 2
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/2718443
tagged with: photoshop
type: UnansweredQuestion
has title: Placing an image into a currently open photoshop document (applescript)
tagged with: extendscript
has answer: http://stackoverflow.com/a/26190585

http://stackoverflow.com/comment/40819929
type: AnswerComment
has text: Because the 7 first slides have the exact same caption "Adaptacja hali na centrum wspinaczkowe - Murall - Waraszawa Żerań" so it updates the sentence but you can't see it because it's seven times the same sentence. I changed it in the console and add a different number to each slide to check and when I slide it works fine.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26049368

http://stackoverflow.com/q/26078819
type: AnsweredQuestion
score: 0
type: Question
has title: ExtJS 5: Resize panel on image loaded
tagged with: layout
tagged with: user-interface
tagged with: javascript
tagged with: extjs
has answer: http://stackoverflow.com/a/26084918
answer count: 1
tagged with: extjs5
accepted answer: http://stackoverflow.com/a/26084918
has body: It seems like a trivial task to do but I'm still unable to accomplish it. I'm building an application with ExtJS 5 and I have a panel with an image component on it. The panel has to resize (shrinkWrap : true) to the original size of the image. The problem is that when the layout manager is calculating the size of the panel, the image isn't yet loaded completely so it's size is 0,0. I tried to add different listeners like afterrender, render, boxready and practically all of the rest but nothing seems to work fo me - the image size is always equals to 0. I also tried to bind the sizes of the two components as you'll see in the code below, but this doesn't worked either. If i configure the boxready event with a delay of 1 second the image size is finally computed and I can call updateLayout() but this is a very unreliable solution because the image is loaded from remote server and I'm unable to predict the exact time of server response. I know that at some point of the application lifecycle the image is loaded and I need to find which event is being fired in order to resize my panel. Example code Ext.application({ name : 'MyApp', launch : function() { /* * I was hoping that taking the image out of the panel * will 'force' it to be created earlier. */ var img = Ext.create('Ext.Img', { src : 'img.jpg', reference : 'bgimg', publishes : { width : true, height: true } listeners : { boxready : { fn : 'imgReady', scope : this, delay : 100 } } }); Ext.create('Ext.Panel', { renderTo : Ext.get('extjs-content'), width : 1000, height: 700, defaults : { border : true }, layout : 'border', items : [{ region : 'north', height : 80, }, { region : 'east', width : 200, collapsible : true }, { region : 'center', autoScroll : true, items : [{ /* * This is the container of the image. Please note that * I need it to preserve its absolute layout. */ id : 'canvas', layout : 'absolute', shrinkWrap : true, // bind : { // width : '{bgimg.width}', // height: '{bgimg.height}' // }, items : [img] }…

http://stackoverflow.com/comment/40945767
comment on: http://stackoverflow.com/q/26124781
has text: Chrome version? Operating system?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26134124
tagged with: css
has body: I am have created chart using d3.js, when I zoom in or zoom out on web browser this charts do not re-size according to window. Following is what I have done: I am learning d3.js, so I don't know how to do it. Please help me.
has title: Make D3.js charts responsive
has comment: http://stackoverflow.com/comment/40963177
linked to: http://stackoverflow.com/q/9400615
has comment: http://stackoverflow.com/comment/41454188
downvote count: 2
linked to: http://stackoverflow.com/q/23526856
linked to: http://stackoverflow.com/q/20885164
type: Question
score: -2
tagged with: javascript
linked to: http://stackoverflow.com/q/17626555
has answer: http://stackoverflow.com/a/26134216
has comment: http://stackoverflow.com/comment/40962641
linked to: http://stackoverflow.com/q/16265123
upvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40963352
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40963715
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26191152
has body: simply change your input type submit to button &lt;input type="button" value="Return to homepage" onclick="return return1();"&gt;
answers question: http://stackoverflow.com/q/26190915
score: 0
type: Answer

http://stackoverflow.com/a/26074599
has body: you are using jquery it seems, so instead of onclick you should use click
has comment: http://stackoverflow.com/comment/40854012
answers question: http://stackoverflow.com/q/26074579
score: 0
has comment: http://stackoverflow.com/comment/40854010
type: Answer

http://stackoverflow.com/a/26144133
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26103230
downvote count: 0
has body: No matter what I tried, I cannot get the > arrow to the nodes when I add a node to the tree via function. I tried the above solution and custom proxy reader.. I finally settled with this: Ext.define('Ext.proxy.DocumentNodes', { extend: 'Ext.data.proxy.Memory', alias: 'proxy.documentnodes', read: function(operation, callback, scope) { var parent=operation.node; var children=[]; children.push( Ext.create('Document',{ title:'Some document', iconCls:'task-folder', checked: false, leaf: false, expandable: true, children: [{tempitem: true}] }) ); var result=Ext.create("Ext.data.ResultSet",{records: children}); Ext.apply(operation, {resultSet: result}); operation.setCompleted(); operation.setSuccessful(); Ext.callback(callback, scope || this, [operation]); } }); Ext.define('Document', { extend: 'Ext.data.Model', fields: [ {name: 'title', type: 'string'}, ] }); var store = Ext.create('Ext.data.TreeStore', { model: 'Document', proxy: { type: 'documentnodes' }, nextId: 1, folderSort: false }); Then use that store for the tree panel and have onbeforeitemexpand listener for the tree like this: var onbeforeitemexpand = function(node, options) { var firstChild = node.getChildAt(0); if (firstChild.get('tempitem')) { node.removeChild(firstChild, true); } node.store.load({ node: node }); }; tree.on('checkchange', oncheckchange, null); tree.on('beforeitemexpand', onbeforeitemexpand, null); What this all does is that at first the proxy reader creates the node and adds an empty node underneath it so the > arrow appears before the node. Then in the beforeitemexpand it checks if the first node is a temp node and removes it and calls a reload for the node which then executes the proxy reader which adds new node underneath the one which has been opened and a temp node under it... Looks like quite stupid way to do this, but it works and I don't know how else I can get the > arrow to appear before the node if the node doesn't have any children in it but leaf is set to false and expandable is…
score: 1

http://stackoverflow.com/q/26105953
answer count: 1
has body: can you help me i have problem insert variable php into jquery, this my script: &lt;script type="text/javascript"&gt; $("#add").click(function() { var error = &lt;?php echo $reportErr; ?&gt;; $("#table").append("&lt;tr&gt;&lt;td&gt; &lt;input type='text' name='report[]' /&gt; &lt;a href='javascript:void(0);' class='rem'&gt;-&lt;/a&gt;"+error+"&lt;/td&gt;&lt;/tr&gt;"); }); $("#table").on('click','.rem',function() { $(this).parent().parent().remove(); }); &lt;?php $report = "error"; $reportErr = $report; ?&gt;
score: -7
tagged with: jquery
has answer: http://stackoverflow.com/a/26105990
accepted answer: http://stackoverflow.com/a/26105990
favorite count: 0
tagged with: php
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/10668311
has comment: http://stackoverflow.com/comment/40911656
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/10668311
has title: Insert Variable PHP in Jquery
downvote count: 8
upvote count: 1

http://stackoverflow.com/comment/41020906
type: Comment
comment on: http://stackoverflow.com/a/26165365
score: 0
type: AnswerComment
has text: Woah, +1 for the archaeology :)

http://stackoverflow.com/comment/40863483
comment on: http://stackoverflow.com/a/26079551
has text: You should put the answer in a separated line. It's incredibly hard to read when you use backticks. And good catch with the `i` modifier: I wouldn't remember that!
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26136306
has body: This could be a timing issue, try waiting until the data is loaded before initializing DataTables: $.getJSON('/api/aspnetusers', null, function (users) { ViewModel.usersList.pushAll(users); }).done(function(){ $('.table').DataTable(); });
type: Answer
accepted answer of: http://stackoverflow.com/q/26135896
answers question: http://stackoverflow.com/q/26135896
type: AcceptedAnswer
score: 0

http://stackoverflow.com/comment/40832548
comment on: http://stackoverflow.com/a/26062692
score: 0
type: AnswerComment
has text: I know about this lib. But I want to understand why my example doesn't work
type: Comment

http://stackoverflow.com/comment/105838935
score: 2
type: AnswerComment
has text: @oldboy It appears that there are several. https://www.npmjs.com/search?q=exif%20write
type: Comment
comment on: http://stackoverflow.com/a/26105697

http://stackoverflow.com/comment/41056212
comment on: http://stackoverflow.com/q/26184415
type: QuestionComment
type: Comment
has text: If you are building SQL statements on the client that are going to be executed on the server, prepare to be hacked!
score: 5

http://stackoverflow.com/comment/40878822
type: Comment
comment on: http://stackoverflow.com/a/26087897
type: AnswerComment
has text: yes thank you guys i just started doing it
score: 0

http://stackoverflow.com/q/26128387
downvote count: 1
has title: jQuery animation in order delay
type: Question
tagged with: jquery-ui
score: -1
tagged with: jquery-animate
upvote count: 0
has answer: http://stackoverflow.com/a/26128763
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26128506
has answer: http://stackoverflow.com/a/26128553
answer count: 4
has body: Hey all I am trying to call out animations in order. Currently the code below seems to call them all out at the same time even with the delay function (which doesn't seem to be working at all...) $(".overlayChoice1").delay(500).animate({ top: '-15px' }, { duration: 1700, easing: 'easeOutElastic' }) $(".overlayChoice2").delay(500).animate({ top: '-45px' }, { duration: 1700, easing: 'easeOutElastic' }) $(".overlayChoice3").delay(500).animate({ top: '-75px' }, { duration: 1700, easing: 'easeOutElastic' }) $(".overlayChoice4").delay(500).animate({ top: '-105px' }, { duration: 1700, easing: 'easeOutElastic' }) What all would I need to do in order to have the execute one at a time?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26128476

http://stackoverflow.com/q/26068907
has title: Always-true tests failing in Angularjs -- Karma
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40844504
has comment: http://stackoverflow.com/comment/40844283
has comment: http://stackoverflow.com/comment/40844374
tagged with: karma-runner
downvote count: 0
has comment: http://stackoverflow.com/comment/40844774
has answer: http://stackoverflow.com/a/29319385
has comment: http://stackoverflow.com/comment/40844740
type: Question
has body: I've not been able to figure this out for the life of me, but I am having serious trouble getting my tests to run correctly on my Angular app that I'm working on. I'm using karma to run Jasmine tests, and the problem I'm having is with my unit tests. I'm not sure what's broken, but I can't get certain unit tests to pass. They used to all pass just fine, but I've not been able to figure out where the issue is, but it seems like my controllers aren't being loaded into karma/jasmine. Here's my karma.conf.js file: // Karma configuration // http://karma-runner.github.io/0.12/config/configuration-file.html // Generated on 2014-09-26 using // generator-karma 0.8.3 module.exports = function(config) { 'use strict'; config.set({ // enable / disable watching file and executing tests whenever any file changes autoWatch: true, // base path, that will be used to resolve files and exclude basePath: '../', // testing framework to use (jasmine/mocha/qunit/...) 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-animate/angular-animate.js', 'bower_components/angular-cookies/angular-cookies.js', 'bower_components/angular-resource/angular-resource.js', 'bower_components/angular-route/angular-route.js', 'bower_components/angular-sanitize/angular-sanitize.js', 'bower_components/angular-touch/angular-touch.js', 'bower_components/jquery/dist/jquery.min.js', 'app/scripts/*.js', 'app/scripts/**/*.js', 'test/mock/**/*.js', 'test/spec/**/*.js' ], // list of files / patterns to exclude exclude: ['app/scripts/vendor.js'], // web server port port: 8080, // Start these browsers, currently available: // - Chrome // - ChromeCanary // - Firefox // - Opera // - Safari (only Mac) // - PhantomJS // - IE (only Windows) browsers: [ 'Firefox' ], // Which plugins to enable plugins: [ 'karma-jasmine', 'karma-firefox-launcher', 'karma-coverage' ], // Continuous I…
tagged with: javascript
tagged with: gruntjs
answer count: 2
score: 5
has comment: http://stackoverflow.com/comment/40844495
has comment: http://stackoverflow.com/comment/40844672
has answer: http://stackoverflow.com/a/46636679
tagged with: jasmine
favorite count: 0
has comment: http://stackoverflow.com/comment/40844711
upvote count: 5
tagged with: angularjs

http://stackoverflow.com/comment/40953741
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26128788
type: Comment
has text: I get an object. I think there is no longer a mouseleave- since there is no longer a mouseenter - the iframe is completely covering the previous div and therefore you never enter it, so you cant leave it.

http://stackoverflow.com/comment/40822063
has text: [You can use a bit of regex btw](http://jsfiddle.net/z92hano6/).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26057051

http://stackoverflow.com/a/26038392
has comment: http://stackoverflow.com/comment/40787636
has comment: http://stackoverflow.com/comment/40787430
score: 0
has body: I tried it with two events as soon as you mouseout the other markers disappears. var marker = new google.maps.Marker(); marker.setPosition(myLatlng); marker.setMap(map); marker.setDraggable(true); google.maps.event.addListener(marker, 'mouseover', function() { marker.setDraggable(false); }); google.maps.event.addListener(marker, 'mouseout', function() { marker.setDraggable(true); }); Here is the live example
type: Answer
answers question: http://stackoverflow.com/q/26036488

http://stackoverflow.com/q/26053837
has title: ajax function not opening a page
has comment: http://stackoverflow.com/comment/40816072
score: 0
has answer: http://stackoverflow.com/a/26054110
has comment: http://stackoverflow.com/comment/40816151
possible better answer: http://stackoverflow.com/a/26053884
has comment: http://stackoverflow.com/comment/40816123
has answer: http://stackoverflow.com/a/26053897
accepted answer: http://stackoverflow.com/a/26053897
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40816088
tagged with: php
has answer: http://stackoverflow.com/a/26053930
has comment: http://stackoverflow.com/comment/40817382
type: Question
has comment: http://stackoverflow.com/comment/40817109
has body: i don't understand why ajax is not working. my code: function edit_row(id) { $.ajax({ method:'get', url:'form.php', success:function(data) { $('#form_div').html(data); } }); } <?php echo ' '.$status.' '; ?> its not opening form.php onclick what is the problem please help me!!!
has comment: http://stackoverflow.com/comment/40816065
tagged with: javascript
has answer: http://stackoverflow.com/a/26053884
tagged with: jquery
has comment: http://stackoverflow.com/comment/40816748
has comment: http://stackoverflow.com/comment/40817003
tagged with: ajax

http://stackoverflow.com/comment/40828747
type: QuestionComment
comment on: http://stackoverflow.com/q/26060824
score: 0
has text: I guessed it refers to a ` ` element.
type: Comment

http://stackoverflow.com/a/26080621
has comment: http://stackoverflow.com/comment/40865504
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40865477
accepted answer of: http://stackoverflow.com/q/26080442
type: Answer
has comment: http://stackoverflow.com/comment/40865451
answers question: http://stackoverflow.com/q/26080442
has body: Code: Change your function to this: function disableBtn(el) { el.parentNode.nextElementSibling.querySelector("input").disabled = false; } And the handler to this: onclick="disableBtn(this)" DEMO: http://jsfiddle.net/dcg8gzqt/ Explanation: So now the handler passes the current element that was clicked to the disableBtn function. That function then... takes the clicked element and traverses up to its .parentNode moves ahead to the .nextElementSibling, which is the next div, then searches inside that div using .querySelector() for the first input it finds. sets the .disabled property of the input to false

http://stackoverflow.com/comment/40884756
type: Comment
has text: This solved it. Thanks a lot. Could you elaborate on the asynchronous process? What makes setting a path to a source image different from other values?
comment on: http://stackoverflow.com/a/26090915
type: AnswerComment
score: 0

http://stackoverflow.com/q/26176999
tagged with: ruby-on-rails
has title: onclick event on checkbox in haml/rails
has comment: http://stackoverflow.com/comment/41061236
type: Question
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41042191
tagged with: ruby-on-rails-4
tagged with: haml
score: 1
favorite count: 0
answer count: 0
has body: I want to implement realtime events (google analytics) on our filter engine. This is my code: %fieldset .checkbox %input{type: "checkbox", value: ".range-1", :onclick=&gt;"_gaq.push(['_trackEvent', 'Price', 'Range 100-200', 'Yep']);" } This is the html: &lt;div class='checkbox'&gt; &lt;input onclick="_gaq.push(['_trackEvent', 'Price', 'Range 100-200', 'Yep']);" type='checkbox' value='.range-1'&gt; &lt;label&gt;€&lt;/label&gt; This code don't work. What a i doing wrong here ? thanks..remco
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/40973007
type: QuestionComment
score: 0
has text: what actually this `$(e.target).prev().find("[id]")[0].id` suppose to give from your given `HTML` ?
comment on: http://stackoverflow.com/q/26139741
type: Comment

http://stackoverflow.com/comment/40867637
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26081550
type: AnswerComment
has text: @コードバリノ - Since it looks like you might be new here at StackOverflow, are you aware that when someone answers your question, you can click on the green checkmark to the left of that answer to mark it as the best answer. This rewards the answerer and earns you some reputation points for follow the proper procedure here.

http://stackoverflow.com/q/26102067
answer count: 0
has comment: http://stackoverflow.com/comment/40904705
score: 0
has comment: http://stackoverflow.com/comment/40905813
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40905094
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/195951
has title: Raw JS removing of a class
duplicate of: http://stackoverflow.com/q/195951
favorite count: 0
has comment: http://stackoverflow.com/comment/40904590
type: UnansweredQuestion
has body: I am trying to create a toggle action but with raw JS. So instead of using toggle class I must add and remove each part. When the user clicks a radio button, one div gets class enabled and the other gets class disabled which controls my styling (to grey the area out) JS Fiddle showing the problem. I am using the following for this: var d = document.getElementById('justfull'); d.className = d.className + " enabled"; and then giving the other div disabled var other = document.getElementById('firstandlast'); other.className = other.className + " disabled"; But I am stuck when it comes to removing the class if it's previously been added. As obviously the user can toggle between the two radio buttons. I need to add the enabled class to my new div but I also need to check to see if there was previously a disabled class added to it and if so, remove it. So I am using the following code: var oldclass="disabled"; d.className=d.className.replace(oldclass,""); But this doesn't seem to work as the classname just adds and adds until I have something like this: &lt;div id="justfull" class=" enabled enabled enabled disabled"&gt; How would I properly both add the enabled class and check for a removal of the other? Essentially a toggle class but in raw JS.

safari
tags question: http://stackoverflow.com/q/26058964
tags question: http://stackoverflow.com/q/26095621
tags question: http://stackoverflow.com/q/26112981
tags question: http://stackoverflow.com/q/26193200
tags question: http://stackoverflow.com/q/26170865
type: Tag
tags question: http://stackoverflow.com/q/26092505
tags question: http://stackoverflow.com/q/26138371
tags question: http://stackoverflow.com/q/26068567
tags question: http://stackoverflow.com/q/26146897
tag name: safari

http://stackoverflow.com/a/26128578
has comment: http://stackoverflow.com/comment/40953084
has comment: http://stackoverflow.com/comment/40952826
has comment: http://stackoverflow.com/comment/40953007
has comment: http://stackoverflow.com/comment/40953052
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26128547
downvote count: 0
answers question: http://stackoverflow.com/q/26128547
has comment: http://stackoverflow.com/comment/40953067
type: Answer
has body: You need the eq() function: for(var i = 0; i &lt; foos.length; i++) { foos.eq(i).html(bars.eq(i).html()); } From the Docs: Description: Reduce the set of matched elements to the one at the specified index.
has comment: http://stackoverflow.com/comment/40953029
score: 7
has comment: http://stackoverflow.com/comment/40952913
has comment: http://stackoverflow.com/comment/40953099
has comment: http://stackoverflow.com/comment/40953013
upvote count: 7
has comment: http://stackoverflow.com/comment/40953108

http://stackoverflow.com/comment/40838721
has text: so as quick fix you can use also `mousemove` like [this](http://jsfiddle.net/cLs7mq4p/4/)
score: 1
comment on: http://stackoverflow.com/q/26065461
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26171538
has answer: http://stackoverflow.com/a/26171691
has title: Class-wide object instantiated from constructor
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41042333
has answer: http://stackoverflow.com/a/26172269
tagged with: meteor
has comment: http://stackoverflow.com/comment/41042255
has comment: http://stackoverflow.com/comment/41033026
type: UnansweredQuestion
tagged with: design-patterns
has comment: http://stackoverflow.com/comment/41032700
linked to: http://stackoverflow.com/q/12370851
tagged with: oop
tagged with: coffeescript
type: Question
has body: With someAPI in the following, it requires credentials that I would like to assign dynamically in the constructor. Then I would like to use someAPI throughout the class. I.e. in the following example someMethodUsingSomeAPI is a helper method I would like to call from other methods within an instance of B. Is that possible with Coffee-/JavaScript? (The only way I can get it to work is if I put someMethodUsingSomeAPI inside the constructor.) SomeAPI = Npm.require 'someAPI' class B extends A constructor: (options = {}) -> unless @ instanceof B return new B(options) @config = JSON.parse(Assets.getText('config/' + options.username + '.json')) @someAPI = new SomeAPI consumer_key: @config.credentials.consumer.key consumer_secret: @config.credentials.consumer.secret access_token: @config.credentials.access.token access_token_secret: @config.credentials.access.secret someMethodUsingSomeAPI = Async.wrap((id, callback) -> return @someAPI.get 'whatever/show', { 'id': id }, callback ) console.log someMethodUsingSomeAPI '123' # Error: Cannot call method 'get' of undefined Updated with suggestion from saimeunt ... someMethodUsingSomeAPI = (id) -> wrappedGet = Async.wrap(@someAPI, 'get') wrappedGet 'whatever/show', { id: id } console.log someMethodUsingSomeAPI '123' # ReferenceError: someMethodUsingSomeAPI is not defined & b = B('username') b.someMethodUsingSomeAPI '123' # Works! Changing someMethodUsingSomeAPI: to someMethodUsingSomeAPI = console.log someMethodUsingSomeAPI '123' # Error: unsupported argument list & b = B('username') b.someMethodUsingSomeAPI '123' # TypeError: Object # has no method 'someMethodUsingSomeAPI' (This is with Meteor 0.9.3.1) UPDATE IN AN ATTEMPT TO CLARIFY <a href="http://coffeescript.org/#try:class%20SomeClass%0A%20%20constructor%3A%20(options%20%3D%20%7B%7D)%20-%3E%0A%20%20%20%20%40someLastName%20%3D%20options.someLastName%20%0A%20%20%20%0A%20%20someMethod%20%3D%20(someFirstName)%20-%3E%0A%20%20%20%20%22Hello%20%22%20%2B%20someFirstName%20%2B%20%22%20…
has comment: http://stackoverflow.com/comment/41032868
has comment: http://stackoverflow.com/comment/41032695
tagged with: javascript
has comment: http://stackoverflow.com/comment/41032936
has answer: http://stackoverflow.com/a/26178333

http://stackoverflow.com/comment/42910032
type: QuestionComment
comment on: http://stackoverflow.com/q/26106840
score: 0
has text: Perhaps the templates were not compiled with version 2.0.0. To update the globally installed handlebars: `npm update -g handlebars`
type: Comment

http://stackoverflow.com/a/28464257
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26148845
has body: you need to implement excanvas.js Canvas tags which jvector map uses are not supported in ie8 call the plugin before any canvas tags are called and your map will work correctly.
accepted answer of: http://stackoverflow.com/q/26148845

http://stackoverflow.com/comment/41048629
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26065151
has text: Thank you SO much! This was just what I needed. I'm very grateful for your help and thoughtful way of explaining.

http://stackoverflow.com/a/26169427
answers question: http://stackoverflow.com/q/26169192
has body: All you likely need to do is an if statement. For example: if ($('#home-page').length) { $( "#google_map_vc_box" ).before( $( "#banners" ) ); $( "#google_map_vc_box" ).after( $( ".css3button" ) ); } I am just using #home-page as an example. So is there a unique id that only appears on the home page and not on any others? If so, use that. If you don't have one, I'd recommend just adding a unique id to the home page body tag. For example if your home page has this html for the body tag &lt;body id="home-page"&gt; Then the if ($('#home-page').length) will check if the length is either true or false. If the id #home-page does not appear on the page, then the inserts will not happen, but if you do have that element on the page it will.
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41029148
accepted answer of: http://stackoverflow.com/q/26169192
has comment: http://stackoverflow.com/comment/41031277
has comment: http://stackoverflow.com/comment/41028258
score: 1

http://stackoverflow.com/comment/41023510
has text: Do you mean that once you hover, you want the span overlays to stay visible even when you unhover?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26166538

http://stackoverflow.com/comment/40988905
type: Comment
type: QuestionComment
has text: historical note: npm used to behave exactly as you desire, but they updated it to allow locking-in specific versions of depends to avoid an update breaking expectations... i think that was around 2010/11, not sure which version.
comment on: http://stackoverflow.com/q/26147864
score: 0

http://stackoverflow.com/a/26673248
type: Answer
has body: First of all, I would like to thank all the persons who responded to me to develop a solution to this. Special thanks should go to @FreeAsInBeer and MrPiao. After spending several days I was able to develop the following solution for getting mail headers. I removed all the unnecessary business logic from the code and finally came up with the following code. It can be used for reading the headers of inbox emails using JQuery. I am making an EWS request outside to get the headers. From its callback method, I can retrieve the expected result. Afterwards, it is better to use jQuery.parseXML to read and manipulate the response (which is not included in the code) I hope this explanation will help you. var _mailbox; var _ItemId1 (function () { "use strict"; // The Office initialize function must be run each time a new page is loaded Office.initialize = function (reason) { $(document).ready(function () { app.initialize(); _mailbox = Office.context.mailbox; _ItemId1 = _mailbox.item.itemId; }); }; })(); function getSelectedEmailHeaders() { // Wrap an Exchange Web Services request in a SOAP envelope. var var1 = '<?xml version="1.0" encoding="utf-8"?>'; var var2 = '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'; var var3 = ' <soap:Header>'; var var4 = ' <t:RequestServerVersion Version="Exchange2010" />'; var var5 = ' </soap:Header>'; var var6 = ' <soap:Body>'; var var7 = ' '; var var8 = ' '; var var9 = ' <t:BaseShape>IdOnly</t:BaseShape>'; var var10 = ' <t:AdditionalProperties>'; var var11 = ' <t:FieldURI FieldURI="item:Subject" />'; var var12 = ' <t:FieldURI FieldURI="item:MimeContent" />'; var var13 = ' </t:AdditionalProperties>'; var var14 = ' '; var var15 = ' '; var var16 = ' <t:ItemId Id="' + _ItemId1 + '" />'; var var17 = ' '; var var18 = ' '; var var19 = ' …
upvote count: 2
answers question: http://stackoverflow.com/q/26092938
score: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26092938

http://stackoverflow.com/comment/41009979
has text: `$('#button1').click(function() { $.ajax({ ... }).done(function(data) { $('#RefreshableDiv').html(data); }) });`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26159821
score: 1

http://stackoverflow.com/comment/41050123
type: AnswerComment
has text: Use `bulk.find({_id: doc._id}).upsert().replaceOne(doc);` instead, in the `forEach looping`.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26169051

http://stackoverflow.com/q/26088256
score: 1
has title: jQuery .val('') does not clear text area input
has comment: http://stackoverflow.com/comment/40879464
has body: I want to clear the user input in a text area field, but it does not work. When I print the value in the browser's console it appears to be "empty", but the text still exists in the field. I am using Meteor 0.9.3. Here is my code: Meteor.call('submitMessageForChat', message, this._id, function(error) { if (error) { throwWarning('error', error.reason, error.details); return null; } $('#chat-input').val(''); }); &lt;textarea id="chat-input" name="message" type="text" value="" rows="5" class="form-control"&gt;&lt;/textarea&gt; Any help would be greatly appreciated!
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/40879624
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40879375
has comment: http://stackoverflow.com/comment/40879499
has answer: http://stackoverflow.com/a/26088548
has comment: http://stackoverflow.com/comment/40879675
accepted answer: http://stackoverflow.com/a/26088409
tagged with: meteor
possible better answer: http://stackoverflow.com/a/26088548
downvote count: 0
has answer: http://stackoverflow.com/a/26088409
type: Question
type: AnsweredQuestion

http://stackoverflow.com/q/26177688
tagged with: jquery
has comment: http://stackoverflow.com/comment/41043351
tagged with: ajax
has comment: http://stackoverflow.com/comment/41053646
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41057554
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26455707
has comment: http://stackoverflow.com/comment/41043295
has title: loaded form in div, button won't run click function
score: 0
has body: jquery: $(document).ready(function () { $("#stusel").change(onSelectChangest); $("#schoolsel").change(onSelectChangesc); $("#coachsel").change(onSelectChangeco); var selval = 0; // function onSelectChangest(){ var selected = $("#stusel option:selected"); // alert ('Student Selected ' + selected.val()); selval = selected.val(); var usertype = '1'; var pdata = {'usertype' : '1' , 'formtype': selected.val() }; loadform(pdata); }; // form load function function loadform(pdata) { $('#msg1').load( 'makeform.php', pdata, function (responseText, textStatus, XMLHttpRequest) { var tstring = responseText.split('~$~'); var thestatus = tstring[0]; var theform = tstring[1]; if (selval == 4) { // not coded for selection 4 yet } if (thestatus == 1) { // insert the form in the form div $('#display').html(theform); // open the form div $('#dispbox').removeClass('hideme'); // run the process to make the form live loadformjs(selval); } else { $('#dispbox').addClass('hideme'); $('#display').html(''); } } ); } //loadformjs function loadformjs(form) { $('#submitme').unbind('click'); switch (form) { case '1': //login $('#submitme').click(function(e) { e.preventDefault(); var user = 'login_name='+ escape($('#uname').val()); var upass = '&login_pass='+ escape($('#upass').val()); var utype = '&user_type='+ usertype; var pdata = user+upass+utype; $.ajax({ type : "POST", cache : false, url : "login.php", data : pdata, success: function(data) { var tstring = data.split('~'); sysmsg = tstring[1]; userdata = tstring[2]; jQuery.cookie( 'userdata', userdata ); } }); }); break; case '2': //register alert ('loaded theform'); $('#submitme').click(function(e) { alert('before ajax call'); e.preventDefault(); }); break; } } //snipped code here.... Theres more cases, etc. Now the process is that the user selects an action from the pulldown, that action causes a form to be loaded in a div, when the form is loaded the div is displayed and then the loadformjs is run. The first thing that it does is unbind the…
tagged with: forms
type: Question
has comment: http://stackoverflow.com/comment/41056856
has comment: http://stackoverflow.com/comment/41043252
tagged with: javascript
has comment: http://stackoverflow.com/comment/41043419
has comment: http://stackoverflow.com/comment/41054106
has comment: http://stackoverflow.com/comment/41043270
answer count: 1

http://stackoverflow.com/comment/40868206
has text: what is the output of `alert(id)` at the beginning of the function?
comment on: http://stackoverflow.com/q/26082044
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26170809
answer count: 1
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26170824
score: 2
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/26170824
has title: Replace a word in a json object
type: Question
has body: I'm trying to replace tmb with det in this string: http://content7.flixster.com/movie/11/17/69/11176945_tmb.jpg This my code I tried. (function($) { $(document).ready(function() { var $apikey = 'myapikey', $apiURL = 'http://api.rottentomatoes.com/api/public/v1.0.json?apikey=', $topboxoffice = 'http://api.rottentomatoes.com/api/public/v1.0/lists/movies/upcoming.json?apikey=', $topboxofficeSearch = $topboxoffice + $apikey; $.ajax({ url: $topboxofficeSearch, dataType: 'jsonp', success: function(response){ var $movies = response.movies, $moviehtml = $("#movies"); $.each($movies, function(index, $movie){ var $poster = $movie.posters.original; $poster.replace("tmb", "det"); //console.log($poster); $("#movies").append( '&lt;img src= '+$poster+ '&gt;'); }); }, error: function(){ console.log("error"); } }); }); })(jQuery); I tried to use javascript .replace() but that didn't seem to work. Any help would be awesome.
tagged with: javascript
upvote count: 2

http://stackoverflow.com/q/26104651
has comment: http://stackoverflow.com/comment/40910804
tagged with: javascript
has comment: http://stackoverflow.com/comment/40909776
has comment: http://stackoverflow.com/comment/40910463
linked to: http://stackoverflow.com/q/25354070
has title: Meteor: Owl carousel-ify div every time data is re-rendered
has body: I'm trying to use the owl carousel jquery plugin in my Meteor app to go through today's items. Right now, I have the owl carousel code in the template's rendered callback so everything works fine and when the template is rendered, the carousel wrapper is applied. So far, so good. Except that, I have a button to change the day, and the items data is dependent on that reactive "day" session, so when I click it, it'll change the session to the next day and naturally the items change and a new piece of dom is loaded, replacing the carousel rendered in the beggining. I understand that the way that rendered worked in the old days, I wouldn't have had a problem, as the template would've been re-rendered. But it doesn't seem to be the case now. So I tried moving the carousel code in the sub-template's (the one that includes the items) rendered callback. No luck there either. I stumbled upon a technique for executing the rendered code (https://github.com/davidworkman9/meteor-reactive-rendered/blob/master/reactive-rendered.js) every time the data changes, but it still seems to execute before everything is ready, resulting in incomplete carousels. I really feel like I've tried everything here, so if anyone has the solution to this problem, it would be greatly appreciated. Here's the index template: {{indexSelectedDay.label}} {{#if indexSelectedDay.isToday}} {{#if todayWeather.day}} Today See all {{todayWeather.day.tempF}}°F {{todayWeather.day.label}} {{> heroItemsList dayItems}} Tonight See all {{todayWeather.night.tempF}}°F {{todayWeather.night.label}} {{> heroItemsList nightItems}} {{else}} Tonight See all {{todayWeather.night.tempF}}°F {{todayWeather.night.label}} {{> heroItemsList nightItems}} Tomorrow See all {{tomorrowWeather.day.tempF}}°F {{tomorrowWeather.day.label}} {{> heroItemsList tomorrowItems}} {{/if}} {{else}} Day See all {{dayWeather.day.tempF}}°F {{dayWeather.day.label}} {{> heroItemsList dayItems}} Night See all {{dayWeather.night.tempF}}°F {{dayWeather.night…
tagged with: meteor
answer count: 0
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/40910477
has comment: http://stackoverflow.com/comment/40910643
has comment: http://stackoverflow.com/comment/40910513
has comment: http://stackoverflow.com/comment/40911121
tagged with: owl-carousel
type: Question
has comment: http://stackoverflow.com/comment/40909652

http://stackoverflow.com/q/26063989
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40836097
has answer: http://stackoverflow.com/a/26064631
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40836120
tagged with: ajax
has comment: http://stackoverflow.com/comment/40835204
score: 0
has title: Laravel populate select field after selecting county input
answer count: 1
accepted answer: http://stackoverflow.com/a/26064631
tagged with: php
has body: I am using Laravel 4 Here is my route: Route::get('api/dropdown/cities', function(){ $county = Input::get('county_id'); $cities = Place::where('parent_id', $county)->get(array('id','name')); return Response::json($cities, 200); }); My script: $(document).ready(function() { $('#county_id').change(function(){ $.getJSON("{{ url('api/dropdown/cities')}}", { option: $(this).val() }, function(data) { var model = $('#city_id'); model.empty(); $.each(data, function(index, element) { model.append(" " + element.name + " "); }); }); }); }); My form: {{ Form::select('county_id', $counties, (isset($data['county_id'])) ? $data['county_id'] : null, array('id' => 'county_id')) }} Select a county first It is almost working, because Laravel Debugbar returns the SQL query: select `id`, `name` from `places` where `parent_id` is null But as you can see, the parent_id is NULL, and I can't figure out why the Input::get('county_id') is not passed correctly to the route?
has comment: http://stackoverflow.com/comment/40835273
tagged with: laravel

http://stackoverflow.com/a/26095817
answers question: http://stackoverflow.com/q/26095773
accepted answer of: http://stackoverflow.com/q/26095773
score: 0
type: AcceptedAnswer
type: Answer
has body: Divide by 100000 before ceiling, then multiply with 100000: function ceil100K (nr) { return Math.ceil(nr / 100000) * 100000; }

http://stackoverflow.com/comment/40980188
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26143592
score: 0
has text: I personally prefer 35.89 as my truthy value, but to each his own i guess.

http-status-codes
tags question: http://stackoverflow.com/q/26180938
type: Tag
tag name: http-status-codes

http://stackoverflow.com/a/26077423
has comment: http://stackoverflow.com/comment/40879715
answers question: http://stackoverflow.com/q/26077241
has comment: http://stackoverflow.com/comment/40863955
has body: I have tested your fiddle link, it is working well on my FF-32.0.3,Windows 8.
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40874760

http://stackoverflow.com/q/26131764
downvote count: 0
has body: I'm creating a simple light box to display photos. When you click on an image in a gallery it expands to take up most of the screen while blacking out all content of the page behind. To do this I just append a div with the image clicked within it to the DOM like this: &lt;div id='image'&gt; &lt;img src="someImage"&gt; &lt;/div&gt; I'm trying to create another onclick event that hides this DIV, but only if the click is anywhere other than the image. So if you click on the image I don't want the div to disappear....only if you click on any of the blacked out portion to the sides of the image. I tied the onclick to the "body" like so: $('body').click(function(){ $('#image').hide(); }): The problem is even if I click the image it disappears. How can I disable this?
type: Question
has answer: http://stackoverflow.com/a/26131799
accepted answer: http://stackoverflow.com/a/26131799
tagged with: javascript
tagged with: image
has title: Stop click event on an image inside of a div
upvote count: 2
answer count: 1
tagged with: events
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/40822722
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26057247
has text: @MEM Maybe there is another way to do it without display flex, I'm not sure, but it won't be as easy as this I guess.
type: AnswerComment

http://stackoverflow.com/q/26071112
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/26071140
tagged with: javascript
tagged with: jquery
tagged with: image
possible better answer: http://stackoverflow.com/a/26071121
has answer: http://stackoverflow.com/a/26071121
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Clicking on image does function supposed to be just for image's parent
type: Question
has answer: http://stackoverflow.com/a/26071140
has answer: http://stackoverflow.com/a/26071145
has body: I have a image gallery thing, and when you click on an image it opens up the image in full screen. Kind of like Facebook's theatre mode. I have it so when you click the images container it hides the container and the image. The problem is, the even also fires when I click on the image. And I don't want that. Here's my code: $("section ul li img").on("click", function() { $(this).addClass("clicked"); var image_src = $("section ul li img.clicked").prop("src"); $("div.image-full").css({ "visibility": "visible", "display": "block" }); $("div.image-full img").prop("src", image_src); }); $("div.image-full").on("click", function() { if($("div.image-full").css("cursor") == "pointer") { $("section ul li img.clicked").removeClass("clicked"); var image_src; $("div.image-full").css({ "visibility": "hidden", "display": "none" }); $("div.image-full img").prop("src", ""); } }); I tried making it so if when I click and the cursor is a pointer it hides the container and the image but when it's just a regular cursor nothing fires. But that didn't work.

http://stackoverflow.com/comment/40861891
comment on: http://stackoverflow.com/q/26078424
score: 0
type: Comment
type: QuestionComment
has text: Did you try changing sleepCheck to numHours?

http://stackoverflow.com/comment/104331505
has text: • for referenced Node, details at say https://en.wikipedia.org/wiki/Node.js • for referenced JXcore •• official site ‘http://jxcore.com/’ {not working: gives ‘Sedo Domain Parking’} as per below GitHub domain is no longer maintained; and its https://web.archive.org/web/*/http://jxcore.com/ reports ‘This URL has been excluded from the Wayback Machine.’ However •• current details found via https://google.com/search?q=jxcore as find 1 of https://github.com/jxcore/jxcore (its official repo) •• BUT that SAYS ‘Nubisa halting active development’ & ‘Latest commit.. Oct 27, 2017’ so 2.1yrs ago.
comment on: http://stackoverflow.com/q/26155435
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26035825
downvote count: 0
has answer: http://stackoverflow.com/a/26036346
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40783225
has comment: http://stackoverflow.com/comment/40783066
has comment: http://stackoverflow.com/comment/40783844
has comment: http://stackoverflow.com/comment/40784437
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26035992
tagged with: node.js
has comment: http://stackoverflow.com/comment/40783142
has comment: http://stackoverflow.com/comment/40783064
upvote count: 1
has body: I am new to Coding and at present i am working on NodeJs file system module. I am working on a file which contains large data and that data stored as a string. My problem is , I am not able to find the matching close brace and position of '}'. { // I know the index of '{' { { } { } } { { } } } // have to find position here.
type: Question
has title: How to find the position of matching brace in data?
score: 1
tagged with: javascript
answer count: 2

http://stackoverflow.com/q/26071033
tagged with: ajax
has comment: http://stackoverflow.com/comment/40848080
tagged with: onclick
score: 0
has answer: http://stackoverflow.com/a/26071060
has body: I am truing to pass variables to a PHP script using onclick but obviously I am doing something wrong. So..I have in my main page somewhere: &lt;img src="myImage.jpg" id="cart_icon" onclick="addcart('100')"&gt; and the addcart function: function addcart(id){ $.ajax({ url: "add_item.php", method: "POST", data: {prod_id : id} }); } The add_item.php looks like this (just a simple example): if (!isset($_SESSION)) session_start(); if (isset($_POST['prod_id'])){$_SESSION['item_id']=$_POST['prod_id'];}else($_SESSION['item_id']='Not Set'); When I check the value of the SESSION['item_id'] I am getting 'Not set' instead of '100' Any thoughts? This is just a simple example. The actual code is more complex. Thanks
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40848179
type: Question
has comment: http://stackoverflow.com/comment/40848022
accepted answer: http://stackoverflow.com/a/26071060
has title: Passing variables to PHP script via AJAX
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41047862
has text: I mean points with x/y value set to null. Like this: `data: [ [x, y, z], [x, y, z], [null, null, null] ...]` or: `data: [ [x, y, z], [x, y, z], null, null, null]`.
type: QuestionComment
comment on: http://stackoverflow.com/q/26179678
score: 0
type: Comment

http://stackoverflow.com/a/26121975
upvote count: 2
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26121885
type: Answer
has body: You're assigning the same rate to both taxRate and tipRate. Perhaps you want to pass two different rates to the constructor: var Calculator = function(taxRate, tipRate){ this.taxRate = taxRate; this.tipRate = tipRate; } Then the code that uses it should look like: var tax = new Calculator(13, 10); var itemPrice = tax.calcTotal(200);

http://stackoverflow.com/comment/41061127
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26186815
has text: @chipChocolate.py i did an update with an example, but i dont know if it is clear enough
score: 0

http://stackoverflow.com/q/26038554
has comment: http://stackoverflow.com/comment/40788583
linked to: http://stackoverflow.com/q/14013504
tagged with: android
upvote count: 1
has comment: http://stackoverflow.com/comment/40872211
has answer: http://stackoverflow.com/a/27566220
has comment: http://stackoverflow.com/comment/40787755
type: AnsweredQuestion
tagged with: android-webview
score: 1
has body: Scene: I am trying to display a file image selected from the gallery into a webview using javascricpt and/or jquery but I am not able to do so. The same works while opening the html in a desktop browser. What I have tried so far is this in the android code is this: Written the openFileChooser code and getting the image path and also the image bytes. calling the following in onActivityResult method: String js = "javascript:loadImage(file://" + imagePath + ")"; mWebView.loadUrl(js); The html looks like this: &lt;div class="file_chooser"&gt; &lt;!-- &lt;input type="submit" value="File chooser" id="btnSubmit" onclick="sayHello();" &gt; --&gt; &lt;input type="file" name="banner_image" id="banner_image" onChange="loadImage(this);" accept="image/*" /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;img alt="" id="image" src="" width="200px" height="200px" onclick="showSrc(this.src);"&gt; &lt;/div&gt; and the javascript looks like this: &lt;script type="text/javascript"&gt; function loadImage(input) { if (input.files &amp;&amp; input.files[0]) { Android.alert('input: ' + input.files[0]); var reader = new FileReader(); reader.onload = (function(input) { return function(e) { $('#image').attr('src', e.target.result); console.log('onload stage finished'); }; })(input); reader.onloadend = (function() { // $('#image').src(file.name); }); reader.readAsDataURL(input.files[0]); //data:image/jpg;base64,xxxxxxxxxxxxxxxxxxxxxxxxxxxx -&gt; this did not work } function showSrc(src) { Android.alert('src : ' + src); } &lt;/script&gt; But i seem to be messing with the android code and also javascript, since i do not know jscript that well. Please assist as to how to display an image after selection from the gallery. EDIT: I have gone through lotsa links that show how to call a javscript function from android , and how to display an image by calling loadBaseUrl with the new html code that has an image inside the src …
has comment: http://stackoverflow.com/comment/40788166
type: Question
has comment: http://stackoverflow.com/comment/40787826
has comment: http://stackoverflow.com/comment/40788059
has comment: http://stackoverflow.com/comment/40788383
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40788370
linked to: http://stackoverflow.com/q/10700998
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
accepted answer: http://stackoverflow.com/a/27566220
has title: Display local android image in a webview using javascript or jquery
favorite count: 0

http://stackoverflow.com/a/26112549
answers question: http://stackoverflow.com/q/26112366
score: 0
type: Answer
has body: The time period that has appointment is (8:00~9:10),(12:00 ~ 13:00)and (16:00~19:00). So if the time interval given is (A~B): if(B&lt;8) return true; if(A&gt;8&amp;&amp;B&lt;9:10) return true; if(A&gt;12&amp;&amp;B&lt;13) return ture; if(A&gt;13&amp;&amp;B&lt;16) return true; if(A&gt;19) return true return false;

http://stackoverflow.com/comment/40883443
type: AnswerComment
comment on: http://stackoverflow.com/a/26090221
type: Comment
has text: Comment this line it works // $(this).removeClass("expanding")
score: 0

http://stackoverflow.com/a/26111203
downvote count: 1
has body: The examples given in the reference work fine. Run code snippet below for results. What do you mean when you say it doesn't work for you? function setup() { createCanvas(640, 480); } function draw() { fill(0); textSize(36); textFont("Georgia"); text("Hello World! in Georgia.", 12, 40); textFont("Arial"); text("Hello World! in Arial.", 12, 100); textFont("Walter Turncoat"); text("Hello World! in Walter Turncoat.", 12, 160); } &lt;link href="http://fonts.googleapis.com/css?family=Walter+Turncoat&amp;.css" rel="stylesheet"/&gt; &lt;script src="http://cdn.jsdelivr.net/p5.js/0.3.8/p5.min.js"&gt;&lt;/script&gt;
upvote count: 7
answers question: http://stackoverflow.com/q/26110959
type: Answer
score: 6

http://stackoverflow.com/comment/40898954
comment on: http://stackoverflow.com/q/26098997
has text: @AnoopJoshi I was just making one but problem is solved, thanks anyway
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/72176617
has text: Using a deferred is the usual way to do this, I have no idea why this isn't higher
type: Comment
type: AnswerComment
score: 4
comment on: http://stackoverflow.com/a/34637436

http://stackoverflow.com/comment/41049641
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26180849
has text: Please explain, **completely and precisely**, what characteristics would make up "a better solution". After all, *everything* on the Internet involves "send messages, and then the server side has to parse it and make a method call itself". For example, servlets would have to do the same thing.
score: 0

http://stackoverflow.com/a/26161922
answers question: http://stackoverflow.com/q/26160649
has comment: http://stackoverflow.com/comment/41270546
accepted answer of: http://stackoverflow.com/q/26160649
type: Answer
downvote count: 0
has body: You are using the same name in is-from attribute which is "datepicker.dt". And you pass 'dt' to your open function. So if you have the same html code for multiple datepickers, you are opening all together. You need to define different is-open names for different datePickers and it is more convenient to define different open functions for each of datePickers. Then what you need is just set the is-open attribute to true for associated datePicker's function. $scope.openDt1 = function($event) { $event.preventDefault(); $event.stopPropagation(); $scope.datepicker.dt1 = true; }; $scope.openDt2 = function($event) { $event.preventDefault(); $event.stopPropagation(); $scope.datepicker.dt1 = true; }; &lt;button type="button" id="dateButton" class="btn btn-default" ng-click="openDt1($event)"&gt; &lt;input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt" is-open="datepicker.dt1" min-date="minDate" max-date="maxDate" show-weeks="false" ng-required="true" datepicker-options="dateOptions" show-button-bar="false" readonly="readonly"/&gt; &lt;/button&gt; &lt;button type="button" id="dateButton" class="btn btn-default" ng-click="openDt2($event)"&gt; &lt;input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt" is-open="datepicker.dt2" min-date="minDate" max-date="maxDate" show-weeks="false" ng-required="true" datepicker-options="dateOptions" show-button-bar="false" readonly="readonly"/&gt; &lt;/button&gt;
score: 1
has comment: http://stackoverflow.com/comment/41014822
has comment: http://stackoverflow.com/comment/41042623
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41373594

http://stackoverflow.com/comment/40781856
has text: sound = parseInt(sound, 10); should be sound = parseFloat(sound);
comment on: http://stackoverflow.com/q/26034468
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26178062
type: Answer
answers question: http://stackoverflow.com/q/26177969
has body: You could get the text using jquery $(".el").text()
score: 0

http://stackoverflow.com/comment/40807572
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26048954
type: AnswerComment
has text: See second demo, is that what you want? (colors only for illustrating purpose)

http://stackoverflow.com/comment/73577622
has text: can you provide an example of the snippet that you have used
type: Comment
comment on: http://stackoverflow.com/a/26102713
type: AnswerComment
score: 4

http://stackoverflow.com/comment/40890150
comment on: http://stackoverflow.com/a/26092309
type: AnswerComment
score: 0
type: Comment
has text: Thanks a lot for the help Arun. However when I `echo $_POST['p'];` on the page it posts to, there is no value. Any idea why this may be?

http://stackoverflow.com/comment/40827916
has text: Very insightful, as it gives us hints on the components of a uglifier
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26034725
type: Comment

http://stackoverflow.com/comment/40949771
score: 0
has text: Thevs, there are 8 ('s and 8 )'s
comment on: http://stackoverflow.com/q/26105793
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26112366
has answer: http://stackoverflow.com/a/26112418
has comment: http://stackoverflow.com/comment/40923151
tagged with: time
possible better answer: http://stackoverflow.com/a/26112418
accepted answer: http://stackoverflow.com/a/26112560
type: AnsweredQuestion
has body: I need to check the time interval between two time period. ie needs to block the appointment of a person in client side. I have got 2 arrays var fromTimings=["8:00","12:00","","16:00"]; var toTimings=["9:10","01:00","","19:00"]; These are the blocks which are already booked. ie first appointment is booked from 8:00 to 9:10, second is 12:00 to 1:00 and so on. All the appointments are stored in two arrays in the above format. Now I need to check for a user defined slot. ie if the user entered like fromTime = 9:15 and 10:00 then must return / show available logic as follows fromTime | toTime | result ------------+--------------+----------- 7:00 | 7:59 | true 8:10 | 10:00 | false ( already meeting between 8:00 to 9:10) 19:01 | 23:59 | true Can anyone please help ? Thanks in advance
has comment: http://stackoverflow.com/comment/40922952
type: Question
has answer: http://stackoverflow.com/a/26112549
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26112560
has title: Check time interval between two times
has comment: http://stackoverflow.com/comment/40923009
tagged with: datetime

http://stackoverflow.com/a/26047883
upvote count: 1
has comment: http://stackoverflow.com/comment/40826183
has body: You could simply make Handlers it's own class. Note that you should not access private members from outside the class like I did in the exemple below. You must expose the correct public API to make objects work together without violating encapsulation. function RandomClass(id){ this._id = id; this.handlers = new Handlers(this); } function Handlers(randomClassInstance) { this._randomClassInstance = randomClassInstance; } Handlers.prototype = { constructor: Handlers, handlerOne: function () { console.log("Handler one calling from ID: "+ this._randomClassInstance._id); } }; Then you can do: var rnd = new RandomClass('test'); rnd.handlers.handlerOne(); //Handler one calling from ID: test
type: Answer
answers question: http://stackoverflow.com/q/26047655
has comment: http://stackoverflow.com/comment/40806372
downvote count: 0
score: 1

http://stackoverflow.com/comment/40838363
has text: Is it possible that your `click` listener works fine but something is overwriting `alert` in Chrome and IE?
type: Comment
comment on: http://stackoverflow.com/q/26064806
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41000075
score: 0
type: Comment
has text: Try `Hammer(document.body).on(...`
type: QuestionComment
comment on: http://stackoverflow.com/q/26154233

http://stackoverflow.com/a/26090120
type: Answer
has comment: http://stackoverflow.com/comment/40882966
score: 6
answers question: http://stackoverflow.com/q/26090098
downvote count: 0
has body: Wrap it with parenthesis to make your code valid javascript syntax. I guess you wanted to declare some anonymous function. Here's how this is done: (function() { return function(a) { console.log('msg' + a); } })()(3); or maybe you meant: (function someFunc(a) { console.log('msg' + a); })(3); In the first case your anonymous scope returns a function, so you need to first invoke it before passing any parameters to it. In the second case, it's just an anonymous function being declared and executed immediately by passing the parameters directly.
upvote count: 6

http://stackoverflow.com/q/26117304
accepted answer: http://stackoverflow.com/a/26117420
possible better answer: http://stackoverflow.com/a/26118399
has comment: http://stackoverflow.com/comment/40932195
has answer: http://stackoverflow.com/a/26118399
tagged with: angularjs
type: Question
linked to: http://stackoverflow.com/q/3337056
has answer: http://stackoverflow.com/a/26117518
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/40932017
has title: Angular JS File upload Content Disposition
tagged with: angularjs-directive
has body: I am new to Angular JS and trying my hands on File upload. My requirement is to submit the multipart data on button click. I read on ng-model not working on type="file", so I got to know the work around and i copied the directive. after working through that directive, while sending data there is no Content-disposition data set. I mean file name, content type etc which I want to read at server side. that is why I am getting null at headerOfFilePart.getFileName() what I am doing wrong. what is the right way to achieve things i described above in Angular JS. &lt;div ng-controller="uploadController"&gt; &lt;h2&gt; Add Order &lt;/h2&gt; Enter your Name: &lt;input type="text" name="name" ng-model="myName"/&gt; &lt;input type="file" fileread="vm.uploadme" /&gt; &lt;input type="button" name="button" ng-click='uploadFile()'/&gt; &lt;/div&gt; And this is my JS part validationApp.controller('uploadController', function($scope,$http,$location,$window) { $scope.uploadFile = function() { var fd = new FormData(); //Take the first selected file fd.append("file", $scope.vm.uploadme); fd.append("name", $scope.myName); uploadUrl = "http://localhost:8080/IPOCCService/rest/UserManager/upload1"; $http.post(uploadUrl, fd, { withCredentials: true, headers: {'Content-Type': undefined }, transformRequest: angular.identity }). success(function(data, status, headers, config) { alert(data); }). error(function(data, status, headers, config) { alert("failure"); }); }; }); validationApp.directive("fileread", [function () { return { scope: { fileread: "=" }, link: function (scope, element, attributes) { element.bind("change", function (changeEvent) { var reader = new FileReader(); reader.onload = function (loadEvent) { scope.$apply(function () { scope.fileread = loadEvent.target.result; }); }; reader.readAsDataURL(changeEvent.target.files[0]); }); } }; }]); REST JAVA @POST @Path("/upload1") @Produces({ MediaType.APPLICATION_JSON} ) @Consumes(MediaType.MULTIPART_FORM_DATA) public Response responseMs…
has answer: http://stackoverflow.com/a/26117420
linked to: http://stackoverflow.com/q/17900588
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40932163
tagged with: javascript

http://stackoverflow.com/q/26119584
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40939995
tagged with: node.js
has comment: http://stackoverflow.com/comment/40935528
score: 2
tagged with: sails.js
downvote count: 0
type: Question
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/40935706
has answer: http://stackoverflow.com/a/26150673
has title: Sails js - Creates a copy of assets
tagged with: javascript
has answer: http://stackoverflow.com/a/32452018
has comment: http://stackoverflow.com/comment/40935907
has comment: http://stackoverflow.com/comment/40936292
favorite count: 0
has body: We are considering porting our project to Sails.js. Our static assets are quite large - more than 3 GB. So, this has created a serious limitation as it doubles the size of our app. Can we modify Sails js to prevent this default behavior or can some one recommend some other framework?

http://stackoverflow.com/q/26047036
type: Question
answer count: 2
tagged with: session
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26051420
has answer: http://stackoverflow.com/a/26047136
score: 0
tagged with: session-timeout
has answer: http://stackoverflow.com/a/26051420
tagged with: http-redirect
has title: Redirect to login on session timeout in spring
tagged with: spring
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26047136
has body: I have a multi-page web application, it uses iframe to handle the current page, and at the top I have the navigator. The problem is, when the user become idle and the session timeout. The page continues as "logged" state. When the user tries to interact with the iframe page (current page) the server redirect the iframe page to the login page and the navigator continues in the top. How can I redirect the entire page to the login? Can I use websockets to the server send back a message informing that the session timeout and than redirect to login?

http://stackoverflow.com/comment/41720268
type: AnswerComment
comment on: http://stackoverflow.com/a/26035373
has text: Hello, how can i grab the email address? out.php waits $_POST['custemail']
type: Comment
score: 0

http://stackoverflow.com/a/26066905
answers question: http://stackoverflow.com/q/26066870
has comment: http://stackoverflow.com/comment/40840728
has comment: http://stackoverflow.com/comment/40841022
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40841180
has body: you have to do data["5425ba85c976a~2014-09-26_7-13-47.png"] instead of console.log(data.fileName);
has comment: http://stackoverflow.com/comment/40840607
has comment: http://stackoverflow.com/comment/40841252
downvote count: 0
has comment: http://stackoverflow.com/comment/40840691
has comment: http://stackoverflow.com/comment/40840632
type: Answer
has comment: http://stackoverflow.com/comment/40841131
has comment: http://stackoverflow.com/comment/40841075

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/26126256
tags question: http://stackoverflow.com/q/26064817
type: Tag
tags question: http://stackoverflow.com/q/26149189

http://stackoverflow.com/comment/126265079
comment on: http://stackoverflow.com/a/26188452
type: Comment
has text: Thanks for the answer, I already wasted an hour on this.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26116298
has title: Underscore.js filter operation to create a list of object dynamically
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40930018
tagged with: javascript
linked to: http://stackoverflow.com/q/13789618
tagged with: angularjs
type: Question
has body: I have done the following to loop through two List of objects in AngularJS and create a new List of object conditionally. $scope.loading = true; $scope.toUpdate = []; for (var i = 0; i &lt; changedItems.length; i++) { for (var j = 0; j &lt; $scope.originalItems.length; j++) { if (changedItems[i].AttributeName == $scope.originalItems[j].AttributeName &amp;&amp; changedItems[i].Value != $scope.originalItems[j].Value) { $scope.toUpdate.push(changedItems[i]); } } } I am creating a list of object when the value is changed by the user (the $scope.originalItems has the original values). I send it to the MVC controller to update the changes. I am doing this because I don't need to update values those have not been changed. This approach is making to many iterations. Requirement: I am sure that this can be done in a straight forward manner using Underscore.js but I am not able to do it. Need help converting this logic into Underscore.
has answer: http://stackoverflow.com/a/26116477
score: 0
answer count: 1
tagged with: underscore.js
accepted answer: http://stackoverflow.com/a/26116477

http://stackoverflow.com/comment/41040041
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26175770
has text: FYI: The second "diagram" is a simple HTML Table - nothing to do with highcharts

http://stackoverflow.com/q/26047502
tagged with: browserify
has title: Browserify + Grunt + Remapify: Cannot Find Module
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26246483
tagged with: node.js
has comment: http://stackoverflow.com/comment/40813558
type: AnsweredQuestion
score: 1
upvote count: 1
linked to: http://stackoverflow.com/q/23556690
type: Question
accepted answer: http://stackoverflow.com/a/26246483
tagged with: javascript
tagged with: gruntjs
has body: I've read all the docs and several solutions here, but I can't seem to get Remapify configured properly in my Grunt-Browserify config. Here are two few variations I've tried, both resulting in the error "Cannot find module..." browserify: { options: { preBundleCB: function (b) { b.plugin(remapify, [{ cwd: './dev/js/modules', src: './**/*.js', expose: 'modules' }]); } } } browserify: { options: { preBundleCB: function (b) { b.plugin(remapify, [{ cwd: __dirname, src: '.dev/js/modules/**/*.js', expose: 'modules' }]); } } } Does anyone see what I'm doing wrong?

http://stackoverflow.com/comment/41078352
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26190863
has text: Do you have an `{{outlet 'submit'}}` in your index template? You may also want to enable `LOG_TRANSITIONS: true` in your application for more debugging info. Another recommendation is to use the Chrome Ember Inspector plugin and see what templates your view is using.
score: 1

http://stackoverflow.com/comment/41025674
comment on: http://stackoverflow.com/q/26168027
has text: If you downvote, please explain.
type: Comment
type: QuestionComment
score: 1

jquery-plugins
tags question: http://stackoverflow.com/q/26038970
tags question: http://stackoverflow.com/q/26127521
tags question: http://stackoverflow.com/q/26123783
tags question: http://stackoverflow.com/q/26165094
type: Tag
tags question: http://stackoverflow.com/q/26124419
tags question: http://stackoverflow.com/q/26105001
tags question: http://stackoverflow.com/q/26044498
tag name: jquery-plugins
tags question: http://stackoverflow.com/q/26093396
tags question: http://stackoverflow.com/q/26133850
tags question: http://stackoverflow.com/q/26061751
tags question: http://stackoverflow.com/q/26115398

http://stackoverflow.com/q/26093545
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40889620
tagged with: javascript
has answer: http://stackoverflow.com/a/26093611
has body: This is my code for validating domain name. function frmValidate() { var val = document.frmDomin; if (/^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}$/.test(val.name.value)) { } else { alert("Enter Valid Domain Name"); val.name.focus(); return false; } } and &lt;form name="frmDomin" action="" method="post" onsubmit="return frmValidate();"&gt; Domain Name : &lt;input type="text" value="" id="name" name="name" /&gt; &lt;/form&gt; Now I entered http://devp1.tech.in and it alert the message. I want to enter sub domain also. How to change this? I should not get alert.
possible better answer: http://stackoverflow.com/a/38578855
downvote count: 0
answer count: 7
has answer: http://stackoverflow.com/a/38578855
favorite count: 0
has answer: http://stackoverflow.com/a/62917037
has answer: http://stackoverflow.com/a/26093588
has answer: http://stackoverflow.com/a/26093850
accepted answer: http://stackoverflow.com/a/26093611
has comment: http://stackoverflow.com/comment/40889512
has comment: http://stackoverflow.com/comment/40889501
has comment: http://stackoverflow.com/comment/63298120
has answer: http://stackoverflow.com/a/79155503
tagged with: regex
has title: How to validate domain name using regex?
score: 25
upvote count: 25
has answer: http://stackoverflow.com/a/77979442
has comment: http://stackoverflow.com/comment/40889563
has comment: http://stackoverflow.com/comment/40889419
type: Question

http://stackoverflow.com/comment/40949554
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26126663
has text: can you give the link to the page in which you are trying to do this???
score: 0

http://stackoverflow.com/q/26057775
score: 1
has comment: http://stackoverflow.com/comment/40826204
upvote count: 1
type: Question
has body: It's a pain to use equal height with pure css that support at least ie9 and good browsers. So, I'm decided to use js instead. If there's no js enabled on the user side, having not equal heights are the least of my problems. However, I have a very specific request on this "equal height" situation. Using flex, with the help of other SO user, we can have: http://jsfiddle.net/4an5r1b3/1/ HTML lorem ipsium lorem ipsium lorem ipsium lorem ipsium lorem ipsium lorem ipsium lorem ipsium lorem ipsium lorem ipsium lorem ipsium lorem ipsium lorem ipsium lorem ipsium lorem ipsium lorem ipsium lorem ipsium lorem ipsium lorem ipsium lorem ipsium lorem ipsium CSS: .container{ display: flex; } .col { float: left; width: 30%; color: #fff; } .col.left { display: flex; flex-direction: column; background-color: transparent; color: red; } .col.right { background-color: blue; } .bottom-yeah { flex-grow: 1; margin-top: 50px; background-color: yellow; } I'm wondering if we can achieve the same thing, using jquery so that, old browsers could behave as well? Any known script that does this, so that we don't re-invent the wheel here?
has title: Equal height via script
tagged with: javascript
tagged with: jquery
downvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40822970
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26059128

http://stackoverflow.com/comment/41004417
score: 0
type: Comment
type: QuestionComment
has text: because you watch 10 seconds of a video. without code it's hard to help you
comment on: http://stackoverflow.com/q/26155330

http://stackoverflow.com/q/26176346
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41041107
type: Question
has comment: http://stackoverflow.com/comment/41041093
has comment: http://stackoverflow.com/comment/41041130
linked to: http://stackoverflow.com/q/13114781
upvote count: 3
answer count: 2
has body: I have a few files called "helpers.scss", "helpers.js" and "consolerules.js" that I use in every one of my projects. When I'm working on a project I'm modifying one of the files, for example I will add a function for replacing all strings within a strings into "helpers.js" but then when I open my other project I don't have that function. Or I will add a helper css class in helpers.scss in the other project and I don't have it in the other projects. What is the best way so I can always keep them in sync when I edit them in one of the projects? I was thinking of bower, gists, git, dropbox, google drive or something like that ...
has comment: http://stackoverflow.com/comment/41041070
has answer: http://stackoverflow.com/a/46271547
has comment: http://stackoverflow.com/comment/41042739
tagged with: javascript
type: UnansweredQuestion
has title: Best way to keep files that are used in multiple projects in sync?
score: 3
has answer: http://stackoverflow.com/a/46268208

http://stackoverflow.com/a/26065503
downvote count: 0
score: 1
has body: Node.js is a runtime environment. It's a javascript engine with a standard library built around asynchronous I/O. It plays the same role that Java, Python, Ruby, .NET, etc., play for many other web applications. I've been told it's a huge framework that you may not use at least half of. It might be true that most people never use most of the standard library, but I wouldn't think it's more true of Node.js than other runtimes. "Framework" isn't an accurate word to describe it. I've been told that to maximize efficiency, you're better off using Socket.IO to make your own functionalities. Whoever told you that was mistaken, or meant that to maximize efficiency, you're better off using [Node.js and] Socket.IO [instead of other solutions]. Many other non-Node.js solutions require a single thread or process per connection, which limits the number of simultaneous connections a server can handle. Node.js is built around asynchronous I/O which is better for keeping many connections open at once, and Socket.IO is a library for Node.js for using WebSockets.
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26064740

http://stackoverflow.com/a/26142684
type: Answer
answers question: http://stackoverflow.com/q/26141668
has comment: http://stackoverflow.com/comment/40979097
score: 0
has comment: http://stackoverflow.com/comment/40979342
has body: Are you missing the runat="server" statement in the input declaration? &lt;input id="btnUpload" type="button" value="Save" runat="server" onclick="btnSave_Click()"/&gt;

http://stackoverflow.com/q/26096256
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26096670
has title: EmberJS callback on conditional template element insert
score: 0
answer count: 1
tagged with: javascript
has body: I have a form template/component that only shows an input field after a few options are selected, like the type of filter, and in the case of a date I would like to show a data picker on the input field, however I can't seem to be able to get a callback for just the input field without creating another view just for the input field, the template it's a simple if like this {{#if showTextBox}} {{input type="text" value=search_term classNames="addFilterInput"}} {{/if}} is there anyway to get a callback when the input shows up?
tagged with: ember.js
has answer: http://stackoverflow.com/a/26096670

http://stackoverflow.com/q/26191832
tagged with: jquery
has comment: http://stackoverflow.com/comment/41070042
tagged with: ajax
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26194019
tagged with: php
type: AnsweredQuestion
has body: i'm having problem getting the value of a variable into the modal which is supposed to be openning. i have tried using post but nothing changed. Both codes are in index.php. This is the jquery script passing the value $(document).ready(function () { $(".issue").click(function () { var x = $(this).attr("id"); $.ajax({ url: "index.php", type: "GET", data: {data1: x,}, success: function () { $("#modal2").modal('show'); } }); }); }); And i tried echoing the id of class .issue but it doesn't works <?php echo $_GET["data1"]; ?>
has comment: http://stackoverflow.com/comment/41070068
has title: Passing jquery variable into php script in a modal with ajax
type: Question
has comment: http://stackoverflow.com/comment/41070600
accepted answer: http://stackoverflow.com/a/26194019
tagged with: javascript

http://stackoverflow.com/q/26122246
tagged with: google-maps
tagged with: javascript
score: 4
tagged with: google-maps-api-3
has body: so i've created an angular aplication with the angular-google-maps library which include the markerswithlabels directory and the labels overlapse the icons so u can see the other label on top of another icon with label. now i wan't this label and icon to hide behind it so it only shows one text, i've created a code pen to show what i mean: this is where i set the label: options: { labelContent : dist + ' Overlapse', labelAnchor: "16 33", labelClass: 'labelClass', labelStyle: {opacity: 0.75}, labelInBackground: true }, And this tells the markers directory to user markerswithlabels: Here is the codepen example
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26339865
favorite count: 0
has title: angular-google-maps labels overlapse icons
tagged with: angularjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26339865
tagged with: ionic-framework
type: Question
upvote count: 4

http://stackoverflow.com/q/26048061
has body: These days I've questioned myself why we need to load the HTML files as modules in the beforeEach section while testing in AngularJS + Karma. I'm using grunt to run karma and I created a task to run the tests using grunt-watch. The very important part is that I load the templates using $templateCache instead of loading the template as modules. Is this a terrible idea? Why we need to load HTML as modules? How it was before The testing file beforeEach(module("app")); beforeEach(module('src/modules/networks/views/main-page.html')); beforeEach(module('src/modules/networks/views/inner-directive1.html')); beforeEach(module('src/modules/networks/views/inner-directive2.html')); beforeEach(module('src/modules/networks/views/inner-directive3.html')); ... The karma conf module.exports = function (config) { config.set({ basePath: '../', files: [ ... 'src/app.js', 'src/routes.js', 'src/modules/**/*.js', 'tests/**/*.js', 'tests/*.js', 'src/modules/**/*.html' ], preprocessors: { 'src/modules/**/*.html': ['ng-html2js'] } }) }; How it is now The testing file beforeEach(module("app")); ... The karma conf module.exports = function (config) { config.set({ basePath: '../', files: [ ... 'src/app.js', 'src/routes.js', 'src/modules/**/*.js', 'tests/templates.js' 'tests/**/*.js', 'tests/*.js', 'src/modules/**/*.html' ], preprocessors: { 'src/modules/**/*.html': ['ng-html2js'] } }) }; I use grunt to generate templates.js every time we change the HTML files.
favorite count: 0
score: 2
tagged with: karma-runner
answer count: 0
downvote count: 0
type: UnansweredQuestion
tagged with: unit-testing
type: Question
upvote count: 2
has title: AngularJS + Karma: Unit Testing without loading html as modules
tagged with: javascript
tagged with: angularjs

http://stackoverflow.com/comment/40908324
type: QuestionComment
has text: What is websocket.js ? Is it a library for websockets? Do you require only a single file `websocket.js` for using websockets. If it is a library then it will require additonal files for completing its task. By placing the websocket.js file in `www` directory it will start searching for other files in the same directory, which as per your comments will not be available. Hence it will fail. You need to enable CORS at the client as well there is a parameter `origin` in config.xml that needs 2 b set. Also while creating the `WebSocket` object by the `new` operator check what is the return value.
score: 0
comment on: http://stackoverflow.com/q/26090311
type: Comment

http://stackoverflow.com/comment/41006886
type: QuestionComment
comment on: http://stackoverflow.com/q/26156822
has text: My problem is with the client - I don't understand if I need to make changes to the consuming side (and not on Cloudfront side)
score: 0
type: Comment

http://stackoverflow.com/comment/40894394
score: 0
type: Comment
has text: @PatrickKlug this pattern is kind of an anti pattern in even more modern JS, it makes debugging hard because of the closure - closures are awesome for binding state to functions - but they're rather pointless for privates.
type: AnswerComment
comment on: http://stackoverflow.com/a/26092183

http://stackoverflow.com/q/26117076
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/36468181
has body: I am trying to set up a unit test for AngularJS controller which includes a service that calls $http.get method. However, even though I use $httpBackend.expectGET before $httpBackend.flush(), app is trying to GET template HTML resources, so it gives an unexpected request error. beforeEach(inject(function($injector){ controller = $injector.get('$controller'); scope = $injector.get('$rootScope').$new(); httpBackend = $injector.get('$httpBackend'); httpBackend.whenGET(UrlPrefix+"/promotions/default.json").respond("yeh"); })); it("should fetch promotions", function() { httpBackend.expectGET(UrlPrefix+"/promotions/default.json") ; Controller = controller('promotionsController',{ $scope : scope }); scope.getPromotions(); httpBackend.flush(); }); }); I am getting: Unexpected request : GET ./template/loader/app-loader.html This is my template that should be loaded before the controller. Do you have any idea how to bypass template GETS?
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26117317
has comment: http://stackoverflow.com/comment/40931323
type: Question
answer count: 2
tagged with: javascript
has title: Angularjs $httpBackend unexpected request
has comment: http://stackoverflow.com/comment/40931183
upvote count: 1
favorite count: 0
tagged with: httpbackend

http://stackoverflow.com/q/26157428
tagged with: javascript
has title: Store and access data on server using PHP and AJAX
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26157621
tagged with: ajax
tagged with: php
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26157621
has body: I have a website that has the possibility to add comments which are just stored temporarily, when you reload the page the comments are gone. I save the comment data in an ObservAbleArrayList using knockout and javascript. One idea I had was to send this ObservAbleArrayList to my server, store it and then when the page is reloaded the stored arraylist would first update the commentfield. How could I do this with AJAX and PHP? Here is my javascriptcode for the comments: function Comment() { var self = this; self.nickname = ko.observable(); self.newMsg = ko.observable(""); self.editable = ko.observable(false); self.addComment = function () { vm.comments.push(self); vm.selectedComment(new Comment()); }; self.deleteComment = function () { vm.comments.remove(self); }; self.editComment = function () { self.editable(!self.editable()); }; } function ViewModel() { var self = this; self.comments = ko.observableArray(); self.selectedComment = ko.observable(new Comment()); } var vm = new ViewModel(); ko.applyBindings(vm); }); Any help or examples would be very helpful! Thanks in advance.
tagged with: knockout.js
type: Question

http://stackoverflow.com/q/26084224
has comment: http://stackoverflow.com/comment/40873133
has title: why am I getting an undefined error?
score: 0
has comment: http://stackoverflow.com/comment/40888400
answer count: 1
has comment: http://stackoverflow.com/comment/40888404
tagged with: javascript
tagged with: undefined
has comment: http://stackoverflow.com/comment/40872365
type: UnansweredQuestion
has body: I'm working on a javascript debugging tool, what I need at the moment is to get the line number off the end of a stack trace. So I wrote the following function to get a stack trace, remove the first few lines and then I was going to use indexOf(':') to get the line number. However I keep getting a "Cannot call method 'substring' of undefined" error. OK that should be an easy one to fix, but wait a minute - console.log suggest the file is defined. Can someone explain where I'm going wrong. code: var getLine = function () { var stack = (new Error('dummy').stack).toString(); var stackLines = stack.split('\n'); stackLines = stackLines.filter(function (element) { var exclude = [ "Error: dummy", "graph.js" ]; for (var i = 0; i &lt; exclude.length; i++) { if (element.indexOf(exclude[i]) !== -1) { return false; } } return true; }); console.log("1 array", stackLines); console.log("2 element", stackLines[0]); console.log("3 typeof element", typeof (stackLines[0])); console.log("4 huh?", stackLines[0].substring(1)); } output: 1 array [ ' at Object.&lt;anonymous&gt; (E:\\Development\\james\\main.js:52:18)', ' at Module._compile (module.js:456:26)' ] 2 element at Object.&lt;anonymous&gt; (E:\Development\james\main.js:52:18) 3 typeof element string E:\Development\james\graph.js:47 console.log("huh?", stackLines[0].substring(1)); ^ TypeError: Cannot call method 'substring' of undefined the even stanger thing is - if i wrap the console.log statements in a try/catch then it executes without error? code: var getLine = function () { var stack = (new Error('dummy').stack).toString(); var stackLines = stack.split('\n'); stackLines = stackLines.filter(function (element) { var exclude = [ "Error: dummy", "graph.js" ]; for (var i = 0; i &lt; exclude.length; i++) { if (element.indexOf(exclude[i]) !== -1) { return false; } } return true; }); try { console.log("array", stackLines); console.log("element", stackLines[0]); console.log("typeof element", typeof (stackLines[0])); console.log("huh?"…
tagged with: node.js
has comment: http://stackoverflow.com/comment/40873164
has comment: http://stackoverflow.com/comment/40872072
has comment: http://stackoverflow.com/comment/40888333
type: Question
has answer: http://stackoverflow.com/a/26094008
has comment: http://stackoverflow.com/comment/40888420
has comment: http://stackoverflow.com/comment/40872041

http://stackoverflow.com/q/26045313
upvote count: 2
tagged with: php
has answer: http://stackoverflow.com/a/26116758
type: AnsweredQuestion
score: 2
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/3579072
type: Question
downvote count: 0
accepted answer: http://stackoverflow.com/a/26116758
tagged with: javascript
has body: I'm using XAMPP as the server and well i can't seem to upload the image like the documentation of the editor showed me... here is the link: http://editor.froala.com/server-integrations/php-image-upload I already investigated about the problem and normaly they all say is the link that's not correct because you need to put the absolute url there , but even that doesn't seem to work. Here is the code: JS $(document).ready(function(){ $('textarea').editable({inlineMode: false, height:200, imageUploadURL: 'upload_image.php', imageErrorCallback: function (data) { // Bad link. console.log(data); } }); }); upload_image.php: &lt;?php // Allowed extentions. $allowedExts = array("gif", "jpeg", "jpg", "png"); // Get filename. $temp = explode(".", $_FILES["file"]["name"]); // Get extension. $extension = end($temp); // An image check is being done in the editor but it is best to // check that again on the server side. // Do not use $_FILES["file"]["type"] as it can be easily forged. $finfo = finfo_open(FILEINFO_MIME_TYPE); $mime = finfo_file($finfo, $_FILES["file"]["tmp_name"]); if ((($mime == "image/gif") || ($mime == "image/jpeg") || ($mime == "image/pjpeg") || ($mime == "image/x-png") || ($mime == "image/png")) &amp;&amp; in_array($extension, $allowedExts)) { // Generate new random name. $name = sha1(microtime()) . "." . $extension; // Save file in the uploads folder. move_uploaded_file($_FILES["file"]["tmp_name"], "C:\ xampp\htdocs\Swaggy\img\ " . $name); // Generate response. $response = new StdClass; $response-&gt;link = "/swaggy/img/" . $name; echo stripslashes(json_encode($response)); } When i try to upload an image he forms an img tag in the editor in base 64 and then dissapears. The debugger shows me that the file upload_image.php has a 200 status and the error that shows me from console is this : Object {code: 4, message: "Parsing response failed"}
answer count: 1
tagged with: froala
favorite count: 0
has title: Can't Upload Image from froala editor

http://stackoverflow.com/a/26813113
type: Answer
has body: Just use getBBox() here is as example: var m = Raphael("canvas"); var c = m.circle(50,50,1).attr({fill: "#000", stroke: "none"}); c.transform("t150,50") console.log(c.getBBox().x); And if you need absolute position add jquery offset console.log(c.getBBox().x + $("#canvas").offset().left);
score: 0
answers question: http://stackoverflow.com/q/26085953

http://stackoverflow.com/comment/40800443
type: QuestionComment
comment on: http://stackoverflow.com/q/26043575
has text: Would you add the html so I can get a better idea of context?
score: 0
type: Comment

http://stackoverflow.com/comment/40919749
comment on: http://stackoverflow.com/a/26110259
type: AnswerComment
has text: Thanks for your help Rusty,Would I be able to import the file from an external drive and not the File cabinet. ( Let's say a drive in a server, or local drive? ) . This would not require me to upload the file to file cabinet myself. Then the whole thing would be autmated? I haven't been able to find anything except nlapiLoadFile which uses the internal ID in the file cabinet right?
score: 0
type: Comment

http://stackoverflow.com/q/26083011
possible better answer: http://stackoverflow.com/a/26083222
has answer: http://stackoverflow.com/a/26083222
type: Question
has comment: http://stackoverflow.com/comment/40869803
has body: The question is quite straightforward. Is there a javascript only (no jQuery/other library pls) method of checking if an element created via javascript exists? For instance, if I did this: var foo=document.createElement("div"); document.getElementById("bar").appendChild(foo); Would there be a way to check if foo already exists?
has comment: http://stackoverflow.com/comment/40870271
answer count: 2
has comment: http://stackoverflow.com/comment/40870371
tagged with: javascript
duplicate of: http://stackoverflow.com/q/5629684
upvote count: 3
has comment: http://stackoverflow.com/comment/40870840
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40869810
has comment: http://stackoverflow.com/comment/40870165
has comment: http://stackoverflow.com/comment/40869823
linked to: http://stackoverflow.com/q/5629684
has title: Checking if an element created by javascript exists using only javascript
has answer: http://stackoverflow.com/a/26083136
accepted answer: http://stackoverflow.com/a/26083136
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40870437

http://stackoverflow.com/a/26061758
score: 2
downvote count: 0
upvote count: 2
type: Answer
has body: It is not data that you should use, but params : ... var responsePromise = $http({ method: 'POST', url: '/BusinessProcess_Project/AjaxSubmit.do', // data: formData params: formData }); ...
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26056382
answers question: http://stackoverflow.com/q/26056382

http://stackoverflow.com/comment/40920942
score: 0
type: Comment
has text: Thanks for the suggestion. Just to be sure if I understand it completely- I have to create a Node.js app (possibly using express.js) which will serve as a web server and I have to upload this app to Heroku. This will enable me to host my JavaScript/HTML5 client app on the server I have just created. Did I miss anything?
comment on: http://stackoverflow.com/a/26109989
type: AnswerComment

http://stackoverflow.com/q/26182933
score: 0
tagged with: ios
tagged with: javascript
type: UnansweredQuestion
answer count: 1
has title: Parse.Cloud.run slow on iOS
has answer: http://stackoverflow.com/a/27014351
tagged with: parse-platform
type: Question
has body: I have some code that runs a parse cloud function, then processes the results. This uses their javascript api (1.3.0), and is running in an ionic framework app. When running on a mac in chrome browser the response normally takes around 500ms. The exact same code running on iOS seems to differ quite wildly. Its always much slower, and can take anywhere from 3 to 20 seconds. Both iOS and mac are on the same wireless network. Why is it so much slower, and how can I speed it up? var start = Date.now(); console.log("PARSE CLOUD RUN"); Parse.Cloud.run('getFixtures', {teamID : teamID, divisionID : divisionIDs}, { success: function(response) { console.log("PARSE CLOUD SUCCESS :" + (Date.now() - start));

http://stackoverflow.com/comment/40933644
comment on: http://stackoverflow.com/q/26104837
score: 0
has text: Firebug? But shadow DOM is not enabled by default in Firefox. http://caniuse.com/#feat=shadowdom
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26156143
upvote count: 2
score: 2
has body: Simply use $firstEl = $el.parentNode.getElementsByClassName("a")[0] instead of firstChild
accepted answer of: http://stackoverflow.com/q/26156107
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26156107
type: Answer

http://stackoverflow.com/comment/41023548
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26165726
type: AnswerComment
has text: Ah, I see now, you really should have hinted at that!

http://stackoverflow.com/comment/41116048
comment on: http://stackoverflow.com/a/26180394
has text: Hi Alex I want this final out in one variable with same format. I will use that variable in print functionality
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40930216
comment on: http://stackoverflow.com/a/26115876
type: Comment
has text: It's not helping you know. How do I put them in work? Where are they being set? I want to set them at page upload.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40918102
type: Comment
has text: Interesting, yet a bit tricky to implement. Adding extra class _might_ lead to a solution. However, since you're creating them dynamically, classes wouldn't be so handy.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26107695

http://stackoverflow.com/a/26135506
score: 9
has comment: http://stackoverflow.com/comment/40966228
accepted answer of: http://stackoverflow.com/q/26084733
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26084733
upvote count: 9
type: Answer
downvote count: 0
has body: I changed your function a little in order to correct the nested query strings: function toQueryString(obj, prefix) { var str = [], k, v; for(var p in obj) { if (!obj.hasOwnProperty(p)) {continue;} // skip things from the prototype if (~p.indexOf('[')) { k = prefix ? prefix + "[" + p.substring(0, p.indexOf('[')) + "]" + p.substring(p.indexOf('[')) : p; // only put whatever is before the bracket into new brackets; append the rest } else { k = prefix ? prefix + "[" + p + "]" : p; } v = obj[p]; str.push(typeof v == "object" ? toQueryString(v, k) : encodeURIComponent(k) + "=" + encodeURIComponent(v)); } return str.join("&amp;"); } Running this function on your original object now gives us this query string: f[cid]=325&amp;f[field_name][10][0]=133&amp;f[field_name][10][1]=132&amp;f[price]=320|3600 If we pass this to a PHP page told to print_r($_GET), it gives us: Array ( [f] =&gt; Array ( [cid] =&gt; 325 [field_name] =&gt; Array ( [10] =&gt; Array ( [0] =&gt; 133 [1] =&gt; 132 ) ) [price] =&gt; 320|3600 ) ) Exactly what you wanted, right?

http://stackoverflow.com/q/26056295
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/26056524
has answer: http://stackoverflow.com/a/26056524
type: Question
has answer: http://stackoverflow.com/a/26057170
has comment: http://stackoverflow.com/comment/40820447
answer count: 2
tagged with: for-loop
tagged with: arrays
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40821050
accepted answer: http://stackoverflow.com/a/26057170
has body: Convert: var seriesData = [{ feederId: "PTS113T", businessEventCode: "LowVoltage", servicePointEventCount: 6, startDayID: 20130812, }, { feederId: "PTS113T", businessEventCode: "HighVoltage", servicePointEventCount: 2, startDayID: 20130812, }, { feederId: "PTS113T", businessEventCode: "LowVoltage", servicePointEventCount: 7, startDayID: 20130814, }, { feederId: "PTS113T", businessEventCode: "HighVoltage", servicePointEventCount: 5, startDayID: 20130815, }]; Into this object: var seriesData = [{ feederId: "PTS113T", servicePointEventLowCount: 6, servicePointEventHighCount: 2, startDayID: 20130812, }, { feederId: "PTS113T", servicePointEventLowCount: 7, startDayID: 20130814, }, { feederId: "PTS113T", servicePointEventHighCount: 5, startDayID: 20130815, }]; I am merging values based on startDayID if it is same or different. What I have tried: if (seriesData) { var mockdata = []; for (var i = 0; i &lt; seriesData.length; i += 2) { var data = {}; if ((seriesData[i].startDayID) == (seriesData[i + 1].startDayID)) { data.feederId = seriesData[i].feederId; data.servicePointEventLowCount = seriesData[i].servicePointEventCount; data.servicePointEventHighCount = seriesData[i + 1].servicePointEventCount; data.startDayID = seriesData[i].startDayID; } mockdata.push(data); } Please Guide me !!
type: AnsweredQuestion
has title: Modified json object and change the mock data

http://stackoverflow.com/a/26048968
has body: Use JSON.parse it parses a string as a JSON var obj = JSON.parse(json);
upvote count: 4
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26048935
score: 4
has comment: http://stackoverflow.com/comment/40808098
accepted answer of: http://stackoverflow.com/q/26048935
type: Answer

http://stackoverflow.com/comment/41061825
score: 0
comment on: http://stackoverflow.com/a/26187030
type: Comment
has text: How would I add a button to display the previous number?
type: AnswerComment

http://stackoverflow.com/q/26136360
tagged with: angularjs
tagged with: datetimepicker
has title: AngularJS $apply with scope var raises exception
has answer: http://stackoverflow.com/a/26137599
type: Question
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26137599
score: 0
has body: I am trying to do a very basic example. A datetimepicker with a binding to a simple text. html {{ctrl.text}} ----------------------------- {{ctrl.result}} js var testController = angular.module('testApp.testModule', []); testController.controller('testCtrl', [function () { var myScope = this; myScope.text = '#### Controls binding test ####'; jQuery('#datetimepicker').datetimepicker({ onChangeDateTime: function (dp, $input) { myScope.$apply(function () { myScope.result = $input.val(); }); } }); }]); When I run the following exception is raised: http://jimhoskins.com/2012/12/17/angularjs-and-apply.html I am using the alternative 'new' control naming using a var scope instead of $scope, and tried to just replace $scope with myScope, but with no success. AngularJS v1.2.24 jQuery DateTimePicker plugin v2.2.5 jQuery JavaScript Library v2.1.1
has comment: http://stackoverflow.com/comment/40968683
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40967218

http://stackoverflow.com/comment/40891217
type: QuestionComment
has text: as you wish, success .but still report TypeError: 'undefined' is not a function...@AgashThamo.
type: Comment
comment on: http://stackoverflow.com/q/26092018
score: 0

http://stackoverflow.com/comment/41052087
type: AnswerComment
has text: bench-o have updated my answer for you, but @tomazahlin raises a good and valid point if you are wanting to do a lot of ajax, especially with forms.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26182079

http://stackoverflow.com/comment/41010804
comment on: http://stackoverflow.com/q/26159846
score: 0
type: Comment
type: QuestionComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/62333/discussion-between-wouter0100-and-lucas-santos).

http://stackoverflow.com/a/26120410
downvote count: 0
type: Answer
has body: Solution for preventing duplicate values and undefined value in the list if ($("option:contains('" + data.strRoundName + "')").length == 0 &amp;&amp; data.strRoundName != null &amp;&amp; typeof data.strRoundName != "undefined") $("#selectRound_Type").append("&lt;option name='round' id=" + data.iRoundId + "&gt;" + data.strRoundName + "&lt;/option&gt;");
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26095044

http://stackoverflow.com/comment/41057647
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26185155
has text: awesome, thanks. Well explained. I just started to learn JS and appreaciate any hints and tips. I would upvote your answere, but I cannot. Thanks a lot Matthias.
score: 0

http://stackoverflow.com/comment/40951573
has text: @arturgrzesiak can you elaborate?
comment on: http://stackoverflow.com/q/26127194
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41014916
score: 0
comment on: http://stackoverflow.com/q/26162271
type: Comment
type: QuestionComment
has text: I have edited the original post with some code.

http://stackoverflow.com/comment/40888524
comment on: http://stackoverflow.com/q/26093069
has text: The script injects a div into the page. I just want to remove that div dynamicaly
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40964003
comment on: http://stackoverflow.com/q/26134803
has text: jfriend00 I am running a .empty() at the start of the function, which is dumping the entire container. @Andreas should I just use .html() instead?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26058176
has body: this is my first approach. you select the visible element, hide it, toggle class visible, select the next element, show it and toggle class visible. i completely removed the hidden class from this solution, since we switch between two states - visible and hidden - we only need the visible class to know if it is visible or hidden... $('#accept').on('click',function() { if (!$("section:last").hasClass("visible")) { $('.visible').hide().toggleClass("visible").next() .show().toggleClass("visible"); // this should uncheck the checkbox $('#accept').attr('checked', false); } }); UPDATED FIDDLE: http://jsfiddle.net/tbu116w8/2/ added the if statement to check, if you are currently on the last section
has comment: http://stackoverflow.com/comment/40823715
answers question: http://stackoverflow.com/q/26057963
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40824234
downvote count: 0
has comment: http://stackoverflow.com/comment/40823945
has comment: http://stackoverflow.com/comment/40824472
type: Answer

http://stackoverflow.com/q/26040661
score: -1
linked to: http://stackoverflow.com/q/560829
has comment: http://stackoverflow.com/comment/40792405
has answer: http://stackoverflow.com/a/26040915
has answer: http://stackoverflow.com/a/26040947
favorite count: 0
has title: Call parent function when overriding javascript prototype
has body: I have the following Meta-Code var Parent = function(){} Parent.prototype.doSomething = function(){ console.log("As a parent I did like a parent"); } var Child = function(){} Child.prototype = new Parent(); Child.prototype.doSomething = function(){ console.log("As a child I did like a child"); //This is where I am not sure what to put } What I would like it 2 lines As a child I did like a child As a parent I did like a parent Of course the first one is simple but I am not sure how/if I can call a parent function once it has been overridden.
possible better answer: http://stackoverflow.com/a/26040915
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/560829
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26040947
answer count: 2
upvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41053687
has text: Yes i checked the Demo Link that is where "var pattern2=new RegExp("/^(?\d{3})?[-\s.]?\d{3}[-\s.]?\d{4}$/");" and "var pattern2=new RegExp("^(?\d{3})?[-\s.]?\d{3}[-\s.]?\d{4}$");" came from
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26181428
type: AnswerComment

http://stackoverflow.com/a/26170720
score: 0
has comment: http://stackoverflow.com/comment/41031210
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41031229
has comment: http://stackoverflow.com/comment/41031272
has comment: http://stackoverflow.com/comment/41030874
type: Answer
has comment: http://stackoverflow.com/comment/41030836
has comment: http://stackoverflow.com/comment/41030827
has comment: http://stackoverflow.com/comment/41031059
has body: I don't have PHP on this computer so I can't test anything... this can give you the basic idea, though. And it's been about a year since I touched PHP... there are probably syntax errors. Sorry. HTML is not my best language, either. note: i wrote this like it was submitting to itself... kind of. <?php if (!isset($_POST['html']) or empty($_POST['html'])) { ?> <?php } else { echo $_POST['html']; } ?> i like this better (note: it does use jquery... i can provide js only if you really want): hello! <!-- tr> body { background-color: #ccc; }
has comment: http://stackoverflow.com/comment/41031325
has comment: http://stackoverflow.com/comment/41031159
answers question: http://stackoverflow.com/q/26170483
has comment: http://stackoverflow.com/comment/41031047
has comment: http://stackoverflow.com/comment/41031295
accepted answer of: http://stackoverflow.com/q/26170483
has comment: http://stackoverflow.com/comment/41030788
has comment: http://stackoverflow.com/comment/41031421
has comment: http://stackoverflow.com/comment/41031449
has comment: http://stackoverflow.com/comment/41031031
has comment: http://stackoverflow.com/comment/41031181

http://stackoverflow.com/q/26127003
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26127181
score: 0
has title: closing dropdown menu after clicking on a menu item
answer count: 1
has answer: http://stackoverflow.com/a/26127181
type: AnsweredQuestion
has body: when i click on a button a menu dropdown appears with menu items within. Currently when i click on a menu item the page changes to the clicked content but the menu list still appear and doesn't go away after clicking on a menu item. What do i need to add to my script so that after clicking on any of the menu items the menu would close. menu button: this is the script when clicking on a menu item:
type: Question
has comment: http://stackoverflow.com/comment/40949740
tagged with: javascript

http://stackoverflow.com/a/26067682
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40842211
answers question: http://stackoverflow.com/q/26066054
has body: Try this one: $('.add').click(function () { var id = this.id; //$('#your-team').append($("li#p-"+ id + "").html()); $("li#p-"+ id + "").detach().appendTo('#your-team'); //$("li#p-"+ id + "").remove(); userList = new List('players', options); //userList = new List('players', options); })
has comment: http://stackoverflow.com/comment/40842078

http://stackoverflow.com/q/26084239
tagged with: javascript
tagged with: jquery
has title: how to change the present url to move to its original url after a form is submitted through an iFrame
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26084324
has body: Well.. the title was not pretty clear to make you understand but couldn't think what to write. So here is the case.. I loaded a client site (say, www.aaa.com) within my site (www.mysite.com) through an iFrame. Now there is a form in the client site and when it is submitted or any action button is pressed, I want to go directly to the main url in my browser rather than everything loading in my site within the iFrame. Currently, when I submit the form in the iFrame, though the page changes but everything happens on www.mysite.com but I want this to go to www.aaa.com Any help will be appreciated deeply. Thanks.
type: UnansweredQuestion
tagged with: iframe
tagged with: php
type: Question
score: 0
answer count: 1

http://stackoverflow.com/comment/40935712
type: AnswerComment
has text: Thank you for helping me clean up the code. How would I pass city value to external.php without a click function?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26110225

http://stackoverflow.com/a/26082404
answers question: http://stackoverflow.com/q/26082299
score: 1
upvote count: 1
downvote count: 0
type: Answer
has body: The javascript arrays usually start with the index 0.You can start with the index as 1 with sparse array(object). So here you need is Javascript objects

popup
tags question: http://stackoverflow.com/q/26172663
type: Tag
tags question: http://stackoverflow.com/q/26094333
tags question: http://stackoverflow.com/q/26144163
tag name: popup
tags question: http://stackoverflow.com/q/26049208
tags question: http://stackoverflow.com/q/26048665
tags question: http://stackoverflow.com/q/26131821
tags question: http://stackoverflow.com/q/26161213
tags question: http://stackoverflow.com/q/26121386
tags question: http://stackoverflow.com/q/26194473
tags question: http://stackoverflow.com/q/26058896
tags question: http://stackoverflow.com/q/26095238
tags question: http://stackoverflow.com/q/26101435

http://stackoverflow.com/a/26096340
accepted answer of: http://stackoverflow.com/q/26096315
type: Answer
answers question: http://stackoverflow.com/q/26096315
downvote count: 0
score: 3
has comment: http://stackoverflow.com/comment/40894307
upvote count: 3
type: AcceptedAnswer
has body: You don't call setTimeout correctly. Change setTimeout(delay, func); to setTimeout(func, delay);

http://stackoverflow.com/q/26067810
has comment: http://stackoverflow.com/comment/40842607
has comment: http://stackoverflow.com/comment/40842629
has body: I'm trying to use this popup function: function popupwindow(url, title, w, h) { var left = (screen.width/2)-(w/2); var top = (screen.height/2)-(h/2); return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left); } On these social links: <a href="https://www.facebook.com/sharer/sharer.php?u=<?php bloginfo( 'url' ); ?>" title="Share on Facebook"> <a href="http://twitter.com/home?status=<?php the_title(); ?>+<?php bloginfo( 'url' ); ?>" title="Share on Twitter"> <a href="https://plus.google.com/share?url=<?php bloginfo( 'url' ); ?>" title="Share on Google Plus"> Normally, I'd do something like this: Share on Facebook But I understand that PHP cannot be used within Javascript because one's server side and one's client side. So how can I make these links pop up?
has comment: http://stackoverflow.com/comment/40842656
tagged with: javascript
has comment: http://stackoverflow.com/comment/40842856
score: 0
has comment: http://stackoverflow.com/comment/40842789
has comment: http://stackoverflow.com/comment/40842976
answer count: 1
accepted answer: http://stackoverflow.com/a/26068355
has comment: http://stackoverflow.com/comment/40842393
has answer: http://stackoverflow.com/a/26068355
has comment: http://stackoverflow.com/comment/40843014
tagged with: php
has comment: http://stackoverflow.com/comment/40843145
has comment: http://stackoverflow.com/comment/40842548
has title: Get share links to popup in WordPress
tagged with: wordpress
type: Question
type: AnsweredQuestion

http://stackoverflow.com/a/26191315
answers question: http://stackoverflow.com/q/26181457
has comment: http://stackoverflow.com/comment/41116975
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/64083139
has comment: http://stackoverflow.com/comment/41116787
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/26181457
upvote count: 2
has body: Firstly you must include Facebook sdk.js library to use all its methods (ideally right after the opening of body tag) &lt;script&gt; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); &lt;/script&gt; The problem with your http://jsfiddle.net/ysdp60cz/ is the scope of the facebookShare var. So, in this example, just include it in the window object: window.facebookShare = function( callback ) { [...] I don´t know how are you organizing your code, however, with this changes it must work. You can check it here: http://jsfiddle.net/benjasHu/3dhq9k21/ Cheers.
has comment: http://stackoverflow.com/comment/76320909

http://stackoverflow.com/q/26064771
downvote count: 0
tagged with: javascript
tagged with: gruntjs
has answer: http://stackoverflow.com/a/26075773
has comment: http://stackoverflow.com/comment/40855877
answer count: 1
tagged with: intern
favorite count: 0
tagged with: angularjs
upvote count: 2
accepted answer: http://stackoverflow.com/a/26075773
has body: I'm trying to set up Intern.io so I can test my angular app. I'm also using Grunt and Bower. I'm just trying to get barebones watch task that automatically runs the tests. My problem when I try to run tests is I get the following error message: Running "intern:app" (intern) task ReferenceError: window is not defined at /Users/evanvandegriff/Documents/work/nomi_v2/nomi_v2/web/vendor/src/angular/angular.js:19288:3 at Function.vm.runInThisContext (/Users/evanvandegriff/Documents/work/nomi_v2/nomi_v2/web/node_modules/intern/node_modules/istanbul/lib/hook.js:163:16) at /Users/evanvandegriff/Documents/work/nomi_v2/nomi_v2/web/node_modules/intern/node_modules/dojo/dojo.js:760:8 at fs.js:271:14 at Object.oncomplete (fs.js:107:15) Warning: ReferenceError: window is not defined at /Users/evanvandegriff/Documents/work/nomi_v2/nomi_v2/web/vendor/src/angular/angular.js:19288:3 at Function.vm.runInThisContext (/Users/evanvandegriff/Documents/work/nomi_v2/nomi_v2/web/node_modules/intern/node_modules/istanbul/lib/hook.js:163:16) at /Users/evanvandegriff/Documents/work/nomi_v2/nomi_v2/web/node_modules/intern/node_modules/dojo/dojo.js:760:8 at fs.js:271:14 at Object.oncomplete (fs.js:107:15) Use --force to continue. My app.js looks like: angular.module( 'ngNomi', [ ]) .config( function myAppConfig () { }) .run( function run () { }) .controller( 'AppCtrl', function AppCtrl ( $scope, $location ) { }); Here is my intern.js file: // Learn more about configuring this file at &lt;https://github.com/theintern/intern/wiki/Configuring-Intern&gt;. // These default settings work OK for most people. The options that *must* be changed below are the // packages, suites, excludeInstrumentation, and (if you want functional tests) functionalSuites. define({ // The port on which the instrumenting proxy will listen proxyPort: 9000, // A fully qualified URL to the Intern proxy proxyUrl: 'http://localhost:9000/', // Default desired capabilities for all environments. Individual capabilities can be overrid…
tagged with: bower
score: 2
has title: getting angular and intern.io working together
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40873296

http://stackoverflow.com/comment/40810198
type: Comment
type: QuestionComment
score: 1
has text: that's why i said "when the class contains a list", as opposed to instances containing it.
comment on: http://stackoverflow.com/q/26049804

http://stackoverflow.com/q/26125715
favorite count: 0
upvote count: 0
possible better answer: http://stackoverflow.com/a/26125862
tagged with: css
has comment: http://stackoverflow.com/comment/40947213
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26125827
accepted answer: http://stackoverflow.com/a/26125827
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26125862
downvote count: 2
score: -2
tagged with: javascript
has title: Button inside a box with css,html and javascript
has comment: http://stackoverflow.com/comment/40947177
tagged with: http://stackoverflow.com/tag/html
has body: Hey guys i have maded an outerbox which contains an innerbox .The code is &lt;html&gt; &lt;link rel="stylesheet" type="text/css" href="styles.css"&gt; &lt;body&gt; &lt;div id="boxed"&gt; &lt;div id="anotherbox"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; the css file #boxed { width: 150px; padding: 50px; border: 5px solid gray; margin: 0; background-image: url('http://placehold.it/200x200'); } #boxed:hover &gt; #anotherbox { width: 50px; padding: 40px; border: 5px solid gray; margin: 0; visibility: visible; } This works fine.. But what i need is that i want to display a simple button inside the inner box.I have tried some javascript code but it dint worked out. Hope you guys can help me ..P:S ..i dont need a jquery solution..Thanks

http://stackoverflow.com/comment/40844368
comment on: http://stackoverflow.com/q/26068850
has text: http://modernizr.com/
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26178250
score: 0
answers question: http://stackoverflow.com/q/26178115
type: Answer
has body: I'm wondering why you want to redirect with a hash, but that's none of my business of course. ^^ Your second solution was somewhat correct, but you used '!=' when it should've been '=='. If I understand correctly, you want to redirect the page to example.com#start if there is no hashtag present. This should work: if(window.location.hash == '') { window.location.hash = "start"; //If it doesn't work, try adding this here: window.location.reload(); }

http://stackoverflow.com/comment/41032315
type: Comment
type: QuestionComment
has text: possible duplicate of [Handling Multiple Polygon Object](http://stackoverflow.com/questions/14020339/handling-multiple-polygon-object/14021798#14021798)
score: 0
comment on: http://stackoverflow.com/q/26171285

http://stackoverflow.com/q/26091984
has comment: http://stackoverflow.com/comment/40886725
type: UnansweredQuestion
tagged with: iframe
has title: Ajax Iframe trigger click submit
has comment: http://stackoverflow.com/comment/40887352
has comment: http://stackoverflow.com/comment/40886698
type: Question
has answer: http://stackoverflow.com/a/26092602
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40887454
tagged with: ajax
score: 0
has body: Hello fellow StackOverflow. I need a favor on Ajax this time. This is my Ajax code. $('#contactForm1').submit(function (e) { e.preventDefault(); var email = $('#email').val(); var frm = this; $.ajax({ type: 'POST', dataType: 'JSON', url: 'check.php', data: { email: email }, success: function (data) { if (data.status == 'success') { frm.submit(); } else { alert('The e-mail address entered is not valid.'); } } }); }); This is the iFrame code : &lt;div class="iFrame"&gt;&lt;input class="text" id="iframetarget1" type="text" name="email" value="" tabindex="500" onfocus=" if (this.value == '') { this.value = ''; }" onblur="if (this.value == '') { this.value='';} " /&gt; &lt;div class="buttonContainer"&gt; &lt;input name="submit" class="submit" type="submit" value="Submit" tabindex="501" /&gt; So here's what I want the scenario to occur, 1. Pass the information after the Ajax check the email to and submit the form. 2. Submit the same email in the iFrame and submit it. Thank you in advance !

http://stackoverflow.com/a/26120975
has comment: http://stackoverflow.com/comment/40939776
answers question: http://stackoverflow.com/q/26117996
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40940698
has body: Razor file is executing on the server side. flot.js is executing on client/browser and they dont share the same type system. Thats why 'listvoltage' is undefined. Put this in your razorfile. Lookout for Date conversion between .NET and Javascript. flot.js need Javascript timestamp. @using System.Web.Script.Serialization &lt;script&gt; @{ var jsonSerialiser = new JavaScriptSerializer(); var json = jsonSerialiser.Serialize(listvoltage); } var timeserie = @Html.Raw(json); &lt;/script&gt; Consider a Web API solution with JSON result and Ajax call.

http://stackoverflow.com/comment/41060022
score: 0
comment on: http://stackoverflow.com/q/26185817
type: Comment
type: QuestionComment
has text: @mplungjan The some profile id isn't very descriptive for help?

http://stackoverflow.com/a/28963828
has body: Declare your id above the jstree declaration (at line 1, put var id;) Then, in the data.url function, remove var from before each line that assignes to id.
type: Answer
answers question: http://stackoverflow.com/q/26074860
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/a/26147337
score: 1
has comment: http://stackoverflow.com/comment/40988444
has comment: http://stackoverflow.com/comment/40987436
has comment: http://stackoverflow.com/comment/40988252
accepted answer of: http://stackoverflow.com/q/26147194
has comment: http://stackoverflow.com/comment/40987893
has comment: http://stackoverflow.com/comment/40988173
answers question: http://stackoverflow.com/q/26147194
has body: UPDATED: do you mean like THIS? $('.commentEdit').click(function(){ if($(this).text()=='Edit'){ $(this).parent().prev('.commentDescription').prop('contenteditable',true); $(this).parent().prev('.commentDescription').focus(); $(this).text('Save'); } else{ $(this).text('Edit'); //code to save the comment } }); $('.commentDescription').blur(function(){ $(this).prop('contenteditable',false); }); you can save the comment on the blur event of .commentDescription
has comment: http://stackoverflow.com/comment/40987256
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40988232
has comment: http://stackoverflow.com/comment/40988427
type: Answer
downvote count: 0

http://stackoverflow.com/comment/40805781
has text: When you say "the service I use", is that service yours, and is it hosted on the same domain? You cannot read or write cookies for a different domain.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26047170
score: 0

http://stackoverflow.com/q/26181833
has comment: http://stackoverflow.com/comment/41059220
score: 7
has comment: http://stackoverflow.com/comment/42451924
has comment: http://stackoverflow.com/comment/41057883
type: Question
has comment: http://stackoverflow.com/comment/41052143
has comment: http://stackoverflow.com/comment/41051811
has comment: http://stackoverflow.com/comment/41058000
answer count: 1
has answer: http://stackoverflow.com/a/29582202
has comment: http://stackoverflow.com/comment/41052762
tagged with: javascript
has comment: http://stackoverflow.com/comment/41052303
tagged with: jquery
has comment: http://stackoverflow.com/comment/41051509
has comment: http://stackoverflow.com/comment/47286493
upvote count: 8
has comment: http://stackoverflow.com/comment/41055804
has comment: http://stackoverflow.com/comment/41059331
has body: SOLVED: I was appending to SECTION tag, whereas IE8 doesn't support this tag, parsing it as text/non-closed html tag, infamous cause to halt append! so I added a condition that creates HTML5 elements for IE versions below 9, as portrayed here and the problem went away, it actually fixed a bunch of other bugs as well! http://tatiyants.com/how-to-get-ie8-to-support-html5-tags-and-web-fonts/ Sorry everyone. :( Testing a new website I built on IE8, using jQuery v1.x (1.11.1). Using HTML5, code is validated. I have this snippet inside a success function of an ajax function: $('.product_details_contact_form_wrapper').detach().appendTo('#primary'); For some reason, under Chrome and Firefox it's all dandy, IE11 as well. Problem occurs when I set IE11 to emulate IE8. Then, I get a script pause and IE is complaining over appendChild in the jquery library code: IE11(8) Inspector directs to b.appendChild(a), marked with yellow and: "Unexpected call to method or property access." marked with red, beneath it.
has comment: http://stackoverflow.com/comment/41057380
favorite count: 0
has comment: http://stackoverflow.com/comment/41060818
has title: jQuery 1.11.1 appendChild error IE8 (Unexpected call to method or property access)
has comment: http://stackoverflow.com/comment/41052330
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41054371
has comment: http://stackoverflow.com/comment/41054033
downvote count: 1
has comment: http://stackoverflow.com/comment/41052224
tagged with: internet-explorer-8

http://stackoverflow.com/comment/41001056
score: 0
has text: It's my fault. I wasn't clear. I want to REPLACE my current random code with something that will show the DIVs in sequence before repeating.
type: AnswerComment
comment on: http://stackoverflow.com/a/26154868
type: Comment

http://stackoverflow.com/comment/40957184
has text: Is the main container maybe a div that then contains a ul and a "scroll bar"? Is it possible that the scrollbar is just the built-in browser scrollbar because the ul is a fixed size?
comment on: http://stackoverflow.com/q/26130830
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40987981
score: 2
comment on: http://stackoverflow.com/q/26147829
has text: Welcome to SO! Please post what you've got so far.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26060286
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26060215
score: 1
has body: Date.parse will return NaN if you give it a string that it can't parse as a date. There is only one format that Date.parse is required to support, which is a not-quite-ISO-8601 format. However, every JavaScript engine I've ever seen also supports "MM/DD/YYYY hh:mm:ss" (American order, even in non-American locales) provided you use / not -. There are various libraries you can use to get more parsing options, if you prefer doing that to reformatting your string. The flavor-of-the-week is MomentJS, but of course that may not be appropriate to your needs and there are other options.
accepted answer of: http://stackoverflow.com/q/26060215

http://stackoverflow.com/q/26164258
has comment: http://stackoverflow.com/comment/41018606
has body: Why I can't get the coordinates with this code ? The error is : ReferenceError: Can't find variable: card_Latitude. I took the code from here: How to get longitude and latitude of a city/country inputted through an input box? I do not understand why. &lt;script src="http://code.jquery.com/jquery-1.11.1.min.js"&gt;&lt;/script&gt; &lt;script src="https://maps.googleapis.com/maps/api/js?sensor=false"&gt;&lt;/script&gt; &lt;script&gt; var card_FullAddress = "Canada"; var geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'address': card_FullAddress }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var card_Latitude = results[0].geometry.location.lat(); var card_Longitude = results[0].geometry.location.lng(); } else { var card_Latitude = "ERR"; var card_Longitude = "ERR"; } }); console.log(card_Latitude); console.log(card_Longitude); &lt;/script&gt; JS FIDDLE
has comment: http://stackoverflow.com/comment/41018791
linked to: http://stackoverflow.com/q/18431578
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41018641
has title: Can't get the lat and lng from this code
has comment: http://stackoverflow.com/comment/41018661
has comment: http://stackoverflow.com/comment/41018675
linked to: http://stackoverflow.com/q/14220321
type: Question
score: 0
has answer: http://stackoverflow.com/a/26164324
linked to: http://stackoverflow.com/q/23667086
duplicate of: http://stackoverflow.com/q/14220321
has comment: http://stackoverflow.com/comment/41018673
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41018822
has comment: http://stackoverflow.com/comment/41018591

http://stackoverflow.com/comment/40826078
comment on: http://stackoverflow.com/a/26059080
type: Comment
score: 0
type: AnswerComment
has text: @VladimirŠtus jQuery version used

http://stackoverflow.com/q/26073709
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26073910
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has title: Multiple controllers in single file using angular js
tagged with: angularjs
upvote count: 1
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/24867578
has answer: http://stackoverflow.com/a/26073910
score: 1
has body: I am a newbie in angular JS. I am working on controllers.I created the following script. just learnin! Readable time is {{timeview.hour}}:{{timeview.min}}:{{timeview.sec}} Name is {{k}} The problem is that the first controller encountered in DOM is only working i.e the current o/p is: Readable time is 15:55:36 Name is {{k}} But when I interchange this Readable time is {{timeview.hour}}:{{timeview.min}}:{{timeview.sec}} with this Name is {{k}} the o/p becomes Name is Harvey Readable time is {{timeview.hour}}:{{timeview.min}}:{{timeview.sec}} I am not able to figure out what is wrong
possible better answer: http://stackoverflow.com/a/26076329
has answer: http://stackoverflow.com/a/26076329

http://stackoverflow.com/q/26167061
has answer: http://stackoverflow.com/a/26167270
has comment: http://stackoverflow.com/comment/41026794
has comment: http://stackoverflow.com/comment/41024221
has comment: http://stackoverflow.com/comment/41026719
has comment: http://stackoverflow.com/comment/41028033
has comment: http://stackoverflow.com/comment/41026481
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41023973
has comment: http://stackoverflow.com/comment/41027930
has comment: http://stackoverflow.com/comment/41028209
has answer: http://stackoverflow.com/a/26167167
has answer: http://stackoverflow.com/a/26167274
downvote count: 2
has body: This causes multiple buttons to take action: $(document).on("click", ".file-this-email", fileThisEmail); When fileThisEmail runs, I'd like to remove it from ONLY the current one (there are others on the page that still need it): window.fileThisEmail = function(e) { console.log('this was clicked'); } I tried off, but couldn't seem to get it right. Any ideas?
upvote count: 1
has comment: http://stackoverflow.com/comment/41027832
type: Question
possible better answer: http://stackoverflow.com/a/26167214
has comment: http://stackoverflow.com/comment/41026695
has comment: http://stackoverflow.com/comment/41027577
has answer: http://stackoverflow.com/a/26167214
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/41024914
accepted answer: http://stackoverflow.com/a/26167167
has comment: http://stackoverflow.com/comment/41027149
tagged with: jquery-events
has title: jQuery unbind after first click
has comment: http://stackoverflow.com/comment/41026760
favorite count: 0

http://stackoverflow.com/q/26112744
tagged with: switch-statement
type: Question
has body: I am creating a calculator for a game and I want to use a drop down menu to select a value in a switch statement; although it doesn't seem to be working, it always returns 0. Can anyone see where I went wrong? Also I am fairly new to java and html so sorry if there is a dumb mistake. http://jsfiddle.net/1r177khr/ Here is my html: Level 1 2 3 4 5 6 = 0 Dark Elixer Here is my Java: calcDarkTroops = function () { var minionlevel = Number(document.getElementById("minionlevel_input").value); String maxString; switch (minionlevel) { case 1: maxString = "200,000"; break; case 2: maxString = "190,000"; break; case 3: maxString = "170,000"; break; case 4: maxString = "140,000"; break; case 5: maxString = "100,000"; break; case 6: maxString = "0"; document.getElementById("minioncost_result").innerHTML = "= " + Math.round(maxString * 100) / 100 + " Dark Elixer"; }
has comment: http://stackoverflow.com/comment/40923886
has comment: http://stackoverflow.com/comment/40923937
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40923683
tagged with: calculator
has answer: http://stackoverflow.com/a/26112842
has comment: http://stackoverflow.com/comment/40923693
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26112864
has title: Using tags with a Switch statment (Java and HTML)

http://stackoverflow.com/comment/40850729
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26069323
has text: yes but if u see my jQuery code then you know: /*Make the tabs work-begins*/ $(document).ready(function(){ $('#all_contents>div').filter(':first').show(); $('ul>li>a').click(function () { $('#all_contents>div').hide(); var $this = $(this); var target = $this.attr('href'); $(target).show(); return false; }); }); /*Make the tabs work-ends*/ Also its working fine in my localhost and jsfiddle too. See here: jsfiddle.net/yb6urd6x
type: AnswerComment

http://stackoverflow.com/comment/40931310
type: QuestionComment
score: 4
has text: Does `images/SCALE Construction.PNG` exist in your live environment? Have you checked the console for errors? What do you mean 'not working'? **Be more specific**.
type: Comment
comment on: http://stackoverflow.com/q/26117204

http://stackoverflow.com/comment/40811073
comment on: http://stackoverflow.com/a/26050730
has text: Thanks, but i guess as mentioned by @Patrick localstorage, i think is a good option.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40851045
score: 0
type: QuestionComment
type: Comment
has text: Can you add your comment: "why does my log look that way" in your question. I think we've all read it wrong and assumed you simply don't know how objects and this works in javascript. The specific question of why does the string not look like a string inside its own method is a good and valid question.
comment on: http://stackoverflow.com/q/26072173

http://stackoverflow.com/comment/40933520
score: 0
type: AnswerComment
type: Comment
has text: Yep, give me a minute
comment on: http://stackoverflow.com/a/26118431

laravel
tags question: http://stackoverflow.com/q/26049608
tags question: http://stackoverflow.com/q/26116800
tags question: http://stackoverflow.com/q/26063374
tags question: http://stackoverflow.com/q/26169860
tag name: laravel
tags question: http://stackoverflow.com/q/26134171
tags question: http://stackoverflow.com/q/26145595
tags question: http://stackoverflow.com/q/26063989
tags question: http://stackoverflow.com/q/26102133
tags question: http://stackoverflow.com/q/26189786
type: Tag
tags question: http://stackoverflow.com/q/26067408

http://stackoverflow.com/comment/40825630
type: Comment
type: QuestionComment
has text: @David because i need to add progress bar(i delete code with progress bar). Is it so bad to use xhr for it?
comment on: http://stackoverflow.com/q/26058005
score: 0

http://stackoverflow.com/a/26129325
has comment: http://stackoverflow.com/comment/40956630
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40956318
answers question: http://stackoverflow.com/q/26129021
downvote count: 0
has comment: http://stackoverflow.com/comment/40955123
has body: In render method your replacement code that call render_app and render_login, actualy did't execute them. Your forgot () if (this.model.get('loginp') == true) { this.render_app(); } else { this.render_login(); }
has comment: http://stackoverflow.com/comment/40958357
has comment: http://stackoverflow.com/comment/40955876
type: Answer
has comment: http://stackoverflow.com/comment/40956243

http://stackoverflow.com/comment/41077722
type: Comment
comment on: http://stackoverflow.com/a/26178800
has text: That's a good point. You could use the `"change"` event after all, and check whether `change.origin` (`change` being the second argument passed to the event handler) is one of `"+input"` or `"+delete"` (typing or deleting actions).
score: 1
type: AnswerComment

http://stackoverflow.com/q/26188759
has comment: http://stackoverflow.com/comment/41064571
type: AnsweredQuestion
has body: For learning purpose, I would like to know how to check the empty numbers (or replaced with letters) from random numbers. I put numbers and letters into an array: var numb = [1, 7, 3, a, 4]; In this case we don't know the highest number or the lowest number. I want to check the empty numbers starting from number 2 to the highest (result 2, 5, and 6).
has comment: http://stackoverflow.com/comment/41064588
type: Question
accepted answer: http://stackoverflow.com/a/26188850
has comment: http://stackoverflow.com/comment/41064576
tagged with: javascript
has comment: http://stackoverflow.com/comment/41064542
score: 0
has comment: http://stackoverflow.com/comment/41064739
tagged with: arrays
answer count: 1
has answer: http://stackoverflow.com/a/26188850
has title: Check empty numbers in array

http://stackoverflow.com/comment/40984681
has text: I don't see how that would work for this. I'm not using a second file that has the same type of data in it.
comment on: http://stackoverflow.com/q/26145320
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40971062
type: Comment
has text: Did you try "Inspect Element"?
score: 1
comment on: http://stackoverflow.com/a/26138824
type: AnswerComment

http://stackoverflow.com/comment/41018230
type: Comment
has text: @Andy, I do think you really should use keypress, as this will annoy users when clicking outside of the first input field. Are you doing any form validation before enabling the next field
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26163931

http://stackoverflow.com/comment/40974667
score: 0
type: AnswerComment
type: Comment
has text: There is no one to help me؟!
comment on: http://stackoverflow.com/a/26136867

http://stackoverflow.com/q/26053527
has comment: http://stackoverflow.com/comment/40818354
has comment: http://stackoverflow.com/comment/40856483
downvote count: 0
has comment: http://stackoverflow.com/comment/40815725
tagged with: javascript
has title: How to open a div with slideUp in jquery with scroll bar down
tagged with: jquery
has comment: http://stackoverflow.com/comment/40852067
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40818625
has comment: http://stackoverflow.com/comment/40815700
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26053651
accepted answer: http://stackoverflow.com/a/26053651
has body: My title may not understand to all. Here is my question: I have sticky footer strip bottom of the page with a button beside to it. when I click the button, I need to show a mega footer with sliding. I'm successful till here. but my question is when I show mega footer, the scroll bar stays at the same location. I wanted the scroll bar to stick bottom (focus on footer strip.) HTML code: Body Wrapper Mini-footer-strip Click here Mega Footer Menu Jquery: $('document').ready(function() { $('#show2').click(function() { $('#two').slideToggle(); }); }); CSS: body { font-family: Helvetica, Arial, sans-serif; } .body-container{width:90%; display:block;height:auto;position:absolute;} .my-content{ height:600px; display:block; width:400px; position:relative; top:0; background-color:#ecdeca;} div { background-color: #fff9d7; border: 1px solid #e2c822; color: #333333; font-size: 13px; font-weight: bold; display: none; padding: 10px; } #two { position:relative; bottom: 0; width: 70%; height: 200px; } #show2{ position:absolute; right:0; bottom:0; z-index:9999; } .footer-strip{ height:20px; display:block; position:absolute; bottom:0; background-color:#eacdea; width:70%; z-index:9999; } Hope my question is clear. :D FIDDLE
score: 1
has comment: http://stackoverflow.com/comment/40822955
has comment: http://stackoverflow.com/comment/40818464
type: Question

http://stackoverflow.com/q/26110093
has body: I am using https://github.com/localytics/angular-chosen to create select element with default item being selected: AAAAAAAAAAAAAAAA BBBBBBBBBBBBBBB I want BBBBBBBBBBBBBBB to be selected by default but it doesn't work: http://plnkr.co/edit/H2hmEukfjaPL1T4W298O?p=preview Using selected="selected" and $scope.myPick = "BBB"; doesn't make it work either. Could you please help on why? If I remove the model, it works just fine: AAAAAAAAAAAAAAAA BBBBBBBBBBBBBBB UPDATE 1 My project already has bunch of select and option in bunch of templates. Very time consuming to pull them into $scope.someObject to do ng-options on. Best if I don't have to declare or initialize myPick anywhere but put selected in html template instead.
tagged with: javascript
has comment: http://stackoverflow.com/comment/40919936
tagged with: jquery
score: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26110226
type: UnansweredQuestion
has title: Angular Chosen default selected not working
type: Question
tagged with: jquery-chosen
answer count: 2
has answer: http://stackoverflow.com/a/26111654

http://stackoverflow.com/q/26117527
type: Question
tagged with: d3.js
answer count: 1
score: 0
has title: Hard code data instead of importing data while plotting using d3 library
has body: I am trying to plot a bar chart for the following data: name value Locke 4 Reyes 8 Ford 15 Jarrah 16 Shephard 23 Kwon 42 Following is a "html/javascript" code to plot a simple bar chart in which the data is getting imported using d3.tsv &lt;!DOCTYPE html&gt; &lt;meta charset="utf-8"&gt; &lt;style&gt; .chart rect { fill: steelblue; } .chart text { fill: white; font: 10px sans-serif; text-anchor: end; } &lt;/style&gt; &lt;svg class="chart"&gt;&lt;/svg&gt; &lt;script src="http://d3js.org/d3.v3.min.js"&gt;&lt;/script&gt; &lt;script&gt; var width = 420, barHeight = 20; var x = d3.scale.linear() .range([0, width]); var chart = d3.select(".chart") .attr("width", width); d3.tsv("data2.txt", type, function(error, data) { x.domain([0, d3.max(data, function(d) { return d.value; })]); chart.attr("height", barHeight * data.length); var bar = chart.selectAll("g") .data(data) .enter().append("g") .attr("transform", function(d, i) { return "translate(0," + i * barHeight + ")"; }); bar.append("rect") .attr("width", function(d) { return x(d.value); }) .attr("height", barHeight - 1); bar.append("text") .attr("x", function(d) { return x(d.value) - 3; }) .attr("y", barHeight / 2) .attr("dy", ".35em") .text(function(d) { return d.value; }); }); function type(d) { d.value = +d.value; // coerce to number return d; } &lt;/script&gt; When I open the above script in a browser, i am able to get the bar chart without any issue. Now when I replace the following lines in the above code d3.tsv("data2.txt", type, function(error, data) { x.domain([0, d3.max(data, function(d) { return d.value; })]); with: var data = [ {name: "Locke", value: 4}, {name: "Reyes", value: 8}, {name: "Ford", value: 15}, {name: "Jarrah", value: 16}, {name: "Shephard", value: 23}, {name: "Kwon", value: 42} ]; I am not getting the bar chart. When I open the modified code with the abve mentioned change in the browser, it is blank. What am I doing wrong? I have just started coding in javascript, so I may have been doing a very …
tagged with: javascript
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26120722

http://stackoverflow.com/comment/41072996
has text: Thank you. Admitedly I am a complete novice when it comes to node processes but maybe this is a good time to learn:)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26143761
type: Comment

http://stackoverflow.com/a/26101962
has comment: http://stackoverflow.com/comment/41747769
type: Answer
has comment: http://stackoverflow.com/comment/43646665
score: 6
has comment: http://stackoverflow.com/comment/43923446
accepted answer of: http://stackoverflow.com/q/26101437
downvote count: 0
answers question: http://stackoverflow.com/q/26101437
has comment: http://stackoverflow.com/comment/43646315
type: AcceptedAnswer
upvote count: 6
has comment: http://stackoverflow.com/comment/43915842
has body: This is just to let you know that the previously undocumented API Meteor._wrapAsync has been renamed to Meteor.wrapAsync and officially documented : http://docs.meteor.com/#meteor_wrapasync If you are not using directly this function in your own code, chances are that packages you are using call Meteor._wrapAsync themselves, if these packages are actively maintained, authors will fix them sooner or later. Anyway, this is just a warning that won't impact your application, you shouldn't be alarmed because it's not going to break anything.

http://stackoverflow.com/comment/40958482
type: Comment
type: QuestionComment
score: 1
has text: The problem is not at all with the `in` statement, the problem is that `group` is a reference and is not copied.
comment on: http://stackoverflow.com/q/26131547

http://stackoverflow.com/q/26040738
has title: How to use input type='date' for date column in jqGrid
type: AnsweredQuestion
score: 2
tagged with: jqgrid
tagged with: date
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/26049186
accepted answer: http://stackoverflow.com/a/26049186
linked to: http://stackoverflow.com/q/12397205
answer count: 1
downvote count: 0
tagged with: javascript
has body: jqGrid date column for inline editing is defined using colmodel and javascript below. It uses jquery ui-date picker. This is lot of code to maintain and result is ugly. How to use html5 native input type='date' for inline date editing if this is supported by browser instead of this code ? colmodel: {"template":DateTemplate ,"label":"Invoice date", "name":"Invoicedate", "index":"Invoicedate", "editoptions":{ "dataInit":initDateWithButton ,"size":10 }, "searchoptions":{"dataInit":initDateWithButton ,"size":10,"attr":{"size":10}},"width":50 } javascript: var DateTemplate = { sorttype: 'date', formatter: 'date', formatoptions: { srcformat: "Y-m-d" }, editoptions: { maxlength: 10, size: 10, dataInit: initDateWithButton }, editable: true, searchoptions: { sopt: ['eq', 'ne', 'lt', 'le', 'gt', 'ge'], dataInit: initDateWithButton, size: 11, // for the advanced searching dialog attr: { size: 11 } // for the searching toolbar } }; var initDateWithButton = function (elem) { if (/^\d+%$/.test(elem.style.width)) { // remove % from the searching toolbar elem.style.width = ''; } // to be able to use 'showOn' option of datepicker in advance searching dialog // or in the editing we have to use setTimeout setTimeout(function () { $(elem).css({ "box-sizing": "border-box", width: "5.7em" }).datepicker({ // dateFormat: 'dd.mm.yy', showOn: 'button', changeYear: true, changeMonth: true, showWeek: true, showButtonPanel: true, onClose: function (dateText, inst) { inst.input.focus(); } }) .removeClass("ui-corner-all").addClass("ui-corner-left"); $(elem).next('button.ui-datepicker-trigger').button({ text: false, icons: { primary: 'ui-icon-calendar' } }).css({ width: '1em', height: '1.09em' }) .removeClass("ui-corner-all").addClass("ui-corner-right") .find('span.ui-button-text') .css({ padding: '0.1em' }) .siblings('span.ui-button-icon-primary') .css({ marginLeft: "-8.5px", marginTop: "-8.5px" }); $(elem).next('button.ui-datepicker-trigger').andSelf().css("verticalAlign", "middle"); }, 100); };…
favorite count: 0
tagged with: asp.net-mvc-4
tagged with: jqgrid-formatter

http://stackoverflow.com/q/26127102
has title: close all open documents after saving
type: UnansweredQuestion
type: Question
tagged with: javascript
has body: I have the script partially working. It saves all the open psd as jpg into into a separate directory and it close some of the open files not all. The directory has five files. The script saves only three files, What am I doing wrong? #target photoshop if (app.documents.length &gt; 0) { //flatten the active document app.activeDocument.flatten(); //jpeg options var myJPEGOptions = new JPEGSaveOptions(); myJPEGOptions.embedColorProfile = true; myJPEGOptions.formatOptions = FormatOptions.STANDARDBASELINE; myJPEGOptions.matte = MatteType.WHITE; myJPEGOptions.quality = 12; myJPEGOptions.scans = 3; // get documents; var docs = app.documents; for (var m = 0; m &lt; app.documents.length; m++) { app.activeDocument = docs[m]; try { //save file to folder var myFile = new File(("~/Desktop/forum-test") + "/" + activeDocument.name); app.activeDocument.saveAs(myFile, myJPEGOptions, true); //close the document activeDocument.close(SaveOptions.DONOTSAVECHANGES); } catch (e) { alert ("Error the script did not execute"); } } }
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26127611
has answer: http://stackoverflow.com/a/42442667

http://stackoverflow.com/a/26135437
has comment: http://stackoverflow.com/comment/40969333
accepted answer of: http://stackoverflow.com/q/26135382
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40965658
has comment: http://stackoverflow.com/comment/40965018
answers question: http://stackoverflow.com/q/26135382
upvote count: 9
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40966716
has body: What we would need here, is to do NOT redirect, if the state TO is already the 'login'. Just a drafted adjustment would be $rootScope.$on( '$stateChangeStart', function(e, toState , toParams , fromState, fromParams) { var isLogin = toState.name === "login"; if(isLogin){ return; // no need to redirect anymore } ... And also, we should call $state.go('login'); with the event.preventDefault(); ... // also prevent default on redirect $state.go('login'); event.preventDefault(); ... Please check this Q & A How can I fix 'Maximum call stack size exceeded' AngularJS And a plunker with similiar solution
has comment: http://stackoverflow.com/comment/40969575
score: 9
has comment: http://stackoverflow.com/comment/40969383
has comment: http://stackoverflow.com/comment/40967141
has comment: http://stackoverflow.com/comment/40969417

http://stackoverflow.com/a/26158657
score: 0
has body: Think your select should be empty at the beginning, then new options should be appended with javascript. &lt;select id = "myList"&gt;&lt;/select&gt; &lt;script type="text/javascript"&gt; var data = SOME_SORTOF_GET_JSON(), // get json from your existing function select = document.getElementById("myList"), newOption; for(var i = 0, item; item = data[i]; ++i) { newOption = new Option(item.firstname, item.id); select.add(newOption); } &lt;/script&gt; Good luck.
answers question: http://stackoverflow.com/q/26158493
type: Answer

http://stackoverflow.com/comment/41022430
comment on: http://stackoverflow.com/a/26164418
score: 0
type: AnswerComment
type: Comment
has text: This is regarding same thing. I am not able to see the datalist in UI. It says that "Validation (XHTML 1.0 transitional): Element 'datalist' is not supported'. So, is there any other alternative that I can use which is similar to 'datalist' and captures the response sent?

http://stackoverflow.com/a/26080634
has body: Possible solutions you can try: Use an SVG &lt;foreignObject&gt; with a &lt;clipPath&gt; or &lt;mask&gt;. I am not sure how well this will work though. Use a CSS Mask (http://caniuse.com/#feat=css-masks). Create a maps Polygon that has the same colour as the background and which is the size of the map and has a hole the shape of your mask. Cover the map with an &lt;img&gt; (eg. PNG) that has the same colour or texture as the background and which has a hole the shape of your mask.
type: Answer
answers question: http://stackoverflow.com/q/26064490
score: 0

http://stackoverflow.com/a/26084120
score: 1
answers question: http://stackoverflow.com/q/26083600
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
has body: By default, the update() method updates a single document. To update multiple documents, use the multi option in the update() method. as: Users.update({ _id : { $in : participants } }, { $push : { chat : chatId } }, {multi : true} ); Refer: http://docs.mongodb.org/manual/tutorial/modify-documents/#update-multiple-documents
accepted answer of: http://stackoverflow.com/q/26083600

http://stackoverflow.com/comment/40798938
comment on: http://stackoverflow.com/q/26044299
score: 1
has text: it looks fine, what exactly isn't working?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40924988
comment on: http://stackoverflow.com/q/26113364
has text: You can't. The settings in a user's browser are their concern, not yours.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40897928
type: AnswerComment
comment on: http://stackoverflow.com/a/26098248
score: 0
type: Comment
has text: But, there is also problem : if you click on blue marker then it displays yellow marker infowindow. Pls check that

http://stackoverflow.com/a/26151276
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41005871
type: Answer
has body: The handler expects a reference to a function. In the second part of the code you're executing the fucntion and passing the result to the handler. handler: btnTest_Click As a side note, you should probably avoid using global functions, Ext gives you better ways to structure your application.
accepted answer of: http://stackoverflow.com/q/26151129
answers question: http://stackoverflow.com/q/26151129
score: 0

http://stackoverflow.com/comment/40949602
type: AnswerComment
comment on: http://stackoverflow.com/a/26126793
type: Comment
has text: It DOES trigger the click in the snippet in my answer. So your problem is not in trigger() if it does not work on your page
score: 0

http://stackoverflow.com/a/40185811
has body: var startTime = '02:30 AM'; var endTime = '13:00 PM'; var now = new Date(); var startDate = dateObj(startTime); var endDate = dateObj(endTime); alert(endDate) var open = now &lt; endDate &amp;&amp; now &gt; startDate ? 'open' : 'closed'; alert('Restaurant is ' + open); function dateObj(d) { var parts = d.split(/:|\s/), date = new Date(); if (parts.pop().toLowerCase() == 'pm') parts[0] = (+parts[0]) + 12; date.setHours(+parts.shift()); date.setMinutes(+parts.shift()); return date; } var startTime = '8:30 AM'; var endTime = '6:30 PM'; var now = new Date(); var startDate = dateObj(startTime); var endDate = dateObj(endTime); var open = now &lt; endDate &amp;&amp; now &gt; startDate ? 'open' : 'closed'; alert('Restaurant is ' + open); function dateObj(d) { var parts = d.split(/:|\s/), date = new Date(); if (parts.pop().toLowerCase() == 'pm') parts[0] = (+parts[0]) + 12; date.setHours(+parts.shift()); date.setMinutes(+parts.shift()); return date; }
type: Answer
answers question: http://stackoverflow.com/q/26078488
score: 0

http://stackoverflow.com/comment/41021535
has text: Sweet. I will take a closer look... Also looks like if I change my app.yaml to only include file.js it will only include file.js and remove all the other files previously deployed...
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26165699
type: AnswerComment

http://stackoverflow.com/q/26139991
has comment: http://stackoverflow.com/comment/40973199
has answer: http://stackoverflow.com/a/26140115
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26140045
has answer: http://stackoverflow.com/a/26140057
has comment: http://stackoverflow.com/comment/40973928
type: Question
has comment: http://stackoverflow.com/comment/40973087
has title: table returned from php not adding to given div using jquery
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/26140057
answer count: 5
has answer: http://stackoverflow.com/a/26140212
has answer: http://stackoverflow.com/a/26140152
has answer: http://stackoverflow.com/a/26140045
has body: im trying to build a page that shows users the current forex rates live. So im grabbing the values from a feed and echo it into a table. Now i want to show to to the user using jquery. The problem is i try to add the returned table to a div but the table doesn't add to the given div id. If firebug it shows the proper table in the console mode my php echo ' Currency Buy <th"> Sell GMT Time '; foreach ($xml->Rate as $rate) { echo' '.$rate->Symbol.' '.$rate->Buy.' '.$rate->Sell.' '.$rate->Last.' '; } echo ' '; Jquery code HTML any help will be appreciated
tagged with: php

http://stackoverflow.com/a/26049289
score: 0
has comment: http://stackoverflow.com/comment/40816767
has comment: http://stackoverflow.com/comment/40808828
has comment: http://stackoverflow.com/comment/40808654
answers question: http://stackoverflow.com/q/26048771
type: Answer
upvote count: 2
downvote count: 2
has body: The short answer is: not really. The only sensible way to do it would be having a node process running which php can request renders from. This isn't a bad solution especially for pages that are heavily cached. I suggest setting it up in a very dynamic way: &lt;?php function render_component_to_string($component, $data) { $url = "http://localhost:9000/components/" . $component . "?data=" . rawurlencode(json_encode($data)); return file_get_contents($url) } ?&gt; &lt;div id="myFilteredList"&gt; &lt;?= render_component_to_string("FilteredList", array("items" =&gt; items, "title" =&gt; "My List")) ?&gt; &lt;/div&gt; In node.js: var app = require('express')(); // express@4.x var React = require('react'); // create a dictionary of components // Object.create(null) because the key is supplied var components = Object.create(null); components.FilteredList = require('./components/filtered-list.js'); app.get('/component/:componentName', function(req, res){ var component = components[req.params.componentName]; // safety first! if (!component) { console.error("Invalid component", req.params.componentName); return res.send(404); } // more safety try { var data = JSON.parse(req.query.data); } catch (e) { console.error("Invalid JSON", req.params.componentName, req.query.data); return res.send(400); } // render and send the result back try { var result = React.renderComponentToString(component(data)); } catch (e) { console.error('Could not render', req.params.componentName, 'with props', data); console.error(e.message, '\n', e.stack); return res.send(400); } res.send(result); }); app.listen(9000); This of course assumes your components are in commonjs modules. If they're not, this is another reason to do so! I haven't used php in a few years, so please update this answer if I made any mistakes.

http://stackoverflow.com/comment/40922891
type: QuestionComment
comment on: http://stackoverflow.com/q/26112213
score: 0
has text: You could just use `0` for the `setTimeout()` function. No need in unnecessary delay.
type: Comment

http://stackoverflow.com/q/26143791
tagged with: javascript
tagged with: window.open
has answer: http://stackoverflow.com/a/26143887
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
tagged with: var
has body: I know that I need to add a window.open to my code, but my problem is I am not sure where it needs to go to work properly. What I am trying to do is have a new window open when you click on check. This window will display the results. Thank You &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;title&gt;Math Worksheet&lt;/title&gt; &lt;link href="styles.css" rel="stylesheet" type="text/css"&gt; &lt;script&gt; var variable = new Array(); var correct=0; function setupEvents() { // Loads page makeProblems(); } function makeProblems() { // Creates variables for problems var tempText; for ( i=0; i &lt; 20; i++) { variable[i] = Math.floor(Math.random() * 50) + 1; tempText = variable[i]; i++; document.getElementById('var' + i).innerHTML = tempText; i--; } } function checkAnswers() { // checks the answers var answer; var sum; var number1; var number2; var j=0; var img=0; for ( i=1; i &lt;= 10; i++) { answer = document.getElementById('answer' + i).value; if ( checkInput(answer, i) == false ) { //Error-checking return false; } number1 = variable[j]; j++ number2 = variable[j]; sum = number1 + number2; j++; if ( answer == sum ) { document.images[img].src = "img/correct.gif"; correct++; } else { document.images[img].src = "img/wrong.gif"; } //} img++; } disableButton(); giveResults(); } function checkInput(answer, i){ if( isNaN(answer) || answer == "" ) { // makes sure that the input is a number for (j=0; j &lt; 10; j++) { document.images[j].src = "img/hide.png"; // image used to swap between corret and wrong images } window.alert("Please enter a number."); document.getElementById('answer' + i).value = ""; document.getElementById('answer' + i).focus(); correct=0; return false; } else { document.getElementById('answer' + i).setAttribute("class", ""); } } function disableButton() { document.getElementById('buttons').innerHTML = "&lt;input type='button' value=' More! ' onclick='moreProblems()' …
type: UnansweredQuestion
has title: have results open in a new windown
downvote count: 2
type: Question
upvote count: 0
score: -2

http://stackoverflow.com/q/26161314
upvote count: 13
tagged with: internet-explorer-11
has comment: http://stackoverflow.com/comment/41887466
has comment: http://stackoverflow.com/comment/54934942
has comment: http://stackoverflow.com/comment/42013654
has comment: http://stackoverflow.com/comment/58636534
type: Question
tagged with: blob
linked to: http://stackoverflow.com/q/40170381
has comment: http://stackoverflow.com/comment/77747645
tagged with: javascript
has title: Displaying binary file (pdf) in IE 11
has comment: http://stackoverflow.com/comment/41105789
has body: I am trying to display a binary file using the method suggested in this post AngularJS: Display blob (.pdf) in an angular app. This is working nicely in Chrome and FF, but IE 11 is giving me "Error: Access Denied". Does anyone know if it has something to do with the Blob object and can point me in the right direction? Here is my js code: $http.get(baseUrl + apiUrl, { responseType: 'arraybuffer' }) .success(function (response) { var file = new Blob([response], { type: 'application/pdf' }); var fileURL = URL.createObjectURL(file); $scope.pdfContent = $sce.trustAsResourceUrl(fileURL); }) .error(function () { }); and my html:
has answer: http://stackoverflow.com/a/37443172
tagged with: http://stackoverflow.com/tag/pdf
downvote count: 0
answer count: 1
linked to: http://stackoverflow.com/q/26103091
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
score: 13

http://stackoverflow.com/comment/41049671
type: AnswerComment
has text: @IsmaelMiguel I'm not sure why you keep bringing up that it's global, are you so afraid of global objects that you refrain from using them at all? This kind of thinking is not logical, it's pseudo-logical thinking that all global objects are inherently bad. If the form is the main function of the page, then it makes complete sense that the form configuration object would be global to the page that contains the form. I'm not sure where you learned about your coding practices but it seems to me like you've got a very conservative viewpoint as to coding practices that frankly in js is antiquated
type: Comment
comment on: http://stackoverflow.com/a/26163358
score: 0

http://stackoverflow.com/a/26133311
has comment: http://stackoverflow.com/comment/40961537
score: 1
has comment: http://stackoverflow.com/comment/40963483
has comment: http://stackoverflow.com/comment/40961784
upvote count: 1
downvote count: 0
has body: $('.overlay').on('click', function() { $(this).siblings('.object').trigger('click'); }); Without more context, I'm not sure if this will cause any undesirable side-effects.
answers question: http://stackoverflow.com/q/26133070
type: Answer
has comment: http://stackoverflow.com/comment/40961819

http://stackoverflow.com/q/26109502
has answer: http://stackoverflow.com/a/26109609
answer count: 1
has comment: http://stackoverflow.com/comment/40918109
favorite count: 0
has title: Convert "String Object" to Object
type: UnansweredQuestion
has body: i have problem, I have strings like "[prop1][prop2][prop3] = 5" ..and i need convert this string to JS object, so created object willl looks like this: { prop1: { prop2: { prop3: 5 } } } Any help? thanks
has comment: http://stackoverflow.com/comment/40918167
downvote count: 1
type: Question
upvote count: 0
has comment: http://stackoverflow.com/comment/40918156
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40918154

http://stackoverflow.com/a/29037610
has body: These guys found a solution for Chrome's accessibility resizing (set a very high max-height), it worked for me too: Android Chrome ignoring -webkit-text-size-adjust:none property. Text is being scaled when zoomed out
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26085303

http://stackoverflow.com/q/26064535
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: sharepoint
has answer: http://stackoverflow.com/a/26117162
has title: Grab value from input field on SHAREPOINT INFOPATH browser enabled form
has body: I'm trying to get the value of a textbox into a JavaScript variable. ultimately I'm trying to hide or show different webparts depending on the value in the textbox. I'm piecing the code together to test for input first. Below is the code for the textbox in question that I pulled from Firebug: &lt;input onfocus="return (TextBox.OnFocus(this, event));" onblur="return (TextBox.OnBlur(this, event));" oninput="return (TextBox.OnInput(this, event));" id="ctl00_m_g_ff1af521_db80_4f46_9a65_42671828173f_FormControl0_V1_I1_T82" scriptclass="TextBox" class="z_VYBB68eomwymAKXW_0 c5_VYBB68eomwymAKXW_0 ef_VYBB68eomwymAKXW_0" wrapped="true" direction="ltr" viewdatanode="83" formid="ctl00_m_g_ff1af521_db80_4f46_9a65_42671828173f_FormControl0" originalid="V1_I1_T82" tabindex="0" title="" value="Visible" style="position: relative;" type="text"&gt; If I use the code below I get an "Undefined" error message(popup). As you can clearly see though, the value of the textbox = "Visible" as the code above tells us. $(document).ready(function() { var HideWeb = $("#ctl00_m_g_ff1af521_db80_4f46_9a65_42671828173f_FormControl0_V1_I1_T82").val(); alert(HideWeb); }); I've also tried the following with no success (popup returns empty). var HideWeb = document.getElementById("#ctl00_m_g_ff1af521_db80_4f46_9a65_42671828173f_FormControl0_V1_I1_T82").value; alert(HideWeb); I've also tried using the other ID numbers in hopes that one of them would work in the JavaScript\Jquery code above. If someone could pick this apart and help me determine what the problem is I would appreciate it.Thank you. This correspondes to a question I asked here....... https://sharepoint.stackexchange.com/questions/113969/showing-hiding-webparts-conditionally
possible better answer: http://stackoverflow.com/a/26111101
has answer: http://stackoverflow.com/a/26111101
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26117162
type: Question
score: 0

http://stackoverflow.com/q/26102741
answer count: 4
has comment: http://stackoverflow.com/comment/40905902
has answer: http://stackoverflow.com/a/26102850
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26102778
has comment: http://stackoverflow.com/comment/40906006
linked to: http://stackoverflow.com/q/2085275
has title: Uncaught SyntaxError: Unexpected number
has comment: http://stackoverflow.com/comment/40905956
type: Question
has comment: http://stackoverflow.com/comment/40905708
accepted answer: http://stackoverflow.com/a/26102787
tagged with: javascript
has answer: http://stackoverflow.com/a/26102774
has comment: http://stackoverflow.com/comment/40905768
score: 0
possible better answer: http://stackoverflow.com/a/26102774
has comment: http://stackoverflow.com/comment/40905703
favorite count: 0
upvote count: 2
has body: SOLUTION: I realized that the current Regional Setting of test environment is set to Turkish, and it uses comma for decimal symbol. In my local, it is set to UK, and that's the reason that the code works in my local and doesn't work in test. I guess I'll replace all commas with dots beforehand. Thanks for all the replies. I'm trying to fill a bar chart with following data: var oneToTen = [0,1,2,3,4,5,6,7,8,9,10]; var ticks = [[0, 'Atmosfer'],[1, 'Servis'],[2, 'Yemeklerimiz']]; var labels = ['Atmosfer','Servis','Yemeklerimiz']; var mainQuest_d1 = 8,16666666666667; var mainQuest_d2 = 7,95833333333333; var mainQuest_d3 = 8,125; var d_main_quest_bar = [[0, 8,16666666666667],[1, 7,95833333333333],[2, 8,125]]; I get this error: Uncaught SyntaxError: Unexpected number I can't see what's wrong the code above. It works fine in localhost, but when I publish it to the test server, it gives this error. Complete code that's not yet rendered by Razor: int i = 0; int j = 0; int m = 0; @Html.Raw("var oneToTen = [0,1,2,3,4,5,6,7,8,9,10];"); @Html.Raw("var ticks = ["); if (Model.MainQuestionsRatingList != null) { foreach (var item in Model.MainQuestionsRatingList) { j++; @Html.Raw("["+(j-1)+", '"+item.QuestionText+"']") if (j != Model.MainQuestionsRatingList.Count) { @Html.Raw(","); } } } @Html.Raw("];"); @Html.Raw("var labels = ["); if (Model.MainQuestionsRatingList != null) { foreach (var item in Model.MainQuestionsRatingList) { m++; @Html.Raw("'"+item.QuestionText+"'") if (m != Model.MainQuestionsRatingList.Count) { @Html.Raw(","); } } } @Html.Raw("];"); if (Model.MainQuestionsRatingList != null) { foreach (var item in Model.MainQuestionsRatingList) { i++; @Html.Raw("var mainQuest_d" + i + " = " + item.Avg + ";"); } } i = 0; @Html.Raw("var d_main_quest_bar = ["); if (Model.MainQuestionsRatingList != null) { foreach (var item in Model.MainQuestionsRatingList) { i++; @Html.Raw("[" + (i-1) + ", "+item.Avg+"]"); if (i != Model.MainQuestionsRatingList.Count) { @Html.Raw(","); } } } @Ht…
downvote count: 2
has answer: http://stackoverflow.com/a/26102787

http://stackoverflow.com/q/26054570
has comment: http://stackoverflow.com/comment/40817425
has comment: http://stackoverflow.com/comment/40817385
answer count: 4
type: AnsweredQuestion
score: 2
downvote count: 0
type: Question
tagged with: c#
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26054703
has answer: http://stackoverflow.com/a/26054766
upvote count: 2
has body: I have javascript getter setter class function UserContext() { var category_id; var biller_id; this.get_category_id = function () { return category_id; } this.set_category_id = function (value) { category_id = value; } this.get_biller_id = function () { return biller_id; } this.set_biller_id = function (value) { biller_id = value; } } I am creating object of this class in jquery click event var contextObj = new UserContext(); contextObj.set_category_id('SOME VALUE'); contextObj.set_biller_id('65'); I have similar class in c# public class CustomerDTO { public string category_id { get; set; } public string biller_id{ get; set; } } And one asp:hidden element &lt;asp:HiddenField ID="hdnValue" ClientIDMode="Static" runat="server" /&gt; What i want to achieve Assign contextObj to asp:hidden element by serializing (may be in json format) In Code behind get this object desrailize it and assign the values to its respective c# class i.e CustomerDTO So that i can access all these values through out all pages request (By Passing this object in Server.Transfer request) To serialize object i tried this console.log(JSON.stringify(contextObj)); But it prints nothing. I want value to get printed so that i can assign to hidden variable
has answer: http://stackoverflow.com/a/26054700
has answer: http://stackoverflow.com/a/26055257
accepted answer: http://stackoverflow.com/a/26054700
possible better answer: http://stackoverflow.com/a/26054703
has comment: http://stackoverflow.com/comment/40817587
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/40817415
has title: serialize javascript object and deserialize it
linked to: http://stackoverflow.com/q/6799103

http://stackoverflow.com/comment/40788841
has text: Are you adding it to any form of handler, eg on click etc? If you're running it immediately on page load, `emodal` may not have been initialised yet
comment on: http://stackoverflow.com/a/26038152
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40912280
type: Comment
type: QuestionComment
has text: @agconti I agree with above comments, it is very valid to point out the issue in the posted code, and actually this should be done in angular way, you don't really deal with DOM when you are in the controller (there are exceptions when you use directive to achieve DOM manipulation but not definitely in this case though).
score: 2
comment on: http://stackoverflow.com/q/26103919

http://stackoverflow.com/q/26107638
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/26108776
type: Question
has comment: http://stackoverflow.com/comment/53684973
tagged with: javascript
tagged with: meteorite
has title: Meteor easy search and iron-router
downvote count: 0
answer count: 1
tagged with: meteor
favorite count: 0
has body: I'm using this easy serach for my project https://github.com/matteodem/meteor-easy-search my search Index EasySearch.createSearchIndex('searchIndex', { 'collection' : blog, 'field' : ['title', 'tags'], 'limit' : 20, "use":"mongo-db", 'query' : function (searchString) { // Default query that will be used for searching var query = EasySearch.getSearcher(this.use).defaultQuery(this, searchString); return query; } }); and now I have search box and when User enters something and click on enter I want to route to search page this.route("search",{ path:'/search/:slug', waitOn:function(){ //here I want the search data to be sent to search page var query=this.params.slug; EasySearch.search('searchIndex', query, function (err, data) { console.log(data); }); }, data:function(){ } }); In this router I want the searchIndex data to be sent to search page, how to do this my click event 'submit .search':function(e){ e.preventDefault(); var quer=$("#query").val(); // Router.go('search'); } UPDATE My main question is in the router waiton function how we get the data in callback and send it to the search page?
type: UnansweredQuestion

http://stackoverflow.com/q/26119789
has title: req.body undefined (post)
tagged with: express
has answer: http://stackoverflow.com/a/26120222
score: 0
tagged with: node.js
has body: Client : procedure TForm1.Button1Click(Sender: TObject); begin gcm := GetGCMInstance; p := TJavaObjectArray&lt;JString&gt;.Create(1); p.Items[0] := StringToJString('460004329921'); FRegistrationID := JStringToString(gcm.register(p)); FAlreadyRegistered := (FRegistrationID &lt;&gt; ''); Memo1.Lines.Add(BooltoStr(FAlreadyRegistered)); Memo1.Lines.Add(FRegistrationID); Memo1.Lines.Add(Edit1.Text); req.Method := TRESTRequestMethod.rmPOST; req.AddParameter('tableName', 'users', TRESTRequestParameterKind.pkGETorPOST); req.AddParameter('regid', FRegistrationID, TRESTRequestParameterKind.pkGETorPOST); req.AddParameter('email', Edit1.Text, TRESTRequestParameterKind.pkGETorPOST); req.Execute; jsonValue:= res.JSONValue; X := SO(jsonValue.ToString); Memo1.Lines.Add(X['results'].AsString); end; function TForm1.GetGCMInstance: JGoogleCloudMessaging; begin result := TJGoogleCloudMessaging.JavaClass.getInstance(SharedActivity.getApplicationContext); end; Node.js Server: var nodePort = 3030; var express = require('express'); var app = express(); var bodyParser = require('body-parser'); var db = require('mysql'); var dbPool = db.createPool({ host : 'localhost', user : 'root', password : '1234', database : 'test', port : 3306 }); var gcm = require('node-gcm'); var message = new gcm.Message(); var sender = new gcm.Sender('AIzaSyChp2jTQsgPkLaaVgFh6yoovu1Td7tuQMo'); //Api Key var registrationIds = []; registrationIds.push('APA91bGNYh3cIL0jcWAhfTIhTen-ThNQRrSbAJ30UEV7I93ejL0BgWok1VU45xs8p82KKcMj5-7SUXf65UCkNa6rVTJ0nYqwEx0Jv7zezaCvQnrQikKjnJGTXHCQEWXhtTOaeXR__7qQYPV5BudtA_0Thty4itfz5Q'); registrationIds.push('APA91bFQX8NJ4goolOGdA-U_MxtwKLk1wMLYMddXV2FetT4A7z3d_ZPYSRz1lkXWo-6QoYgOR4xYD8WeBwFDGqpuZbiBgYV_1H8JPtdPzKGXRQr5jiMD_C5nntxeWNb0aBIi-ejTGo881S8NWvC4K_u28DlZG47ecQ'); app.use( bodyParser.json() ); app.post('/api/db', function(req, res){ if(!req.body.tableName){ var data = { ID : req.body.id, Name : req.body.name } tableName = 'person'; }else{ var data = { email : req.body.email, regid …
accepted answer: http://stackoverflow.com/a/26120222
type: Question
type: AnsweredQuestion
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41009472
comment on: http://stackoverflow.com/q/26158662
has text: @Ghost ghost i'm trying to do that, but its not working.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40869850
comment on: http://stackoverflow.com/q/26082954
has text: Add $(document).ready(function(){ // rest of your code });
score: 0
type: Comment
type: QuestionComment

audio
tags question: http://stackoverflow.com/q/26133039
tags question: http://stackoverflow.com/q/26185420
tags question: http://stackoverflow.com/q/26107939
tags question: http://stackoverflow.com/q/26056223
tags question: http://stackoverflow.com/q/26149717
type: Tag
tags question: http://stackoverflow.com/q/26190082
tag name: audio
tags question: http://stackoverflow.com/q/26074400
tags question: http://stackoverflow.com/q/26095544
tags question: http://stackoverflow.com/q/26037847
tags question: http://stackoverflow.com/q/26162271
tags question: http://stackoverflow.com/q/26068249
tags question: http://stackoverflow.com/q/26133245
tags question: http://stackoverflow.com/q/26122334
tags question: http://stackoverflow.com/q/26045942
tags question: http://stackoverflow.com/q/26133889

http://stackoverflow.com/comment/41054422
has text: Thanks for the help. Would you happen to know how I can refer to the class of the checkboxes?
comment on: http://stackoverflow.com/a/26183151
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41010679
comment on: http://stackoverflow.com/q/26160048
type: QuestionComment
score: 1
has text: You might be looking for `Promise.all([somePromise, someOtherPromise, yetAnotherPromise])`?
type: Comment

http://stackoverflow.com/comment/41075208
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26194683
has text: yeah I fixed this and I changes $('#cacanice') to $('#vacancies') cause that was wrong as well and still it doesn't work. The var num is not used anywhere in your code is it meant to be like this ? Why you event need the data-id if you are not using it ? Maybe that's why it doesn't work ? @ChiChou
score: 0

http://stackoverflow.com/comment/40862930
score: 0
comment on: http://stackoverflow.com/q/26078130
type: Comment
type: QuestionComment
has text: Specify `'images':"/intro_png/intro-png_.%2d.png"` in your flipbook config. Create a directory named `intro_png` in your public folder. Put all your images `intro-png_1.png` to `intro-png_138.png` in that `intro_png` folder. Now if it still 404s, paste the URL that is resulting in 404. In this setup there is not asset-url anywhere.

http://stackoverflow.com/comment/40890631
comment on: http://stackoverflow.com/a/26077790
has text: Is there another better solution? If the graph is redrawn, the redraw event is fired, right? So maybe this is the right place to change the size of the markers?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26136363
has comment: http://stackoverflow.com/comment/40966626
type: Question
tagged with: angularjs-directive
has title: How does scope() method work in Angular JS?
has comment: http://stackoverflow.com/comment/40968220
tagged with: javascript
tagged with: angularjs-scope
has answer: http://stackoverflow.com/a/26136572
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40966719
has answer: http://stackoverflow.com/a/26155402
has body: I have created a directive, which has an isolated scope. Somehow, when I try to get scope from the directive's element, it gives me controller's scope, instead of the isolated scope. What's wrong with my code? Who can explain how does scope() method works? This is my js code: angular.module('myApp',[]) .directive('component',function(){ return { restrict:'EA', replace:false, scope:{ "model":"=" }, template:'&lt;div&gt;{{model.name}}&lt;/div&gt;', link:function($scope,element,attrs){ element.bind('click',function(event){ console.log("element scope id-&gt;", element.scope().$id ); }); } }; }) .controller('AppCtrl',function($scope){ $scope.myModel = { name:"Click me, to see scope's id in console" }; console.log("controller scope id-&gt;", $scope.$id); }); and the markup: &lt;div ng-app="myApp" ng-controller="AppCtrl"&gt; &lt;component selectable model="myModel"&gt;&lt;/component&gt; &lt;/div&gt; DEMO is here
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40966760

http://stackoverflow.com/q/26189132
tagged with: http://stackoverflow.com/tag/html
tagged with: http://stackoverflow.com/tag/xml
has answer: http://stackoverflow.com/a/26189162
has answer: http://stackoverflow.com/a/26189345
has title: javascript, XML, HTML, how to read xml in chrome and firefox?
type: Question
has body: how to read xml in chrome and firefox? i have a code like this : Product Name Price this code is work only in IE how to display the xml data in firefox and chrome browser?? help me please..
has comment: http://stackoverflow.com/comment/41065499
tagged with: javascript
score: 0
answer count: 2
type: UnansweredQuestion

http://stackoverflow.com/comment/40810392
has text: You do know that you are not setting your submit Event until a change occurs first, right?
comment on: http://stackoverflow.com/q/26050109
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26145986
accepted answer of: http://stackoverflow.com/q/26144659
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26144659
has comment: http://stackoverflow.com/comment/51076732
type: AcceptedAnswer
downvote count: 0
has body: Bug in the directive defined in angular-bootstrap-select.js, remove this part and try: ngModel.$render = function () { $timeout(function () { element.selectpicker('val', element.val() || ''); }); };
type: Answer

http://stackoverflow.com/comment/40918109
comment on: http://stackoverflow.com/q/26109502
has text: Convert to JSON string and than JSON.parse() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40837457
score: 0
has text: thank you , not exactly what i am looking for , still useful though
type: Comment
comment on: http://stackoverflow.com/a/26065312
type: AnswerComment

http://stackoverflow.com/comment/41017419
score: 1
comment on: http://stackoverflow.com/q/26163422
type: Comment
type: QuestionComment
has text: @MichałFraś said right. The resize event fires on each pixel changed when the user is dragging... so it can be called a hundred times in a simple resize. I recommend readding [this post](http://stackoverflow.com/q/5489946/1267304).

http://stackoverflow.com/comment/40988050
type: AnswerComment
comment on: http://stackoverflow.com/a/26147015
type: Comment
has text: could you post the input string?
score: 0

http://stackoverflow.com/comment/40801373
type: AnswerComment
comment on: http://stackoverflow.com/a/26045645
type: Comment
score: 0
has text: Ha. The solution is always like a two-character change. Thanks so much for pointing that out.

http://stackoverflow.com/comment/40980101
has text: @Sackling you'd need to also comment out the matching braces
comment on: http://stackoverflow.com/a/26143632
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26130606
downvote count: 1
score: 0
answers question: http://stackoverflow.com/q/26130579
has body: Try using disabled instead of true: $('img').click(function () { $("#shikh_sec").attr("disabled", "disabled"); } http://jsfiddle.net/yhfnzjuq/ $(function(){ $('img').click(function () { $("#shikh_sec").attr("disabled", "disabled"); }); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;img src="http://ichef.bbci.co.uk/news/ws/200/amz/worldservice/live/assets/images/2014/09/23/140923115528_ultima_hora_640x360_bbc_nocredit.jpg"&gt; &lt;input id="shikh_sec" type="button" value="OK"&gt;
type: Answer
upvote count: 1

http://stackoverflow.com/comment/40876521
comment on: http://stackoverflow.com/q/26086663
has text: Try something like this:- `$scope.getStructs = function (path) { return $http({ method: 'GET', url: 'http://localhost:8001/www-root/' + path }). then(function (response) { console.log("Success: " + response.data); return response.data; }, function (response) { alert("Error: " + response.status); }); }` and consume it as `$scope.getStructs("get_users.pl").then(function(data){ $scope.users = data });` However you could add a service which abstracts out all the http calls and use that in your controller.
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/q/26060855
tagged with: amazon-dynamodb
has answer: http://stackoverflow.com/a/26086321
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has body: I'm trying to implement dynode to talk with dynamodb form a node.js script. There are several examples on the Internet that shows how to do that with dynode, such as: var opts = {read: 20, write: 25, hash: {name: String}, range: {age: Number}}; dynode.createTable("ExampleTable", opts, console.log); which actually does the trick and works for me... The issues I'm having is that I need to implement a shema on the same time when I create the database, or at least after that, a shema means that I need to tell the dynamodb to add a first_name field with string format, an address with string format etc... there is no way nor instructions that shows how to do that ... It's annoying to spend so much time on a so simple issue, because it is not well documented... here is the dynode github web site: Thanks
type: Question
tagged with: node.js
has title: dynode createtable with shema
score: 0

http://stackoverflow.com/q/26175361
accepted answer: http://stackoverflow.com/a/28328715
has title: display multiple charts on single page using Embed api
has answer: http://stackoverflow.com/a/28328715
type: AnsweredQuestion
type: Question
tagged with: google-analytics
tagged with: javascript
has body: I want to display two timeline google analytics charts using embed api in single page.but only one is appearing.In first chart i want to display bounce rate and in second chart i want to display sessions.Please give me a solution for this problem.Any help will be appreciated. here is code. Embed API Demo
score: 0
has comment: http://stackoverflow.com/comment/41047153
answer count: 1

http://stackoverflow.com/comment/40941861
type: Comment
has text: I'm sorry it's actually Parallax Content Slider from this page - http://tympanus.net/codrops/2012/03/15/parallax-content-slider-with-css3-and-jquery/
score: 0
comment on: http://stackoverflow.com/q/26122321
type: QuestionComment

http://stackoverflow.com/q/26148714
has comment: http://stackoverflow.com/comment/40989942
has answer: http://stackoverflow.com/a/26148869
has body: I'm working on a simple but difficult problem for me right now, I'm use to work in jQuery but need this to be done in Javascript. So simple as it is, the user inputs a string lets say: "hey, wanna hang today?". It should output the next character in my array, so it would be like this: "ifz, xboob iboh upebz?". And I have tried everything I can come up with. Hopefully some of you guys see the problem right away. I have set up a short jsFiddle that shows similar to what I got. function gen() { var str = document.getElementById('str').value, output = document.getElementById('output'); var alph = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','æ','ø','å','a']; for (var i=0;i&lt;str.length;i++) { var index = str[i].charAt(0), e = alph.indexOf(index); console.log(alph[e + 1]); output.innerHTML += alph[e + 1]; } }
type: Question
has comment: http://stackoverflow.com/comment/40989729
possible better answer: http://stackoverflow.com/a/26148854
tagged with: arrays
has title: Get the next key from array from string with symbols
tagged with: javascript
has comment: http://stackoverflow.com/comment/40989930
has comment: http://stackoverflow.com/comment/40989776
score: 0
has answer: http://stackoverflow.com/a/26148899
answer count: 4
has answer: http://stackoverflow.com/a/26148865
has comment: http://stackoverflow.com/comment/40989757
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26148899
has answer: http://stackoverflow.com/a/26148854

http://stackoverflow.com/q/26173684
has comment: http://stackoverflow.com/comment/41036566
has comment: http://stackoverflow.com/comment/41036218
favorite count: 0
has answer: http://stackoverflow.com/a/26173798
has answer: http://stackoverflow.com/a/26173922
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26173734
has title: How to find minimum decimal value in array using javascript
score: 2
downvote count: 0
linked to: http://stackoverflow.com/q/11301438
has answer: http://stackoverflow.com/a/26173844
type: Question
upvote count: 2
tagged with: arrays
has answer: http://stackoverflow.com/a/26173758
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/26173729
has body: I have array with decimal nos such as var idArray = ["98.40", "111.46", "144.47", "180.48", "217.49", "284.50", "424.51", "571.52", "1887.53", "1960.54", "1972.55", "2118.56", "2167.57", "2467.58", "2480.59", "2488.60", "2662.61", "2671.62", "2767.63", "2982.64", "3168.65", "3263.66", "3295.67", "3369.68", "3579.69", "3592.70", "3600.71", "3605.72", "3620.73", "3646.74", "3852.75", "3857.76", "4031.77", "4489.78", "4975.79"] I found the minimum value in the array as below var result = Math.min.apply(null, idArray ); I got result as 98.4 Is there a way to return actual value in the array as 98.40

http://stackoverflow.com/a/26158579
score: 54
has body: Try something like this var cleanScript = { 'type': 'script', 'api_key': api_key, 'data': data, 'inputs': inputs, 'timeoutSeconds': timeoutSeconds }; var jsonse = JSON.stringify(cleanScript); var blob = new Blob([jsonse], {type: "application/json"}); var url = URL.createObjectURL(blob); var a = document.createElement('a'); a.href = url; a.download = "backup.json"; a.textContent = "Download backup.json"; document.getElementById('json').appendChild(a); &lt;div id="json"&gt;&lt;/div&gt;
downvote count: 0
type: Answer
upvote count: 54
answers question: http://stackoverflow.com/q/26158468

http://stackoverflow.com/comment/40897756
type: AnswerComment
has text: I thought of removing it... But I am looking for a better solution... To stop adding that.. Rather than removing it.
type: Comment
comment on: http://stackoverflow.com/a/26098374
score: 0

http://stackoverflow.com/comment/40845913
score: 0
type: Comment
type: QuestionComment
has text: actually on our site logs it reaches almost 20k visits per month using ie6
comment on: http://stackoverflow.com/q/26069515

http://stackoverflow.com/q/26086416
has comment: http://stackoverflow.com/comment/40875887
has comment: http://stackoverflow.com/comment/40875883
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26086499
answer count: 1
has body: I'm trying to use a for loop in an array, to make it display the random numbers in sort order (High to lower) when a button is clicked on within the html plus time the action, I have done this and it works by displaying the results with each number on a new line from 100 to 1 and giving the time in milliseconds. What I'm trying to do, is make it display 10 numbers per line, but not sure how to go about it. Javascript function Numberordermatch() { var start = new Date().getTime(); for (i = 0; i < 1000; ++i) { var points = [77, 57, 18, 35, 36, 33, 43, 87, 100, 14, 73, 97, 96, 27, 34, 39, 23, 71, 1, 86, 56, 21, 26, 65, 20, 29, 55, 49, 16, 42, 90, 91, 59, 84, 38, 75, 82, 66, 17, 62, 30, 63, 74, 89, 22, 50, 68, 31, 78, 81, 44, 93, 9, 40, 41, 48, 19, 32, 46, 28, 53, 70, 52, 60, 80, 47, 15, 069, 7, 67, 13, 61, 5, 94, 6, 98, 99, 83, 76, 88, 25, 72, 79, 37, 51, 64, 8, 2, 92, 12, 54, 045, 3, 58, 11, 95, 24, 10, 85, 4]; points.sort(function(a, b){return b-a}); document.getElementById("demo").innerHTML = points; } var end = new Date().getTime(); var time = end - start; text = ""; var i; for (i = 0; i < points.length; i++) { text += points[i] + " "; } document.getElementById("demo").innerHTML = text; document.getElementById("results").innerHTML = ('This function took: ' + time + 'ms to load'); }
has comment: http://stackoverflow.com/comment/40875896
has comment: http://stackoverflow.com/comment/40875854
has title: For loop array with multiple variables using numeric value
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26086499

http://stackoverflow.com/q/26105595
has comment: http://stackoverflow.com/comment/40911410
tagged with: javascript
has comment: http://stackoverflow.com/comment/40911235
tagged with: jquery
downvote count: 0
accepted answer: http://stackoverflow.com/a/26105809
answer count: 1
favorite count: 0
has body: I have stupidly decided to support IE8 in my latest project, something which will no doubt go down in history as the dumbest idea of my life. So the most fundamental problem I'm running into is that my main class variable is undefined. What I mean is I have a prototype set up in a file general.js that looks a bit like this: var generalClass; // jQuery Object var $ = jQuery; $(document).ready(function() { // A general class for a general file. generalClass = function() { } generalClass.prototype = { } new generalClass(); }); So the generalClass variable is filled up with my prototype/etc. I then include this in the head of my document and later on I call upon a function in that generalClass for something else, a bit like this: &lt;script type="text/javascript" src="general.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $.ajax({ type: 'POST', url: ..., data: { }, success : function(data) { // CALL MY FUNCTION: generalClass.prototype.myFunction(); } } }); &lt;/script&gt; In every browser, from IE9 to Chrome this works. In IE8 this does not work, and generalClass is undefined. Why is it doing this to me?
has comment: http://stackoverflow.com/comment/40911264
tagged with: css
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/40911158
upvote count: 3
has answer: http://stackoverflow.com/a/26105809
has title: Class is undefined in IE8
type: Question
has comment: http://stackoverflow.com/comment/40911178
tagged with: internet-explorer-8
has comment: http://stackoverflow.com/comment/40911239

http://stackoverflow.com/q/26132514
tagged with: window.location
has comment: http://stackoverflow.com/comment/40960704
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40960096
favorite count: 0
has answer: http://stackoverflow.com/a/26146954
has title: javascript window.location issue with IE and Firefox
has comment: http://stackoverflow.com/comment/40960059
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26146954
has comment: http://stackoverflow.com/comment/40960299
tagged with: javascript
has body: I have some strange behavior on my window.location redirects in IE and Firefox as part of my angular application. When calling window.location = xyz the first time it works fine in IE/FF/Chrome. On the second call which is supposed to go to google.com, Chrome does what it's supposed to, but IE and FF don't do anything. In the IE web console I can see that the navigation was triggered but the page and URL hasn't changed in my window. Now if I press F5 on this page it goes to the page it's supposed to even though the URL at the top is not pointing there (both in IE and FF). Has anyone ever encountered this problem and knows how to solve it? I've tried all versions of redirecting (window.location, window.location.href, windows.location.assign(), window.location.replace() and also the angular service $window) with no luck. First call triggered from a button press (working fine in all browsers): $scope.pressButton = function() { var url = 'xyz/index.html'; $window.location = url; }; Second call triggered by a keypress (only works in Chrome): function exitModule() { $window.location = 'http://www.google.com'; console.log('window.location'); // still pointing to the old page } Update with code calling the exitModule() function: Note: The application is built with angularjs. The exitModule() function gets called in all browsers, it's just the redirect which doesn't happen in IE/FF. HTML: &lt;body ng-app="myModule" ng-controller="MainCtrl" ng-keydown="keyPress($event);"&gt; JS: // Handle global key press $scope.keyPress = function(event){ if(event.which === 27) { // EscapeKey exitModule(); } else { $scope.$broadcast('keyPress', event); } };
has comment: http://stackoverflow.com/comment/40960832

http://stackoverflow.com/comment/40942238
type: Comment
type: QuestionComment
has text: `$('#grid_container').width()/input - 2;` From this, where is that `input` coming from..?
score: 4
comment on: http://stackoverflow.com/q/26123075

http://stackoverflow.com/q/26146405
type: Question
has answer: http://stackoverflow.com/a/26146499
has body: I'm trying to parse the YYYYMMDDTHHMMSSZ format with moment.js, but I always get "Invalide date". Is there a way to parse it?
tagged with: javascript
answer count: 1
tagged with: momentjs
favorite count: 0
has title: Parsing icalendar datetime YYYYMMDDTHHMMSSZ with moment.js
type: UnansweredQuestion
downvote count: 1
score: 2
upvote count: 3
tagged with: icalendar

http://stackoverflow.com/q/26183222
has body: There's a product page that sells something. On this product page, on the top, it says "Reviews." Once you click it, it'll go down to the bottom of the page where there are four tabs -- Specs, Customer Reviews and other tabs. What I want: to scroll down to the anchor point and then open up the tab that says customer service. Is this possible? Here's the code I have so far: &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;title&gt;My Homepage&lt;/title&gt; &lt;link href="tabs.css" rel="stylesheet" type="text/css" /&gt; &lt;/head&gt; &lt;body&gt; &lt;!-- Here's the button to link ---&gt; &lt;a href="#linkMe"&gt;Link here&lt;/a&gt; &lt;!-- Here's the button to link ---&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h1&gt;My Homepage&lt;/h1&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;!-- Here's the anchor to link down to ---&gt; &lt;a name="linkMe"&gt;&lt;/a&gt; &lt;!-- Here's the anchor to link down to ---&gt; &lt;!-- Here are the tabs, select tab #2 to open ---&gt; &lt;ol id="toc"&gt; &lt;li&gt;&lt;a href="#page-1"&gt;&lt;span&gt;Page 1&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#page-2"&gt;&lt;span&gt;Page 2&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#page-3"&gt;&lt;span&gt;Page 3&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt; &lt;!-- Here are the tabs, select tab #2 to open ---&gt; &lt;div class="content" id="page-1"&gt; &lt;h2&gt;Page 1&lt;/h2&gt; &lt;p&gt;Text...&lt;/p&gt;…
has title: Is it possible to anchor pages while doing another action in HTML / JS?
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26183582
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41058140
has answer: http://stackoverflow.com/a/26183760
type: UnansweredQuestion

http://stackoverflow.com/comment/40922836
has text: Thank you for the reply. the query gives me an error when using several GROUP BY statements. it only recognized the first GROUP BY line. anyway, I tried using all the queries under the same GROUP BY statement and it does not seem to work. the columns are displayed but they are not grouping as intended.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26108590

http://stackoverflow.com/a/29929420
score: 0
has body: Since I'm working on Dojo and looking at lots of TimeTextBox questions on SO, I figured I can answer some of them. Here's a JS Fiddle I made just for this question. I used increments of an hour and only display the hours, then I do the same for the minutes. If you want 5 minute intervals instead, change pickerMax: 'T00:59:00', clickableIncrement: 'T00:01:00', visibleIncrement: 'T00:01:00' to pickerMax: 'T00:55:00', clickableIncrement: 'T00:05:00', visibleIncrement: 'T00:05:00' NOTE: pickerMin and pickerMax require Dojo 1.10.4. h = new dijit.form.TimeTextBox({ constraints: { timePattern: 'HH', pickerMin: 'T00:00:00', pickerMax: 'T23:00:00', clickableIncrement: 'T01:00:00', visibleIncrement: 'T01:00:00' } }); m = new dijit.form.TimeTextBox({ constraints: { timePattern: 'mm', pickerMin: 'T00:00:00', pickerMax: 'T00:59:00', clickableIncrement: 'T00:01:00', visibleIncrement: 'T00:01:00' } }); Try it here: http://jsfiddle.net/tfpjmbs2/1/
answers question: http://stackoverflow.com/q/26167944
type: Answer

http://stackoverflow.com/q/26134836
accepted answer: http://stackoverflow.com/a/26135465
tagged with: templates
favorite count: 0
tagged with: angularjs
has title: Is it possible to send a value/ng-model from one directive template to another? (AngularJS)
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40965050
has body: Let's think of the most simple example here. How do I send the value of a text input from the template of directive A as a filter for a list that exists as ng-repeat in the template of directive B ?
score: 1
upvote count: 1
tagged with: directive
has answer: http://stackoverflow.com/a/26135465
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40964188
has comment: http://stackoverflow.com/comment/40964999
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/40917511
comment on: http://stackoverflow.com/q/26108924
type: Comment
type: QuestionComment
has text: Used in an infinitescroller. You are thinking too small. ;)
score: 0

http://stackoverflow.com/comment/40901190
type: Comment
type: QuestionComment
score: 1
has text: possible duplicate of [fade in background jquery](http://stackoverflow.com/questions/17825194/fade-in-background-jquery)
comment on: http://stackoverflow.com/q/26100237

http://stackoverflow.com/comment/40783455
score: 0
type: AnswerComment
has text: var string = "{{{}}}" // In my file var data = "//The whole file data"; so i have to use var string = data. @prasad
type: Comment
comment on: http://stackoverflow.com/a/26035992

http://stackoverflow.com/q/26093653
tagged with: javascript
score: 0
has title: Google plus share using dynamic content not working
answer count: 1
tagged with: google-plus
has body: I am working vehicle tracking website, here I have to share some dynamic content in google plus share that is as prefilled text. Issue is the content I am sharing in google plus is shared,when first time I click google plus share, after the content get refresh automatically one minute once through ajax, the prefill text content getting updated, but i click share button in google plus share window the content not getting posted to anyone. Here is the sample code Share Demo: Deferred execution with language code Share
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26800581

http://stackoverflow.com/comment/41035772
type: AnswerComment
has text: @webberpuma The only "official documentation" to me IS the source code =D The line I linked shows that `interceptors` is simply an array assigned as a property of `$httpProvider`. That is why you use `push` to add your interceptors. You didn't my mark my answer as accepted... is there something else I need to add?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26172326

http://stackoverflow.com/comment/40787235
comment on: http://stackoverflow.com/a/26037958
score: 0
type: Comment
has text: Please show your code. Are you sure you are passing correct value, and not a null variable? @zanzoken
type: AnswerComment

http://stackoverflow.com/comment/40971631
type: Comment
score: 0
has text: Appending/removing isn't the only option. ` ` & `document.styleSheets[0].disabled = true|false`
comment on: http://stackoverflow.com/q/26138871
type: QuestionComment

http://stackoverflow.com/comment/40799769
has text: I am following a tutorial, like I said, i'm still a newbie
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26044773

http://stackoverflow.com/comment/40919898
has text: @user70192 If there is still some problem after this, it would be great if you can let me know how the JSON the ajax call to `/api/getItems` looks like. You can get the JSON by doing `console.log(data)` in `ajax.results`. Actually, whether it would work properly depends highly on the structure of the JSON.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26102668

http://stackoverflow.com/a/26140933
score: 11
type: AcceptedAnswer
type: Answer
has body: The whole idea is to push to array not two elements, but an array, which consists of two elements: JSFiddle. var IDs = []; $('#divDynamicFields input').each(function() { IDs.push([this.id, $(this).val()]); }); for (var i = 0; i &lt; IDs.length; i++) { CallFunction(IDs[i][0], IDs[i][1]); } function CallFunction(id, value) { console.log("ID: " + id + ", value: " + value); }
upvote count: 11
accepted answer of: http://stackoverflow.com/q/26140640
answers question: http://stackoverflow.com/q/26140640
downvote count: 0

http://stackoverflow.com/comment/40868611
type: Comment
type: QuestionComment
has text: Try `$(childW.document).contents().find('.hidden').html()` without `.ready()` . See http://api.jquery.com/contents/
score: 0
comment on: http://stackoverflow.com/q/26080672

http://stackoverflow.com/comment/41044054
type: Comment
score: 1
has text: what do you mean by xpath?
type: QuestionComment
comment on: http://stackoverflow.com/q/26178199

http://stackoverflow.com/q/26049299
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40859776
has comment: http://stackoverflow.com/comment/40859874
has comment: http://stackoverflow.com/comment/40808529
type: Question
has title: Bootstrap Validator not validating
has answer: http://stackoverflow.com/a/31173763
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40859761
tagged with: validation
has body: I'm trying to use Bootstrap Validator to validate a form, which is split across two "col-md" classes The first is held within a .col-md-8 and the second is in a .col-md-3. The validation is working on the one in the .col-md-8, but nothing in the .col-md-3 is validating. I know the syntax for the Bootstrap validator is correct, as its a copy from an earlier one that is working. Does anyone have any experience of this? House Number validator javascript: $('#multiform') .find('[name="list_type"]') .change(function(e) { $('#multiform').bootstrapValidator('revalidateField', 'price'); }) .end() .bootstrapValidator({ message: 'This value is not valid', feedbackIcons: { required: 'fa fa-asterisk', valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, fields: { price: { validators: { notEmpty: { message: 'The price is required and cannot be empty' }, integer: { message: 'You can only enter an integer' }, regexp: { regexp: /^[0-9]+$/, message: 'The price can only consist of numbers' } } }, title: { validators:{ notEmpty: { message:'This field cannot be empty' }, regexp: { regexp: /^[a-zA-Z0-9]+$/, message: 'The title can only consist of letters and numbers' } } }, desc: { validators:{ notEmpty: { message: 'This field cannot be empty' }, stringLength: { max: 500, message: 'Your description is too long' }, regexp: { regexp: /^[a-zA-Z0-9#*]+$/, message: 'The house number can only consist of letters and numbers' } } }, number: { validators:{ notEmpty: { message: 'This field cannot be empty' } } } } }); (with the code above, its the number that isn't validating.
answer count: 1
tagged with: jqbootstrapvalidation

http://stackoverflow.com/comment/88286655
has text: What does you play play_audio(file_names); do can you share the code?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/45462913
type: AnswerComment

http://stackoverflow.com/q/26048781
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/44843751
has comment: http://stackoverflow.com/comment/44843295
favorite count: 0
has answer: http://stackoverflow.com/a/28887460
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 12
accepted answer: http://stackoverflow.com/a/26048951
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/44843359
linked to: http://stackoverflow.com/q/3252730
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28887460
has answer: http://stackoverflow.com/a/26048951
downvote count: 0
linked to: http://stackoverflow.com/q/10510191
score: 12
type: Question
has title: Preventing scrolling when a nested Bootstrap Dropdown clicked
has body: I have two Bootstrap dropdown menus (split buttons). When the dropdown is active, the user can press on numbers going from 1 to 5, but when they press any of these, the user is redirected to the top of the page. I understand that it's normal behavior (considering that they are clicking a "link"), but I want to prevent this effect because it affects the mobile experience. I tried to use return false in my jQuery code, but by doing so, when the dropdown is active, no element can be selected in the dropdown. Is there an alternative? HTML: Add 1 vector Toggle Dropdown 1 2 3 4 5 jQuery: $('#ajouter a').on('click', function() { nombre_ajout = parseInt($(this).html()); if (nombre_ajout > 1) $('#btn1 button').eq(0).html('Add ' + nombre_ajout +' vectors'); else if (nombre_ajout == 1) $('#btn1 button').eq(0).html('Add ' + nombre_ajout +' vector'); }); Image:
answer count: 2
has comment: http://stackoverflow.com/comment/44830511

http://stackoverflow.com/a/26069272
has body: I think this fits for you : http://jsfiddle.net/OxyDesign/ctL47w6c/ HTML Main Link1 Link2 link link JS $(document).ready(function(){ $("#accordion li").click(function(e){ e.stopPropagation(); var subList = $(this).find('> ul'); if(subList.length) subList.slideToggle(300); }); });
has comment: http://stackoverflow.com/comment/40853170
type: Answer
has comment: http://stackoverflow.com/comment/40852011
accepted answer of: http://stackoverflow.com/q/26069087
answers question: http://stackoverflow.com/q/26069087
has comment: http://stackoverflow.com/comment/40853510
has comment: http://stackoverflow.com/comment/40906802
score: 0
has comment: http://stackoverflow.com/comment/40852239
has comment: http://stackoverflow.com/comment/41170010
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40852979
has comment: http://stackoverflow.com/comment/40872702
has comment: http://stackoverflow.com/comment/40852901

http://stackoverflow.com/comment/40945918
comment on: http://stackoverflow.com/a/26104300
type: Comment
has text: I have been working on this and it has been great. One thing though when the totals are generated in the text box is there anyway we can have them as an actual value. Because when you click on it the value just disappears.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26055407
has body: I want to semantically seperate my variable types, like constants, private, public. However I don't know the category name for variables that can only be changed inside a function, but are read-only outside a function: F.ex: function x() { var _private; var CONSTANT; this.public var privateCONSTANT; //I don't know what to call this.... Object.defineProperty(this, 'privateCONSTANT',{ get: function(){ return privateCONSTANT; } }); } What is a read-only private variable called?
has title: What do you call a variable, that is constant outside of a function, but variable inside?
has answer: http://stackoverflow.com/a/26055532
upvote count: 1
answer count: 1
favorite count: 0
type: UnansweredQuestion
downvote count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/40818780
tagged with: javascript

http://stackoverflow.com/q/26130210
has body: Bonjour, I'm trying to add a simple progress bar on my offline web app during the cache load. I'm using this article. Here is "my" code : function updateCacheStatus(sStatus) { $('ul.events').append('&lt;li&gt;'+sStatus+'&lt;/li&gt;'); } window.applicationCache.onchecking = function () { updateCacheStatus('Checking validity.'); }; window.applicationCache.ondownloading = function () { updateCacheStatus('Downloading'); }; window.applicationCache.oncached = function () { updateCacheStatus('Cached'); }; window.applicationCache.onerror = function () { updateCacheStatus('Bug'); }; window.applicationCache.onupdateready = function () { window.applicationCache.swapCache(); updateCacheStatus('Updated'); }; window.applicationCache.onnoupdate = function () { updateCacheStatus('Offline OK'); }; window.applicationCache.onobsolete = function () { updateCacheStatus('Obsolete'); }; window.applicationCache.onprogress = function (oEvent) { if (oEvent.lengthComputable) updateCacheStatus('Loading...' + Math.round(oEvent.loaded / oEvent.total * 100) + '%'); else updateCacheStatus('Loading...'); }; This works fine on IE and Firefox, but when using Chrome the page is frozen during the cache load and updated only once the process is finished, all progress steps are displayed simultaneously at the end. Which would make the progress bar I wish to add completely useless :) I tried different things but no difference. Does someone has a clue about this ? Thanks in advance.
has comment: http://stackoverflow.com/comment/40966860
favorite count: 0
has title: Listening to offline application cache events
type: UnansweredQuestion
answer count: 0
score: 1
upvote count: 1
tagged with: html5-appcache
has comment: http://stackoverflow.com/comment/40956439
type: Question
tagged with: javascript
downvote count: 0

http://stackoverflow.com/a/26147500
has comment: http://stackoverflow.com/comment/40987448
upvote count: 0
answers question: http://stackoverflow.com/q/26147461
type: Answer
downvote count: 1
has comment: http://stackoverflow.com/comment/40987643
has body: Your script needs to return the width and it needs to be a function &lt;script&gt; var tam= function() { var j= $(window).width(); document.write(j) return $(window).width(); } var ntam = tam; &lt;/script&gt;
score: -1
has comment: http://stackoverflow.com/comment/40987647

http://stackoverflow.com/comment/41038758
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26175017
has text: I don't know why but your answer didn't work out very well. I check the element after creating it with Google Developer Tools but the element wasn't there.
type: Comment

http://stackoverflow.com/a/56438656
downvote count: 0
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/26079611
has body: In Typescript with relative path to the icon: import path from 'path'; route.get('/favicon.ico', (_req, res) =&gt; res.sendFile(path.join(__dirname, '../static/myicon.png')));
type: Answer

http://stackoverflow.com/a/26186965
type: Answer
has comment: http://stackoverflow.com/comment/41061307
has body: Found an working example, sends 1 get request each time. Coffee script: onEndless = -&gt; url = undefined $(window).off "scroll", onEndless url = $(".pagination a.next_page").attr("href") if url and $(window).scrollTop() &gt; $(document).height() - $(window).height() - 150 $(".loader").removeClass "hidden" $.getScript url, -&gt; $(window).on "scroll", onEndless else $(window).on "scroll", onEndless $(window).on "scroll", onEndless $(window).scroll() JS: var onEndless; onEndless = function() { var url; $(window).off('scroll', onEndless); url = $('.pagination a.next_page').attr('href'); // $('.pagination').hide(); if (url &amp;&amp; $(window).scrollTop() &gt; $(document).height() - $(window).height() - 150) { $('.loader').removeClass('hidden'); return $.getScript(url, function() { return $(window).on('scroll', onEndless); }); } else { return $(window).on('scroll', onEndless); } }; $(window).on('scroll', onEndless); $(window).scroll();
has comment: http://stackoverflow.com/comment/41061188
score: 0
answers question: http://stackoverflow.com/q/26186357

http://stackoverflow.com/q/26165048
has comment: http://stackoverflow.com/comment/41020320
type: Question
has answer: http://stackoverflow.com/a/26165097
has comment: http://stackoverflow.com/comment/41020396
has comment: http://stackoverflow.com/comment/41020570
tagged with: javascript
has comment: http://stackoverflow.com/comment/41020663
score: 0
answer count: 1
tagged with: jquery
has body: I'm creating a SPA which of course uses AJAX to dynamically load pages in a div. My layout is a side accordion menu where when you click on an item, it loads information on a div next to it. My problem is that if a person decides to click menu items as fast as they can per second, I start getting blank content in my pages. So my question is, what are some best practices (if any) to avoid pages breaking when you have people clicking so fast? Things I'm doing for performance: Using html templates and json files to build pages before application starts, keeping the (simple) pages in memory to grab - instead of calling ajax every click For now, on each click I'm using at clearTimeout and setTimeout set to some milliseconds to slow down the process of switching pages - not ideal Unfortunately, I can't post code because it's too long, but I'm hoping I can get some help with this information. Thanks guys! **Note: This is only front-end work, no databases because the load isn't heavy. EDIT: Here is a little snippet of my setTimeout and clearTimeout: if (clickTimeout) { clearTimeout(clickTimeout); } clickTimeout = setTimeout(function() { clickLink(menuItem.attr('href')); }, 500);
tagged with: ajax
has comment: http://stackoverflow.com/comment/41020441
has comment: http://stackoverflow.com/comment/41020700
tagged with: single-page-application
has comment: http://stackoverflow.com/comment/41020433
has title: Effectively and repeatedly updating DOM with data without breaking page
has comment: http://stackoverflow.com/comment/41020406
type: UnansweredQuestion

http://stackoverflow.com/comment/40782818
has text: I'm getting an error: Uncaught TypeError: string is not a function. According to the console, it is within the code: selectedOption && selectedOption.text(), I have a comma avert instead of semi colon as I have other fields as well. This error occurs after I click submit
comment on: http://stackoverflow.com/a/26035125
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26175144
has body: I have to get a picture in a modal just after its upload. So I'm opening a modal ($scope.openResizeModal()), and putting my picture in my scope. uploads.client.controller.js $scope.openResizeModal = function (flow) { $scope.pictureToCrop = {}; $scope.pictureToCrop = flow.files[0]; } Then I try to print in on my HTML view : resize-modal.client.view.html &lt;img-cropped src="{{pictureToCrop}}" selected='selected(cords)'&gt;&lt;/img-cropped&gt; And AngularJS tells : Error: [$interpolate:interr] Can't interpolate: {{pictureToCrop}} TypeError: Converting circular structure to JSON I even tried with a classic &lt;img src={{pictureToCrop}} /&gt; But it's the same. Here is my directive : angular.module('uploads').directive('imgCropped', function () { return { restrict: 'E', replace: true, scope: { src: '@', selected: '&amp;' }, link: function (scope, element, attr) { var myImg; var clear = function () { if (myImg) { myImg.next().remove(); myImg.remove(); myImg = undefined; } }; scope.$watch('src', function (nv) { clear(); if (nv) { element.after('&lt;img /&gt;'); myImg = element.next(); myImg.attr('src', nv); $(myImg).Jcrop({ trackDocument: true, onSelect: function (x) { scope.$apply(function () { scope.selected({ cords: x }); }); }, aspectRatio: 1/1.4 }, function () { // Use the API to get the real image size var bounds = this.getBounds(); pwGlobal.boundx = bounds[0]; pwGlobal.boundy = bounds[1]; }); } }); scope.$on('$destroy', clear); } }; }); Thanks all !
has comment: http://stackoverflow.com/comment/41041491
has answer: http://stackoverflow.com/a/26176654
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/26176654
tagged with: angularjs
has title: img ng-src : TypeError: Converting circular structure to JSON
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41040375
type: Question

http://stackoverflow.com/q/26124349
has body: I'm building a map using D3 here: http://generationone.kera.org/map/ I'm hoping to find some way to prevent wrapping around the canvas (especially off the top) . I tried a couple different threads on here about translating the path and similar with little luck... var origins = (function() { var origins = null; jQuery.ajax({ 'async': false, 'global': false, 'url': 'http://generationone.kera.org/map/json/labels.json', 'dataType': "json", 'success': function(data) { origins = data; } }); return origins; })(); var color = d3.scale.quantize().range(['rgb(254,237,222)', 'rgb(253,208,162)', 'rgb(253,174,107)', 'rgb(253,141,60)', 'rgb(230,85,13)', 'rgb(166,54,3)' ]).domain([1, 6]); var legend = d3.select('#legend').append('ul').attr('class', 'list-inline'); var keys = legend.selectAll('li.key').data(color.range()); keys.enter().append('li').attr('class', 'key').style('border-top-color', String) .text(function(d) { var r = color.invertExtent(d); /* return formats.percent(r[0]); */ console.log(d); if (d == "rgb(254,237,222)") { return "-..."; } else if (d == "rgb(166,54,3)") { return "...+"; } else { return "....."; } }); var tooltip = d3.select("body").append("div").style("position", "absolute").style( "z-index", "10").style("visibility", "hidden").text("EMPTY"); var currentWidth =jQuery('#map').width(); var width = 938; var height = 620; var projection = d3.geo.mercator() /* albers, mercator */ .scale(175).translate( [width / 2, height / 1.41]); var path = d3.geo.path().pointRadius(2).projection(projection); var svg = d3.select("#map").append("svg").attr("preserveAspectRatio", "xMidYMid").attr("viewBox", "0 0 " + width + " " + height).attr("width", currentWidth).attr("height", currentWidth * height / width); function loaded(error, countries, labels) { svg.append("g").attr("class", "countries").selectAll("path").data( topojson.feature(countries, countries.objects.countries).features ).enter().append("path").attr("class", function(d) { return d.properties.name; }).attr("d", p…
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40944833
has comment: http://stackoverflow.com/comment/40945537
has comment: http://stackoverflow.com/comment/40945131
has comment: http://stackoverflow.com/comment/40944972
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40945327
has comment: http://stackoverflow.com/comment/40944804
has comment: http://stackoverflow.com/comment/40944651
answer count: 0
has comment: http://stackoverflow.com/comment/40947607
has comment: http://stackoverflow.com/comment/40944836
type: Question
has title: D3 Prevent Path Wrap

http://stackoverflow.com/comment/43915842
has text: @obiwahn You can pick out some of the packages which looks not so well maintained and search for the old function on GitHub. You may even want to make a revision and do a pull request.
type: AnswerComment
comment on: http://stackoverflow.com/a/26101962
type: Comment
score: 1

http://stackoverflow.com/q/26085305
possible better answer: http://stackoverflow.com/a/26227186
has answer: http://stackoverflow.com/a/26227186
has answer: http://stackoverflow.com/a/26365902
has comment: http://stackoverflow.com/comment/40894338
downvote count: 0
has body: Interesting turn of events here. I put together an external application which loads with the web page which works fine. HOWEVER, when I establish an instance of CKEDITOR it breaks. Chrome spits out an error: Uncaught TypeError: undefined is not a function Please note that the undefined error is coming back on the following function in my code: URL.createObjectURL(); Anyway, here is how I am establishing an instance of the editor. It should be noted that if I remove this piece of code, my js applet works fine. jQuery(document).on("click", "#<?=$this->c_id;?>-launch-editor-<?php echo $this->section_num; ?>", function(){ //contentEditor.html(""); contentEditor.hide(); jQuery(".editor").append(' Title: <?php echo $this->section_title; ?> <img id="close-<?=$this->c_id;?><?php echo $this->section_num; ?>" class="editor" src="../skins/blues/images/red-ex.png" title="Close" /> <textarea class="editor-area" id="<?php echo $this->c_id; ?>-<?php echo $this->section_num; ?>-editor" name="<?php echo $this->section_num; ?>-editor"> '+innerTextArea+' '); contentEditor.fadeIn(1500); CKEDITOR.replace(' <?php echo $this->c_id; ?>-<?php echo $this->section_num; ?>-editor', { toolbar : 'Full', width : "1020px", codeSnippet_theme: 'monokai_sublime' }); CKEDITOR.on( 'instanceReady', function( ev ) { alert("CKEditor is loaded"); }); }); This piece of code is what is causing the issue... removing this code allows everything else to work fine: CKEDITOR.replace('<?php echo $this->c_id; ?>-<?php echo $this->section_num; ?>-editor', { toolbar : 'Full', width : "1020px", codeSnippet_theme: 'monokai_sublime' }); Below is how I am including my external js file. This is what stops working when ckeditor is loaded: <?php echo $this->section_title; ?> <div class="launch-content-editor" id="<?=$this->c_id;?>-launch-editor-<?=$sectionNumber;?>" title="Launch Content Editor"><?php echo $contentStatus; ?> <div class="launch-content-recorder" id="<?=$this->c_id;?>-launch-recorder-<?=$sectionNumber;?>" tit…
has comment: http://stackoverflow.com/comment/40904005
linked to: http://stackoverflow.com/q/24500525
favorite count: 0
has comment: http://stackoverflow.com/comment/41090373
has comment: http://stackoverflow.com/comment/40902021
has comment: http://stackoverflow.com/comment/40958933
has comment: http://stackoverflow.com/comment/41388855
has comment: http://stackoverflow.com/comment/40912468
has comment: http://stackoverflow.com/comment/40901561
has comment: http://stackoverflow.com/comment/40900066
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40959029
accepted answer: http://stackoverflow.com/a/26365902
has title: CKEditor breaking my other js app, how to load my own js file
has comment: http://stackoverflow.com/comment/41124797
has comment: http://stackoverflow.com/comment/41126868
has comment: http://stackoverflow.com/comment/41130945
has comment: http://stackoverflow.com/comment/41157170
has comment: http://stackoverflow.com/comment/41126171
type: Question
upvote count: 4
answer count: 2
tagged with: zend-framework
has comment: http://stackoverflow.com/comment/41155299
has comment: http://stackoverflow.com/comment/41128549
tagged with: javascript
tagged with: ckeditor
tagged with: jquery
score: 4

http://stackoverflow.com/comment/79305244
has text: it will be `null` before react component did mount!
type: Comment
type: AnswerComment
score: 4
comment on: http://stackoverflow.com/a/26107174

http://stackoverflow.com/q/26100237
has body: I use javascript function for each menu and call that function onClick event. What i face is the image is not changing smoothly, Some times its loading slowly. Lets consider 2 links each link calls a function for changing the background of the body This is how i change now function events(){ $("body").css('background-image','url(./wp-content/Uploads/img3.jpg)'); } function projects(){ $("body").css('background-image','url(./wp-content/Uploads/img2.jpg)'); return false; } HTML Projects Events So when i click the menu it must transform like fade out or something smoothly not like flashing
type: Question
score: 0
answer count: 2
tagged with: jquery
has comment: http://stackoverflow.com/comment/40901190
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/17825194
tagged with: css
has answer: http://stackoverflow.com/a/26100606
type: UnansweredQuestion
has title: Change background image of the site for each navigation menu smoothly using jquery
tagged with: javascript
has answer: http://stackoverflow.com/a/26100650

http://stackoverflow.com/comment/40864502
has text: preciseDiff() is a function in readable-range.js whish is a moment.js plugin to display human-readable date/time ranges http://codebox.org.uk/pages/moment-date-range-plugin
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26079602
type: Comment

http://stackoverflow.com/q/26057498
upvote count: 1
tagged with: node.js
score: 1
type: Question
has body: How can I get data from only tags from http get request's response body in node js. Can I get something like findByElementName or something similar?
downvote count: 0
tagged with: javascript
has title: NodeJs: Extract data from particular tag from body of response
has answer: http://stackoverflow.com/a/26057527
answer count: 1
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/26149816
has comment: http://stackoverflow.com/comment/40994247
score: 1
upvote count: 1
has body: Here is a nice resource which will help to find out response body. As I can see from test response generated there, there is no moviematches property. You need resp.results which is just a collection (array) of objects (movies I guess). So you need to change your code to: var api = 'a8f7039633f206xx42cd8a28d7cadad4'; autocompleteRemote = new Backbone.AutocompleteList({ url: function() { return 'http://api.themoviedb.org/3/search/movie?api_key=' + api + '&' + $.param({query: $('form#autocomplete-remote input[name=search]').val()}) }, filter: null, el: $('form#autocomplete-remote input[name=search]'), template: _.template( ' <%= name.replace(new RegExp("(" + $("form#autocomplete-remote input[name=search]").val() + ")", "i") ,"$1") %> ' ), delay: 500, minLength: 3, value: function(model) { return model.get('name') } , }).resultsView.collection.parse = function(resp) { return resp.results; }; I tried to make a comment but it became an answer :) Edit: Use this fiddle for tests. Place correct API_KEY and try again. I have tried with your existing api_key, but it's invalid.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41009578
accepted answer of: http://stackoverflow.com/q/26137884
answers question: http://stackoverflow.com/q/26137884
type: Answer

http://stackoverflow.com/a/26071840
has body: Use a Key-Value like: window.search['key'] = value; I think you want something like this: window.search = {}; window.search['location'] = 'New Delhi'; console.log( window.search );
answers question: http://stackoverflow.com/q/26071755
has comment: http://stackoverflow.com/comment/40849763
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40850353
downvote count: 0

http://stackoverflow.com/comment/40895370
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26096905
score: 0
has text: @TusharRaj Could you please explain?

http://stackoverflow.com/comment/41070446
score: 0
has text: Could you show the relevant HTML? And explain the expected interaction(s), and which elements should be clicked to reveal their `id`s?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26192072

http://stackoverflow.com/q/26187141
has title: Issue on Loading a Div entire content to New Div
tagged with: javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/41061531
has answer: http://stackoverflow.com/a/26187212
answer count: 2
tagged with: jquery
has body: Can you please take a look at this demo and let me know why I am not able to load the #source div into #target div? A B C
favorite count: 0
accepted answer: http://stackoverflow.com/a/26187224
type: AnsweredQuestion
score: 2
possible better answer: http://stackoverflow.com/a/26187212
downvote count: 0
has comment: http://stackoverflow.com/comment/41061602
has comment: http://stackoverflow.com/comment/41061515
has answer: http://stackoverflow.com/a/26187224
type: Question

http://stackoverflow.com/comment/40953654
has text: Oh, but I can hit the check box.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26128933
type: Comment

http://stackoverflow.com/comment/41086206
has text: mmm you're right. I guess I didn't drink my coffee properly yesterday morning :) How come the person asking the question isn't accepting one answer and asking several times for the same question ?
type: Comment
comment on: http://stackoverflow.com/a/26191113
score: 0
type: AnswerComment

titanium
type: Tag
tags question: http://stackoverflow.com/q/26110112
tags question: http://stackoverflow.com/q/26112012
tags question: http://stackoverflow.com/q/26171373
tag name: titanium
tags question: http://stackoverflow.com/q/26164537
tags question: http://stackoverflow.com/q/26101694
tags question: http://stackoverflow.com/q/26094486
tags question: http://stackoverflow.com/q/26163719
tags question: http://stackoverflow.com/q/26134186
tags question: http://stackoverflow.com/q/26086633
tags question: http://stackoverflow.com/q/26062508
tags question: http://stackoverflow.com/q/26132931

http://stackoverflow.com/comment/41050519
has text: I've seen that solution. Why is it that "\n" acts as a space in the output, though?
comment on: http://stackoverflow.com/q/26181451
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/43180619
answers question: http://stackoverflow.com/q/26063480
has body: You can create multiple config objects in webpack.config.js file: const config1 = { target: 'web', ... } const config2 = { target: 'node', ... } export default [config1, config2]
downvote count: 0
score: 1
upvote count: 1
type: Answer

http://stackoverflow.com/comment/40960661
type: QuestionComment
comment on: http://stackoverflow.com/q/26131720
score: 0
type: Comment
has text: The code in your fiddle is plagued with errors. Have you attempted to test/debug it? For starters, why are you using `form_data.form_data` instead of just `form_data`?

http://stackoverflow.com/a/26044841
score: 0
has body: To be perfectly honest, I'm not entirely sure how you were trying to make this happen, but I think I understand what you wanted to have happen. Give this a try: window.onload = function() { var h, m, s; document.getElementById('twelveHrs').style.display = 'none'; document.getElementById('twentyFourHrs').style.display = 'none'; getTwelveHrs(); getTwentyFourHrs(); function getTwelveHrs() { var tag = 'AM'; checkTime(); if(h > 12) { h -= 12 tag = 'PM'; } document.getElementById('twelveHrs').innerHTML = h + ':' + m + ':' + s + ' ' + tag; t = setTimeout(function() { getTwelveHrs() }, 1000); } function getTwentyFourHrs() { checkTime(); document.getElementById('twentyFourHrs').innerHTML = h + ':' + m + ':' + s; var t = setTimeout(function() { getTwentyFourHrs() }, 1000); } function checkTime() { var today = new Date(); h = today.getHours(); m = today.getMinutes(); s = today.getSeconds(); if(h < 10) h = '0' + h; if(m < 10) m = '0' + m; if(s < 10) s = '0' + s; return h, m, s; } } function displayTwelveHrs() { document.getElementById('twentyFourHrs').style.display = 'none'; document.getElementById('twelveHrs').style.display = ''; } function displayTwentyFourHrs() { document.getElementById('twelveHrs').style.display = 'none'; document.getElementById('twentyFourHrs').style.display = ''; } Then replace your HTML with: 12 Hour Format 24 Hour Format Basically, when the page loads, it'll start the clocks and hide the corresponding div tags. Then you click a button, it will then display the div you want while hiding the other. A working JSFiddle can be found at: http://jsfiddle.net/fp3Luwzc/
type: Answer
answers question: http://stackoverflow.com/q/26043820

http://stackoverflow.com/q/26049261
downvote count: 4
has comment: http://stackoverflow.com/comment/40808060
has comment: http://stackoverflow.com/comment/40812012
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40808612
score: -3
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
has body: I'm beginner with JSON and I'm very confused with this. I have to convert any valid JSON string into valid HTML string to be able to visualize JSON on the web. jsonToHtml(“[{‘x’: 1, ‘b’: 2}, {‘x’: 100, ‘b’: 200}]") =&gt; “x:1x:100" Thank you guys.
type: Question
has answer: http://stackoverflow.com/a/26050006
linked to: http://stackoverflow.com/q/1219860
answer count: 2
has answer: http://stackoverflow.com/a/26049333
tagged with: javascript
has title: Json to Html (No third party libraries)

http://stackoverflow.com/a/27176741
type: Answer
answers question: http://stackoverflow.com/q/26058599
upvote count: 1
score: 1
downvote count: 0
has body: You need to use your object _ouibounce to call the fire() function on: _ouibounce.fire(); and not the jQuery object. And it needs to be a global object if you define it at jQuery.ready(), so no "var" before. But i think this is a bug in the current version (0.0.10). I hope this helps.

http://stackoverflow.com/comment/41049974
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26181159
has text: Returns empty string `window.alert("ready state: "+xmlhttpget.readyState+" // status: "+xmlhttpget.status+" Status text: "+xmlhttpget.statusText);`

http://stackoverflow.com/q/26192826
tagged with: ruby-on-rails
type: AnsweredQuestion
has title: Confused about how to use vanilla JavaScript with Ruby on Rails
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26192901
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26192901
answer count: 2
has answer: http://stackoverflow.com/a/26192993
downvote count: 0
favorite count: 0
has body: I have two views, one called dashboard and the other called home, both have their respective index.htm.erb files. The corresponding JavaScript files in the assets/javascripts folder do not seem to map to these views. For example, when I run an alert in home.js and then navigate to dashboard.html.erb the alert still runs. How do I remedy this to get the functionality I am looking for? I am confused as to how to write page specific raw JavaScript in Rails. Edit: I could use the public folder but I had some ancillary issues with that and hence why I started using the files in the assets folder.
accepted answer: http://stackoverflow.com/a/26192993

http://stackoverflow.com/q/26159919
has body: I am creating a website and have some Div tags that contain pictures. I also have a Content Div that serves to give description for each image. However, when an picture is selected (like a roll over image). I would like for the Content Div to display the description for the relevant image. Can you help me guys?
has comment: http://stackoverflow.com/comment/41010369
has answer: http://stackoverflow.com/a/26160088
favorite count: 0
has title: Can I Make Content Appear Within a Div; When a Separate Div is Hovered Over With The Cursor?
has answer: http://stackoverflow.com/a/26160135
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41010240
possible better answer: http://stackoverflow.com/a/26160135
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26160088
has comment: http://stackoverflow.com/comment/41010116
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41028689
answer count: 2
tagged with: tags
tagged with: javascript
tagged with: title
tagged with: image
score: 0

http://stackoverflow.com/comment/40844255
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26068609
has text: It is really simple. In the script file, just add this: $(function(){ $("#popupholder").load("path/to/file.html"); }); And have a div with an id="popupholder" in the place of the current bigger HTML. The script will load the HTML from the given file into that div.
type: AnswerComment

http://stackoverflow.com/comment/40828762
score: 1
has text: check this url http://jsfiddle.net/fmh055jn/ it is also dynamic, It is working fine. Check the generated html after javascript.
comment on: http://stackoverflow.com/q/26060666
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26176519
has answer: http://stackoverflow.com/a/60296957
tagged with: javascript
has body: I'm making my first step in ReactJS and trying to understand communication between parent and children. I'm making form, so I have the component for styling fields. And also I have parent component that includes field and checking it. Example: var LoginField = React.createClass({ render: function() { return ( <MyField icon="user_icon" placeholder="Nickname" /> ); }, check: function () { console.log ("aakmslkanslkc"); } }) var MyField = React.createClass({ render: function() { ... }, handleChange: function(event) { // call parent! } }) Is there any way to do it. And is my logic is good in reactjs "world"? Thanks for your time.
has title: ReactJS call parent method
has answer: http://stackoverflow.com/a/53678175
has answer: http://stackoverflow.com/a/77582974
has answer: http://stackoverflow.com/a/57979055
upvote count: 182
downvote count: 0
answer count: 7
favorite count: 0
score: 182
has answer: http://stackoverflow.com/a/26180068
has answer: http://stackoverflow.com/a/52692190
possible better answer: http://stackoverflow.com/a/26180068
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/41660495
tagged with: reactjs
accepted answer: http://stackoverflow.com/a/52692190

http://stackoverflow.com/comment/41025026
has text: Relevant docs: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement.tabIndex
comment on: http://stackoverflow.com/q/26167462
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/a/26115969
answers question: http://stackoverflow.com/q/26115667
type: Answer
has body: function clickDisableFunction() { if (clickedOnce == true) { return false; }; clickedOnce = true; $("#clientListTable").css( "opacity":"0.6" ); document.getElementById('clientListTable').setAttribute("disabled","true") };
score: 0

http://stackoverflow.com/q/26129702
tagged with: ios8
type: Question
tagged with: mobile
tagged with: browser-feature-detection
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40955651
has body: With iOS8 out and now supporting live scroll events (hurray!), there is now a lot more reason to include scroll events on the mobile websites. I'm looking for a clean and simple way to detect if the browser has scroll events enabled or disabled, so that I can include fallbacks for browsers that don't support this glorious feature. The only way I have come up with so far is to start tracking the scroll with javascript and clock how many events are fired. There has to be a better way though.
favorite count: 0
answer count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40955127
has title: Detect if device has scroll events enabled
tagged with: scroll
score: 2

http://stackoverflow.com/q/26186308
has comment: http://stackoverflow.com/comment/41059815
has body: a bit confused here. I have an array that's full of answers to questions and am having trouble getting the link to appear as.. an actual link. I've tried document.write but it's just breaking my page. Any ideas? this.answer = [ 'answer1' + 'click here', 'answer 2', 'answer 3' ] I have no idea how to write the click here bit to get it to not appear as just a string of text instead of HTML. Any ideas? My array is in a Shadow DOM custom HTML5 element, also. I know how to target the shadow DOM, just not sure of the basic format.. Thanks! - Shan edit: Thanks for the response, mplungjan. Like this? this.answer = [ 'answer1' + innerHTML('click here'), 'answer 2', 'answer 3' ] this makes the entire thing appear blank on my page, however.. Think I'm formatting it wrong edit 2 okay trying to fix it based on the answers I got.. I tried this: var insertThis = document.getElementById('myElement').innerHTML = 'Click here'; this.answer = [ 'answer1' + insertThis, 'answer 2', 'answer 3' ] but it's still making my array totally blank :( sorry I am pretty new to arrays it is very confusing to me.. Do i need to put the entirety of my first array item in the innerHTML including the 'answer1' bit? edit it says that I cannot set innerHTML of null.. but when I console log my element right before I get the element by id it logs it fine.. hmm
accepted answer: http://stackoverflow.com/a/26186491
score: 4
upvote count: 4
has comment: http://stackoverflow.com/comment/41060446
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41060251
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41059947
favorite count: 0
possible better answer: http://stackoverflow.com/a/26186762
has comment: http://stackoverflow.com/comment/41059979
has comment: http://stackoverflow.com/comment/41060004
has answer: http://stackoverflow.com/a/26186762
type: Question
has title: how to insert an html link into an array string?
has answer: http://stackoverflow.com/a/26186491
answer count: 2

http://stackoverflow.com/a/26131695
downvote count: 0
has comment: http://stackoverflow.com/comment/40958606
has body: Here is the corrected code. You had some typos, missing colons and you are also posting this via form. You don't need that unless you are handling this info in a different page. Gross + Net Pay Gross + Net Pay Calculator Pay Rate: Hours Worked:
type: Answer
answers question: http://stackoverflow.com/q/26131577
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26131577
has comment: http://stackoverflow.com/comment/40958555
type: AcceptedAnswer

http://stackoverflow.com/comment/60251421
comment on: http://stackoverflow.com/q/26159321
score: 0
type: Comment
type: QuestionComment
has text: Short answer? [No.](https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_arbitrary_data)

http://stackoverflow.com/comment/40868202
comment on: http://stackoverflow.com/q/26082005
score: 0
type: Comment
type: QuestionComment
has text: @Pawan you are define your $packages before your query so its insert packages correctly. So you need to also defined your $cloths and $totamt before your query run.

http://stackoverflow.com/comment/41000617
score: 1
has text: You could make the `.tag` class `display: inline-block` with no float and then you wont have to clear any floats. [Like this example](http://jsbin.com/cuweru/1/edit)
comment on: http://stackoverflow.com/a/26154643
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26256551
type: Answer
answers question: http://stackoverflow.com/q/26142714
score: 0
has body: add prependId="false" to your h:form. in this case, by default, form id (something like j_idt..., which is automatically set by jsf) is prepended to all the component ids nested in your form. so your actual h:inputText id is not "check". you can see that if you inspect html source of your page.

http://stackoverflow.com/comment/40936198
score: 0
type: AnswerComment
has text: That works too, but make sure to clear your intervals when you're done validating.
type: Comment
comment on: http://stackoverflow.com/a/26118232

http://stackoverflow.com/q/26077283
tagged with: highcharts
has title: HighChart and spline: dataGrouping not working
tagged with: javascript
score: 0
answer count: 2
has body: I have a chart of type spline, that shows a discrete curve. Some of datapoints of this chart are very far each other, some other are very close. I would like to use dataGrouping options to group automatically the points that are very close. The objective is to aggregate the close points (for example I would like to show the average per week, now the points are per day) so they do not appear too close each other. So I setted dataGrouping up in this way plotOptions: { spline: { dataGrouping: { approximation: 'average', forced:false, units: [ ['week', [1]] ], enabled: true }, }, ... } but it does not work. What is wrong in this setting?
tagged with: grouping
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26098280
has answer: http://stackoverflow.com/a/26097954
type: Question
tagged with: charts

http://stackoverflow.com/comment/40903748
type: Comment
has text: sorry, I do not understand the question.
comment on: http://stackoverflow.com/a/26101452
type: AnswerComment
score: 0

http://stackoverflow.com/q/26133135
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26163155
tagged with: ember.js
has body: I'm using ember's query parameters to filter a results list by a type of layout. I'd like to check whether the specified query is in availableLayouts. I know I can check whether the value is in this array, but I'm not sure at what point ember sets the "layout" parameter. Is there a method or action that is called where I can override the set call to make sure it exists in availableLayouts? queryParams: ['filter', 'layout'] layout: 'grid' availableLayouts: ['grid', 'list']
has answer: http://stackoverflow.com/a/26163155
type: AnsweredQuestion
type: Question
has title: Query param allowed values in emberjs

http://stackoverflow.com/comment/40813433
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26052282
type: AnswerComment
has text: , and - should also take.

http://stackoverflow.com/a/26056524
downvote count: 0
answers question: http://stackoverflow.com/q/26056295
score: 1
upvote count: 1
type: Answer
has body: That's how I would do: if (seriesData) { var mockdata = []; for (var i = 0, j = 1; j &lt; seriesData.length; i++, j++) { var data = {}; if ((seriesData[j]) &amp;&amp; (seriesData[i].startDayID) == (seriesData[j].startDayID)) { data.feederId = seriesData[i].feederId; data.servicePointEventLowCount = seriesData[i].servicePointEventCount; data.servicePointEventHighCount = seriesData[j].servicePointEventCount; data.startDayID = seriesData[i].startDayID; i++; j++; } else { data = seriesData[i]; } mockdata.push(data); } } Please consider to test the array length >= 2 before running the for. Test it in this snippet // Code goes here var seriesData = [{ feederId: "PTS113T", businessEventCode: "LowVoltage", servicePointEventCount: 6, startDayID: 20130812, }, { feederId: "PTS113T", businessEventCode: "HighVoltage", servicePointEventCount: 2, startDayID: 20130812, }, { feederId: "PTS113T", businessEventCode: "LowVoltage", servicePointEventCount: 7, startDayID: 20130814, }, { feederId: "PTS113T", businessEventCode: "HighVoltage", servicePointEventCount: 5, startDayID: 20130815, }]; if (seriesData) { var mockdata = []; for (var i = 0, j = 1; i &lt; seriesData.length; i++, j++) { var data = {}; if ((seriesData[j]) &amp;&amp; (seriesData[i].startDayID) == (seriesData[j].startDayID)) { data.feederId = seriesData[i].feederId; data.servicePointEventLowCount = seriesData[i].servicePointEventCount; data.servicePointEventHighCount = seriesData[j].servicePointEventCount; data.startDayID = seriesData[i].startDayID; i++; j++; } else { data = seriesData[i]; } mockdata.push(data); } console.log(mockdata); }

http://stackoverflow.com/a/26047931
has comment: http://stackoverflow.com/comment/44830976
answers question: http://stackoverflow.com/q/26047619
downvote count: 1
score: -1
has comment: http://stackoverflow.com/comment/40805646
upvote count: 0
type: Answer
has body: This works fine, does that help? setTimeout(function() {document.getElementById("toto").style.opacity = "1";},500); #toto { transition: opacity 5s; opacity: 0; }

http://stackoverflow.com/q/26146631
answer count: 0
has title: karma-coverage breaking module loading when used with requirejs and karma
type: Question
tagged with: istanbul
has body: When using the coverage reporter with karma and requirejs, I am running into issues with loading one of my modules. More specifically, the module being loaded in is throwing the rather cryptic error message shown below: After some digging around, I isolated the problem to the following statement in the module code that is generated by Karma/Istanbul: If I remove the App.Controller module from the coverage report, all works as expected. There is nothing extraordinary about the module itself and even returning a blank object as the module will cause the error to be thrown and the tests to fail. I am currently running karma using the following dependencies: "karma-safari-launcher": "~&gt; 0.1.1", "karma-ievms": "~&gt; 0.0.4", "karma": "~&gt; 0.12.16", "karma-cli": "~&gt; 0.0.4", "karma-coverage": "~&gt; 0.2.1", "karma-requirejs": "~0.2.1", "phantomjs": "~1.9.7-5", "karma-phantomjs-launcher": "~0.1.4", "karma-chrome-launcher": "~0.1.3", "karma-firefox-launcher": "~0.1.3", "karma-jasmine": "~&gt; 0.1.0", "karma-osx-reporter": "~&gt; 0.1.0" and my karma.conf looks like this: (function () { 'use strict'; module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', 'requirejs'], reporters: ['progress', 'coverage'], browsers: ['Chrome'], autoWatch: true, logLevel: config.LOG_INFO, colors: true, captureTimeout: 60000, singleRun: false, runnerPort: 9100, port: 9456, hostname: 'localhost', preprocessors: { "src/Apps/Signup/Slim_Account/**/*.js": ['coverage'], "src/Apps/Signup/Slim_Account/*.js": ['coverage'] }, coverageReporter: { type: 'lcov', dir: 'coverage/' }, files: [ // Deps { pattern: 'libs/**/*.js', included: false }, { pattern: 'bootstrap/**/*.js', included: false }, { pattern: 'src/**/*.svg', included: false }, { pattern: 'src/**/*.html', included: false }, { pattern: 'test/**/*.html', included: false }, { pattern: 'src/**/*.json', included: false }, { pattern: 'test/**/*.json', included: false }, 'test/libs/velesin-jasmine-jquery/lib/jasmin…
tagged with: javascript
linked to: http://stackoverflow.com/q/26471962
tagged with: gruntjs
score: 0
has comment: http://stackoverflow.com/comment/41079501
type: UnansweredQuestion
tagged with: requirejs
has comment: http://stackoverflow.com/comment/50893980
tagged with: karma-runner

http://stackoverflow.com/q/26171646
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41032523
tagged with: http://stackoverflow.com/tag/html
has body: Hey guys I am trying to create a JavaScipt function that when called will print the value created by the claclBMI() function. I feel that having the first function do the calculations for the BMI is correct. Is there anyway to make the button print the result of the calcBMI function? Body Mass Index Weight in Pounds Height in Inches Body Mass Index Calculate BMI
accepted answer: http://stackoverflow.com/a/26171758
has comment: http://stackoverflow.com/comment/41032513
has title: Make a JavaScript button print a value
possible better answer: http://stackoverflow.com/a/26171703
has comment: http://stackoverflow.com/comment/41032548
has answer: http://stackoverflow.com/a/26171703
type: AnsweredQuestion
tagged with: javascript
type: Question
has answer: http://stackoverflow.com/a/26171758

http://stackoverflow.com/a/26094411
upvote count: 71
type: Answer
has comment: http://stackoverflow.com/comment/40891300
answers question: http://stackoverflow.com/q/26094383
score: 71
has body: Use the pointer-events CSS property : myElement { pointer-events: none; } Do note browser compatibility: http://caniuse.com/#feat=pointer-events
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26094383
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/58821803

http://stackoverflow.com/q/26065319
tagged with: javascript
answer count: 1
tagged with: asp.net
has answer: http://stackoverflow.com/a/26066151
score: 0
has body: Follow my previous help in stackoverflow on discussion: Show a div in asp.net on condition I have an ASP.NET page wiich include a webform in HTML has javascript code set cookie. (I know the javascript is setting the cookies because I can see them in google chrome with the combination of ctrl+shift+I ). I wrote in the code behind this solution in order to show/not show the form based on the value cooke set or not: protected void Page_Load(object sender, EventArgs e) { HttpCookie myCookie = new HttpCookie("tempcookieforclose"); myCookie = Request.Cookies["tempcookieforclose"]; // Read the cookie information and display it. if (myCookie != null) webform.Visible = false; else webform.Visible = true; That does not work. As well is not working this exemple that show if cookie name are set in the output: HttpCookie myCookie = new HttpCookie("MyTestCookie"); myCookie = Request.Cookies["MyTestCookie"]; // Read the cookie information and display it. if (myCookie != null) Response.Write("&lt;p&gt;"+ myCookie.Name + "&lt;p&gt;"+ myCookie.Value); else Response.Write("not found"); (I changed MyTestCookie with the name of "mycookie") as well I post the function the sets cookie for my webform: function tempcookie() { days = 1; // number of days to keep the cookie myDate = new Date(); myDate.setTime(myDate.getTime() + (days * 24 * 60 * 60 * 1000)); document.cookie = 'cookieName=cookieclose; expires=' + myDate.toGMTString(); function permacookie() { days = 30; // number of days to keep the cookie myDate = new Date(); myDate.setTime(myDate.getTime() + (days * 24 * 60 * 60 * 1000)); document.cookie = 'cookieName=cookiesignup; expires=' + myDate.toGMTString(); }
has comment: http://stackoverflow.com/comment/40837733
accepted answer: http://stackoverflow.com/a/26066151
has title: Cookie (read with ASP:NET) (set with javascript)
type: AnsweredQuestion
tagged with: cookies
has comment: http://stackoverflow.com/comment/41050877
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/41039373
linked to: http://stackoverflow.com/q/26032196

http://stackoverflow.com/comment/40889040
type: AnswerComment
score: 0
type: Comment
has text: @AsifIqbal - I included a [screenshot](https://i.sstatic.net/T75OA.png) 6 comments before showing you the `target` attributes and you said there is no such attribute.
comment on: http://stackoverflow.com/a/26093028

http://stackoverflow.com/a/26051455
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40812204
has comment: http://stackoverflow.com/comment/40812055
has comment: http://stackoverflow.com/comment/40812100
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26051370
has comment: http://stackoverflow.com/comment/40812002
has body: If you want to remove the first 7 entries then try $("#dropDownDest option").slice(0, 7).remove(); The value attribute selector may not be working because, the attribute value might contain some additional character or something. Better than that, don't add them in the first place var xml = '<?xml version="1.0" encoding="utf-8"?> 1 Cell 2 Column 3 Xval 4 Yval 5 ColumnID(XXYY) 6 Lift 7 CellIndex(XXYYZZ) 8 10-1997 9 11-1997 10 12-1997 '; ps_data = $.parseXML(xml); var ps = $('#dropDownDest'); $('Name', ps_data).slice(7).each(function(i) { $(' ', { text: $(this).text(), value: $(this).prev('ID').text() }).appendTo(ps); }); --- Your value attribute selector is not working because ID is not a attribute of Name it is its previous sibling so var xml = '<?xml version="1.0" encoding="utf-8"?> 1 Cell 2 Column 3 Xval 4 Yval 5 ColumnID(XXYY) 6 Lift 7 CellIndex(XXYYZZ) 8 10-1997 9 11-1997 10 12-1997 '; ps_data = $.parseXML(xml); var ps = $('#dropDownDest'); $('Name', ps_data).each(function(i) { $(' ', { text: $(this).text(), value: $(this).prev('ID').text() }).appendTo(ps); }); $("#dropDownDest option[value='1']").remove();
answers question: http://stackoverflow.com/q/26051370
type: Answer

http://stackoverflow.com/comment/40839575
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26066188
has text: Thanks for doing the fiddle @Robbert
score: 0

http://stackoverflow.com/q/26094961
has body: I am using this plugin called Simple jQuery Circular Loading Bar with Percentage - Rotator http://www.jqueryscript.net/rotator/Simple-jQuery-Circular-Loading-Bar-with-Percentage-Rotator.html This plugin is using canvas tag to draw the circle which is drawn when the jquery function is called. How can I display the circle on the html page and only trigger the percentage loading bar once I call it in the jquery. Here is a jsFiddle example - http://jsfiddle.net/fegvc5h8/ and here is the code &lt;!--html--&gt; &lt;div id="rotator" style="height:100px;width:100px"&gt;&lt;/div&gt; //jquery $(window).load(function () { $("#rotator").rotator({ starting: 0, ending: 100, percentage: true, color: 'green', lineWidth: 7, timer: 10, radius: 40, fontStyle: 'Calibri', fontSize: '20pt', fontColor: 'darkblue', backgroundColor: 'lightgray', callback: function () { } }); });
has title: How to trigger a jquery loader using rotator.js
type: Question
answer count: 2
tagged with: canvas
has answer: http://stackoverflow.com/a/26095385
tagged with: javascript
tagged with: jquery
score: 0
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40891958
has answer: http://stackoverflow.com/a/26095759
type: UnansweredQuestion

http://stackoverflow.com/a/26193895
upvote count: 1
has body: window.innerHeight works perfectly. It gave me 455 when it was full screen and 340 when not full screen. Check for yourself - Type window.innerHeight when normal and then click F11 and then do the same. You'll see different value. So it does differ.
downvote count: 0
has comment: http://stackoverflow.com/comment/41073570
type: Answer
answers question: http://stackoverflow.com/q/26193879
score: 1

infinite-scroll
tag name: infinite-scroll
tags question: http://stackoverflow.com/q/26056253
type: Tag
tags question: http://stackoverflow.com/q/26121474
tags question: http://stackoverflow.com/q/26056928

http://stackoverflow.com/a/54743239
has body: This piece of code works for me in TypeScript with protractor. import {browser} from 'protractor'; export class Browser { public async openPageInNewTab(url: string) { await this.createNewBrowserTab(); await this.switchToTabNumber(1); await browser.get(url); } public createNewBrowserTab() { browser.executeScript('window.open()'); } public async switchToTabNumber(number: number) { return browser.getAllWindowHandles().then(function (handles) { const newWindowHandle = handles[number]; browser.switchTo().window(newWindowHandle); }); } }
type: Answer
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26098593

http://stackoverflow.com/q/26077645
favorite count: 0
type: UnansweredQuestion
has body: I'm getting error in client server connection using WebSocket nodejs I'm using node-websocket-server https://github.com/miksago/node-websocket-server Error : WebSocket connection to 'ws://127.0.0.1:8000/' failed: Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing * Server code (server.js): var ws = require(__dirname + '/lib/ws/server'); var server = ws.createServer(); server.addListener("connection", function (conn) { console.log("A connection established with connection id "+ conn.id); var msg = "Welcome " + conn.id + " joining the party." + "Total connection : " + server.manager.length; server.broadcast(msg); }); server.listen(8000); console.log("Websocket server is running..."); console.log("Listening to port 8000"); Client code : var websock = {}; $(function(){ if(window["WebSocket"]){ websock.socket = new WebSocket("ws://127.0.0.1:8000"); websock.socket.onopen = function(e){ console.log("WebSocket connection established"); }; websock.socket.onmessage = function(e){ console.log(e.data); }; websock.socket.onclose = function(e){ console.log("WebSocket connection closed."); }; } }); index.html : WebSockets I dont know what's the problem here.Thanks in advance.
tagged with: node.js
answer count: 0
downvote count: 0
score: 1
type: Question
tagged with: javascript
has title: WebSocket error using nodejs
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
tagged with: websocket

http://stackoverflow.com/comment/41005211
has text: var children = xmlDoc2.get('Objects').childNodes(); children.forEach(function (child) { var whatid = child.attr('id').value(); console.log('wasd: ' + child); }); Cannot call method 'value' of null :/ Same with console.log(whatid)
type: Comment
comment on: http://stackoverflow.com/a/26157043
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40957440
has text: @undefined `attr("disabled", "disabled")` works for all jQuery versions.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26130652

http://stackoverflow.com/comment/41072789
comment on: http://stackoverflow.com/q/26193675
score: 0
has text: No, just a blank page
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26105139
score: 0
has comment: http://stackoverflow.com/comment/40910279
type: Answer
has body: I think you should replace the " with this &amp;quot; in this Q/A.js file for content this link has list the characters which http://www.ascii.cl/htmlcodes.htm check this example JS Fiddle
answers question: http://stackoverflow.com/q/26104954
has comment: http://stackoverflow.com/comment/40911008

http://stackoverflow.com/comment/41040074
comment on: http://stackoverflow.com/q/26175280
score: 0
type: Comment
type: QuestionComment
has text: to use Ajax. Hope this helps people in the future

http://stackoverflow.com/comment/40841140
comment on: http://stackoverflow.com/q/26067147
score: 1
has text: You can't. Why not just add properties to `Array.prototype`? It would have basically the same effect.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26162080
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41015158
score: 0
tagged with: asp.net
type: UnansweredQuestion
has body: I want to add items in a listbox with javascript or jQuery by clicking a button that executes a javascript function. This is what I have: function fctAjouter() { var lbxListe = document.getElementById('listBox'); var element1 = document.createElement("option"); element1.text = "element1"; element1.value = "element1"; alert(' coucou1 '); // COUOU1 S'AFFICHE lbxListe.options.add(element1); alert(' coucou2 '); // COUCOU2 NE S'AFFICHE JAMAIS } But this does not work. Please help me.
has answer: http://stackoverflow.com/a/26162716
has title: Add item to listbox with javascript in asp
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26162142

http://stackoverflow.com/a/26093122
has comment: http://stackoverflow.com/comment/40890477
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26091537
answers question: http://stackoverflow.com/q/26091537
has body: Please replace $ with jQuery in your script. This will solve your problem. You can refer this link: http://digwp.com/2011/09/using-instead-of-jquery-in-wordpress/
type: Answer
has comment: http://stackoverflow.com/comment/40890522
score: 1
has comment: http://stackoverflow.com/comment/40890383

http://stackoverflow.com/comment/40929506
comment on: http://stackoverflow.com/a/26115992
type: AnswerComment
score: 0
type: Comment
has text: Where should I put my .js file?

http://stackoverflow.com/q/26035638
has title: Allow my API to be access via AJAX
has comment: http://stackoverflow.com/comment/40785554
type: Question
has comment: http://stackoverflow.com/comment/40782644
has comment: http://stackoverflow.com/comment/40783671
has answer: http://stackoverflow.com/a/26036862
tagged with: javascript
has comment: http://stackoverflow.com/comment/40782625
score: 0
has body: I have an API that fetches some date on the server. public function post_events() { header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: GET, POST'); header("Access-Control-Allow-Headers: X-Requested-With"); $city = Input::post('city','all'); $c = Model_chart::format_chart($city); return $this-&gt;response($c); } It works fine on usual curl methods. But I am trying to access it using $http on Angular.js and it gets me this error. XMLHttpRequest cannot load http://event.deremoe.com/vendor/events.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://app.event.chart' is therefore not allowed access. As you can see I already add the headers in the function. I also checked on curl and the header Access-Control-Allow-Origin is attached when I call the api. Is there something I am missing here? More Info: Here's the header information that is returned to me via normal curl. Remote Address:104.28.19.112:80 Request URL:http://event.deremoe.com/vendor/events.json Request Method:OPTIONS Status Code:404 Not Found Request Headersview source Accept:*/* Accept-Encoding:gzip,deflate,sdch Accept-Language:en-US,en;q=0.8 Access-Control-Request-Headers:accept, content-type Access-Control-Request-Method:POST Connection:keep-alive Host:event.deremoe.com Origin:http://app.event.chart Referer:http://app.event.chart/ User-Agent:Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36 Response Headersview source CF-RAY:16f687416fe30c35-SEA Connection:keep-alive Content-Encoding:gzip Content-Type:text/html; charset=UTF-8 Date:Thu, 25 Sep 2014 10:27:17 GMT Server:cloudflare-nginx Set-Cookie:__cfduid=d1a9e4283faacc0a2b029efef586b6b931411640837342; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.deremoe.com; HttpOnly Transfer-Encoding:chunked X-Powered-By:PHP/5.4.30
tagged with: cors
has comment: http://stackoverflow.com/comment/40783419
linked to: http://stackoverflow.com/q/21792759
answer count: 1
has comment: http://stackoverflow.com/comment/40783380
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40783111
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40783743
tagged with: php
has comment: http://stackoverflow.com/comment/40782859
tagged with: fuelphp

http://stackoverflow.com/q/26168861
has title: react.js: events instead of passing handler in props
type: Question
tagged with: javascript
has body: In React.js, the parent component passes the handler to update its state via props. In deeply nested components, this can become pretty messy. Is there a way to do this via pub-sub - the parent listens for an event, and executes the handler when it gets fired by the child? PS: got the idea from Ractive.js (http://docs.ractivejs.org/latest/components#events).
upvote count: 2
tagged with: reactjs
answer count: 1
favorite count: 0
score: 2
has answer: http://stackoverflow.com/a/26168981
downvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/26192671
has body: As per the ECMA Script 5.1 Specification, property accessors are defined as MemberExpression . IdentifierName CallExpression . IdentifierName or the bracket notation: MemberExpression [ Expression ] CallExpression [ Expression ] So, when you use ., the following string will be treated as the actual property name. In this case, you don't have a property named property. That is why you are getting undefined. When you use a bracket, the expression within the brackets will be evaluated to get the actual property name and then the property will be accessed. That is why it works when you use bracket notation.
has comment: http://stackoverflow.com/comment/41071213
accepted answer of: http://stackoverflow.com/q/26192634
answers question: http://stackoverflow.com/q/26192634
type: Answer
score: 2
upvote count: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26185845
downvote count: 0
has comment: http://stackoverflow.com/comment/41099245
has title: Angular JS breaking two way binding on isolate scope when binding to a primitive and using ng-include to dynamically load a template
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: templates
answer count: 0
has comment: http://stackoverflow.com/comment/41132373
score: 1
upvote count: 1
type: Question
has body: I have a bit of a strange scenario that is a little different to the other childscope and two way binding issues I have seen on Stackoverflow. I have a field generation directive that receives a configuration object and some data and dynamically creates the correct type of field on screen and populates the data. directive.js .directive('myField', function () { var stringTemplate = "scripts/directives/templates/my-string.tpl.html"; var textTemplate = "scripts/directives/templates/my-text.tpl.html"; var selectTemplate = "scripts/directives/templates/my-select.tpl.html"; var linker = function ($scope, elem, attrs) { // Function to dynamically select the correct template $scope.getTemplateUrl = function () { var template = ''; if ($scope.options) { if ($scope.options.optionList) { template = selectTemplate; } else { switch ($scope.options.type) { case 'String': template = stringTemplate; break; case 'Text': template = textTemplate; break; } } return template; } }; return { restrict: 'E', replace: true, scope: { options: '=', data: '=', fieldName: '@', fieldWidth: '@', labelWidth: '@', }, link: linker, template: '<ng-include src="getTemplateUrl()"/>' } }); I then have the corresponding template... I'm showing just the string template in this case. my-string.tpl.html {{options.label}} An example of how this might then be used would be controller.js $scope.person.firstName = "John"; $scope.person.lastName = "Doe"; $scope.options.person.firstName.type = "String"; index.html The problem is the usual one, my-field directive has an isolated scope with a "data" property that is two-way bound to the controller. Because I am then using ng-include to dynamically load the correct template I am creating a further child scope that due to prototypical inheritance still populates correctly as it doesn't have its own data property so reaches to the parent. However when I modify the field, a shadow property is created on my child scope called data that doesn't propagate upwards the way t…
tagged with: angularjs-directive
tagged with: javascript
has comment: http://stackoverflow.com/comment/41118681
has comment: http://stackoverflow.com/comment/41230068

http://stackoverflow.com/q/26107703
tagged with: extjs
has answer: http://stackoverflow.com/a/26107910
score: 0
has title: How to have a selected value in combobox when there's only one
tagged with: extjs4
answer count: 1
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26107910
tagged with: javascript
has body: I'm using ExtJS 4.2.1 and I know there is the autoSelect config option which will default to the first element of the combo's store. But what I'm looking for is perhaps through an override, do this only when there's only one item in the combobox's store. I thought of doing it at the store level, but then if I have 10 comboboxes in my app, that's 10 times the same bit of code... Any ideas ?

http://stackoverflow.com/comment/40820002
type: Comment
type: QuestionComment
has text: Opinion-based. However, unless "overloading" adds a *clear* advantage in terms of use (jQuery shows some good examples), use multiple methods *or* require the consume calls it appropriately. In this case I think it's a poor example because it is generally *not* appropriate to convert a non-sequence into a sequence automatically: I would require the consumer to pass an array, even for only one element.
score: 1
comment on: http://stackoverflow.com/q/26056092

http://stackoverflow.com/a/26077594
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26069544
score: 1
downvote count: 0
has body: Found it! define('UPLOAD_DIR', 'EventImages/'); $img = $_POST['imgBase64']; $img = str_replace('data:image/png;base64,', '', $img); $img = str_replace(' ', '+', $img); $data = base64_decode($img); $file = UPLOAD_DIR . uniqid() . '.png'; $success = file_put_contents($file, $data); print $success ? $file : 'Unable to save the file.'; $result=mysql_query("SELECT id FROM markers ORDER BY id DESC LIMIT 1"); while ($row = mysql_fetch_array($result)){ $LastInsertID=$row['id']; } $results = mysql_query("UPDATE markers SET PhotosEvent='".$file."' WHERE id = '".$LastInsertID."'"); now it works ok.. I am fetcing the last known id that is in table Markers and i save the image's url that is stored in variable $file in the database!! I also save the image to folder EventImages as i did before!!

http://stackoverflow.com/q/26119668
has comment: http://stackoverflow.com/comment/40935583
has comment: http://stackoverflow.com/comment/40936201
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/26120826
upvote count: 3
has comment: http://stackoverflow.com/comment/40935628
has comment: http://stackoverflow.com/comment/40936739
has title: Javascript Array loses content when passed to a function
answer count: 1
has body: Oops, it seems I was mistaken. As @MDeSchaepmeester & @charlietfl point out it should work, and I see now it does. The problem is now it is not rendering the DataTable. Any suggestions as to why it does not load into DataTables with no error are welcome!! Here's all the code as requested: function PartnerListSupportTickets() { jQuery("#loader").show(); var idOpen = 'tickets-tbl-open'; var idOnHold = 'tickets-tbl-on-hold'; var idDeferred = 'tickets-tbl-deferred'; var idClosed = 'tickets-tbl-closed'; var tblDataOpen = []; var tblDataOnHold = []; var tblDataDeferred = []; var tblDataClosed = []; var tblEmptyMsg = []; tblEmptyMsg.push({ ticket: 'No tickets available for this category', postcode: '-', state: '-', customer: '-', status: '-', priority: '-', fault: '-', category: '-', author: '-', owner: '-', age: '-', lastupdate: '-' }); var get_data_url = '/sma-php/gettickets.php?var=PARTCK&pid=' + sessionStorage.party_id; jQuery.getJSON( get_data_url, function( data ) { OpenNum = 0; OnHoldNum = 0; DeferredNum = 0; ClosedNum = 0; jQuery.each( data, function( i, d ) { var status = d.status; status = status.toLowerCase(); if(status == 'closed') { var now = moment(); var then = moment(d.create_date); d.days_age = now.diff(then, 'days'); }; switch(status) { case('open'): OpenNum = OpenNum + 1; tblDataOpen.push({ ticket: '' + d.short_title + '', postcode: d.postcode, state: d.state, customer: d.customer_name, status: d.status, priority: '' + d.priority + '', fault: d.fault_type, category: d.category, author: d.author_name, owner: d.owner_name, age: d.days_age, lastupdate: d.update_date }); break; case('on hold'): OnHoldNum = OnHoldNum + 1; tblDataOnHold.push({ ticket: '' + d.short_title + '', postcode: d.postcode, state: d.state, customer: d.customer_name, status: d.status, priority: '' + d.priority + '', fault: d.fault_type, category: d.category, author: d.author_name, owner: d.owner_name, age: d.days_age, lastupdate: d.update_date }); break; case('deferred'): DeferredNum = D…
tagged with: javascript
has comment: http://stackoverflow.com/comment/40937595
accepted answer: http://stackoverflow.com/a/26120826
has comment: http://stackoverflow.com/comment/40936184
has comment: http://stackoverflow.com/comment/40935622
type: AnsweredQuestion
score: 3
tagged with: arrays
downvote count: 0
tagged with: jquery

http://stackoverflow.com/comment/40968806
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26136727
has text: I think you may want this: http://stackoverflow.com/questions/16095155/javascript-contenteditable-set-cursor-caret-to-index
score: 0

http://stackoverflow.com/a/26046130
has body: You need to check what the style is current set to and act accordingly. If you can provide a jsfiddle, I can probably demo it for you. Something like below should work, assuming that you were able to hide the button already: if ( divstyle.display == 'none' ) { divstyle.display = 'block'; } else { divstyle.display = 'none'; }
accepted answer of: http://stackoverflow.com/q/26045408
answers question: http://stackoverflow.com/q/26045408
type: AcceptedAnswer
type: Answer
score: 0

http://stackoverflow.com/comment/40830544
score: 0
comment on: http://stackoverflow.com/a/26061002
type: Comment
type: AnswerComment
has text: Forgot to say that I'm currently trying the 2 big meshes, will report results when done =)

http://stackoverflow.com/q/26156003
has comment: http://stackoverflow.com/comment/41003209
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/41003220
has body: I am using this code but the stroke appears and directly disappears when I click: var tag = document.getElementById("tag"); function result() { $(tag.value).css('border','1px solid red'); } Show but when I change the event type to "onmouseover" , the stroke stays and doesn't disappear.
score: -1
tagged with: dom
has title: In JavaScript onClick: why stroke appears then disappears?
type: Question
has comment: http://stackoverflow.com/comment/41003142
has answer: http://stackoverflow.com/a/26156271
upvote count: 0
has comment: http://stackoverflow.com/comment/41003126
answer count: 1
has comment: http://stackoverflow.com/comment/41003236
tagged with: javascript
tagged with: event-handling
tagged with: dom-events
favorite count: 0

http://stackoverflow.com/comment/40788357
type: Comment
type: QuestionComment
has text: The answer is going to be most likely "no"
comment on: http://stackoverflow.com/q/26038906
score: 1

http://stackoverflow.com/q/26054691
has title: How to find all numbers in document and style them?
has answer: http://stackoverflow.com/a/26054801
possible better answer: http://stackoverflow.com/a/26054796
tagged with: colors
has answer: http://stackoverflow.com/a/26054796
has body: I'm currently working on a website (personal) where I'm using JavaScript to find all numbers in my .html file (actually just in the #wrapper div). I want them all to be colored after. My code looks as follows: window.onload=function(){ var str = document.getElementById("wrapper").innerHTML; var patt =/\d+/g; var res = str.match(patt); res = str.replace(patt, "&lt;span class='em'&gt;" + res + "&lt;/span&gt;"); document.getElementById("wrapper").innerHTML = res; window.alert(res) }; The result with this code is that every number gets replaced by a String containing every single number in the marked area in a row, which is obviously not what I want. I even tried it with a for-loop, but that didn't work either.
tagged with: regex
type: AnsweredQuestion
tagged with: numbers
accepted answer: http://stackoverflow.com/a/26054801
type: Question
tagged with: javascript
score: 0
answer count: 2

http://stackoverflow.com/comment/41043264
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26177707
type: AnswerComment
has text: if the example is right then what do you mean by poor example?

http://stackoverflow.com/comment/41031593
type: Comment
score: 2
has text: It's a functional programming concept called currying. The `add` or `sum` function is just a common example used to describe the concept. [search Google](https://www.google.com/#q=functional+javascript+currying)
type: QuestionComment
comment on: http://stackoverflow.com/q/26171119

http://stackoverflow.com/comment/40984594
type: Comment
has text: I know that it returns JSON. That's the reason for the error message the OP is getting. jQuery expects JSONP, not JSON.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26145889

http://stackoverflow.com/comment/41032081
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26152781
type: Comment
has text: ahah, the typos will be the death of us all !

http://stackoverflow.com/comment/40811498
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26034657
score: 0
has text: my lord, am I the only one who finds this incrementlessness unreadable?

http://stackoverflow.com/a/26049063
downvote count: 0
has comment: http://stackoverflow.com/comment/40809048
answers question: http://stackoverflow.com/q/26048791
has comment: http://stackoverflow.com/comment/40808677
has comment: http://stackoverflow.com/comment/40832424
has body: The problem is when you set the origin, because it expect to an object with x and y. Try: .origin(function(){ var t = d3.select(this); return { x: t.attr('x') , y: t.attr('y') } }) reference How to set the Origin (drag.origin) for drag behavior in d3 JavaScript library
has comment: http://stackoverflow.com/comment/40809786
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41250080
has comment: http://stackoverflow.com/comment/40809338

http://stackoverflow.com/comment/41052053
has text: That ended up not even opening up the popup.
type: Comment
comment on: http://stackoverflow.com/a/26167955
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41019901
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26164843
score: 0
has text: Please provide the error message that is occurring. Does it indicate the line where the problem is occurring?

http://stackoverflow.com/comment/41202398
type: Comment
has text: No - you have to consistently reference a property as quoted or unquoted. Let me expand the answer.
type: AnswerComment
comment on: http://stackoverflow.com/a/26183490
score: 0

http://stackoverflow.com/comment/138273179
type: Comment
has text: Yes, this was the solution for me. Put the script tag before the closing tag of body.
score: 1
comment on: http://stackoverflow.com/a/32164615
type: AnswerComment

http://stackoverflow.com/comment/41044858
type: Comment
comment on: http://stackoverflow.com/a/26178176
has text: True, the wording is to "bubble up", (i am sorry, i was so focused on writing a demo i forgot you said you know what it does :P) but for someone who are not used to work with event driven GUI it might be hard to understand that bubbling up means traversing "downwards" in your GUI (or towards the control-trees root). That's why i used quotation marks around it (and again, i was so into building a demo, i thought i had already named it bubble up once, it seems i had not :))
type: AnswerComment
score: 0

telerik
tags question: http://stackoverflow.com/q/26166065
tag name: telerik
tags question: http://stackoverflow.com/q/26035364
tags question: http://stackoverflow.com/q/26144956
type: Tag
tags question: http://stackoverflow.com/q/26162732

http://stackoverflow.com/comment/41067891
score: 0
comment on: http://stackoverflow.com/q/26190706
type: Comment
type: QuestionComment
has text: what is the problem ? exactly

http://stackoverflow.com/a/26173542
has comment: http://stackoverflow.com/comment/41066157
has body: You have to create the event after the template is in the document. Site.Funcs.ajaxCall('social', q, function(data){ var html = Site.Funcs.templateCall(data); origin.tooltipster('content', html).data('ajax', 'cached'); origin.tooltipster('show'); $(document).delegate('button.icon', 'click', function(){ alert('icon!'); }); }); With your code the way it is the event is being created outside the asynchronous ajax call so it misses your tooltip so to speak.
has comment: http://stackoverflow.com/comment/41065557
answers question: http://stackoverflow.com/q/26173422
score: 0
type: Answer

http://stackoverflow.com/q/26173422
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I have tooltips (https://github.com/iamceege/tooltipster) that are generated via ajax requests that contain icons for the user to click. However, I cannot get the listeners to work when the event is fired. In the code below, I never get the alert popup. How can I get the events inside a tooltip? Here is how I'm initializing tooltipster: $('.share').tooltipster({ content: 'Loading...', contentAsHTML: true, interactive: true, position: 'bottom', trigger: 'click', functionBefore: function(origin, continueTooltip){ continueTooltip(); if(origin.data('ajax') !== 'cached'){ var id = $(this).attr('id'), datas = id.split('-'), type = $(this).attr('data-type'); if(type != 'pack' && type != 'life'){ type = 'event'; } var shareType = $(this).attr('data-share-type'), q = 'id='+datas[1]+'&t='+type+'&st='+shareType; Site.Funcs.ajaxCall('social', q, function(data){ var html = Site.Funcs.templateCall(data); origin.tooltipster('content', html).data('ajax', 'cached'); origin.tooltipster('show'); }); } } }); And this is the content that gets updated to the tooltip after the being parsed by Site.Funcs.templateCall(): And, lastly, the listener for the click event: $(document).delegate('button.icon', 'click', function(){ alert('icon!'); });
tagged with: tooltipster
has comment: http://stackoverflow.com/comment/41066399
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26173542
type: Question
score: 0
has title: events not captured within tooltip

http://stackoverflow.com/q/26188266
favorite count: 0
has title: How to speed up the force layout animation in d3.js
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41068923
has answer: http://stackoverflow.com/a/75344856
score: 14
upvote count: 14
type: Question
has answer: http://stackoverflow.com/a/49423603
downvote count: 0
has body: I am using D3.js for rendering about 500 nodes and links among them. It usually needs 10 seconds for the layout to settle down (the iteration to converge). How do I speed up the whole process,say, the nodes are moving 2x faster during animation. then the time will be 50% (The CPU time that used for the iteration should be much less than 10 seconds, but how can I reduce the animation time). I have tried: manually manage the tick() in a for loop with certain times, say, 100 times, it is faster, but the animation will be hidden from the user, which is a big loss. Increasing the link strength will be helpful, nodes will move much faster during animation. But the layout is very sensitive, any small drag might cause many nodes move. Any suggestions? Thanks.
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/26189110

http://stackoverflow.com/comment/40785499
score: 0
type: Comment
type: QuestionComment
has text: You can change the Zoom level so you dont see the world map 3 times. Like here i updated your [JSFiddle](http://jsfiddle.net/f9jxtt34/4/)
comment on: http://stackoverflow.com/q/26036488

http://stackoverflow.com/a/26593699
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26132552
score: 1
has body: This solution working for me. You need add this code scope in Backstretch.js $('body').wrapInner('&lt;div id="backstreach-fix" style="z-index: 1; position: relative;"&gt;'); in a.fn.backstretch after 0 === a(d).scrollTop() &amp;&amp; d.scrollTo(0, 0); I also need to change zIndex in this file. Find zIndex:-999998 and change to zIndex:1 Find zIndex:-999999 and change to zIndex:0
has comment: http://stackoverflow.com/comment/63828012
downvote count: 0

http://stackoverflow.com/q/26040750
has answer: http://stackoverflow.com/a/26043049
upvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: jsdom
has body: I have this piece of code: var jsdom = require('jsdom'); jsdom.env("http://sunwell.pl/index.php?id=ranking&amp;t=2vs2&amp;r=1", ['//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'], function(error, window){ if(error) {console.log(error); return;} var $ = window.$.bind(window); var _ladder = []; $("#rankingtable tr").each(function(i, v){ console.log('one more...'); _ladder[i] = []; $(this).children('td').each(function(ii, vv){ _ladder[i][ii] = $(this).text(); }); }); console.log(_ladder); window.close(); } ); http://pastebin.com/eS4xyDrD. Which well, works perfectly fine on my local machine(Windows), giving the expected 'one more..' text a few times and then the full array. The problem comes when I run it on my VPS(debian onboard) which outputs just an empty array. I checked if maybe my server could for some reasons not recive the jquery object or the site but everything seems just fine. I don't know how to fix this, thanks for any help I am pretty sure the issuse is banal.
downvote count: 1
type: Question
has title: My node app gives diffrent output on my vps(debian) then on my local machine(windows)
tagged with: javascript
score: -1

http://stackoverflow.com/a/26103313
answers question: http://stackoverflow.com/q/26101669
has comment: http://stackoverflow.com/comment/40934318
downvote count: 0
has body: Promise.all doesn't take a queue of functions to execute. It expects an array of promises which represent the results of the many concurrently running (still pending) requests. The first step is to have a function that actually returns a promise, instead of only executing a callback. We can use function parseWebsite(web) { return new Promise(function(fulfill, reject) { WebsitesUtils.parseWebsite(web, function (err, parsed) { if (err) reject(err); else fulfill(parsed); }); }); } or simply use promisification that does this generically: var parseWebsite = Promise.promisify(WebsitesUtils.parseWebsite, WebsitesUtils); Now we can go to construct our array of promises by calling that function for each site: var promises = []; _.each(webs, function (web) { promises.push(parseWebsite(web)); }); or just var promises = _.map(webs, parseWebsite); so that in the end we can use Promise.all, and get back our allParsed array (which even is in the same order as webs was!): Promise.all(promises).then(function(allParsed) { console.log(allParsed); }); Bluebird even provides a shortcut function so you don't need promises: Promise.map(webs, parseWebsite).then(function(allParsed) { console.log(allParsed); });
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26101669
type: Answer

http://stackoverflow.com/a/26059055
answers question: http://stackoverflow.com/q/26058738
has comment: http://stackoverflow.com/comment/40828167
has comment: http://stackoverflow.com/comment/40828222
type: Answer
has comment: http://stackoverflow.com/comment/40829307
has comment: http://stackoverflow.com/comment/40827887
has body: Use the following jquery: $("#datepicker").datepicker({ onClose : showday }); function showday() { day_no = new Date($(this).val()).getDay(); if(day_no == 0)//for sundays alert("It's sunday!"); //perform some action for Sunday } DEMO. EDIT: New DEMO.
has comment: http://stackoverflow.com/comment/40828359
score: 0

http://stackoverflow.com/a/26050570
has body: 1) Using the right ID's The id's of the quantity fields do not match with the getElementById in the function. It should start with "qty_", not directly the product code. Also, for the sake of regularity, change the id's in the &lt;input&gt;'s from "qty" to "qty_". 2) The right structure The html you use now, has double quantity and subtotal &lt;input&gt; fields with the same ID. This causes Javascript to be unable to access these values. Make sure you distinguish between the names and ID's of these input fields. PHP: $products = array( array("price"=&gt;10, "code"=&gt;"product1"), array("price"=&gt;25, "code"=&gt;"product2") ); foreach($products as $key =&gt; $productInfo) { /* echo a hidden field with the price per product (for calculation later) */ echo '&lt;input type="hidden" name="price_'. $productInfo["code"] .'" id="price_'. $productInfo["code"] .'" value="'. $productInfo["price"] .'" /&gt;'; /* echo the quantity field for this product */ echo '&lt;input class="qty" name="'. $productInfo["code"] .'" id="'. $productInfo["code"] .'" type="text" value="0" size="2" onkeyup="calculate()"&gt;'; /* echo the subtotal field for this product */ echo '&lt;input name="sub_'. $productInfo["code"] .'" type="text" id="sub_'. $productInfo["code"] .'" value="0.00" size="7" readonly&gt;'; } /* echo the field for total price */ echo '&lt;input type="text" name="total" id="total" value="0.00" /&gt;'; This results in sets of three input fields per product: One for the price per product (id="price_THEPRODUCTCODE") One for the quantity (id="THEPRODUCTCODE") And one for the subtotal (id="sub_THEPRODUCTCODE") Javascript I suggest using the jQuery library for faster and easier collection of the data from the input fields here. The function would then be: function calculate() { var total = 0; // for each quantity field: $("input.qty").each(function() { // get product code var productCode = $(this).attr("id"); // get price per product var price = $("#price_"+productCode).val(); // get q…
accepted answer of: http://stackoverflow.com/q/26050244
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40814144
has comment: http://stackoverflow.com/comment/40810858
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40832659
answers question: http://stackoverflow.com/q/26050244

http://stackoverflow.com/q/26181060
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41050076
has answer: http://stackoverflow.com/a/26188820
tagged with: ajax
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has title: Simple jQuery progressbar
accepted answer: http://stackoverflow.com/a/26185837
tagged with: php
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26181254
has answer: http://stackoverflow.com/a/26181254
has body: Suppose: There is some cablemodems, and a man want to list their data from a MySQL database. (ip address, mac address, modemtype, ...) Here is the HTML and PHP code: ($limit value: 15 or 25 or 50, which the user can select) <?php $sql = "SELECT ... needed fields from some tables... LIMIT $start, $limit"; $result = mysqli_query( $conn, $sql ) or trigger_error( mysqli_error( $conn ) ); while ( $row = mysqli_fetch_object( $result ) ) { echo " modem_id' style='color:gray'>\n"; echo " $row->mac_address \n"; echo " $row->ip_address \n"; echo " $row->type \n"; // ... echo " \n"; } mysqli_free_result( $result ); ?> When the database query is done, then a jQuery script query all displayed modem whether they are 'online' or not (via SNMP). Here is the jQuery script: OK, it works. But i want to see the whole ajax progress in a simple HTML div. When the jQuery script begin, then it would be good the 'progress' div appear, then show the percent in a simple colored bar, and when the all ajax query done, then the 'progress' bar disappear. (for example if $limit = 15, there is 15 ajax query. If the first query done, then the 'progress' div width will be 10px, after the second ajax query is done, the 'progress' div width will 20px, etc..) I think that the jQuery Progressbar should I use, but I do not know how to glue together.
type: Question
has answer: http://stackoverflow.com/a/26185837

http://stackoverflow.com/q/26064607
type: Question
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/935127
has answer: http://stackoverflow.com/a/26064816
has title: Using IFrame and Javascript to scroll parent page
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/4601325
type: UnansweredQuestion
tagged with: iframe
has comment: http://stackoverflow.com/comment/40836600
tagged with: css
has comment: http://stackoverflow.com/comment/46367338
score: 1
has body: I'm looking for some help on what should be a basic script (I think), but I can't quite figure it out myself.. I have a page, with an iFrame, displaying a page that I only have access to the header. I'd like to make it so that when someone clicks ANY link ( tag) in the iFrame window, it scrolls my parent page to the top (or a specific location). Is this possible? Edit: Also, if it's important, I'm already using David Bradshaw's iFrame resizer script to resize the frame on the fly, which uses postmessage to communicate frame->page. https://github.com/davidjbradshaw/iframe-resizer Edit2: The parent window and iframe window are cross-domain
upvote count: 1

http://stackoverflow.com/a/26040430
has body: You might have had problems because you were looping in the wrong direction. Try to build the object from inside-out: array.reduceRight(function(v, key) { var o = {}; o[key] = v; return o; }, "") or, with a loop: var val = ""; for (var i=array.length; i--; ) var o = {}; o[array[i]] = val; val = o; } return val;
accepted answer of: http://stackoverflow.com/q/26040282
answers question: http://stackoverflow.com/q/26040282
type: Answer
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/40791572
score: 4
type: AcceptedAnswer

http://stackoverflow.com/comment/40826002
type: AnswerComment
comment on: http://stackoverflow.com/a/26059284
has text: @ivy_lynx Yes, indeed. But I think the best would be having a complete conversion table.
score: 0
type: Comment

http://stackoverflow.com/q/26119915
has body: I have an angular list-table that uses ng-repeat. I also have a standard searchform that searches all columns. &lt;tr ng-repeat="item in test | filter: criteria"&gt; &lt;input type="search" placeholder="Search" ng-model="criteria"&gt; Is it possible to extend the functionality of the searchform so that I can specify the column-name followed by a colon and then the searchphrase to only search in that column? See example below Searchterms: "Description: my awesome description" // This will search in the description-column for "my awesome description" "my awesome description" // This will search in all columns for "my awesome description" So in some way look for that colon and if found change the filter in some way.
score: 0
answer count: 2
tagged with: javascript
has title: AngularJs filter by typed column in searchform
linked to: http://stackoverflow.com/q/20849804
tagged with: angularjs
tagged with: filter
has answer: http://stackoverflow.com/a/26120187
has comment: http://stackoverflow.com/comment/40936278
has answer: http://stackoverflow.com/a/26120539
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/26127412
has comment: http://stackoverflow.com/comment/40960839
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40972693
has comment: http://stackoverflow.com/comment/40965990
has body: I usually don't like using the ID(3) for CSS selector since you can have only one ID selector with that name on the document and there might be another element already with the same ID. How about using the class hierarchy instead to pinpoint the button element? In any case you need to re-check the count everytime what you select on what is empty: var $submitButton=$('.selector .btn'); var $selectors=$('.selector select.require_one'); $submitButton.attr('disabled','disabled'); $('.selector select.require_one').change(function(){ var $empty=$selectors.filter(function() { return this.value == ""; }); if ( $selectors.filter(function() { return this.value == ""; }).length == $selectors.length ){ $submitButton.attr('disabled','disabled'); } else { $submitButton.removeAttr('disabled'); } }); $submitButton.click(function() { $('#searchform').submit(); }); JSFiddle code here
answers question: http://stackoverflow.com/q/26126429
type: Answer
accepted answer of: http://stackoverflow.com/q/26126429
has comment: http://stackoverflow.com/comment/40976138
score: 0

http://stackoverflow.com/comment/40857047
type: AnswerComment
type: Comment
has text: Thanks a lot! I've made your changes in the file, but there's still no trace of the script in my page's source code. This is really weird!
comment on: http://stackoverflow.com/a/26075868
score: 0

http://stackoverflow.com/q/26128784
tagged with: ajax
score: 0
type: UnansweredQuestion
tagged with: django
type: Question
has body: New code now included, but still not working... I am trying to use checkboxes to select an item(s) an add it to the "cart" at the top of the page. Every item on the page has a checkbox next to it that, when selected, should add the item to the cart and display that item name in the "cart" section at the top of the page. So, as the user goes down the page and checks an item, I want that item name to appear in the "cart" section at the top of page. (i.e. check an item and the item name appears at top of page; check another item and that item name appears beside the first item at the top of the page; etc.) With previous versions of my code, I have been able to get the first item listed on the page (and only the first item) to actually show in the "cart" section. I have tried everything I can, but I am completely new to Django, Ajax, and Jquery. Can someone please help!? Thank you! "cart" section of list.html: SampleSelection1 html that lists the items with a checkbox next to each, part of list.html (these items are displayed with a larger 'for' loop): selectitems.js: $('#programCheckbox').click(function(){ var softwareID softwareID = $(this).attr("value") $.get('add_to_cart', function(data){ $tbody = $("selected_programs_cart").find('tbody'); $.each(data, function(){ var displayCart = json.addingToCart; for (var key in displayCart) if (key == 'cart'){ var value = displayCart[key]; for (var softwareName in value) $(" " + softwareName + " ").appendTo($tbody); }; }); }); }); itemview.py def add_to_cart(request): #dict of 'cart' to list of selected programs to return to_JSON = {} #Programs are already in the cart and the "cart" key already exists in the session- if 'cart' in request.session: logger.warning("cart found") software_id = request.GET.get('softwareID') softwareObject = Software.objects.get(pk='software_id') softwareName = softwareObject.title addingToCart = request.session.get('cart') request.session['addingToCart'].append(softwareName) to_JSON = request.session…
has answer: http://stackoverflow.com/a/26130022
has title: Add items one at a time to a "cart" using checkboxes with Django, Ajax, and Jquery
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26068457
has answer: http://stackoverflow.com/a/26068516
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
linked to: http://stackoverflow.com/q/26063406
has body: In relation to my other post earlier- Show/hide section based on dropdown -js that got answered by @Moob I now have another issue. With the same code- whenever the page is reloaded, there is a huge gap after the drop-down where the text will display if a certain choice is selected. Any ideas why it is doing that? Here is the codepen.io: http://codepen.io/Nestalna/details/qpjsy Which degree are you interested in? Please select one Concurrent Enrolment 2015 Applied Bioethics Summer Study Non Degree (9 hours or less) You have selected red option so i am here Lorem ipsum dolor sit amet, mel fugit epicuri laboramus ei, modo elit elitr sea te. Debitis adipisci per ne, qui ea quem nonumy possit, ea falli suscipiantur eam. Ei recteque partiendo deterruisset has. Dicit detracto similique his ad, has liber atomorum prodesset ea, cu dicant vocibus electram est. Qui eu putent sadipscing, vis dolore fabulas cu, nec hinc justo laoreet cu. Est in dicant iudicabit elaboraret. Admodum imperdiet necessitatibus ea vim, no agam atqui definitionem his. Pri ea iriure efficiantur, accumsan assueverit vim ut. Ea vim quem nobis perfecto, probo nusquam consectetuer ne sed, vis dolorem corrumpit ea. Mucius appetere duo id. Cum sale mazim ei. Vix melius intellegam ut. Mei ea audire delenit urbanitas. Cu eum civibus corrumpit dissentiunt, in augue prompta splendide eum. Mei in augue nulla partem, at usu falli euismod. Regione recteque aliquando ad mei, posse soluta dicunt ex nec. Quis phaedrum scripserit ad vis, ex theophrastus necessitatibus ius, usu in veri errem dolores. Ea his latine dolorum. Id nec malis decore expetendis, atqui soleat nominati ius at. First Name: Last Name: Middle Name:
accepted answer: http://stackoverflow.com/a/26068518
type: AnsweredQuestion
has title: Show/Hide function -extra white space
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26068518
possible better answer: http://stackoverflow.com/a/26068516

http://stackoverflow.com/q/26072587
upvote count: 1
has body: I am just getting started with Canvas programming and trying to build a small game. Below is a sample code that I am trying out. My intention is to: Create a canvas. Fill it with some background color. Draw a circle. Clear the canvas. Draw another circle in different location. Here's the code: var canvas = document.createElement('canvas'); canvas.width= 400; canvas.height = 400; document.body.appendChild(canvas); var ctx = canvas.getContext('2d'); // 2. Fill background ctx.fillStyle = 'rgb(30,0,0)'; ctx.fillRect(0,0,400,400); // 3. Draw circle ctx.save(); ctx.fillStyle = 'rgba(256,30,30,.8)'; ctx.arc(50,50, 20, 0, Math.PI*2, true); ctx.fill(); ctx.restore(); // 4. Clear Canvas ctx.save(); ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.restore(); // 5. Draw another circle ctx.save(); ctx.fillStyle = 'rgba(256,30,30,.8)'; ctx.arc(150,150, 20, 0, Math.PI*2, true); ctx.fill(); ctx.restore(); But as you can see, only the background color gets cleared and the first circle remains as it is. Why is the above code fails to clear the canvas completely before drawing second circle?
type: AnsweredQuestion
type: Question
has title: Why is the HTML5 canvas not clearing in my code?
tagged with: canvas
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26072667
tagged with: html5-canvas
answer count: 1
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26072667

http://stackoverflow.com/comment/98201983
score: 1
comment on: http://stackoverflow.com/a/49167846
type: AnswerComment
type: Comment
has text: Thanks for the attempt, however this is not a solution to the problem, but rather a method to completely disable a very important browser security feature. I do not recommend anyone follow this option, as it will open your browser to cross site scripting attacks across ALL sites. Also, if applying this "just for development" you will falsely think you've fixed problems in your software, but users in production will still have problems

http://stackoverflow.com/q/26193277
accepted answer: http://stackoverflow.com/a/26193374
type: Question
type: AnsweredQuestion
has body: I'm writing a script whose function is to convert a drop down menu to an accordion style menu depending on the screen width. To do this, the script swaps out class names based on the width. Visually, everything works as expected when the screen size changes. Also, if I open up the developer tools in chrome and adjust screen width, I can see the class names change in HTML. Functionally, however, the browser seems to hold onto whatever class name it was when the page loaded. Here's the script: $(function() { var screenWidth; var screenMode; var initial_check = 0; var currentMode; //check main window width function checkWidth() { screenWidth = $(window).width(); //main size changes if (screenWidth &gt;= 769) { screenMode = "large"; changeDisplayMode("large"); } else if (screenWidth &lt; 769 &amp;&amp; screenWidth &gt; 350) { screenMode = "medium"; changeDisplayMode("medium"); } else if (screenWidth &lt; 350) { screenMode = "medium"; changeDisplayMode("medium"); } //size change to stack View Cart items and search button if (screenWidth &lt; 603) { //show search magnify glass } } //check width when entering page checkWidth(); $(window).resize(checkWidth); ///////////////////////////////////////////////////////////////////////////////// /////////// /////// /////////// Code for navigation transition from drop down to accordion /////// /////////// /////// ///////////////////////////////////////////////////////////////////////////////// function changeDisplayMode(mode) { if (currentMode != mode) { if (mode == "large") { //set on first launch initial_check = 1; if (initial_check == 1) { $("#header_image").show(); $("nav").removeClass("nav_medium").addClass("nav_large"); $("div.main_menu_item_medium").removeClass("main_menu_item_medium").addClass("main_menu_item_large"); $("div.sub_menu_medium").removeClass("sub_menu_medium").addClass("sub_menu_large"); $("div.sub_menu_item_medium").removeClass("sub_menu_item_medium").addClass("sub_menu_item_large"); } currentMode = "large"; }…
has comment: http://stackoverflow.com/comment/41072137
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26193374
has title: JQuery class swap not acting as expected
score: 0

http://stackoverflow.com/a/26137171
type: Answer
answers question: http://stackoverflow.com/q/26052722
upvote count: 1
score: 1
has body: try json_decode. $data = ({"code":0, "message":"success"}); $array = json_decode($data, true); by passing 2nd parameter to true you will get response in array instead of object. the array will be then populated as follow: array (size=2) 'code' =&gt; int 0 'message' =&gt; string 'success' (length=7)
downvote count: 0

http://stackoverflow.com/a/26144668
type: Answer
has body: You can use statusCode $.ajax({ type: 'POST', url: url, statusCode: { 200: function (response) { alert('200'); }, 201: function (response) { alert('201'); }, 404: function (response) { alert('400'); } }, success: function () { alert('Success'); }, });
answers question: http://stackoverflow.com/q/26144446
has comment: http://stackoverflow.com/comment/40982197
has comment: http://stackoverflow.com/comment/40982409
has comment: http://stackoverflow.com/comment/40982826
has comment: http://stackoverflow.com/comment/40982698
has comment: http://stackoverflow.com/comment/40982039
score: 0

http://stackoverflow.com/a/26159780
score: 0
answers question: http://stackoverflow.com/q/26159705
has body: Hi here i give you an example, you make the .left div 20% of the container and the img inside 100% of the left div, so if you resize the page this should work html content css .container{width: 400px;} .left{width: 20%;} .left img{width: 100%;}
type: Answer

http://stackoverflow.com/q/26121129
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26121277
has answer: http://stackoverflow.com/a/26121277
accepted answer: http://stackoverflow.com/a/26121709
tagged with: coldfusion
type: AnsweredQuestion
tagged with: coldfusion-10
tagged with: http-redirect
type: Question
has comment: http://stackoverflow.com/comment/40938904
has title: Redirect in coldfusion -- Or Mandatory Javascript?
linked to: http://stackoverflow.com/q/993387
has answer: http://stackoverflow.com/a/26121709
has body: Does anyone know how to do a redirect in coldfusion similar to this redirect in javascript? The issue I am having with javascript is that people are just turning javascript off.. Also is it possible to write something to force them to either keep javascript on or make them download it if they do not have it? &lt;script language="javascript"&gt; function SelectRedirect(){ // ON selection of section this function will work //alert( document.getElementById('pcount').value); switch(document.getElementById('pcount').value) { case "0": alert('Please select number of owners.'); window.location=""; break; case "1": window.location="One/ownerInfo1.cfm"; break; case "2": window.location="Two/ownerInfo2.cfm"; break; case "3": window.location="Three/ownerInfo3.cfm"; break; case "4": window.location="Four/ownerInfo4.cfm"; break; case "5": window.location="Five/ownerInfo5.cfm"; break; }// end of switch } ////////////////// &lt;/script&gt; &lt;/head&gt; &lt;h3&gt;How many owners are taking title?&amp;nbsp; &lt;SELECT id="pcount" NAME="pcount"&gt; &lt;Option value="0"&gt;Select Section&lt;/option&gt; &lt;Option value="1"&gt;1&lt;/option&gt; &lt;Option value="2"&gt;2&lt;/option&gt; &lt;Option value="3"&gt;3&lt;/option&gt; &lt;Option value="4"&gt;4&lt;/option&gt; &lt;Option value="5"&gt;5&lt;/option&gt; &lt;/SELECT&gt;&lt;/h3&gt; &lt;input type="submit" name="Submit" value="Next" onClick="SelectRedirect();"&gt;
score: 0

http://stackoverflow.com/comment/41040044
has text: @JamesWdev yes, but you will need javascript to calculate the height of each separate div and than animate it based on that. You will also have to set the negative top margins dynamically.
comment on: http://stackoverflow.com/a/26175645
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40939175
comment on: http://stackoverflow.com/a/26119892
type: AnswerComment
type: Comment
has text: Thanks for reply. But they are already independent. I want to either stop the click event from occuring on input once it has occured on label. Or atleast have some information that it's associated label was previously clicked.
score: 0

http://stackoverflow.com/q/26048617
has answer: http://stackoverflow.com/a/26108512
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has comment: http://stackoverflow.com/comment/40916407
has comment: http://stackoverflow.com/comment/40807076
has comment: http://stackoverflow.com/comment/40814034
tagged with: php
has comment: http://stackoverflow.com/comment/40810815
has comment: http://stackoverflow.com/comment/40807356
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40813200
has body: I would love to create a fiddle for this to show but i'm using php and it won't let me use php in those so i'm hoping someone will still know whats going on! I have a javascript that works completely fine on it's own. It is a HTML click and drag canvas. The click and drag is constrained to a circle and draws the image to the canvas when you click a button that is next to the canvas. This button calls a method that draws the image onto the canvas and makes it click and draggable. I have tested this by itself and it works beautifully. When I add a simple line of php code my click and drag canvas quits moving the image. When you click the button to draw the image on, that works, but then you can't move the image. I am beyond confused because the php that i am using has nothing to do with what is going on in the canvas. Here is the code: it's also important to point out that this code works fine in safari but doesn't work at all in chrome so i know it has something to do with chrome i just don't understand what the problem is. My question is mainly, is there a way that safari loads versus chrome that would affect running javascript and php on the same page since it works fine in one browser and not the other. I just added the code so people would know what I am referring to. Here is the PHP <?php $name = $_GET['id']; if ($name=="bracelet") { echo " Design x! "; } elseif ($name=="purse") { echo " Design y! "; } elseif ($name=="ring") { echo " Design z! "; } ?> Here is the full code <?php $name = $_GET['id']; if ($name=="bracelet") { echo " Design x! "; } elseif ($name=="purse") { echo " Design y! "; } elseif ($name=="ring") { echo " Design z! "; } ?> Add Images and Canvases with the buttons Click to select which image to move. Then move the mouse to desired drop location and click again to drop the image there. save
type: Question
has comment: http://stackoverflow.com/comment/40811067
tagged with: canvas
upvote count: 1
accepted answer: http://stackoverflow.com/a/26108512
answer count: 1
has title: HTML5 canvas and php on Chrome not working
tagged with: javascript
tagged with: jquery
favorite count: 0
score: 0
has comment: http://stackoverflow.com/comment/40807146

http://stackoverflow.com/comment/40979588
type: AnswerComment
comment on: http://stackoverflow.com/a/26132510
type: Comment
has text: Hmmm, not sure what to say. I'm getting event multiplying on each other every time the event listener is triggered. Any idea what the discrepancy could be?
score: 0

http://stackoverflow.com/a/26051785
accepted answer of: http://stackoverflow.com/q/26050686
answers question: http://stackoverflow.com/q/26050686
type: Answer
has comment: http://stackoverflow.com/comment/40828954
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40819224
upvote count: 1
type: AcceptedAnswer
has body: This is a no-win answer, in that when you get down to it, there is absolutely no scope which doesn't create a closure; it's a question of whether the closure is used or not, and how it is used. Closure is simply an inner scope which maintains reference to an outer scope. Put it this way: /* global */ window.incr_id = 0; window.tick = 0; function nextTick () { window.tick += 1; } window.incr_id = window.setInterval(nextTick, 1000); Does this count as closure, to you? Technically, the global scope is the equivalent of running inside of a Main () in other languages, therefore the nextTick function holds a reference to an outer-scope's value (window), causing a traversal up the chain of value tables, thus a "closure". You could try something like function nextTick () { nextTick.value += 1; } nextTick.value = 0; ...but does that count, seeing as the self-reference comes from outside of the braces, and thus belongs in a higher scope? function nextTick () { arguments.callee.value += 1; } nextTick.value = 0; Of course, that would thereby prevent you from using this solution in strict-mode (which you should use, if you expect to be safe). You can, of course, create a closure which isn't the function in question, but rather, create monads, so that you're passing values incrementally through composed functions, rather than relying on closure references... The problem there, of course, is that setInterval requires a function. As such, whichever function you return to setInterval, that final function is going to have to use closure references, regardless of whether or not all your applicative functions did, prior. And do function references count as closure references, if you reference a function which was not defined inside of your current function scope, or are we just talking about scalars? Moral of the story: window.value = 1; window.obj.value = 1; func.value = 0; function func () { func.value = 1; } function func () { arguments.callee.value = 1; } The first two are valid if…

http://stackoverflow.com/comment/41134505
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26145540
has text: This was the "Dependency Collection Gotcha" that I missed the first few reads through the documentation. Could you make a formal list of dependencies for each computed property perhaps?

http://stackoverflow.com/a/26180113
answers question: http://stackoverflow.com/q/26167490
type: AcceptedAnswer
upvote count: 1
type: Answer
has body: If anyone's experiencing same issue, I got the answer. I had to go to the mxd file through the features and enable the shape field in them (they can be opened by Arc map)!
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26167490

http://stackoverflow.com/comment/41049430
type: Comment
type: QuestionComment
has text: if its always the last one, you just have to append to your div `parent`
comment on: http://stackoverflow.com/q/26180810
score: 0

http://stackoverflow.com/comment/40930697
type: QuestionComment
has text: You want to disable ability to play other tracks or you want to stop/pause current audio and play other one?
comment on: http://stackoverflow.com/q/26116766
score: 0
type: Comment

http://stackoverflow.com/a/26121350
upvote count: 2
downvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40940263
answers question: http://stackoverflow.com/q/26121241
has body: You are targeting the outermost div with your selector, it too contains the text "Related Topics". Try this: $("div").find("div:contains('Related Topics')").css("text-decoration", "underline");
type: Answer

http://stackoverflow.com/comment/41040369
score: 0
has text: Not working. Error is "Cannot read property 'open' of undefined"
type: Comment
comment on: http://stackoverflow.com/a/26175963
type: AnswerComment

http://stackoverflow.com/comment/40948795
comment on: http://stackoverflow.com/a/26126508
score: 0
type: AnswerComment
has text: its sends the whole mixed array, mean it treat every single char as array element.
type: Comment

http://stackoverflow.com/q/26084681
type: Question
has answer: http://stackoverflow.com/a/26085836
tagged with: javascript
has body: Have php regExp $string = preg_replace("/[^\p{L}|\p{N}]+/u", " ", $string); $string = str_replace(' ', '-', $string); Help me to write it on js, need to convert jbgsbg5%E-th-t65?tw45@%^&amp;*j-y&amp;u-САМОЛЁТ~ ~2&gt;&lt;%27;[]~!6456 to jbgsbg5-E-th-t65-tw45-j-y-u-САМОЛЁТ-2-6456 Thanks!
score: 0
answer count: 3
has title: Javascript regex only letters and numbers and dash UTF8
tagged with: utf-8
has comment: http://stackoverflow.com/comment/40873710
has answer: http://stackoverflow.com/a/26093331
possible better answer: http://stackoverflow.com/a/26085612
has answer: http://stackoverflow.com/a/26085612
tagged with: php
tagged with: regex
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26093331

http://stackoverflow.com/a/26101924
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/61883577
has comment: http://stackoverflow.com/comment/61954368
type: Answer
has body: Solved. My code is actually right, the problem was on a CSS file that I use. To avoid this I've deleted and call again the file while converting the div into an image. // $= means that ends with ("link[href$='my.css']").remove(); html2canvas($container, { onrendered: function(canvas) { var data = canvas.toDataURL('image/png'); var file = dataURLtoBlob(data); // etc $('head').append("&lt;link href='" + base_url + "public/css/my.css' rel='stylesheet'/&gt;"); } });
has comment: http://stackoverflow.com/comment/103079276
accepted answer of: http://stackoverflow.com/q/26099066
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26099066
upvote count: 2

http://stackoverflow.com/q/26138094
tagged with: angularjs
linked to: http://stackoverflow.com/q/25476933
possible better answer: http://stackoverflow.com/a/26261742
has comment: http://stackoverflow.com/comment/40969964
has comment: http://stackoverflow.com/comment/40969741
has answer: http://stackoverflow.com/a/26261742
has comment: http://stackoverflow.com/comment/40969774
score: 1
has title: Angularjs UI-Router state params not working
upvote count: 1
has answer: http://stackoverflow.com/a/26138353
type: AnsweredQuestion
tagged with: angular-ui-router
tagged with: javascript
has body: I have a simple setup in my config() $stateProvider .state('app', { 'url': '/app', 'abstract': true, 'templateUrl': 'views/layout/index.html', 'controller': 'App' }) .state('app.home', { 'url': '/home', 'views': { 'appContent': { 'templateUrl': 'views/home/index.html', 'controller': 'Home' } } }); .state('app.asd', { 'url': '/asd/:idContact?', 'views': { 'appContent': { 'templateUrl': 'views/asd/index.html', 'controller': 'Asd' } } }); $urlRouterProvider.otherwise('/app/home'); If i browse app/asd/7 everything works if i browse then app/asd it redirects me I am wondering how can i make idContact param not required ? I used the classic $routeProvider sintax for it :(
type: Question
answer count: 2
tagged with: state
downvote count: 0
accepted answer: http://stackoverflow.com/a/26138353
favorite count: 0
has comment: http://stackoverflow.com/comment/40970374

http://stackoverflow.com/q/26042595
has body: On Grails 2.2.4 how can I load certain JS resources only on specific pages. Currently all JS files I use are loaded on all pages (even on the ones I don't need). My ApplicationResources looks like this: modules = { application { dependsOn "jquery", "jquery-ui", "emberjs","emberjsdata", "pjax", "highchart", "filetype", "theme" resource url:'js/application.js' resource url:'js/App.js' resource url:'js/bootstrap-select.js' resource url:'js/bootstrap-switch.js' } request { dependsOn "application" resource url: 'js/request.js' } lowside { dependsOn "application" resource url:'js/lowside.js' } pjax { resource url: 'js/jquery.pjax.js', disposition: "head" } highchart { resource url: 'js/highcharts.js', disposition: "head" } filetype { resource url: 'js/filestyle.js', disposition: "head" } emberjs { dependsOn 'jquery,handlebars' resource url: 'js/ember-latest-stable.js' } handlebars { resource url: 'js/handlebars-1.0.0-rc.4.js' } emberjsdata{ dependsOn 'emberjs' resource url: 'js/ember-data-latest.js' } theme { resource url: 'js/theme.js' } } on my layout page I do this: &lt;r:require module="application"/&gt;
answer count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26045227
upvote count: 1
score: 1
type: Question
downvote count: 0
tagged with: javascript
tagged with: grails
has title: How to load certain JS resources only on specific pages in Grails 2.2.4

http://stackoverflow.com/comment/40994094
comment on: http://stackoverflow.com/q/26150613
type: Comment
type: QuestionComment
score: 0
has text: Yes I added the object (It's a global variable)

http://stackoverflow.com/a/26053572
score: 0
type: Answer
has body: In your situation I would recommand to put the values in the array first. In the second step I would sort the array using the sort method. function getSortedArrayByString(myString) { var arraySplittedString, i, tmpValueArray, tmpInnerArray, resultingArray; arraySplittedString = myString.split(","); resultingArray = []; for(i = 0; i &lt; arraySplittedString.length; i++){ // tmpArray has the format of [&lt;week&gt;, &lt;IssuesPriority1&gt;, &lt;IssuesPriority2&gt;] tmpValueArray = arraySplittedString[i].split("|"); // Push it in the new array. resultingArray.push(tmpValueArray); } // Sort array by weeks ascending. resultingArray.sort( function (a, b) { return a[0] - b[0]; }); return resultingArray; } Running fiddle. If you also want to sort by the count of issues, you simply can customize the inner sort function. With this solution all values are saved as strings. You can convert them by using the parseInt function.
answers question: http://stackoverflow.com/q/26041869

http://stackoverflow.com/q/26104863
type: Question
has answer: http://stackoverflow.com/a/26104978
has comment: http://stackoverflow.com/comment/40909810
has comment: http://stackoverflow.com/comment/40909463
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40909615
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/40909622
has title: Filling text in Html <marquee> tag by text file
has comment: http://stackoverflow.com/comment/40909563
type: UnansweredQuestion
has body: I am trying to update marquee tag with a external text file in following manner:- $(document).ready(function(){ $(".marque").load("update/update.txt"); } Updates Although its working in IE but not in Google . Can anybody have idea why is it so?

http://stackoverflow.com/comment/40898145
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26098078
has text: OK. you should write address = '<?php echo $_POST['address'] ?>'; echo is missing

http://stackoverflow.com/comment/41143827
type: QuestionComment
has text: It'll help if you update your question with contents of your `bower.json`. Clearly somebody is depending on theshock/atomjs ~2.0.3. The `bower.json` should tell who.
score: 0
comment on: http://stackoverflow.com/q/26180196
type: Comment

http://stackoverflow.com/q/26185479
has body: So as a conversion takes place on site.com (tracked by Google Analytics), a user ID is generated within a javascript on the page but is not captured anywhere but this JS call. How can one associate the user ID (within that script) with the conversion that takes place utilizing Google Analytics and custom variables? Thanks
type: Question
tagged with: google-analytics
tagged with: google-tag-manager
tagged with: javascript
has answer: http://stackoverflow.com/a/26185775
score: 0
answer count: 1
has title: How to capture custom variables in Google Analytics?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41058974

http://stackoverflow.com/comment/41058293
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26185399
type: QuestionComment
has text: As you didn't post the complete code: Is it just possible that you have a console.log message in your js and IE developer tools closed in IE? As IE has no console object in case of closed dev. tools, this can cause js-errors.

http://stackoverflow.com/comment/40918300
type: Comment
type: QuestionComment
has text: Why not declaring `initAutoComplete` outside of ready closure?
score: 3
comment on: http://stackoverflow.com/q/26109600

http://stackoverflow.com/comment/40950660
type: QuestionComment
comment on: http://stackoverflow.com/q/26127336
score: 0
type: Comment
has text: Sorry, yes of course. @loganfsmyth explains it.

http://stackoverflow.com/q/26034591
accepted answer: http://stackoverflow.com/a/26034671
type: Question
answer count: 2
tagged with: xmlhttprequest
tagged with: php
downvote count: 1
has comment: http://stackoverflow.com/comment/40781217
has comment: http://stackoverflow.com/comment/40781101
has title: xmlrequest does not return text from php
has comment: http://stackoverflow.com/comment/40780827
upvote count: 0
has answer: http://stackoverflow.com/a/26034671
tagged with: javascript
has answer: http://stackoverflow.com/a/26034688
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26034688
tagged with: http://stackoverflow.com/tag/html
has body: I need to find some tools to be able to call .php from .html. Here is a problem: while this example works, from .php file: Your IP is <?php echo $_SERVER['REMOTE_ADDR']; ?> this example doesn't echoes IP in .html file: ---from index.html--- Your IP is ---from getip.php--- <?php echo "$_SERVER['REMOTE_ADDR']"; ?> what is wrong here?
score: -1
favorite count: 0

http://stackoverflow.com/a/47809467
has body: var d = new moment(); var startMonth = d.clone().startOf('month'); var endMonth = d.clone().endOf('month'); console.log(startMonth, endMonth); doc
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26131003

http://stackoverflow.com/q/26116016
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26117161
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40930597
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26117161
has body: var docs = []; server.on('add', function(item){ docs.push(item); }); setInterval(function(){ save(docs); }, 3000); var save = function(array) { var items = array.slice(0); // copy array array.length = 0; // clear array mongodb.insert(items, function(){ // ... }); }; I would like to save documents to RAM and next save to mongodb. Is this code safe? Mongodb server is in EU, application server is in US. It is added 2-3k items per sec to the base. I would like to decrease quantity of connections. My question: It is possible that during save to the base the variable will be modificate (in 'add')
tagged with: javascript
score: 0
has title: node.js safety of asynchronous array

ratchet
type: Tag
tag name: ratchet
tags question: http://stackoverflow.com/q/26153132

http://stackoverflow.com/a/26131992
answers question: http://stackoverflow.com/q/26131821
type: Answer
has body: The simplest approach is to put your window object in the global object. var popUp; $("#to-open").click(function () { window.popUp = window.open( _contextPath + "open.jsp","Child", "width=500, height=300").focus(); }); This gets ugly though and it is considered best practice to not clutter up your global. What would be cleaner is something like this &lt;button id="to-open"&gt; &lt;/button&gt; &lt;button id="to-close"&gt; &lt;/button&gt; $(document).ready(function () { var popUp = 0; $("#to-open").click(function () { popUp++; }); $("#to-close").click(function () { alert(popUp); }); });
score: 0

http://stackoverflow.com/comment/40917262
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26108776
type: AnswerComment
has text: Thanks for the response, my real problem is not with that, checkout the updated question

http://stackoverflow.com/q/26157380
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41007095
has comment: http://stackoverflow.com/comment/41007073
type: AnsweredQuestion
type: Question
has title: Keep creating an extra empty page on "next"
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26158755
accepted answer: http://stackoverflow.com/a/26158755
tagged with: angularjs
has body: I have a problem with a tool built in HTML and Angular.js. Basically the site is built the way that it should store 15 entries on a page, then you press "Next" and the next 15 entries should be listed, which works fine. BUT, when you are at the last page (when there is no more entries) it automatically creates another "Next page" which is empty. I am a newbie on Angular.js and i am stuck right now. $scope.loadCharters = function () { var keys = []; _.each($scope.sessions, function (sess) { sess.checked &amp;&amp; keys.push(sess.key); }); charterFactory.getChartersBySession(keys, function (charters) { $scope.charters = charters; $scope.filterCharters(); }, 15, ($scope.page - 1) * 15); }; $scope.nextPage = function () { if ($scope.charters &amp;&amp; $scope.charters.length) { $scope.page++; $scope.loadCharters(); } }; This is the functions that should list the pages (15 entries / page). But i dont understand why it keeps creating +1 empty? Any help would be appriciated.

http://stackoverflow.com/q/26095833
tagged with: append
has comment: http://stackoverflow.com/comment/40893471
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26095912
upvote count: 2
type: Question
tagged with: javascript
has title: Unrecognized expression when appending data attribute
has answer: http://stackoverflow.com/a/26095912
downvote count: 0
answer count: 1
has body: I try to create a HTML element with a class and data attribute via jQuery: elem.append($('&lt;ul&gt;', {'class': 'list-group-item', 'data-topic': value})); This works fine, except when the data attribute contains spaces. Then the console throws the following error: Uncaught Error: Syntax error, unrecognized expression: ul[data-topic=Test 2] What's the issue here?
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/26109215
type: Answer
has body: When I try to remove it like this: scene.remove(thisArrow); That works fine. But I assume that I am getting a memory leak because I have not disposed of the geometry. (I am creating a lot of arrows over time, so this matters) Doing scene.remove(thisArrow) should be all you need to do. ArrowHelper shares the same geometry with all the others.
answers question: http://stackoverflow.com/q/26108048
score: 0

http://stackoverflow.com/comment/40949420
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26123384
has text: Try changing the masonry callback. See my edit above
type: AnswerComment

http://stackoverflow.com/comment/40963786
type: Comment
comment on: http://stackoverflow.com/a/26134734
score: 1
type: AnswerComment
has text: @Fred, I was joking. :)

http://stackoverflow.com/q/26037539
tagged with: javascript
score: 1
has title: Unwind functionality with underscore
favorite count: 0
possible better answer: http://stackoverflow.com/a/32436470
type: Question
has answer: http://stackoverflow.com/a/32436470
has body: I need mongodb's $unwind like functionality with underscore, so that [{ groups: [{ name: 'test 1' }, { name: 'test 2' }], id: 1 }] became [{ id: 1, group: { name: 'test 1' } }, { id: 1, group: { name: 'test 2' } }] Can this be done with underscore?
has answer: http://stackoverflow.com/a/54151949
upvote count: 1
answer count: 7
has answer: http://stackoverflow.com/a/60798010
has answer: http://stackoverflow.com/a/26756871
has answer: http://stackoverflow.com/a/26038197
tagged with: underscore.js
has answer: http://stackoverflow.com/a/60797949
accepted answer: http://stackoverflow.com/a/26038197
has answer: http://stackoverflow.com/a/47460235
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/49276207
comment on: http://stackoverflow.com/q/26037462
score: 0
type: Comment
has text: @VaughanHilts: See if this is helpful: http://superuser.com/questions/772762/how-can-i-disable-security-checks-for-localhost
type: QuestionComment

http://stackoverflow.com/q/26059383
score: 1
has title: Jquery mobile form data submit between two pages in a single file?
type: Question
tagged with: jquery-mobile
tagged with: javascript
upvote count: 1
has answer: http://stackoverflow.com/a/26060262
accepted answer: http://stackoverflow.com/a/26060262
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40826837
tagged with: http://stackoverflow.com/tag/html
has body: I want send the data 'home_page' page to 'get_data' page.how to get the data from home page and send to the second page using jquery Header form data send here Footer Header display the data here from home page Footer
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/40806555
score: 0
type: Comment
has text: Put your script tag at the end of your document, instead of the beginning. So put it after
comment on: http://stackoverflow.com/a/26048150
type: AnswerComment

http://stackoverflow.com/comment/40922026
comment on: http://stackoverflow.com/a/26111753
type: AnswerComment
score: 0
type: Comment
has text: @DougFirr sorry I didn't get what do you want?

http://stackoverflow.com/comment/41018676
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26164050
type: Comment
has text: Thanks! I think this is more what I'm looking for. I'll try this out and post an update in a bit.

http://stackoverflow.com/q/26078128
has body: I have several forms for a product order page. Each Item on the page needs to have two prices, one for a one time order, and one for a recurring order. The code I have is working fine, the problem is a need three javascript functions for each item, which as you can guess will get out of hand fast. Here is the form for one product: Subscribe & Save One Time Add To Cart And her is that forms javascript: function changePriceHighMango() { document.getElementById("mango-price").innerHTML = "80.00"; document.getElementById("mango-price-desc").innerHTML = "Switch to recurring and save up to 35%!"; document.getElementById("mango-price-input").value = "80.00"; document.getElementById("mango-sub-input").name = "Frequency"; document.getElementById("mango-sub-input").value = "Single Order"; } function changePriceLowMango() { document.getElementById("mango-price").innerHTML = "50.00"; document.getElementById("mango-price-desc").innerHTML = "Recurring Price. Cancel Anytime."; document.getElementById("mango-price-input").value = "50.00"; document.getElementById("mango-sub-input").name = "sub_frequency"; document.getElementById("mango-sub-input").value = "1m"; } function mangoSubmit() { var mangoName = document.getElementById("distName").innerHTML; document.getElementById("mango-refBy").value = mangoName; document.getElementById("mangoForm").submit(); } What I would like is three functions–one for increasing the price, one for decreasing the price, and one for submitting the form–that will work for each item. The functions would need to know which forms to change, what the low and high prices are, and what items on that form to update. Is that at all possible to do? Thanks for your help.
answer count: 2
has title: Using one javascript function for multiple forms
accepted answer: http://stackoverflow.com/a/26083555
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/26078192
score: 1
has answer: http://stackoverflow.com/a/26078192
upvote count: 1
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/26083555
tagged with: forms
tagged with: dom
type: Question

http://stackoverflow.com/q/26044498
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/49254633
tagged with: closures
tagged with: javascript
has title: JQuery Plugin - triggering internal functions by callback
has answer: http://stackoverflow.com/a/30603207
accepted answer: http://stackoverflow.com/a/30603207
tagged with: jquery-plugins
score: 0
tagged with: jquery-events
answer count: 1
has comment: http://stackoverflow.com/comment/49274215
has comment: http://stackoverflow.com/comment/49256202
tagged with: jquery
has body: Skip to bottom for question JQuery plugin: $.fn.myPlugin = function( options ) { var options = $.extend({ myOption: true, edit: function() {}, done: function() {} }, options); options.edit.call(this); options.done.call(this); //plugin guts removed to prevent over complication return { edit: function(obj) { $(obj).closest('#myParent').find('#myInput').autosizeInput(); //plugin to autosize an input }, done: function(obj) { $(this).closest('tr').find('td').not('.not').each(function(i) { //do some things }); } } }); Bear in mind this is a cut down version of my plugin. Called from page: $(document).ready(function() { var myPlugin = $('.editable').myPlugin({ edit: $(this).on('click', '.edit-td', function(e) { e.preventDefault(); //do some page specific stuff myPlugin.edit( $(this) ); //call the edit returned function }), done: $(this).on('click', '.done-td', function(e) { e.preventDefault(); //do some page specific stuff myPlugin.done( $(this) ); //call the done returned function }); }); }); This works great for the most part, however, what i really want is have functions called from inside my plugin every time a specific callback is triggered - without the need to call from outside the plugin. I have tried including delegated events in my plugin: $(this).on('click', '.edit-td', function(e) { e.preventDefault(); $(this).closest('#myParent').find('#myInput').autosizeInput(); }); $(this).on('click', '.done-td', function(e) { e.preventDefault(); $(this).closest('tr').find('td').not('.not').each(function(i) { //do some things }); }); But when the .edit-td is triggered it propagates and triggers the .done-td event, if i put e.stopPropagation() in the edit-td function (because it has been delegated) edit-td stops firing completely. And non-delegated method: $(this).find('.done-td').click(function(e, this) {}); But I can't parse the returned object (this) to the internal function before the internal function has completed. (just comes up undefined or missing formal parameter). …
has comment: http://stackoverflow.com/comment/49274089

http://stackoverflow.com/comment/40873430
type: QuestionComment
has text: @AfonsoMatos no, there is only one executing cursor in Javascript. It will call one method and then the other. Which one is called first depends on other things.
comment on: http://stackoverflow.com/q/26084891
score: 0
type: Comment

http://stackoverflow.com/comment/40972167
comment on: http://stackoverflow.com/a/26137911
type: AnswerComment
has text: Yes, all updates would be disabled with one time binding. Oh and what would possibly also help: If you can't avoid having new objects (as opposed to leave unchanged objects alone), then use "track by" in any ng-repeat, so that angular can know which object belongs to which dom element and avoid rebuilding tabs.
score: 0
type: Comment

http://stackoverflow.com/a/26076875
has body: Just a typo : it is not atrr, but attr ;-)
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40858998
downvote count: 0
answers question: http://stackoverflow.com/q/26076824
accepted answer of: http://stackoverflow.com/q/26076824
type: Answer
has comment: http://stackoverflow.com/comment/40858807
upvote count: 3
score: 3

http://stackoverflow.com/a/26138940
answers question: http://stackoverflow.com/q/26138910
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40973210
has comment: http://stackoverflow.com/comment/40974837
has body: Your if condition will always be true because a jQuery object, even if it's empty, will equate to true. Instead, you can use the length property to check if a selector found a match: var $isHome = $('body.home'); if ($isHome.length) { // your code... } Or you can use hasClass to check if the element has the required class: if ($('body').hasClass('home')) { // your code... }
score: 5
upvote count: 5
accepted answer of: http://stackoverflow.com/q/26138910

http://stackoverflow.com/comment/41004171
has text: yes, i updated the question (my no2 point). One idea that comes in my mind, is also to move optional parameters to last then i can follow directly wihtout passing `undefined`
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26156526

http://stackoverflow.com/comment/122760347
has text: this is not a trim, this is a char replace
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/55641743
type: Comment

http://stackoverflow.com/a/26118260
type: Answer
score: 2
has body: it should be $('.filter-option a'), not $('.filters a'). localStorage setting true and false should change their places (true when it was false and vice versa). if (checked) actually will work even for false value, because it turns out that checked is String, not Boolean. So it should be if (checked == 'true') I also simplified some places in code. Updated fiddle. $(document).ready(function() { $('.filter-option a').on('click', function() { var data_filter = $(this).data('filter'); $(this).toggleClass("active"); localStorage.setItem(data_filter, $(this).hasClass("active")); }); $('.filter-option a').each(function() { var data_filter = $(this).data('filter'); var checked = localStorage.getItem(data_filter); if (checked == 'true') { $(this).addClass('active'); } }); });
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/40933111
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26117820
answers question: http://stackoverflow.com/q/26117820

http://stackoverflow.com/a/26139186
upvote count: 2
answers question: http://stackoverflow.com/q/26139118
type: Answer
score: 2
downvote count: 0
has body: There are multiple syntax problems in your script... Apart from that the method GoBack() is declared in a closure scope, so in the onclick="" attribute handler it won't be available jQuery(function ($) { var $el = $('.element'); if ($el.length) { //create button $('&lt;button /&gt;', { text: 'Go Back', click: function () { window.history.back(); } }).appendTo($el); //append to .element } });

http://stackoverflow.com/a/26123970
has comment: http://stackoverflow.com/comment/40944266
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40944322
has comment: http://stackoverflow.com/comment/40944088
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/26123803
has body: Fairly simple, you can use ng-hide and ng-show along with an isEditing flag: {{test.name}} You'll need to add a button to save the edits and flip the isEditing flag back over - but other than that this should work.
answers question: http://stackoverflow.com/q/26123803
upvote count: 1
has comment: http://stackoverflow.com/comment/40944257
has comment: http://stackoverflow.com/comment/40944378

http://stackoverflow.com/q/26066648
linked to: http://stackoverflow.com/q/13848071
has body: I'm trying to use Angular to create a tool that accepts user input from a slider tool, and automatically updates an "estimate" field whenever the values are changed. However, the data only seems to be binding on the way to the view; the user input is displayed, but doesn't seem to register in the scope. Here's the HTML: ${{estimate}} ${{values.insurance}} ${{values.lease}} Here's the Angular: //create the module angular.module('Breeze', ['ngRoute', 'ngResource', 'ui.slider']) .config(function($routeProvider) { $routeProvider // route for the calculator page .when('/', { templateUrl: 'partials/calculator.html', controller: 'calcController' }); }) // create the controller and inject Angular's $scope .controller('calcController', function($scope, $http) { $scope.values = { // Default values insurance: 125, lease: 125, }; $scope.estimate = $scope.values.insurance + $scope.values.lease } // Formatting for scale bar $scope.currencyFormatting = function(value) { return value.toString() + " $"; } }) I've tried adding a $watch and a $broadcast function but can't seem to get them working. This is what it looked like in Angular: $scope.$watch("values", function(newVal, oldVal, scope) { scope.estimate = addVals(); }) $scope.changeVal = function() { $scope.estimate = addVals(); console.log('hi') $scope.estimate = $scope.values.insurance + $scope.values.lease } Ideas?
possible better answer: http://stackoverflow.com/a/26067182
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/40840340
score: 1
has comment: http://stackoverflow.com/comment/40841107
type: Question
has title: Angular data - having trouble binding updated values to scope (using slider)
tagged with: javascript
has answer: http://stackoverflow.com/a/26067182
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/26066835
favorite count: 0
has answer: http://stackoverflow.com/a/26068866
accepted answer: http://stackoverflow.com/a/26068866
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40842092

http://stackoverflow.com/q/26139493
linked to: http://stackoverflow.com/q/9990173
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40972801
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/40972585
has body: In my web application (which includes JSP and Struts2) I'm having a menu which is a html table and the rows of the table are dynamically added. As it is obvious, when the rows were added then the table height will be increased. But I need to limit this table's height to a certain amount using CSS (max-height). So, for this scenario I used below css. This worked perfectly in Firefox and Chrome browsers but didn't work for Internet Explorer (verified in IE9 and IE10. IE8 and below exempted). CSS class: .menuLimit { display: block !important; max-height: 105px !important; overflow-y: hidden !important; } HTML tag: &lt;li&gt; &lt;table class="menuLimit"&gt; &lt;c:forEach ... ... ... Is max-height property doesn't support for IE browsers or am I doing any other mistakes here? Please help.
has comment: http://stackoverflow.com/comment/40973278
has comment: http://stackoverflow.com/comment/40972273
has comment: http://stackoverflow.com/comment/40974194
has answer: http://stackoverflow.com/a/26140059
has comment: http://stackoverflow.com/comment/40972272
has comment: http://stackoverflow.com/comment/40972671
has comment: http://stackoverflow.com/comment/40972463
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/40972536
tagged with: javascript
has comment: http://stackoverflow.com/comment/40973141
has comment: http://stackoverflow.com/comment/40972466
score: 0
has title: HTML table height doesn't limit in IE

http://stackoverflow.com/comment/40977262
score: 0
type: Comment
type: QuestionComment
has text: Remove the ^ in your regex
comment on: http://stackoverflow.com/q/26142148

http://stackoverflow.com/comment/40844501
score: 0
has text: Why would you ignore all frameworks and libs? I mean I guess if you like to pretend its 1999 that is cool... but... why? LOL
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26068850

http://stackoverflow.com/comment/40986599
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26146352
type: AnswerComment
has text: i uploaded my menu here, as it was from the beginning, i hope it's bit easier for you to solve this problem now: http://www.filedropper.com/menu3

http://stackoverflow.com/q/26069979
linked to: http://stackoverflow.com/q/32322107
type: AnsweredQuestion
score: 6
tagged with: http
type: Question
tagged with: javascript
tagged with: get
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26070065
has title: Error: ENOENT, no such file or directory Node JS
upvote count: 6
accepted answer: http://stackoverflow.com/a/26070065
has body: I am trying to upoad and download images to the server via Node.js and I am using the below code: var http = require('http'), path = require('path'), os = require('os'), fs= require('fs'),url = require('url'); var Busboy = require('busboy'); http.createServer(function(req, res) { if (req.method === 'POST') { var busboy = new Busboy({ headers: req.headers }); busboy.on('file', function(fieldname, file, filename, encoding, mimetype) { var saveTo = ".\\Images\\"+filename; file.pipe(fs.createWriteStream(saveTo)); }); busboy.on('finish', function() { res.writeHead(200, { 'Connection': 'close' }); res.end("That's all folks!"); }); return req.pipe(busboy); } else{ var request = url.parse(req.url, true); console.log(request); var action = request.pathname; console.log(action); if (action !== '/') { var img = fs.readFileSync('.'+action); res.writeHead(200, {'Content-Type': 'image/gif' }); res.end(img, 'binary'); } else { res.writeHead(200, {'Content-Type': 'text/plain' }); res.end('Hello World \n'); } } res.writeHead(404); res.end(); }).listen(8082, function() { console.log('Listening for requests'); }); When I try to get the image from this server using HTTP GET at http://localhost:8082/images/betty.jpg, the request is fulfilled and the image is recieved but it also throws the error below: ^ fs.js:438 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^ Error: ENOENT, no such file or directory 'D:\ImageUploadService\favicon.ico' at Object.fs.openSync (fs.js:438:18) at Object.fs.readFileSync (fs.js:289:15) at Server.&lt;anonymous&gt; (D:\ImageUploadService\service.js:27:20) at Server.emit (events.js:98:17) at HTTPParser.parser.onIncoming (http.js:2112:12) at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:121:23 ) at Socket.socket.ondata (http.js:1970:22) at TCP.onread (net.js:527:27) 'D:\ImageUploadService\favicon.ico' at Object.fs.openSync (fs.js:438:18) at Object.fs.readFileSync (fs.js:289:15) at Server.&lt;anonymous&gt; (D:\Im…
tagged with: node.js

http://stackoverflow.com/comment/40878234
type: AnswerComment
score: 0
type: Comment
has text: You've described perfectly well what isn't happening when you've attempted this, but you've not described what is happening. Is it giving a `404`? This suggests that it's looking for `goto.php` in a different place to where you saved it (I assumed it'd be in the root of your domain)
comment on: http://stackoverflow.com/a/26087359

http://stackoverflow.com/q/26179715
linked to: http://stackoverflow.com/q/10312963
score: -1
favorite count: 0
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/10312963
has body: I would like to re run a the same function after x amount of seconds. the X changes every time the function is ran like the example i have provided below but the code below does not wait half a second before fireing the function again, it just instantly runs the function in an infinite loop test(); var interval = 500 function test() { interval = interval + 500; console.log("1"); setTimeout(test(), interval); }
downvote count: 1
has title: Run function again after x amount seconds
has answer: http://stackoverflow.com/a/26179753
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41046959

http://stackoverflow.com/comment/40805928
type: Comment
type: QuestionComment
score: 6
comment on: http://stackoverflow.com/q/26048074
has text: `ar` has a length of `0`. `i` is equal to `0`. your for loop will not iterate.

http://stackoverflow.com/q/26112347
has answer: http://stackoverflow.com/a/26155035
tagged with: unit-testing
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26155035
type: Question
has title: Not able to inject logger
tagged with: javascript
tagged with: jasmine
score: 0
answer count: 1
tagged with: angularjs
has body: app.admin.routes.js (function () { 'use strict'; angular .module('app.admin') .run(appRun); appRun.$inject = ['routeHelper', 'app.core.services.notificationService']; function appRun(routeHelper, notificationService) { debugger; routeHelper.configureRoutes(getRoutes()); function getRoutes() { return [ { state: 'admin', url: '/admin', templateUrl: 'app/features/admin/admin.html', controller: 'Admin as vm', resolve: { // signalRConnection: function() { // return notificationService.onReady; // } }, settings: { navigation: { group: "application", label: "Admin", //label: "navigation.admin", icon: "fa-lock", order: 2 } //content: ' Admin' } } ]; } } })(); admin.js (function () { 'use strict'; angular .module('app.admin') .controller('Admin', Admin); Admin.$inject = ['logger']; function Admin(logger) { /*jshint validthis: true */ var vm = this; vm.title = 'Admin'; activate(); function activate() { logger.info('Activated Admin View'); } } })(); adminctrlSpec.js describe("AdminController", function () { var _logger; beforeEach(function() { module("app.admin", function ($provide) { $provide.value('routeHelper', { configureRoutes: function(routes) { } }); $provide.value('app.core.services.notificationService', { signalRConnection: function () { } }); }); }); beforeEach(function () { inject([ 'logger', function (logger) { debugger; } ]); }); it("asd", function() { debugger; }); }); I am able to use logger in all of my other Specs. But unable to inject for admin.js. beforeEach(function () { > inject([ > 'logger', function (logger) { > debugger; > } > ]); > }); Error: [$injector:unpr] Unknown provider: loggerProvider <- logger

http://stackoverflow.com/q/26182858
possible better answer: http://stackoverflow.com/a/27364693
type: Question
answer count: 2
has title: HTTP 400 Bad Request when using getfilebyserverrelativeurl or getfolderbyserverrelativeurl
has answer: http://stackoverflow.com/a/26186425
tagged with: javascript
tagged with: sharepoint
has answer: http://stackoverflow.com/a/27364693
favorite count: 0
upvote count: 3
tagged with: rest
has body: I have been trying to setup a basic CRUD operations sample SharePoint 2013 App. I have a developer template site setup (e.g. reporting.domain.com/sites/dev). Inside that site I have a "Document Library" app/list setup with a file. I have given "web" write permissions in the manifest. What I need is to do the basic CRUD operations via the REST API. Right now I am just trying the get and delete operations. I get a 400 "Bad Request" back. I am totally stuck. Ideas? <?xml version=\"1.0\" encoding=\"utf-8\"?> -2147024809, System.ArgumentException Value does not fall within the expected range. Here is the javascript code I am using. gethostWebTitleAndCreated works but neither getReport or deleteReport work (function () { 'use strict'; var hostweburl, appweburl; // Function to retrieve a query string value. // For production purposes you may want to use // a library to handle the query string. function getQueryStringParameter(paramToRetrieve) { var params, i, singleParam; params = document.URL.split("?")[1].split("&"); for (i = 0; i < params.length; i = i + 1) { singleParam = params[i].split("="); if (singleParam[0] === paramToRetrieve) { return singleParam[1]; } } } function gethostWebTitleAndCreated() { var url = appweburl + "/_api/SP.AppContextSite(@target)/web?@target='" + hostweburl + "'" + "&$select=title,created"; $.ajax( { url: url, type: "GET", headers: { "accept": "application/json;odata=verbose", "contentType": "application/json;odata=verbose" }, success: function (data) { $(" ", { text: data.d.Title }).appendTo("#output"); }, error: function (err) { $(" ", { text: JSON.stringify(err) }).appendTo("#output"); } } ); } function deleteReport() { var executor = new SP.RequestExecutor(appweburl); executor.executeAsync({ url: "../_api/SP.AppContextSite(@target)/web" + "/getfilebyserverrelativeurl('/Custom Reports/NewReport.rdlx')" + "?@target='" + hostweburl + "'", method: "POST", headers: { "X-HTTP-Method": "DELETE", "X-RequestDigest": jQuery("#__REQUESTDIGEST").val(…
downvote count: 0
tagged with: sharepoint-2013
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/26186425

http://stackoverflow.com/a/26143649
answers question: http://stackoverflow.com/q/26143576
has body: If you're using jQuery (to make AJAX simpler than vanilla JS) it would look like this: $.post('http://example.com/result.php', { name: value }, function(data) { // data -&gt; returned HTTP request });
has comment: http://stackoverflow.com/comment/41052404
score: 0
has comment: http://stackoverflow.com/comment/41056171
type: Answer

http://stackoverflow.com/a/26073819
answers question: http://stackoverflow.com/q/26073471
has body: There multiple ways to count months and days. Without further restrictions all correct of them are correct even though the results might differ. For example from September 27 to November 1 could be either 1 month and 5 days or 4 days and 1 month. This is one possible solution. // swap dates if difference would be negative if (firstDate.getTime() &gt; secondDate.getTime()) { var tmp = firstDate; firstDate = secondDate; secondDate = tmp; } var years = secondDate.getFullYear() - firstDate.getFullYear(); var months = secondDate.getMonth() - firstDate.getMonth(); var days = secondDate.getDate() - firstDate.getDate(); // prevent negative amount of days by breaking up months for (var i = 0; days &lt; 0; ++i) { // while the day difference is negative // we break up months into days, starting with the first months -= 1; days += new Date( firstDate.getFullYear(), firstDate.getMonth() + 1 + i, 0, 0, 0, 0, 0 ).getDate(); } // prevent negative amount of months by breaking up years if (months &lt; 0) { years += Math.floor(months / 12); months = (months % 12 + 12) % 12; } // print the result console.log([ {amount: days, unit: 'day'}, {amount: months, unit: 'month'}, {amount: years, unit: 'year'}, ].filter(value =&gt; value.amount).map(value =&gt; value.amount === 1 ? `${value.amount} ${value.unit}` : `${value.amount} ${value.unit}s` ).reduce((result, part, index, parts) =&gt; index &gt; 0 ? index === parts.length - 1 ? `${result} and ${part}` : `${result}, ${part}` : `${part}`, `0 days` )); Examples: 02/12 to 02/22: 10 days 09/27 to 11/01: 4 days and 1 month // instead of 1 month and 5 days 12/31 to 03/01: 1 day and 2 months // instead of 1 month and 29 days 05/31 to 06/30: 30 days 01/31 to 03/30: 30 days and 1 month // instead of 1 month and 27 days 10/27/2010 to 08/26/2014: 30 days, 9 months and 3 years
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40854116
has comment: http://stackoverflow.com/comment/40944408
has comment: http://stackoverflow.com/comment/40854199
type: Answer
has comment: http://stackoverflow.com/comment/40853697
accepted answer of: http://stackoverflow.com/q/26073471
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/40892314

http://stackoverflow.com/comment/40841036
type: Comment
comment on: http://stackoverflow.com/q/26066921
type: QuestionComment
has text: I guess I am not following how your input relates to your output or what constitutes a "combination" in your case. Why is there no `{a:2, b:4}` in your output for example? What is difference between object that have single key value and those that have multiple key/values pairs?
score: 0

http://stackoverflow.com/comment/40920364
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26110112
type: Comment
has text: I'm not sure what you mean by "I have a table view which is my array"...a TableView is a View object not an array. Do you mean you want to append a row to an existing tableview? If so, use the appendRow method http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.UI.TableView If not....please clarify :)

http://stackoverflow.com/comment/40919967
score: 1
type: Comment
type: QuestionComment
has text: Misiing `scope: this` on the button config.
comment on: http://stackoverflow.com/q/26110433

http://stackoverflow.com/comment/40944897
type: Comment
type: QuestionComment
has text: Hi! What I want to achieve is fire every registered method, the ones loaded in the callback object, in an "automatic" way, that is, without asking for it within all the methods. It's like an observable, eg: if you register the 'add' method to be triggered, then any time you call it, the event will be fired. From now on, the only way I found is, within the "add" method, ask if it was loaded in the callbacks object and if so, trigger the registered callback. Not nice definitely.
comment on: http://stackoverflow.com/q/26124290
score: 0

http://stackoverflow.com/q/26161495
has answer: http://stackoverflow.com/a/26161565
tagged with: javascript
tagged with: jquery
has title: bootstrap only open collapse that you click on
score: 0
has body: Hi all im trying out using botstraps "collapse" element for spoiler bbcode tags and it looks great, but I do have one issue. If you have more than one collapse on a page and click any of them, it always opens/closes the first one. Is there a way to make it only open/close the one you click on? Right now it just replaces this: "/\[spoiler\](.+?)\[\/spoiler\]/is" With this: ' Spoiler, click to open $1 ' Is there just a simple way to make it only open the one you click on? This is my code right now: // Spoiler $pattern = '/\[spoiler\](.+?)\[\/spoiler\]/is'; $replace = ' Spoiler, click to open $1 '; while(preg_match($pattern, $body)) { $body = preg_replace($pattern, $replace, $body); }
tagged with: css
tagged with: twitter-bootstrap
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26161620
type: Question
answer count: 2

http://stackoverflow.com/comment/40970501
comment on: http://stackoverflow.com/a/26138150
score: 0
type: Comment
has text: @timmack, one more thing you have missed closing `"` in ` `, so please correct it and try
type: AnswerComment

http://stackoverflow.com/q/26130914
tagged with: imagemagick
has answer: http://stackoverflow.com/a/26374572
has body: I am trying to resize an image using ImageMagick and I've referred this example and I am getting this error: { [Error: Command failed: Invalid Parameter - -set ] timedOut: false, killed: false, code: 4, signal: null } Below is my Code: exports.generateThumbnail=function(imageURL,savePath,filename,callback){ console.log(imageURL); console.log(savePath); console.log(filename); var options = { width: 80, height: 80, srcPath: imageURL, dstPath: savePath+"\\thumb_"+filename }; im.resize(options, function(err) { if(err) { console.log( err); } console.log("Image resize complete"); }); } This is everything I am getting in my console: fieldNameHere { _readableState: { highWaterMark: 16384, buffer: [], length: 0, pipes: null, pipesCount: 0, flowing: false, ended: false, endEmitted: false, reading: false, calledRead: false, sync: true, needReadable: false, emittedReadable: false, readableListening: false, objectMode: false, defaultEncoding: 'utf8', ranOut: false, awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: true, domain: null, _events: { end: [Function] }, _maxListeners: 10, truncated: false, _read: [Function] } look.png 7bit image/png .\Images\bhuwan\media\look.pnglook.png .\Images\bhuwan\media look.png { [Error: Command failed: Invalid Parameter - -set ] timedOut: false, killed: false, code: 4, signal: null } Also, I've tried every possible library on npmjs.org including the most poppular ones like easyimage and node-thumbnail. None of them are working on windows and have issues listed on github. What am i doing wrong in this.? Please help.! EDIT: Just in case you need the code in which I am calling the above method: app.post('/uploadImage',function(req,res){ console.log('Starting to read params'); var alias=req.query.alias; var imagetype=req.query.imagetype; //can be media/profile console.log(alias); console.log(imagetype); var busboy = new Busboy({ headers: req.headers }); busboy.on('file', function(fieldname, file, filename, encoding, mime…
answer count: 1
has title: Not able to resize image using ImageMagick Node.js
tagged with: node.js
accepted answer: http://stackoverflow.com/a/26374572
type: AnsweredQuestion
score: 0
linked to: http://stackoverflow.com/q/11703973
type: Question
tagged with: javascript

http://stackoverflow.com/comment/40913268
type: Comment
has text: Just FYI, `className` is not a function, it's a property, use it as `test[0].className` not `test[0].className()`
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26106534

http://stackoverflow.com/q/26088187
has answer: http://stackoverflow.com/a/26104521
type: AnsweredQuestion
tagged with: javascript
has title: Using LevelGraph with MemDOWN
type: Question
score: 0
accepted answer: http://stackoverflow.com/a/26104521
answer count: 1
tagged with: leveldb
has body: I've been trying to use LevelGraph with MemDOWN, but my put and get queries are getting 100 times slower compared with using the filesystem directly with LevelUP. Obviously, I must be doing something wrong. I setup my graph database in the following fashion: var levelgraph = require('levelgraph'); var db = levelgraph('mydb', { db: require('memdown')}); The following works just fine, but is using the filesystem: var levelgraph = require('levelgraph'); var db = levelgraph('mydb'); Any suggestions?
tagged with: node.js

http://stackoverflow.com/comment/40832965
type: Comment
type: QuestionComment
has text: When I save the relevant section of that website to a JSFiddle: http://jsfiddle.net/TrueBlueAussie/3fv8nska/, it appears to show multiple `Next` buttons. Can you check that over first?
comment on: http://stackoverflow.com/q/26061871
score: 0

http://stackoverflow.com/comment/40846067
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26069515
has text: IE6 is no longer supported by Google since 2010. But I know that some times you have to make it work... May I suggest you use Flash Player when the browser detected is IE6? That way, you would be running your video inside the plugin and would not struggle with the javascript in this WWII browser
score: 0

http://stackoverflow.com/q/26056188
favorite count: 0
tagged with: promise
has answer: http://stackoverflow.com/a/31988839
has comment: http://stackoverflow.com/comment/40901552
answer count: 4
has body: I am an heavy javascript prototypes and promises user. My problem is that I need to use .bind(this) to set the right context about every time I thenify my promises. Here is a sample code showing the problem (jsbin): var Q = require('Q'); var AsyncCounter = function(initialValue){ this.value = initialValue; }; AsyncCounter.prototype.increment=function(){ return Q.fcall(function(){ return ++this.value; }.bind(this)); }; AsyncCounter.prototype.decrement=function(){ return Q.fcall(function(){ return --this.value; }.bind(this)); }; var counter = new AsyncCounter(10); counter.increment() .then(function(incrementedValue){ console.log('incremented value:', incrementedValue) }) .then(counter.decrement.bind(counter)) .then(function(decrementedValue){ console.log('decremented value:', decrementedValue) }); See how often I have to rely on bind()? I find it too unelegant. I do know about petkaantonov/bluebird promise library and its very useful bind(scope) function that propagate the scope on callbacks but I feel like there is a better, native way to do it. Does anybody have a proper way to do it?
has answer: http://stackoverflow.com/a/26058488
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40829203
upvote count: 3
possible better answer: http://stackoverflow.com/a/26056367
has answer: http://stackoverflow.com/a/26056367
type: Question
has comment: http://stackoverflow.com/comment/40901581
has comment: http://stackoverflow.com/comment/40900927
has answer: http://stackoverflow.com/a/26058221
tagged with: javascript
tagged with: prototype
accepted answer: http://stackoverflow.com/a/26058221
has title: Elegant callback binding when using promises and prototypes in javascript
score: 3
downvote count: 0

local-storage
tags question: http://stackoverflow.com/q/26124025
tags question: http://stackoverflow.com/q/26062710
tags question: http://stackoverflow.com/q/26086081
tags question: http://stackoverflow.com/q/26065386
tags question: http://stackoverflow.com/q/26117820
tags question: http://stackoverflow.com/q/26099938
tags question: http://stackoverflow.com/q/26068180
tags question: http://stackoverflow.com/q/26170448
tags question: http://stackoverflow.com/q/26045307
tag name: local-storage
tags question: http://stackoverflow.com/q/26181218
tags question: http://stackoverflow.com/q/26106872
tags question: http://stackoverflow.com/q/26138621
tags question: http://stackoverflow.com/q/26092121
tags question: http://stackoverflow.com/q/26042783
tags question: http://stackoverflow.com/q/26051578
tags question: http://stackoverflow.com/q/26073810
tags question: http://stackoverflow.com/q/26139948
tags question: http://stackoverflow.com/q/26042423
type: Tag
tags question: http://stackoverflow.com/q/26123114
tags question: http://stackoverflow.com/q/26160759

http://stackoverflow.com/comment/40909251
comment on: http://stackoverflow.com/q/26104442
type: QuestionComment
type: Comment
has text: @DeepThought I have edited my question. It should be clearer now.
score: 0

http://stackoverflow.com/comment/41036036
comment on: http://stackoverflow.com/q/26173132
type: Comment
type: QuestionComment
score: 0
has text: @ JLRishe Yes, I can see the table

http://stackoverflow.com/comment/40998913
type: QuestionComment
comment on: http://stackoverflow.com/q/26153647
type: Comment
has text: Looks like your Postitnote.png file is quite big. Maybe try to reduce the images size ? Or preload ? I know it's complicated but would it be possible to reproduce in a fiddle ?
score: 0

http://stackoverflow.com/comment/40781428
has text: @Andrea could you expand on your answer please. Thanks
comment on: http://stackoverflow.com/q/26034471
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26147064
has comment: http://stackoverflow.com/comment/61349790
has title: Print Iframe with PDF generated on the fly IE 11
has comment: http://stackoverflow.com/comment/61338013
tagged with: internet-explorer
type: Question
has answer: http://stackoverflow.com/a/36892757
answer count: 1
tagged with: javascript
score: 4
tagged with: http://stackoverflow.com/tag/pdf
favorite count: 0
has body: I wanted to print a pdf which is generated on the fly in an Iframe, but can't get that print this pdf file. This is what i have now, am i doing something wrong?. Works fine on Google Chrome but not on IE 11. Please help me to get this work. Thanks in advance this is the HTML markup &lt;div id="contractFrameContainer" class="modal-body row"&gt; &lt;iframe id="contractIframe" name="contractIframe" width="100%" src=""&gt;&lt;/iframe&gt; &lt;/div&gt; Here is my javascript where i assign the src of the iframme with the dynamic URL (this url generates the pdf) var url = currentUrl + '/contracts/createpdf?ProductId=' + Id + '&amp;type=' + Type + '&amp;term=' + Term + '&amp;deductible=' + Deductible + '&amp;key=' + OrderNumber + '&amp;financedAmount=' + financedAmount + '&amp;downpayment=' + downpayment + '&amp;apr=' + apr + '&amp;tire=' + tireRotation + '&amp;interval=' + interval + '&amp;salesPrice=' + salesPrice + '&amp;dealerCost=' + DealerCost + '&amp;mileage=' + Mileage + '&amp;serviceDate=' + serviceDate + '&amp;penSurcharges=' + penSurcharges + '&amp;price=' + Price; var iframe = document.getElementById("contractIframe"); iframe.height = heightBody; iframe.src = url; And finally here is where i try to print document.getElementById('contractIframe').focus(); document.getElementById('contractIframe').contentWindow.print(); On IE 11 this send me the error "Invalid calling object" I tried this too without success: window.frames["contractIframe"].focus(); window.frames["contractIframe"].print();
downvote count: 0
type: UnansweredQuestion
tagged with: iframe
upvote count: 4

http://stackoverflow.com/comment/40806404
type: Comment
type: QuestionComment
has text: Lovely [sql injection attack](http://bobby-tables.com) vulnerabilities. Enjoy having your server pwn3d.
comment on: http://stackoverflow.com/q/26048351
score: 0

http://stackoverflow.com/a/26238993
answers question: http://stackoverflow.com/q/26170631
score: 0
has body: You could do that with this (ugly) code: // main.js var app = angular.module('myApp', ['ngGrid']); app.controller('MyCtrl', function($scope) { $scope.myData = [{ name: "Moroni", age: 50, value: "" }, { name: "Tiancum", age: 43, value: "" }, { name: "Jacob", age: 27, value: "" }, { name: "Nephi", age: 29, value: "" }, { name: "Enos", age: 34, value: "" }]; $scope.incl_names = false; $scope.incl_ages = false; $scope.incl_values = false; $scope.filtered = []; //first loop: find empty columns angular.forEach($scope.myData, function(row) { if (row.name != "") { $scope.incl_names = true; } if (row.age != "") { $scope.incl_ages = true; } if (row.value != "") { $scope.incl_values = true; } }); //second loop: build new array angular.forEach($scope.myData, function(row) { var build = []; if ($scope.incl_names) { build.name = row.name; } if ($scope.incl_ages) { build.age = row.age; } if ($scope.incl_values) { build.value = row.value; } $scope.filtered.push(build); }); $scope.gridOptions = { data: 'filtered' }; }); This checks in the first loop which columns are empty and sets up some booleans. Then in the second loop it creates a new array depending on the switches and then tells ng-grid to use the new array. Of course this is not big fun with 25+ columns and you may also run into issues if you have columnDefs in your grid. Anyhow, try it out here. Just enter a value in the last column (value) of the json.
accepted answer of: http://stackoverflow.com/q/26170631
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41157732
type: Answer

http://stackoverflow.com/comment/40790833
type: Comment
comment on: http://stackoverflow.com/a/26039191
type: AnswerComment
has text: I would guess that it is @papmooo but cannot be sure because I am not familiar with your whole application.
score: 0

http://stackoverflow.com/comment/92664020
score: 1
type: AnswerComment
has text: +1 Actually used this today and works great! Only one note (tested on AEM 6.3.2): in our case we wanted to add our class before executing the WCMComponentFilter. The "order" should then be above 200 since WCMComponentFilter has rank 200. A higher rank means its executed earlier.
type: Comment
comment on: http://stackoverflow.com/a/26118267

http://stackoverflow.com/comment/40871481
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26083969
score: 0
has text: Thought maybe some ready module for this

http://stackoverflow.com/comment/40909591
score: 0
type: Comment
has text: @krozero this works in FF too. But it refreshes the page, which should be avoided. Anything else I can change to prevent that?
type: QuestionComment
comment on: http://stackoverflow.com/q/26104378

http://stackoverflow.com/a/26122262
has comment: http://stackoverflow.com/comment/40941297
has comment: http://stackoverflow.com/comment/40941387
answers question: http://stackoverflow.com/q/26121276
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26121276
downvote count: 0
has comment: http://stackoverflow.com/comment/40941671
has comment: http://stackoverflow.com/comment/40941909
has comment: http://stackoverflow.com/comment/40941581
type: Answer
score: 2
upvote count: 2
has body: I'm afraid it's still really, really unclear what the specific problem is (and the sample result sets you posted don't provide any clarity on why you can't simply loop over them), but I'm willing to take a guess... Is the problem that you're trying to write a dynamic set of results to a static set of placeholders for the output? If that's the case, don't make the placeholders static. Just keep an empty space where you want the results to show and when you have the results, write them to that part of the page. You don't need HTML elements in place already, you can create them dynamically. For example: success: function (msg) { // let's assume msg is an array of data for(var i = 0; i < msg.lengh; i++) { $('#output').append( ' ' + msg[i].DASH_NAME + ' - ' + msg[i].DASHSTATUS + ' ' ); } } So if your #output is just a div, the result would look like this: SEND CONFIRMED - 1 RECV HO RESPONDED - 4 RECV HO PAID - 3 How you define and style that markup is entirely up to you, of course. The point is that you can create the markup on the fly from your JavaScript code, so it can be created dynamically based on the results from the AJAX request.

http://stackoverflow.com/comment/41071821
type: AnswerComment
comment on: http://stackoverflow.com/a/26192924
score: 0
type: Comment
has text: Thank you, well, we have no get on the box and no jquery. Is it possible to look for the `"HTTP request sent, awaiting response... 200 OK"` answer? Because, we have other plugins too, which will deliver a webinterface, so we could adapt this for other plugins. To clear this up, i am no developer, our project currently only has two main developers, who work on other things and some contributers. I only try to fix and extend the webinterface a little bit with my poor html knowledge ...

http://stackoverflow.com/q/26190211
upvote count: 3
has answer: http://stackoverflow.com/a/26191372
type: Question
tagged with: recursion
type: AnsweredQuestion
has body: You have an array of objects you're iterating over, How would you surround every (x) elements with (element)? If your goal is: to have an (element) surrounding every 4 ng-repeated elements? surrounding ng-repeated-elem ng-repeated-elem ng-repeated-elem ng-repeated-elem / surrounding ng-repeated-elem ng-repeated-elem ng-repeated-elem ng-repeated-elem / to have an (element) surrounding every 2 groups of 4 ng-repeated elements complicated surrounding ng-repeated-elem ng-repeated-elem ng-repeated-elem ng-repeated-elem / surrounding ng-repeated-elem ng-repeated-elem ng-repeated-elem ng-repeated-elem / / complicated surrounding ng-repeated-elem ng-repeated-elem ng-repeated-elem ng-repeated-elem / surrounding ng-repeated-elem ng-repeated-elem ng-repeated-elem ng-repeated-elem / / Normal usage of ng-repeat: {{ex.a}} {{ex.b}} would output: a b a b a b a b how could you get the ng-repeat to output this: a b a b a b a b
accepted answer: http://stackoverflow.com/a/26191372
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Advanced structuring: Surrounding ngRepeated items Angular.js
tagged with: angularjs
score: 3
possible better answer: http://stackoverflow.com/a/26318723
tagged with: angularjs-ng-repeat
has answer: http://stackoverflow.com/a/26318723

http://stackoverflow.com/a/26053438
answers question: http://stackoverflow.com/q/26053309
type: Answer
score: 2
downvote count: 0
has body: If you look in the developertools you can see that they are changing the images, as you mentioned. You could recreate this with jQuery, use something like this: $(function(){ $(window).scroll(function() { var aTop = $('#animationContainer').height(); var framesShown = 0; var framesTotal = 10; if($(this).scrollTop()&gt;=aTop){ if(framesShown != framesTotal) { e.preventDefault() showNextFrame(framesShown + 1); framesShown++; } } }); }); This code is not intended to be functional
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26053309

http://stackoverflow.com/comment/41020961
comment on: http://stackoverflow.com/q/26165311
type: Comment
has text: That is a likely cause. The easy solution is to use the value attr instead of index, but you really shouldn't manage pricing client side
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41018227
score: 2
has text: What do you mean by not looking smooth? The smallest unit that can be displayed on the screen is the pixel. That's what the screen resolution is measured by.
comment on: http://stackoverflow.com/q/26163999
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40920311
type: Comment
type: QuestionComment
score: 1
has text: And you're using HTML comments inside a script. Please change it for // or /* */ when needed.
comment on: http://stackoverflow.com/q/26110752

http://stackoverflow.com/a/26063677
type: Answer
score: 5
upvote count: 5
has comment: http://stackoverflow.com/comment/40834544
has comment: http://stackoverflow.com/comment/40834637
answers question: http://stackoverflow.com/q/26063621
downvote count: 0
has body: For Non-jQuery Solution: window.onload = function(){ YOUR CODE HERE; }; For jQuery Solution: $(document).ready(function(){ CODE HERE; }); Greetings

http://stackoverflow.com/a/26056287
has body: I think the flicker is because you are calculating the position of the .navigation div on window scroll. So remove that code and just give position:fixed to the .navigation div in css. Which will force the div to be fixed to the window. Please note the fixed div will be relative to the window and not to its relative parent. In the demo I have just given !important to the position css to override the dynamic value. DEMO Hope this helps.
answers question: http://stackoverflow.com/q/26055845
score: 0
accepted answer of: http://stackoverflow.com/q/26055845
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/40859329
has text: Is the plus sign in +d.ID necessary in the rateById function? The .ID values are non-integer.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26076957

http://stackoverflow.com/a/26099622
has comment: http://stackoverflow.com/comment/40900338
has comment: http://stackoverflow.com/comment/40900468
type: Answer
has comment: http://stackoverflow.com/comment/40900292
has body: You need not to use for loop, just increment i inside setInterval $(document).ready(function(){ var img_array = [1, 2, 3, 4, 5, 6, 7], i = 0; var len = img_array.length; setInterval(function(){ $('main').css('background-image', function(){ return( 'url(images/main-bg' + img_array[i] + '.jpg)'); }); //increment here i++; // if variable value equal to array length then reset 'i' if(i==len)i=0; }, 5000); });
has comment: http://stackoverflow.com/comment/40900224
answers question: http://stackoverflow.com/q/26099532
has comment: http://stackoverflow.com/comment/40900434
score: 0
has comment: http://stackoverflow.com/comment/40900117

http://stackoverflow.com/comment/40967218
type: QuestionComment
comment on: http://stackoverflow.com/q/26136360
score: 1
has text: If you want to make use of methods of $scope, you need to inject it. This, is just a plain JS function. it does not inherit from scope. (it is placed on/into the scope, but that's not relevant to your question)
type: Comment

http://stackoverflow.com/q/26172732
has comment: http://stackoverflow.com/comment/41034508
tagged with: firefox-addon
has comment: http://stackoverflow.com/comment/41034421
has answer: http://stackoverflow.com/a/26174960
accepted answer: http://stackoverflow.com/a/26174960
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41065542
type: Question
has title: How to open popup from Firefox addon (document.write is not working)
has body: I would like to be able to open a popup window into a new tab, or whatever works, from within my Firefox addon after the injected script is completed. The injected script gets html data from the open webpage that is shown in the current tab. This code works in Google Chrome. Unfortunately, I cannot get this to work in Firefox as the newly opened tab is opened without any HTML. Here is my code | main.js var self = require("sdk/self"); var tabs = require("sdk/tabs"); var button = require("sdk/ui/button/action").ActionButton({ id: "style-tab", label: "Style Tab", icon: "./icon-16.png", onClick: function() { worker = tabs.activeTab.attach({ contentScriptFile: self.data.url("getPagesSource.js") }); worker.port.emit("getSource"); } }); getPagesSource.js //Do some Node.js stuff here and store into the "newHTML" variable var newHTML = "&lt;html&gt;&lt;body&gt;&lt;p&gt;70 Lines of HTML&lt;p&gt;&lt;/body&gt;&lt;/html&gt;"; var myWindow = window.open("", "_blank"); myWindow.document.write(newHTML); self.port.on("getSource", function() { DOMtoString(document); }); I am getting the below error in the console afterward: console.error: my-addon: Message: Error: Permission denied to access property 'document'
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/40794612
type: AnswerComment
has text: Thanks Andy for everything
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26041464

http://stackoverflow.com/comment/40831407
type: QuestionComment
comment on: http://stackoverflow.com/q/26062077
type: Comment
score: 0
has text: How much memory are we talking for how many frames? Of course it's going to use *some* memory.

http://stackoverflow.com/comment/40823917
score: 0
has text: I just put the first section to java script, and second to a new file called "parseurl.php" but I put url to the url box, there is nothing happen.
type: Comment
comment on: http://stackoverflow.com/a/26058222
type: AnswerComment

http://stackoverflow.com/comment/40939096
type: Comment
comment on: http://stackoverflow.com/q/26121276
type: QuestionComment
score: 0
has text: @Dilip: The conversation about the use of `eval()` is parallel to the question being asked. I realize that the immediate problem isn't the use of `eval()`, but what we're trying to tell you is that you *probably* shouldn't be using `eval()` in this case anyway. It's not necessary, error-prone, and only going to make debugging this more difficult for you. As for the actual issue... Again, are you just asking how to *write a loop*?

http://stackoverflow.com/comment/40820934
score: 0
has text: You need to pass this `slide_jump` value to the other page, this could be done by appending a parameter to the URL query string. Such as `www.example.com?jump=42`, then you need to work out how to retrieve that value in your page 2 `$(window).load()` event (I can't remember of the top of my head, otherwise would put as an answer)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26056473

http://stackoverflow.com/q/26115187
favorite count: 0
type: UnansweredQuestion
has body: I want to integrate my jQuery Autocomplete field with google maps. So that the field brings up results from my predefined array and it resolves to google maps at the same time. My code: var autocompleteService = new google.maps.places.AutocompleteService(); var autocompleteList = []; var eventsList = ["event1","event2"]; $("#edtSearch").autocomplete({ source: eventsList }).on("autocompleteopen",function(event){ autocompleteList = eventsList.slice(0); autocompleteService.getQueryPredictions({input: $(this).val()}, function(predictions, status){ if (status != google.maps.places.PlacesServiceStatus.OK) { console.log(status); return; } for (var k = 0, prediction; prediction = predictions[k]; ++k) { prediction = String(prediction.description).replace(/,/g,""); autocompleteList.push(prediction); } $("#edtSearch").autocomplete({ source: autocompleteList }); $("#edtSearch").autocomplete("search"); console.log(autocompleteList); }); }); html: &lt;input id="edtSearch" type="text" size="50" /&gt; Now this code works, but because "autocompleteopen" and "autocomplete("search")" call the same thing, I get a repeating loop for the action and eventually "OVER_QUERY_LIMIT " in the console. My question is, how do I correctly bind the event so that they don't call each other recursively? I've tried using var edtSearch = document.getElementById("edtSearch"); edtSearch.addEventListener("keypress",function(){}); and similiar solutions but the error I get is "Uncaught Error: Missing parameter. You must specify input". How can I solve this problem?
score: 1
upvote count: 1
type: Question
tagged with: google-maps
has title: Integrate google maps autocomplete with jquery autocomplete
tagged with: autocomplete
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/31881783
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/123616447
has text: The below mentioned add-ons don't work anymore with newer FF versions. I added an alternative answer to the above mentioned duplicate.
comment on: http://stackoverflow.com/q/26147233
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/26087775
type: Answer
has comment: http://stackoverflow.com/comment/40879048
has comment: http://stackoverflow.com/comment/40878696
answers question: http://stackoverflow.com/q/26087184
upvote count: 2
has comment: http://stackoverflow.com/comment/40878997
has comment: http://stackoverflow.com/comment/40878951
has comment: http://stackoverflow.com/comment/40879137
has comment: http://stackoverflow.com/comment/40878799
score: 2
has comment: http://stackoverflow.com/comment/40878975
accepted answer of: http://stackoverflow.com/q/26087184
type: AcceptedAnswer
downvote count: 0
has body: Nested Ajax calls work. There are some drawbacks though: If you're doing real error handling, it can get quite messy with multiple nested ajax calls and you often end up repeating error handling at every level of the nesting. In some people's opinion, deep nesting can lead to less readable code than other techniques If any code in the nesting can throw exceptions, you need a lot of exception handlers to properly catch all the exceptions and it's difficult to propagate the errors cleanly - because these are async callbacks, you can't just catch the exceptions in one place. See Edits at End of Answer Now that the Intent of the Question has been Clarified As for other ways to do this, there are some advantages to using promises. Since none of your calls depends upon the previous set of calls and you just want to insert the results in proper order, you can significantly speed up your end-to-end time by sending all the ajax requests at once and then just serialize the results back in order. That can be done with manual coding or it can be done fairly easily with promises. You don't say what promise library you plan to use (there are several), but here's one done using Bluebird (though the code would be similar or identical with other libraries): (function() { // downloadAsync now returns a promise rather than uses a callback function downloadAsync(url) { return new Promise(function(resolve, reject) { var httpRequest = new XMLHttpRequest(); httpRequest.onreadystatechange = function() { if (httpRequest.readyState === 4) { if (httpRequest.status === 200) { resolve(httpRequest.responseText); } else { reject(httpRequest.status); } } } httpRequest.open("GET", url, true); httpRequest.send(); } } function renderData(data) { //data render logic } var items = ["mathmatics.json", "science.json", "english.json"]; var promises = items.map(function(path) { return downloadAsync(path); }); // Promise.all collects all the promise results and // calls .then only when all the promises have…
has comment: http://stackoverflow.com/comment/40879025
has comment: http://stackoverflow.com/comment/40878729

http://stackoverflow.com/comment/41006291
score: 1
has text: This is a really bad way to choose links. For instance you are now dependent on the misspelling of `Sagittarius` (it has one `g` - I happen to be a Sagittarius). Better off putting the links into the page (as data- attributes?). :)
comment on: http://stackoverflow.com/q/26157822
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26160496
has body: I'm trying to assign a number to a variable by using a jQuery function that tests some text from a textarea against some regex. It does not currently assign the value to 'i'. I can only assume that my brackets are incorrectly placed. For bonus 'points' (I got none, seriously) can someone tell me the correct way to assign any variable using jQuery This answer helped me but not with the jQuery : Javascript: How many times a character occurs in a string Here is the code : var i = $('#Input').text().match(/a/g).length; $('button').click( function() { alert(i); }); Alert is there just so I can check if it did it or not
has comment: http://stackoverflow.com/comment/41011701
has comment: http://stackoverflow.com/comment/41011222
upvote count: 1
tagged with: textarea
answer count: 1
has comment: http://stackoverflow.com/comment/41011284
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26160563
accepted answer: http://stackoverflow.com/a/26160563
linked to: http://stackoverflow.com/q/2903542
tagged with: http://stackoverflow.com/tag/html
tagged with: regex
type: AnsweredQuestion
downvote count: 0
type: Question
has title: Error assigning variable type using jQuery
has comment: http://stackoverflow.com/comment/41011203
has comment: http://stackoverflow.com/comment/41011323
has comment: http://stackoverflow.com/comment/41012024
has comment: http://stackoverflow.com/comment/41012090
score: 1

http://stackoverflow.com/q/26139144
downvote count: 1
type: Question
score: -1
has answer: http://stackoverflow.com/a/60527152
has body: I am new to coding Javascript. I am trying to to shuffle list of names inputted on a textarea. The user selects the number of groups desired, and shuffle on click, then show the divided groups as output result. Below is my code but it is not working as it should be, pls help! Below is my input and output textareas
has comment: http://stackoverflow.com/comment/40972903
answer count: 3
has comment: http://stackoverflow.com/comment/40972026
tagged with: arrays
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26140166
has comment: http://stackoverflow.com/comment/40972559
has answer: http://stackoverflow.com/a/26140418
upvote count: 0
has title: making groups with random names in it in javascript
tagged with: list
tagged with: shuffle
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40972217

http://stackoverflow.com/comment/41048402
score: 0
has text: Read carefully the docs of http://docs.meteor.com/#meteor_loginwithexternalservice, it states that you can configure it to pass a "requestPermissions" option, you need to use this to explicitly request the permission to post on user behalf. (you will find the permission name in facebook developers docs, not Meteor).
comment on: http://stackoverflow.com/q/26180313
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26166841
downvote count: 0
score: 4
upvote count: 4
has body: There is no built in way to do this. You would have to manage you own pre-rendering process or internal helper. For the solution I ended up running a pre-render before the official render. Although the code is not handlebars but instead part of the metalsmith-templates plugin, here is the solution I used. This roughly translated to: var contentPassedToHandlebars = { content: '&lt;p&gt;{{ foobar }}&lt;/p&gt;', foobar: 'foo' }; var x = Handlebars.compile(contentPassedToHandlebars.content)(contentPassedToHandlebars); contentPassedToHandlebars.content = x; Handlebars.compile(realTemplateSource)(contentPassedToHandlebars);
type: Answer
answers question: http://stackoverflow.com/q/26163053

http://stackoverflow.com/comment/46352075
score: 3
has text: It will be defined when you use `data-toggle="modal"`
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26188234

http://stackoverflow.com/a/26108125
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26107864
score: 1
has comment: http://stackoverflow.com/comment/40916633
answers question: http://stackoverflow.com/q/26107864
has comment: http://stackoverflow.com/comment/40916569
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40916425
has body: I'm afraid that gameOptons is an Array of strings, therefore what you want to do is this: Because the code that you shared is storing the selected string in the model, and what you want to store is the index, you can do that by using the following syntax in the ng-options directive: ng-options="key as gameDay for (key, gameDay) in gameDayOptions" Working Example
has comment: http://stackoverflow.com/comment/40916336
type: AcceptedAnswer

http://stackoverflow.com/q/26120104
tagged with: javascript
favorite count: 0
type: Question
score: 3
has title: Twitter click event not working
upvote count: 3
has body: I want to trigger a click callback js function on "Tweet". My code is: Tweet There is a Uncaught TypeError: Cannot read property 'ready' of undefined for twttr.ready(). I saw this to be a valid solution at https://stackoverflow.com/a/24698352/1972266, but, as I said, it is not working for me. EDIT: I solved my problem this way: 1. I changed this code: with: I was calling this code: twttr.ready(function (twttr) { twttr.events.bind('click', function (event) { alert('yes'); }); }); on the wrong place in my files. I was calling it on the parent view(my application is ASP.NET MVC) instead in the partial view, where i had my Tweet and . And that was it.
has comment: http://stackoverflow.com/comment/42643875
linked to: http://stackoverflow.com/q/24683865
tagged with: twitter
type: UnansweredQuestion
downvote count: 0
answer count: 0

http://stackoverflow.com/a/26197251
type: Answer
downvote count: 2
has comment: http://stackoverflow.com/comment/41106395
upvote count: 0
score: -2
answers question: http://stackoverflow.com/q/26145778
has body: the URL is accessible by the server in the request object : http.createServer(function(req, res) { var url = req.url console.log(url) //echoes https://username:password@myurl.com/ //do something with url }).listen(8081,'127.0.0.1');

http://stackoverflow.com/comment/40780357
comment on: http://stackoverflow.com/q/26034192
type: Comment
type: QuestionComment
has text: instead of `$("#TaxNumber").data('data-required', true)` it should be only `$("#TaxNumber").data('required', true)`
score: 0

http://stackoverflow.com/comment/40802965
type: AnswerComment
has text: How can 1 character require more than 1 byte? I thought that all ASCII characters were 'equivalent' to 8bits=1byte. This was CS 101 when I was in college.
comment on: http://stackoverflow.com/a/26046334
score: 0
type: Comment

http://stackoverflow.com/comment/40838145
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26064272
type: Comment
has text: Yes, site advisor is known for doing that. You can safely disable it. Did I answer your question?

http://stackoverflow.com/comment/40967696
type: Comment
comment on: http://stackoverflow.com/a/26133797
score: 0
type: AnswerComment
has text: js version? because I have to use js.

http://stackoverflow.com/q/26141692
score: 0
has body: Added fancybog gallery to my website, but it renders incorrectly on Google Chrome. Tested it out with Firefox (Win), Internet Explorer and Safari (Mac) - latest versions. The problem appears only in Chrome (also Chrome Canary). It displays the frame, but its not adjusted to the window. If i scroll down the frame moves. The whole window is dimmed (the picture is dimmed too), and the controls are disappeared. Also the gallery function is broken. I'm using fancyBox 2.1.3 my code: JS: if (jQuery(".fancybox-button").size() > 0) { jQuery(".fancybox-button").fancybox({ groupAttr: 'data-rel', prevEffect: 'none', nextEffect: 'none', closeBtn: true, helpers: { title: { type: 'inside' } } }); } HTML: IMG1 IMG2 IMG3 IMG4 IMG5 Any idea what causes the problem? Thanks.
answer count: 0
type: UnansweredQuestion
tagged with: google-chrome
has title: Fancybox 2 incorrect rendering on Google Chrome
tagged with: fancybox-2
type: Question
has comment: http://stackoverflow.com/comment/40979239
has comment: http://stackoverflow.com/comment/40988202
tagged with: javascript

http://stackoverflow.com/comment/40918653
comment on: http://stackoverflow.com/a/26109706
type: Comment
has text: Nice quess, but I'd rather looking for something like this (but in js not in vb ;-) ): if divWithBigImage.visible=false then divWithSmallImage.visible=true
score: 0
type: AnswerComment

http://stackoverflow.com/q/26184536
upvote count: 2
type: UnansweredQuestion
has title: Angular: Order of custom event handlers & default handler
has body: In my application, I am defining a custom event for which I wish to have default handler in place. If any controller/service wants to override default handling, they can do so by adding their own handler. For implementing this scenario, I added default handler on $rootScope &amp; broadcast the event on $rootScope. I am expecting something like following to work. //defined in .run block $rootScope.$on('customEvent', defaultHandler); //defined inside a controller $scope.$on('customEvent', function customHandler(e){ // handle event e.preventDefault(); }); My problem is since .run block gets executed before any controller is executed, the defaultHandler always gets registered first. As a result, it gets executed first &amp; then the custom handler gets executed. I want the defaultHandler to be executed at the last. I want to avoid adding my own logic of maintaining event handlers list &amp; ensuring that they execute in desired order. Is there any way of achieving this in angular? Thanks.
has answer: http://stackoverflow.com/a/28109279
tagged with: angularjs-scope
type: Question
downvote count: 0
tagged with: javascript
tagged with: event-handling
score: 2
answer count: 1
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/40804647
comment on: http://stackoverflow.com/a/26047295
type: Comment
has text: Without knowing that, it seems to just be "undefined" when called from any controller.
type: AnswerComment
score: 0

http://stackoverflow.com/q/26076817
upvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26076917
has comment: http://stackoverflow.com/comment/40858231
has answer: http://stackoverflow.com/a/26076902
has title: AngularJS - access DOM element from directive
downvote count: 1
type: Question
has body: I am using a directive with a templateURL: function myDirective() { return { restrict: 'E', replace: false, link: function (scope, element, attrs) { element[0].style.height = $(window).height() + 'px'; }, templateUrl: chrome.extension.getURL('./templates/hn_feed_tpl.html') } } In my html, I insert the directive like this: &lt;my-directive&gt;&lt;/my-directive&gt; And the template loaded is very simple: &lt;div class="myDiv"&gt; // some code here &lt;/div&gt; I'd like to access the .myDiv div from the directive code to adjust its height. however when I try to adjust it using element[0] the element selected is &lt;my-directive&gt;&lt;/my-directive&gt;. How can I access the .myDiv div? Many thanks
tagged with: javascript
score: -1
answer count: 2

http://stackoverflow.com/a/26066504
answers question: http://stackoverflow.com/q/26037284
score: 1
upvote count: 1
type: Answer
has body: I find it easier to just call back into the original binding handlers rather than using ko.applyBindingsToNode and controlsDescendantBindings: true So something like this would be my suggestion: ko.bindingHandlers.formatUrl = { changeUrl: function(data) { return appStrap.changeUrl(ko.unwrap(data.url), ko.unwrap(data.id), data.replace); }, init: function(element, valueAccessor, allBindingsAccessor, viewModel, context) { var href = ko.bindingHandlers.formatUrl.changeUrl(valueAccessor()); valueAccessor = function(){ return { href: href }; } return ko.bindingHandlers.attr.init(element, valueAccessor, allBindingsAccessor, viewModel, context); }, update: function (element, valueAccessor, allBindingsAccessor, viewModel, context) { var href = ko.bindingHandlers.formatUrl.changeUrl(valueAccessor()); valueAccessor = function(){ return { href: href }; } return ko.bindingHandlers.attr.update(element, valueAccessor, allBindingsAccessor, viewModel, context); } };
downvote count: 0

http://stackoverflow.com/a/26087037
has body: Here you go: $(document).find('input').each(function(){ $(this).val(''); }); More info on: http://api.jquery.com/val/
score: -1
downvote count: 1
answers question: http://stackoverflow.com/q/26087017
type: Answer
upvote count: 0

http://stackoverflow.com/comment/41053643
comment on: http://stackoverflow.com/q/26182847
type: QuestionComment
has text: remove 'track by item.id'
type: Comment
score: 0

http://stackoverflow.com/q/26186177
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26187142
has title: Hide all content exception made when URL parameter is used
has body: I want to hide my website content exception made when ?token_code=12345678 is used in URL. This is the code that's not working correctly, it hides website but never shows it: I'm calling script by www.example.com/?authtoken=12345678 So when that parameter is included in URL it should show website. But it's not displaying it. It's only hiding it. PS. I'm using cookies to remember "token" :) HTML: &lt;body data-token="12345678"&gt; &lt;/body&gt; JS: //setCookie and readCookie function SetCookie(e, t, n) { var r = new Date; var i = new Date; if (n == null || n == 0) n = 1; i.setTime(r.getTime() + 36e5 * 24 * n); document.cookie = e + "=" + escape(t) + ";expires=" + i.toGMTString() } function ReadCookie(e) { var t = " " + document.cookie; var n = t.indexOf(" " + e + "="); if (n == -1) n = t.indexOf(";" + e + "="); if (n == -1 || e == "") return ""; var r = t.indexOf(";", n + 1); if (r == -1) r = t.length; return unescape(t.substring(n + e.length + 2, r)) } function DeleteCookie(name) { document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;'; } //capitalzies string function capitalize(str) { var first = str.charAt(0).toUpperCase(); str = str.replace(/^.{1}/, first); return str; } // get's the GET paramters like so --&gt; $_GET('var1'); function getVar(variable) { var query = window.location.search.substring(1); var vars = query.split("&amp;"); for (var i = 0; i &lt; vars.length; i++) { var pair = vars[i].split("="); if (pair[0] == variable) { return pair[1]; } } return (false); } // Checks for one of TWO access short codes // includeOnly &amp;&amp; excludeOnly // If includeOnly is not NULL, then ONLY include // categories mentioned in that varaible. // Also, cookie the data, that it's saved. // Of course, if anyone re-visits the site, and // re-writes the GET paramter, it'd delete all // previous data in the cookie. var token_code = ["authtoken", "excludeOnly"]; var asc = ""; //this is used to select the CURRENT access short code var tokenValues = []; //firs…
type: AnsweredQuestion
tagged with: cookies
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26187142
has comment: http://stackoverflow.com/comment/41059631
score: 0
answer count: 1

http://stackoverflow.com/q/26173223
favorite count: 0
accepted answer: http://stackoverflow.com/a/26173288
answer count: 3
has body: I need a popup to open every time you go on the page, so basically on page load. Here's my code: JQUERY ON INDEX.HTML var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-36251023-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google- analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); JAVASCRIPT // Блог Никиты Лебедева, nazz.me/simple-jquery-popup (function($) { $.fn.simplePopup = function() { var simplePopup = { // Обработчики initialize: function(self) { var popup = $(".js__popup"); var body = $(".js__p_body"); var close = $(".js__p_close"); var hash = "#popup"; var string = self[0].className; var name = string.replace("js__p_", ""); // Переопределим переменные, если есть дополнительный попап if ( !(name === "start") ) { name = name.replace("_start", "_popup"); popup = $(".js__" + name); name = name.replace("_", "-"); hash = "#" + name; }; // Вызов при клике self.on("click", function() { simplePopup.show(popup, body, hash); return false; }); $(window).on("load", function() { simplePopup.hash(popup, body, hash); }); // Закрытие body.on("click", function() { simplePopup.hide(popup, body); }); close.on("click", function() { simplePopup.hide(popup, body); return false; }); // Закрытие по кнопке esc $(window).keyup(function(e) { if (e.keyCode === 27) { simplePopup.hide(popup, body); } }); }, // Метод центрирования centering: function(self) { var marginLeft = -self.width()/2; return self.css("margin-left", marginLeft); }, // Общая функция показа show: function(popup, body, hash) { simplePopup.centering(popup); body.removeClass("js__fadeout"); popup.removeClass("js__slide_top"); window.location.hash = hash; }, // Общая функция скрытия hide: function(popup, body) { popup.addClass("js__slide_top"); body.addClass("js__fadeout"); window.l…
has title: How To Make Popup Open Automatically On Page Load?
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26173263
score: 1
linked to: http://stackoverflow.com/q/807271
possible better answer: http://stackoverflow.com/a/26173263
has answer: http://stackoverflow.com/a/26173281
has comment: http://stackoverflow.com/comment/41035391
has answer: http://stackoverflow.com/a/26173288
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40996703
type: QuestionComment
score: 0
has text: Although your answer works, if you'd like to keep using a `PageMod`, check the top of the question I've just posted as a duplicate. Namely, simply add `attachTo: 'top'` in your `PageMod` constructor.
comment on: http://stackoverflow.com/q/26149431
type: Comment

http://stackoverflow.com/comment/41061938
type: Comment
score: 0
has text: You also have to change the direction of the test! Now it's less than, not greater than.
type: AnswerComment
comment on: http://stackoverflow.com/a/26187030

http://stackoverflow.com/comment/40848315
score: 0
type: Comment
type: QuestionComment
has text: They are not in any standard format. YYYY/MM/DD is ISO standard.
comment on: http://stackoverflow.com/q/26070783

http://stackoverflow.com/q/26063187
accepted answer: http://stackoverflow.com/a/26063356
upvote count: 1
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Waypoint.js: Add class when N distance to top
tagged with: jquery-waypoints
has answer: http://stackoverflow.com/a/26063356
answer count: 1
score: 1
favorite count: 0
has body: I dont know if it is easy or not, but i just cant figure out something with Waypoint.js I need to add a class to #stickytop when user reach, for ex, 100px of scroll Any idea how to do this? offset is not working for me. Thanks in advance
type: AnsweredQuestion

http://stackoverflow.com/comment/41042345
comment on: http://stackoverflow.com/q/26177173
type: Comment
type: QuestionComment
score: 1
has text: ` `? Why are you writing HTML 3.2 in 2014?

http://stackoverflow.com/comment/41026356
has text: In minutes field how can we show only 00 to 55 one time, currently with the code u mentioned 00 to 55 is displaying many times in minutes dropdown, please suggest. @Jase.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26168294

http://stackoverflow.com/a/26059382
has body: you are getting an array of objects . Just simply retrieve the object from it's index . $("#currentPlayer").append(playerNameAndType[0]); $("#playerType").append(playerNameAndType[1]);
answers question: http://stackoverflow.com/q/26059060
has comment: http://stackoverflow.com/comment/40826019
score: 0
type: Answer

http://stackoverflow.com/q/26105500
has answer: http://stackoverflow.com/a/26106881
type: Question
tagged with: twitter-bootstrap
tagged with: php
answer count: 1
score: 0
has title: php delete checkbox row with bootstrap dropdown menu
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I have this bootstrap dropdown for set delete/publish/unpublish data in action form: Select Action Delete Publish Unpublish in form I have this html: 2323 Project 09-19-2014 Published 2323 Project 09-19-2014 Published now I need to choose article in checkbox(one rows or multiple rows) than when click in dropdown menu (example delete) my form handle this and delete rows from database using PHP like this: if ($_POST['action'] == "delete") { $selected = $_POST['id']; if (count($_POST['id']) !== 0) { foreach($selected as $uid) { SQL::DELETE("DELETE FROM " . NEWS_ARTICLES . " WHERE id = ?", $uid); } echo " " . $langmsg['editnews'][17] . " "; } } how do can I create this?!

http://stackoverflow.com/comment/40992578
score: 0
type: Comment
type: QuestionComment
has text: Gerald: I'm using Codeacademy and it doesn't do that. Karthikr: Thank you for the help :) Chris: Yea I changed the spelling :P Marlo: I'm using Codeacademy and they want me to use console.log();
comment on: http://stackoverflow.com/q/26150024

http://stackoverflow.com/comment/117521597
comment on: http://stackoverflow.com/a/32516190
has text: @MightyPork I tried with `-` (`trim("-foo--oo---", '-')`), and it doesn't seem to cause any problem. Anyway, The idea of trimming multiple types of space characters sounds interesting enough, I'm going to summarize your idea below the original answer.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26141005
has body: Just capture the characters upto the second / symbol and store it into a group. Then replace the matched characters with the characters inside group 1 plus the string /myusername Regex: ^(\/[^\/]*) Replacement string: $1/myusername DEMO &gt; var r = "/mp3/mysong.mp3" undefined &gt; r.replace(/^(\/[^\/]*)/, "$1/myusername") '/mp3/myusername/mysong.mp3' OR Use a lookahead. &gt; r.replace(/(?=\/[^/]*$)/, "/myusername") '/mp3/myusername/mysong.mp3' This (?=\/[^/]*$) matches a boundary which was just before to the last / symbol. Replacing the matched boundary with /myusername will give you the desired result.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26140947
score: 2
upvote count: 2

http://stackoverflow.com/comment/40802941
type: Comment
comment on: http://stackoverflow.com/a/26046529
type: AnswerComment
score: 0
has text: WOW! The question wasn't that one when I first read it; It was something about "passing POST variables on the URL bar"

class
tags question: http://stackoverflow.com/q/26183111
tags question: http://stackoverflow.com/q/26106821
tags question: http://stackoverflow.com/q/26035094
tags question: http://stackoverflow.com/q/26151489
tags question: http://stackoverflow.com/q/26088207
tags question: http://stackoverflow.com/q/26076728
tags question: http://stackoverflow.com/q/26061120
tags question: http://stackoverflow.com/q/26052367
type: Tag
tags question: http://stackoverflow.com/q/26097686
tags question: http://stackoverflow.com/q/26152600
tag name: class
tags question: http://stackoverflow.com/q/26150650
tags question: http://stackoverflow.com/q/26050985
tags question: http://stackoverflow.com/q/26178519

http://stackoverflow.com/q/26128547
has title: Loop through two jQuery objects simultaneously
downvote count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/26128578
type: Question
answer count: 2
score: -2
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26128652
has comment: http://stackoverflow.com/comment/40952847
has answer: http://stackoverflow.com/a/26128652
has comment: http://stackoverflow.com/comment/40952739
has comment: http://stackoverflow.com/comment/40952741
accepted answer: http://stackoverflow.com/a/26128578
favorite count: 0
has body: I have two jQuery objects of equal length. var foos = $('.foo'); var bars = $('.bar'); If these were arrays, I could loop through them using their index, like this: for(var i = 0; i &lt; foos.length; i++){ foos[i].html(bars[i].html()); } But referencing jquery objects in this manner returns the node itself, not the specific matched jquery object. This can be fixed like this: for(var i = 0; i &lt; foos.length; i++){ $(foos[i]).html($(bars[i]).html()); } but that is not clean/easy to read, and I believe it is inefficient. Is there another way to loop through two jQuery objects simultaneously? Edit: it IS much less efficient, see > http://jsperf.com/js-array-vs-jquery-selector
type: AnsweredQuestion

http://stackoverflow.com/comment/40962571
has text: You can check out the source code yourself :) https://github.com/MeoMix/StreamusChromeExtension/tree/master/src
comment on: http://stackoverflow.com/q/26133889
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26135139
answer count: 2
score: 2
has title: moving from ng-include to ngRoute
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26135244
favorite count: 0
has body: I am new to Angular and learned the basics about it recently. In my current project, I am developing a single page application. As of now, my HTML/JS setup is as per below: HTML: app.js: 'use strict'; var app = angular.module('MyApp',['home']); angular .module('home', []) .directive('homeDir', function(){ return { replace: true, restrict: 'E', templateUrl: 'src/includes/home.html' }; }); This code is working fine but I would like to introduce routing to have better control over the pages, instead of using ng-include. So now, my HTML looks the same and I actually dont know what to change in it while using routing. My app.js now looks like this: 'use strict'; var app = angular.module('MyApp',['home']); // trying to introduce routing: angular .module('home', ['ngResource', 'ngRoute']) .config(['$routeProvider', '$locationProvider'], function($routeProvider, $locationProvider){ $routeProvider. when('/', { templateUrl: 'src/includes/home.html', controller: 'homeCtrl' }). when('/drawer', { redirectTo: 'src/includes/home.html#drawer', controller: 'drawerCtrl' }) .otherwise({ redirectTo: '/' }); // use the HTML5 History API $locationProvider.html5Mode(true); } ); app.controller('homeCtrl', function($scope){ $scope.message = "some message"; console.log("homeCtrl called"); }); app.controller('drawerCtrl', function($scope){ $scope.message = "some other message"; console.log("drawerCtrl called"); }); However, I am getting an error: Error: error:modulerr Module Error As per the link following the error: This error occurs when a module fails to load due to some exception. Why is it not loading? What am I missing? What should I change the HTML to? UPDATE: After including angular-route.min.js, I am getting the error: Error: whole is undefined beginsWith@file:///D:/projects/svn/trunk/src/libs/angular.js:8729:1 LocationHtml5Url/this.$$parse@file:///D:/projects/svn/trunk/src/libs/angular.js:8772:9 $LocationProvider/this.$get<@file:///D:/projects/svn/trunk/src/libs/angular.js:9269:5 in…
has answer: http://stackoverflow.com/a/26135228
has comment: http://stackoverflow.com/comment/40970516
has comment: http://stackoverflow.com/comment/40969814
has comment: http://stackoverflow.com/comment/40969472
tagged with: angularjs
upvote count: 2
has comment: http://stackoverflow.com/comment/40969989
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26135228
has comment: http://stackoverflow.com/comment/40970194
has answer: http://stackoverflow.com/a/26135244
type: Question

http://stackoverflow.com/q/26146425
favorite count: 0
has title: How do I get forwarded to a link that is in a data attribute in html when clicked using jQuery?
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/26146454
accepted answer: http://stackoverflow.com/a/26146454
type: Question
has answer: http://stackoverflow.com/a/26146480
possible better answer: http://stackoverflow.com/a/26146465
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26146465
answer count: 3
has body: I am trying to forward to a link when the div is clicked using a data attribute and jQuery, but am stuck a bit. Here is the code I have: html: click to be forwarded jquery: $('.clickable-icon').attr('data-link'); used google as an example for the link to go to. But how would I use jquery to help with this?
downvote count: 1
tagged with: jquery

http://stackoverflow.com/a/28468075
upvote count: 1
has body: This is how I use it and it works fine : $(selector).scannerDetection(function(data) { onComplete: //whatever you want }); I don't think it's necessary to bind it to your window or document you can straight work it with your selector.
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26165094

http://stackoverflow.com/comment/41118362
has text: I have not tried. I'm not sure whether `$state.transitionTo('404',{},{location:false});` works.
score: 1
comment on: http://stackoverflow.com/q/26181771
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41016947
type: QuestionComment
has text: Rather create an actual element and append that to the ` `. I don't see a reason to use CSS pseude elements for this.
comment on: http://stackoverflow.com/q/26162974
score: 0
type: Comment

http://stackoverflow.com/a/26153196
has body: You could store the value of the previous outline style in a variable before changing it, and then later restore the value of the variable. E.g. var last_el = null; var outline_style = null; $('#mask').mousemove(function(e) { var mask = $(this).detach(); var el = window.document.elementFromPoint(e.clientX, e.clientY); if (el != last_el) { if (last_el) { $(last_el).css('outline', outline_style); } if (el) { outline_style = $(el).css('outline'); $(el).css('outline', '1px solid red'); } last_el = el; } $('body').append(mask); });
has comment: http://stackoverflow.com/comment/40998206
has comment: http://stackoverflow.com/comment/40999823
downvote count: 0
has comment: http://stackoverflow.com/comment/40998085
has comment: http://stackoverflow.com/comment/41028948
answers question: http://stackoverflow.com/q/26153140
has comment: http://stackoverflow.com/comment/41027634
type: Answer
has comment: http://stackoverflow.com/comment/40998143
score: 3
has comment: http://stackoverflow.com/comment/40999745
upvote count: 3
has comment: http://stackoverflow.com/comment/40999706

http://stackoverflow.com/comment/41046228
score: 0
type: Comment
has text: Btw, why don't you just validate the input client-side and do a regular POST (with a submit button). You need to validate the input server-side as well, but if a user tampers with your javascript just to post malicious data then i don't think you need to care about him or her not having his comment being posted :P
type: AnswerComment
comment on: http://stackoverflow.com/a/26179309

http://stackoverflow.com/comment/101369332
comment on: http://stackoverflow.com/a/57446447
type: Comment
score: 1
type: AnswerComment
has text: @AntonMenshov You are right. I expanded my answer, explaining why his desired behavior is still not possible with nesting

http://stackoverflow.com/a/26095346
has comment: http://stackoverflow.com/comment/40922175
downvote count: 0
has body: You cannot simply use messaging the same way you would use it in a content script from an arbitrary webpage's code. There are two guides available in the documentation for communicating with webpages, which correspond to two approaches: (externally_connectable) (custom events with a content script) Suppose you want to allow http://example.com to send a message to your extension. You need to specifically whitelist that site in the manifest: "externally_connectable" : { "matches": [ "*://*.example.com/*" ] }, You need to obtain a permanent extension ID. Suppose the resulting ID is abcdefghijklmnoabcdefhijklmnoabc Your webpage needs to check it's allowed to send a message, then send it using the pre-defined ID: // Website code // This will only be true if some extension allowed the page to connect if(chrome && chrome.runtime && chrome.runtime.sendMessage) { chrome.runtime.sendMessage( "abcdefghijklmnoabcdefhijklmnoabc", {greeting: "yes"}, onAccessApproved ); } Your extension needs to listen to external messages and probably also check their origin: // Extension's background code chrome.runtime.onMessageExternal.addListener( function(request, sender, sendResponse) { if(!validate(request.sender)) // Check the URL with a custom function return; /* do work */ } );
has comment: http://stackoverflow.com/comment/40956501
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26090563
has comment: http://stackoverflow.com/comment/40956558
type: Answer
has comment: http://stackoverflow.com/comment/58066506
score: 14
upvote count: 14
has comment: http://stackoverflow.com/comment/58065976
has comment: http://stackoverflow.com/comment/132249653
accepted answer of: http://stackoverflow.com/q/26090563

http://stackoverflow.com/comment/40979428
type: Comment
type: QuestionComment
has text: Maybe this answer might help: http://stackoverflow.com/questions/1004475/jquery-css-plugin-that-returns-computed-style-of-element-to-pseudo-clone-that-ele
score: 0
comment on: http://stackoverflow.com/q/26143334

http://stackoverflow.com/a/26184507
answers question: http://stackoverflow.com/q/26178753
accepted answer of: http://stackoverflow.com/q/26178753
score: 0
type: AcceptedAnswer
has body: If I understand, for every selection with your autocomplete, you will need to create a hidden input field and add it to the output div. this input will have the id of your item as the value. example of output div: Here i display some info ... Here i display some info of this item Here i display some info All the inner divs will be generated dynamically here: $( "#tags" ).autocomplete({ source: "/script.php", minLength: 2, select: function(event, ui) { var selecteditem= ui.item.id; var $newInput = $("input").attr("type","hidden"). attr("name","ids[]"). attr("value",selectedItem); var $newDiv = $("div").append($newInput); $('#output').append($newDiv); } }); And for receive this values on the php file: $ids = $_POST['ids']; $list_ids = implode(',', $ids); mysqli_query($con, "SELECT * FROM table WHERE id IN ($list_ids);"); hope it helps.
type: Answer
has comment: http://stackoverflow.com/comment/41058176

http://stackoverflow.com/comment/40820829
comment on: http://stackoverflow.com/a/26056559
type: Comment
has text: Not sure this really qualifies as an answer. It's helpful, but still leaves so much of the problem unsolved. For example, how to know which jump was selected in page 1?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40890364
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26093670
has text: have you tried using `return false` instead of `return` inside the `loadStateFromURL()` function?

http://stackoverflow.com/comment/64433003
type: Comment
comment on: http://stackoverflow.com/a/26094824
type: AnswerComment
score: 0
has text: Can you please help me how it works in html which is opened in separately new window. Please answer at http://stackoverflow.com/questions/38502033/xrm-context-in-html-webreource-in-mscrm-2016?noredirect=1#comment64430112_38502033

http://stackoverflow.com/comment/40800930
type: AnswerComment
has text: Yes, under every sub-header, the sub-info will be a picture, a paragraph of text, and a few links. That sub-info. will all be displayed together every time the sub-header is expanded. @Will
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26045321

http://stackoverflow.com/q/26150256
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40992753
linked to: http://stackoverflow.com/q/38399089
has title: How to ignore document.querySelectorAll(); case sensitive
tagged with: javascript
has comment: http://stackoverflow.com/comment/40992832
has answer: http://stackoverflow.com/a/26150449
favorite count: 0
has comment: http://stackoverflow.com/comment/40992622
has comment: http://stackoverflow.com/comment/40992719
tagged with: http://stackoverflow.com/tag/html
downvote count: 2
linked to: http://stackoverflow.com/q/38697440
accepted answer: http://stackoverflow.com/a/26150449
has answer: http://stackoverflow.com/a/44034530
type: AnsweredQuestion
score: 3
upvote count: 5
has comment: http://stackoverflow.com/comment/40992790
possible better answer: http://stackoverflow.com/a/44034530
has comment: http://stackoverflow.com/comment/113153020
has body: I"m trying to extract all class names where the class names begin with "userName_XXX" Currently I have a code that goes a bit like this. var list = document.querySelectorAll("div[class^=userName_]"); var classArr = Array.prototype.map.call(list, function(div) { return div.className; }); Where the returned arr holds all user classes. My issue is that there are some cases where the classes do not follow the exact case. So I'll come across a class like this "username_XXX" and it won't pick that up because its case sensitive. Can anyone help me out here or point me in the right direction? EDIT: Tried following this. Still now luck. http://jsperf.com/case-insensitive-queryselectorall/2
has comment: http://stackoverflow.com/comment/40992911

http://stackoverflow.com/a/26183762
has body: Simply do something like this, with the help of attr() method in jQuery jQuery $('img.logo1').attr('src',venue=='london'?'image1':(venue=='Manchester'?'image2':'')); Also you can try the following method as suggested by Ismael Miguel in the comment var imgs={london:'image1',manchester:'image2'}; $('img.logo1').attr('src',imgs[(venue+'').toLowerCase()]); HTML &lt;img class="logo1" src=""/&gt;
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26183712
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26183712
has comment: http://stackoverflow.com/comment/41055063
has comment: http://stackoverflow.com/comment/41055281
upvote count: 2

kinect
type: Tag
tags question: http://stackoverflow.com/q/26103586
tag name: kinect

http://stackoverflow.com/a/26181412
type: Answer
upvote count: 1
has body: Before understanding closures, which is a concept extended from the Javascript function scope. Closures: allows certain variables to get accessed within the scope being created.The inner function can get accessed to the outer function as well as its variables.But the outer function cannot access variables within the inner function. So in your closure example, the reason why output alerts "Mozilla" is because your inner function-displayName alerts the name variable declared in the outer function (displayName can get access to any variables in the makeFunc function). So when your makeFunc function invokes the inner function-displayName, you will get a TypeError with undefined. Same result will output when you simply call the makeFunc(), you get undefined.
score: 1
answers question: http://stackoverflow.com/q/26174053
downvote count: 0

http://stackoverflow.com/comment/41005847
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26138378
has text: That's a good solution. For now the refactoring is to much work. I will serve the cordova.js from the webserver (first checking the correct target platform)
type: AnswerComment

http://stackoverflow.com/comment/40918293
type: QuestionComment
has text: You'll want to access an index of `people` in the same way you're already doing with `namesArray` -- `namesArray[i] = people[i].name;`
comment on: http://stackoverflow.com/q/26109568
score: 0
type: Comment

http://stackoverflow.com/a/26171015
answers question: http://stackoverflow.com/q/26170740
has body: Put your checkboxes inside a form and use ng-required attribute, and then enable the button only if the form is valid: I understand -- BES ... ... Schedule Migration! You can make it even shorter if you use ng-if instead of ng-show -- in that case the element is not in the DOM tree at all, so you can replace ng-required="..." with just required.
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41032028
score: 1
upvote count: 1

http://stackoverflow.com/comment/40781574
has text: Wjhat is control id? Try as `$('td[id$="cols3_key"]').addClass('alert-danger');`
score: 0
comment on: http://stackoverflow.com/q/26035022
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40960853
type: Comment
has text: What is the exact error?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26132828

http://stackoverflow.com/q/26185694
type: AnsweredQuestion
score: 3
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/41073696
has title: bootstrap-datetimepicker.js it doesn't work in MVC 5
possible better answer: http://stackoverflow.com/a/37641031
has answer: http://stackoverflow.com/a/26186518
has comment: http://stackoverflow.com/comment/41060830
linked to: http://stackoverflow.com/q/20644222
has comment: http://stackoverflow.com/comment/41073858
has comment: http://stackoverflow.com/comment/41073572
downvote count: 0
tagged with: javascript
favorite count: 0
answer count: 3
has body: I have been testing some examples from this http://eonasdan.github.io/bootstrap-datetimepicker/ with MVC 5. I'm install Bootstrap 3 Datetimepicker(https://www.nuget.org/packages/Bootstrap.v3.Datetimepicker/). I had to add this code in BundleConfig.cs bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( "~/Scripts/bootstrap.js", "~/Scripts/bootstrap-datetimepicker.min.js",//adding code "~/Scripts/respond.js")); this is the code of my view @{ ViewBag.Title = "Home Page"; } @section Scripts { } However the web page load with some problem the page should look like this but it looks like this I was seeing this forum http://forums.asp.net/t/1988610.aspx?Bootstrap+v3+DateTimePicker+in+MVC+5 and apparently there are problems with this. Any ideas??????
has answer: http://stackoverflow.com/a/37641031
accepted answer: http://stackoverflow.com/a/26343842
tagged with: twitter-bootstrap-3
upvote count: 3
has answer: http://stackoverflow.com/a/26343842
type: Question

http://stackoverflow.com/q/26096804
has comment: http://stackoverflow.com/comment/40895243
tagged with: sql-server
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40894972
score: 1
possible better answer: http://stackoverflow.com/a/26096941
tagged with: string
favorite count: 0
has answer: http://stackoverflow.com/a/26096941
type: Question
has answer: http://stackoverflow.com/a/26096888
has comment: http://stackoverflow.com/comment/40896055
has answer: http://stackoverflow.com/a/26141775
answer count: 3
has comment: http://stackoverflow.com/comment/40895195
upvote count: 1
has comment: http://stackoverflow.com/comment/40895224
has comment: http://stackoverflow.com/comment/40895393
has body: I'm trying to run query from JS which execute in sql server. This query should find a user in db according it's username and password: var str = "SELECT * FROM Users where (username = " + params.user + ") and (password = " + params.password + ")"; Which params are parameters sends by the user in url: localhost:8888/login?user="abc"&amp;password="123" But the value of str is: str = SELECT * FROM Users where (username = "abc") and (password = "123") I tried to use string.replace to replace the " with ' but when I print str it written with " instead of '. Any suggestions? Probably I'm not the first one have this problem...
downvote count: 0
accepted answer: http://stackoverflow.com/a/26096888
has title: How do I change " with '
tagged with: javascript

http://stackoverflow.com/comment/40878482
type: Comment
comment on: http://stackoverflow.com/a/26086284
type: AnswerComment
has text: Yeah, good catch. I'm afraid we're entering the browser's realm here, so the shift key is technically no longer pressed inside the document, but at a higher level - the browser, more accuratelly the browser's select box (notice you can control it with keyboard once it is opened and has focus). To avoid this and possible cross-browser issues in regarding to potentially different implementation of this feature, I strongly suggest you build your own simple dropdown menu and never worry about this again.
score: 0

http://stackoverflow.com/a/26220092
answers question: http://stackoverflow.com/q/26178042
score: 3
accepted answer of: http://stackoverflow.com/q/26178042
upvote count: 3
type: AcceptedAnswer
downvote count: 0
has body: As far as i know, your only option is to manually check whether the min/maxlimits are reached or not. You can use the size property of the ui object passed to the resize event callback to access the current width and height, and the option method for accessing the min and max values. $(function () { $("#resizable").resizable({ minWidth: 50, minHeight: 50, maxWidth: 250, maxHeight: 200, resize: function (event, ui) { var $elm = ui.element; if (ui.size.width <= $elm.resizable("option", "minWidth")) console.log("Reached Min Width!"); if (ui.size.height <= $elm.resizable("option", "minHeight")) console.log("Reached Min Height!"); if (ui.size.width >= $elm.resizable("option", "maxWidth")) console.log("Reached Max Width!"); if (ui.size.height >= $elm.resizable("option", "maxHeight")) console.log("Reached Max Height!"); } }); }); #resizable { width:100px; background:dogerblue; } Resizable Anyway, it'd be nice to have that option: I've created a Feature Request @ jQuery ui.
type: Answer

http://stackoverflow.com/q/26193383
tagged with: node.js
type: AnsweredQuestion
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/26216943
accepted answer: http://stackoverflow.com/a/26216943
has body: Being relatively new to JavaScript, I am trying to implement Amazon login in Node.js + Express / Angular.js app. Here is the piece from Node.js Passport authentication middleware example: app.get('/auth/facebook/callback', passport.authenticate('service', { session: false }), function(req, res) { // Successful authentication, redirect home. // I have access to web token here res.redirect('/'); }); The question is how do I modify the code above to pass web token that I obtain in function(req, res) in Node.js backend to AngularJS frontend assuming my AngularJS app is hosted at http://example.com while after logging in with Amazon, the app gets redirected to http://example.com/auth/facebook/callback URL.
has title: Passing web token from backend to frontend (Node.js + Express to AngularJS)
possible better answer: http://stackoverflow.com/a/26207247
type: Question
tagged with: javascript
tagged with: amazon-web-services
tagged with: express
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/26207247
favorite count: 0
tagged with: angularjs

conflict
tags question: http://stackoverflow.com/q/26034315
tag name: conflict
type: Tag
tags question: http://stackoverflow.com/q/26119392
tags question: http://stackoverflow.com/q/26045629
tags question: http://stackoverflow.com/q/26158141

http://stackoverflow.com/q/26065854
type: Question
score: 0
has answer: http://stackoverflow.com/a/26065985
favorite count: 0
has comment: http://stackoverflow.com/comment/40838871
has answer: http://stackoverflow.com/a/26066106
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26066088
tagged with: css
answer count: 4
type: UnansweredQuestion
upvote count: 1
has body: I have a website and I teach Java on it. I know html and css if it helps.. I have lectures in my site and in my lectures there are descriptions: in the description I write code sometimes so I made a class for code so everytime I type code I do and it looks good, but not perfect. I want to make specific words to be bold and in blue or pink color for example. Is there a way to do it? maybe with javascript? I know I can create a new class for special words and then to do for example but this will be too much job to write this span every time that it's not worth it. So is there a way to do it maybe with html5 or js? Thank you. edit: I use the usefedora.com platform so it's more difficult to do it, does somebody knows how to do it on usefedora's platform?
downvote count: 1
has answer: http://stackoverflow.com/a/26065946
has title: Code colors in Html using CSS or javascript
tagged with: javascript

http://stackoverflow.com/a/26127848
has body: Here num is dynamic value which you can pass and based on each index it will filter var friends = data.friends; var num = 6; var filteredNames = $(friends).filter(function( idx ) { return friends[idx].Step === num; });
answers question: http://stackoverflow.com/q/26126765
score: 0
type: Answer

http://stackoverflow.com/q/26060284
tagged with: facebook
has body: I am setting up a website. I want users to invite Facebook friends to look at the page the users can make on my website. So i'm trying to get it done. But i think the FB Api is not set up to do what i want to do. I think it is to prevent from spamming, but i really like to know if it can be done or not. This is what i have so far. Users can login with FB and i present a decent list of FB friends. Each friend has a checkbox. When a user submits the form, i collect all the checked friends id's: var sendUIDs = ''; var mfsForm = document.getElementById('mfsForm'); for (var i = 0; i &lt; mfsForm.friends.length; i++) { if (mfsForm.friends[i].checked) { sendUIDs += mfsForm.friends[i].value + ','; } } While i was trying, i came up with this "sollution" for sending all the friends the same invite: FB.ui({ method: 'apprequests', to: sendUIDs, message: "Hey come on look at my site", data: "mywebsite.com/userlink" }); Looking great I thought. Exactly what i wanted... i thought. Unfortunately this is only used for games? First of all i could not find the invite. It was there, but it seems to disappear. Then i found out it was in the App/Games/Activity tab. I managed to get the notification in the "notification" tab by adding a Canvas to my FB App. Almost there i thought. Well, not exactly... I want the friends to visit my page by the given data link and not some weird ?number. So i gave up this path and tried the other way and came up with this: for (var i = 0; i &lt; mfsForm.friends.length; i++) { if (mfsForm.friends[i].checked) { var uid = mfsForm.friends[i].value; FB.ui({ to : uid, method: 'send', name: 'Visit my page', link: 'mywebsite.com/userlink' }); } } This works more or less, but produces a popup for every friend with an empty message box. Not very friendly and, well... stupid :) I also tried the former setup, but instead of "apprequests" i used this: FB.ui({ method: 'send', to: sendUIDs, message: "Hey come on look at my site", data: "mywebsite.com/userlink" }); where …
type: AnsweredQuestion
has title: How to sent a website url as link to multiple Facebook Friends?
type: Question
has answer: http://stackoverflow.com/a/26060711
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26060711

http://stackoverflow.com/comment/41848984
type: Comment
type: QuestionComment
has text: Hi @carl i'm having the same issue, could you resolved it? Thanks
comment on: http://stackoverflow.com/q/26178399
score: 0

http://stackoverflow.com/q/26181999
accepted answer: http://stackoverflow.com/a/26182120
possible better answer: http://stackoverflow.com/a/26182116
upvote count: 1
duplicate of: http://stackoverflow.com/q/9592241
has answer: http://stackoverflow.com/a/26182116
tagged with: arrays
tagged with: javascript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41051651
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41052191
has answer: http://stackoverflow.com/a/26182120
has body: I am talking about heavy coding like for graphics or physics processing (not standard) where speed is expensive. var a=[0,1,2,3,4,5,6,7,8,9]; What happens when you ask console.log(a.lengh); Is it like accessing a normal variable that gets updated on a change or is it really counted each time? Say if you had a lot of loops that relied on knowing this var i=flepdefloo; // some large number; var a2=[]; while(i--){ a2[a2.length] = 'something'; } Should a2.length be cached / incremented manually in a separate var?
favorite count: 0
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41051691
has comment: http://stackoverflow.com/comment/41051659
has title: Direct assignment array and use of array.length
has comment: http://stackoverflow.com/comment/41051588
linked to: http://stackoverflow.com/q/9592241

http://stackoverflow.com/comment/40969527
comment on: http://stackoverflow.com/a/26135228
type: AnswerComment
score: 0
type: Comment
has text: It works well in the demo, but locally on my machine, I am getting an error mentioned in the update in the question.

http://stackoverflow.com/comment/40808328
comment on: http://stackoverflow.com/a/26048954
score: 0
has text: See DEMO 6 for center cells not spanning available space.
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26109124
has body: I am trying to build my first angular app and looking to setup dynamic routing so that I can build out the app without having to continuously add to the $routeProvider config. I haven't quite found the simplest / cleanest approach yet, any guidance is much appreciated. Below was my first approach. angular.module('app', ['ngRoute']).config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider){ $locationProvider.html5Mode(true).hashPrefix('!'); $routeProvider .when('/', { redirectTo: '/home', }) .when('/:section', { controller: function(r){ return r.section+'Ctrl'; }, templateUrl: function(r){ return 'app/views/pages/'+r.section+'.html'; } }); }]);
tagged with: ngroute
answer count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40917448
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40918039
type: Question
has title: Angular dynamic controller / templateUrl
has comment: http://stackoverflow.com/comment/40917498
tagged with: javascript
tagged with: route-provider

http://stackoverflow.com/comment/40957771
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26131093
has text: If that `typeof` check succeeds and you call the function inside that `if` (or only when that `if` succeeded), then it would work. Is this **all** the relevant code?
type: Comment

http://stackoverflow.com/q/26185633
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/26185680
has title: Get real element's width in JavaScript
has comment: http://stackoverflow.com/comment/41058595
has body: For example, I have the next HTML markup (imitating my custom dropdown list inside a generic div): $(document).ready(function() { $("#selectbox-body").css("width", $("#selectbox").width()); }); LABEL ...... 12312313 Or http://jsfiddle.net/sdkpkLds/ . #selectbox.width equals to #outer-div.width, not #outer-div.width - label.width. How can I place #selectbox-body not under label?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41060506
tagged with: css

http://stackoverflow.com/comment/40807973
type: AnswerComment
score: 0
type: Comment
has text: I edited my answer and added a link to other version. Is it what you needed?
comment on: http://stackoverflow.com/a/26048836

extjs
tags question: http://stackoverflow.com/q/26185495
tags question: http://stackoverflow.com/q/26145928
tags question: http://stackoverflow.com/q/26176265
tags question: http://stackoverflow.com/q/26039486
tags question: http://stackoverflow.com/q/26176233
tags question: http://stackoverflow.com/q/26045378
tags question: http://stackoverflow.com/q/26117519
tags question: http://stackoverflow.com/q/26138775
tags question: http://stackoverflow.com/q/26134252
tags question: http://stackoverflow.com/q/26151129
tags question: http://stackoverflow.com/q/26117223
tags question: http://stackoverflow.com/q/26124781
tags question: http://stackoverflow.com/q/26078520
tags question: http://stackoverflow.com/q/26176627
tags question: http://stackoverflow.com/q/26097883
tags question: http://stackoverflow.com/q/26128915
tags question: http://stackoverflow.com/q/26078294
type: Tag
tags question: http://stackoverflow.com/q/26134288
tags question: http://stackoverflow.com/q/26164754
tags question: http://stackoverflow.com/q/26137062
tags question: http://stackoverflow.com/q/26066055
tags question: http://stackoverflow.com/q/26181984
tags question: http://stackoverflow.com/q/26107703
tags question: http://stackoverflow.com/q/26084834
tags question: http://stackoverflow.com/q/26078819
tags question: http://stackoverflow.com/q/26059953
tags question: http://stackoverflow.com/q/26126242
tags question: http://stackoverflow.com/q/26084213
tags question: http://stackoverflow.com/q/26074589
tags question: http://stackoverflow.com/q/26168997
tags question: http://stackoverflow.com/q/26175008
tags question: http://stackoverflow.com/q/26103230
tags question: http://stackoverflow.com/q/26041625
tags question: http://stackoverflow.com/q/26059985
tag name: extjs
tags question: http://stackoverflow.com/q/26123709
tags question: http://stackoverflow.com/q/26116556
tags question: http://stackoverflow.com/q/26037153
tags question: http://stackoverflow.com/q/26040808
tags question: http://stackoverflow.com/q/26175567
tags question: http://stackoverflow.com/q/26171506
tags question: http://stackoverflow.com/q/26110433

http://stackoverflow.com/a/26072207
has comment: http://stackoverflow.com/comment/40853340
score: 0
has body: The following will remove any ul elements that do not contain any li elements $('ul').each(function() { if ($(this).children('li').length == 0) { $(this).remove(); } }); Note also you are generating duplicate ID's in you loops which is invalid html.
type: Answer
answers question: http://stackoverflow.com/q/26072163
has comment: http://stackoverflow.com/comment/40853384
has comment: http://stackoverflow.com/comment/40868901
has comment: http://stackoverflow.com/comment/40853734

http://stackoverflow.com/comment/40931231
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26117122
score: 0
has text: As it stands, this question seems off-topic because you're asking for a 3rd part library. You should post the problems you're having with midi-js (it seems fairly straightforward: `MIDI.Player.loadFile(file, callback); MIDI.Player.start();`)

http://stackoverflow.com/comment/40841948
type: Comment
has text: I'd love to see where the convention is written. I usually just do `~...indexOf()` if I'm doing a Boolean check.
comment on: http://stackoverflow.com/a/26067520
score: 0
type: AnswerComment

http://stackoverflow.com/a/26111753
upvote count: 1
has body: I think the problem is mixing jQuery with javascript. Do this to get the text. $(foo).siblings('.errorMSG').text(); textContent is a property of DOM object, but you have a jQuery Object. So call jquery functions on it. Bellow are the different DOM Object properties &amp; there equivalent Jquery Object functions DOMObject.value jqueryObject.val() DOMObject.innerHTML jqueryObject.html() DOMObject.textConetnt jqueryObject.text() And many others.
has comment: http://stackoverflow.com/comment/40922026
accepted answer of: http://stackoverflow.com/q/26111737
answers question: http://stackoverflow.com/q/26111737
has comment: http://stackoverflow.com/comment/40922005
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40922077
type: Answer
has comment: http://stackoverflow.com/comment/40922100
has comment: http://stackoverflow.com/comment/40922141

http://stackoverflow.com/comment/40784903
type: QuestionComment
type: Comment
has text: Yeah, I've thought about declaring it globally, but it could mess up some future tests, and I'd very much prefer to share it between those files only. I'm kind new to JS, but could you tell me if [this](http://stackoverflow.com/questions/1535631/static-variables-in-javascript) could do the trick? Like set value in one file and then it should have the same value in another instance, right?
comment on: http://stackoverflow.com/q/26036294
score: 0

http://stackoverflow.com/q/26051626
tagged with: zurb-reveal
upvote count: 1
tagged with: zurb-foundation
answer count: 1
has body: I'm trying to show &amp; autoplay youtube videos in a modal when a user clicks a link. I have this working for the first video, however subsequent videos open the initial video. During debugging, I noticed that the alert of the videoID fres as many times as the buttons have been clicked with the ID of the previous buttons. This seems like it is relevant. &lt;script src="//www.youtube.com/player_api"&gt;&lt;/script&gt; &lt;script&gt; function onYouTubePlayerAPIReady() { $('.feature-modal-btn').on('click', function(e){ e.preventDefault(); var btn = $(this); //var modal = "#YTMODAL"; var ytVideoID = btn.data('ytvideoid'); $(document).on('opened.fndtn.reveal', '[data-reveal]', function () { alert(ytVideoID); player = new YT.Player('feature-video', { //Add the player width: '800', videoId: ytVideoID, playerVars: { rel : 0, theme : 'light', showinfo : 0, showsearch : 0, autoplay : 1, autohide : 1, modestbranding : 1 }, events: { } }); }); $(document).on('close.fndtn.reveal', '[data-reveal]', function () { $('#YTMODAL .flex-video #feature-video').remove(); $('#YTMODAL .flex-video #feature-video iframe').remove(); player = ''; $('#YTMODAL .flex-video').append('&lt;div id="feature-video" /&gt;'); }); }); } &lt;/script&gt; &lt;a href="" class="feature-modal-btn" data-ytvideoid="o_nA1nIT2Ow" data-reveal-id="YTMODAL"&gt; &lt;a href="" class="feature-modal-btn" data-ytvideoid="p-iFl4qhBsE" data-reveal-id="YTMODAL"&gt; &lt;div id="YTMODAL" class="reveal-modal full" data-reveal &gt; &lt;div class="video-container flex-video widescreen"&gt; &lt;div id="feature-video"&gt;[this div will be converted to an iframe]&lt;/div&gt; &lt;/div&gt; &lt;a class="close-reveal-modal"&gt;&amp;#215;&lt;/a&gt; &lt;/div&gt; I am using foundations modal reveal. http://foundation.zurb.com/docs/components/reveal.html How can i adjust my code so the correct movie is shown each time a link is clicked? UPDATE I created a codepen to show what's happening. try opening &amp; closing the modals using the one &a…
favorite count: 0
accepted answer: http://stackoverflow.com/a/26171826
tagged with: youtube-javascript-api
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26171826
downvote count: 0
score: 1
type: Question
tagged with: javascript
has title: YouTube API with Foundation Modal

http://stackoverflow.com/a/26167562
has comment: http://stackoverflow.com/comment/41024842
upvote count: 1
has comment: http://stackoverflow.com/comment/41025953
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41026187
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26167464
has body: You can't change colors in a loop, the color of the element won't change until you exit the code and return control to the browser. You can use an interval to run code and return the control to the browser each time: window.setInterval(function(){ var t = document.getElementById('test'); var z = '#'+(Math.random()*0xFFFFFF&lt;&lt;0).toString(16); t.style.color = z }, 100); Demo: http://jsfiddle.net/et3qtr3t/
answers question: http://stackoverflow.com/q/26167464
type: Answer
has comment: http://stackoverflow.com/comment/41026096
score: 1

http://stackoverflow.com/a/26104044
type: Answer
score: 6
answers question: http://stackoverflow.com/q/26104006
has comment: http://stackoverflow.com/comment/40911113
type: AcceptedAnswer
downvote count: 0
has body: Javascript is case sensitive, it's innerHTML, not innerHtml document.getElementById("cost").innerHTML = cost;
accepted answer of: http://stackoverflow.com/q/26104006
upvote count: 6

http://stackoverflow.com/q/26089192
favorite count: 0
has title: PhoneGap External Browser Issue
type: UnansweredQuestion
tagged with: android
has body: I've been learning how to use PhoneGap the last few days and I'm facing an issue that only happens when I run in Android. When I run it in PhoneGap's Developer app using "phonegap serve" it works absolutely fine. JavaScript $(document).on("mobileinit", function(){ // Handle link clicks in our own way $(document).find('a').on('click', bind_a_rel_external); }); function bind_a_rel_external(e){ if($(this).attr('rel') == 'external'){ e.preventDefault(); window.open($(this).attr('href'), '_system'); } } HTML (Note the rel="external") Like us on Facebook Just to reiterate; works fine in PhoneGap's developer app. Doesn't work in native Android. And the inappbrowser plugin has been initilized. So I'm assuming it's not compiling properly. I'm not building this app for iOS yet so cannot test it in that. Thanks in advance. I've been pulling my hair out over this all weekend.
has answer: http://stackoverflow.com/a/26106293
tagged with: cordova
downvote count: 1
type: Question
tagged with: javascript
score: -1
upvote count: 0
answer count: 1

http://stackoverflow.com/q/26166463
tagged with: facebook
linked to: http://stackoverflow.com/q/7425595
has comment: http://stackoverflow.com/comment/41022893
has answer: http://stackoverflow.com/a/26166952
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41022879
has answer: http://stackoverflow.com/a/26166507
has body: As the title says is there a way to make a user log out of my website instead of logging out of my website and facebook? Currently I'm using Log out
tagged with: javascript
type: UnansweredQuestion
has title: Signing off my website but not facebook
linked to: http://stackoverflow.com/q/9189386
linked to: http://stackoverflow.com/q/9783751
type: Question

http://stackoverflow.com/comment/40959977
comment on: http://stackoverflow.com/q/26131885
type: Comment
type: QuestionComment
has text: I don't know Grid.MVC, but it might be something like `$('#grid').on("pagesGrids.linksgrid.onRowSelect", function(e) { alert(e.row.BrokenId); });`
score: 0

http://stackoverflow.com/q/26075334
tagged with: regex
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26075352
accepted answer: http://stackoverflow.com/a/26075354
type: Question
has answer: http://stackoverflow.com/a/26075352
tagged with: javascript
has body: I have the following problem with my regex. I want to search a string between two strings. The datas is like that: var datas = "a='00-8'b='13-'a+='00-2'b+='3333'c='4'"; I try: datas.match("a\+='(.*?)'"); I can't get the regex working due to the + sign. Any help ?
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26075354
has title: Regex need to includes the plus sign

http://stackoverflow.com/q/26160112
has answer: http://stackoverflow.com/a/27013561
downvote count: 0
score: 1
has title: SelectToUISlider not changing value in safari
type: Question
tagged with: asp.net-mvc
has answer: http://stackoverflow.com/a/34361528
tagged with: javascript
answer count: 2
upvote count: 1
tagged with: jquery
tagged with: select-to-slider
favorite count: 0
has body: I'm creating a slider search control for a site using SelecttoUISlider, everything works great in chrome, IE and on windows phone. however in desktop safari or on an apple device the value of the select in the background does not change. The 'selected' attribute changes, but the physical value of the select element doesn't. as a result i get buggy results and a query string is passed into the results view twice, with different values, causing an error. Im using pretty standard syntax for the SelectToUISlider. And i have checked that it works with basic jquery UI Ive made the select element visible in this JSfiddle, incase anyone wanted to see http://jsfiddle.net/847aypbb/ $(document).ready(function () { //&lt;![CDATA[ // hide the select elements so that the sliders will take over //$('.suggest-wrap select').hide(); // set up the sliders $('#group-experience').selectToUISlider({ tooltip: false, labelSrc: 'text' }); $('#distance-piste').selectToUISlider({ tooltip: false, labelSrc: 'text' }); $('#hotel-type').selectToUISlider({ tooltip: false, labelSrc: 'text' }); $('#ski-area').selectToUISlider({ tooltip: false, labelSrc: 'text' }); });
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40994425
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26151012
score: 0
has text: When i use php include to call a left_nav file like was being used with `src` in iframe. It simply does not load the content in other frames like on the very top of the page encounter visit does not work and load which even turn off many pages functionality based on encounter visit.

http://stackoverflow.com/comment/41047254
comment on: http://stackoverflow.com/q/26167657
has text: Thanks! If you want to register as response
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/40929470
type: Comment
type: QuestionComment
has text: @Amadan You're right, this will skip a generation, but it is not mentioned in the question, so both are correct in this case.
score: 0
comment on: http://stackoverflow.com/q/26115412

http://stackoverflow.com/a/26045406
has comment: http://stackoverflow.com/comment/40800875
upvote count: 1
has body: You can do it something like this: var slider = $('.royalSlider'), nav = slider.find('.rsBullets'); if (slider.data('royalSlider').numSlides &lt;= 1) { nav.hide(); } else { nav.show(); } Hope this helps. Source
accepted answer of: http://stackoverflow.com/q/26045089
answers question: http://stackoverflow.com/q/26045089
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/45216435
type: Answer

http://stackoverflow.com/a/26087274
score: 0
has body: I'm not sure if this is what you want: function player() { var totalScore = 0; var playing = true; return { checkScore: function checkScore() { if (totalScore &gt;= 100) { playing = false; } } } }; var playerAI = new player(); var playerOne = new player();
type: Answer
answers question: http://stackoverflow.com/q/26087205

http://stackoverflow.com/comment/40876344
type: AnswerComment
type: Comment
has text: I have modified my answer to have a "," between numbers. You should accept the answer if it answers your question so that it can help people with the same issue : )
score: 0
comment on: http://stackoverflow.com/a/26086499

http://stackoverflow.com/comment/41040777
has text: Have you made changes suggested by @ysf?
comment on: http://stackoverflow.com/a/26175963
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40867672
comment on: http://stackoverflow.com/a/26079683
type: AnswerComment
score: 0
type: Comment
has text: How would i add this to my script?

http://stackoverflow.com/comment/40916633
comment on: http://stackoverflow.com/a/26108125
type: AnswerComment
has text: @Raz000 did you try having a look at the official api: https://docs.angularjs.org/api/ng/directive/select#usage ?
score: 0
type: Comment

http://stackoverflow.com/comment/40814214
comment on: http://stackoverflow.com/a/26052808
type: AnswerComment
score: 0
type: Comment
has text: Why do you think it will help? `#TextBoxesGroup` is not `input`.

http://stackoverflow.com/comment/40971048
has text: Unfortunately still the same... btw, you have a typo, "bootstYrap".
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26138824
type: Comment

http://stackoverflow.com/comment/40873157
comment on: http://stackoverflow.com/q/26084208
score: 0
type: Comment
type: QuestionComment
has text: probably better to just do your filtering in controller. Then you have access to original array and filtered array

http://stackoverflow.com/q/26156891
tagged with: angular-ui
tagged with: javascript
score: 1
tagged with: sorting
tagged with: angular-ui-bootstrap
favorite count: 0
tagged with: angularjs
has title: Sorting with ng-repeat Angularjs
type: Question
has body: I have an array $scope.answers=["","","",""] means Array have multiple empty elements . &lt;li ng-repeat="item in answers "&gt;&lt;input type="text" ng-model="item"/&gt;&lt;/li&gt; it throws error that duplicate values are not allowed in ng-repeat . if i use &lt;li ng-repeat="item in answers track by $index"&gt;&lt;input type="text" ng-model="item"/&gt;&lt;/li&gt; then its working fine . but i want to use this without track by $index so that sorting on this is also work Can anybody have idea about this
has answer: http://stackoverflow.com/a/26159389
answer count: 2
upvote count: 1
linked to: http://stackoverflow.com/q/17936078
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26158342
downvote count: 0
has comment: http://stackoverflow.com/comment/41004693

http://stackoverflow.com/q/26113032
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40924863
upvote count: 1
has answer: http://stackoverflow.com/a/63453658
score: 1
has body: Already I have this schema created. Mostly of the time I need that the field v1 must be required, but under extraordinaries conditions the field v1 does not need it. How I do that? var mongoose = require('mongoose'), Schema = mongoose.Schema; var MonographSchema = new Schema({ v1: { type: String, required: true, trim: true }, v3: [ { _id: false, _: String, a: String, b: String, c: [String], t: Number } ] }); mongoose.model('Monograph', MonographSchema); var Monograph = mongoose.model('Monograph'); var monograph1 = new Monograph({ v1: '001ab', v3: [ {'_': 'BR1.1', 'a': '1.00', 'b': 'T17a', 'c': ['v.1', 'e.2'], 't': '1001'}, {'_': 'BR67.1', 'a': '614.32', 'b': 'T17a', 'c': ['v.2'], 't': '25'}, {'b': 'T17a', 'c': ['v.2'], 't': '25'} ] }); var monograph2 = new Monograph({ v3: [ {'_': 'BR1.1', 'a': '1.00', 'b': 'T17a', 'c': ['v.1', 'e.2'], 't': '1001'}, {'_': 'BR67.1', 'a': '614.32', 'b': 'T17a', 'c': ['v.2'], 't': '25'}, {'b': 'T17a', 'c': ['v.2'], 't': '25'} ] }); monograph1.save(); //all fine monograph2.save(); //I get an error How I can unset the required: true of v1 on the fly?
type: Question
tagged with: mongodb
answer count: 2
downvote count: 0
tagged with: mongoose
tagged with: javascript
favorite count: 0
has title: How to remove a required validation on the fly in Mongoose
has comment: http://stackoverflow.com/comment/40924774
has comment: http://stackoverflow.com/comment/40924119
tagged with: node.js
has answer: http://stackoverflow.com/a/26113484

http://stackoverflow.com/q/26064802
tagged with: http://stackoverflow.com/tag/csv
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/48273032
has answer: http://stackoverflow.com/a/26064863
has body: Trying to read CSV formatted data into javascript using the jquery-csv library, but am getting a CSVDataError: Illegal Data error from the ^M character at the end of each line. It seems no matter how a CSV is saved, I get this ^M. I can only ever see the ^M if I open the CSV file in vim, even in a text editor or my IDE the data looks fine. I don't get this problem when working in other languages either such as Python or R. I am working on a Mac environment. How can I fix this and avoid this problem in the future?
tagged with: carriage-return
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26064928
has title: Remove ^M from CSV file
score: 0
answer count: 3

http://stackoverflow.com/comment/40948044
score: 5
type: Comment
type: QuestionComment
has text: `$("figure ~ *").wrapAll(" ")` If there are multiple, then select each `article` and operate on each one.
comment on: http://stackoverflow.com/q/26126120

http://stackoverflow.com/comment/40916284
type: QuestionComment
has text: @Barmar so basically I can remove the $(document).on('click', function() { handler?
type: Comment
comment on: http://stackoverflow.com/q/26107249
score: 0

http://stackoverflow.com/a/26157043
type: Answer
has comment: http://stackoverflow.com/comment/41005499
has comment: http://stackoverflow.com/comment/41005273
has body: xmlDoc2.get('Objects') will return a Node object. It doesn't have a each method. You can use prevSibling, nextSibling methods to traverse the siblings of the nodes. Or even better use childNodes on the element. var children = xmlDoc2.get('Objects').childNodes(); children.forEach(function (child) { var whatid = child.get('Object').attr('id').value(); console.log('wasd: ' + whatid); });
accepted answer of: http://stackoverflow.com/q/26156721
score: 0
has comment: http://stackoverflow.com/comment/41005119
has comment: http://stackoverflow.com/comment/41005009
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41005211
answers question: http://stackoverflow.com/q/26156721

http://stackoverflow.com/comment/40912890
has text: Consider that any set up (memory or time) that the inner function has to do in the second case, the outer function would need to do in the first case. I can just barely strain my imagination to imagine a case where you'll get *marginally* faster environment-record lookups because there's one fewer variable in the environment record, but environment records are probably implemented as hash maps anyway (variable string name => variable), so any improvement is incredibly small.
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26105543

http://stackoverflow.com/q/26184526
has comment: http://stackoverflow.com/comment/41057238
has answer: http://stackoverflow.com/a/26184998
upvote count: 0
has body: I have a function that should postpone the call for the next function : function waitFunc( func, time ) { var startTime = performance.now(); var currTime = performance.now(); while ( (currTime - startTime) &lt;= (time / 1)) { currTime = performance.now(); } func(); } Another two function that i have are supposed to change the content of the tag i have in the body: function showPlus() { //display plus pictureImg.src = plus; //blank only the form that contains input inputForm.style.display="none"; pictureImg.style.display="block"; //after timeout start "showPicture" function waitFunc(showPicture, 250); //setTimeout(showPicture, 250); } function showPicture() { //generate picture pass imgName = "../images/Slide"+ i + ".PNG"; if (i &lt; 100) { //increase variable i by 1 ++i; //blank only the form that contains input inputForm.style.display="none"; pictureImg.style.display="block"; //display picture pictureImg.src = imgName; //after timeout start "showForm" function waitFunc(showForm, 750); //setTimeout(showForm, 750); } } In the html: &lt;img src="../images/Blank.png" id="pictures" name="pictures"/&gt; Currently i am trying to call to waitFunc function from showPlus function and i expect that showPicture function would be called after the timeout. PROBLEM: When i use waitFunc function the content does not change as it suppose. However, when i use setTimeout function everything works just great. Can some please assist me (i hope that this is not a stupid question)? P.S. you can find the page here. Thank you! EDIT: You can also find a jsfiddle here. Notice that the fiddle is using setTimeout so you can see how it is supposed to work; if you comment the setTimeout and uncomment the waitFunc line next to it, then you will be able to see the issue.
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41056676
has comment: http://stackoverflow.com/comment/41056543
has title: Trouble with changing image src content
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26184815
has answer: http://stackoverflow.com/a/26185847
answer count: 4
has comment: http://stackoverflow.com/comment/41056923
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41056765
linked to: http://stackoverflow.com/q/13286233
has comment: http://stackoverflow.com/comment/41058095
has comment: http://stackoverflow.com/comment/41056761
has answer: http://stackoverflow.com/a/26184783
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41057138
linked to: http://stackoverflow.com/q/6233927
has comment: http://stackoverflow.com/comment/41056584
linked to: http://stackoverflow.com/q/196027
has comment: http://stackoverflow.com/comment/41056474
score: -1
has comment: http://stackoverflow.com/comment/41056876

eventhandler
tags question: http://stackoverflow.com/q/26094486
type: Tag
tag name: eventhandler

http://stackoverflow.com/a/26128124
downvote count: 0
answers question: http://stackoverflow.com/q/26127212
type: Answer
has body: I looked in HighCharts source code and found out that if you pass a format or formatter it won't add numeric symbol. It is inside else if statement i.e. formatOption xor numericSymbol. So you need to add a formatter and do the logic yourself. this is a slightly modified copy-paste of their code: formatter: function() { var ret, numericSymbols = ['k', 'M', 'G', 'T', 'P', 'E'], i = numericSymbols.length; if(this.value &gt;=1000) { while (i-- &amp;&amp; ret === undefined) { multi = Math.pow(1000, i + 1); if (this.value &gt;= multi &amp;&amp; numericSymbols[i] !== null) { ret = (this.value / multi) + numericSymbols[i]; } } } return '$' + (ret ? ret : this.value); } http://jsfiddle.net/x6b0onkp/1/
upvote count: 3
score: 3

http://stackoverflow.com/a/26141393
score: 22
upvote count: 22
has body: You are quite right in understanding the 3-layer context separation. A background page is a separate page and therefore doesn't share JS or DOM with visible pages. Content scripts are isolated from the webpage's JS context, but share DOM. You can inject code into the page's context using the shared DOM. It has access to the JS context, but not to Chrome APIs. To communicate, those layers use different methods: Background &lt;-> Content talk through Chrome API. The most primitive is the callback of executeScript, but it's impractical for anything but one-liners. The common way is to use Messaging. Uncommon, but it's possible to communicate using chrome.storage and its onChanged event. Page &lt;-> Extension cannot use the same techniques. Since injected page-context scripts do not technically differ from page's own scripts, you're looking for methods for a webpage to talk to an extension. There are 2 methods available: While pages have very, very limited access to chrome.* APIs, they can nevertheless use Messaging to contact the extension. This is achieved through "externally_connectable" method. I have recently described it in detail this answer. In short, if your extension declared that a domain is allowed to communicate with it, and the domain knows the extension's ID, it can send an external message to the extension. The upside is directly talking to the extension, but the downside is the requirement to specifically whitelist domains you're using this from, and you need to keep track of your extension ID (but since you're injecting the code, you can supply the code with the ID). If you need to use it on any domain, this is unsuitable. Another solution is to use DOM Events. Since the DOM is shared between the content script and the page script, an event generated by one will be visible to another. The documentation demonstrates how to use window.postMessage for this effect; using Custom Events is conceptually more clear. Again, I answered about this before. The dow…
answers question: http://stackoverflow.com/q/26140443
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26140443
type: Answer
has comment: http://stackoverflow.com/comment/40980712

http://stackoverflow.com/q/26173376
type: Question
linked to: http://stackoverflow.com/q/22908242
has answer: http://stackoverflow.com/a/26173496
has comment: http://stackoverflow.com/comment/41035662
tagged with: javascript
score: 44
has body: I'm trying to make a Font Awesome chevron rotate 180º on click. Here's the fiddle of JSFiddle that has what I've tried so far. I also wanted it to spin around the center so I used this other thread. HTML &lt;div class="fa fa-chevron-up"&gt;&lt;a href="#"&gt;^&lt;/a&gt;&lt;/div&gt; CSS .rotate { -webkit-animation: spin1 2s linear; -moz-animation: spin1 2s linear; -o-animation: spin1 2s linear; -ms-animation: spin1 2s linear; animation: spin1 2s linear; -webkit-transform-origin: 50% 50%; -moz-transform-origin: 50% 50%; -o-transform-origin: 50% 50%; transform-origin: 50% 50%; width: 256px; height: 256px; } @-webkit-keyframes spin1 { 0% { -webkit-transform: rotate(0deg);} 100% { -webkit-transform: rotate(180deg);} } @-moz-keyframes spin1 { 0% { -moz-transform: rotate(0deg); } 100% { -moz-transform: rotate(180deg);} } @-o-keyframes spin1 { 0% { -o-transform: rotate(0deg);} 100% { -o-transform: rotate(180deg);} } @-ms-keyframes spin1 { 0% { -ms-transform: rotate(0deg);} 100% { -ms-transform: rotate(180deg);} } @-keyframes spin1 { 0% { transform: rotate(0deg); } 100% { transform: rotate(180deg);} } JS $(".fa-chevron-up").click(function(){ $(this).toggleClass("rotate") ; })
has comment: http://stackoverflow.com/comment/41035631
answer count: 1
upvote count: 45
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26173496
has title: Rotate Font Awesome Icon On Click
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41035806
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41035711
downvote count: 1

http://stackoverflow.com/a/26145158
has body: Just try this: $(document).ready(function () { $('input[id^=file]').hide(); $('.btn.btn-primary').click(function () { $(this).prev('input').click(); }) }); Working fiddle: http://jsfiddle.net/robertrozas/cj3fp3dm/1/
has comment: http://stackoverflow.com/comment/86096933
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26144942
downvote count: 0
score: 1

http://stackoverflow.com/comment/40902954
score: 0
type: AnswerComment
type: Comment
has text: May I know what is the `T` (in between date n time) in this case mean?
comment on: http://stackoverflow.com/a/26101281

http://stackoverflow.com/q/26037462
has title: How can I establish a secure connection to a websocket on localhost?
score: 12
answer count: 1
tagged with: websocket
has comment: http://stackoverflow.com/comment/49275450
favorite count: 0
accepted answer: http://stackoverflow.com/a/26199303
has comment: http://stackoverflow.com/comment/40786172
has comment: http://stackoverflow.com/comment/40786377
has comment: http://stackoverflow.com/comment/40785898
has comment: http://stackoverflow.com/comment/40797233
upvote count: 12
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26199303
downvote count: 0
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/49276207
tagged with: https
type: Question
has body: We have an application which we run on a POS terminal, that should receive data from an application running on the same machine, while displaying content from a remote site which is loaded over HTTPS. To receive the data from the local application, we want to use websockets, which is working fine so far. However, when the site we're displaying is loaded over HTTPS, the websocket connection is required to be encrypted as well. Because we can't really get a proper certificate for localhost, we're just using a self-signed one. But Chrome won't connect to a websocket that uses a self-signed certificate. How can we resolve this problem? We can't use an unencrypted websocket, we can't use a self-signed certificate for the encrypted one and we can't get a signed certificate for localhost. What option am I missing?
linked to: http://stackoverflow.com/q/7580508
tagged with: javascript

http://stackoverflow.com/comment/40972823
comment on: http://stackoverflow.com/q/26139742
score: 0
type: Comment
type: QuestionComment
has text: It's 18, so should work fine I guess

http://stackoverflow.com/a/26108362
score: 2
upvote count: 2
has body: Your stack trace tells me that either ctx or chartData is undefined. My guess is that it's ctx if you've already checked chartData. (Verify this using console.log.) Perhaps this is the answer if that's the case: canvas.getContext("2d") is undefined If that's not the case, then an element that ChartJS was looking for in your JSON was undefined. You'll have to look through the documentation to see what element is missing if that's the case.
answers question: http://stackoverflow.com/q/26107688
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41298096
comment on: http://stackoverflow.com/a/26096096
has text: There are illigal characters in "String.prototype.toHHMMSS". Please replace tab character manually. When I removed indent character in this method, I could seek video.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/29442736
has comment: http://stackoverflow.com/comment/47126569
has comment: http://stackoverflow.com/comment/47063782
has comment: http://stackoverflow.com/comment/47053497
downvote count: 0
has comment: http://stackoverflow.com/comment/47067170
type: Answer
answers question: http://stackoverflow.com/q/26165919
has body: This is just a minor improvement in HTML: &lt;input type="file" onchange="angular.element(this).scope().file_changed(this)"/&gt; &lt;textarea cols="75" rows="15"&gt;{{ dataFile }}&lt;/textarea&gt; and controller: .controller('MyCtrl', ['$scope', function($scope) { var vm = $scope; vm.file_changed = function(element){ var dataFile = element.files[0]; var reader = new FileReader(); reader.onload = function(e){ vm.$apply(function(){ vm.dataFile = reader.result; }); }; reader.readAsText(dataFile); }; }]); Ref
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/47126272

http://stackoverflow.com/q/26145852
tagged with: for-loop
tagged with: javascript
score: 0
has title: Using split() on an element generated by for-loop with specific class
has comment: http://stackoverflow.com/comment/40984673
has comment: http://stackoverflow.com/comment/40984756
has comment: http://stackoverflow.com/comment/40984137
duplicate of: http://stackoverflow.com/q/18947016
tagged with: var
answer count: 0
has comment: http://stackoverflow.com/comment/40984383
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/18947016
has body: I'm trying to define a variable that would contain the number of inputs generated by a for-loop that match the criteria. I have this HTML (I've cut a lot of entries to make it more clear), where id and class are added in a loop (so the numbers after block, string and item are automatically generated): &lt;div id="blocks"&gt; &lt;div id="block1"&gt; &lt;input id="string1-1" value="3"&gt; &lt;input id="string1-2" value="6:5" class="item1"&gt; &lt;/div&gt; &lt;/div&gt; The class is added when a specific criteria is met. Now, what I want to do, is to split each of the inputs with this class by the separator : they contain in their field value. I have the following, but it returns the error Uncaught TypeError: undefined is not a function: var strItems = document.getElementByClassName('item' + k).value, arrayOfStringsItems = strItems.split(':'); I don't really understand what's wrong, as I already use the exact same syntax a bit earlier and it works: var str = document.getElementById('tempString' + j).value, arrayOfStrings = str.split('*'); Here's a JSFiddle if you want to try it out. As you can see in the console when you click on Cut, the problem happens on line 25/26, but a very similar line is used on line 5/6 with no problem. The only change is that it uses a class instead of an id, that should be possible right? Thanks for your help!
type: Question
tagged with: split

http://stackoverflow.com/a/26129873
has comment: http://stackoverflow.com/comment/40955275
downvote count: 0
has body: The function's div Argument is already representing this by reference. jsBin demo function diffSign(div){ if (div.innerHTML === '+') { // If has "+" div.innerHTML = '-'; // Set as "-" } else { // else? well... div.innerHTML = '+'; } } Or you can do it also like: jsBin demo using bitwise XOR (^=) and Ternary Operator(?:) function diffSign(div) { div.innerHTML = (div.io^=1) ? '-' : '+' ; } https://stackoverflow.com/a/22061240/383904
type: Answer
answers question: http://stackoverflow.com/q/26129782
score: 1
upvote count: 1

http://stackoverflow.com/comment/40960144
comment on: http://stackoverflow.com/q/26132604
has text: You are drawing the wrong conclusion. Your input data must already be a string. You should fix that.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/26145513
has body: I have a website that has two columns of divs with things the user might want to read. They are not guaranteed to be the same vertical height. When the website is viewed on a small browser or mobile device, I want the two columns to merge into one column, where the items interleave amongst one another. For instance, normally: [A1] [B1 [A2 B1] A2] [B2 [A3] B2] [A4] [B3] On mobile: [A1] [B1 B1] [A2 A2] [B2 B2] [A3] [B3] [A4] Is there a good CSS way to do this with responsive designs? I am using a responsive stylesheet like Pure or Gumby. Or do I have to use JS, in which case, any recommendations for how best to do it with JS?
type: Question
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/40984394
score: 0
has comment: http://stackoverflow.com/comment/40983693
tagged with: http://stackoverflow.com/tag/html
has title: In HTML, how can I make two columns merge together into one for mobile screens?
tagged with: css
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26145900
has answer: http://stackoverflow.com/a/26145846
tagged with: responsive-design

http://stackoverflow.com/comment/40970163
type: Comment
comment on: http://stackoverflow.com/a/26138150
has text: Yes I change both ids to class and when you click any of the button nothing appears anymore. Why?
score: 0
type: AnswerComment

http://stackoverflow.com/a/26119303
type: Answer
answers question: http://stackoverflow.com/q/26119150
upvote count: 1
has comment: http://stackoverflow.com/comment/40934878
score: 1
has comment: http://stackoverflow.com/comment/40937127
has body: Try this: if ($("option:contains('" + data.strRoundName + "')").length == 0) { if(data.strRoundName) $("#selectRound_Type").append(" " + data.strRoundName + " "); }
has comment: http://stackoverflow.com/comment/40934930
downvote count: 0

http://stackoverflow.com/comment/40877609
comment on: http://stackoverflow.com/q/26087296
score: 0
type: Comment
type: QuestionComment
has text: would need to use javascript to intercept click event and send data by ajax

http://stackoverflow.com/comment/40876323
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26086678
has text: +1 from me. I was writing the exact same block of code
type: AnswerComment

http://stackoverflow.com/a/26095535
score: 0
has comment: http://stackoverflow.com/comment/40893055
type: Answer
answers question: http://stackoverflow.com/q/26095391
has body: you can do one thing. Create an event and trigger that event whenever you want. Create an 'listenForAddedTextarea' event like $(document).on("listenForAddedTextarea", function(textarea) { textarea.edtior(); }); Trigger the event $(document).trigger("listenForAddedTextarea");
has comment: http://stackoverflow.com/comment/40892929

http://stackoverflow.com/comment/136106540
type: AnswerComment
comment on: http://stackoverflow.com/a/70878576
type: Comment
has text: Additionally, if you don't want certain columns, you can hide them before you call `copyTable` and then unhide them afterward, perhaps with something like this: `$('#listTable td:nth-of-type(4)').css('display', 'none');` first, then call `copyTable`, then follow it all up with a `.css('display','');`
score: 2

http://stackoverflow.com/comment/40935576
type: Comment
type: QuestionComment
has text: i have modified it to state the question. this is a valid question, intended behaviour is it should behave same way in both calls, why is it that value of level is shared when called with same arguments. dont know why this is downvoted.
score: 0
comment on: http://stackoverflow.com/q/26119275

canvas
tags question: http://stackoverflow.com/q/26083981
tags question: http://stackoverflow.com/q/26120838
tags question: http://stackoverflow.com/q/26044055
tags question: http://stackoverflow.com/q/26182986
tags question: http://stackoverflow.com/q/26150312
tags question: http://stackoverflow.com/q/26049403
tags question: http://stackoverflow.com/q/26127437
tags question: http://stackoverflow.com/q/26052884
tags question: http://stackoverflow.com/q/26152652
tags question: http://stackoverflow.com/q/26078409
tags question: http://stackoverflow.com/q/26135100
tags question: http://stackoverflow.com/q/26163531
tags question: http://stackoverflow.com/q/26076582
tags question: http://stackoverflow.com/q/26094961
tags question: http://stackoverflow.com/q/26070194
tags question: http://stackoverflow.com/q/26110510
tags question: http://stackoverflow.com/q/26113445
tags question: http://stackoverflow.com/q/26072587
tags question: http://stackoverflow.com/q/26040231
tags question: http://stackoverflow.com/q/26048617
tags question: http://stackoverflow.com/q/26044766
tags question: http://stackoverflow.com/q/26090875
tags question: http://stackoverflow.com/q/26067614
tags question: http://stackoverflow.com/q/26041804
tags question: http://stackoverflow.com/q/26080776
tags question: http://stackoverflow.com/q/26102043
tags question: http://stackoverflow.com/q/26055344
tags question: http://stackoverflow.com/q/26122861
tag name: canvas
tags question: http://stackoverflow.com/q/26167848
tags question: http://stackoverflow.com/q/26086034
tags question: http://stackoverflow.com/q/26088944
tags question: http://stackoverflow.com/q/26055141
type: Tag
tags question: http://stackoverflow.com/q/26171610
tags question: http://stackoverflow.com/q/26186381
tags question: http://stackoverflow.com/q/26131150
tags question: http://stackoverflow.com/q/26126710
tags question: http://stackoverflow.com/q/26080411
tags question: http://stackoverflow.com/q/26131526
tags question: http://stackoverflow.com/q/26107323
tags question: http://stackoverflow.com/q/26050668
tags question: http://stackoverflow.com/q/26138234
tags question: http://stackoverflow.com/q/26090943
tags question: http://stackoverflow.com/q/26191634
tags question: http://stackoverflow.com/q/26165307
tags question: http://stackoverflow.com/q/26151695
tags question: http://stackoverflow.com/q/26156178
tags question: http://stackoverflow.com/q/26107207
tags question: http://stackoverflow.com/q/26101256
tags question: http://stackoverflow.com/q/26043360
tags question: http://stackoverflow.com/q/26042198
tags question: http://stackoverflow.com/q/26045680
tags question: http://stackoverflow.com/q/26156714

http://stackoverflow.com/a/26037922
has body: You want to use the same function in three totally different usecases. In each case different arguments are automatically passed to the function. So first declare and prepare it to handle all possible types of arguments: function loadSection(index, obj, args) { var element, params = null; if (obj &amp;&amp; obj.nodeType) { // for usecase 2 element = obj; if (typeof args == 'object') params = args; } else { if (typeof obj == 'object') params = obj; if (typeof index == 'string') { // usecase 1 with selector-string element = document.getElementById(index); else if (index.jquery) { // usecase 1 with jQuery object if (index.length == 1) element = index[0]; // if only one element inside jQuery // if more than one element there call this function recursively on each else index.each(loadSection); } else if (index.target) element = index.target; // for usecase 3 } /* your stuff */ } In your usecase 1 you have to add the function to the global jQuery object and call it by $.loadSection(argument), where argument may be a id-selector-string or an jQuery-object $("selector"). There are two ways with identic result: $.loadSection = loadSection; $.extend({loadSection: loadSection}); In usecase 2 you want to call the function as a method of a jQuery object. Therefore you have to add it to the jQuery.prototype like so: $.fn.loadSection = function( args ) { // $.fn is synonym for jQuery.prototype return this.each(loadSection, args); }; If you call now $("selector").loadSection() the function is executed once for each element matched by "selector". Arguments index and obj are automatically passed to loadSection. In usecase 3 the function is used as callback-function for an event. Since its prepared for this case, the event object is automatically passed to it. So just do: $('.someElement').click(loadSection); You can use all cases mixed in the same piece of code. EDIT "What shall/can the function return?" It may return whatever you want to. Only the behaviour depends on usecase. In us…
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40786995
accepted answer of: http://stackoverflow.com/q/26035922
has comment: http://stackoverflow.com/comment/40788355
has comment: http://stackoverflow.com/comment/40792842
type: Answer
has comment: http://stackoverflow.com/comment/40787810
has comment: http://stackoverflow.com/comment/40787561
has comment: http://stackoverflow.com/comment/40793796
upvote count: 1
answers question: http://stackoverflow.com/q/26035922
score: 1

http://stackoverflow.com/comment/40937958
has text: Looks like a problem with CSS applying to the image tiles.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26120828
score: 0

http://stackoverflow.com/comment/40935678
type: AnswerComment
comment on: http://stackoverflow.com/a/26097322
has text: Tried the changes the error function of the ajax request still triggered.P.S I can't add **if(jqXHR.aborted) return;** to the ajax request as in our real setup we cannot touch the **$.ajax()** due to some restrictions that is why we are capturing the ajax request using **ajaxSend**
type: Comment
score: 0

http://stackoverflow.com/comment/40877289
type: QuestionComment
type: Comment
has text: Is this for browser cache? I mean in network console, do you see 2nd request?
comment on: http://stackoverflow.com/q/26087087
score: 0

http://stackoverflow.com/q/26121911
type: Question
has comment: http://stackoverflow.com/comment/40940139
has comment: http://stackoverflow.com/comment/40940029
score: 1
has body: I have a value inputted by the user. How do I create a certain number of form items for the user to fill out, in either javascript/jQuery or PHP? Eg. 0 1 2 3 4 Button and something like this in jQuery $(document).ready(function(){ var inputnum = $("Fooinput").val(); $("#foobutton").click(function(){ for (var i=0; i<inputnum;i++){ $("#fillout").append(' OPTIONS '); } }); }); I'm happy to see a solution in either jQuery or PHP, I just don't understand how I can later retrieve the values by giving all the select boxes a unique ID.
answer count: 2
upvote count: 1
tagged with: javascript
tagged with: jquery
has title: create a number of form items based on user input
favorite count: 0
has answer: http://stackoverflow.com/a/26121983
accepted answer: http://stackoverflow.com/a/26121983
has comment: http://stackoverflow.com/comment/40939969
possible better answer: http://stackoverflow.com/a/26122357
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26122357
downvote count: 0
has comment: http://stackoverflow.com/comment/40940026
tagged with: php

http://stackoverflow.com/comment/40872647
comment on: http://stackoverflow.com/q/26084565
type: Comment
type: QuestionComment
has text: I think you will have to build an xml document or even a string of html instead of actual DOM elements.
score: 1

http://stackoverflow.com/comment/40942150
score: 0
type: Comment
type: QuestionComment
has text: Where is the index.html?
comment on: http://stackoverflow.com/q/26052208

http://stackoverflow.com/comment/40956215
has text: An alternative to having a lot of sub-documents is to store your data relationally. I argue that point in my answer to [this question](http://stackoverflow.com/questions/25344444/best-model-for-representing-many-to-many-relationships-with-attributes-in-mongod). Though in your case, that may mean chasing down a bunch of other objects instead of seeing them all at once.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26126815
type: Comment

http://stackoverflow.com/comment/40933169
score: 0
type: Comment
has text: @TJ just to make sure it matches what we need. I can't explain why I always use eq(0) even when I'm sure I catch 1 element. As far as I remember I had some problems in the past while I didn't do it this way.
type: AnswerComment
comment on: http://stackoverflow.com/a/26117433

http://stackoverflow.com/comment/41001303
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26154783
score: 0
has text: https://www.npmjs.org/package/grunt-replace

http://stackoverflow.com/q/26126196
score: 1
has comment: http://stackoverflow.com/comment/40953391
has comment: http://stackoverflow.com/comment/40948186
accepted answer: http://stackoverflow.com/a/26126250
has comment: http://stackoverflow.com/comment/40952835
has comment: http://stackoverflow.com/comment/40953572
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40952924
favorite count: 0
has comment: http://stackoverflow.com/comment/40952815
has comment: http://stackoverflow.com/comment/40948251
has title: extract results from html using php
has comment: http://stackoverflow.com/comment/40953974
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40948218
has answer: http://stackoverflow.com/a/26126250
has body: I have looked all over this and other forums and have been banging my head on how to do this. I have a geolocation script that uses document.getElementById("zip").innerHTML = data.zip;) to display the results into the innerhtml of something like this: NOTE: This html is all that's needed to get the results to show. The final html results are 12345 . NOTE: This is what shows after the results are inserted by javascript above. I would like to know how to set "12345" (from the example above) to a php string: $zip = 12345; and completely remove from the page. I have used str_replace to try to pull out all of the html and leave the zip, but have had no luck. Any ideas?
upvote count: 1
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/40955574

http://stackoverflow.com/q/26139321
tagged with: http://stackoverflow.com/tag/html
score: 1
has comment: http://stackoverflow.com/comment/40972001
favorite count: 0
has answer: http://stackoverflow.com/a/26139376
type: Question
linked to: http://stackoverflow.com/q/18677323
has comment: http://stackoverflow.com/comment/40971922
answer count: 2
tagged with: input
upvote count: 1
has comment: http://stackoverflow.com/comment/40973285
linked to: http://stackoverflow.com/q/18852244
has title: how to retrieve any inserted string in input type 'number' in html
has answer: http://stackoverflow.com/a/26139373
has comment: http://stackoverflow.com/comment/40971946
has body: Is there any way of getting the inserted string(of any sort) from: &lt;input type="number" id='zipCode' name='zipcode' /&gt; I'm trying to get value in console as: console.log(document.getElementbyId('zipCode').value); is giving just a blank output when any invalid string(string containing any alphabet or other special characters) is inserted which is also the same when actually left the field blank. But I want to retrieve the actual inserted value so that I can differentiate and validate the blank field with error message "Zipcode Field Empty!" and on invalid character string with error message "Invalid Zipcode!". Is there any way to retrieve any sort of inserted string from input type='number' field?
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/11219242
tagged with: validation

http://stackoverflow.com/q/26083116
possible better answer: http://stackoverflow.com/a/26083356
upvote count: 0
has answer: http://stackoverflow.com/a/26083549
has comment: http://stackoverflow.com/comment/40870044
has answer: http://stackoverflow.com/a/26083356
tagged with: javascript
has comment: http://stackoverflow.com/comment/40869997
has body: I have a place for the main photo (id = "main") and other photos in the table (id = "pic+1(2,3,4,5,6)"). I would like to click on a photo with id = "pic n" and to load it in the element with id "main". How to realize this? Also I have an error Uncaught TypeError: Cannot set property 'onclick' of null. Here is my code: &lt;img id="main" src=""&gt; galery(dir){ ... ... function createPreview() { var f = document.createElement("table"); var row = f.insertRow(); for(var j = 0; j &lt; count ; j++) { var cell = row.insertCell(j); var img = new Image(); img.src = dir + '/' + j + ".jpg"; img.width = "100"; img.id = 'pic' + j; cell.appendChild(img); } document.body.appendChild(f); } document.getElementById(this.pic).onclick = function() { document.getElementById('main').src = this.src; } ... }
has comment: http://stackoverflow.com/comment/40870121
tagged with: http://stackoverflow.com/tag/html
has title: load an image in a particular element using javascript
has comment: http://stackoverflow.com/comment/40870032
favorite count: 0
accepted answer: http://stackoverflow.com/a/26083549
has comment: http://stackoverflow.com/comment/40870014
score: -3
type: AnsweredQuestion
downvote count: 3
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40870045

http://stackoverflow.com/comment/41004179
comment on: http://stackoverflow.com/q/26156408
score: 0
type: QuestionComment
type: Comment
has text: Hi @mccannf - Thank you for the suggestion but it's not working unfortunately.

http://stackoverflow.com/comment/40888400
type: QuestionComment
has text: @Haim - no browser running in node.js
type: Comment
comment on: http://stackoverflow.com/q/26084224
score: 0

http://stackoverflow.com/a/26216361
answers question: http://stackoverflow.com/q/26161742
score: 0
type: AcceptedAnswer
has body: Ok. Now I know why my ajax failed. I imported the jquery from Google libraries, i integrate the jquery-file in my www folder and it worked.
accepted answer of: http://stackoverflow.com/q/26161742
type: Answer

http://stackoverflow.com/comment/40783295
has text: Note: You only need the single quotes inside the `[]` *if* the key contains special characters
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26035134
type: AnswerComment

http://stackoverflow.com/comment/40899670
type: Comment
score: 0
type: AnswerComment
has text: @user3667305 You should either do what Kartikeya suggested or.. $(document).on('click', '#btnAddAddress', function() {...} .. or both..
comment on: http://stackoverflow.com/a/26099369

http://stackoverflow.com/a/26064670
score: 0
has body: Something like that ? http://jsfiddle.net/OxyDesign/vs2e618L/ JS var date = new Date(1410678000000), month = date.getMonth()+1, //mm day = date.getDate(), //dd year = date.getFullYear(), //yyyy hours = date.getHours(), //HH minutes = date.getMinutes(), //MM dateString; if(month &lt;= 9) month = '0'+month; if(day &lt;= 9) day = '0'+day; if(hours &lt;= 9) hours = '0'+hours; if(minutes &lt;= 9) minutes = '0'+minutes; dateString = month+'-'+day+'-'+year+' '+hours+':'+minutes; console.log(dateString);
type: Answer
answers question: http://stackoverflow.com/q/26064301
has comment: http://stackoverflow.com/comment/40836736
has comment: http://stackoverflow.com/comment/40836639
has comment: http://stackoverflow.com/comment/40837254

http://stackoverflow.com/comment/40845926
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26069538
has text: Maybe I am misreading your question. It seemed to me the settings are editable by the user and then sent to the backend anyway, so the question was just how to store them, and not whether the backend should be aware of them.

http://stackoverflow.com/a/26092183
score: 11
upvote count: 13
downvote count: 2
answers question: http://stackoverflow.com/q/26092101
has comment: http://stackoverflow.com/comment/40886889
has comment: http://stackoverflow.com/comment/40887108
has comment: http://stackoverflow.com/comment/40887889
has body: It limits the object initialization costs and additionally ensures that all function invocations use the same object. This allows, for example, state to be stored in the object for future invocations to use. While it's possible that it does limit memory usage, usually the GC will collect unused objects anyways, so this pattern is not likely to help much. This pattern is a specific form of closure.
has comment: http://stackoverflow.com/comment/40887227
has comment: http://stackoverflow.com/comment/40887430
has comment: http://stackoverflow.com/comment/40894394
has comment: http://stackoverflow.com/comment/40890271
has comment: http://stackoverflow.com/comment/40886906
has comment: http://stackoverflow.com/comment/40886911
type: Answer

http://stackoverflow.com/q/26046030
favorite count: 0
has comment: http://stackoverflow.com/comment/105064914
type: UnansweredQuestion
tagged with: iframe
downvote count: 1
has body: Is there any way to change or block the usage of window.location.ancestorOrigins in iframed sites under Chrome? For security reasons, I do not wish the iframed page to be able to detect the top url. Under Firefox, if the &lt;iframe&gt; is pointing to another &lt;iframe&gt;, it solves the issue. But under Chrome, it's still detecting the main website.
type: Question
tagged with: browser
has answer: http://stackoverflow.com/a/44061180
answer count: 2
score: 5
has title: Change window.location.ancestorOrigins
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/74533569
has answer: http://stackoverflow.com/a/54873384
upvote count: 6

http://stackoverflow.com/q/26054097
has title: What is the difference between CONSTANT : value and CONSTANT = value?
accepted answer: http://stackoverflow.com/a/26054211
has comment: http://stackoverflow.com/comment/40816498
type: Question
has comment: http://stackoverflow.com/comment/40816658
tagged with: javascript
has comment: http://stackoverflow.com/comment/40818544
has comment: http://stackoverflow.com/comment/40816771
score: 0
has body: I´m learning javascript and I have found a file with many assignments done with the operand ':' instead of '='. In spite of the title of the question, I have seen it in non-constants too. What´s the point for that? What´s the meaning of the ':' operand here? Thank you. var MyApplet = { FILE_NAME : 'filename.ext', CUSTOM_ARGUMENTS : null, BUFFER_SIZE : 1024 * 1024, (...)
answer count: 1
has answer: http://stackoverflow.com/a/26054211
favorite count: 0
has comment: http://stackoverflow.com/comment/40816501
upvote count: 1
downvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/comment/40972261
type: QuestionComment
has text: thank you for your answer. I need something like this. Please check this link out: http://jsfiddle.net/PPSh3/7/
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26137980

http://stackoverflow.com/comment/40890573
score: 0
type: Comment
type: QuestionComment
has text: My question is whether it is possible to do something about it. I wasn't creating the form.
comment on: http://stackoverflow.com/q/26093934

http://stackoverflow.com/a/26098481
has comment: http://stackoverflow.com/comment/40897950
has body: There is mistake in js code. Copy and paste following code $(document).ready(function Carousel() { $(".carousel #1").show("fade", 500); $(".carousel #1").delay(5500).hide("slide", {direction:'left'}, 500); var sc = $(".carousel img").size(); var count = 2; setInterval(function() { $(".carousel #"+count).show("slide",function(){direction: 'right', 500}); $(".carousel #"+count).delay(5500).hide("slide", {direction:'left'}, 500); if (count == sc) { count = 1; } else { count = count + 1 } }, 6500); })
score: 2
has comment: http://stackoverflow.com/comment/40897912
has comment: http://stackoverflow.com/comment/40900865
answers question: http://stackoverflow.com/q/26098072
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/26098072

http://stackoverflow.com/comment/40900148
comment on: http://stackoverflow.com/q/26099676
has text: Not a direct answer, but there's another plugin you might find use of - https://github.com/kennethcachia/Background-Check - changes color of an element depending on brightness of background.
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/comment/40800970
type: Comment
type: QuestionComment
has text: masonry.desandro.com -> this is the thing which I was looking for. THANK You @hungerstar :)
score: 0
comment on: http://stackoverflow.com/q/26039169

http://stackoverflow.com/a/26053897
accepted answer of: http://stackoverflow.com/q/26053837
score: 0
answers question: http://stackoverflow.com/q/26053837
type: AcceptedAnswer
type: Answer
has body: you have to put href="javascript:void(0)" instead of href="" else it will reload the page without calling the ajax

http://stackoverflow.com/comment/74312975
has text: Well, it feels smelly and I'm sure there are better ways to it. As for security, I wasn't even talking about that aspect. Do you have a specific question about it?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26109589
type: Comment

http://stackoverflow.com/q/26095180
tagged with: javascript
favorite count: 0
score: 0
tagged with: python
tagged with: node.js
has body: I want to create my own application for monitoring traffic of my website without using any third party tools like google analytics. In which I want to log screenshots, user details, page details and cookies. So what technology should I opt so as to achieve this goal and which will be best suited and what work flow should I follow. I've never done this kind of work previously so I'm new to this. Any help would be greatly appreciated. The technologies I know are : javascript, nodejs, django(python).
has comment: http://stackoverflow.com/comment/40892502
tagged with: django
upvote count: 1
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26095512
tagged with: evercookie
type: Question
has answer: http://stackoverflow.com/a/26095512
has title: Want to create a new application for website traffic monitoring ( analysis )
answer count: 1

http://stackoverflow.com/comment/40896087
type: Comment
comment on: http://stackoverflow.com/a/26097279
score: 0
type: AnswerComment
has text: The alert is "Yes" in all conditions.

http://stackoverflow.com/a/26072221
has body: I'd suggest: // selects all elements, then filters the collection: $('ul').filter(function () { // we keep only those elements with no child-elements // (note 'children' not 'childNodes'): return this.children.length === 0; // we then remove those retained elements: }).remove(); ul { border: 2px solid #f00; margin: 0 0 0.5em 0; } References: filter(). remove().
has comment: http://stackoverflow.com/comment/40858887
type: Answer
answers question: http://stackoverflow.com/q/26072163
has comment: http://stackoverflow.com/comment/40853231
has comment: http://stackoverflow.com/comment/40858836
score: 0
has comment: http://stackoverflow.com/comment/40853397
has comment: http://stackoverflow.com/comment/40855494

http://stackoverflow.com/a/27149029
has body: Use window.onload = function(){ }; on the behalf of jQuery(window).load(function(){ }); I am able to fix this issue on my project.
score: 0
answers question: http://stackoverflow.com/q/26145674
type: Answer

http://stackoverflow.com/q/26149727
has comment: http://stackoverflow.com/comment/40991907
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Javascript target multiple elements
type: AnsweredQuestion
has body: I have the following JS: function init_selectAllFull(){ $('#select-all-perms input, #user_full_access_to_all_shows').click(function() { var checked = $(this).is(':checked'); $('#show-permissions-list').find('input[type=checkbox].full_access').each(function() { if (checked) { $(this).prop("checked", true); } else { $(this).removeAttr("checked"); $(".internal.external[value='none']").prop('checked', true); $(".external[value='none']").prop('checked', true); $(".internal[value='none']").prop('checked', true); $(".external.internal[value='none']").prop('checked', true); } $(this).trigger("change"); }); }); } It checks a bunch of radio fields when user unchecks a field. This works but I don't like the following code, there's too much repetition going on. $(".internal.external[value='none']").prop('checked', true); $(".external[value='none']").prop('checked', true); $(".internal[value='none']").prop('checked', true); $(".external.internal[value='none']").prop('checked', true); Is there a cleaner way to target multiple classes? any help would be greatly appreciated. thank you so much!
has answer: http://stackoverflow.com/a/26149778
accepted answer: http://stackoverflow.com/a/26149778
has comment: http://stackoverflow.com/comment/40992178
type: Question

http://stackoverflow.com/q/26078454
score: 0
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/26078519
type: Question
has title: JQuery AJAX Method Returns a Syntax Error: Unexpected Identifier
tagged with: javascript
has body: I have been wrestling with a weird error for quite some time now. I want to believe that this is one of those errors where the solution will just slap me in the face, but we shall see. Here's the code: var images = {}; // Set Image Gallery function setImageGallery() { // Get Product JSON $.ajax({ url:"JSONimages.php" data:{ "table":"belts" }, // Firefox says this } is missing... but it's here. success:function (data) { images = $.parseJSON(data); alert("Got Images!"); } }); } And here's the code snippet being pulled from an AJAX Request: Edit Image Gallery Select Gallery: Belts Gallery Home Hybrid IWB Knives OWC Image: Price: Description: Now, in the process of debugging, I changed the $.AJAX() method to directly set the value of "table" for my PHP (which outputs JSON) script to "belts". I'm getting mixed results. Chrome is telling me it's an error from the JQuery Script itself. Firefox says there's a missing "}" at the spot where I put the little comment in the first code sample. I've toyed with the script with zero luck. It's errors like this that let me know I have a lot to learn :/ The anonymous success function never gets run and the alert doesn't pop up, of course. I'm hoping this is a stupid error and that I'm making a newb mistake here :)
tagged with: jquery
has answer: http://stackoverflow.com/a/26078507
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26078519
possible better answer: http://stackoverflow.com/a/26078507
tagged with: php
has answer: http://stackoverflow.com/a/26078557
type: AnsweredQuestion

http://stackoverflow.com/a/26099217
answers question: http://stackoverflow.com/q/26099071
score: 1
upvote count: 1
downvote count: 0
has body: I think the answer to your question is pretty easy. In your code you have the line $("#people").keyup(function() { Which is probably not what you wanted to do, cause now you are waiting for a keyup (release of a key) event on a list. First of all your question stated that you want the user to click and not to press a button and second you want the list items not the list itself. So IMO you have to change that part to something like: $("li","#people").click(function(){ var content = this.html(); $("#testbox").val(content); });
type: Answer

http://stackoverflow.com/a/26154656
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26154497
downvote count: 0
type: Answer
has body: This is more related to CSS styling than JavaScript code, I think I got it working just tweaking two classes in your CSS code: span { vertical-align:middle; display: inline-flex; word-break: keep-all; } #container { text-align: left; display: block; min-width:400px; max-width:400px; height:100px; border:1px solid; } This is how it looks like: The thing is, span elements must fit into its parent element, that's why you should make children display inline and not its parent. Working example: Wrap span tags into DIV

http://stackoverflow.com/q/26092938
tagged with: office365
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40923783
has comment: http://stackoverflow.com/comment/41896642
has comment: http://stackoverflow.com/comment/41941876
has comment: http://stackoverflow.com/comment/40912115
tagged with: outlook-web-app
upvote count: 5
accepted answer: http://stackoverflow.com/a/26673248
tagged with: javascript
score: 4
tagged with: exchangewebservices
has comment: http://stackoverflow.com/comment/41870099
has comment: http://stackoverflow.com/comment/40959889
answer count: 1
has comment: http://stackoverflow.com/comment/41104727
tagged with: jquery
has comment: http://stackoverflow.com/comment/41909480
favorite count: 0
has comment: http://stackoverflow.com/comment/41936170
has answer: http://stackoverflow.com/a/26673248
has comment: http://stackoverflow.com/comment/41861146
has body: I am developing a outlook Web App (Office 365 Developer). Regarding that, is there a way to read the headers of the selected mail which lays on inbox?. I am using Exchange server 2013. I would like to use Jquery or Javascript for write the code. I tried to add "Message Header Analyzer" from Microsoft ( link:- 'https://store.office.com/message-header-analyzer-WA104005406.aspx?assetid=WA104005406'). Now it is working properly and it can read headers. But I need to implement the same functionality using my own codes. If anyone can provide a good reference as a start, I would greatly appreciated that. (because, I got a great effort in searching google. But.. still no luck) thanks in advance.
has comment: http://stackoverflow.com/comment/41862726
has comment: http://stackoverflow.com/comment/41861052
has title: Read email headers in Outlook Web Access (OWA)
downvote count: 1
type: Question

http://stackoverflow.com/comment/41034683
has text: I would not recommend running to jquery to solve this. If it is a simple use case, you don't need the weight of jquery. Designing a simple popup form is actually pretty simple
score: 2
type: Comment
comment on: http://stackoverflow.com/q/26172881
type: QuestionComment

http://stackoverflow.com/q/26039960
has comment: http://stackoverflow.com/comment/40790652
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40790569
type: Question
has body: I'm having a javascript object as below. var obj = { pageSize:"25",asOfDate:"Thu Sep 25 00:00:00 UTC+0530 2014"}; when i stringify it, var d = JSON.stringify(obj); its giving me result as {"pageSize":"25","asOfDate":"2014-09-24T18:30:00Z"} what could be the reason that its giving date 2014-09-24 than 2014-09-25 ? EDIT: My deployment server is located in US (Eastern Time UTC -5:00).when i check the site from my local machine in india its giving me date as 24 Sept 2014
linked to: http://stackoverflow.com/q/1486476
has title: JSON.stringify(objExtraParam) giving wrong date
has answer: http://stackoverflow.com/a/26040106
tagged with: javascript
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/40790718
has answer: http://stackoverflow.com/a/26040145
has answer: http://stackoverflow.com/a/30528679
has comment: http://stackoverflow.com/comment/40790525
type: UnansweredQuestion

http://stackoverflow.com/comment/83249410
type: QuestionComment
comment on: http://stackoverflow.com/q/26075742
has text: Can you post the answer to it? I am stuck in a similar situation and need a solution. I don't have any experience in jquery. Thanks.
score: 0
type: Comment

window
tags question: http://stackoverflow.com/q/26087902
tags question: http://stackoverflow.com/q/26131821
tag name: window
tags question: http://stackoverflow.com/q/26125922
tags question: http://stackoverflow.com/q/26159520
type: Tag

http://stackoverflow.com/q/26146962
tagged with: firefox-addon-sdk
has answer: http://stackoverflow.com/a/26177181
tagged with: javascript
type: UnansweredQuestion
has body: I'm building a Firefox Addon with the Add-on SDK and I need to import in my lib/main.js the linq.js library which exposes the Enumerable object. This library should be imported in lib/main.js because what I need is a script that runs just once (as for the corresponding background.js file for a Chrome extension). What I tried so far is loading linq.js as a contentScriptFile, but I get an error when trying to use the Enumerable object. Here's my code: var data = require("sdk/self").data; var pageMod = require("sdk/page-mod"); pageMod.PageMod({ include: "*", contentScriptWhen: 'start', contentScriptFile: [data.url("linq.js")] }); console.log(Enumerable); Which returns: Message: ReferenceError: Enumerable is not defined Any hint? Thank you.
tagged with: firefox-addon
score: 2
has title: Import linq.js in Firefox Addon
downvote count: 0
favorite count: 0
type: Question
upvote count: 2
answer count: 1

http://stackoverflow.com/comment/40936741
score: 0
type: AnswerComment
type: Comment
has text: This is a lot harder than I thought. I'm actually using a WordPress plugin called WP-Polls and once someone has voted on a poll, he gets shown a 'thank you' message + comment form. That is the point where I'd like to insert the hidden div. I was just digging through the plugin files and found two that I thought were relevant. Here's [one](http://pastebin.com/b3kViC3m), and here's the [other](http://pastebin.com/nFJKAwcL). I think the line you're looking for is line 144 of the first file which I pasted into the post above. I could be wrong, though.
comment on: http://stackoverflow.com/a/26119346

http://stackoverflow.com/comment/41032673
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26167763
type: Comment
has text: First thank you. I read the example you gave and the only thing is I need to use URL instead of track id

http://stackoverflow.com/q/26077427
answer count: 1
favorite count: 0
score: -1
has comment: http://stackoverflow.com/comment/40859374
has answer: http://stackoverflow.com/a/26077692
has comment: http://stackoverflow.com/comment/40859661
has body: At the top of every one of my functions is this line: var local = {} This way I can scope my variables by saying local.x = 1 local.y = 2 How can I change the prototype of all functions to include an empty object called 'local'?
upvote count: 1
has comment: http://stackoverflow.com/comment/40860204
has comment: http://stackoverflow.com/comment/40859499
type: AnsweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/40859338
accepted answer: http://stackoverflow.com/a/26077692
has title: How to add a local variable automatically to every function
has comment: http://stackoverflow.com/comment/40859792
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41061119
type: Comment
has text: I set it as multipart/form-data yet still no luck although it is different. Before I modified content-type, when I requested $_FILES["file"]["name"] it was blank, but now it gives "0"
comment on: http://stackoverflow.com/a/26186826
score: 0
type: AnswerComment

http://stackoverflow.com/q/26112809
type: AnsweredQuestion
upvote count: 3
tagged with: http-redirect
tagged with: authentication
has comment: http://stackoverflow.com/comment/40924133
type: Question
score: 3
has answer: http://stackoverflow.com/a/26113718
possible better answer: http://stackoverflow.com/a/26113247
has answer: http://stackoverflow.com/a/26113247
answer count: 2
has body: I am creating an application based on Yii framework, now I'm trying to setup the login for it, as I have shown in the picture below. The Yii folder is within my web application directory. In the login of web application when I call Login_yii/index.php?r=site/login as the action of my login form (one of the scripts I have circled) it redirects to the index.php of the yii folder instead of redirecting to my index.php(which i have circled in the picture). Can anybody help me on this? I even tried modifying the site controller if($model->validate() && $model->login()) $this->redirect(array("/<controller>/<action>")); but it didn't work but not sure whether I gave the correct path to it, and not sure what shall I put for the controller to get my own index File structure: login.php: Sign In Username Please enter the username Password Enter your password <a href="<?php echo APP_URL; ?>/forgotpassword.php">Forgot password? Stay signed in Sign in Controller: <?php class SiteController extends Controller { public function actions() { return array( // captcha action renders the CAPTCHA image displayed on the contact page 'captcha'=>array( 'class'=>'CCaptchaAction', 'backColor'=>0xFFFFFF, ), // page action renders "static" pages stored under 'protected/views/site/pages' // They can be accessed via: index.php?r=site/page&view=FileName 'page'=>array( 'class'=>'CViewAction', ), ); } public function actionIndex() { // renders the view file 'protected/views/site/index.php' // using the default layout 'protected/views/layouts/main.php' $this->render('index'); } public function actionError() { if($error=Yii::app()->errorHandler->error) { if(Yii::app()->request->isAjaxRequest) echo $error['message']; else $this->render('error', $error); } } public function actionContact() { $model=new ContactForm; if(isset($_POST['ContactForm'])) { $model->attributes=$_POST['ContactForm']; if($model->validate()) { $name='=?UTF-8?B?'.base64_encode($model->name).'?='; $subject='=?UTF-8?B?'.base64_encode(…
downvote count: 0
tagged with: yii
tagged with: javascript
has title: Yii successful login redirects to a wrong index.php not the one I intend to
favorite count: 0
accepted answer: http://stackoverflow.com/a/26113718
tagged with: php

http://stackoverflow.com/comment/127874526
has text: This also fails for single-letter domains, i.e. `a.co`, but those are valid.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26093611
type: Comment

http://stackoverflow.com/comment/40789331
comment on: http://stackoverflow.com/a/26038321
has text: Could you check? I've updated the Fiddle. You need to take care of memory leaks, cause this code is very leaky. Some reorganization would help. (but IMO this is out of the context of your question)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26178176
has comment: http://stackoverflow.com/comment/41044301
has comment: http://stackoverflow.com/comment/41044972
accepted answer of: http://stackoverflow.com/q/26178094
answers question: http://stackoverflow.com/q/26178094
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41043986
downvote count: 0
has comment: http://stackoverflow.com/comment/41044737
score: 5
type: Answer
has comment: http://stackoverflow.com/comment/41044318
has body: You need to add event as a parameter in your click function handler like this: $(document).ready(function () { $('.sub-list-click a').click(function (event) { event.preventDefault(); var sub = $(this).parent("li").next(".sub, .homepage-sub"); if (sub.css('display') == 'none') { $(".sub, .homepage-sub").slideUp(); $(".sub, .homepage-sub").children("li").animate({ opacity: "0" }, 10); setTimeout(function () { sub.slideDown(); }, 200); setTimeout(function () { sub.children("li").animate({ opacity: "1" }, 200); }, 500); } else { sub.slideUp(); } }); }); Also note that this example is wrapped inside a document.ready event (you might already do this, but since it was not apparent i'll add this as note) "Working" example here (that prevents the following to the link, not any of the animation stuff): http://fiddle.jshell.net/79uuqmho/1/ Edit/Update: The reason why it does not work in Firefox is because using event.something gives you an event not defined error which stops the execution of your script. Chrome on the other hand does not give that exception (probably due to event being defined somewhere in the window object) and allows the script to execute down to return false; (which is the same as {event.preventDefault(); /* AND */ event.stopPropagation();}
has comment: http://stackoverflow.com/comment/41044858
upvote count: 5

http://stackoverflow.com/a/26158314
type: Answer
answers question: http://stackoverflow.com/q/26157811
has comment: http://stackoverflow.com/comment/41007271
has body: tinyMCE hides the textarea and presents its own contenteditable div so there is no keydown happening on your textarea. You'll need to add the event listener using tinyMCE's methods when you initialise it: tinyMCE.init({ selector:'#ap0sub2', setup : function(ed) { ed.on('keydown', function(e) { cambios = true; console.log(cambios); }); } }); Working demo: http://jsfiddle.net/exmdg7ha/
upvote count: 1
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26157811

http://stackoverflow.com/q/26150715
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26151128
has body: I am having a problem rendering everything on the server side and have a handleSubmit triggered. Here is the source code: index.js: module.exports = require('./app/server'); app/server/index.js: 'use strict'; var env = process.env.NODE_ENV || 'development'; var express = require('express'); var http = require('http'); var app = express(); app.set('state', {}); // Inject Config require('../config/server')[env](app, express); // Inject component rendering require('node-jsx').install({extension: '.jsx'}); app.use(require('../../lib/renderReactComponent')(app)); // Start server var server = http.createServer(app); return server.listen(app.get('port'), function() { return console.log('Listening on port ' + app.get('port') + ', Env: ' + app.settings.env); }); module.exports = app; lib/renderReactComponent.js: var ReactApp = require('../app'); var React = require('react'); var path = require('path'); var url = require('url'); module.exports = function(app) { return function(req, res, next) { try { var path = url.parse(req.url).pathname; res.send(React.renderComponentToStaticMarkup(ReactApp({path: path, state: app.get('state')}))); } catch(err) { return next(err) } } } app/index.js: var ReactApp = require('./components/app'); module.exports = ReactApp; app/components/app.js: /** * @jsx React.DOM */ var React = require('react'); var ReactRouter = require('react-router-component'); var App = React.createClass({ propTypes: {state: React.PropTypes.object.isRequired}, getInitialState: function() { return {items: [], text: ''}; }, handleSubmit: function () { console.log("handleSubmit triggered!"); var $author = this.refs.author.getDOMNode(), $text = this.refs.text.getDOMNode(), author = $author.value.trim(), text = $text.value.trim(); if(!author || !text) { return false; } if(this.props.onCommentSubmit) { this.props.onCommentSubmit({ author: author, text: text }); } $author.value = ''; $text.value = ''; return false; }, render: function() { return ( &lt;html&gt; &lt;form classNam…
type: Question
tagged with: reactjs
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41021576
has title: React.js: handleSubmit or onClick not triggered when rendered on the server side
favorite count: 0
tagged with: express
has comment: http://stackoverflow.com/comment/40995092
has comment: http://stackoverflow.com/comment/40993538
tagged with: node.js
has comment: http://stackoverflow.com/comment/41000406
score: 2
upvote count: 2

http://stackoverflow.com/comment/41040040
type: QuestionComment
has text: I just noticed that the HTML generated by Jade is not formatted. If I format it, the display is the same as EJS ! How come ? without formatting : http://jsfiddle.net/k0xwx35p/ with formatting : http://jsfiddle.net/kjd4h6bz/
score: 0
comment on: http://stackoverflow.com/q/26169104
type: Comment

http://stackoverflow.com/q/26073057
type: UnansweredQuestion
has body: Client-side: when("/page/:id", { templateUrl: "partials/note-tpl.html", controller : "AppPageController" }); $locationProvider.html5Mode( true ); Html: &lt;a ng-href="/page/{{Page._id}}"&gt;{{Page.name}}&lt;/a&gt; Server-side: app.use("/page/:id", function( req, res ) { res.send( req.params ) }); As a result I get empty page or just object with id. What's wrong? Angular does not load note-tpl.html template
has answer: http://stackoverflow.com/a/26076552
has answer: http://stackoverflow.com/a/26073383
type: Question
has title: Using AngularJS html5mode with express.js
answer count: 2
tagged with: javascript
tagged with: express
score: 0
tagged with: node.js
tagged with: angularjs

http://stackoverflow.com/q/26192594
tagged with: javascript
tagged with: jquery
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/41071145
favorite count: 0
tagged with: ruby
has body: I'm trying to implement Pusher to my rails app and have it working in principal however I am struggling to add ruby code to the string of data being pushed to the client to create a url using link_to. I'm struggling to understand the problem as the javascript console is saying: Uncaught SyntaxError: Unexpected token % Any help would be much appreciated.
tagged with: ruby-on-rails
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26193066
downvote count: 0
has title: Pusher - adding ruby to javascript string?
score: 1
type: Question
has answer: http://stackoverflow.com/a/26193066
tagged with: pusher

http://stackoverflow.com/comment/40907196
comment on: http://stackoverflow.com/a/26102792
has text: no, that's exactly what I'm trying to achieve, to have the background the same size as the content if content_height is greater than the labels_height
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26116477
has comment: http://stackoverflow.com/comment/40930506
type: Answer
score: 1
has body: You code can be converted to Underscore like that: _.each(item,function(i){ _.each($scope.previous,function(p) { if (i.AttributeName == p.AttributeName &amp;&amp; i.Value != p.Value) $scope.toUpdate.push(i); }); }); But I think you want to avoid duplicating of items, then you can try this: $scope.toUpdate = _.filter(item,function(i) { return _.any($scope.previous,function(p){ return i.AttributeName == p.AttributeName &amp;&amp; i.Value != p.Value; }); }); JSFiddle Update Check following docs: .each .filter _.any
upvote count: 1
has comment: http://stackoverflow.com/comment/40930262
answers question: http://stackoverflow.com/q/26116298
has comment: http://stackoverflow.com/comment/40930412
accepted answer of: http://stackoverflow.com/q/26116298
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40923164
type: QuestionComment
has text: solved issue, added cache:false in ajax call.
comment on: http://stackoverflow.com/q/26087087
score: 0
type: Comment

http://stackoverflow.com/a/26155290
upvote count: 1
has body: use return confirm('ARE YOU SURE YOU WANT TO DELETE IT?');
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/26155200

http://stackoverflow.com/q/26056434
has answer: http://stackoverflow.com/a/74776162
has answer: http://stackoverflow.com/a/26657053
has answer: http://stackoverflow.com/a/26056535
has body: How can I sum time in javascript? 01:00:00 00:30:00 00:30:00 I have times like above I want the sum of the given time, like sum of above time = 02:00:00 If I use the JavaScript methods setHours() and setMinutes() these function replace old time and show newly added time like: new Date(new Date(0, 0, 0, 00, 00, 00, 0)).setMinutes(30) new Date(new Date(new Date(0, 0, 0, 00, 00, 00, 0)).setMinutes(30)).setMinutes(30); The result of both conditions the same but I want here 00:30 + 00:30 = 01:00.
downvote count: 0
has comment: http://stackoverflow.com/comment/40820653
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Sum of Time using javascript
linked to: http://stackoverflow.com/q/16240262
has answer: http://stackoverflow.com/a/64857879
answer count: 9
has answer: http://stackoverflow.com/a/44509642
has answer: http://stackoverflow.com/a/26056713
has answer: http://stackoverflow.com/a/26056581
upvote count: 7
has answer: http://stackoverflow.com/a/75538037
type: Question
accepted answer: http://stackoverflow.com/a/26056581
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26056713
has answer: http://stackoverflow.com/a/56138391
score: 7

http://stackoverflow.com/comment/40969964
type: QuestionComment
type: Comment
has text: The ":varName?" syntax seems to be not supported by stateProvider, but routerProvider. try regexp format: '/asd[/:idContact]'
comment on: http://stackoverflow.com/q/26138094
score: 0

ruby-on-rails
tags question: http://stackoverflow.com/q/26192594
tags question: http://stackoverflow.com/q/26136991
tags question: http://stackoverflow.com/q/26043862
type: Tag
tags question: http://stackoverflow.com/q/26070007
tags question: http://stackoverflow.com/q/26158214
tags question: http://stackoverflow.com/q/26164509
tags question: http://stackoverflow.com/q/26053685
tags question: http://stackoverflow.com/q/26182272
tags question: http://stackoverflow.com/q/26045003
tags question: http://stackoverflow.com/q/26180422
tags question: http://stackoverflow.com/q/26051911
tags question: http://stackoverflow.com/q/26081297
tags question: http://stackoverflow.com/q/26084533
tags question: http://stackoverflow.com/q/26167526
tags question: http://stackoverflow.com/q/26067771
tags question: http://stackoverflow.com/q/26049327
tags question: http://stackoverflow.com/q/26164292
tags question: http://stackoverflow.com/q/26110647
tags question: http://stackoverflow.com/q/26122984
tags question: http://stackoverflow.com/q/26133340
tags question: http://stackoverflow.com/q/26167520
tags question: http://stackoverflow.com/q/26154384
tags question: http://stackoverflow.com/q/26087573
tags question: http://stackoverflow.com/q/26034455
tags question: http://stackoverflow.com/q/26133086
tags question: http://stackoverflow.com/q/26051643
tags question: http://stackoverflow.com/q/26060235
tags question: http://stackoverflow.com/q/26114402
tags question: http://stackoverflow.com/q/26112082
tags question: http://stackoverflow.com/q/26118398
tag name: ruby-on-rails
tags question: http://stackoverflow.com/q/26158422
tags question: http://stackoverflow.com/q/26182928
tags question: http://stackoverflow.com/q/26192826
tags question: http://stackoverflow.com/q/26157409
tags question: http://stackoverflow.com/q/26147574
tags question: http://stackoverflow.com/q/26078130
tags question: http://stackoverflow.com/q/26183781
tags question: http://stackoverflow.com/q/26120224
tags question: http://stackoverflow.com/q/26077523
tags question: http://stackoverflow.com/q/26045410
tags question: http://stackoverflow.com/q/26147113
tags question: http://stackoverflow.com/q/26146313
tags question: http://stackoverflow.com/q/26057166
tags question: http://stackoverflow.com/q/26193819
tags question: http://stackoverflow.com/q/26185056
tags question: http://stackoverflow.com/q/26129687
tags question: http://stackoverflow.com/q/26170071
tags question: http://stackoverflow.com/q/26098930
tags question: http://stackoverflow.com/q/26105442
tags question: http://stackoverflow.com/q/26176999
tags question: http://stackoverflow.com/q/26178640
tags question: http://stackoverflow.com/q/26080765
tags question: http://stackoverflow.com/q/26105473
tags question: http://stackoverflow.com/q/26188642
tags question: http://stackoverflow.com/q/26143639

http://stackoverflow.com/comment/40851169
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26072916
type: AnswerComment
has text: Make sure to also explain *why* said change is required. (Also, this will fail when there are 0 images, or 2 or more images that should have the event bound.)

http://stackoverflow.com/a/26109584
upvote count: 1
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40918512
score: 1
has body: There are a couple of ways but I prefer reading the checked property: var isChecked = $('#checkbox').prop('checked'); This is another equivalent statement that reads a little nicer: var isChecked = $('#checkbox').is(':checked'); The reason you are seeing it always checked is because val() is inspecting the checked attribute and not the checked property. Both of my examples should read from the property instead of the attribute. The attribute is reflective of the originally rendered markup and not the true current state of the control. More on properties vs. attributes.
has comment: http://stackoverflow.com/comment/40918473
answers question: http://stackoverflow.com/q/26109538

http://stackoverflow.com/comment/46654737
type: Comment
has text: sometimes it didn't pickup paths as expected. Using `.pipe(order[path1, path2], { base: '.' })` solved it.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26089675

http://stackoverflow.com/a/26107293
type: Answer
score: 2
downvote count: 0
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26105886
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26105886
has body: Query parts and advancedFind are only supported on version 6.2 and above.

http://stackoverflow.com/comment/40935404
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26119261
has text: Why use a link button if you don't want it to do anything?
score: 0

http://stackoverflow.com/comment/41059041
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26145886
score: 1
has text: Thank you for your answer but unfortunatly this doesn't work for me. It works if I use curl but not with Chrome (v37) or Firefox (v32). The browsers don't convert the Information to an authorization header.

http://stackoverflow.com/q/26187332
has comment: http://stackoverflow.com/comment/41070866
favorite count: 0
has comment: http://stackoverflow.com/comment/41061929
tagged with: primitive
possible better answer: http://stackoverflow.com/a/26187401
has comment: http://stackoverflow.com/comment/41062175
has title: How do you extend the constructor for a builtin like Object or Number?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41069888
has comment: http://stackoverflow.com/comment/41061858
downvote count: 0
score: 1
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26187401
tagged with: prototype
has body: Suppose I'd like to make all Numbers have property foo after they are made, containing something like the double of their value, for example. I'd like to do // extend Number constructor here. console.log(5.foo); // outputs 10 How do you do it?
has answer: http://stackoverflow.com/a/26192611
has comment: http://stackoverflow.com/comment/41070772
accepted answer: http://stackoverflow.com/a/26192611
upvote count: 1

http://stackoverflow.com/q/26062516
answer count: 1
tagged with: ractivejs
favorite count: 0
has body: Is there any way to run a computed property with an argument? Pretty much a computed function. JS code computed: { IsShapeToolSelected: function (toolId) { return toolId == this.get("QueryTool.QueryByShapeTool") ? "selected-tool" : ""; } } Html &lt;button on-click='draw: {{0}}' type="button" class="btn btn-default {{IsShapeToolSelected(0)}}"&gt; &lt;span style="font-size:18px;"&gt;&amp;#9679;&lt;/span&gt; &lt;br /&gt; &lt;span&gt;point&lt;/span&gt; &lt;/button&gt; &lt;button on-click='draw: {{1}}' type="button" class="btn btn-default {{IsShapeToolSelected(1)}}"&gt; &lt;img src="Content/imgs/idv.MapTools_Reports/line-24x24.png" /&gt; &lt;br /&gt; &lt;span&gt;line&lt;/span&gt; &lt;/button&gt;
has title: Is it possible to have computed function in RactiveJS?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26063087
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/26063087
tagged with: javascript
upvote count: 1

http://stackoverflow.com/comment/40936118
has text: do you need date picker without year having mindate??
comment on: http://stackoverflow.com/q/26119328
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26072844
score: 1
accepted answer of: http://stackoverflow.com/q/26072777
upvote count: 1
answers question: http://stackoverflow.com/q/26072777
type: AcceptedAnswer
has body: Use .querySelectorAll instead (see mozilla doc). Here the live code snippet: var uls = document.querySelectorAll('ul'); for (var j = 0; j < uls.length; j++) { var ul = uls.item(j); for (var i = ul.children.length; i >= 0; i--) { ul.appendChild(ul.children[Math.random() * i | 0]); } } option1 option2 option3 option1 option2 option3 option1 option2 option3
type: Answer
downvote count: 0

http://stackoverflow.com/comment/40792517
comment on: http://stackoverflow.com/q/26040972
type: Comment
type: QuestionComment
score: 2
has text: So.. you're asking for help in how to query mysql? how to get data from mysql into php? how to get php to draw your chart? You should step back and look at the bigger picture - doesn't matter **WHERE** the coordinates come from, they're just coordinates and you need to write drawing code that can handle them. And the DB itself couldn't care less that they're coordinates. they're just numbers.

http://stackoverflow.com/comment/40924475
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26112110
type: AnswerComment
has text: thanks! yeah something like this, i just have to make the objects dynamic but thanks, this is what i'm looking for!

http://stackoverflow.com/comment/40934201
has text: The desired output is type1\n type2\n type3\n type4
comment on: http://stackoverflow.com/q/26118696
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26100261
has body: For what you want to achieve, the preserveViewport property needs to be set to true like this. directionsDisplay = new google.maps.DirectionsRenderer({ preserveViewport: true }); //directionsDisplay.preserveViewport = false; In addition, your code sets a zoom level of 20 which is too high to see anything on the map. Here is a working example with an initial zoom level of 12: JSFiddle
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26095362
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26095362

http://stackoverflow.com/comment/40891885
has text: @shadow FadeIn function internally calls it.
comment on: http://stackoverflow.com/q/26093497
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26161485
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26161424
has comment: http://stackoverflow.com/comment/41013074
score: 2
has body: When you create an Array, with Array constructor, it creates a sparse Array with the length specified. So when you say Array(20) it has created an Array with 20 elements (by changing the length property), which are not defined yet, in it. So, lets say that the length is set to 5 and you are trying to access the element at 0. Now, JavaScript will look for the property 0 in the Array object and it will not find anything. So, it will return undefined. But when you do something like array[0] = 1, it assigns the property 0, the value 1. So the next time when you look for array[0], it will return 1. Practically, when you simply create an Array, there is nothing in it. Regarding the push, quoting from MDN's Array.prototype.push, The push() method adds one or more elements to the end of an array and returns the new length of the array. So, it has been extending the array whenever you are pushing something to it. You might want to do something like this this.arr[i][j] = map[i][j];
has comment: http://stackoverflow.com/comment/41013674
answers question: http://stackoverflow.com/q/26161424
has comment: http://stackoverflow.com/comment/41013335
has comment: http://stackoverflow.com/comment/41013216
has comment: http://stackoverflow.com/comment/41013147
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41013119

http://stackoverflow.com/q/26052792
has title: Angular js style changing
has answer: http://stackoverflow.com/a/26053402
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
score: -4
has comment: http://stackoverflow.com/comment/40814187
has body: I have following piece of code: $scope.books.Name =$scope.books.Name+ ' (Disposed)'; Html code is: Hre it is binding the text. I want tp assign diffrent color to the r.h.s part of $scope.books.Name How should i do it? I am new to angular js. OP IS: Tax Disposed . I want Tax color to be only changed.
type: Question
answer count: 2
downvote count: 4
upvote count: 0
has answer: http://stackoverflow.com/a/34361484
tagged with: javascript

http://stackoverflow.com/comment/41073719
type: Comment
score: 0
has text: i will have to try this later tonight when i have the time.. but thanks a ton if this works!
type: AnswerComment
comment on: http://stackoverflow.com/a/26173974

http://stackoverflow.com/a/26176232
has comment: http://stackoverflow.com/comment/41041020
answers question: http://stackoverflow.com/q/26175880
downvote count: 0
has comment: http://stackoverflow.com/comment/41041233
has comment: http://stackoverflow.com/comment/41041315
has body: Although I am not 100% on the exact whys I think the reason is because by declaring it fixed has the following effect. fixed Do not leave space for the element. Instead, position it at a specified position so it means content being 100% is allowed to take the whole screen when the page is first rendered. Navigation (although not the one being fixed which is the confusing bit) is on the screen but hidden by the content at 100%. the interesting thing is if you use chrome to disable the fixed property the navigation appears and then because it is now on screen reapplying the position fixed does not hide it which is why the JS route behaves differently. the changes to fix could defining the initial widths in % relative to each other. #content { position: relative; background-color: #eee; width: 70%; max-width: 1300px; min-width: 450px; height: auto; } and then the same for navigation #navigation { width: 30%; background-color: #000; height: 100%; position: relative; top: 0; bottom: 0; } http://jsfiddle.net/vemtyyox/ another way to keep the navigation at 300px could be to use calc to define the width of the content #content { position: relative; background-color: #eee; width: calc(100% - 300px); max-width: 1300px; min-width: 450px; height: auto; } #navigation { width: 300px; background-color: #000; height: 100%; position: relative; top: 0; bottom: 0; } http://jsfiddle.net/9db77jvp/ Looking closer i think there is something odd about the way display:table-cell and the fixed properties are working, maybe.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41041163
accepted answer of: http://stackoverflow.com/q/26175880
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/q/26096172
has title: javascript regex pattern to match words, with custom word boundary
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40893985
has answer: http://stackoverflow.com/a/26096346
has body: I'm trying to match words in a string using regex in javascript. Lets say the string is "I have c++ as a skill". I now want to count the number of occurrences of the "c++" substring. I do not want to match if the string is "I have c++test" or similar. So I need to check for word boundaries and include some special character like + and #. I have the following code: var str = "I have c++ as a skill, but I do not have c++test as a skill"; var regex = new RegExp("(?&lt;![\\w+#])c\\+\\+(?![\\w+#])", "g"); count = (str.match(regex) || []).length; console.log(count); Expected result is "1". This is failing on the line var regex... with the error: SyntaxError: Invalid regular expression: /(?&lt;![\w+#])c\+\+(?![\w+#])/: Invalid group I fail to see what I need to change to make my boundary work, can anyone help me?
tagged with: regex
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40894067
has comment: http://stackoverflow.com/comment/40894029
type: Question
accepted answer: http://stackoverflow.com/a/26096346
tagged with: javascript

http://stackoverflow.com/a/26087048
has comment: http://stackoverflow.com/comment/40877195
has comment: http://stackoverflow.com/comment/40901142
accepted answer of: http://stackoverflow.com/q/26086964
score: 0
answers question: http://stackoverflow.com/q/26086964
type: AcceptedAnswer
has body: Assuming each element in your list looks something like this: Title The following should work: $(document).ready(function(){ $( ".cbp-rfgrid > li" ).hover(function() { $(this).find("p").slideToggle(); }); }); EDIT: not trying to take credit for what I didn't say first, but indeed, @FranVerona made an important point in his answer: make sure that you add a dot (.) in front of your selector if you're referring to a class, ie. cbp-rfgrid > li should be .cbp-rfgrid > li instead, but it was just one of the errors.
has comment: http://stackoverflow.com/comment/40877232
type: Answer
has comment: http://stackoverflow.com/comment/40877281

http://stackoverflow.com/a/26149940
has comment: http://stackoverflow.com/comment/40993928
upvote count: 2
answers question: http://stackoverflow.com/q/26149904
has comment: http://stackoverflow.com/comment/40993206
has body: 1) Since it's an async call, the easiest way would be to wrap the var change in a $timeout callback: $scope.loadDatas = function(){ $http.get('data.json') .then(function(res){ $timeout(function(){ $scope.datas = res.data; }, 0); }); }; This basically forces a scope digest without you having to worry about the digest phase. Of course, don't forget to inject $timeout into the controller. If you still want to do the digest manually, you can do $scope.$apply(). 2) You also need to fix your JSON as I have shown how you in the comments: {"name":"Dan","value":"13"}, {"name":"John","value":"34"}, etc... 3) No need to assign the same controller twice. Specifying the controller in the route cause the controller to spawn a new scope (and plus one each time that anchor is clicked, unless you remove the href attribute or block it in another way). I fixed it by removing the controller directive: when('/', { templateUrl: 'partial.html' }). So, there was no need to specify a controller unless it's a different controller than the one the ng-view is inside of. In your case, that was not the case (you only used a controller that the view is already in) and it was causing two different controllers/scopes (even more if the href attribute is present in the anchor when you click it) to spawn and $scope.datas in one scope is not the $scope.datas in the scope that was bound to the partial. A different variable name would work because of the scope parent/child inheritance; so if the variable names don't match, a parent scope variable would be available in the child scope without specific definition. Here is the working version: http://plnkr.co/edit/QWPFAakvNEdJzU50LKSx?p=preview
score: 2
has comment: http://stackoverflow.com/comment/40993445
has comment: http://stackoverflow.com/comment/40994521
has comment: http://stackoverflow.com/comment/40994010
has comment: http://stackoverflow.com/comment/40992440
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26149904
has comment: http://stackoverflow.com/comment/40994551
has comment: http://stackoverflow.com/comment/40993846
type: Answer
has comment: http://stackoverflow.com/comment/40993918

http://stackoverflow.com/q/26054690
has comment: http://stackoverflow.com/comment/40828601
upvote count: 1
has comment: http://stackoverflow.com/comment/40830679
favorite count: 0
type: UnansweredQuestion
tagged with: pm2
tagged with: node.js
answer count: 0
score: 1
type: Question
has title: Load balancing using PM2
has body: I have problems load balancing a Node.js (10.32) simple script using PM2, on a machine with two CPU cores. The script is the following: var http = require('http'); var server = http.createServer(function (req, res) { res.writeHead(200, {"Content-Type": "text/plain"}); res.end("Hello World\n"); }); server.listen(81); If I run pm2 start -i max script.js, the two child processes seem to launch successfully (according to pm2 list), but requests to http://localhost:81 hang. If I run pm2 start -i max -x script.js, the first child process is successfully launched, but the second restarts forever (with an EADDRINUSE error). I checked with lsof and the port 81 is not used before running PM2.
tagged with: load-balancing
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/26184019
has body: I'm switching from jquery version 1.5.2 to 1.9 and my disable buttons arent working. They should enable after the form fields are populated and give the option to remove or save. This isnt working. I've tried in all browsers also. Here's the code.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26184051
has comment: http://stackoverflow.com/comment/41055537
has answer: http://stackoverflow.com/a/26184037
downvote count: 1
possible better answer: http://stackoverflow.com/a/26184051
type: Question
linked to: http://stackoverflow.com/q/6048022
tagged with: javascript
tagged with: jquery
score: -1
answer count: 2
linked to: http://stackoverflow.com/q/5874652
has title: jquery 1.8 disable / enable submit button
upvote count: 0
accepted answer: http://stackoverflow.com/a/26184037
favorite count: 0

http://stackoverflow.com/a/26150708
type: Answer
answers question: http://stackoverflow.com/q/26150636
score: 2
has comment: http://stackoverflow.com/comment/41054945
type: AcceptedAnswer
downvote count: 0
upvote count: 2
has body: I think you are looking for this: $('.rez').each(function () { if ($('.rez option:selected').val() == 'Confirmed') { $('.rez').css('background-color', 'green'); } if ($('.rez option:selected').val() == 'Not Confirmed') { $('.rez').css('background-color', 'red'); } }); $('.rez').change(function () { if ($(':selected', this).text() == 'Confirmed') { $(this).css('background-color', 'green'); } if ($(':selected', this).text() == 'Not Confirmed') { $(this).css('background-color', 'red'); } }).trigger('change'); Not Confirmed Confirmed Not Confirmed Confirmed You don't need use selector in the function. Instead you can use this.
accepted answer of: http://stackoverflow.com/q/26150636

http://stackoverflow.com/q/26069533
type: Question
possible better answer: http://stackoverflow.com/a/26071133
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/26071133
answer count: 2
tagged with: button
tagged with: drop-down-menu
has body: I have a button (".next") and a dropdown ("#page_num"). The dropdown (jquery UI selectmenu) has the following function attached. $("#page_num").selectmenu ({ width: 40, change:function( event,ui ) { search (); } });; I have the following code where button click causes the dropdown to change to the next option. $("#next").button(); $('#page_num').selectmenu(); $('#next').click(function() { if($("#page_num :selected").index() != $("#page_num option:last-child").index()){ $("#page_num").val($("#page_num :selected").next().val()); $('#page_num').selectmenu('refresh', true); } else { $("#page_num").val($("#page_num option:first-child").val()); $('#page_num').selectmenu('refresh', true); } }); My problem is that I cannot seem to integrate the former code into the latter. I want the dropdown menu to pass the function "search()" every time the .next button is clicked but have not been able to get this to work. Can anyone shed any light on this? Thanks
accepted answer: http://stackoverflow.com/a/26074223
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26074223
has title: Affecting a dropdown menu via a button click

http://stackoverflow.com/comment/41008904
comment on: http://stackoverflow.com/q/26159234
score: 1
has text: http://stackoverflow.com/questions/17636528/how-do-i-load-an-html-page-in-a-div-using-javascript - If I understood what you meant then follow that link
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40889372
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26084141
has text: To Change the scroll-bar styles, check the demo: http://jscrollpane.kelvinluck.com/basic.html I'm applying custom styles if you can notice that.
type: AnswerComment

http://stackoverflow.com/comment/40791745
comment on: http://stackoverflow.com/a/26040016
score: 0
type: AnswerComment
type: Comment
has text: the - char works perfect Thanks a lot! the fields must only have numbers and letters and the - char only nothing else. so if he enters me@me.com it should get the error on any field.

http://stackoverflow.com/q/26185135
has answer: http://stackoverflow.com/a/26185157
has comment: http://stackoverflow.com/comment/41057970
tagged with: loops
has comment: http://stackoverflow.com/comment/41057903
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41057865
has comment: http://stackoverflow.com/comment/41058027
has title: Trying to loop through arrays containing arrays containing objects, to match data
has answer: http://stackoverflow.com/a/26185507
type: Question
has comment: http://stackoverflow.com/comment/41057617
tagged with: arrays
downvote count: 0
possible better answer: http://stackoverflow.com/a/26185157
tagged with: javascript
favorite count: 0
has body: I'm tryign to write code that will loop through an array "productsArray" and match it against my productPropertyArray to pull matching information. however productsArray is an array in an array that contains an object with the data. My Question is how can I loop through both arrays and then return the matching data. Current function: var pList = productsArray if (productPropertyArray.length === 0 || productsArray.length === 0) return []; for (var i = 0; i &lt; pList.length; i++) { for (var j = 0; j &lt; pList[i].length; j++) { if (pList[i][j] === productPropertyArray) { return productPropertyArray; } else { continue; } } } return []; }; example of pList: productsArray = [ [{"sku" : "131674"}, {"sku" : "84172"}], [{"productID" : "1234"} ,{"productID" : "12345"}], [{"test": 1},{"test": 1}], [{"test": 1},{"sellAlone": false,"test": 1}], [{"test": 1}], [{"sellAlone": false,"test": 1}] ]; example of productPropertyArray: (its an argument thats replaced by the following) productSKUArray = [ "00544MF24F575", "131674", "84172" ]; productPropertyArray is just an argument in the function which is replaced by productSKUArray The setup goes like this: function(productProperty, productPropertyArray, productsArray) { productProperty is just a string that contains sku or productID any ideas are appreciated. thanks.
answer count: 3
has comment: http://stackoverflow.com/comment/41057909
has comment: http://stackoverflow.com/comment/41057692
has comment: http://stackoverflow.com/comment/41057946
has answer: http://stackoverflow.com/a/26185548
accepted answer: http://stackoverflow.com/a/26185548
score: 2
upvote count: 2

http://stackoverflow.com/comment/40816991
score: 0
type: AnswerComment
type: Comment
has text: You could use the select `$('#slot09 h2').text('your text')`.
comment on: http://stackoverflow.com/a/26045247

file
type: Tag
tags question: http://stackoverflow.com/q/26100329
tags question: http://stackoverflow.com/q/26139337
tag name: file
tags question: http://stackoverflow.com/q/26156885
tags question: http://stackoverflow.com/q/26143436

http://stackoverflow.com/comment/74444407
comment on: http://stackoverflow.com/a/26343842
type: Comment
has text: Thanks! The @Tieson's answer solved my issue. The issue was the fact that I've mixed up the precedence of loading `jQuery` and `$(function(){...});`
score: 0
type: AnswerComment

http://stackoverflow.com/a/26100512
has body: if you using ng-repeat for array you have access to index. &lt;div ng-repeat="item in myCtrl.obj"&gt; &lt;span&gt;{{myCtrl.getObjectIndex(index)}}&lt;/span&gt; &lt;/div&gt; and in your controller you can search your obj and get your id: $scope.getObjectIndex=function(index){ return $scope.myObjects[index].id; } but if we want to use your solution you can search your array with a for loop like this: $scope.getObjectIndex=function(obj){ for(var $i=0;$i&lt;$scope.myObjects.length;$i++){ if(obj.id===$scope.myObjects[$i].id){ return $i; } } }
downvote count: 0
answers question: http://stackoverflow.com/q/26100154
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/40929099
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26114072
type: AnswerComment
has text: What would that look like comapred to my code? Not sure how to do this together

http://stackoverflow.com/comment/40963816
type: QuestionComment
has text: Can you please change the code that works for IE
score: 0
comment on: http://stackoverflow.com/q/26134530
type: Comment

http://stackoverflow.com/q/26146450
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26146705
has comment: http://stackoverflow.com/comment/40986320
score: 0
has comment: http://stackoverflow.com/comment/40987755
answer count: 2
has comment: http://stackoverflow.com/comment/40985544
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40985562
has body: I'm writing a simple tampermonkey script which will fetch some additional info for items in shop. I decided to use .each() on document load and it works fine. Now when I see that the page can change (some items can be removed, some can be added), the newly created items don't contain the additional information... $(document).on("load",".item",function( event ) { $(this).html($(this).html() + "OK"); }); before it was: $(".item").each(function( event ) { $(this).html($(this).html() + "OK"); }); and it worked fine. Thanks for any help!
type: Question
has title: .on load in jquery not triggering
has answer: http://stackoverflow.com/a/26146777

http://stackoverflow.com/comment/41016136
has text: While "inside" PHP, just like that? *Hm*
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26163027
type: AnswerComment

http://stackoverflow.com/comment/40830090
type: Comment
comment on: http://stackoverflow.com/a/26061348
score: 1
type: AnswerComment
has text: `"I remember reading somewhere that find is a really inefficient operation,"` implied they were concerned with overall efficiency. This is not significantly faster, just shorter. Sometimes you need to ignore what they ask for and give them what they need :)

http://stackoverflow.com/a/26166081
answers question: http://stackoverflow.com/q/26165525
type: Answer
has body: Have you tried using eval() - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval ? Check out the warning though.
has comment: http://stackoverflow.com/comment/41022998
has comment: http://stackoverflow.com/comment/41022498
score: 0

http://stackoverflow.com/comment/59142642
comment on: http://stackoverflow.com/a/26067556
score: 0
type: Comment
has text: @Claudiu For some reason the OP decided to format the dates with `d3.time.format("%x")` (see line 46 on pastebin). According to the docs it formats dates as "%m/%d/%Y", see https://github.com/mbostock/d3/wiki/Time-Formatting#format You can choose another format if you wish so.
type: AnswerComment

http://stackoverflow.com/a/26110064
has body: D3's tree layout populates the x and y attributes on the data when you call tree.nodes(). Now it's just a matter of manipulating the y values to "spread out" the tree so that there's enough space between each level for your text. A straightforward method of doing this is to simply scale each node's y value based on its depth. After the tree layout is created, do: nodes.forEach(function(d) { d.y = d.depth * 180; }); Working fiddle here: http://jsfiddle.net/sk7krdrp/1/ You may even want to make the scaling a function of the maximum node text length. This makes the tree a lot bigger, but it looks like that's what you want, as long as the texts don't overlap. If you want to keep the tree smaller and wrap text so that longer text appears in two or more lines, you could do that by wrapping each "line" in a tspan (example here). Of course, you will have to move around the neighboring nodes so that the wrapped text of a node doesn't overlap its neighbors.
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40944221
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26106508
score: 1
answers question: http://stackoverflow.com/q/26106508

http://stackoverflow.com/comment/40970986
score: 0
type: QuestionComment
has text: Try looking up how to "refresh the page" and "how to do something after a time delay" and combining them.
type: Comment
comment on: http://stackoverflow.com/q/26138805

http://stackoverflow.com/a/26140057
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26139991
answers question: http://stackoverflow.com/q/26139991
has body: try this ($.ajax call doesn't return value, you need to pass that trough success handler)
upvote count: 3
type: AcceptedAnswer
type: Answer
score: 3

http://stackoverflow.com/a/26148436
score: 2
has comment: http://stackoverflow.com/comment/40989616
has comment: http://stackoverflow.com/comment/40989718
has body: You appear to be describing HTML5 Web Messaging, which has nothing to do with either CORS or Ajax but lets documents on different origins communicate through frames and windows.
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26148394
upvote count: 2
answers question: http://stackoverflow.com/q/26148394
has comment: http://stackoverflow.com/comment/40991345

http://stackoverflow.com/comment/41026967
has text: ANy errors in the browser console?
score: 0
comment on: http://stackoverflow.com/q/26168777
type: QuestionComment
type: Comment

openstreetmap
tags question: http://stackoverflow.com/q/26138416
tags question: http://stackoverflow.com/q/26045995
tag name: openstreetmap
type: Tag

http://stackoverflow.com/comment/41333739
comment on: http://stackoverflow.com/a/26284049
score: 0
type: AnswerComment
has text: Thank you for pitching in. Document modes are the same, iFrame is loaded on blank page without content. We can't use server side processing since the application is also meant to be loaded off-grid. The problem is only in an iFrame so i suspect the UI load sequence makes no difference in that matter:)
type: Comment

http://stackoverflow.com/comment/41006412
has text: @enguerranws i already got that by now enguerranws. however my question remains focused on the point: `display a short message next to the button that was clicked` i already knew about ajax before i asked this question
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26157541

http://stackoverflow.com/q/26115933
possible better answer: http://stackoverflow.com/a/26116240
has answer: http://stackoverflow.com/a/26116240
has answer: http://stackoverflow.com/a/26116102
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/40929263
tagged with: javascript
tagged with: jquery
tagged with: asp.net
favorite count: 0
has body: I am using asp.net project to create a website. Code Now i use the following code for the dropdown view. <%-- Default Search search Books search Authors search Genre --%> Java Script Function function OnClickChangeSearchText(_elem,_elemLbl) { var div = document.getElementById("SearchPopup"); var Lbl = document.getElementById(_elemLbl); Lbl.textContent = _elem.value; div.style.display = "none"; //var srch_type = document.getElementById("SearchTypeStorage"); //if (_elem.id == SearchBooksLbl) //{ // srch_type.value = 1; //} //if (_elem.id == SearchAuthorsLbl) { // srch_type.value = 2; //} //if (_elem.id == SearchGenreLbl) { // srch_type.value = 3; //} var srch_type = document.getElementById("SearchTypeStorage"); if (_elem.value == "search Books") { srch_type.value = 1; } if(_elem.value=="search Authors") { srch_type.value = 2; } if (_elem.value == "search Genre") { srch_type.value = 3; } } How can i replace the onclicks inside the "li" tag by a single onclick on the "ul" tag and manage it in the java script section?
type: Question
score: 3
accepted answer: http://stackoverflow.com/a/26116102
upvote count: 3
has title: Is it possible to replace the onclicks in different "li" tags by a single onclick in the"ul" tag?
answer count: 2

http://stackoverflow.com/comment/41033214
type: QuestionComment
comment on: http://stackoverflow.com/q/26172020
score: 0
type: Comment
has text: just to clarify, you want to know if the node you're dragging it to has no parent or is the top-level root node? `getLevel()` = 0 is the root

http://stackoverflow.com/a/26084325
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26069369
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26069369
downvote count: 0
has comment: http://stackoverflow.com/comment/40895947
score: 4
has body: What you want is not possible. I don't think script tags with executable javascript inside a text/html script will have their code executed when the template is rendered. However, like other commenters said: you don't need to do this. Rework your design, make use of Knockout's features for these type of things. There are several alternative solutions, including: Creating your own bindingHandler to activate the widget on a rendered template. You have posted only a small portion of code, but here's what that would look like: ko.bindingHandlers.myWidget = { init: function(element, valueAccessor, allBindings, viewModel, bindingContext) { // This will be called when the binding is first applied to an element // Set up any initial state, event handlers, etc. here console.log('Initializing widget with ' + ko.toJSON(allBindings()['myWidget'])); }, update: function(element, valueAccessor, allBindings, viewModel, bindingContext) { // This will be called once when the binding is first applied to an element, // and again whenever any observables/computeds that are accessed change // Update the DOM element based on the supplied values here. } }; var VmForTemplate = function() { } var ViewModel = function() { this.subVm = new VmForTemplate(); }; ko.applyBindings(new ViewModel()); Alternatively, use the afterRender attribute of the template binding, like so: var VmForTemplate = function() { } var ViewModel = function() { this.subVm = new VmForTemplate(); this.initWidget = function() { CoinWidgetCom.go({ wallet_address: "ENTER-YOUR-BITCOIN-WALLET-ADDRESS" , currency: "bitcoin" , counter: "count" , alignment: "bl" , qrcode: true , auto_show: false , lbl_button: "Donate" , lbl_address: "My Bitcoin Address:" , lbl_count: "donations" , lbl_amount: "BTC" }); }; }; ko.applyBindings(new ViewModel());
type: Answer

http://stackoverflow.com/comment/40963907
score: 0
type: Comment
type: QuestionComment
has text: @Cheery, I have a simple `setInterval(function() getRecentActivity() }, 5000)` for now, but I am working on making it more dynamic based on the people online.
comment on: http://stackoverflow.com/q/26134803

http://stackoverflow.com/comment/40825253
has text: Thanks for the answer. The initial issue I have with `page.open` is that it takes ages to connect and get the data, I want to be able to get a new sentence relatively seamlessly. If it's just about sending the POST to the given address then is there a way to do this automatically with Phantom while the page is still open? Or is sending the POST part of the `page.open` command?
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26058760
score: 0

http://stackoverflow.com/a/26172761
has comment: http://stackoverflow.com/comment/41035340
has comment: http://stackoverflow.com/comment/41034946
has comment: http://stackoverflow.com/comment/41035058
has comment: http://stackoverflow.com/comment/41034920
has body: If you have an ID, you need to call getElementById() to get the DOM element: var thisList = getElementById(listID); Alternatively, instead of passing the ID to the function, you can pass the element itself: uList.setAttribute('onclick', 'display(this)'); Better would be to write it in more modern style: ulist.addEventListener('click', function() { display(this); });
has comment: http://stackoverflow.com/comment/41035146
score: 0
has comment: http://stackoverflow.com/comment/41035404
has comment: http://stackoverflow.com/comment/41034865
has comment: http://stackoverflow.com/comment/41034928
type: Answer
answers question: http://stackoverflow.com/q/26172728
has comment: http://stackoverflow.com/comment/41034955
has comment: http://stackoverflow.com/comment/41034876

http://stackoverflow.com/comment/40928628
type: AnswerComment
score: 0
type: Comment
has text: I need a solution for different sites , so i have mydjangosite.com receiving post requests from different sites, based on different lanuages(php,ruby, etc...) so i decided to have only js and html. am i right?
comment on: http://stackoverflow.com/a/26081085

http://stackoverflow.com/a/26041260
type: Answer
score: 8
accepted answer of: http://stackoverflow.com/q/26039486
answers question: http://stackoverflow.com/q/26039486
upvote count: 8
has body: In Ext JS, Ext.app.Controller classes are (out of the box) instantiated with the initialization of the application. In fact, the init() of the controller is called before the launch() of the application itself. So yes, controllers are "lifers", listening from the moment the app starts throughout the lifetime of the application. There are ways of dynamically creating and destroying controllers, but this would require a custom implementation. In Ext JS 5, however, the concept of the ViewController was introduced. It extends the same base (Ext.app.BaseController) as Ext.app.Controller does, but unlike above, the ViewController is created and destroyed along with the view instance to which it is bound. This is handled automatically by the framework--no need for a custom implementation in order for that to work. Regarding models: [], stores: [], and views: [], these are basically requires() for the controller, instructing it to ensure that these classes are loaded. The conventions are simply a shorthand way of requiring these classes from their particular namespaces (e.g., AppName.view, AppName.store, etc.). In the case of views and stores, this convention will also generate getters for the required classes. Regarding navigation, that is up to you. There are a number of ways you can create your Ext JS app. You could do the "single-page" app where the navigation would probably resemble what you mentioned pretty closely (alot of mine do). You can also create multi-page apps which can deliver the more traditional page-to-page feel of a website, but leverage common code and classes for each page, depending on the needs of each page. Finally, regarding the question of listener collisions, the answer is "it depends". If you're using Ext JS 4, you only have the "lifer" controllers, and so avoiding the collisions in listeners is a matter of being extremely cognizant of the selectors that you are using in your listen() or control() sections and ensuring that you are not duplicati…
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40812036
has comment: http://stackoverflow.com/comment/40829816

http://stackoverflow.com/q/26094674
type: UnansweredQuestion
score: 2
answer count: 0
tagged with: pinterest
has title: Backbone.js Pinterest modal
type: Question
tagged with: javascript
has body: i'm using backbone.js to build my frontend. So what i want to do is, to render a view in a "lightbox" (the same way like pinterest). I tried it that way: var itemDetailsBoxView = CloseableView.extend({ el: '#itemwrapperItemBox #itemwrapperItem2', initialize: function(options) { var self = this; self.render(options); }, render: function(options) { $('#itemwrapperItemBox').fadeIn(300); var self = this; app._itemDetailsView = new itemDetailsView({id: options.id, el: '#itemwrapperItemBox #itemwrapperItem2'}); self.rendered(app._itemDetailsView); }, events: { 'keydown': 'keydownHandler' }, keydownHandler: function(e) { switch (e.which) { // esc case 27 : $('#itemwrapperItemBox').hide(); break; } } This view just opens another view (itemDetailsView) in a lightbox. This itemDetailsBoxView is opened when i click on an item: itemDetails: function(events) { var self = this; var that = $(events.currentTarget).parents('.item'); var id = that.find('.covercontainer').find('img').data('id'); if (app._itemDetailsBox) { app._itemDetailsBox.close(); } app._itemDetailsBox = new itemDetailsBoxView({id: id}); self.rendered(app._itemDetailsBox); app.navigate("/collage/" + id, false); }, However, there are several problems with this approach: When the itemWrapperItem2 appears (like a pin on Pinterest when you zoom in), there are two scrollbars. One for the itemStream in the background and one for the lightbox. The itemDetailsView generates also an itemStream. When i click there on an item, it loads again in the itemDetailsBoxView and also pushes the url (Same functionality, when u have a pin open and click again on a pin). This means, that when i want to go back to the original itemStream, i have a problem because i don't know the URL. There are more - but this is enough to see, that this approach doesn't work to good. So do you know a solution for backbone.js to copy the whole pinterest "zoom in on a pin" functionality (including, that you land on another page when you reload the pin). T…
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: backbone.js
upvote count: 2

http://stackoverflow.com/q/26107679
score: 0
type: UnansweredQuestion
tagged with: skrollr
upvote count: 1
downvote count: 1
type: Question
has body: I want to mimic the effect used on http://laravel.com. I've done a few Skrollr tutorials now, and I understand how to animate elements based on a keyframe, but I'm not sure how to replicate the effect used in my example. I can't even begin to work out what sort of transform this would be. Could somebody help me to mimic this in jsfiddle or a similar tool?
has title: Parallax Scrolling with Skrollr, How do I make a div slide over another div?
has comment: http://stackoverflow.com/comment/40915040
tagged with: javascript
tagged with: jquery
tagged with: parallax
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44501986
answer count: 0

http://stackoverflow.com/comment/40902021
comment on: http://stackoverflow.com/q/26085305
type: QuestionComment
type: Comment
score: 0
has text: added additional html :)

http://stackoverflow.com/a/56138391
type: Answer
has body: Here is a function with error handling included. Even though it's a big function it results in an useful one-liner. Just pass an array with values and you're good to go. function sumMinutes(values) { const validate = time =&gt; { if (time &gt; 59 || time &lt; 0) { throw new Error( "Hours, minutes and seconds values have to be between 0 and 59." ); } return time; }; const seconds = values .map(e =&gt; validate(Number(e.split(":").reverse()[0]))) .reduce((a, b) =&gt; a + b); let minutes = values .map(e =&gt; Number(e.split(":").reverse()[1])) .reduce((a, b) =&gt; a + b); let hours = values .map(e =&gt; e.split(":").reverse()[2] ? Number(e.split(":").reverse()[2]) : 0 ) .reduce((a, b) =&gt; a + b); minutes *= 60; hours *= 3600; let result = new Date((hours + minutes + seconds) * 1000) .toISOString() .substr(11, 8); return result.split(":").reverse()[2] === "00" ? result.slice(3) : result; } /* examples */ const seconds = ["00:03", "00:9"]; const mins = ["01:20", "1:23"]; const hours = ["00:03:59", "02:05:01"]; const mix = ["00:04:58", "10:00"]; console.log(sumMinutes(seconds)); //'00:12' console.log(sumMinutes(mins)); //'02:43' console.log(sumMinutes(hours)); //'02:09:00' console.log(sumMinutes(mix)); //'14:58'
score: 0
has comment: http://stackoverflow.com/comment/102443562
answers question: http://stackoverflow.com/q/26056434

http://stackoverflow.com/comment/40827474
type: Comment
comment on: http://stackoverflow.com/a/26059586
score: 0
type: AnswerComment
has text: That doesn't solve the `getValue` issue. It would if `getValue` was added to your object literal, but then you would have duplicated logic across your grid files.

http://stackoverflow.com/comment/40925026
has text: Thanks a ton..it works perfectly awesome :) . And yes it did work with the <s:file> too.
type: AnswerComment
type: Comment
score: 2
comment on: http://stackoverflow.com/a/26101941

http://stackoverflow.com/a/26077620
has comment: http://stackoverflow.com/comment/73328294
has comment: http://stackoverflow.com/comment/93882618
has comment: http://stackoverflow.com/comment/40870576
upvote count: 142
has comment: http://stackoverflow.com/comment/70166542
has comment: http://stackoverflow.com/comment/70154251
has comment: http://stackoverflow.com/comment/73314585
has comment: http://stackoverflow.com/comment/40860166
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26076511
score: 142
has comment: http://stackoverflow.com/comment/70753340
type: Answer
answers question: http://stackoverflow.com/q/26076511
has comment: http://stackoverflow.com/comment/70768908
downvote count: 0
has body: This behavior is exactly like a synchronous throw: try{ throw new Error(); } catch(e){ // handle } // this code will run, since you recovered from the error! That's half of the point of .catch - to be able to recover from errors. It might be desirable to rethrow to signal the state is still an error: try{ throw new Error(); } catch(e){ // handle throw e; // or a wrapper over e so we know it wasn't handled } // this code will not run However, this alone won't work in your case since the error be caught by a later handler. The real issue here is that generalized "HANDLE ANYTHING" error handlers are a bad practice in general and are extremely frowned upon in other programming languages and ecosystems. For this reason Bluebird offers typed and predicate catches. The added advantage is that your business logic does not (and shouldn't) have to be aware of the request/response cycle at all. It is not the query's responsibility to decide which HTTP status and error the client gets and later as your app grows you might want to separate the business logic (how to query your DB and how to process your data) from what you send to the client (what http status code, what text and what response). Here is how I'd write your code. First, I'd get .Query to throw a NoSuchAccountError, I'd subclass it from Promise.OperationalError which Bluebird already provides. If you're unsure how to subclass an error let me know. I'd additionally subclass it for AuthenticationError and then do something like: function changePassword(queryDataEtc){ return repository.Query(getAccountByIdQuery) .then(convertDocumentToModel) .then(verifyOldPassword) .then(changePassword); } As you can see - it's very clean and you can read the text like an instruction manual of what happens in the process. It is also separated from the request/response. Now, I'd call it from the route handler as such: changePassword(params) .catch(NoSuchAccountError, function(e){ res.status(404).send({ error: "No account found with thi…
has comment: http://stackoverflow.com/comment/40860191

http://stackoverflow.com/comment/40896081
has text: Yeah i dont know why the <a tag isnt there but its there in the document.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26097284
score: 0

http://stackoverflow.com/comment/40936201
type: QuestionComment
comment on: http://stackoverflow.com/q/26119668
score: 4
has text: Is this the exact flow of your code? Have you literally copy-pasted the source? (what you describe is simply not possible).
type: Comment

http://stackoverflow.com/q/26071518
type: Question
accepted answer: http://stackoverflow.com/a/26134893
answer count: 1
tagged with: visual-studio
upvote count: 3
tagged with: cordova-3
has body: Recently I was looking at few blogs and couldn't find the solution to my problem. I am trying to achieve following things in native cordova app. 1.Creating native cordova app using visual studio 2013. Got that working 2. Looking to store some data when app is offline. IndexDB, WebSql and local storage is not any option as data can be more than their actual limit. Therefore cannot use PouchDB and Taffy. 3. Find few things on sqllite but don't know if we can connect to sqllite db file via javascript. Any help and direction will be really helpful?
tagged with: javascript
has answer: http://stackoverflow.com/a/26134893
type: AnsweredQuestion
score: 3
tagged with: sqlite
downvote count: 0
favorite count: 0
tagged with: cordova-plugins
has title: Offline database for native Cordova Applicaition

http://stackoverflow.com/a/26106385
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26106325
answers question: http://stackoverflow.com/q/26106325
type: Answer
upvote count: 1
score: 1
has body: This is a valid Javascript literal: { foo_bar: 'baz' } This isn't: { foo-bar: 'baz' } The latter must be: { 'foo-bar': 'baz' } That's all it's talking about; the preceding paragraph referred to "dash-separated path names" and followed by saying you shouldn't use dashes in JSON. It's not snake vs. camelCase, it's snake vs. "dash-case".
type: AcceptedAnswer

http://stackoverflow.com/comment/40932163
comment on: http://stackoverflow.com/q/26117304
has text: everything is working fine except file name I am not getting at server side.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41029437
comment on: http://stackoverflow.com/q/26170021
type: Comment
has text: You're listening for something that isn't on the page yet. You need to use event delegation. Set the listener for a parent element that is already on the page when it loads initially.
type: QuestionComment
score: 1

http://stackoverflow.com/comment/40868873
comment on: http://stackoverflow.com/a/26082437
type: Comment
has text: Use `.empty` instead of `.html('')`.
score: 2
type: AnswerComment

http://stackoverflow.com/comment/41018896
comment on: http://stackoverflow.com/a/26164324
score: 1
type: AnswerComment
type: Comment
has text: @Bonito: You can declare the variables in a higher scope, e.g. in the global scope. The problem with asynchronous code is not the scope, it's the timing. Even if you make the variables globally available, you don't when they got their values assigned. You only know when the callback is called. Given this uncertainty, there is no much use in making those variables global. You should really spend some time to read all the links you got in the comments to your question, to understand the whole topic better.

http://stackoverflow.com/comment/40898877
score: 0
comment on: http://stackoverflow.com/a/26098892
type: AnswerComment
type: Comment
has text: @JLRishe Thanks for correction. While porting it from [3sum](http://en.wikipedia.org/wiki/3SUM) algorithm, it was a leftover mistake. Corrected.

http://stackoverflow.com/comment/41026515
type: QuestionComment
comment on: http://stackoverflow.com/q/26161303
has text: ??Anybody? could help?
score: 0
type: Comment

http://stackoverflow.com/comment/41056761
type: Comment
comment on: http://stackoverflow.com/q/26184526
score: 0
type: QuestionComment
has text: And is there an infinite loop? Because when call `showPlus` then call `showPicture` then call `showPlus` then call `showPicture`..... And all that time the browser is hanging.

http://stackoverflow.com/q/26075321
accepted answer: http://stackoverflow.com/a/26075880
tagged with: http://stackoverflow.com/tag/html
has body: I have this simple html page: Option1 Option2 Submit I want the button to act like a submit button on a form with get method. So clicking the button should submit the get variable (selectval) as a query string. So clicking the button should go to: http://domain.com/?selectval=option1 Is there a way to do this without wrapping into a form?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26075880
downvote count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/40855412
possible better answer: http://stackoverflow.com/a/26075424
has answer: http://stackoverflow.com/a/26075424
tagged with: javascript
tagged with: forms
has title: jquery submit url query strings without form
answer count: 2
has comment: http://stackoverflow.com/comment/40855362
upvote count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40855352
favorite count: 0

http://stackoverflow.com/q/26043288
upvote count: 8
has answer: http://stackoverflow.com/a/26043426
has title: How to append element to body?
answer count: 4
score: 8
type: AnsweredQuestion
has body: Im currently using the following code to append a div to the body: $("body").append(' Test '); How could I do the same as above but without the use of jQuery?
has answer: http://stackoverflow.com/a/65917583
possible better answer: http://stackoverflow.com/a/26043506
has answer: http://stackoverflow.com/a/26043506
type: Question
linked to: http://stackoverflow.com/q/15741006
has answer: http://stackoverflow.com/a/26043443
has comment: http://stackoverflow.com/comment/40797050
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/26043443

http://stackoverflow.com/q/26098443
linked to: http://stackoverflow.com/q/14218607
tagged with: javascript
has body: how can I get the % of a image loading on my server and show % of it's loading. That's what I use to load image(it's for a simple download speed test). var imageAddr = 'http://192.168.11.17/Cat2.JPG' + '?n=' + Math.random(); var startTime, endTime; var downloadSize = 7616998; var download = new Image(); download.onload = function () { endTime = (new Date()).getTime(); showResults(); } startTime = (new Date()).getTime(); download.src = imageAddr; function showResults() { var duration = (endTime - startTime) / 1000; var bitsLoaded = downloadSize * 8; var speedBps = (bitsLoaded / duration).toFixed(2); var speedKbps = (speedBps / 1024).toFixed(2); var speedMbps = (speedKbps / 1024).toFixed(2); var speedMB = speedMbps / 8; document.getElementById('download').innerHTML = speedMbps + 'Mbps'; } Maybe there is other solutions with XMLHTTPRequest but I've tried with no succes. Thanks.
has comment: http://stackoverflow.com/comment/40898913
has comment: http://stackoverflow.com/comment/40898286
type: UnansweredQuestion
has title: Get Progress of Image() loading in %
answer count: 0
score: 0
type: Question
has comment: http://stackoverflow.com/comment/40899030

http://stackoverflow.com/comment/40921785
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26111564
has text: @Bergi the idea its to be completely dynamic.
score: 0

http://stackoverflow.com/a/26152862
score: 2
downvote count: 0
upvote count: 2
has body: i found this thread How to destroy an angularjs app?. Although I added code to recreate main-content div. HTML code: Load app n°1 Load app n°2 JS: angular.module('app1', ['ngRoute']); angular.module('app1') .config(['$routeProvider', function ($routeProvider) { $routeProvider .otherwise({ template: 'hello app n°1' }); }]); angular.module('app2', ['ngRoute']); angular.module('app2') .config(['$routeProvider', function ($routeProvider) { $routeProvider .otherwise({ template: 'hello app n°2' }); }]); var mainContent = document.getElementById('main-content'); var mainContentWrap = document.getElementById('main-content-wrap'); var mainContentHTML = mainContentWrap.innerHTML; window.loadApp = function(modules) { if (window.currentApp) { destroyApp(window.currentApp); mainContentWrap.removeChild(mainContent); mainContentWrap.innerHTML = mainContentHTML; mainContent = document.getElementById('main-content'); } window.currentApp = angular.bootstrap(mainContent, modules); } function destroyApp(app) { /* * Iterate through the child scopes and kill 'em * all, because Angular 1.2 won't let us $destroy() * the $rootScope */ var $rootScope = app.get('$rootScope'); var scope = $rootScope.$$childHead; while (scope) { var nextScope = scope.$$nextSibling; scope.$destroy(); scope = nextScope; } /* * Iterate the properties of the $rootScope and delete * any that possibly were set by us but leave the * Angular-internal properties and functions intact so we * can re-use the application. */ for(var prop in $rootScope){ if (($rootScope[prop]) && (prop.indexOf('$$') != 0) && (typeof($rootScope[prop]) === 'object') ) { $rootScope[prop] = null; } } } And Fiddle http://jsfiddle.net/010b62ry/5/ It works but it looks like a black magic. I think it is much better to have one app and several controllers.
accepted answer of: http://stackoverflow.com/q/26146657
answers question: http://stackoverflow.com/q/26146657
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/40855641
type: Comment
type: QuestionComment
has text: haha yes.. I feel really stupid now, I should have tried that. Thank you
comment on: http://stackoverflow.com/q/26075186
score: 0

http://stackoverflow.com/q/26179078
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/41046508
has comment: http://stackoverflow.com/comment/41045803
has comment: http://stackoverflow.com/comment/41045754
duplicate of: http://stackoverflow.com/q/13840429
possible better answer: http://stackoverflow.com/a/26179156
downvote count: 0
tagged with: javascript
score: 4
answer count: 3
has comment: http://stackoverflow.com/comment/41045722
has comment: http://stackoverflow.com/comment/41045817
favorite count: 0
has comment: http://stackoverflow.com/comment/41045845
has answer: http://stackoverflow.com/a/26179606
has answer: http://stackoverflow.com/a/26179164
has comment: http://stackoverflow.com/comment/41045802
tagged with: php
has body: Inside a PHP script I have this: echo &lt;&lt;&lt;EOD &lt;script type="text/javascript"&gt; document.getElementById('my_element_id').innerHTML='Do stuff'; &lt;/script&gt; EOD; Can I add PHP inside the JavaScript? Replace the "Do stuff" part with PHP code? If yes, how do I do it?
type: AnsweredQuestion
has title: Can I write PHP inside JavaScript inside PHP?
has answer: http://stackoverflow.com/a/26179156
linked to: http://stackoverflow.com/q/13840429
accepted answer: http://stackoverflow.com/a/26179164

http://stackoverflow.com/q/26116199
score: 0
has answer: http://stackoverflow.com/a/26116348
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Populating a field with values from another field
type: UnansweredQuestion
tagged with: php
has body: I'm quite new with PHP and javascript, so apologize me if this is an easy question.I have a form with a dropdown box and a GO button, used to select documents (from the dropdown box) and navigate to them (GO button). What I would like to do is to retrieve the document URL from the database when the dropdown item is selected and pass it to the button, so when clicked it sends the user to the document. The MySQL query looks like this: SELECT `Bruel_URL` FROM `mpctz_rsform_bruels` WHERE `Bruel_ID` = GO.value So the questions are: How do I get the value from the Bruel_ID and pass it to the MySQL query (I've represented it as GO.value in the query above)? How do I retrieve and store the Bruel_URL? How can I write a javascript function that sends the user to the Bruel_URL? Thanks for your help! Dani
type: Question
has comment: http://stackoverflow.com/comment/40969103
tagged with: mysql

http://stackoverflow.com/comment/104535427
score: 1
has text: I find this really convenient to use.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/52201499

http://stackoverflow.com/comment/40830571
has text: Rather than worrying about `find`, a `find` inside an `each` is far less efficient than combining the two searches into one. See answer below.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26060694

http://stackoverflow.com/q/26090467
tagged with: css
type: AnsweredQuestion
downvote count: 2
has body: I'm not sure how JS frameworks work as far as single page app functionality. I've got a pseudo single page app, with no framework. I have 3 tabs that will toggle visibility for 3 different hidden div's on the same page. So far I've been able to hide two and display one on click to allow the page to "navigate" without changing pages. I'm running into some complications, however, because I'd like to run some ajax calls to keep the data on my div's updated when visible. I'd also like to be able to pass which page I want visible in the URL for links, etc. Basically I'm wondering what the best way is to identify what "screen" is visible, so I know what ajax calls to make, but I'd prefer if I didn't have to check the css on the element for visibility for these types of things. Can this be done with anchor href's in the url? I could use URL variables, but again I don't want to reload the page, and I could probably make a JS variable to look at and change as I click my tabs, but I wouldn't really be able to pass this in the url. Here is some code. The app is for a dice game, to add some context. The three tabs are simple empty divs with background images that sit on the left hand side of my screen for nav. $('#chatTab').click(animateChat); $('#timelineTab').click(animateTimeline); $('#rollTab').click(animateTheTable); //opens and closes chat box function animateChat () { $('#stats').fadeOut('slow', function(){$('#chat').delay(800).fadeIn('slow');}); $('#theTable').fadeOut('slow', function(){$('#chat').delay(800).fadeIn('slow');}); } //opens and closes timeline box function animateTimeline () { $('#chat').fadeOut('slow', function(){$('#stats').delay(800).fadeIn('slow');}); $('#theTable').fadeOut('slow', function(){$('#stats').delay(800).fadeIn('slow');}); } //opens and closes the roll table function animateTheTable(){ $('#stats').fadeOut('slow', function(){$('#theTable').delay(800).fadeIn('slow');}); $('#chat').fadeOut('slow', function(){$('#theTable').delay(800).fadeIn('slo…
has comment: http://stackoverflow.com/comment/40883692
type: Question
has title: How to navigate divs in a custom built single page app?
score: -2
has answer: http://stackoverflow.com/a/26091061
accepted answer: http://stackoverflow.com/a/26091061
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40883636
favorite count: 0
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41056759
score: 1
comment on: http://stackoverflow.com/q/26184658
type: Comment
type: QuestionComment
has text: The question isin't clear. You want to create a single lookup object where keys are the dates to quickly lookup values based on specific dates?

http://stackoverflow.com/comment/40909008
has text: Notice that your first snippet doesn't catch any clicks on child elements of your editables, while the second snippet does.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26104525
score: 1

http://stackoverflow.com/q/26056928
has title: get current div visible in viewport
has comment: http://stackoverflow.com/comment/40821568
has comment: http://stackoverflow.com/comment/40821914
type: Question
has comment: http://stackoverflow.com/comment/40821544
tagged with: javascript
tagged with: jquery
has body: I am fairly new to jQuery and I am trying to achieve infinte scroll so I am able to trigger a ajax call to backend as soon as I reach the end of page. I also want to know the current div visible in viewport so that I can also issue a ajax call . LEts say I have 6 div &lt;div id="test"&gt; Some content here &lt;div&gt; &lt;div id="test1"&gt; more content here &lt;/div&gt; &lt;div id="test2"&gt; more content here again &lt;/div&gt; I want to issue ajax call if my cursor reaches to 2nd div while scrolling up, same for 3rd div and 1st div also. I am too naive in this so I may be asking a silly question but pardon me.
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26057750
tagged with: ajax
type: UnansweredQuestion
tagged with: infinite-scroll
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26086260
accepted answer of: http://stackoverflow.com/q/26086217
type: Answer
has comment: http://stackoverflow.com/comment/40878105
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40875593
has body: A call of _.template returns a function which takes an object with template variables as the first argument. So you should do this: self.$list = $("#list"); var template = _.template('&lt;%= foo %&gt;')({foo: 'hello'}); self.$list.html(template); and this: _.each(categories, function(category){ console.log(category); //&lt;-- ok var template = _.template(self.$categoryTemplate.text())(category); self.$list.append(template); });
upvote count: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26086217

http://stackoverflow.com/q/26044964
type: Question
answer count: 2
has body: I have a hidden sub nav with height set to 0. Inside of that div are several sections of sub navs. I get the name of the section that is clicked, then get the innerHeight of that div. Then using that height, I animate the .sub_navigation height from 0 to the value. However for some reason the first time you click (get the value) it's off, too high, the 2nd time it's perfect. How would you fix this? Angular (converted from jQuery) // Controller for Nav app.controller('NavController', function(){ // Property of Controller this.clicked = function(menuItem) { console.log(menuItem); var contentHeight = $('.'+menuItem+'-content').innerHeight(); var content_height = $('.'+menuItem+'-content').innerHeight(); $('.sub_navigation').css({'height' : '0px'}); $('.'+menuItem+'-content').siblings().css({'display' : 'none'}); $('.'+menuItem+'-content').css({'display':'block', 'height':'auto'}); $('.sub_navigation').animate({ height: contentHeight }); console.log('content_height = '+content_height); console.log(contentHeight); }; }); jQuery $(document).delegate(".navigation-links a", "click", function(){ var myContent = $(this).attr("data-content"); var contentHeight = $("."+myContent+"-content").innerHeight(); $("."+myContent+"-content").siblings().css({"display":"none"}); $("."+myContent+"-content").css({"display":"block", "height":"auto"}); $(".subNavigation").animate({ height: contentHeight }); }); If you click on Grow, the first time height is 400, the 2nd time it's 266 :(
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26045545
score: 0
has answer: http://stackoverflow.com/a/26045367
accepted answer: http://stackoverflow.com/a/26045367
has title: How to get correct div innerHeight the first time?
tagged with: angularjs
tagged with: animation
possible better answer: http://stackoverflow.com/a/26045545
type: AnsweredQuestion

http://stackoverflow.com/comment/40865037
score: 0
type: Comment
has text: This file doesn't exist physically on this folder, socket.io serves it itself by default at this location. If your path works, have you tried `var socket = io.connect()` instead of `IO()` ? (check your console for errors like `IO is not defined`)
comment on: http://stackoverflow.com/a/26080306
type: AnswerComment

http://stackoverflow.com/q/26059656
type: AnsweredQuestion
score: 4
has title: AngularJS - handle routes before app startup
has answer: http://stackoverflow.com/a/26121834
type: Question
tagged with: angularjs-routing
tagged with: javascript
tagged with: angularjs-scope
has body: Is it ok to use a Service within $stateProvider, for this purpose? I have been through a lot of posts on stack regarding routing but most are confusing for beginners as everyone uses a different approach and treat it like rocket science. I would like to develop good habits from the start, and avoid bad ones... Objective : run some functions before application starts and based on that output route my end user. What I have tried: Implement a Service >> AuthService | Actions >> simple check for : Fetch JWT token from client Side (SQLite DB) - Token contains basic details + API Key Send to server for authentication Response ( Boolean ) If Authorized >> load Home View. Otherwise, redirect to register View . Server side validation takes place before loading any view Service Providers myApp.factory('AuthService', function ( Session) { var authService = {}; authService.isAuthorized = function(){ return Session.authorized() ; }; return authService; }); myApp.service('Session', function ($resource, $q, $timeout, URL_Config) { this.authorized = function () { var deferred = $q.defer(); $timeout(function () { var db = window.openDatabase("config.db", "1.0", "Config", 2 * 1024 * 1024); db.transaction(function (tx) { tx.executeSql("SELECT * FROM user_details", [], function (tx, data) { var token = data.rows.item(0).token; var request = $resource(URL_Config.BASE_URL + '/authCheck', {token: token }, { query: { isArray: false, method: 'GET' } }); request.query(function (res) { if (res.error) { deferred.resolve(false); } else { deferred.resolve(true); } }); }, function (e) { deferred.resolve(false); }); }); }, 500); return deferred.promise; }; return this; }); Route Configuration This is the part I am struggling with. Where and how to inject this Service? I got it working but I am not sure whether this is the correct way to handle it. Call the Service within the Resolve Property of $stateProvider? based on AuthService's value redirect to view Process before application starts. myApp.c…
upvote count: 4
answer count: 1
accepted answer: http://stackoverflow.com/a/26121834
downvote count: 0
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/80824122
has text: 3 years later into my programming career I have learned to always use Momentjs and stop trying to re-design the wheel. To be honest the problem with this old code was that the company I was working for at the time didn't store their dates as UTC.
comment on: http://stackoverflow.com/a/26169098
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40917613
score: 0
type: QuestionComment
has text: https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-xhr
type: Comment
comment on: http://stackoverflow.com/q/26096068

http://stackoverflow.com/comment/41054463
type: Comment
score: 0
has text: You could position your result div absolutely and give it a z-index property of let's say 10000 that will put it on top
comment on: http://stackoverflow.com/a/26182829
type: AnswerComment

http://stackoverflow.com/a/38739197
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/26193654
downvote count: 3
has body: I've had the same problem and fixed with try / catch: try { zbarimg = process.spawn('zbarimg', [photo, '-q']); } catch (err) { console.log(err); } zbarimg.on('error', function(err) { ... }); zbarimg.on('close', function(code) { ... });
score: 0

http://stackoverflow.com/comment/40788600
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26036776
has text: @Omar oh okay . Yeah I saw that in one of your post but did not understood properly :P

http://stackoverflow.com/a/26074968
score: 0
has body: Because what you try to match includes a=.... But when you find it, you can strip it from the match found. Checked with jsfiddle: http://jsfiddle.net/pbo5x9dx/ var pageDetailsSecond = "a='00-8'b='13-'a+='00-2'b+='3333'c='4'"; alert(pageDetailsSecond) var phones = pageDetailsSecond.match("a='(.*?)'"); var phone1 = phones[1]; alert(phone1) ** edit: ** fix for non-greedy match, checked with http://jsfiddle.net/pbo5x9dx/1/
has comment: http://stackoverflow.com/comment/40854688
has comment: http://stackoverflow.com/comment/40854649
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26074908
answers question: http://stackoverflow.com/q/26074908
type: Answer

http://stackoverflow.com/a/26087957
type: AcceptedAnswer
upvote count: 2
has comment: http://stackoverflow.com/comment/40965862
type: Answer
accepted answer of: http://stackoverflow.com/q/26071969
answers question: http://stackoverflow.com/q/26071969
has body: I suppose you use some kind of UI manipulation tool for example jQuery UI. As Lesha said in her comment it can be done through triggering of event on the model view. //creting children view var PanelItem = Backbone.View.extend({ events: { "sortStart": "sortEventPropagation" }, initialize : function (options) { this.parentView = options.parentView; }, sortEventPropagation: function(){ this.parentView.trigger('sort:start:propagated', this.model); }, }) Everytime you are creating panelItem view you need to pass it panel in options as parentView. var childView = new PanelItem({ parentView: panel }) And on panel you could easily listenTo sort:start:propagated event var Panel = Backbone.CollectionView.extend({ initialize: function(){ this.listenTo(this, 'sort:start:propagated', function(model){ //Do magic with model }) }, })
score: 2
downvote count: 0

http://stackoverflow.com/comment/40900487
comment on: http://stackoverflow.com/a/26098226
score: 0
type: Comment
has text: @MelanciaUK what is the problem with the solution?
type: AnswerComment

http://stackoverflow.com/comment/103694686
has text: @matvs yeahh correct it should have been moment() instead of new Date(). You post anwers the almost every part of question , but when displaying 12 Hours Format as per code in posr does not have pm/am . So thought of adding the same as the answer.
type: Comment
comment on: http://stackoverflow.com/a/58698094
score: 0
type: AnswerComment

yammer
type: Tag
tags question: http://stackoverflow.com/q/26146831
tags question: http://stackoverflow.com/q/26125267
tag name: yammer

http://stackoverflow.com/a/26201446
has body: If you only want to set the current values for the current row, you can do: $( ".cedula" ).autocomplete({ minLength: 0, source: sug_cedula, focus: function( event, ui ) { return false; }, select: function( event, ui ) { var thisRow = $(this).parents("tr"); thisRow.find(".cedula").val( ui.item.label ); thisRow.find(".nombre").val( ui.item.nombre ); thisRow.find(".correo").val( ui.item.correo ); return false; }, });
type: Answer
accepted answer of: http://stackoverflow.com/q/26194504
answers question: http://stackoverflow.com/q/26194504
score: 1
has comment: http://stackoverflow.com/comment/41099622
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41052637
type: AnswerComment
score: 0
type: Comment
has text: Thank you for the reply. After testing this it would not allow any combo of numbers however it would allow letters. How do i fix "document.myForm.phone.value.match(pattern2)" not match?
comment on: http://stackoverflow.com/a/26181428

http://stackoverflow.com/a/26156349
type: Answer
has body: HighCharts was expecting numeric values for the data series, but received strings instead and didn't know how to display those on the graph. If you change your input from type String to type Number, it will fix your problem. "Series": [ { "name": "John", "data": [ 51, 84, 61, ... ] } ] I've forked your fiddle here with a working solution: http://jsfiddle.net/autoboxer/s8symkdz/. Cheers, autoboxer
answers question: http://stackoverflow.com/q/26155373
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26155373

http://stackoverflow.com/q/26132363
has answer: http://stackoverflow.com/a/26132388
favorite count: 0
accepted answer: http://stackoverflow.com/a/26132388
type: AnsweredQuestion
has title: Javascript string.replace. Combining several .replace commands
score: 0
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40959716
answer count: 1
has body: I am working on an assignment using javascript but I am stuck on a problem. When I try to join together several .replace commands i do not get the expected output. I do not use any libraries like Jquery. var str = ('abc abc'); str = str.replace(/a/g, 'b').replace(/b/g, 'c'); alert(str); With my code I get this output: ccc ccc. When I should get this: bcc bcc. Can anyone see what I am doing wrong? Best regards, a student from Norway :)

http://stackoverflow.com/comment/40794883
comment on: http://stackoverflow.com/a/26041464
type: Comment
has text: Like Bergi says, you need to `var` your `i` variable in your loops as it leaks into the global scope and ruins the test (where you're also trying to use `i`).
score: 0
type: AnswerComment

http://stackoverflow.com/a/26195217
type: Answer
answers question: http://stackoverflow.com/q/26186200
has body: Check GraphDataItem description: http://docs.amcharts.com/3/javascriptcharts/GraphDataItem It has a "category" property, also a reference to serialDataItem: http://docs.amcharts.com/3/javascriptcharts/SerialDataItem Which contains all the information about series. And finally, it has a reference to original data item from data provider (dataContext property). So you can store additional information in your data and then get it using dataContext.
score: 0

http://stackoverflow.com/comment/40973872
type: Comment
has text: @Fizer Khan, What do you get in thrownError ?
comment on: http://stackoverflow.com/q/26140069
score: 0
type: QuestionComment

http://stackoverflow.com/q/26059410
answer count: 0
has title: How to prevent lag caused by scrolling function and animation in Safari Browser?
score: 1
upvote count: 1
type: Question
tagged with: webkit
has comment: http://stackoverflow.com/comment/42926818
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion
tagged with: css
has body: I want to make a website with a blurred Navigation Bar. The Navigation Bar is fixed and changes height when you start scrolling downwards. There are a few Menu Items inside the Navigation Bar, when you click one of the listet Items the Page start scrolling to the selected MenuPoint. I approached this with this function: $.fn.scrollView = function () { return this.each(function () { $('html, body').animate({ scrollTop: $(this).offset().top }, 1000); }); }; No issues so far, as I said before the height changes when you start scrolling downwards. At the top of the Page the Navigation Bar is 100px height when you scroll 100px down an animation begins and the Navigation Bar shrinks to a size of 50px. Same thing happens when you scroll to the top of the page, as soon you reached 100px the Navigation Bar gains it full height of 100px. Here is the Code: var headerDown = true; scroll = $(document).scrollTop(); var headerHeight = $('.header').height(); if(scroll &lt; 100){ if(headerHeight !== 100 &amp;&amp; headerDown === false){ headerDown = true; $('.header').animate({ height: "100px" }, 400); var menuAnimation = 100/2 - navbarHeight/2; $('.vcenter').animate({ paddingTop: menuAnimation + "px" }, 400); } } else { if(headerHeight !== 50 &amp;&amp; headerDown === true){ headerDown = false; $('.header').animate({ height: "50px" }, 400); var menuAnimation = 50/2 - navbarHeight/2 + 5; $('.vcenter').animate({ paddingTop: menuAnimation + "px" }, 400); } } Everything works fine so far. As you can't blur through layers like in iOS 7, I used html2Canvas "http://html2canvas.hertzen.com" to make a screenshot from the side and append it to the header. Than I blur this screenshot with CSS Webkit Filter. Last thing to do I tracked the scrolling from the side and set it equal to the blurred Screenshot, so it scrolls with the site and everything behind the Navbar looks like actual side blurred. Now my issue, when I click on one of the Menu Items the site begins to scroll. It works perfectly …

http://stackoverflow.com/comment/72830545
type: AnswerComment
comment on: http://stackoverflow.com/a/39984018
type: Comment
has text: Be careful though - this NPM module is intended for server-side API requests and only works with a *server key*. It's not intended for XHR requests.
score: 0

http://stackoverflow.com/comment/40896971
comment on: http://stackoverflow.com/a/26097716
has text: Hmmm, I would have thought your code example would have worked, but unfortunately ALL buttons now give the "I am something else alert" when theyre clicked!
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26041936
has body: I have over 100 row DIVs and I want to click on each rows. Since some of the higher number rows are not visible on my screen and I am getting the ElementNotVisibleError: element not visible: Element is not currently visible and may not be manipulated. I have already set my screen on the maximum size. Does anyone knows how will I be able to do this and click on even the rows that are below the bottom of my screen? &lt;div ng-repeat="row in grid"&gt; &lt;div id="row{{$index}}"&gt;{{title}}&lt;/div&gt; &lt;/div&gt; function clickRow(modifier) { describe('Click row ' + modifier, function () { it('Click row', function () { element(by.id(row + modifier)).click(); }); }); } var a; var row = 'row'; for(a = 0; a &lt; 100; a++) { clickRow(a); }
upvote count: 1
has comment: http://stackoverflow.com/comment/40795184
type: Question
has comment: http://stackoverflow.com/comment/40794469
tagged with: protractor
has comment: http://stackoverflow.com/comment/40797441
tagged with: javascript
has comment: http://stackoverflow.com/comment/40794771
has comment: http://stackoverflow.com/comment/40794957
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26043113
favorite count: 0
type: UnansweredQuestion
has title: How to solve ElementNotVisible error
has comment: http://stackoverflow.com/comment/40794635
score: 1

http://stackoverflow.com/a/26163358
has comment: http://stackoverflow.com/comment/41053440
has comment: http://stackoverflow.com/comment/41020675
has comment: http://stackoverflow.com/comment/41035136
has comment: http://stackoverflow.com/comment/41052193
accepted answer of: http://stackoverflow.com/q/26162904
has comment: http://stackoverflow.com/comment/41039930
has comment: http://stackoverflow.com/comment/41021397
has comment: http://stackoverflow.com/comment/41022604
score: 0
answers question: http://stackoverflow.com/q/26162904
upvote count: 1
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/41019688
type: Answer
has body: You can maintain the form, just add additional events to setup which button called the submit. var form_config = {button: null}; $("#submit1").click(function(){ form_config.button = 'submit1'; }); $("#submit2").click(function(){ form_config.button = 'submit2'; }); $('#testform').submit(function(e) { console.log(e); e.preventDefault(); var submiturl; if (form_config.button === 'submit1') { submiturl = '../sendToFactory.cshtml'; } else if (form_config.button === 'submit2') { submiturl = '../sendOverseas.cshtml'; } $("#hi").val(submiturl); }); Use Me No, Use Me
has comment: http://stackoverflow.com/comment/41049671

http://stackoverflow.com/a/26103446
accepted answer of: http://stackoverflow.com/q/26103231
upvote count: 1
answers question: http://stackoverflow.com/q/26103231
type: Answer
has comment: http://stackoverflow.com/comment/40915015
downvote count: 0
score: 1
has body: From what I understand this code. $("#po_submit_button").click(function(){ if (!$(this).valid()) { var testvalue = "Not Valid Form"; alert(testvalue); } }); needs to be changed to $("#po_submit_button").click(function(){ if (!$("#po_form")[0].checkValidity()) { var testvalue = "Not Valid Form"; $("#user_info_div_2").show(); $("#user_info_div_3").show(); } }); Since your 'this' refers to the button not the form. You need to use the function checkValidity() on the form element which is a built in Javascript func
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40915458
has comment: http://stackoverflow.com/comment/40916028

http://stackoverflow.com/a/26085813
has comment: http://stackoverflow.com/comment/41521632
accepted answer of: http://stackoverflow.com/q/26084879
score: 0
answers question: http://stackoverflow.com/q/26084879
type: AcceptedAnswer
has body: You can use ValidatorEnable(validator, enable) to enable or disable a validator. You can use something like this: objValidator = document.getElementById("&lt;%=YourRequiredValidatorID.ClientID %&gt;"); objValidator.enabled = true; //'true' if you want to enable else 'false' ValidatorUpdateDisplay(objValidator); Let me know if it works for you!
type: Answer

http://stackoverflow.com/comment/40893299
type: QuestionComment
has text: Everything is fine, you just need to change the URL of the image, e.g. `images/radioscalebutton.png`.
comment on: http://stackoverflow.com/q/26095544
score: 0
type: Comment

http://stackoverflow.com/comment/41048834
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26180394
has text: @epascarello original answer was cause i thought he want to remove `a` element.
type: AnswerComment

http://stackoverflow.com/q/26166322
has comment: http://stackoverflow.com/comment/41022614
tagged with: joomla3.0
type: UnansweredQuestion
tagged with: k2
answer count: 0
score: 0
has body: I'm facing some issues in joomla 3.0 backend in k2 component several buttons don’t have actions, I can't reorder any item because in the move to reorder all get stuck, i think maybe is a javascipt conflict using multiple Jquery UI libraries?
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41024684
has comment: http://stackoverflow.com/comment/41023248
tagged with: jquery
favorite count: 0
has title: i cant order/move k2 items in joomla 3.0
has comment: http://stackoverflow.com/comment/41022574

http://stackoverflow.com/comment/41157370
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26238755
score: 0
has text: I don't need to catch if zoom is active, I've already catched the event. I want to know how to get the right offset for my element according to zoom scale factor. It seems that the issue only happens on iOS devices with zoom>1.4X

server-sent-events
tags question: http://stackoverflow.com/q/26054456
tag name: server-sent-events
type: Tag
tags question: http://stackoverflow.com/q/26089733

http://stackoverflow.com/q/26066921
answer count: 1
favorite count: 0
tagged with: combinatorics
has answer: http://stackoverflow.com/a/26067121
has body: Okay, I have been breaking my head about this for the last couple of days. What is the neatest (anything without HUGE overhead) way to generate an array of all possible combinations var input = [ {a: 1}, {a: 2, b: 3}, {b: 4}, {b: 5}, {a: 6} ]; So what I wish to generate is the following: var output = [ {a: 1}, {b: 4}, {b: 5}, {a: 6}, {a: 1, b: 4}, {a: 1, b: 5}, {a: 6, b: 4}, {a: 6, b: 5}, {a: 2, b: 3} ]; The thing is though that in my specific case I am talking about 4 properties (and I actually need to generate a separate array for each set of different property sets, however those are both things I should be able to implement myself later). What I am looking for however is just some generic psuedo code on how to approach this problem, not somebody writing it for me or anything like that. I feel like this should have been something I should've been able to figure out, but I am just not getting there. First I generate separate arrays for all property combinations (all a's, all b's, all c's, all ab's, all bc's, etc). The thing however is that with 3 properties already you next have to add for every a all b's, c's and bc's. Now, writing that out for a single property is simple enough, but writing a generic solution that does that for n-properties is just eluding me entirely.
type: AnsweredQuestion
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/40841125
accepted answer: http://stackoverflow.com/a/26067121
type: Question
has comment: http://stackoverflow.com/comment/40840846
downvote count: 0
tagged with: javascript
has title: All combinations of properties in an array
has comment: http://stackoverflow.com/comment/40841036

http://stackoverflow.com/a/26063201
type: Answer
answers question: http://stackoverflow.com/q/26061856
has comment: http://stackoverflow.com/comment/51553718
has comment: http://stackoverflow.com/comment/40833624
has comment: http://stackoverflow.com/comment/51527750
has comment: http://stackoverflow.com/comment/51505137
has comment: http://stackoverflow.com/comment/40833462
has comment: http://stackoverflow.com/comment/51505168
has comment: http://stackoverflow.com/comment/44975066
score: 50
has body: That's correct. Partly because javascript does not have private properties. What you're doing is not declaring a private property. You're using a design pattern that uses a closure to emulate private properties. Closures evolve out of scope. A scope refers to the lifespan of variables while object properties refer to binding of variables. So before discussing closures, lets have a short discussion about scope. The Stack: A scope is related to the stack frame (in Computer Science it's called the "activation record" but most developers familiar with C or assembly know it better as stack frame). A scope is to a stack frame what a class is to an object. By that I mean that where an object is an instance of a class, a stack frame is an instance of scope. Let's use a made-up language as an example. In this language, like in javascript, functions define scope. Lets take a look at an example code: var global_var function b { var bb } function a { var aa b(); } When we read the code above, we say that the variable aa is in scope in function a and the variable bb is in scope in function b. Note that we don't call this thing private variables. Because the opposite of private variables are public variables and both refer to properties bound to objects. Instead we call aa and bb local variables. The opposite of local variables are global variables (not public variables). Now, let's see what happens when we call a: a() gets called, create a new stack frame. Allocate space for local variables on the stack: The stack: ┌────────┐ │ var aa │ &lt;── a's stack frame ╞════════╡ ┆ ┆ &lt;── caller's stack frame a() calls b(), create a new stack frame. Allocate space for local variables on the stack: The stack: ┌────────┐ │ var bb │ &lt;── b's stack frame ╞════════╡ │ var aa │ ╞════════╡ ┆ ┆ In most programming languages, and this includes javascript, a function only has access to its own stack frame. Thus a() cannot access local variables in b() and neither can any other function or code …
downvote count: 0
upvote count: 50
has comment: http://stackoverflow.com/comment/44850067

http://stackoverflow.com/comment/40972452
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26123858
type: Comment
has text: Glad it helped. Feel free to edit my answer and include the changes you needed: it may help others as well.

http://stackoverflow.com/q/26174473
has comment: http://stackoverflow.com/comment/41037748
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41037688
has comment: http://stackoverflow.com/comment/41037706
has comment: http://stackoverflow.com/comment/41038020
has comment: http://stackoverflow.com/comment/41037668
type: Question
has comment: http://stackoverflow.com/comment/41037667
accepted answer: http://stackoverflow.com/a/26174654
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41037617
has answer: http://stackoverflow.com/a/26174654
upvote count: 1
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41037663
favorite count: 0
has body: i have two div's and i want to select first upper div value then lower div value. and pass both the values to next page. here's my code: Link Link 1 if upper value is not selected then it should not go to the next page and when both values are selected then it should go on to next page. what are the possible solutions. Any help would be appreciated.
has comment: http://stackoverflow.com/comment/41037607
tagged with: http://stackoverflow.com/tag/html
has title: Select multiple values then proceed

http://stackoverflow.com/q/26061615
tagged with: datetime
has answer: http://stackoverflow.com/a/28739966
tagged with: google-chrome
has body: I need to change my Chrome browser's running javascript locale from English US to English UK in order to test functionality that relies on javascript's Date object. Is this based off of the browser settings? Or maybe my OS settings? I'm running on Windows 7.
has answer: http://stackoverflow.com/a/74649332
type: Question
upvote count: 4
has title: Change Current Locale for Testing
downvote count: 0
tagged with: javascript
tagged with: date
score: 4
answer count: 3
favorite count: 0
has answer: http://stackoverflow.com/a/63029574
type: UnansweredQuestion

http://stackoverflow.com/comment/41012648
type: Comment
type: QuestionComment
has text: You need to compile (`$compile`) it with a scope that has the respective properties...
score: 0
comment on: http://stackoverflow.com/q/26161283

http://stackoverflow.com/q/26145409
has body: Often when I'm working in Python, I'll quickly query what a function does in the iPython console by entering something like dir?? which will return to me the documentation for dir. Is there a similar technique in Javascript? Whether this is in the terminal window or within the Chrome console?
has comment: http://stackoverflow.com/comment/40983415
has title: How to view Javascript documentation from console?
tagged with: google-chrome
has answer: http://stackoverflow.com/a/26145470
downvote count: 0
tagged with: javascript
tagged with: documentation
type: AnsweredQuestion
score: 2
favorite count: 0
accepted answer: http://stackoverflow.com/a/26145470
type: Question
upvote count: 2
answer count: 1

http://stackoverflow.com/a/26119462
has comment: http://stackoverflow.com/comment/40936540
downvote count: 0
answers question: http://stackoverflow.com/q/26119347
type: Answer
score: 1
has body: You will have to change your json file so that you declare the variable there. data.json var MyjsonData = [{"something":"anything"},{},{}] Now in your hack.js file, you can call the variable MyjsonData.
upvote count: 1

http://stackoverflow.com/comment/40878368
type: Comment
type: QuestionComment
score: 1
has text: See here- http://stackoverflow.com/questions/274274/is-it-secure-to-submit-from-a-http-form-to-https. You will have CSRF errors and lack security. Keep in mind that CSRF stands for cross-site request forgery. An API is probably the only way.
comment on: http://stackoverflow.com/q/26080694

http://stackoverflow.com/q/26129021
tagged with: requirejs
possible better answer: http://stackoverflow.com/a/26129325
downvote count: 1
has answer: http://stackoverflow.com/a/26129325
type: AnsweredQuestion
has title: Defining custom attributes in and loading other modules from AMD/Require.js module when necessary?
has answer: http://stackoverflow.com/a/26129878
score: -1
tagged with: amd
type: Question
has body: I am trying to define new attributes for a central controller (a backbone view actually) to make it more compartmentalised and structured. I try to separate the rendering I want to achieve in different cases by if statements, and implementing each case's rendering in those new attributes. But after insertion of the replacement code to achieve that and commenting of the code before it make my app not work. What is the wrong thing I do. Another way I can imagine to modularise it is to conditionally, again, to load different AMD/Require.js modeules I write, in a separate file/s, and load them. But How? Via require() inside the render:, or by new moduleName passed to the second argument to the define() below. define([ 'jquery', 'ratchet', 'underscore', 'backbone', 'models/login', 'text!templates/login.html', 'text!templates/app.html' ], function($, Ratchet, _, Backbone, LoginModel, LoginTmpl, AppTmpl){ var LoginView = Backbone.View.extend({ el: $("body"), template_login: _.template(LoginTmpl), template_app: _.template(AppTmpl), initialize: function(){ this.model = new LoginModel; this.listenTo(this.model, 'change', this.render); this.render(); }, //Replacement code: two attributes: render_login: function(){ this.$el.html(this.template_app( this.model.toJSON() )); console.log(JSON.stringify(this.model) ); return this; } }, render_app: function(){ this.$("#content").html(this.template_login( this.model.toJSON() )); console.log(JSON.stringify(this.model) ); return this; }, render: function() { /* if (this.model.get('loginp') == true) { this.$el.html(this.template_app( this.model.toJSON() )); console.log(JSON.stringify(this.model) ); return this; } */ /* else { this.$("#content").html(this.template_login( this.model.toJSON() )); console.log(JSON.stringify(this.model) ); return this; } */ //Replacement code: if (this.model.get('loginp') == true) { this.render_app; } else { this.render_login; } }, events: { 'click #loginbtn' : 'login', 'click #registerbtn' : 'register' }, log…
answer count: 2
upvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/26129878
tagged with: backbone.js

http://stackoverflow.com/q/26133382
has comment: http://stackoverflow.com/comment/40961875
answer count: 1
has comment: http://stackoverflow.com/comment/41000925
tagged with: jquery
has comment: http://stackoverflow.com/comment/41000891
has body: I'm having a problem where the Ajax is not triggering the respected event. I have two forms, one visible and one hidden. In the visible form, the user can enter an email address. When the user clicks the submit button of the visible form, the default submit is prevented, and through Ajax the email is validated. If the email address is not valid, an error message will appear. If the email address IS valid, the submit button of the hidden form should be clicked using JS (in the ajax-success function). Here is more code for reference: HTML Visible Form Hidden Form Email: JS Ajax for visible form $('#contactForm1').click(function(e) { e.preventDefault(); var email = $('#email').val(); var self = this; $.ajax({ type: 'POST', dataType: 'JSON', url: 'check.php', data: { email: email }, success: function (data) { if (data.status == 'success') { self.submit(); } else { alert('The e-mail address entered is not valid.'); } } }); }); So here's how the scenario would be: User enters email address, and clicks the submit button. Ajax-call checks whether it's a valid email. If the email is valid, the Ajax success function of the visible form first sets the email value of the hidden form and then triggers the submit button of the hidden form As said before, STEP 3 isn't working.
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40961554
tagged with: php
has comment: http://stackoverflow.com/comment/40961592
has comment: http://stackoverflow.com/comment/41000845
tagged with: iframe
has comment: http://stackoverflow.com/comment/40961565
has comment: http://stackoverflow.com/comment/41000779
linked to: http://stackoverflow.com/q/5240876
has comment: http://stackoverflow.com/comment/40999446
has comment: http://stackoverflow.com/comment/41000739
type: Question
has answer: http://stackoverflow.com/a/26155123
has comment: http://stackoverflow.com/comment/40961538
has title: iFrame passing information to Ajax and triggering the submit button in the Ajax
tagged with: javascript
has comment: http://stackoverflow.com/comment/40961571
score: 0
has comment: http://stackoverflow.com/comment/41000956

http://stackoverflow.com/a/26160304
downvote count: 0
has body: Does typescript allow you to use the external libraries? Very easily. You just need to tell typescript about it. lets look at your case. The library i am trying to use is filesaver.js Simple just one function saveAs. The simplest declaration: declare var saveAs:any; and now the following will compile just fine: declare var saveAs:any; var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"}); saveAs(blob, "hello world.txt"); To write more advanced declrations take a look at: https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/declaration%20files/Introduction.md Note A more exact but possibly overly restrictive sample : declare function saveAs(data:Blob , filename:string ); var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"}); saveAs(blob, "hello world.txt");
type: Answer
upvote count: 11
score: 11
answers question: http://stackoverflow.com/q/26160028

http://stackoverflow.com/comment/40849212
type: QuestionComment
comment on: http://stackoverflow.com/q/26071476
score: 1
has text: possible duplicate of [How do I iterate over a JSON structure?](http://stackoverflow.com/questions/1078118/how-do-i-iterate-over-a-json-structure)
type: Comment

http://stackoverflow.com/comment/41031209
comment on: http://stackoverflow.com/q/26170866
type: QuestionComment
type: Comment
has text: worksforme. that should be an answer so I can mark it up.
score: 0

http://stackoverflow.com/comment/95754799
has text: Thanks, this worked. But what is handler? I had to remove it to get it working.
type: Comment
comment on: http://stackoverflow.com/a/45363133
type: AnswerComment
score: 5

http://stackoverflow.com/comment/40796948
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26038083
type: Comment
has text: @LightnessRacesinOrbit: I'm sure there's a way in PHP to make `2 + "Hello" = 2 + the ascii value for "Hello".` Have to look it up. :P

http://stackoverflow.com/comment/40934866
comment on: http://stackoverflow.com/q/26119150
type: Comment
type: QuestionComment
has text: PFB what does PFB mean? And where is your testcase?
score: 1

http://stackoverflow.com/q/26088073
upvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40883493
has body: I have the following code that works as intended except the google.maps.event.addListener(marker, 'click', function(). I am including all the code for reference. You will see the commented out code that I have tried. I want the map to zoom in when the marker is clicked. Thank you for your help. $(document).ready(function() { $("#map").css({ height: 700, width: 800 }); var myLatLng = new google.maps.LatLng(46.053791, -118.3131256); MYMAP.init('#map', myLatLng, 11); $("#showmarkers").ready(function(e){ MYMAP.placeMarkers('markers.xml'); }); }); var MYMAP = { map: null, bounds: null } MYMAP.init = function(selector, latLng, zoom) { var myOptions = { zoom:zoom, center: latLng, mapTypeId: google.maps.MapTypeId.ROADMAP } this.map = new google.maps.Map($(selector)[0], myOptions); this.bounds = new google.maps.LatLngBounds(); } MYMAP.placeMarkers = function(filename) { $.get(filename, function(xml){ $(xml).find("marker").each(function(){ var name = $(this).find('name').text(); var address = $(this).find('address').text(); // create a new LatLng point for the marker var lat = $(this).find('lat').text(); var lng = $(this).find('lng').text(); var point = new google.maps.LatLng(parseFloat(lat),parseFloat(lng)); // extend the bounds to include the new point MYMAP.bounds.extend(point); var marker = new google.maps.Marker({ position: point, map: MYMAP.map }); var infoWindow = new google.maps.InfoWindow(); var html='&lt;strong&gt;'+name+'&lt;/strong.&gt;&lt;br /&gt;'+address; google.maps.event.addListener(marker, 'mouseover', function() { infoWindow.setContent(html); infoWindow.open(MYMAP.map, marker); }); &lt;!-- *************** here is the code I need help with **************** --&gt; google.maps.event.addListener(marker, 'click', function() { &lt;!-- attempt 1 --&gt; &lt;!--map.setZoom(10); --&gt; &lt;!--map.setCenter(marker.getPosition());--&gt; &lt;!--attempt 2 --&gt; &lt;!--mapZoom = map.getZoom();--&gt; &lt;!--startLocation = event.point; --&gt;: &lt;!--attempt 3 (with and w…
accepted answer: http://stackoverflow.com/a/26089866
type: AnsweredQuestion
has title: Google map click event not working
downvote count: 1
type: Question
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26089866
tagged with: google-maps-api-3
tagged with: google-maps

http://stackoverflow.com/q/26052583
answer count: 2
tagged with: flot
downvote count: 0
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26060285
upvote count: 1
possible better answer: http://stackoverflow.com/a/26055158
has title: javascript flot threshold for dynamic data value
has answer: http://stackoverflow.com/a/26055158
type: Question
tagged with: graph
score: 1
has body: Here is my plot data var data = [{ data: [[4, 80], [8, 50], [9, 130]], color: "rgb(30, 180, 20)", threshold: { below: 100, color: "rgb(200, 20, 30)" } }] var bar = $.plot("#placeholder", data); and if i change the value of data in a button click like data= [[4, 130], [8, 50], [9, 130]]; bar.setData([data]); bar.draw(); }); The treshold value didnt work , if there is a way to acheive this.
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26060285

http://stackoverflow.com/a/26079195
accepted answer of: http://stackoverflow.com/q/26079049
upvote count: 1
has comment: http://stackoverflow.com/comment/40863079
has body: You can put your data into a You can also insert the data directly into javascript: function MyFunction() { var data = '@(ViewBag.VB)'; // or omit the single quotes if it's json data // TODO: do something with data } This approach requires that the javascript code is embedded into the .cshtml file. Another possibility is to retrieve the data directly from javascript with an ajax request. This example uses jQuery's $.ajax function: function MyFunction() { $.ajax({ url: "/api/controller/...", contentType: "application/json", // tell the api-controller that we want json dataType: "application/json", // tell the jQuery callback that it is json success: function (data) { // TODO: do something with data } }); }
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26079049

http://stackoverflow.com/q/26055078
answer count: 1
has body: I have created a Liferay Dynamic Data List (DDL) allowing visitors to enter their name and surname. In addition to name;surname I would like the DDL to memorize the value of a particular JavaScript variable that my custom theme defines dynamically. So the data would look like this: Name | Surname | MyHiddenField Bob | Denard | red Fulk | Fitz | blue How can I create this hidden DDL column and fill it with the JavaScript value?
has title: Adding a runtime JavaScript value to a Liferay Dynamic Data List
tagged with: liferay
has answer: http://stackoverflow.com/a/26094547
downvote count: 0
tagged with: javascript
score: 1
accepted answer: http://stackoverflow.com/a/26094547
type: AnsweredQuestion
favorite count: 0
type: Question
tagged with: dynamic-data-list
upvote count: 1

http://stackoverflow.com/comment/40972198
score: 0
has text: Yes, I want to know what matched and doesn't match in one query. If that is too complicated, I'll settle for two queries. Thanks, Neil
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26137444

http://stackoverflow.com/comment/91633482
type: Comment
has text: Its deprecated in some browsers not for servers and the deprecation is not my problem, I want to catch all data passed to NodeJS http server, you can catch this url in c#, java, python or ... . so we just want to get all of data. and i want to catch data and not sending user & pass with request object. So, please just answer to the question and if you think is not possible you can say it with references. Thank you
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/52308324

http://stackoverflow.com/q/26178981
has answer: http://stackoverflow.com/a/26180197
has title: Using $scope in a function in service angularjs
type: Question
tagged with: javascript
has body: I know the same kind of question has been asked on SO many times, but I couldn't find the exact question that matches my requirement. So here's my question: I have a function in my controller: showPNG = function() { var pngPromise = $modal({ template: 'index.html', persist: true, show: false, backdrop: 'static', scope: $scope, modalClass: 'preview-png' }); $q.when(pngPromise).then( function(pngElement) { pngElement.modal('show'); } ); }; I have 3 controllers having the same function. So I'm trying to refactor it in such a way that it is written in some service and can be called from all the controllers. What I've done so far is: In Service: var service = module.exports = function ($modal, $q) { return { showPNG : function(scope) { var pngPromise = $modal({ template: 'index.html', persist: true, show: false, backdrop: 'static', scope: scope, modalClass: 'preview-png' }); $q.when(pngPromise).then( function(pngElement) { pngElement.modal('show'); } ); } }; }; service.$inject = ['$modal', '$q']; In Controller: ... myService.showPNG($scope); ... This code works without any error. But the question is, can passing $scope as an argument to a function is service cause any side effects? Is there any better alternate to this approach? Thanks.
score: 0
answer count: 1
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/a/67927641
has body: The throw statement throws a user-defined exception. Execution of the current function will stop (the statements after throw won't be executed), and control will be passed to the first catch block in the call stack. If no catch block exists among caller functions, the program will terminate.
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/26067190
downvote count: 0
type: Answer

http://stackoverflow.com/comment/40892277
type: QuestionComment
has text: What do you want to do ?
comment on: http://stackoverflow.com/q/26095115
score: 0
type: Comment

http://stackoverflow.com/comment/41054533
has text: @Quince : I can't understand Please give an eg.
comment on: http://stackoverflow.com/q/26181989
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26077279
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26077211
has body: Your script snippet is directly parsed after loading the page and therefore the timeout is set immediately. The timeout has to be set in the onclick-callback. You can achieved your desired behavior with &lt;script&gt; function doajax_products_check() { setTimeout(function(){ // Your logic for the check goes here }, 2000); } &lt;/script&gt;

http://stackoverflow.com/a/26060743
upvote count: 9
type: Answer
downvote count: 0
has body: There is no readLine() method to do this as of now. However, some ideas to explore: Reading from a blob does fire progress events. While it is not required by the specification, the engine might prematurely populate the .result property similar to an XMLHttpRequest. The Streams API drafts a streaming .read(size) method for file readers. I don't think it is already implemented anywhere, though. Blobs do have a slice method which returns a new Blob containing a part of the original data. The spec and the synchronous nature of the operation suggest that this is done via references, not copying, and should be quite performant. This would allow you to read the huge file chunk-by-chunk. Admittedly, none of these methods do automatically stop at line endings. You will need to buffer the chunks manually, break them into lines and shift them out once they are complete. Also, these operations are working on bytes, not on characters, so there might be encoding problems with multi-byte characters that need to be handled. See also: Reading line-by-line file in JavaScript on client side
score: 9
answers question: http://stackoverflow.com/q/26056540
accepted answer of: http://stackoverflow.com/q/26056540
type: AcceptedAnswer

http://stackoverflow.com/a/26105287
answers question: http://stackoverflow.com/q/26087968
has body: Everything was fine on my side. My request was correct, but there seemed to be a problem with googles services yesterday(28.09.2014). Everything works fine now.
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26087968
type: Answer

http://stackoverflow.com/comment/40971848
type: QuestionComment
score: 0
has text: I am asking questions here if I am unable to archive the result I expect. That because may be my limited ability in the filed. So when any GENIUS `DOWN VOTE`s the question please tell me the reason at least is why...
comment on: http://stackoverflow.com/q/26139270
type: Comment

http://stackoverflow.com/a/26165498
has body: Use [] square brackets for Arrays: var namein = names[ Math.floor((Math.random() * 5) + 0) ]; Also instead of using strictly 5 (while you have 6) you can let JS do the count: Math.random() * names.length function randomnamegen() { var names = ["Mango", "Pul", "Bat", "Tim", "Mh", "Hei"]; var namein = names[ Math.floor(Math.random() * names.length) ]; document.getElementById("name").innerHTML = namein; } Click Me!
score: 1
answers question: http://stackoverflow.com/q/26165455
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26165455
type: Answer
upvote count: 1

http://stackoverflow.com/comment/40939567
has text: @DontVoteMeDown He said he wants to allow empty string
type: AnswerComment
comment on: http://stackoverflow.com/a/26121767
score: 0
type: Comment

http://stackoverflow.com/a/26558362
upvote count: 1
has body: Your idea with a shared properties file is the neater solution out of the 4 ideas you suggested. A popular CMS I use called Silverstripe actually does the same thing, loads a localised JS file that adds the strings to a dictionary, allowing a common API for retrieving the strings. One point made in the comments is about including localised strings for a particular view. While this can have some uses under particular situations where you have thousands of strings per localisation (totaling more than a few hundred KBs), it can also be a little unnecessary. Client-side Depending how many other JS resources you are loading at the same time, you may not want another request per view just to add a few more strings for that locale. Each view's localisation would need to be requested separately which can be a little inefficient. Give the browser all the localisations in one request and let it just read from its cache for each view. The browser caching the complete collection of locale strings can lead to a better user experience with faster page load times with one less request per view. For mobile users, this can be quite helpful as even with faster mobile internet, not every single request is lightning fast. Server-side If you go by the method suggested in the comments by having a locale.asp file generating the JS locale strings on the fly, you are giving the server a little more work per user. This won't be that bad if each user requests it once however if it is request per view, it might start adding up. If the user views 5 different pages, that is 5 times the server is executing the JSP, building the data for the particular view. While your code might be basic if-statements and loading a few files from the filesystem, there is still overhead in executing that code. While it might not be a problem say for 10 requests per minute, it could lead to issues with 1,000 requests per minute. Again, that extra overhead can be small but it just simply isn't necessary unless you r…
accepted answer of: http://stackoverflow.com/q/26156336
answers question: http://stackoverflow.com/q/26156336
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/a/26070146
answers question: http://stackoverflow.com/q/26050737
upvote count: 2
type: Answer
score: 2
has body: Attach the handlers to the document and check event.target to see if it has the appropriate class. function handler(e) { // check that the event target has the desired class if (e.target.classList.contains("edit-description")) { console.log("%s %o", e.type, e.target); } } // add handlers using the useCapture argument document.addEventListener("blur", handler, true); document.addEventListener("focus", handler, true); // add another input to the DOM var input = document.createElement("input"); input.id = "b"; input.className = "edit-description"; document.body.insertBefore(input, document.body.children[1]); &lt;input id="a" class="edit-description"&gt; Note that we specified true for the addEventListener() useCapture argument. This is necessary for event delegation (in this case) because blur and focus are not bubbling events. See also: Element.classList
accepted answer of: http://stackoverflow.com/q/26050737
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26139324
answers question: http://stackoverflow.com/q/26139203
downvote count: 0
score: 1
has body: Consider: return $('a.jqzoom')[0].href || &lt;value if not found&gt;; so if no element is found, the first part returns undefined and the second value is returned. A more jQuery-ish way is: return $('a.jqzoom').prop('href') || &lt;value if not found&gt;; But I'm a bit puzzled, isn't the href of an A element supposed to be a document (or some other text based object), not an image?
has comment: http://stackoverflow.com/comment/40972444
type: AcceptedAnswer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26139203
type: Answer

http://stackoverflow.com/comment/40950551
type: Comment
type: QuestionComment
has text: Because I was under the impression that it the addEventListener does not register the event again if the target is the same and the handle is the same.
score: 1
comment on: http://stackoverflow.com/q/26127336

http://stackoverflow.com/q/26063574
tagged with: contenteditable
has body: I am using an editable div: sdtgssdrsdrtyy ╚asasasarrstssdertrtyrtyrrty ☻aaaaaaaaaaaaaaaaadaafsdsf4n I am having task to show non-ascii characters to the user, to highlight the non-ascii characters I have used the highlighting jQuery library which highlights the non-ascii characters by adding span with "highlight" class. The innerHTML is as follow: ╚asasasarrstssdertrtyrtyrrty ☻aaaaaaaaaaaaaadaafsdsf4n Highlighting works well,but only problem arise is that when user delete the non-ascii characters and starts typing from that position the typed characters also gets highlighted, when I checked the innerHTML it shows that newly typed characters also got into the span tag as follow: ☻aaaaaaaaaaaaaaaaadaafsdsf4n To solve this issue I used the KeyUp event on editable div and in this event I am separating the span with non-ascii characters and newly typed characters and putting them into the new span tag and replacing old one. This works fine for the first ``keyup` and the newly entered characters also doesn't have the highlighting but after that when I type again this event doesn't fire. I don't have clue as what is causing this? Is this because I have changed the innerHTML of the div explicitly? Please help. Following is the keyup function: $(document).on('keyup', ".editableDiv", function () { var hilighterSpans = $(this).children(".highlight"); hilighterSpans.each(function (x, y) { var spanText = $(y).text().trim(); if (spanText == "") { $(y).remove(); } else { var regex = new RegExp("[^\u0020-\u007E]+"); var nonasciiChar = regex.exec(spanText); if (nonasciiChar != "") { var asciiChars = spanText.replace(nonasciiChar, ''); var spannode1 = document.createElement('span'); var spannode2 = document.createElement('span'); spannode2.className = 'highlight'; spannode2.innerHTML=nonasciiChar; if (spanText.indexOf(nonasciiChar) == 0) { $(spannode1).append(spannode2); $(spannode1).append(asciiChars); } else { $(spannode1).append(asciiChars); $(spannode1).append(spannode2); } $(th…
has answer: http://stackoverflow.com/a/26375851
has comment: http://stackoverflow.com/comment/40834819
has comment: http://stackoverflow.com/comment/40834288
downvote count: 1
has comment: http://stackoverflow.com/comment/40834293
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/40834556
has answer: http://stackoverflow.com/a/26461416
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/40834286
accepted answer: http://stackoverflow.com/a/26461416
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Editable Div not firing "KeyUp" event/ Removing Highlighting
possible better answer: http://stackoverflow.com/a/26238903
tagged with: jquery-events
answer count: 3
has comment: http://stackoverflow.com/comment/40834612
has answer: http://stackoverflow.com/a/26238903
tagged with: highlight

http://stackoverflow.com/q/26094333
upvote count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41376518
tagged with: popup
downvote count: 0
has title: Detect Blocked popups without opening a popup
type: Question
has body: This question has been raised many times on "How to check if the popup is blocked on my browser or not" and all the solutions that i found have proposed a solution where a new popup window is opened for testing. References: "Detect blocked popup in Chrome" "How can I detect if a browser is blocking a popup?" etc. I would like to know if there is any possibility of knowing a blocked popup, without actually opening one. Because due to many reasons the test pop up may take time to close, which looks ugly on start-page of your application. For example if we could use anything from the request header from the client, to know the popup preferences etc like we can get for the language preferences. It'll be a huge help. Thanks
score: 5
linked to: http://stackoverflow.com/q/2914
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/31299484
linked to: http://stackoverflow.com/q/668286
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/40965608
score: 0
type: Comment
has text: Yeah, that might work, but I prefer other "domReady" shortcut, provided by jQuery, like this: http://jsfiddle.net/pcxx9dyy/7/
type: AnswerComment
comment on: http://stackoverflow.com/a/26134898

http://stackoverflow.com/q/26136402
has answer: http://stackoverflow.com/a/26136474
type: Question
accepted answer: http://stackoverflow.com/a/26136474
tagged with: css
answer count: 1
score: 0
has body: I have a kind of drop down menu. But when I click some submenu link, the new page of my web site is opening, but the menu is closing. But on the new page of the web-site active menu must be open! I tried to implement what I have in simple way on JSFiddle: Example HTML: Click me 1 Dropdown link Dropdown link Click me 2 Dropdown link Dropdown link AJAX: $(document).ready(function () { $('#menu li > a').click(function (e) { if ($(this).next('ul').length > 0) { e.preventDefault(); var subNav = $(this).next('ul'); if (subNav.is(':visible')) { subNav.slideUp('normal') $(this).removeClass("selected"); } else { $('#menu ul:visible').slideUp('normal'); subNav.slideDown('normal'); $("a.selected").removeClass("selected"); $(this).addClass("selected"); } } }); }); Thanks for any help!
has title: Keep active menu open on the new page of web site
tagged with: javascript
tagged with: jquery
tagged with: ajax
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40938216
type: Comment
has text: Well I would check this: http://api.jquery.com/ajaxcomplete/ it might solve the issue, but you will have to test it and then update here.
type: QuestionComment
comment on: http://stackoverflow.com/q/26120772
score: 0

http://stackoverflow.com/comment/40877866
comment on: http://stackoverflow.com/a/26086870
has text: here is my code - to run it use internet explorer - http://www.mediafire.com/download/nij4052lrb4f6xg/app.zip
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40979842
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26143090
has text: It would appear that `$watch` is called potentially multiple times per `$digest` cycle, and so the same goes for `$watchGroup`. `ngChange` is the way to go here, but why is this the case? And is there any way around this, or do I always have to use a directive?

http://stackoverflow.com/q/26086225
has body: I'm following the instructions here to create a plot with irregular time data. However, as you can see in this Fiddle, the dates in the x-axis are displaying as 00:00:00.001, 00:00:00.002, etc. $("#chart").highcharts({ xAxis: { type: "datetime", }, area: { visible: true }, series: [{ data: [ [new Date(1411014072), 1], [new Date(1412742072), 2], [new Date(1413606072), 3] ] }] }); Any ideas how to fix this?
accepted answer: http://stackoverflow.com/a/26086290
type: Question
type: AnsweredQuestion
has title: Dates not displaying correctly in Highcharts plot with irregular time data
has answer: http://stackoverflow.com/a/26086290
linked to: http://stackoverflow.com/q/27983248
answer count: 1
tagged with: highcharts
tagged with: javascript
score: 0

access-control
tag name: access-control
tags question: http://stackoverflow.com/q/26185490
type: Tag

http://stackoverflow.com/comment/40788393
has text: Why do you want to do this?
comment on: http://stackoverflow.com/q/26038906
type: Comment
type: QuestionComment
score: 1

google-chrome
tags question: http://stackoverflow.com/q/26151493
tags question: http://stackoverflow.com/q/26108658
tags question: http://stackoverflow.com/q/26118171
tags question: http://stackoverflow.com/q/26160448
tags question: http://stackoverflow.com/q/26176271
tags question: http://stackoverflow.com/q/26109825
tags question: http://stackoverflow.com/q/26188310
tags question: http://stackoverflow.com/q/26094565
tags question: http://stackoverflow.com/q/26102576
tags question: http://stackoverflow.com/q/26056449
tags question: http://stackoverflow.com/q/26081697
tags question: http://stackoverflow.com/q/26153853
tags question: http://stackoverflow.com/q/26096920
tags question: http://stackoverflow.com/q/26036345
tags question: http://stackoverflow.com/q/26067928
tags question: http://stackoverflow.com/q/26133889
tags question: http://stackoverflow.com/q/26118208
tags question: http://stackoverflow.com/q/26069214
tags question: http://stackoverflow.com/q/26164705
tags question: http://stackoverflow.com/q/26058005
tags question: http://stackoverflow.com/q/26049869
tags question: http://stackoverflow.com/q/26058964
tags question: http://stackoverflow.com/q/26145409
tags question: http://stackoverflow.com/q/26190589
tags question: http://stackoverflow.com/q/26062878
tags question: http://stackoverflow.com/q/26121776
tags question: http://stackoverflow.com/q/26187834
tags question: http://stackoverflow.com/q/26183772
tags question: http://stackoverflow.com/q/26068445
tags question: http://stackoverflow.com/q/26139798
tags question: http://stackoverflow.com/q/26068263
tags question: http://stackoverflow.com/q/26102366
tags question: http://stackoverflow.com/q/26162440
tags question: http://stackoverflow.com/q/26073609
tags question: http://stackoverflow.com/q/26168732
tags question: http://stackoverflow.com/q/26090875
tags question: http://stackoverflow.com/q/26124310
tags question: http://stackoverflow.com/q/26085303
tags question: http://stackoverflow.com/q/26090563
tags question: http://stackoverflow.com/q/26112960
tags question: http://stackoverflow.com/q/26177776
tags question: http://stackoverflow.com/q/26141692
tags question: http://stackoverflow.com/q/26132494
tags question: http://stackoverflow.com/q/26109835
tags question: http://stackoverflow.com/q/26111953
tags question: http://stackoverflow.com/q/26036811
tags question: http://stackoverflow.com/q/26106257
tags question: http://stackoverflow.com/q/26112981
tags question: http://stackoverflow.com/q/26071891
tags question: http://stackoverflow.com/q/26152335
tags question: http://stackoverflow.com/q/26037462
type: Tag
tags question: http://stackoverflow.com/q/26076004
tags question: http://stackoverflow.com/q/26120808
tag name: google-chrome
tags question: http://stackoverflow.com/q/26041804
tags question: http://stackoverflow.com/q/26098584
tags question: http://stackoverflow.com/q/26147233
tags question: http://stackoverflow.com/q/26082742
tags question: http://stackoverflow.com/q/26079989
tags question: http://stackoverflow.com/q/26123268
tags question: http://stackoverflow.com/q/26124678
tags question: http://stackoverflow.com/q/26132552
tags question: http://stackoverflow.com/q/26124781
tags question: http://stackoverflow.com/q/26170692
tags question: http://stackoverflow.com/q/26061615
tags question: http://stackoverflow.com/q/26101928
tags question: http://stackoverflow.com/q/26100565
tags question: http://stackoverflow.com/q/26140443
tags question: http://stackoverflow.com/q/26159079
tags question: http://stackoverflow.com/q/26126587
tags question: http://stackoverflow.com/q/26077966
tags question: http://stackoverflow.com/q/26093069
tags question: http://stackoverflow.com/q/26043787
tags question: http://stackoverflow.com/q/26057571
tags question: http://stackoverflow.com/q/26047914
tags question: http://stackoverflow.com/q/26132684
tags question: http://stackoverflow.com/q/26130043
tags question: http://stackoverflow.com/q/26149457

video.js
tags question: http://stackoverflow.com/q/26069858
type: Tag
tag name: video.js

twitter-bootstrap-3
tags question: http://stackoverflow.com/q/26133340
tags question: http://stackoverflow.com/q/26126179
tags question: http://stackoverflow.com/q/26036602
tags question: http://stackoverflow.com/q/26078601
tags question: http://stackoverflow.com/q/26110379
tags question: http://stackoverflow.com/q/26055743
tags question: http://stackoverflow.com/q/26036591
tag name: twitter-bootstrap-3
tags question: http://stackoverflow.com/q/26185694
tags question: http://stackoverflow.com/q/26110605
tags question: http://stackoverflow.com/q/26077241
tags question: http://stackoverflow.com/q/26059339
tags question: http://stackoverflow.com/q/26057352
tags question: http://stackoverflow.com/q/26034917
tags question: http://stackoverflow.com/q/26135493
tags question: http://stackoverflow.com/q/26152393
tags question: http://stackoverflow.com/q/26130310
tags question: http://stackoverflow.com/q/26188803
tags question: http://stackoverflow.com/q/26187370
tags question: http://stackoverflow.com/q/26107462
tags question: http://stackoverflow.com/q/26137653
tags question: http://stackoverflow.com/q/26052392
type: Tag
tags question: http://stackoverflow.com/q/26182876
tags question: http://stackoverflow.com/q/26156680
tags question: http://stackoverflow.com/q/26040488
tags question: http://stackoverflow.com/q/26160447
tags question: http://stackoverflow.com/q/26046125
tags question: http://stackoverflow.com/q/26141547
tags question: http://stackoverflow.com/q/26147426
tags question: http://stackoverflow.com/q/26042779
tags question: http://stackoverflow.com/q/26101227
tags question: http://stackoverflow.com/q/26138211
tags question: http://stackoverflow.com/q/26098523
tags question: http://stackoverflow.com/q/26103375
tags question: http://stackoverflow.com/q/26071772
tags question: http://stackoverflow.com/q/26131924
tags question: http://stackoverflow.com/q/26103771
tags question: http://stackoverflow.com/q/26090245
tags question: http://stackoverflow.com/q/26115916
tags question: http://stackoverflow.com/q/26115398
tags question: http://stackoverflow.com/q/26063555
tags question: http://stackoverflow.com/q/26072955
tags question: http://stackoverflow.com/q/26166326
tags question: http://stackoverflow.com/q/26169104

http://stackoverflow.com/a/26055851
accepted answer of: http://stackoverflow.com/q/26055435
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40819573
has comment: http://stackoverflow.com/comment/40820354
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40819538
has comment: http://stackoverflow.com/comment/40820253
has comment: http://stackoverflow.com/comment/40820741
has comment: http://stackoverflow.com/comment/40820442
has comment: http://stackoverflow.com/comment/40820302
has body: $.featherlight('#fl1'); Pay attention that the lightbox has id "fl1" here is the fiddle http://jsfiddle.net/g68bZ/26/ and here with if else example http://jsfiddle.net/g68bZ/27/
has comment: http://stackoverflow.com/comment/40820423
answers question: http://stackoverflow.com/q/26055435

http://stackoverflow.com/comment/40976117
type: AnswerComment
comment on: http://stackoverflow.com/a/26140527
score: 0
type: Comment
has text: I've added the return into the code so I could accept your answer - thanks! :)

asp.net
tags question: http://stackoverflow.com/q/26041059
tags question: http://stackoverflow.com/q/26148581
tags question: http://stackoverflow.com/q/26160603
tags question: http://stackoverflow.com/q/26060512
tags question: http://stackoverflow.com/q/26118347
tags question: http://stackoverflow.com/q/26050757
tags question: http://stackoverflow.com/q/26175445
tags question: http://stackoverflow.com/q/26075028
tags question: http://stackoverflow.com/q/26065319
tags question: http://stackoverflow.com/q/26039968
tags question: http://stackoverflow.com/q/26125880
tags question: http://stackoverflow.com/q/26052501
tags question: http://stackoverflow.com/q/26179349
tags question: http://stackoverflow.com/q/26121650
tags question: http://stackoverflow.com/q/26058436
tags question: http://stackoverflow.com/q/26073812
tags question: http://stackoverflow.com/q/26166962
tags question: http://stackoverflow.com/q/26162080
tags question: http://stackoverflow.com/q/26059844
tags question: http://stackoverflow.com/q/26114732
tags question: http://stackoverflow.com/q/26141668
tags question: http://stackoverflow.com/q/26118608
tags question: http://stackoverflow.com/q/26126206
tags question: http://stackoverflow.com/q/26035010
tags question: http://stackoverflow.com/q/26147838
tags question: http://stackoverflow.com/q/26159073
tags question: http://stackoverflow.com/q/26036920
tags question: http://stackoverflow.com/q/26091088
tags question: http://stackoverflow.com/q/26068567
tags question: http://stackoverflow.com/q/26036784
tags question: http://stackoverflow.com/q/26087087
tags question: http://stackoverflow.com/q/26173249
tags question: http://stackoverflow.com/q/26194014
tags question: http://stackoverflow.com/q/26185108
tags question: http://stackoverflow.com/q/26176831
tags question: http://stackoverflow.com/q/26094672
tags question: http://stackoverflow.com/q/26183642
tags question: http://stackoverflow.com/q/26054570
tags question: http://stackoverflow.com/q/26180235
tags question: http://stackoverflow.com/q/26044678
tags question: http://stackoverflow.com/q/26145216
tags question: http://stackoverflow.com/q/26045139
tags question: http://stackoverflow.com/q/26055801
tags question: http://stackoverflow.com/q/26122019
tags question: http://stackoverflow.com/q/26170308
tags question: http://stackoverflow.com/q/26111713
tags question: http://stackoverflow.com/q/26113595
tags question: http://stackoverflow.com/q/26176077
tags question: http://stackoverflow.com/q/26143504
tags question: http://stackoverflow.com/q/26162241
tags question: http://stackoverflow.com/q/26115222
tags question: http://stackoverflow.com/q/26125111
tags question: http://stackoverflow.com/q/26173655
tags question: http://stackoverflow.com/q/26127715
tags question: http://stackoverflow.com/q/26129631
tags question: http://stackoverflow.com/q/26166065
tags question: http://stackoverflow.com/q/26172723
tags question: http://stackoverflow.com/q/26109315
tags question: http://stackoverflow.com/q/26149455
tags question: http://stackoverflow.com/q/26176741
tags question: http://stackoverflow.com/q/26090880
tags question: http://stackoverflow.com/q/26094657
tags question: http://stackoverflow.com/q/26167161
tags question: http://stackoverflow.com/q/26070783
tags question: http://stackoverflow.com/q/26185273
tags question: http://stackoverflow.com/q/26072998
type: Tag
tags question: http://stackoverflow.com/q/26055976
tags question: http://stackoverflow.com/q/26049483
tags question: http://stackoverflow.com/q/26072205
tags question: http://stackoverflow.com/q/26136885
tags question: http://stackoverflow.com/q/26181779
tags question: http://stackoverflow.com/q/26120669
tags question: http://stackoverflow.com/q/26157767
tags question: http://stackoverflow.com/q/26079049
tags question: http://stackoverflow.com/q/26159884
tags question: http://stackoverflow.com/q/26140923
tags question: http://stackoverflow.com/q/26100527
tags question: http://stackoverflow.com/q/26176333
tags question: http://stackoverflow.com/q/26037058

http://stackoverflow.com/q/26053378
has answer: http://stackoverflow.com/a/26053491
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26053471
score: 0
answer count: 2
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26053491
has body: I have 2 custom slideshows in same page but they can't work together, a slideshow it works but another slideshow doesn't. Im already read the example of multiple slideshow IN HERE but my custom slideshows dont work like what i want. here's MY FIDDLE here's my HTML : I hope it's work I hope it's solved I hope it's work I hope it's solved and my javascript : $('#slider1').bxSlider({ nextSelector: '#slider-next', prevSelector: '#slider-prev', controls: true, pager: false, nextText: ' ', prevText: ' ' }); $('#slider2').bxSlider({ nextSelector: '#slider-next2', prevSelector: '#slider-prev2', controls: true, pager: false, nextText: ' ', prevText: ' ' });
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has title: BxSlider multiple slideshows
tagged with: bxslider
accepted answer: http://stackoverflow.com/a/26053471

http://stackoverflow.com/q/26039968
type: AnsweredQuestion
has body: I use in my Project telerik kendo ui, so I use kendo window, but button which inside kendo window does not firing click event. I try multiple different style but it seems not working. here my window html. and some javascript. &lt;div class="row"&gt; &lt;div class="col-md-7"&gt; &lt;div class="input-group"&gt; &lt;asp:TextBox runat="server" ID="txtUpgradePrice" CssClass="form-control" ClientIDMode="Static"&gt;&lt;/asp:TextBox&gt; &lt;span class="input-group-addon"&gt;&lt;/span&gt; &lt;asp:Button Text="SendITTTT" CssClass="btn btn-danger" ID="btnSendNewPrice" runat="server" OnClick="btnSendNewPrice_Click" /&gt; &lt;asp:LinkButton Text="Send it" CssClass="btn btn-danger" ClientIDMode="Static" ID="btnSendPrice" OnClick="btnSendNewPrice_Click" runat="server" /&gt; &lt;/div&gt; &lt;br /&gt; &lt;/div&gt; &lt;script&gt; $(document).ready(function () {var myWindow3 = $("#myModalNew").kendoWindow({ modal: true, width: "800px", draggable: false, visible: false, resizable: false, }).data("kendoWindow"); $("#openBtn").on("click", function () { myWindow3.center(); myWindow3.open(); }); $("#newModelClose").on("click", function () { myWindow3.close(); }); }); function ShowLabel() { // Note that the client ID might be different from the server side ID document.getElementById('lblPriceState').style.display = 'inherit'; } &lt;/script&gt; Do you have any information about kendo block server side in asp.net..
type: Question
tagged with: c#
answer count: 2
possible better answer: http://stackoverflow.com/a/26040171
tagged with: javascript
has comment: http://stackoverflow.com/comment/40790813
tagged with: kendo-ui
score: 0
linked to: http://stackoverflow.com/q/757232
has title: Kendo Window does not firing server side button
has answer: http://stackoverflow.com/a/26070864
accepted answer: http://stackoverflow.com/a/26070864
tagged with: asp.net
has answer: http://stackoverflow.com/a/26040171

http://stackoverflow.com/comment/41000190
type: Comment
comment on: http://stackoverflow.com/q/26153390
has text: `^(?:AF?|[BC]\+?|[DF]|WF)$` will match all 9 examples and only all 9 examples, but I feel like there were some extra ones we were supposed to assume you wanted? `A-`, `D+`, etc. But the main point is make sure your alternation is nested in a group so that each option is anchored with `^` and `$`.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41045869
type: Comment
score: 2
type: AnswerComment
has text: You cannot get cookies from another site; you can only give own cookies to another site. document.cookie contains semicolon-separated list of name=vale of the cookies of your own page; you can use that to pass to another site using XHR.
comment on: http://stackoverflow.com/a/26178376

http://stackoverflow.com/a/26188542
score: 0
type: AcceptedAnswer
has body: For that kind of behavior you would need to submit the form via XHR, parse the (JSON) response, and then clear the form on error and display error information. On the server side you can simply do something like res.json({ status: 'success' }); or res.json({ status: 'error', error: 'Bad token' }); On success, you could do the redirect in the browser via window.location.replace("http://example.org/foo"); or if you want the current page in the session history (e.g. reachable with the browser's back button) you can use window.location.href = "http://example.org/foo".
type: Answer
accepted answer of: http://stackoverflow.com/q/26187135
answers question: http://stackoverflow.com/q/26187135

http://stackoverflow.com/comment/40950240
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26127309
has text: Because you try to reference `choose[0]`. You need to define it with something
score: 0

http://stackoverflow.com/comment/40915910
has text: @BlaShadow That partially depends on the intent of the stored value - I actually somewhat expected all colors to be stored as an array under a single storage id. Remember that you now have "unique-2" as a localStorage value set globally to the entire domain.
score: 0
comment on: http://stackoverflow.com/a/26107146
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40937589
score: 1
type: QuestionComment
has text: Have you heard about `else`? if (...) { red } else { black } And most developers would be toggling a class.
comment on: http://stackoverflow.com/q/26120732
type: Comment

http://stackoverflow.com/a/26284049
has comment: http://stackoverflow.com/comment/41333739
score: 0
has body: First, hit F-12 and confirm the document mode is the same in both instances. If not, change the document mode of the outer frame to match.. If they are already the same, try instead to load the iFrame script dynamically after the outer page is complete. Older versions of IE handle resource allocation oddly and could be part of the problem. Granted, not the answer to your question but bringing 8 MB of XML to the client is quite inefficient. Can any of this be stripped out or entirely processed server side? Lastly, IE is slow to move and add DOM elements (compared to Chrome). Your best bet is to add them all at once. So if you are updating the UI as you parse the XML (instead of all at once after parsing), that will slow you down considerably.
type: Answer
answers question: http://stackoverflow.com/q/26140522

http://stackoverflow.com/q/26036236
has title: Java Script convert string into multidimensional array
has comment: http://stackoverflow.com/comment/40783657
tagged with: arrays
tagged with: javascript
upvote count: 1
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40783703
has body: I am outputting from a PHP document my database query in a form of a string, something along the lines of; ID-ImagePath-TitleOfPost-Text-UpVotes|ID-ImagePath-TitleOfPost-Text-UpVotes|ID-ImagePath-TitleOfPost-Text-UpVotes I would like to organise this string into a JS array so that I can load the posts one by one. I have tried multiple methods but as yet unable to find a solution. Any help greatly appreciated.
favorite count: 0
has comment: http://stackoverflow.com/comment/40783701
tagged with: multidimensional-array
tagged with: php
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26036386
score: 1
type: Question
has answer: http://stackoverflow.com/a/26036386

http://stackoverflow.com/a/26156156
type: Answer
answers question: http://stackoverflow.com/q/26156107
downvote count: 0
score: 1
has body: If I'm understanding you, you want to check the first a to see if it's the first child of the first b, then you need another [0]: $el = document.getElementsByClassName("b")[0]; $firstEl = $el.parentNode.getElementsByClassName("a")[0].firstChild; // Here ---------------------------------------------^^^ if ($el === $firstEl) { // .... } But I would use querySelector instead, which has better support (basically, it's in IE8 whereas getElementsByClassName isn't) and it returns the first element it finds rather than finding them all and returning a list: $el = document.querySelector(".b"); $firstEl = $el.parentNode.querySelector(".a").firstChild; if ($el === $firstEl) { // .... }
upvote count: 1

http://stackoverflow.com/comment/41059473
type: Comment
type: QuestionComment
has text: I've updated the code, hopefully that provides more context.
comment on: http://stackoverflow.com/q/26178637
score: 0

http://stackoverflow.com/q/26138916
favorite count: 0
has comment: http://stackoverflow.com/comment/108995004
accepted answer: http://stackoverflow.com/a/26142050
has comment: http://stackoverflow.com/comment/40973130
has title: Impossible retrieve resource in Internet Explorer
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40971224
tagged with: sapui5
upvote count: 1
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/22315167
tagged with: internet-explorer
has answer: http://stackoverflow.com/a/26142050
tagged with: javascript
has body: I create my OpenUI5 app and I test it in chrome (and firefox). On these browsers the app works fine but if I try to run it on Internet Explorer (In my pc I have IE11) I have a bug... I define my resource in this mode: <core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:l="sap.ui.layout" xmlns:f="sap.ui.layout.form" controllerName="apps.appIntra.detail.rowDetailEdit" xmlns:html="http://www.w3.org/1999/xhtml"> <l:Grid defaultSpan="L12 M12 S12" hSpacing="2" width="auto"> <l:content> <f:Form id="FormEdit" minWidth="1024" maxContainerCols="2" editable="true" class="isReadonly"> <f:title> <core:Title text="Modifica" /> </f:title> <f:layout> <f:ResponsiveGridLayout labelSpanL="3" labelSpanM="3" emptySpanL="4" emptySpanM="4" columnsL="1" columnsM="1" /> </f:layout> <f:formContainers> <f:FormContainer id="rowDetFormEditContainer"> </f:FormContainer> </f:formContainers> </f:Form> </l:content> </l:Grid> </core:View> Internet explorer don't like it and when I do sap.ui.getCore().byId('rowDetailEdit')..... it returns underined.. On FF and Chome works fine I load all my view in a single step by a for cicle that instantiate the XML-views. I retrieve the name and the path of view by a my json file. for( var i = 0; i < aDetailPages.length; i++) { var detailPage = aDetailPages[i]; var name=detailPage.name; // "rowDetailEdit" var path=detailPage.path; // "apps.appIntra.detail.rowDetailEdit" if(sap.ui.getCore().byId(name)==undefined){ splitApp.addDetailPage(sap.ui.xmlview(name, path)); //instantiate and add to splitapp } else{ sap.ui.getCore().byId(name).destroy(); //destroy old view splitApp.addDetailPage(sap.ui.xmlview(name, path)); //instantiate and add to splitapp } }
has comment: http://stackoverflow.com/comment/40971632
score: 0
answer count: 1

http://stackoverflow.com/q/26153652
has answer: http://stackoverflow.com/a/26154605
answer count: 1
downvote count: 0
tagged with: web
favorite count: 0
tagged with: angularjs
has body: I'm working into an applications which needs to use Angular's repeat functionality to print few informations about a specific client. That's pretty much the code that I have The problem about it is that, while using the imgLiquid inside the ng-repeat, it's not working, if I try to do something like It works good... So might be something odd happening here. Does anybody have any suggestions? Thanks
has comment: http://stackoverflow.com/comment/41000111
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26154605
score: 1
upvote count: 1
type: Question
has title: Angular Js with ImgLiquid
tagged with: javascript

http://stackoverflow.com/comment/41022214
score: 0
type: AnswerComment
has text: Yeah very strange, I went through the jquery library and it looks like that was their fix for this issue.
type: Comment
comment on: http://stackoverflow.com/a/26069122

http://stackoverflow.com/q/26120634
accepted answer: http://stackoverflow.com/a/26120774
has comment: http://stackoverflow.com/comment/40937644
type: Question
has comment: http://stackoverflow.com/comment/40937878
tagged with: multifile-uploader
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
has title: how to send multipart/form-data request in ajax
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26120774
has body: The below function wont work. i want to upload multiple files &amp; request submit by ajax.here content type occur "text/plain;charset=UTF-8" i want to change content type="multipart/form-data" the following functions shown below.plz give any suggestions function importNow(serverURL, parameters) { document.body.style.cursor = "wait"; $.ajax({ url: serverURL, data: parameters, processData: false, contentType: false, type: "POST", cache: false, dataType: "text", success: function(data) { if ($.trim(data) === "Success") { updateStatusMessage("success", "Import scenario successfully"); } else { updateStatusMessage("failure", $.trim(data)); } document.body.style.cursor = "default"; }, async: false }); } function importScenario() { var serverURL = homeURL + "/runapp"; var parameters = "requestType=Import&amp;subRequestType=importScenario&amp;userName=" + userName ; refButton = '&lt;form id="importForm" class="userInputForm" enctype="multipart/form-data"&gt;' + '&lt;input id="file" name="file" type="file" /&gt;' + '&lt;/form&gt;'; document.getElementById("popupDiv").innerHTML = refButton; $("#popupDiv").dialog({ title: "Import Scenario", draggable: true, bgiframe: true, modal: true, width: 500, heigth: 100, show: {effect: 'blind', duration: 500}, hide: {effect: 'fade', duration: 1000}, zIndex: 1000, buttons: { 'Upload': function() { if ($("#importForm").valid()) { parameters; importNow(serverURL, parameters); $(this).dialog("close"); } }, 'Cancel': function() { $(this).dialog("close"); } } }); }
upvote count: 2
type: AnsweredQuestion
score: 2
tagged with: java

http://stackoverflow.com/comment/40866120
score: 0
has text: Any thoughts on how to get tabSlider to stop on hover of the mouse?? Thanks!
comment on: http://stackoverflow.com/q/26076996
type: Comment
type: QuestionComment

variables
tag name: variables
tags question: http://stackoverflow.com/q/26074925
tags question: http://stackoverflow.com/q/26077690
tags question: http://stackoverflow.com/q/26051578
tags question: http://stackoverflow.com/q/26152331
tags question: http://stackoverflow.com/q/26135014
tags question: http://stackoverflow.com/q/26142473
tags question: http://stackoverflow.com/q/26132571
type: Tag
tags question: http://stackoverflow.com/q/26093219
tags question: http://stackoverflow.com/q/26046687
tags question: http://stackoverflow.com/q/26190082
tags question: http://stackoverflow.com/q/26190180
tags question: http://stackoverflow.com/q/26071137
tags question: http://stackoverflow.com/q/26141368
tags question: http://stackoverflow.com/q/26188898
tags question: http://stackoverflow.com/q/26145616
tags question: http://stackoverflow.com/q/26049381
tags question: http://stackoverflow.com/q/26117191
tags question: http://stackoverflow.com/q/26065456
tags question: http://stackoverflow.com/q/26124987
tags question: http://stackoverflow.com/q/26179861
tags question: http://stackoverflow.com/q/26146700
tags question: http://stackoverflow.com/q/26144302
tags question: http://stackoverflow.com/q/26101694
tags question: http://stackoverflow.com/q/26124542
tags question: http://stackoverflow.com/q/26130701
tags question: http://stackoverflow.com/q/26174520

http://stackoverflow.com/comment/40836750
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26064880
has text: One question: I've not seen this jquery use before so beg pardon if this is a bit daft: How to pass data to the json action? WOuld it be `$.get("/controller/JSON", data1, data2, function(data)...
type: AnswerComment

http://stackoverflow.com/q/26063070
type: Question
accepted answer: http://stackoverflow.com/a/26063384
score: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40834107
tagged with: ajax
has title: trying to use a function to populate a HTML table dynamically with Javascript
has answer: http://stackoverflow.com/a/26063384
has body: I have a table that populates fine with javascript and Ajax, but now I need to add in checkboxes and have them show checked if saved in the database that way (1 for checked 0 for not). Instead of writing var aChecked=''; aChecked += '&lt;input type="checkbox" id="amS"'+(data.amS == 1 ? 'checked="checked"':'')+'/&gt;'; for every checkbox ( there are about 24 of them) I am trying to use a modified function that I use to see if other checkboxes not in the table are checked. The function is: function Checked(){ this.update(); } is above my $.ajax and this is in my success(function(data) portion. Checked.prototype.list = ['am','fol','tich','book','neb','ster','byte','ing']; Checked.prototype.update = function(){ for( var i = 0 ; i &lt; this.list.length ; i++ ){ var check = this.list[i]; this[ check + 'S' ] += '&lt;input type="checkbox" id="'+this[ check + 'S' ]+'"'+(data.this[ check + 'S' ] == 1 ? 'checked="checked"':'')+'/&gt;';//$("#" + check ).is(":checked") ? 1 : 0; }// end of for loop } var checks = new Checked(); and then I can reference it in my append statement like so &lt;td&gt;'+checks.amS+'&lt;/td&gt; Problem is I am getting this error when I try to run it: TypeError: data.this is undefined I am not sure how i need to write this in order for this to work and not have to write it out the long way and violate the DRY principle. I have tried data.(this[ check + 'S' ]) and data.[this[ check + 'S' ]] both of which throw syntax errors. Anyone know how I can accomplish this? Thanks
has comment: http://stackoverflow.com/comment/40833485
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40833292

http://stackoverflow.com/q/26080217
has title: the Object getter/setter vs new constructor - test results
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40865496
has answer: http://stackoverflow.com/a/26080382
has comment: http://stackoverflow.com/comment/40865518
has comment: http://stackoverflow.com/comment/40865469
has comment: http://stackoverflow.com/comment/40865379
score: -4
type: Question
has comment: http://stackoverflow.com/comment/40865423
tagged with: object
has comment: http://stackoverflow.com/comment/40864997
has comment: http://stackoverflow.com/comment/40864952
has comment: http://stackoverflow.com/comment/40865291
tagged with: setter
tagged with: javascript
tagged with: getter
has body: I have a question. I hope you close this shit - many people are javascript-gods - but they write Ecmascript3 -- haha lol - If you dont understand what Object.create() do, then shut your mouth @LJ_1102!!!! I've done a test at jsperf.com, about two different ways for manipulation one object. Please do not discuss with me about "object.create(p, pr)" and new Instance(). Object.create() is the future and very simple for simple code. --->The question is not: Need I a function and set prototypes and constructor or need I Object.create(prototype, new properties) &lt;--- This is a question of faith My question: Why is there a big difference between the results in Chrome and Firefox? I know - two different Javascript-engines. Yet why so different? --->link for testsite&lt;--- The test: var obj = { name: "", get getName(){return this.name;}, set setName(x){this.name = x;} }; function func(x){ var that = this; this.name = ""; this.getName = function(){return that.name;}; this.setName = function(x){that.name = x;}; } // Chrome: 1,536,214 ops/sec // Firefox: 302,952 ops/sec var newObj = Object.create(obj); obj.setName = "svenskanda"; obj.getName; // Chrome: 315,572 ops/sec // Firefox: 1,360,496 ops/sec var newObj = new func(); newObj.setName("Alex"); newObj.getName(); In Chrome, the Object.create() - getter/setter is faster. And in Firefox, the new-constructor method is faster. Can you explain that?
has comment: http://stackoverflow.com/comment/40865111
downvote count: 4
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40865539
favorite count: 0

http://stackoverflow.com/comment/40918991
has text: I've just tried the second example. If I click the send button with all fields empty, the email error doesn't appear? I was asking if I needed to actually put `return true` somewhere in the function? Are you saying that if all fields are field in correctly, it will automatically do that then? Sorry, I'm new to forms and PHP. Thanks again.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26109896
type: Comment

http://stackoverflow.com/q/26176695
has answer: http://stackoverflow.com/a/26176808
type: Question
has answer: http://stackoverflow.com/a/26176801
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I am trying to pass the form field values to a php function located into a file. The problem is that I can't understand how to pass that serialized form data to the function from this ajax to a function in php. $('#insert_news').submit(function(event) { event.preventDefault(); var form = $('#insert_news').serialize(); $.ajax({ type: 'POST', url: 'includes/ajax.php', data: { action: 'insert_news', $('#insert_news').serialize(); // how do I add this data here? }, success: function(datas) { $('#message').html(datas).show() /*fadeIn(1000).fadeOut(1000)*/ ; } }); }); This ajax passed the values to the file ajax.php right beyond. And from ajax.php is called the function located in functions.php. ajax.php if (isset($_POST['action']) &amp;&amp; $_POST['action'] == 'insert_news') { $cp-&gt;insert_into_table('newss', array( 'NewsTitle' =&gt; $_POST['title'], 'NewsDescrption' =&gt; $_POST['description'], 'Date' =&gt; date('Y-m-d H:i:s'), 'status' =&gt; '1' ) ); } function.php public function insert_into_table($table_name, array $data){ foreach($data as $col=&gt;$value) { $cols[] = $col; $values[] = '\''.$value.'\''; } $cols = implode(', ', $cols); $values = implode(', ', $values); $this-&gt;db-&gt;query("INSERT INTO $table_name ($cols) VALUES ($values)"); echo "INSERT INTO $table_name ($cols) VALUES ($values)"; }
tagged with: ajax
has title: Serialzing form and posting ajax to function
has answer: http://stackoverflow.com/a/26176787
favorite count: 0
accepted answer: http://stackoverflow.com/a/26176801
has answer: http://stackoverflow.com/a/26176872
possible better answer: http://stackoverflow.com/a/26176787
upvote count: 1
tagged with: php
answer count: 4
type: AnsweredQuestion
score: 1

http://stackoverflow.com/a/26045731
has comment: http://stackoverflow.com/comment/40802837
upvote count: 3
has comment: http://stackoverflow.com/comment/40801437
has comment: http://stackoverflow.com/comment/40801490
has comment: http://stackoverflow.com/comment/40803546
answers question: http://stackoverflow.com/q/26045659
type: Answer
downvote count: 0
has body: Unless you are trying to do this dynamically, this is as simple as: $('#three').text($('#one').text());
score: 3
has comment: http://stackoverflow.com/comment/40802272

http://stackoverflow.com/a/26187741
type: Answer
score: 3
has body: use the torso variable as index to access an item from the comb array: var num = comb[torso]; With the value 2 for torso, num will contain the third item from the array; "MT 1.3".
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26187694
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26187694

animation
tags question: http://stackoverflow.com/q/26194421
tags question: http://stackoverflow.com/q/26182437
tags question: http://stackoverflow.com/q/26051164
tags question: http://stackoverflow.com/q/26118814
tags question: http://stackoverflow.com/q/26085953
type: Tag
tags question: http://stackoverflow.com/q/26156593
tags question: http://stackoverflow.com/q/26112035
tags question: http://stackoverflow.com/q/26109030
tags question: http://stackoverflow.com/q/26035294
tags question: http://stackoverflow.com/q/26150032
tag name: animation
tags question: http://stackoverflow.com/q/26054712
tags question: http://stackoverflow.com/q/26044964
tags question: http://stackoverflow.com/q/26188310
tags question: http://stackoverflow.com/q/26081432
tags question: http://stackoverflow.com/q/26083610
tags question: http://stackoverflow.com/q/26048601
tags question: http://stackoverflow.com/q/26157279
tags question: http://stackoverflow.com/q/26036741
tags question: http://stackoverflow.com/q/26178596
tags question: http://stackoverflow.com/q/26077877
tags question: http://stackoverflow.com/q/26042287
tags question: http://stackoverflow.com/q/26132086

http://stackoverflow.com/q/26113595
has body: I have JSON data which I need to pass to code behind and bind to obout grid. I know we can pass data using &lt;WebMethod&gt;. But in Webmethod I cannot bind the data to obout grid and any grid. because it is static webmethod. So Now I trying to call code behind method from javascript and pass the data as parameter to method. How can we do that? users = []; for (var i = 0; i &lt; usersInfo.length; i++) { user = { UserName : usersInfo[i].UserName, Email : usersInfo[i].Email, Status : status }; users.push(user); } var results = ""; $('#lblError').val(''); if (users.length &gt; 0) { //Pass the `users` data to ShowResults code behind method. } code behind public void ShowResults(List&lt;UsersInfo&gt; users) { oboutGrid.DataSource = users; oboutGrid.DataBind(); } public partial class UsersInfo { public string UserName { get; set; } public string Email { get; set; } public string Status { get; set; } }
answer count: 1
tagged with: javascript
has title: How to pass JSON data to code behind method (not to Webmethod)?
linked to: http://stackoverflow.com/q/16183275
tagged with: c#-4.0
tagged with: asp.net
favorite count: 0
score: 2
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40939348
has answer: http://stackoverflow.com/a/26116119
has comment: http://stackoverflow.com/comment/40938738
tagged with: http://stackoverflow.com/tag/json
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/40925871
tagged with: c#

http://stackoverflow.com/q/26039075
accepted answer: http://stackoverflow.com/a/26039340
downvote count: 0
has comment: http://stackoverflow.com/comment/40789009
tagged with: knockout.js
type: Question
has title: validateObservable in Knockout JS - undefined is not a function
score: 3
has comment: http://stackoverflow.com/comment/40788941
has comment: http://stackoverflow.com/comment/40788787
has comment: http://stackoverflow.com/comment/40788744
has body: Good day, I am trying to validate a pretty huge form on my side, and basically rewritten all of my viewModel code so it can be validated. Problem is that ko.validatedObservable() doesn't seem to exist for some reason. I have used the code from this site, and I honestly cannot see what's the problem in my code. Here is a sample: var someNameSpace= {}; someNameSpace.bindData = function () { someNameSpace.viewModel = someNameSpace.initViewModel("123456", "username1", "address1", "address2", "city"); ko.applyBindings(this.viewModel); } someNameSpace.initViewModel = function (partnerId, username, address1, address2, city) { console.log(ko); var someViewModel = ko.validatedObservable({ //&lt;----FAILS HERE partnerId: ko.observable(partnerId).extend({ required: "This field is required", number: true }), username: ko.observable(username).extend({ required: "This field is required" }), address1: ko.observable(address1).extend({ required: "This field is required" }), address2: ko.observable(address2).extend({ required: "This field is required" }), city: ko.observable(city).extend({ required: "This field is required" }), }); var validationOptions = { insertMessages: true, decorateElement: true }; ko.validation.init(validationOptions); return someViewModel ; } $(document).ready(function () { someNamespace.bindData(); }); On that site, it claims to use the ko.validatedObservable in order to inspect whether or not fields were correctly entered by the user. I am still very new to knockoutJS - what can I do?
tagged with: javascript
has comment: http://stackoverflow.com/comment/40789013
upvote count: 3
tagged with: knockout-validation
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40788877
has answer: http://stackoverflow.com/a/26039340
type: AnsweredQuestion

http://stackoverflow.com/q/26091334
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/26091455
upvote count: 1
has title: Changing opacity not working with JS and SVG in Chrome
answer count: 1
has comment: http://stackoverflow.com/comment/40885366
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
score: 1
tagged with: jquery
type: Question
has body: I'm building a simple map, and need the correct svg direction line to display on input, while any other direction lines present fade away. This code is working in Firefox, though not in Chrome or Safari. Does webkit have a different way of handling this? Thanks for the help! Javascript: function getDirBut(){ var input = $('.roomname').html(); $('.direction').each(function(){ var i = this; if($(i).attr('id') != ("d" + input) &amp;&amp; $(i).attr('id') != undefined){ $(i).css("transition","0.8s ease all"); $(i).css('opacity',0); }else if($(i).attr('id') == ("d" + input)){ $(i).css("transition","0.8s ease all"); $(i).css('opacity',1); } }); }
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40890980
favorite count: 0

http://stackoverflow.com/comment/40791194
type: QuestionComment
comment on: http://stackoverflow.com/q/26039740
type: Comment
has text: @sathishkumar you need to include jquery-ui, make sure that when you chose your build of jquery-ui you select the date-picker.
score: 0

http://stackoverflow.com/comment/41056626
score: 0
comment on: http://stackoverflow.com/a/26183774
type: AnswerComment
has text: @laruiss thanks for your answer. Can I just call the third party js code right after my object definition without putting in the if condition? Not sure what is the need of if condition here? I have my object populated any ways.
type: Comment

http://stackoverflow.com/a/26187994
score: 6
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26187993
answers question: http://stackoverflow.com/q/26187993
has body: It's best to try and avoid changing DOM elements whenever possible. At times you can prevent reflow at all by sticking to CSS properties or, if required, using CSS' transforms so that the element itself is not affected at all but, instead the visual state is just changed. Paul Lewis and Paul Irish go into detail about why this is the case in this article. This approach will not work in all cases because sometimes it's required to change the actual DOM element, but for many animations and such, transforms brings the best performance. If your operations do require reflow, you can minimize the effect it has by: Keeping the DOM depth small Keeping your CSS selector simple (and saving complicated ones to a variable in JavaScript) Avoiding inline styles Avoiding tables for layout Avoiding JavaScript whenever possible Nicole Sullivan posted a pretty good article on the subject that goes into more details of browser reflows and repaints. If you're actually changing the DOM, not DOM properties, it's best to do it in larger chunks rather than smaller ones like this Stack Overflow post suggests. In the example you provided, the second method is the best because it is using CSS properties without needing JavaScript. Browsers are pretty good at rendering elements who's dimensions and position is determined solely by CSS. However, it's not always possible to get the element where we need to be with pure CSS. The worst method is by far the third because jQuery's animate is terribly slow to start out with, but making it fire on resize makes the animates stack on top of each other so it lags wayyy behind if you resize it much at all. You can prevent this by either setting a timeout with a boolean to check whether it's been fired already or, more preferably, don't use jQuery's animate to do this at all but instead use jQuery's .css() since the resize function fires so often that it will look animated anyway.
upvote count: 6
type: AcceptedAnswer

http://stackoverflow.com/comment/41013597
has text: @BojanPetkovski - I have added an jsFiddle that display the behavior
comment on: http://stackoverflow.com/q/26160355
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40966538
comment on: http://stackoverflow.com/a/26135578
type: AnswerComment
has text: what i was looking is quite similar but not this.I have three 8 div and they are arranged in a row with a max-min size of 280x280 at resolution of 1000px and above.The count of div in a row decreases as screen size decreases.I want to place the content below the row. like if i have 3 div in one row and 2 in the other row. Now on clicking any of the div in the 1st row it's content should come below the first row followed by the content of the 2nd row.
score: 0
type: Comment

http://stackoverflow.com/q/26194330
type: Question
has title: Refreshing a html table which has a progress bar
has body: I have a requirement which is nothing but progress bar inside a table column which should be active. I will have plenty of bootstrap progress bar(Say some 10) and I am using spring mvc in server side. Now the problem is I don't know how to update the progress bar constantly(Say some every 10secs) without refreshing the entire page, to be more precise I want the html table to be refreshed every 10 secs, it should hit the server and the value of the progress bar should be applied to the progress bar inside the html table. Can some one please suggest how to do this requirement, I am really in need of help and any example links which would actually help me to achieve this. I am not expert in javascript/ajax( I guess its possible to achieve this using ajax, I could not find any examples in google either). If this is achievable using javascript(nor ajax) any example links would actually help me a lot. Thanks in advance :)
tagged with: javascript
tagged with: progress-bar
tagged with: ajax
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: spring-mvc
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26195096
accepted answer: http://stackoverflow.com/a/26195096

http://stackoverflow.com/comment/40995050
comment on: http://stackoverflow.com/q/26151124
type: Comment
type: QuestionComment
has text: I intentionally did not post any code as I am dealing with a generic situation in the purest sense. As this is a 3rd party solution with many variances, I need a solution that will work across the many forms in the application regardless of their javascript validations.
score: 0

http://stackoverflow.com/a/26154393
has body: Here's another option you can try. Bear in mind that this requires JQuery. So make sure that it's included on your page like so: here is your solution: External link Notice the rel="external" that was added to the link
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/113975641
answers question: http://stackoverflow.com/q/26154158

http://stackoverflow.com/q/26177561
tagged with: c#
has comment: http://stackoverflow.com/comment/41043079
has comment: http://stackoverflow.com/comment/41043000
tagged with: javascript
has comment: http://stackoverflow.com/comment/41043031
has body: Is it possible to do something like this in c#? The value would be "10/05/2014" string jsValue = javascript("$('#EstimatedStartDate').val()");
has comment: http://stackoverflow.com/comment/41043104
score: 0
answer count: 3
tagged with: .net
accepted answer: http://stackoverflow.com/a/26177793
has comment: http://stackoverflow.com/comment/41043112
favorite count: 0
possible better answer: http://stackoverflow.com/a/26178126
has comment: http://stackoverflow.com/comment/41042943
has comment: http://stackoverflow.com/comment/41043071
has answer: http://stackoverflow.com/a/26178126
has comment: http://stackoverflow.com/comment/41043050
has title: Get javascript value to c# string
has answer: http://stackoverflow.com/a/26177707
has comment: http://stackoverflow.com/comment/41043196
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41043148
upvote count: 1
has comment: http://stackoverflow.com/comment/41043021
has answer: http://stackoverflow.com/a/26177793
downvote count: 1
type: Question

http://stackoverflow.com/comment/40865883
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26077711
has text: @Bergi Of course. Somehow I expected someone to become suspicious. I tried my best to explain the transformation but it got a bit more complicated than expected. Sadly I have little experience.

http://stackoverflow.com/comment/42254916
has text: @cVplZ sorry, I won't accept any answers bc none is correct and I still can't solve this
comment on: http://stackoverflow.com/q/26105298
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26054202
has body: Provide Id to input element in html code. Jquery code is fine here is the correct code of html &lt;input style="width: 40%" class="form-control" type="text" name="postTitle" id="postTitle"/&gt;
answers question: http://stackoverflow.com/q/26054079
type: Answer
score: 0

http://stackoverflow.com/q/26150277
tagged with: bootstrap-datepicker
type: UnansweredQuestion
has title: what is date && new Date(date) doing?
has comment: http://stackoverflow.com/comment/40992703
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40992821
type: Question
has answer: http://stackoverflow.com/a/26150342
tagged with: javascript
linked to: http://stackoverflow.com/q/12162157
has body: I ran across this in the bootstrap-datepicker.js file. In the _setDate function the author does this.viewDate = date &amp;&amp; new Date(date) They also do it a couple other times. What is this doing and why can't they just set this.viewDate = date or this.viewDate = new Date(date) https://github.com/eternicode/bootstrap-datepicker
linked to: http://stackoverflow.com/q/6970346
answer count: 1
downvote count: 0
duplicate of: http://stackoverflow.com/q/6970346
favorite count: 0

http://stackoverflow.com/a/26168918
has comment: http://stackoverflow.com/comment/41029423
has comment: http://stackoverflow.com/comment/41034271
upvote count: 2
type: Answer
score: 2
has body: i think the problem is come from "Access-Control-Allow-Origin". for more info of it you can check this: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS you can use something like this: $.ajax({ dataType: "jsonp", url: "http://forums.zybez.net/runescape-2007-prices/api/flax", success: function(e){console.log(e);} });
has comment: http://stackoverflow.com/comment/41029261
has comment: http://stackoverflow.com/comment/41097546
has comment: http://stackoverflow.com/comment/41029316
downvote count: 0
has comment: http://stackoverflow.com/comment/41035608
has comment: http://stackoverflow.com/comment/41028111
has comment: http://stackoverflow.com/comment/41029574
answers question: http://stackoverflow.com/q/26168804

http://stackoverflow.com/a/26053425
score: 14
downvote count: 0
has comment: http://stackoverflow.com/comment/40816663
has comment: http://stackoverflow.com/comment/40816624
has body: .fliph { display: inline-block; transform: scaleX(-1); /* Or also: rotateY(180deg) */ } ABBA
has comment: http://stackoverflow.com/comment/40816468
upvote count: 14
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26053343
type: Answer
accepted answer of: http://stackoverflow.com/q/26053343

http://stackoverflow.com/q/26125503
type: UnansweredQuestion
has title: Javascript stops when iPad is locked
has comment: http://stackoverflow.com/comment/42318901
has comment: http://stackoverflow.com/comment/40953093
answer count: 0
has comment: http://stackoverflow.com/comment/40952971
has body: I have a site which I've saved to my Home screen on the iPad. When I open it, the site works fine and the full functionality can be used. However, when I lock the iPad then unlock it and go back to the site all ajax requests stop working. The ajax I'm using is pretty standard: $.ajax({ type: method, url: action, data: $(this).serialize(), error: function(error) { alert(error); }, success: function(json) { //do things } }); Is there any way around this? Refreshing the page doesn't work, and the problem doesn't occur when I load it directly in Safari, then lock and unlock. It's only when the site has been saved to the home screen.
has comment: http://stackoverflow.com/comment/40987318
linked to: http://stackoverflow.com/q/7747264
type: Question
has comment: http://stackoverflow.com/comment/40953372
tagged with: ios
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/40971958
has comment: http://stackoverflow.com/comment/40948677
has comment: http://stackoverflow.com/comment/40953121
has comment: http://stackoverflow.com/comment/40951862
tagged with: ipad

http://stackoverflow.com/q/26116988
tagged with: forms
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26117178
favorite count: 0
has comment: http://stackoverflow.com/comment/40931267
has comment: http://stackoverflow.com/comment/40931090
has title: How to retain dropdown selected value after postback javascript?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40931117
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40931234
upvote count: 1
has body: I have a form in my site. Fiddle is here I removed tag because it gives error without action. Here my issue is when I have full form with action, if I click the form its post back the page. Meanwhile the drop down menu show select an option : before the form is submitted when I select After form is submitted But I want the form should remain the values which is selected before the form is submitted. How can I do that?
has comment: http://stackoverflow.com/comment/40933140
score: 1
has answer: http://stackoverflow.com/a/26117087

http://stackoverflow.com/a/26063442
has body: Update!! You have a typo in the first line, succesMessage instead of successMessage. It's trying and failing to find an element with the ID succesMessage as a result.
downvote count: 0
answers question: http://stackoverflow.com/q/26063374
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/40834312
score: 2

http://stackoverflow.com/q/26111737
has answer: http://stackoverflow.com/a/26111753
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26111753
has body: If I do this in the console: foo = document.querySelectorAll('#authCreateAcctUsernameInput') Then an object like this is returned: foo [ ​] The html looks like this: Email Address Please enter a valid email address. And what I want to to get the content of the last element there ("Please enter a valid email address") so I tried this: $(foo).siblings('.errorMSG').textContent But that returned undefined. Same for .innerHTML and .value How would I grab the textContent of a sibling based on the class value of that sibling (so get the textContent of sibling with class errorMSG)?
type: AnsweredQuestion
has title: Get sibling by class attribute and then textContent
upvote count: 1
type: Question

http://stackoverflow.com/comment/41055900
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26184048
type: Comment
has text: this applies trim to all the text of anchor. What i want is to find the number of characters in all anchor's text and then truncate them.

http://stackoverflow.com/comment/63504940
score: 4
type: Comment
type: QuestionComment
has text: It can simply happen if you have used `class` in your html instead of `id` and you calling for a `getElementById` in your scripts.
comment on: http://stackoverflow.com/q/26107125

http://stackoverflow.com/comment/40886354
comment on: http://stackoverflow.com/a/26091790
has text: also, there are dynamic response messages for different kind of situations, so - I can not set var just static message...
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40991315
type: Comment
type: QuestionComment
has text: Can't reproduce: http://jsfiddle.net/tbn2mzar/ shows `true`.
comment on: http://stackoverflow.com/q/26149491
score: 3

http://stackoverflow.com/q/26142148
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40977627
tagged with: javascript
has comment: http://stackoverflow.com/comment/40977262
has answer: http://stackoverflow.com/a/26142379
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: regex
has comment: http://stackoverflow.com/comment/40977539
score: -1
has comment: http://stackoverflow.com/comment/40977524
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40977531
has title: Disable a caret (^) character in JavaScript using RegEx
has body: I am trying to create a "Register" form, where people can sign-up to use the service by providing their information such as First Name. I have created a regular expression, which I thought would exclude any character different than A-Z and . - ' symbols. The functionality has been achieved and users can't type in most special character in the First name field, except the caret (^) symbol. Could you please help me to modify my regex, so that it doesn't allow the users to type in a caret symbol? I have tried adding something like ^\^ and ^\\^, but these did not work. EDIT: I found a way to achieve this, I just added another line of code to the validate method that takes care purely of replacing the caret symbol. Thanks for your help! function validateInputFields(f) { !(/^[A-z ,.'-]+$/i).test(f.value) ? f.value = f.value.replace(/[^A-z,.'-]/ig, '') : null; f.value = f.value.replace(/\^/g, ""); } &lt;input tabindex=3 name="txtFirstName" type="text" id="txtFirstName" onkeyup="validateInputFields(this)" onblur="validateInputFields(this)"&gt;
has comment: http://stackoverflow.com/comment/40977565
downvote count: 1
type: Question
tagged with: caret
has comment: http://stackoverflow.com/comment/40977937

http://stackoverflow.com/comment/134272245
type: AnswerComment
type: Comment
has text: is there any way that some third-party js like Google one tap in our js and provide as Script to be embedded in some HTML Thanks
comment on: http://stackoverflow.com/a/26083721
score: 0

busboy
tags question: http://stackoverflow.com/q/26162633
type: Tag
tag name: busboy
tags question: http://stackoverflow.com/q/26150596

http://stackoverflow.com/a/26156242
score: 0
answers question: http://stackoverflow.com/q/26156139
type: Answer
has body: I suggest you to always initialize variables to check null or undefined values. In your case: var media0 = twitter.statuses[key].entities.media[0] || null; if(media0 != null){ if(media0.media_url != null) console.log(twitter.statuses[key].entities.media[0].media_url); else console.log('twitter.statuses[key].entities.media[0].media_url is null or not defined'); } else console.log('twitter.statuses[key].entities.media[0] is null or not defined');

http://stackoverflow.com/a/26157517
has comment: http://stackoverflow.com/comment/41013044
has body: Try with: var html = jQuery(data).find('#postloop').html(); jQuery('#postloop').html(html);
has comment: http://stackoverflow.com/comment/41008704
score: 0
has comment: http://stackoverflow.com/comment/41007709
has comment: http://stackoverflow.com/comment/41007804
answers question: http://stackoverflow.com/q/26156775
type: Answer

http://stackoverflow.com/comment/40991127
comment on: http://stackoverflow.com/a/26149428
score: 0
type: AnswerComment
type: Comment
has text: Sorry, I've mistyped.

http://stackoverflow.com/comment/40806441
score: 0
has text: and another person trying to up their comments, maybe I just have a simple sql file for now to test the function is all...
comment on: http://stackoverflow.com/q/26048351
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26167848
type: AnsweredQuestion
tagged with: javascript
type: Question
has answer: http://stackoverflow.com/a/26168148
answer count: 3
tagged with: canvas
tagged with: html5-canvas
tagged with: firefox
has title: Firefox can't draw an image with a data uri onto a canvas: NS_ERROR_NOT_AVAILABLE
possible better answer: http://stackoverflow.com/a/28839086
has body: I've got an SVG data uri successfully rendering to an img element in my page. In Chrome, using drawImage to draw the image onto a canvas works perfectly, but in FireFox, I get NS_ERROR_NOT_AVAILABLE. Here's a fiddle that works in Chrome but not Firefox. Click the button to trigger the copy. http://jsfiddle.net/YbA39/181/ Are there any workarounds or other ways to convince firefox to draw this image?
has answer: http://stackoverflow.com/a/26168447
accepted answer: http://stackoverflow.com/a/26168148
has answer: http://stackoverflow.com/a/28839086
favorite count: 0
score: 2
upvote count: 3
downvote count: 1

sql-server
tags question: http://stackoverflow.com/q/26096804
type: Tag
tag name: sql-server
tags question: http://stackoverflow.com/q/26061178

http://stackoverflow.com/q/26102513
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40905646
answer count: 1
has body: I am new to JS. So pardon my ignorance. I am trying to redirect my webpage to a different IP when a particular condition is satisfied and I am not able to achieve it using with JS. My code is: &lt;script&gt; if( isMobile.iOS() ) { &lt;!--ignore--&gt; } else if( isMobile.Android() ) { text = "&lt;a href="rtsp://a.b.c.d:1935/live/myStream1" id="player2"&gt; Redirecting &lt;/a&gt;"; } &lt;/script&gt; I used w3schools as reference! P.S- I tried the exact same format with just alert('IOS')/ alert('Android') and it worked with the mobiles and tablets I have. Thanks.
favorite count: 0
type: UnansweredQuestion
tagged with: android
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40905332
has answer: http://stackoverflow.com/a/26103083
has title: JS : href in if statement
upvote count: 1
has comment: http://stackoverflow.com/comment/40905716
downvote count: 1

http://stackoverflow.com/comment/43200734
has text: ok, this is a total hack, but you could use mongodb to do that. it supports native js evaluation and its bindings are up to date.
comment on: http://stackoverflow.com/q/26059804
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26097014
score: 0
has comment: http://stackoverflow.com/comment/40895358
answer count: 1
has body: Hi I need to resolve chained promise before my controller loads. According to: https://github.com/angular-ui/ui-router/wiki it should be possible. I have something like that: usersInit: function (Restangular) { return $.get(Restangular.configuration.baseUrl+"/users?limit=1").then(function(data){ var total = data.total; return Restangular.all('users').getList({page: 1, limit: total}); }) } And almost everything seems to be fine, I get all records via restangular (which is what I'm trying to achive, because my default restangular setting returns 20 records) but the object returned by return Restangular.all('users').getList is not resolved in my controller. Any suggestions what's wrong? Or maybe any other way to get it working without chaining promises. I cannot use hardcoded high limit because in theory I can have even larger number of records.
tagged with: angularjs
type: UnansweredQuestion
tagged with: restangular
has answer: http://stackoverflow.com/a/27356131
type: Question
has title: angular ui-router resolve not resolving chained promise
tagged with: javascript

http://stackoverflow.com/a/27425632
downvote count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/44154013
has body: I have a solution: Disable all inputs Enable the input you wish to focus Set the focus to that input Re-enable all the other inputs
type: Answer
answers question: http://stackoverflow.com/q/26146252

http://stackoverflow.com/comment/40988588
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26148014
score: 0
has text: From the Bootstrap website: "On Windows, we support Internet Explorer 8-11". and "Unofficially, Bootstrap should look and behave well enough in ... Internet Explorer 7, though they are not officially supported". -- http://getbootstrap.com/getting-started/#support So forget about IE6, and forget about any official support for IE7.

http://stackoverflow.com/comment/40844187
has text: I think generally, when writing polyfills, it is recommended to not rely on browser detection, but rather feature detection. Check to see if the "native" functions that you are relying on in your newly defined functions exist in the browser, and then branch out your code based on the results of the checks.
score: 2
comment on: http://stackoverflow.com/q/26068850
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26301301
type: Answer
answers question: http://stackoverflow.com/q/26138722
score: 0
has body: Outside of fixing the bug in your local copy of AngularStrap you can create a directive to wrap the DatePicker directive. I grabbed the plunker from angular-strap and wrote a decorator directive to always return 0:00 time for all situations. This is nice because you can write all the custom logic you need inside a directive. Notice - this directive creates a watch on the model and then performs any modifications needed post update and returns it to your app's controller via callback. Note: I also switched to moment.js for ease of use. Plunker HTML: &lt;date-wrapper&gt;&lt;/date-wrapper&gt; Directive: app.directive('dateWrapper', function($compile) { return { restrict:'AE', link:function(scope, element, attrs, ctrl) { var html = '&lt;input type="text" class="form-control" name="date" ng-model="selectedDate" bs-datepicker&gt;'; var e = $compile(html)(scope); element.replaceWith(e); scope.$watch('selectedDate', function(date) { var updatedDate = moment.utc(date).hour(0).minute(0).second(0).format("YYYY-MM-DDTHH:mm:ss Z"); scope.dateChanged(updatedDate); }); } } }); Apps controller example: // call back for updated date $scope.dateChanged = function(date) { $scope.selectedZeroHourUtcDate = date; };

http://stackoverflow.com/comment/41097480
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26173044
type: Comment
has text: @SnareChops yes with all the browsers.

http://stackoverflow.com/comment/52892014
comment on: http://stackoverflow.com/a/26106159
has text: Hi @ChristopherGaston that is my personnal testing server. If you don't want to buy one, you could install a local server on your computer easily, using WAMP for Windows, or MAMP for Mac. Then, you'll be able to access your files via ˋhttp://localhost/your_files`.
score: 0
type: AnswerComment
type: Comment

radiobuttonlist
tags question: http://stackoverflow.com/q/26147838
type: Tag
tag name: radiobuttonlist

http://stackoverflow.com/comment/40843927
comment on: http://stackoverflow.com/q/26068744
type: Comment
type: QuestionComment
score: 1
has text: Not your problem here but this would generate multiple instances of `#TheDivWhoCalls`. Element ids should be uinique on the page

http://stackoverflow.com/comment/40905071
type: QuestionComment
score: 1
has text: Can you setup a Fiddle here? http://www.jsfiddle.net?
type: Comment
comment on: http://stackoverflow.com/q/26102427

http://stackoverflow.com/q/26124321
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40948968
has title: Handlebars.js breaking JQuery Mobile formatting?
has comment: http://stackoverflow.com/comment/40948597
has comment: http://stackoverflow.com/comment/40947508
tagged with: css
has body: I'm having a problem with showing JQuery Mobile icon buttons on a listview using a Handlebars template: the buttons' icons won't display. Everything works fine otherwise, the template generates the list, but the buttons' icons aren't displayed. The buttons do work when clicked, and if I add some character between the tags it displays properly and works when clicked. If I simply copy/paste the content of the template into the HTML document, the icon displays fine. It's only when being generated by the template that it doesn't display. I'm using jquery mobile 1.4.2 and Handlebars 2.0. EDIT: JSFiddle at http://jsfiddle.net/6x9s9ys4/ This is the HTML: This is the template: And this is the JS: $('#audioList').empty(); var audioListHandler = Handlebars.compile($("#audioList-template").html()); $('#audioList').html(audioListHandler(audioList)); $('#audioList').listview().listview('refresh'); Thanks in advance.
has comment: http://stackoverflow.com/comment/40948756
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40948063
type: Question
has comment: http://stackoverflow.com/comment/40947140
has comment: http://stackoverflow.com/comment/40946408
has comment: http://stackoverflow.com/comment/40946775
score: 0

http://stackoverflow.com/q/26188152
downvote count: 0
has answer: http://stackoverflow.com/a/26188895
score: 1
has title: Shopify Quantity dropdown that fits to stock
type: Question
has answer: http://stackoverflow.com/a/31688178
answer count: 2
upvote count: 1
tagged with: shopify
has body: I have a shopify store. How do I match the quantity dropdown to match the actual quantity in stock. For example, if there are 3 items, the quantity dropdown should have a max value of 3. If there are 5 items, then the max value should be 5. Thanks, Alex
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: liquid

http://stackoverflow.com/comment/40837996
type: AnswerComment
comment on: http://stackoverflow.com/a/26065218
score: 0
type: Comment
has text: I HAVE UPDATED THE CODE CHECK AND LET ME KNOW

http://stackoverflow.com/q/26104048
has comment: http://stackoverflow.com/comment/40909884
answer count: 1
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40911632
has answer: http://stackoverflow.com/a/26106008
has comment: http://stackoverflow.com/comment/40908239
has comment: http://stackoverflow.com/comment/40911372
type: Question
has body: I have some code in a Chrome extension that's successfully using the then() from the xhr response of $.ajax. if (request &amp;&amp; request.action === "updateTask") { $.ajax({ type: "PUT", url: config.updateTaskApiUrl(storage.apiKey(), request.calendarEntryId), data: request.data, dataType: "json" }).then(function(data) { sendResponse(data); }); } however, I now deleting a record and did the same: if (request &amp;&amp; request.action === "deleteTask") { $.ajax({ type: "DELETE", url: config.updateTaskApiUrl(storage.apiKey(), request.calendarEntryId), dataType: "json" }).then(function(data) { debugger sendResponse(data); }); } The debugger line above never gets hit. I've tried done() and putting the success: function() {} as a key in the call too. The response from the API is returning a 200. Any idea why it never hits the then()?
tagged with: javascript
has title: jQuery $.ajax DELETE not hitting then()
score: 0

http://stackoverflow.com/q/26126269
has comment: http://stackoverflow.com/comment/40948388
has answer: http://stackoverflow.com/a/26126834
has answer: http://stackoverflow.com/a/26129808
tagged with: toggleclass
tagged with: javascript
tagged with: jquery
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/40948546
has comment: http://stackoverflow.com/comment/40948448
has comment: http://stackoverflow.com/comment/40948878
upvote count: 2
score: 0
has comment: http://stackoverflow.com/comment/40948432
answer count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/40949057
has body: I've got a problem with switching between element classes - probably sth stupid, but I couldn't find the answer. In my system I display a list of items. Now I want to be able to promote items, so that they appear at the top of the list. I created some backend infrastructure which works ok and added things to my frontend: a star (a span with star bg) next to every item's title and a jQuery script which is supposed to: listen to 'click' event - when I click on a star get some data- attributes from the span post them to my controller the controller checks if I'm allowed to promote items and replies 'true' or 'false' if 'true' then I switch between 'gold-star' and 'silver-star' classes of the item For some reason the classes don't switch - only when I refresh the page I can see the effect. I tried debugging with Firebug - it gets to the toggle line, but then nothing happens. Here's the code: &lt;span class="silver-star promote"&gt; $(".promote").bind("click", function() { var $this = $(this); var itemId = $this.attr("data-id"), isPromoted = true; if ($this.hasClass("gold-star")) { isPromoted = false; } $.post('/promoteitems', { itemId: itemId, isPromoted: isPromoted }, function(allowPromotion) { if (allowPromotion == true) { $this.toggleClass("silver-star").toggleClass("gold-star"); } }); }); Thanks in advance!
has comment: http://stackoverflow.com/comment/40948659
has title: Cannot switch between classes with jQuery
has comment: http://stackoverflow.com/comment/40949696
type: UnansweredQuestion

http://stackoverflow.com/q/26123975
tagged with: javascript
score: 2
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has title: Woocommerce-Change product title in cart
tagged with: php
has body: I'd like to sell domain names, my products named with its extensions (.uk, fr ...). When the user checks the validity of this dn, he can add it to the cart with the "add_to_cart_button" button. I'd like to retrieve the field entered by the user in my cart. Is it possible to change the name of the product by adding dn before the extension and this just in the basket or by adding an attribute to my products? Here is my code: JS: [...] var dom =domaine.replace(/\.[^\\.]+$/,''); //Domain name without extension [...] ' Add To Cart ' [...]
answer count: 0
tagged with: woocommerce
upvote count: 2
tagged with: wordpress
type: Question

http://stackoverflow.com/a/26111323
answers question: http://stackoverflow.com/q/26107027
has comment: http://stackoverflow.com/comment/89066562
type: AcceptedAnswer
score: 28
upvote count: 30
type: Answer
accepted answer of: http://stackoverflow.com/q/26107027
downvote count: 2
has comment: http://stackoverflow.com/comment/130287060
has body: There's no call similar to beforeEach or before that does what you want. But it is not needed because you can do it this way: function makeSuite(name, tests) { describe(name, function () { before(function () { console.log("shared before"); }); tests(); after(function () { console.log("shared after"); }); }); } makeSuite('Suite one', function(){ it('S1 Test one', function(done){ done(); }); it('S1 Test two', function(done){ done(); }); }); makeSuite('Suite two', function(){ it('S2 Test one', function(done){ done(); }); });
has comment: http://stackoverflow.com/comment/95344239
has comment: http://stackoverflow.com/comment/123036958

http://stackoverflow.com/comment/40935914
comment on: http://stackoverflow.com/a/26109773
type: AnswerComment
score: 1
has text: There isn't a way for this binding to know when the component has loaded. Instead, you'd have to include the fade-in logic within the component template or pre-load the components.
type: Comment

http://stackoverflow.com/comment/40908553
has text: @markE : I thought this would have been one of the few next steps, but yes, why not mentioning this now ? : i updated my post, thanks.
type: AnswerComment
comment on: http://stackoverflow.com/a/26102952
score: 0
type: Comment

http://stackoverflow.com/q/26071538
score: 0
has comment: http://stackoverflow.com/comment/40849588
answer count: 1
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/26071555
has title: Get form data after POST with .ajax()
type: Question
has body: After submitting a form via ajax, I want to get the data that I passed into the form and put it in a JS variable. &lt;form&gt; &lt;input type="text" /&gt; &lt;input type="submit" value="Submit" /&gt; &lt;/form&gt; $("#form").submit(function(event) { var form = $(this); $.ajax({ type: 'POST', url: form.attr('action'), data: form.serialize(), success: function(data) { alert(data); } }); event.preventDefault(); // avoid to execute the actual submit of the form. }); So how do I get the data (e.g. what the person posted into input) processed via POST and put it in a JS variable? NOTE: I do NOT want to get the input via input.val(), It MUST be the data submitted into the databse.
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26104004
type: Question
has answer: http://stackoverflow.com/a/26106416
accepted answer: http://stackoverflow.com/a/26106416
downvote count: 0
has answer: http://stackoverflow.com/a/26104287
has body: I have a Genome class that contains an array of bits ("genes"), and I would like to implement different mutation methods to change the genes. I'm currently implementing the mutation method using a Strategy Pattern, but the mutation method changes the Genome class directly. Is this consider breaking encapsulation if I pass in the genes array into the Strategy and it modifies the array directly (naiveMutationStrategy)? I was reading some arguments that the Strategy pattern should not modify the state of the context calling it? What if I directly passed in the Genome class (naiveMutationStrategy2) - I assume this is a no-no since the strategy pattern shouldn't store a reference to the context object? function Genome(genes, mutationStrategy) { this.genes = genes; //an array this.mutationStrategy = mutationStategy; } Genome.prototype.mutate = function() { this.mutationStategy.execute(this.genes); } function naiveMutationStrategy() {}; //converts '1' into '0' and vice versa mStrategy.prototype.execute = function(genes) { _.each(genes, function(element) { if (element === '0') { element = '1' } else element = '0'; }); }; function naiveMutationStrategy2() {}; //converts '1' into '0' and vice versa naiveMutationStrategy2.prototype.execute = function(genome) { _.each(genome.genes, function(element) { if (element === '0') { element = '1' } else element = '0'; }); };
tagged with: javascript
answer count: 2
upvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40908214
possible better answer: http://stackoverflow.com/a/26104287
tagged with: design-patterns
type: AnsweredQuestion
has title: Implementing strategy pattern when we need to modify the context class
score: 1
tagged with: strategy-pattern

http://stackoverflow.com/a/26105688
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26105014
score: 1
has body: (1) It's best to handle setting default values after a proper sanity check on the type(s) of value(s) passed: var Constr = function (conf) { if (!!conf &amp;&amp; !(conf instanceof Object)) { throw new Error('An invalid parameter was passed to Constr.'); } if (!conf) { // Prevent "Can't read property 'name' of undefined." conf = {}; } this.name = conf.name || null; // Set defaults this way. }; (2) You'll want to use Object.create() and Object.apply() to get this right: var Person = function (param1, param2) { this.param1 = param1; this.param2 = param2; } Person.prototype.cough = function () { // Do stuff. } var Student = function (param1, param2, paramN) { Person.call(this, param1, param2); this.paramN = paramN; // Define a new property on the subclass } // Invoke the superclass to have the subclass inherit properties and methods. Student.prototype = Object.create(Person.prototype); Student.prototype.constructor = Student;

http://stackoverflow.com/comment/40979882
type: QuestionComment
comment on: http://stackoverflow.com/q/26143508
score: 0
has text: what you want to do?
type: Comment

http://stackoverflow.com/q/26165455
possible better answer: http://stackoverflow.com/a/26165532
answer count: 4
has answer: http://stackoverflow.com/a/26165532
score: 2
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/41021068
has answer: http://stackoverflow.com/a/26165799
has answer: http://stackoverflow.com/a/26165602
type: Question
downvote count: 0
has answer: http://stackoverflow.com/a/26165498
tagged with: javascript
favorite count: 0
has body: This is what I came up with but it doesn't work. I don't get an output. Javascript.js function randomnamegen() { var names = ["Mango", "Pul", "Bat", "Tim", "Mh", "Hei"]; var namein = names(Math.floor((Math.random() * 5) + 0)); document.getElementById("name").innerHTML = namein; } index.html Cherry Cheese Danish Click Me! I get an Uncaught TypeError: object is not a function JavaScript.js:3 in google chrome console.
accepted answer: http://stackoverflow.com/a/26165498
has title: How to get random value from an array?

http://stackoverflow.com/comment/127720036
comment on: http://stackoverflow.com/a/63198971
score: 1
has text: Note that this answer doesn't correctly convert negative decimal numbers to binary as represented in memory. If that's important to you see @Gepser Hoil's answer.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41064854
has text: I have jQuery set up, and I pasted this onto the page, but it's still not working..hmm..
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26188909

http://stackoverflow.com/q/26126690
tagged with: javascript
tagged with: jquery
score: 0
has title: "not well-formed" when processing $.get() request
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/40978355
has comment: http://stackoverflow.com/comment/40950158
linked to: http://stackoverflow.com/q/1828228
type: Question
has comment: http://stackoverflow.com/comment/40952318
has body: I've continued to get a "not well formed" error when processing the response to this request. function getFilterValues() { $.get("/get_IrTempFilt?id=" + Math.random(),function(responseText,status){ var splitstring = responseText.split("~"); document.getElementById("FilterOn").innerHTML = "&lt;div&gt;" + splitstring[0] + "&lt;/div&gt;"; document.getElementById("currentVal").innerHTML ="&lt;div&gt;" + splitstring[1] + "&lt;/div&gt;"; document.getElementById("value0out").innerHTML = "&lt;div&gt;" + splitstring[2] + "&lt;/div&gt;"; document.getElementById("value1out").innerHTML = "&lt;div&gt;" + splitstring[3] + "&lt;/div&gt;"; },"text"); } The response is plain text which looks like this: false~0~0~0 I took a hint from this question, which clued me in to specifying the dataType, and was able to figure out the syntax specific to $.get() from w3schools but the problem remains. Perhaps there is some nuance specific to this scenario that I have not figured out.
has comment: http://stackoverflow.com/comment/40952551

http://stackoverflow.com/comment/40874847
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26081019
has text: @Inazuma, I edited my answer to include a Javascript solution, using jQuery.

module
tags question: http://stackoverflow.com/q/26090091
tags question: http://stackoverflow.com/q/26161240
type: Tag
tags question: http://stackoverflow.com/q/26068346
tag name: module
tags question: http://stackoverflow.com/q/26061120

http://stackoverflow.com/a/26168849
has comment: http://stackoverflow.com/comment/41031006
has comment: http://stackoverflow.com/comment/41093565
downvote count: 0
has body: Put the stuff you don't want to update to an abstract parent state, roughly like this: { 'app': { abstract: true, controller: 'AppCtrl', template: '&lt;div ui-view&gt;&lt;/div&gt;', }, 'app.clients': { url: '/clients', abstract: true, views: { '': { templateUrl: 'stage.html', //has named list and detail views controller: 'ClientsCtrl' }, 'list@app.clients': { templateUrl: 'client-list.html', controller: 'ClientListCtrl' } } }, 'app.clients.detail': { url: '/:id', views: { 'detail@app.clients': { templateUrl: 'client-profile.html', controller: 'ClientProfileCtrl' } } } }
score: 1
accepted answer of: http://stackoverflow.com/q/26168093
has comment: http://stackoverflow.com/comment/41064831
answers question: http://stackoverflow.com/q/26168093
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41067944
type: Answer

http://stackoverflow.com/comment/40964391
type: AnswerComment
score: 0
has text: This totally works for couple fo reasons...1: I dont have to hard code the values like Tj is doing..2: its sclable becuse the category array can grow and so the number of platforms...so basically it is very dynamic..thanks for the direction..really appriciate it
type: Comment
comment on: http://stackoverflow.com/a/26131349

http://stackoverflow.com/a/26132566
has body: Without any more information about frameworks used, etc., try using sessions In the final form processing page, do something like: $_SESSION['form_finished'] = true; To "make a note" that this person has finished the form. In the final "submitted" page, ensure that the person has finished the form with something like: if (!isset($_SESSION['form_finished'])) { // Redirect to error page, display error message, etc }
answers question: http://stackoverflow.com/q/26132525
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40960390
type: Answer
downvote count: 0

http://stackoverflow.com/q/26059618
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40828052
score: 0
has body: I have a foreach binding, and in my data I have an observable called Level. How could I store the $index value in my Level observable? I would need it because the array goes to a server-side script, and Icannot expect that the order will be preserved at the end. I've been googling for a while now but haven't found any related answer yet
has answer: http://stackoverflow.com/a/26061612
accepted answer: http://stackoverflow.com/a/26061612
type: AnsweredQuestion
has title: How to "bind" (store) the $index observable to my observable?
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/40832555

http://stackoverflow.com/comment/41004865
comment on: http://stackoverflow.com/q/26156775
type: QuestionComment
has text: yes. removing all code inside the callback will make the error go away. Keeping this line, and browser becomes unresponsive: jQuery('#postloop').replaceWith( jQuery(data).find('#postloop') );
score: 0
type: Comment

http://stackoverflow.com/comment/40823298
type: QuestionComment
comment on: http://stackoverflow.com/q/26057919
has text: possible duplicate of [How to remove the hash from window.location with JavaScript without page refresh?](http://stackoverflow.com/questions/1397329/how-to-remove-the-hash-from-window-location-with-javascript-without-page-refresh)
score: 0
type: Comment

http://stackoverflow.com/comment/41024272
score: 0
has text: well, I have tried $broadcasting from your `generateError()` function - and that works while emitting does not (as expected based on what I write in my answer). Right now, I'm trying to figure out why broadcasting from your exception handler does not work :)
type: AnswerComment
comment on: http://stackoverflow.com/a/26166924
type: Comment

http://stackoverflow.com/q/26101200
score: 0
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: ibm-mobilefirst
accepted answer: http://stackoverflow.com/a/26104195
type: AnsweredQuestion
has title: IBM Worklight V6.1 jquery mobile v1.4.3 change dynamic content, wait for DOM
tagged with: javascript
has answer: http://stackoverflow.com/a/26104195
type: Question
has body: I want to change dynamically the content of a div. My html page looks somehow like this ... //Image in wlCommonInit() I call this: $("#pagePort").load("page2.html", function(){ }); and nothing happen but if I include a timeout it works fine. So my intuition is that I have to wait for the div to be ready? But on which event can I wait to call the .load() statement?

http://stackoverflow.com/q/26167838
score: 0
has body: I want to make a rectangular move by click on a button and stop it clicking on the same button. Here is a part of my code: document.getElementById("startStop").addEventListener("click", changePlace); function changePlace() { nIntervMove = setInterval(movement, 100); }; var tmp1 = 0; function movement() { var oElem = document.getElementById("colorRectangular"); oElem.getPropertyValue = tmp1; tmp1 += "10px"; }; function stopMove(){ clearInterval(nIntervMove); };
answer count: 1
has comment: http://stackoverflow.com/comment/41025374
has answer: http://stackoverflow.com/a/26167945
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26167945
type: Question
has comment: http://stackoverflow.com/comment/41025410
has title: Can't move an object using setInterval function
tagged with: javascript

http://stackoverflow.com/a/26107096
type: Answer
answers question: http://stackoverflow.com/q/26106474
has body: getElementsByClassName() returns an array. Following code will give you the img DOM element: var liArray = document.getElementsByClassName("activeslide"); var imgArray = liArray[0].getElementsByTagName("img"); var img = imgArray[0];
score: 0

http://stackoverflow.com/comment/40900590
type: Comment
has text: The query should be parameterized. Never build a SQL statement string by concatenating user input even if an attempt is made to sanitized the value. Consider if the result of the value is "NULL;DROP TABLE Users;--"
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26096941

http://stackoverflow.com/comment/40994234
has text: chrome return by console.log Wed Oct 01 2014 14:09:11 GMT+0200 (CEST), firefox return Invalid Date why?? And if i use typeof all browser return Undefined
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26150735
type: QuestionComment

http://stackoverflow.com/q/26183258
type: Question
tagged with: http://stackoverflow.com/tag/xml
has title: How to make JSONIX tolerate extra XML elements on deserialization?
score: 0
has body: I'm using JSONIX 2.0.12 and it's awesome. I have a large XML file for which I only care to deserialize a subset of elements to JSON. When I leave some elements out of my mapping file, jsonix complains with an unexpected element error when deserializing. Is there a way to have jsonix only pay attention to elements declared in my mapping and ignore the rest of the xml?
answer count: 1
has answer: http://stackoverflow.com/a/26233248
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
type: UnansweredQuestion
tagged with: jsonix

http://stackoverflow.com/comment/40823192
has text: This is not exactly an XML question. You're trying to escape a string for JavaScript. You can use `json_encode()` for that.
score: 0
comment on: http://stackoverflow.com/q/26056714
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40793618
comment on: http://stackoverflow.com/q/26041060
score: 0
type: Comment
type: QuestionComment
has text: @NicolasMalbran and AlexG post updated

http://stackoverflow.com/tag/csv
type: Tag
tag name: csv
tags question: http://stackoverflow.com/q/26076023
tags question: http://stackoverflow.com/q/26056540
tags question: http://stackoverflow.com/q/26064802
tags question: http://stackoverflow.com/q/26111455
tags question: http://stackoverflow.com/q/26103180
tags question: http://stackoverflow.com/q/26068585
tags question: http://stackoverflow.com/q/26150336
tags question: http://stackoverflow.com/q/26093450

http://stackoverflow.com/a/26098957
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26098468
answers question: http://stackoverflow.com/q/26098468
has body: you can use the mouseleave to do the hiding and let the mouseenter do the showing similar to you are doing now // Tooltip stuff after this .on("mouseover", function (d) { div.transition() .duration(200) .style("opacity", 0); div.transition() .duration(200) .style("opacity", .9); div.html(formatTime(d.date) + "&lt;BR&gt;" + d.open) .style("left", (event.pageX) + "px") .style("top", (event.pageY) + "px"); }).on("mouseleave", function (d) { div.transition() .duration(200) .style("opacity", 0); }); fiddle http://fiddle.jshell.net/leighking2/277yknrs/
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40976626
comment on: http://stackoverflow.com/q/26126796
type: Comment
type: QuestionComment
has text: I'll try it out when i get home :D
score: 0

http://stackoverflow.com/q/26132624
has comment: http://stackoverflow.com/comment/40994509
has comment: http://stackoverflow.com/comment/40960525
tagged with: history.js
linked to: http://stackoverflow.com/q/8231366
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40960811
has comment: http://stackoverflow.com/comment/40982866
has answer: http://stackoverflow.com/a/26152917
type: Question
has body: I have a Ajax site that works with jQuery and History.js, when a link is clicked I execute this: var $this = $(this), // $(this) is the link url = $this.attr('href'), title = $this.attr('title') || null; History.pushState(null, title, url); event.preventDefault(); Then I look the statechange for make the ajax call and change the page content: $(window).bind('statechange', function () { var State = History.getState(), url = State.url $.ajax({ url: url, success: function (data, textStatus, jqXHR) { // I change the content etc etc } }); But the Referrer header is always the URL which is being requested, so for example, I click a a link with href "/test" on my page "/home", then the code will send the ajax call to /test, but in that request it send as referrer the same "/test" and no "/home". I trie to make the ajax call after the pushState, and it work fine it sends the referrer fine, but the back button just stop working, it change the url but not the content so, i need to look for statechange again. What can I do? Sorry for my english and thanks!
tagged with: javascript
has comment: http://stackoverflow.com/comment/40994645
score: 0
accepted answer: http://stackoverflow.com/a/26152917
answer count: 1
tagged with: jquery
has title: Ajax and History.js sends wrong referrer
tagged with: ajax

http://stackoverflow.com/q/26118776
type: UnansweredQuestion
has title: Transform multidimensional array by x value
has body: If I have a large multidimensional array (matrix), how can rearange the elements so that I have "y" values as the new "x" values in the array? Hard to explain so let me give you an example. I want the below array. [ [[0][1][2][3]], [[4][5][6][7]], [[8][9][10][11]], [[12][13][14][15]], ] to be transformed into the below array [ [[0][4][8][12]], [[1][5][9][13]], [[2][6][10][14]], [[3][7][11][15]], ] for (var i = 0; i &lt; tablesOfData.length; i++) { for (var j = 0; j &lt; tablesOfData[i].length; j++) { //Transform the array } }
type: Question
has answer: http://stackoverflow.com/a/26119084
has comment: http://stackoverflow.com/comment/40934281
duplicate of: http://stackoverflow.com/q/17428587
tagged with: arrays
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40934181
score: 0
has comment: http://stackoverflow.com/comment/40934617
linked to: http://stackoverflow.com/q/17428587

http://stackoverflow.com/a/26173893
downvote count: 0
answers question: http://stackoverflow.com/q/26173869
has body: You can get all the jQuery versions CDN from here. And add this to your HTML inside &lt;script&gt; tags.
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/26119027
tagged with: google-chrome-extension
favorite count: 0
accepted answer: http://stackoverflow.com/a/26120065
has body: I would like to stop the page loading when I click the extension icon. I have a background page , I need an option similar to window.stop() when I click the extension Icon. If the main page is still in loading condition stop loading and load the content JavaScript of extension should work.
has comment: http://stackoverflow.com/comment/40946210
type: AnsweredQuestion
score: 7
upvote count: 7
type: Question
answer count: 2
has title: chrome extension : Stop loading the page on launch
has answer: http://stackoverflow.com/a/26120065
downvote count: 0
possible better answer: http://stackoverflow.com/a/78864949
tagged with: javascript
has answer: http://stackoverflow.com/a/78864949

http://stackoverflow.com/comment/40937939
comment on: http://stackoverflow.com/q/26120772
score: 0
type: Comment
type: QuestionComment
has text: it's under External Resources @AK2

http://stackoverflow.com/comment/40867612
type: Comment
has text: or this should work better "NOT IN (' " + ID.join(" ',' ") + " ')" that will put a single quote around each one I think that is probably what the problem is. just remove the spaces I only put them in so you can see the single quotes.
comment on: http://stackoverflow.com/a/26081372
type: AnswerComment
score: 0

http://stackoverflow.com/a/26078431
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26078424
upvote count: 5
accepted answer of: http://stackoverflow.com/q/26078424
type: Answer
has comment: http://stackoverflow.com/comment/40862060
has comment: http://stackoverflow.com/comment/40861821
has comment: http://stackoverflow.com/comment/40863721
has comment: http://stackoverflow.com/comment/40862092
has body: if (sleepCheck &gt;= 8) should be if (numHours &gt;= 8)
score: 3
has comment: http://stackoverflow.com/comment/40882637
has comment: http://stackoverflow.com/comment/40882588
downvote count: 2

http://stackoverflow.com/a/26096417
upvote count: 15
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/131455528
accepted answer of: http://stackoverflow.com/q/26057017
has body: I found the answer to stop pace.js on page load and here I'm posting this for other users. Here's the code of js calling. In this i'm setting pace to given selector and another option startOnPageLoad set to false to avoid loading pace on every page load. And here is the another question on pace.js which provide me a help. Using pace.js on loading appended images
answers question: http://stackoverflow.com/q/26057017
type: Answer
score: 15

http://stackoverflow.com/a/43038439
type: Answer
answers question: http://stackoverflow.com/q/26187370
upvote count: 5
has body: If you need to use event.relatedTarget in you dynamically opened modal then you can pass the target as a second argument in the modal function. $("#curCarSelect").on('click', function(e) { $("#curCarModal").modal('toggle', $("#curCarSelect")); });
score: 5
downvote count: 0

http://stackoverflow.com/comment/41034730
type: AnswerComment
type: Comment
has text: That's it. I knew it had to be something simple. Thanks!
comment on: http://stackoverflow.com/a/26172856
score: 0

http://stackoverflow.com/q/26056688
type: UnansweredQuestion
has body: okay i have this code How can I make i so when the user jois the chat, it shows the 5 latest messages on the chat? i tried looping but i can't figure out what/where to loop basically, i'd like it to show the latest messages on the chat when they join so they know what the users are talking about, etc.
has answer: http://stackoverflow.com/a/26057092
has title: get past messages from websocket
downvote count: 0
tagged with: websocket
score: 1
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41047310
has comment: http://stackoverflow.com/comment/40824196
linked to: http://stackoverflow.com/q/17359871
upvote count: 1
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26142119
has comment: http://stackoverflow.com/comment/40977960
type: Question
has comment: http://stackoverflow.com/comment/40978240
has comment: http://stackoverflow.com/comment/40977116
has comment: http://stackoverflow.com/comment/40977205
has comment: http://stackoverflow.com/comment/40977140
tagged with: javascript
has comment: http://stackoverflow.com/comment/40978634
has title: What is the best way to use javascript setInterval with long interval?
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40977391
has comment: http://stackoverflow.com/comment/40978319
answer count: 0
has comment: http://stackoverflow.com/comment/40977218
type: UnansweredQuestion
upvote count: 1
has body: I have to update my list every 10 minutes, making an ajax call to the server, so wrote my code like this: setInterval(function(){listRefresh();},600000); I am thinking that the mobile device maybe wastes resources and that maybe there's a better way to do it. Any advice?

http://stackoverflow.com/comment/41022714
type: Comment
comment on: http://stackoverflow.com/a/26158099
has text: Thank you for your help. But how can I align the four thumbnails under each other now when I don't have the list? (I had css that put the images under each other vertically).
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41062244
type: AnswerComment
score: 0
has text: Ahhh. It always something. Good to hear.
type: Comment
comment on: http://stackoverflow.com/a/26161797

http://stackoverflow.com/q/26105469
favorite count: 0
has comment: http://stackoverflow.com/comment/40923329
has comment: http://stackoverflow.com/comment/40915080
has comment: http://stackoverflow.com/comment/40910718
answer count: 0
has comment: http://stackoverflow.com/comment/40914816
has title: JSON parsing in IE11
type: UnansweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/40943243
score: 1
tagged with: http://stackoverflow.com/tag/json
has body: I'm trying to loop through a JSON object to build connected dropdowns dynamically (year, make, model, vehicle type.) In FF and Chrome, it works great. In IE11, it does not. It doesn't even look like the same object. The process works like this: do an Ajax call to get the list of model years, makes for the selected year, models for the selected makes, and vehicle types for the selected models. Return that as a JSON string with (among other bits of data) the number of vehicles found matching the criteria. That all works a treat. Then, iterate through the year, make, make, and type lists to populate the dropdowns. This is where it falls down. data = arrTemp[1].evalJSON(); // arrTemp[1] contains the return string // arrControls is an associative array listing the dropdowns // and their default values, labels, etc. for(var ckey in arrControls){ if(arrControls.hasOwnProperty(ckey)){ // cKey is the id of the control, and also the key // for that element of the array. Off of that are // properties like "fieldname", "caption" // e.g. // tmpControls['yearFrom'] = []; // tmpControls['yearFrom']['fieldname'] = "@YearFrom"; // tmpControls['yearFrom']['caption'] = "-- Model Year"; // tmpControls['yearFrom']['reselect'] = selYear; curControl = arrControls[ckey]; fieldname = curControl['fieldname']; caption = curControl['caption']; // "data" is the JSON object currentPiece = data[fieldname]; // get the data for this particular object /* // this bit is all just fine in all browsers console.log("ckey: " + ckey); console.log("caption: " + caption); console.log("currentPiece: " + currentPiece); // shows up in FF as [object object][object object]...etc etc etc */ C = $(ckey) // get the control we plan to populate // the next line works in all browsers, so I know I'm correctly referencign the controls. C.style.border = "1px solid red"; C.options.length = 0; opt = document.createElement("option"); opt.text = caption; opt.value = ""; C.options.add(opt); // we're good up to here. All this w…
type: Question
upvote count: 1
has comment: http://stackoverflow.com/comment/40910605
tagged with: javascript
has comment: http://stackoverflow.com/comment/40914828

http://stackoverflow.com/comment/40941275
score: 0
has text: Sounds neat. I am currently using Asterius' answer. I wasn't able to use angular-js to set the value attribute for the filter. I will also be interested to see how it compares for performance.
type: Comment
comment on: http://stackoverflow.com/a/26120735
type: AnswerComment

http://stackoverflow.com/q/26127192
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26128224
upvote count: 21
has answer: http://stackoverflow.com/a/63198971
linked to: http://stackoverflow.com/q/9939760
has answer: http://stackoverflow.com/a/71735923
has body: It is possible to convert binary to decimal by this: var binary = "110"; var int = parseInt(binary, 2); document.getElementById("results").innerHTML = int; &lt;div id="results"&gt;&lt;/div&gt; But, how I can do an opposite operation: converting int to binary?
has title: How to convert decimal to binary in JS?
has answer: http://stackoverflow.com/a/70961870
type: Question
tagged with: decimal
has comment: http://stackoverflow.com/comment/40950257
downvote count: 0
answer count: 7
tagged with: javascript
has answer: http://stackoverflow.com/a/26127393
favorite count: 0
tagged with: converters
has comment: http://stackoverflow.com/comment/40950701
score: 21
has answer: http://stackoverflow.com/a/72046802
tagged with: binary
has answer: http://stackoverflow.com/a/77975272
has comment: http://stackoverflow.com/comment/40950363

http://stackoverflow.com/a/26105821
accepted answer of: http://stackoverflow.com/q/26056689
type: Answer
has body: Follows the final result working fine. var longContentChecked = null; var longContentIndex = null; scope.isLongContent = function(idx){ return longContentChecked && (longContentIndex == idx); }; scope.adaptLongContent = function(e, idx){ var textarea = $(e.target).next(); if (textarea.val().length > 20) { longContentChecked = true; longContentIndex = idx; }else{ longContentChecked = false; longContentIndex = null; } }; VIEW {{$index+1}}
score: 0
answers question: http://stackoverflow.com/q/26056689
type: AcceptedAnswer

http://stackoverflow.com/comment/41052541
type: QuestionComment
comment on: http://stackoverflow.com/q/26182437
score: 0
type: Comment
has text: fiddle is attached @mpacheco

http://stackoverflow.com/comment/40871202
score: 0
type: AnswerComment
type: Comment
has text: Furthermore, [jsfiddle](http://jsfiddle.net/) is a great tool to test out some javascript. [w3schools](http://www.w3schools.com/jsref/) is a great source to look at some references.
comment on: http://stackoverflow.com/a/26083547

http://stackoverflow.com/a/26173496
type: Answer
upvote count: 109
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26173376
has body: I believe it would be easier to do this with CSS transitions: CSS .rotate{ -moz-transition: all 2s linear; -webkit-transition: all 2s linear; transition: all 2s linear; } .rotate.down{ -ms-transform: rotate(180deg); -moz-transform: rotate(180deg); -webkit-transform: rotate(180deg); transform: rotate(180deg); } jQuery $(".rotate").click(function(){ $(this).toggleClass("down"); }); Demo fiddle
answers question: http://stackoverflow.com/q/26173376
has comment: http://stackoverflow.com/comment/41035920
score: 109
has comment: http://stackoverflow.com/comment/81591520
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/72115538
has comment: http://stackoverflow.com/comment/108684693

http://stackoverflow.com/a/26071459
score: 0
type: Answer
has body: you can use jquery which will also work in older version of ie http://jsfiddle.net/victor_007/96d0k2zo/ $( "tr:odd , ul li:odd" ).css( "background-color", "#bbbbff" );
answers question: http://stackoverflow.com/q/26071405

http://stackoverflow.com/comment/41018650
type: AnswerComment
comment on: http://stackoverflow.com/a/26164304
type: Comment
has text: Ech, more programitic way:P But should work. Secondly you are missing type of your inputs. I presume it was text.
score: 0

http://stackoverflow.com/q/26187041
score: -2
tagged with: javascript
has title: Fetching more shots using Jribbble
upvote count: 0
answer count: 1
tagged with: jquery
has body: So, a question that I've been asking myself is how one should load more shots using the jRibbble plugin. Sadly, I couldn't find anything on this subject that makes sense to me. I've only been using JavaScript for about a week now, so I apologize if this appears clumsy. My code so far is as follows: $(document).ready(function () { // this is jRibbble example code if I recall correctly $.jribbble.getShotsByPlayerId('name', function (playerShots) { var html = []; $.each(playerShots.shots, function (i, shot) { html.push('&lt;li&gt;&lt;a href=&quot;' + shot.url + '&quot;&gt;'); html.push('&lt;img src=&quot;' + shot.image_url + '&quot; alt=&quot;' + shot.title + '&quot;&gt;&lt;/a&gt;&lt;/li&gt;'); }); $('#grid').html(html.join('')); }, {page: 1, per_page: 6}); $(window).on('load resize', function () { window.shotHeight = $('#grid li').outerHeight(true); }); }); $(window).scroll(function () { if ($(window).scrollTop() + shotHeight &gt; $(document).height() - $(window).height()) { // so that there's a time buffer between the time of request and when the user reaches the bottom of the page (and thus expects new posts) } }); I don't think that it's necessary to mention how thankful I'd be if someone could at least provide some pointers.
favorite count: 0
type: UnansweredQuestion
downvote count: 2
type: Question
has answer: http://stackoverflow.com/a/26190629

http://stackoverflow.com/comment/40902761
score: 0
has text: So your problem seems to be in other place. Show us full code or jsFiddle
comment on: http://stackoverflow.com/a/26101165
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40954258
type: Comment
comment on: http://stackoverflow.com/a/26127810
has text: @Wildhorn: Glad to hear it. You might like to use a system like PARI/GP that has this kind of manipulation built in -- you'd just type, e.g., (2+x+x^101+x^202)^7. (You might also consider accepting my answer by clicking the check mark to the left.)
score: 0
type: AnswerComment

http://stackoverflow.com/q/26066373
type: AnsweredQuestion
has body: So, I am trying to sort a Taffy database on multiple columns, and getting unexpected results. This example: &lt;script src="./taffy/taffy.js"&gt;&lt;/script&gt; &lt;script&gt; var myTaffyDB = TAFFY([ {"foo":"bar","letter":"A","number_01":48,"number_02":6}, {"foo":"bar","letter":"S","number_01":49,"number_02":2}, {"foo":"bar","letter":"Q","number_01":49,"number_02":3}, {"foo":"bar","letter":"W","number_01":49,"number_02":4}, {"foo":"bar","letter":"P","number_01":49,"number_02":5}, {"foo":"bar","letter":"T","number_01":49,"number_02":6}, {"foo":"bar","letter":"W","number_01":49,"number_02":7}, {"foo":"bar","letter":"Q","number_01":49,"number_02":8}, {"foo":"bar","letter":"A","number_01":49,"number_02":9}, {"foo":"bar","letter":"C","number_01":49,"number_02":10}, {"foo":"bar","letter":"B","number_01":50,"number_02":1} ]); var tempResultsArray = myTaffyDB({"foo":"bar"}) .order("letter","number_01","number_02") .select( "letter", "number_01", "number_02") ; console.log( 'tempResultsArray: ' + tempResultsArray ); &lt;/script&gt; Produces the following: A,48,6,A,49,9,B,50,1,C,49,10,P,49,5,Q,49,8,Q,49,3,S,49,2,T,49,6,W,49,4,W,49,7 Note that the Q results are sorted in the order 49,8 then 49,3, despite the fact that the order call says group by letter, then number_01, then number_02. Am I missing something in the way I am constructing this, or is there some limitation in the way Taffy orders results?
score: 1
has title: Taffy DB sorting my multiple columns
upvote count: 1
has answer: http://stackoverflow.com/a/27129062
type: Question
tagged with: taffydb
tagged with: database
tagged with: javascript
tagged with: sorting
accepted answer: http://stackoverflow.com/a/27129062
downvote count: 0
answer count: 1
favorite count: 0

http://stackoverflow.com/a/26069815
answers question: http://stackoverflow.com/q/26069776
score: 0
type: Answer
has body: Your pageDetailsSecond.match("&amp;center=(.*)&amp;zoom=") is null so it doesn't have the length property. So the error occurs when you try to check it's length. Try this instead: if(pageDetailsSecond.match("&amp;center=(.*)&amp;zoom=") !== null) {

openlayers-3
type: Tag
tags question: http://stackoverflow.com/q/26087280
tag name: openlayers-3
tags question: http://stackoverflow.com/q/26058870
tags question: http://stackoverflow.com/q/26071490
tags question: http://stackoverflow.com/q/26034778
tags question: http://stackoverflow.com/q/26034474

http://stackoverflow.com/q/26042128
answer count: 1
tagged with: clock
tagged with: javascript
tagged with: jquery
score: 0
has body: I have this code &lt;script&gt; function displayTime() { var elt = document.getElementById("clock"); var now = new Date(); elt.innerHTML = now.toLocaleTimeString(); setTimeout(displayTime, 1000); } window.onload = displayTime; &lt;/script&gt; to run a simple digital clock but at the moment the format is hh:mm:ss and runs in 24 hour. I would like the same clock to run in hh:mm but stay as 24 hour format. When I have tried different code to take the seconds off the clock freezes or only runs in 12 hour. Can anyone help please?
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has title: Remove seconds from html5/jquery digital clock format
type: Question
has answer: http://stackoverflow.com/a/26042295
tagged with: digital
has comment: http://stackoverflow.com/comment/40794867

http://stackoverflow.com/q/26074915
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40855993
has title: How to fix broken JavaScript behaviour in ownCloud after upgrade?
has answer: http://stackoverflow.com/a/26277786
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41086568
tagged with: owncloud
type: Question
accepted answer: http://stackoverflow.com/a/26277786
score: 0
has body: I upgraded my self-hosted ownCloud instance from 6 to 7 via the apt packing manager. All calendars, file sync etc. worked correctly after but I haven't been able to log in to the web interface anymore. I discovered that when I entered my credentials to log in: the disabled attribute remains in the button element. &lt;input original-title="" id="submit" class="login primary" value="Log in" disabled="disabled" type="submit"&gt; Removing it by hand, I can log in. But then again, most of the elements in the web UI do not trigger actions when clicked on. I wonder if anybody else experienced this problem and if there's maybe only a single file which is corrupt. Subsequent updates of ownCloud did not solve the problem. This is a general description of the problem. I'll provide further information, if needed.

http://stackoverflow.com/comment/41051948
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26182176
has text: More specifically, if I wanted to set the first div's paragraph to the second's, how would I do that? (i.e. `var div1 = document.getElementById("1 p"); document.getElementById("2 p").innerHTML = div1.innerHTML;`
type: Comment

http://stackoverflow.com/q/26132392
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40960438
has comment: http://stackoverflow.com/comment/40960424
has comment: http://stackoverflow.com/comment/40960942
type: UnansweredQuestion
tagged with: ember.js
has title: Ember.js Authorizaton header and oauth_signature
tagged with: node.js
has comment: http://stackoverflow.com/comment/40960708
answer count: 0
score: 0
tagged with: ember-simple-auth
has body: How I can generate the oauth_signature and oauth_nonce in ember.js? How I can pass Authorization Header in Ember.js? App.TwitterController = Ember.ObjectController.extend({ actions: { URL : ' https://api.twitter.com/oauth/request_token', parameters : { oauth_consumer_key : '', oauth_nonce : 'kllo9940pd9333jh', oauth_timestamp : '1191242096', oauth_signature_method : 'HMAC-SHA1', oauth_version : '1.0', }, consumerSecret : '', encodedSignature : oauthSignature.generate('POST', URL, parameters, consumerSecret, tokenSecret), loginTwitter: function() { console.log('Event Clicked'); return new Ember.RSVP.Promise(function(resolve, reject) { Ember.$.ajax({ url: 'https://api.twitter.com/oauth/request_token', type: 'POST', headers: { "Authorization": 'OAuth oauth_callback="http%3A%2F%2example.com%3A3005%2Ftwitter%2Fcallback", oauth_consumer_key="", oauth_nonce="kllo9940pd9333jh", oauth_signature=' + encodedSignature + ', oauth_signature_method="HMAC-SHA1", oauth_timestamp="1191242096", oauth_version="1.0"' }, contentType: 'application/x-www-form-urlencoded' }).then(function(response) { console.log('Successed'); console.log(response); resolve (response); }, function(xhr, status, error) { console.log(error); console.log('In Error'); reject(error); }); }); }, } }); Error is Failed to validate oauth signature and token I am new to Ember.js. In above example i used the header, is this correct or not. If not then please tell me how I can use the authorization header in ember.js How I can create the oauth_signature and oauth_nonce in ember.js. Any library? It give error ' Reference: parameters is not defined'. Then When i comment the parameters code and also remove from function. then it give error ' Reference: consumerSecret is not define'. I not want to give the consumer secret. Because in twitter documentation i have read only the callback url, oauth_signaturem oauth_nonce, consumer_key and version to request the token. It not return the auth_token, oauth_secert. I want to access…

http://stackoverflow.com/comment/40866124
has text: javascript aint java
comment on: http://stackoverflow.com/q/26080946
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26156768
type: Question
upvote count: 2
answer count: 2
possible better answer: http://stackoverflow.com/a/26156939
has answer: http://stackoverflow.com/a/26156939
tagged with: javascript
has answer: http://stackoverflow.com/a/26157348
favorite count: 0
tagged with: web-sql
has comment: http://stackoverflow.com/comment/41004459
tagged with: return-value
downvote count: 0
score: 2
has title: Return a COUNT from a WebSQL query in a javaScript function
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26157348
has body: I want to return the number of rows in a particular table in a database in WebSQL inside a javascript function. Below is my code. function getCustomerCount(){ var count = 0; db.transaction(function(tx) { tx.executeSql('SELECT * FROM contacts', [], function(tx, results) { count = results.rows.length; }); }); return count; } I am new to WebSQL and rather unfamiliar with javascript also. Any suggestions?

http://stackoverflow.com/comment/40915035
comment on: http://stackoverflow.com/q/26103231
has text: I added a fiddle in my original post to demonstrate what my code is doing and hopefully you and others can see what i'm trying to do.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40957181
has text: @dandavis Yes that's absolutely correct, just was trying to keep the answer simpler / complexity down. edited to reflect
comment on: http://stackoverflow.com/a/26130813
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40915748
type: Comment
comment on: http://stackoverflow.com/a/26092864
score: 1
type: AnswerComment
has text: I just found similar & a bit cleaner way: `_.some([foo], bar)` Thanks!

http://stackoverflow.com/q/26087087
tagged with: asp.net
tagged with: ajax
has comment: http://stackoverflow.com/comment/40887092
has comment: http://stackoverflow.com/comment/40923164
has comment: http://stackoverflow.com/comment/40878376
type: UnansweredQuestion
has title: ajax call for same url for different result gives first result set always
has comment: http://stackoverflow.com/comment/40877535
answer count: 0
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/40877329
tagged with: javascript
score: 0
has body: In my asp.net application , i have used Jquery ajax call to get hson data bind data dynamically to the html table. From page1.aspx when i click list button, refirects to page2.aspx and ajax calls make, code as below, var xhReq = new XMLHttpRequest(); xhReq.open("GET", '../SVC/Data.svc/GetInventoryTrimSummary/' + valueModel + '/' + valueTrim + '/' + valueStyle + '/' + type, false); xhReq.send(null); var jsonObject1 = JSON.parse(xhReq.responseText); jsonData = jsonObject1.GetInventoryTrimSummaryResult; $('#dynamictable').append(jsonData); And table is created in service.cs class with in GetInventoryTrimSummary method. public string GetInventoryTrimSummary(string modelId, string trimId, string body_Style, string type) { string dynamicOrderTable = ""; DataTable dt = Inventory.dataset.Tables[0]; DataRow[] results = null; if (modelId == "All" &amp;&amp; trimId == "All") { dynamicOrderTable = FormOrderTable(dt, modelId, trimId, body_Style, type); return dynamicOrderTable; } } This GetInventoryTrimSummary methos is defined in IData.cs class as below, OperationContract] [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "GetInventoryTrimSummary/{modelId}/{trimId}/{bodyStyle}/{type}")] string GetInventoryTrimSummary(string modelId, string trimId, string bodyStyle,string type); Now in page1.aspx, if some changes has done and click on button, session will be created with new set of dataset and redirects to page1.aspx. Where i call same ajax call, as no difference in columns in table only data will be changed. But my issue is when first if i get default value and display in table and again if i come back with session data, ajax result set is giving me the default result set not the session result. when i debugged i found that, second time GetInventoryTrimSummary method itself not getting hit and ajax returns default values(means the first result set). What i am missing h…
has comment: http://stackoverflow.com/comment/40877289
tagged with: jquery

http://stackoverflow.com/q/26038970
has comment: http://stackoverflow.com/comment/40853883
has title: jconfirm plugin Ok and cancel button
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26039029
type: Question
tagged with: jquery-ui
has body: jconfirm plugin when i use mouse it return actual value i.e true or false on pressing OK or Cancel button but when i use tab key and have focus on cancel and then press Enter key it actually treat it as OK now how to stop this.I have an idea to use keypress event for enter key but it is not user friendly so tell me any solution.
tagged with: jquery-plugins
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/40959903
score: 0
type: Comment
type: QuestionComment
has text: Oh I see, that means they aren't going to share the same instance right? I don't have a parent controller.So I should consider them separately. I just tried it out and it works, now I'll need to organize the markup properly thanks for the help!
comment on: http://stackoverflow.com/q/26132230

http://stackoverflow.com/a/69437588
answers question: http://stackoverflow.com/q/26076259
has body: here's my vanillaJS Promise-based solution to get a MediaStream video dimensions : /** * @method streamSize : get MediaStream video dimensions * @param {MediaStream} stream : some stream with a video track */ static streamSize(stream) { return new Promise((resolve, reject) => { let video = document.createElement("video"); video.muted = true; video.srcObject = stream; video.onloadedmetadata = () => { let dimensions = { width: video.videoWidth, height: video.videoHeight }; video = null; resolve(dimensions); }; }); }
upvote count: 1
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/40938861
type: QuestionComment
has text: @neelsg: Well, you can always write your own scheduler :-) With generators/continuations this should be quite possible.
score: 0
comment on: http://stackoverflow.com/q/26114749
type: Comment

http://stackoverflow.com/q/26050757
tagged with: javascript
has answer: http://stackoverflow.com/a/27531129
score: 0
has body: I would like do a DropDownList with @Html.DropDownList and bind with AngularJS. The code @Html.DropDownList("LessionID", (SelectList)ViewBag.LessionList, "chose one", new { ng_model = "LessionID" }) suggesst the data like [LessionID:1,LessionName:English][LessionID:2,LessionName:Sport]...... then html code chose one English Sport How does the first option show? Can it remove?
has title: .net mvc3 DropDownList with angularjs
answer count: 1
tagged with: asp.net
tagged with: angularjs
type: UnansweredQuestion
tagged with: asp.net-mvc-3
type: Question

http://stackoverflow.com/q/26077276
accepted answer: http://stackoverflow.com/a/26085163
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40859208
tagged with: javascript
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/40859316
favorite count: 0
score: 2
has comment: http://stackoverflow.com/comment/40859602
upvote count: 2
has answer: http://stackoverflow.com/a/26085163
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40859138
has body: I am working on a website that have multiple companies and employees, each company should register by entering its username,password and location on Google maps. The location is going to appear to employees who are using an android application (Which is connected to the same website's database). I want to know how to allow the company to specify their exact address either by typing the decimal points of the location or by using the pin to specify it on Google map or by allowing me to detect their location. I read this: https://developers.google.com/maps/documentation/javascript/tutorial but I do not know if it is what I need in my case. Note that it is the first time for me to deal with maps so I am not deep into it.
has title: Allow user to enter his location (address) in website
tagged with: geolocation
type: Question
tagged with: location
tagged with: google-maps

http://stackoverflow.com/q/26108292
answer count: 0
tagged with: java
type: Question
tagged with: nashorn
linked to: http://stackoverflow.com/q/4037252
tagged with: javascript
has comment: http://stackoverflow.com/comment/40916231
downvote count: 0
has comment: http://stackoverflow.com/comment/40916834
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has body: The yield keyword in JavaScript would be pretty handy for certain scripting tasks in Java 8's Nashorn engine. Given the bleeding-edge-ness of yield (it's in ES6), it's probably not included in Nashorn, but I was curious if there's something similar available.
has title: Does Nashorn have an equivalent of "yield"?
score: 2

http://stackoverflow.com/comment/40851435
type: QuestionComment
comment on: http://stackoverflow.com/q/26072990
score: 0
has text: But why u need to cahnge the formate of sqlyog. You can also store date in yyyy-mm-dd format from jsp.
type: Comment

http://stackoverflow.com/a/26080072
has comment: http://stackoverflow.com/comment/40864442
has comment: http://stackoverflow.com/comment/40864421
score: 2
has comment: http://stackoverflow.com/comment/40864482
has body: Using ID's is making this more complicated than needed when a simple traverse will suffice. $(function(){ $('tr').hover(function(){ /* hover first argument is mouseenter*/ $(this).find('button').css({"visibility": "visible"}); },function(){ /* hover second argument is mouseleave*/ $(this).find('button').css({"visibility": "hidden"}); }); }); For more granularity give the buttons a common class. Even simpler is using CSS alone button.buttonCLass{ visibility: hidden;} tr:hover button.buttonCLass{ visibility: visible;}
upvote count: 3
answers question: http://stackoverflow.com/q/26079997
downvote count: 1
accepted answer of: http://stackoverflow.com/q/26079997
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40864402
type: Answer

http://stackoverflow.com/a/26152455
answers question: http://stackoverflow.com/q/26110188
score: 0
has body: I cleaned up the code but the data is not being sent to external.php. It is being set but not posting. Here is my revised code &lt;script type="text/javascript"&gt; $('#city').blur(function() { var cityField = document.querySelector('#city').value; $.ajax({ type: "post", url: "external.php", data: {'cityField': cityField }, dataType: "text", success: function(data, status){ if(status=="success") { alert("You typed: " + cityField); } } }); });
type: Answer

http://stackoverflow.com/comment/40843926
type: Comment
type: QuestionComment
has text: You should do this job on server side once and for all and then you save the page with the changes, otherwise the replacements would be performed each time you load the page.
score: 0
comment on: http://stackoverflow.com/q/26068637

http://stackoverflow.com/q/26126885
type: Question
has comment: http://stackoverflow.com/comment/40971699
has answer: http://stackoverflow.com/a/26127062
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40949562
score: 0
has comment: http://stackoverflow.com/comment/40949401
has comment: http://stackoverflow.com/comment/40949449
has comment: http://stackoverflow.com/comment/40949491
has body: As per my requirement,first i have called the jquery confirm box later the javascript confirm box . But the jquery confirm box won't show up unless it shows or moves to the later code where i called javascript confirm box. So i can able to see the javascript confirm box first and back of it showing the jquery one . I don't know if there is a priority check or not . please guide me . This is the code i used: function doConfirm(msg, yesFn, noFn) //called function { var confirmBox = $("#confirmBox"); confirmBox.find(".message").text(msg); confirmBox.find(".yes,.no").unbind().click(function () { confirmBox.hide(); }); confirmBox.find(".yes").click(yesFn); confirmBox.find(".no").click(noFn); confirmBox.show(); return false; } if (document.getElementById('hdnusertype').value == "5") { //Confirm message for creating multiple absences for teachers login if (gridRows.length &gt;= 1) { //calling the function doConfirm("Do you want other dates you would like to create Absence?", function yes() { var chooser = igdrp_getComboById("wdcStartDate"); chooser.focus(); return false; }, function no() { // do nothing }); //javascript confirm box var i = confirm("You have selected " + document.getElementById('hdnAbsenceDates').value + " absence days, Do you want to Continue?");
answer count: 1
has comment: http://stackoverflow.com/comment/40949408
accepted answer: http://stackoverflow.com/a/26127062
has title: Will the javascript confirm box shows up first or jquery first?
type: AnsweredQuestion

http://stackoverflow.com/a/26108302
score: 0
has body: Can you use ng-blur here instead of ng-enter and then check to see if the model is dirty and then do the service call? AngularJS sets the CSS classes ng-pristine and ng-dirty on any input field you've used ng-model on, and your controller has the properties $pristine and $dirty which you can check to see if the form is dirty or not. That might be a bit more optimized. I would still do this in a directive though.
type: Answer
answers question: http://stackoverflow.com/q/26107632

http://stackoverflow.com/q/26039794
has comment: http://stackoverflow.com/comment/40790278
possible better answer: http://stackoverflow.com/a/26040617
accepted answer: http://stackoverflow.com/a/26040588
linked to: http://stackoverflow.com/q/9718449
has body: I am building a ToDO style list. My goal is to insert a new Row every time the last/bottom row's Name Text Input field gets focus. So clicking in the bottom input field would insert a new row below it, which I could then finish typing my name and hit tab to proceed to the next, which would then again add a new row below it as well. My name input fileds look like this... &lt;input class="name" name="name_1" id="name_1" size=45 type="text" value="" onfocus="myFunction(event)"&gt; As you can see, right now, when the text input gets Focus onfocus="myFunction(event)" it calls this text function myFunction(event) function myFunction(e){ add_task_row("","{$ID}","","","","","","","0"); return false; } My add_task_row handles inserting the new rows. It currently works, anytime I click or tab into a text input, it adds a new row. THe problme is it happens on any row, I need it to only function this way when that very last row is focused on. I think inside the myFunction() it could possibly have some code that would count the number of rows and then only fire the add_task_row if it is the current last row? I just don't know enough JavaScript to do this myself or even know if I'm on the right track to do this? Any help appreciated, you can see my desired output/result. Would like to use as much native JavaScript as possible
type: AnsweredQuestion
has title: Insert a new Row of Input fields when the Bottom Row gets Focus using JavaScript
type: Question
has answer: http://stackoverflow.com/a/26040588
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26040617
has comment: http://stackoverflow.com/comment/40790309

http://stackoverflow.com/comment/41043104
comment on: http://stackoverflow.com/q/26177561
type: QuestionComment
score: 0
has text: @DaniCE can you point me one way of doing this? thanks
type: Comment

http://stackoverflow.com/a/26185075
answers question: http://stackoverflow.com/q/26181457
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/41059647
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/62660017
has body: I don't know if you are using the Facebook SDK to create the Share Dialog, but with SDK you can get the response status with something like this (of course, you must load the facebook script firstly): FB.init({ appId : 'your-app-id', status : true, xfbml : true, version: 'v2.1' }); var facebookShare = function( callback ) { var options = { method : 'share', href : 'your-url-to-share' }), status = ''; FB.ui(options, function( response ){ if (response &amp;&amp; !response.error_code) { status = 'success'; $.event.trigger('fb-share.success'); } else { status = 'error'; $.event.trigger('fb-share.error'); } if(callback &amp;&amp; typeof callback === "function") { callback.call(this, status); } else { return response; } }); } And then you can assign the click event to your button to fire the share dialog. After that, call the callback or use the ".on" jQuery method to know the response status: $('your-facebook-share-button').on('click', function( e ) { e.preventDefault(); facebookShare(function( response ) { // simple function callback console.log(response); }); }); // custom jQuery events $(document) .on('fb-share.success', function( e ) { console.log('success events'); }) .on('fb-share.error', function( e ) { console.log('error events'); }); I have not tested this code, but I think that it would work. Good luck!
has comment: http://stackoverflow.com/comment/41058714

http://stackoverflow.com/comment/40832149
comment on: http://stackoverflow.com/q/26062251
score: 0
type: Comment
type: QuestionComment
has text: Move your `removePopups()` call to AFTER the initialization of the popup.

http://stackoverflow.com/q/26038833
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26039217
has answer: http://stackoverflow.com/a/26038929
possible better answer: http://stackoverflow.com/a/26038880
type: Question
tagged with: jquery-ui
has title: How to make datepicker in jquery-ui disable sunday without affecting other values
tagged with: javascript
tagged with: jquery-ui-datepicker
score: 0
accepted answer: http://stackoverflow.com/a/26038921
tagged with: jquery
has body: I would like to make a date picker which excludes Sundays. But, in my work, i don't know why it is not working. Any kind of help is appreciated. thank you very much. Here's my code Schedule Day :
has answer: http://stackoverflow.com/a/26038921
has answer: http://stackoverflow.com/a/26038880

http://stackoverflow.com/q/26040842
type: Question
tagged with: firebase
has body: I would like to know how to delete firebase record fields which are related to another field. $scope["delete"] = function(id) { $scope.clubs = fbutil.syncArray("club"); $scope.clubs.$remove(item); $scope.removeClubUser = fbutil.syncArray("clubuser/" + id + "/" + user.uid); $scope.removeClubUsers.$remove(user.uid); $scope.removeUserClub = fbutil.syncArray("userclub/" + user.uid + "/" + id); $scope.removeUserClub.$remove(id); }; Now I dont know if this circular structure is the best approach but that way I can always keep track which user is in which club given the user and club id $scope.clubs.$remove works just as expected but removeClubUser and removeUserClub do not. Why is that and how would it work? Thanks Sven
score: 0
answer count: 1
tagged with: javascript
has title: How to remove dependent records in angularfire 0.8.2
tagged with: angularfire
has answer: http://stackoverflow.com/a/26044091
has comment: http://stackoverflow.com/comment/40796436
type: UnansweredQuestion

http://stackoverflow.com/a/26048209
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/40807847
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40806280
has comment: http://stackoverflow.com/comment/40807529
has comment: http://stackoverflow.com/comment/40807881
answers question: http://stackoverflow.com/q/26048178
has body: Your filteredMessages function needs to accept an argument as the Array.filter method applies a callback to each element passing that element as an argument to the supplied callback. function filteredMessages(message){ return message.length &lt; 50; } You don't actually have to write any separate functions for this and could use an anonymous function instead: messages.filter(function(message){ return message.length &lt; 50; });

http://stackoverflow.com/comment/40806751
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26048307
has text: use window.location.search to get only the query parameters instead the complete url

http://stackoverflow.com/a/26046301
upvote count: 3
type: Answer
downvote count: 0
score: 3
has body: You should be able to return $q.reject([reason]) angular.module('mymod').factory('httpInterceptors', function ($injector, $q, httpBuffer) { return { request: function (config) { var url = config.url; if (url.match('/dashboard/')) { // immediately cancel request return $q.reject(config); // logout and go to login-page immediately // ... } // request config or an empty promise return config || $q.when(config); } }; });
has comment: http://stackoverflow.com/comment/40802906
answers question: http://stackoverflow.com/q/26045953
has comment: http://stackoverflow.com/comment/40804138

http://stackoverflow.com/a/26038607
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40787846
type: Answer
answers question: http://stackoverflow.com/q/26037088
score: 1
accepted answer of: http://stackoverflow.com/q/26037088
has body: It seems like you want your mapReduce function to be equivalent to a.map(f).reduce(function(prev, item) { return item == undefined ? prev : prev + item; }, seed == undefined ? "" : seed) If you want to combine this behaviour in a dedicated function, remove the intermediate array and make the for-loop explicit you would write function mapCombineString(f, a, seed) { if (!f || !a) return; // throw new TypeError() would be appropriate if (seed == undefined) seed = ""; for (var i = 0; i != a.length; i++) { var item = f(a[i], i, a); if (item != undefined) seed = seed + f(a[i]); } return seed; }

http://stackoverflow.com/comment/40903284
type: Comment
comment on: http://stackoverflow.com/q/26100852
score: 0
type: QuestionComment
has text: @MLeFevre That's OK. :)

http://stackoverflow.com/comment/41040781
score: 0
has text: now is duplicating the list with every request @aSeptik
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26175497

http://stackoverflow.com/a/26190831
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26189955
has body: As already established, you are seeing this behavior because clicking the button submits the form and reloads the page. The simplest solution is to remove the &lt;form&gt; element.

http://stackoverflow.com/a/51665058
has body: I had a similar issue. I had child.js and a common.js files. In my case, My HTML file was using both the JS files and both of them had a function with the same name, child.js function calculateFunction(){...} and also common.js function calculateFunction(){...} After I remove one of these my code works fine and onclick started working. hope this helps!
score: 0
answers question: http://stackoverflow.com/q/26104006
type: Answer

http://stackoverflow.com/comment/40841351
score: 9
comment on: http://stackoverflow.com/q/26067284
type: QuestionComment
has text: You can't do that.
type: Comment

http://stackoverflow.com/comment/40817510
type: Comment
score: 0
type: AnswerComment
has text: Thanks , I have tested it and it's working. However, I still don't get it. it's supposed to work the same way in both scenarios, right?
comment on: http://stackoverflow.com/a/26050144

http://stackoverflow.com/comment/51073811
score: 0
type: AnswerComment
type: Comment
has text: It did not for me. Firstly the length of the array has to be `W*H`, because with `var data_u32 = new Uint32Array(imageData.data.buffer);` , `data_u32.length ` equals `imageData.data.length/4` equals `W*H`. then in your code you're refering to an unset `n`. With this respected Im still not getting the result s im expecting. (Im working with jsfeats' canny edge detector)
comment on: http://stackoverflow.com/a/26145015

http://stackoverflow.com/a/26160320
type: Answer
answers question: http://stackoverflow.com/q/26159958
score: 0
has comment: http://stackoverflow.com/comment/41010924
type: AcceptedAnswer
has body: If I were you, I would reverse the steps that your taking to do this. First, you'll need a wrapper above the content at the top of content.html so it would look like this: Computer Science In Today body After that youll want to use the jquery load function to insert the html into your index.html: $(document).ready(function){ $('.all-blog-post').load('place-path-here/content.html'); } Once thats done, youll want to place that blog data into the right wrapper so the whole jquery call would look like this: $(document).ready(function){ $('.all-blog-post').load('place-path-here/content.html'); } $(document).on('load', '.blog-post-content', function(){ var blog-post-content = $('.content-class').html(); $(this).append(blog-post-content); }); Something like this should hopefully work, minus some possible syntax errors.
has comment: http://stackoverflow.com/comment/41011232
accepted answer of: http://stackoverflow.com/q/26159958

http://stackoverflow.com/comment/41066158
type: QuestionComment
comment on: http://stackoverflow.com/q/26189704
has text: If you really need to split it out into another function, make sure you're taking into account things like [the Law of Demeter](http://en.wikipedia.org/wiki/Law_of_Demeter) and the [Single Responsibility Principle](http://en.wikipedia.org/wiki/Single_responsibility_principle). In the second example, you've created an object that has references above it's scope. In some cases that may be appropriate, thanks to the way Javascript is built. If `doSomethingHelper` is only called in `doSomething`, is violating the Law of Demeter appropriate?
score: 0
type: Comment

http://stackoverflow.com/a/26136635
has body: try something like this [Firefox => ctrl + shift + k] console.log(data.type) Reference https://developer.mozilla.org/en-US/docs/Tools/Web_Console TRY firebug for firefox https://getfirebug.com/wiki/index.php/Console_Panel Google chrome https://developer.chrome.com/devtools/docs/console
score: 0
answers question: http://stackoverflow.com/q/26136620
type: Answer

http://stackoverflow.com/q/26102838
has answer: http://stackoverflow.com/a/26103967
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40905981
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40905898
accepted answer: http://stackoverflow.com/a/26103967
has body: I'm using a JavaScript regular expression /( [\s\S]*?<\/mos>)/g to find XML blocks in a log file that looks roughly like this: Entry 1: ... Entry 2: ... However, sometimes the logging process encounters an error and doesn't finish writing an entry to the file, in which case it looks like this: Entry 1: Error! Entry 2: ... When this happens the regular expression matches everything from the opening tag in entry 1 to the closing tag in entry 2 which causes problems when processing the XML later. It seems that somehow matching the closing tags first and then looking back for their corresponding opening tags would avoid this, but I don't know how to do this or if it is possible with regular expressions. Clarification: The ... in the blocks delimited by the start and end tags can include newlines.
linked to: http://stackoverflow.com/q/1732348
score: 0
tagged with: regex
has comment: http://stackoverflow.com/comment/40907302
has title: Regular expression to find smallest possible match
has comment: http://stackoverflow.com/comment/40907913

http://stackoverflow.com/comment/40873025
type: Comment
score: 2
has text: I'd suggest (unless you are constrained) to instead pass it as urlencoded json. It is probably going to be less tricky to get right. You have to explicitly decode the json on the php side though
type: QuestionComment
comment on: http://stackoverflow.com/q/26084733

http://stackoverflow.com/q/26036294
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/40937444
tagged with: protractor
score: 7
has answer: http://stackoverflow.com/a/40937444
linked to: http://stackoverflow.com/q/1535631
has title: How to share data between javascript files?
has comment: http://stackoverflow.com/comment/40784614
has comment: http://stackoverflow.com/comment/40784903
has answer: http://stackoverflow.com/a/28430866
has answer: http://stackoverflow.com/a/26043082
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40784455
tagged with: jasmine
has comment: http://stackoverflow.com/comment/40784589
has comment: http://stackoverflow.com/comment/40785347
has comment: http://stackoverflow.com/comment/40784791
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/28426619
accepted answer: http://stackoverflow.com/a/26043082
has body: I have (I think) kind of unique problem with js. I'm writing tests using protractor stuff and Jasmine and I need to share data between js files. Is there any way to do that? All the solutions I've found are for webpages and I use just js files. I look forward to your swift response, if there is any information missing, please let me know and I'll add it immediately.
has comment: http://stackoverflow.com/comment/40784214
upvote count: 7
type: Question

http://stackoverflow.com/comment/41034728
comment on: http://stackoverflow.com/a/26172551
type: AnswerComment
has text: how the server or client can redirect you if over your link's have a href="#modal" and havent id or class, I'm write you simple examples if you _POST_ the form you can give a **header** after your code are procesing or redirect with javascript after you get the response but your form must have **hidden input** with page name or url must have a different id (example: **Link1**)
score: 0
type: Comment

http://stackoverflow.com/comment/40975986
score: 0
has text: @MelanieUK: use .prop() instead of .attr() Amirali, When someone gives an answer (and revises it to accomodate you), you should probably wait more than an hour before spamming your own thread with "There is no one to help me." Sounds whiny, demanding and entitled.
type: Comment
comment on: http://stackoverflow.com/a/26136867
type: AnswerComment

http://stackoverflow.com/a/26048774
answers question: http://stackoverflow.com/q/26047660
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40835674
accepted answer of: http://stackoverflow.com/q/26047660
score: 1
has comment: http://stackoverflow.com/comment/40831611
upvote count: 1
has body: Why is it when I change the editing value to true from PHP the div doesn't display, but if I change it from within the viewmodel it displays? I don't see anywhere that you are setting it 'from php' it seems you are setting the value from JavaScript. If window.vm.editing(true); is firing the subscribe function then it is working successfully. The real question at that point is are you sure that you only have one instance of the VM that is being bound to the DOM? I don't see anywhere in your code where you are applying bindings at all so could you show that code as well? I suspect your VM actually looks something like this - function viewModel() { // some code } ko.applyBindings(new viewModel()); Or is being initialized twice. Remember that you need to reference the same instance of your view model. window.vm = new myViewModel(); ko.applyBindings(window.vm); //if the edit variable is set, the "someDiv" should be set to true if(isset($edit)){ &lt;script&gt; window.vm.editing(true); //this will trigger the alert from the subscribe function, but the div doesn't display &lt;/script&gt; }

http://stackoverflow.com/comment/40937436
has text: have you tired by adding explicitly {readOnly : Boolean} config in ur numberfield ??
type: QuestionComment
comment on: http://stackoverflow.com/q/26098287
score: 0
type: Comment

http://stackoverflow.com/comment/40791654
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26040016
has text: The email function is here to check if it is a correct email, that's why I have negated it. But for the rules, I don't know what are yours! I even don't know if `txt1` or `txt3` should be an email field, ... I have just put an example, after you have to adapt to your rules!

http://stackoverflow.com/comment/40981897
has text: @PaulNicholas I mainly recommend Xan's approach because an advantage of coding using asynchronous events is that your code can more easily be refactored to use asynchronous APIs should it be necessary. If you're certain that you always want to access the data synchronously, then you're totally fine with using the synchronous method from my answer. In fact, implementing it is simpler and easier, and therefore less error-prone.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26143077
type: AnswerComment

drupal-7
tags question: http://stackoverflow.com/q/26035889
type: Tag
tag name: drupal-7
tags question: http://stackoverflow.com/q/26116616

http://stackoverflow.com/comment/43512693
comment on: http://stackoverflow.com/a/26106905
score: 0
type: AnswerComment
type: Comment
has text: I updated to the latest version and I'm still getting the same problem with .where("Id", "==", "Id") while .where("Id", "==", 1) works just fine. That's definitely a bug. Any thoughts on it?

http://stackoverflow.com/comment/41049123
type: AnswerComment
has text: I was missing the selector inside el tag, so now it's working. The changes I made was [link](http://jsfiddle.net/my0vy9wm/2/). Thanks a lot for the help!
type: Comment
comment on: http://stackoverflow.com/a/26164679
score: 1

postback
tag name: postback
type: Tag
tags question: http://stackoverflow.com/q/26119261

http://stackoverflow.com/a/26103897
answers question: http://stackoverflow.com/q/26103841
has body: Seems like one of those cases where you should actually create a function for your handler. :) $(document).ready(function() { var my_object = new test(); $('#button').click(function(){ my_object.on_change(); }); });
type: Answer
score: 0

http://stackoverflow.com/comment/40795739
has text: Just one other question...in your original example, you give the function the parameters 'newValue' and 'oldValue'. I guess I'm still struggling to wrap my head around this whole concept, but..if that function is automatically called when a change is made to a field, how are arguments ever sent to that function? Or does newValue automatically detect the new value and oldValue automatically detect the previous value? Thanks.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26041578
type: Comment

http://stackoverflow.com/comment/40833794
comment on: http://stackoverflow.com/q/26063357
type: Comment
type: QuestionComment
score: 2
has text: value or constant + $rootScope in the run block imo

http://stackoverflow.com/a/26088708
type: Answer
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26088621
has body: Store the childrens in an array, then create as many parents as needed and put them back in your list, here is the code: var list = $("#list"), items = $.makeArray($(".item")); list.html(""); for (var i=0; i &lt; items.length; i++) { if (i%2 == 0) list.appendChild($('&lt;div class="parent"/&gt;')); $("#list div:last-child").appendChild(items[i]); }

http://stackoverflow.com/q/26063105
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26074911
has comment: http://stackoverflow.com/comment/40853174
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/40842370
has title: Observable array not showing all items in array
tagged with: javascript
has answer: http://stackoverflow.com/a/26074911
score: 0
has comment: http://stackoverflow.com/comment/40853106
answer count: 2
upvote count: 1
downvote count: 1
has body: I have a knockout observableArray bound to a table below. User Name Primary Email Product Role Active EditUser? Edit User And the following view model: function CustomerAdminVm() { var vm = this this.CustomerUsers = ko.observableArray(GetCustomerUsers()); } My problem is that when the view model initially loads GetCustomerUsers it correctly gets the values it needs, and inserts them into the observable array. However, the elements are not displayed in the table. The strange thing is that if I call the following function: this.AddUserToCustomer = function () { if (vm.NewUser) { vm.CustomerUsers.push(vm.ActiveUser()); } vm.CloseUserModalDialog(); } The user is added to the array, and correctly displayed in the table. Even more confusing is that the latest value of the array in the push shows the initial values that are not displayers are in the array. Does anyone have any idea what could be causing this behavior? The code for GetCustomerUsers is: function GetCustomerUsers() { var users = []; $.ajax({ type: 'Get', url: ControllerBase + 'Actions/GetAllUsersForCustomer', async: false, success: function (data) { users = $.map(data, function(item) { return new ObservableUser(item); }); } }); return users; } And ActiveUser is also an ObservableUser.
favorite count: 0
has answer: http://stackoverflow.com/a/26101152
accepted answer: http://stackoverflow.com/a/26101152
has comment: http://stackoverflow.com/comment/40833911
has comment: http://stackoverflow.com/comment/40902886
has comment: http://stackoverflow.com/comment/40833810
has comment: http://stackoverflow.com/comment/40853074
has comment: http://stackoverflow.com/comment/40902717
has comment: http://stackoverflow.com/comment/40853882

http://stackoverflow.com/q/26188565
score: 37
has title: Where can I get Angular ui-grid selected items
tagged with: angular-ui-grid
has answer: http://stackoverflow.com/a/26188783
has answer: http://stackoverflow.com/a/32315877
possible better answer: http://stackoverflow.com/a/29398233
answer count: 4
upvote count: 37
has answer: http://stackoverflow.com/a/29398233
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/16875283
has answer: http://stackoverflow.com/a/30392161
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26188783
has body: Testing out Angular ui-grid (ng-grid v.3.0). Can not for the life of me find the selected row. I just want to grab the rows or even row ID of row when a user clicks it. Found the top comment here but I think this is outdated: Getting select rows from ng-grid? Does anyone know where the gridOptions.selectedItems is being stored in 3.0?
favorite count: 0
tagged with: angularjs
type: Question

http://stackoverflow.com/q/26059170
downvote count: 0
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/40825860
answer count: 3
has body: I'm trying to convert any text string into Morse Code in the simplest way possible. I am very new to programming so please can you give me some advice on what methods i could use. I have so far just written a phrase(string) and an Array holding the Morse Code but i am struggling on what steps to use next on how to take each character of the string then checking it with the array and printing out the Morse Code equivalent of the string. var phrase = "go down like a lead balloon"; var morseCode = [".-", "-...", "-.-.", "-..", ".", "..-.", "--.", "....", "..", ".---", "-.-", ".-..", "--", "-.", "---", ".--.", "--.-", ".-.", "...", "-", "..-", "...-", ".--", "-..-", "-.--", "--.."] for(i=0; i&lt;phrase.length; i++){ c = phrase.charAt(i); WScript.echo(c + " | " + i); }
favorite count: 0
accepted answer: http://stackoverflow.com/a/26059284
has comment: http://stackoverflow.com/comment/40825727
has comment: http://stackoverflow.com/comment/40825589
has answer: http://stackoverflow.com/a/26059648
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26059399
has title: Using JavaScript to encode morsecode
has answer: http://stackoverflow.com/a/26059399
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/26059284

http://stackoverflow.com/a/26164679
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/26163937
has comment: http://stackoverflow.com/comment/41049123
upvote count: 2
answers question: http://stackoverflow.com/q/26163937
has comment: http://stackoverflow.com/comment/41043711
has comment: http://stackoverflow.com/comment/41032508
has body: You're not passing a model to your view on instantiation. When Marionette tries to render, it expects to pass data from the model to the template function (in this case underscores _.template()). Since your template is referencing some data: var template = '&lt;div&gt;&lt;%= message %&gt;&lt;/div&gt;' in this case "message", it won't be able to interpolate the value. Generally speaking what you would do on instantiation would look something like this: var myModel = new MyModel(); var view = new ItemView({ model: myModel });
has comment: http://stackoverflow.com/comment/41032036
has comment: http://stackoverflow.com/comment/41048849

http://stackoverflow.com/q/26185337
tagged with: mongoimport
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26185405
has comment: http://stackoverflow.com/comment/41113871
has comment: http://stackoverflow.com/comment/41057864
score: 1
downvote count: 1
type: Question
tagged with: mongodb
has title: mongodb mongoimport from external files dynamically
has body: I can run mongoimport from the commandline and get it to import a file if I hardcode the file name. mongoimport --host HOSTNAMEHERE --collection TESTColectionName --db DBNAME --file C:\FileFolder1\129871.json --jsonArray The above works great but I have a folder with hundreds of.json files (that I do not know the names of). How can I iterate through all the files in the directory and import them into a mongodb? I have written a few .js files to run mongo commands (find data, display data, print out the data, etc). Is there anyway I can iterate and run imports from here (I know mongoimport is a separate .exe from the mongo shell itself). Let me know, Thank You
tagged with: javascript
answer count: 1

http://stackoverflow.com/q/26161638
has answer: http://stackoverflow.com/a/26161801
answer count: 1
downvote count: 0
favorite count: 0
has title: How to call an Angularjs factory function from outside
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41013704
has comment: http://stackoverflow.com/comment/41013567
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41013843
type: Question
has comment: http://stackoverflow.com/comment/41014094
tagged with: javascript
has body: I have an angular module / factory like this: var app = angular.module('webportal', ['vr.directives.slider', 'angular-flexslider', 'LocalStorageModule', 'multi-select']); app.factory('portal', ['uri', function (uri) { portal = {}; portal.getURLParameter = function (name) { var hash; var vars = []; var indexOfQuestion = window.location.href.indexOf('?'); if (indexOfQuestion != -1) { var hashes = window.location.href.slice(indexOfQuestion + 1).split('&amp;'); for (var i = 0; i &lt; hashes.length; i++) { if (typeof name == 'undefined') vars.push(hashes[i]); else { hash = hashes[i].split('='); if (hash[0] = name) return hash[1]; } } } }; return portal; }]); Now i am trying to call the getURLParameter from outside angular, like this: angular.injector(['webportal']).get('portal').getURLParameter('blah'); Of course that does not work and fails with: Error: [$injector:modulerr] Failed to instantiate module webportal due to: [$injector:modulerr] Failed to instantiate module vr.directives.slider due to: [$injector:modulerr] Failed to instantiate module ngTouch due to: [$injector:unpr] Unknown provider: ngClickDirectiveProvider http://errors.angularjs.org/1.2.25/$injector/unpr?p0=ngClickDirectiveProvider minErr/...... So can anyone tell me what is the proper way to call this?

http://stackoverflow.com/a/26093588
type: Answer
answers question: http://stackoverflow.com/q/26093545
score: 0
has body: Try this regex: /([a-z0-9]+\.)*[a-z0-9]+\.[a-z]+/
upvote count: 2
downvote count: 2

http://stackoverflow.com/q/26141171
answer count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has title: Get "visible" viewport zone after scaling
has answer: http://stackoverflow.com/a/26141597
score: 2
downvote count: 0
has body: I use viewport in my web app, which enables scaling: &lt;meta name="viewport" content="width=device-width, initial-scale=1.0 ,maximum-scale=2.0" /&gt; After zoom-in and zoom-out, I need to know what pixels are shown on the screen. for example, when I use initial display I see 0 (div left) - 1024 (div right) pixels of my div (width), but after zoom-in, the area is different, because the div is "wider" and I see only a part of it. Is there any way to calculate this data? I tried using the scrollerLeft parameter (after zoom it is not "0"), but it returns 0 (seems like not updating).
type: Question
tagged with: javascript
upvote count: 2
tagged with: viewport
tagged with: scale

http://stackoverflow.com/q/26048239
has title: parsing international numerals
has answer: http://stackoverflow.com/a/26048344
tagged with: internationalization
type: AnsweredQuestion
score: 2
type: Question
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26048344
answer count: 1
has body: I'm trying to figure out how my script will behave if rendered in a browser using Chinese (or other) locale using Chinese numerals (or another non-Latin symbol set). Can't seem to find any info on this on the interwebs. Looking at the page https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString we see examples of localized numbers when converting from number to string, but what about the other way around? I tried parseInt("一二三") in IE11 debug console which returned NaN, but I'm not using Chinese Windows. Could someone test this? My confusion comes from JavaScript having loosely typed data, so what if I end up running into an implicit string-to-number conversion, such as this: var a = "١٢٣"; var b = .01; console.log(a*b); Mind you my variables a and b could come from user input in a more complex example. How can you make sure that input coming from a non-Latin symbology is converted to the right number-representation internally before you do arithmetic if parseInt and implicit conversion don't work?
favorite count: 0
upvote count: 2

http://stackoverflow.com/q/26188020
downvote count: 0
has comment: http://stackoverflow.com/comment/41063249
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41063248
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Jquery keyup only working in Chrome?
favorite count: 0
accepted answer: http://stackoverflow.com/a/26188330
type: AnsweredQuestion
has body: I have a basic cost calculator that I want to automatically add values as numbers are entered into the text fields. This works perfect in Chrome, but for some reason only in chrome. My goal is to have the new math results show up after the dollar sign whenever a number is entered into the text field. I am getting no console errors and JS Hint/Lint both look good. Any ideas why this is working in chrome, but no where else? Here is a fiddle: http://jsfiddle.net/Egreg87/j7r4zte8/4/ window.onload = function() { $('input').keyup(function(){ // run anytime the value changes var duration = parseFloat($('#duration').val()) || 0; // get value of field var timeHr = parseFloat($('#timeHr').val()) || 0; // get value of field var distance = parseFloat($('#distance').val()) || 0; // get value of field var flight = parseFloat($('#flight').val()) || 0; // convert it to a float var parkDays = parseFloat($('#parkDays').val()) || 0; var parking = '12.00'; var fuelCost= '3.50'; $('#added').html(flight + parkDays * parking + distance * (2) / (20) * fuelCost + timeHr); // add them and output it }); $('input').keyup(function(){ // run anytime the value changes var distance1 = parseFloat($('#distance1').val()) || 0; // get value of field var flight1 = parseFloat($('#flight1').val()) || 0; // convert it to a float var parkDays = parseFloat($('#parkDays').val()) || 0; var parking1 = '12.00'; var fuelCost1= '3.50'; $('#added1').html(flight1 + parkDays * parking1 + distance1 * (2) / (20) * fuelCost1); // add them and output it }); $('input').keyup(function(){ // run anytime the value changes var duration2 = parseFloat($('#duration2').val()) || 0; // get value of field var timeHr = parseFloat($('#timeHr').val()) || 0; // get value of field var distance2 = parseFloat($('#distance2').val()) || 0; // get value of field var flight2 = parseFloat($('#flight2').val()) || 0; // convert it to a float var parkDays = parseFloat($('#parkDays').val()) || 0; var parking2 = '12.00'; var fuelCost2= '3.50'; $('…
score: 1
type: Question
has answer: http://stackoverflow.com/a/26188330
has comment: http://stackoverflow.com/comment/41063234

http://stackoverflow.com/a/26084474
has comment: http://stackoverflow.com/comment/40872714
has comment: http://stackoverflow.com/comment/40872827
has body: Use event.preventDefault() and inorder to change text dynamically inside div try this: $(document).ready(function(){ $(".parent ul li a").click(function(event){ event.preventDefault(); //Prevent Page from redirecting. $(".dynamicDiv").text($(this).text()); $(".dynamicDiv").hide(); $(".dynamicDiv").fadeIn(1000); }); }); Working Demo
has comment: http://stackoverflow.com/comment/40872946
answers question: http://stackoverflow.com/q/26084427
type: Answer
has comment: http://stackoverflow.com/comment/40872453
has comment: http://stackoverflow.com/comment/40872339
score: 0
has comment: http://stackoverflow.com/comment/40872292
has comment: http://stackoverflow.com/comment/40872388

http://stackoverflow.com/q/26113849
score: 0
answer count: 2
tagged with: state
accepted answer: http://stackoverflow.com/a/26114226
has title: MSCRM 2011 Hiding Tab based on value of statcode field
possible better answer: http://stackoverflow.com/a/26114132
tagged with: dynamics-crm
has answer: http://stackoverflow.com/a/26114132
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26114226
has comment: http://stackoverflow.com/comment/40926016
type: Question
tagged with: javascript
tagged with: show-hide
has body: I want to hide a tab in Quote entity based on value of statecode field of quote entity. Senario: If the value is equal to ''3'' tab should be visible, if not tab should be invisible. You can find my code below but it's not working. Please help, thanks. function hideTab(){ var field = Xrm.Page.data.entity.attributes.get("statecode"); if (field == null || field.getValue() == null) return; var value = field.getValue(); if(value != "3") return; Xrm.Page.ui.tabs.get(tab_9).setVisible(false); }
has comment: http://stackoverflow.com/comment/40925720

http://stackoverflow.com/comment/40911210
comment on: http://stackoverflow.com/a/26043197
type: Comment
has text: @sgress454 Captchas are not always accessible, and they can be really annoying for the users. I'd consider them as a last resort, thus.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40799516
has text: You can also explicitly call the parent's function `ng-click="$parent.edit('`
score: 1
comment on: http://stackoverflow.com/a/26044363
type: AnswerComment
type: Comment

firefox
tags question: http://stackoverflow.com/q/26066808
tags question: http://stackoverflow.com/q/26096920
tags question: http://stackoverflow.com/q/26100421
tags question: http://stackoverflow.com/q/26058964
tags question: http://stackoverflow.com/q/26062878
tags question: http://stackoverflow.com/q/26153751
tag name: firefox
tags question: http://stackoverflow.com/q/26189609
tags question: http://stackoverflow.com/q/26062706
tags question: http://stackoverflow.com/q/26146961
tags question: http://stackoverflow.com/q/26115209
tags question: http://stackoverflow.com/q/26109253
tags question: http://stackoverflow.com/q/26167848
tags question: http://stackoverflow.com/q/26112425
tags question: http://stackoverflow.com/q/26133039
tags question: http://stackoverflow.com/q/26071891
tags question: http://stackoverflow.com/q/26175475
tags question: http://stackoverflow.com/q/26060215
type: Tag
tags question: http://stackoverflow.com/q/26078273
tags question: http://stackoverflow.com/q/26131569
tags question: http://stackoverflow.com/q/26124025
tags question: http://stackoverflow.com/q/26064207
tags question: http://stackoverflow.com/q/26111841
tags question: http://stackoverflow.com/q/26147233
tags question: http://stackoverflow.com/q/26082742
tags question: http://stackoverflow.com/q/26159079
tags question: http://stackoverflow.com/q/26043787
tags question: http://stackoverflow.com/q/26150613
tags question: http://stackoverflow.com/q/26056774
tags question: http://stackoverflow.com/q/26153382
tags question: http://stackoverflow.com/q/26168950
tags question: http://stackoverflow.com/q/26178094
tags question: http://stackoverflow.com/q/26182020
tags question: http://stackoverflow.com/q/26169678

http://stackoverflow.com/a/26049207
has body: You have to remove the align=left off the table element!
upvote count: 1
answers question: http://stackoverflow.com/q/26049072
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/26035592
answers question: http://stackoverflow.com/q/26035522
type: Answer
has body: you can pass the value in an array like this $("#testID").val([1,2,3]); JsFiddle
score: 0

http://stackoverflow.com/a/26082951
downvote count: 0
has body: var arrayName = []; var arrayButton = []; arrayName["toshiba"] = "50 cm"; arrayName["samsung"] = "80 cm"; for delete if (event.target.id.indexOf("btnDel") != -1) { id = event.target.id.replace('btnDel', ''); delete arrayName[id]; } try this associative method
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26082615
type: Answer
answers question: http://stackoverflow.com/q/26082615
has comment: http://stackoverflow.com/comment/40869833
has comment: http://stackoverflow.com/comment/40875746
score: 2

http://stackoverflow.com/a/26116900
type: Answer
has body: You can pass event json as data. createEvent:function(event){ return $http.get(url, { headers: { 'Authorization' : token }, data : event }) }
answers question: http://stackoverflow.com/q/26116813
has comment: http://stackoverflow.com/comment/40931159
score: 0

http://stackoverflow.com/q/26155717
has answer: http://stackoverflow.com/a/26156001
accepted answer: http://stackoverflow.com/a/26156211
has comment: http://stackoverflow.com/comment/41002723
upvote count: 1
has body: I want to add an autoplay from my slider jquery section. What can i do this ? I have a next &amp; a prev button but I want to add an auto-play and also when mouse hover over image that slide automatically stopped. Anyone can help me here ? This is my DEMO page from codepen jQuery(document).ready(function ($) { var slideCount = $('#slider ul li').length; var slideWidth = $('#slider ul li').width(); var slideHeight = $('#slider ul li').height(); var sliderUlWidth = slideCount * slideWidth; $('#slider').css({ width: slideWidth, height: slideHeight }); $('#slider ul').css({ width: sliderUlWidth, marginLeft: - slideWidth }); $('#slider ul li:last-child').prependTo('#slider ul'); function moveLeft() { $('#slider ul').animate({ left: + slideWidth }, 200, function () { $('#slider ul li:last-child').prependTo('#slider ul'); $('#slider ul').css('left', ''); }); }; function moveRight() { $('#slider ul').animate({ left: - slideWidth }, 200, function () { $('#slider ul li:first-child').appendTo('#slider ul'); $('#slider ul').css('left', ''); }); }; $('a.control_prev').click(function () { moveLeft(); }); $('a.control_next').click(function () { moveRight(); }); });
type: Question
has title: Jquery image slider auto play
score: 1
has answer: http://stackoverflow.com/a/26156211
answer count: 2
possible better answer: http://stackoverflow.com/a/26156001
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41002645
type: AnsweredQuestion

http://stackoverflow.com/q/26123810
has comment: http://stackoverflow.com/comment/116850639
possible better answer: http://stackoverflow.com/a/26123931
has title: Jquery input number with comma
has comment: http://stackoverflow.com/comment/40943708
favorite count: 0
has comment: http://stackoverflow.com/comment/40944267
has comment: http://stackoverflow.com/comment/40944552
score: 2
has body: I'm having a strange behavior in jquery. I'd like to get the value of a input field (type number). It's easier to show it with an example. The function throws back an empty string when the value contains a comma. $("#input[type='number']").on('change',function() { alert($(this).val()); }); Why? Thanks in advance
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26123893
has comment: http://stackoverflow.com/comment/40945274
accepted answer: http://stackoverflow.com/a/26123893
downvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/40943836
has answer: http://stackoverflow.com/a/26123931
tagged with: javascript
tagged with: jquery
upvote count: 2
has comment: http://stackoverflow.com/comment/40944062
answer count: 2

http://stackoverflow.com/comment/40926388
has text: There is no need in `e.preventDefault();` if you use `return false`, because it includes both `.preventDefault()` and `.stopPropagation()`. `$(this).attr('data-toggle')` can be simplified into `$(this).data('toggle')`. And once more: `return false` will prevent info block opening.
comment on: http://stackoverflow.com/a/26099854
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26074696
score: -4
downvote count: 4
upvote count: 0
has answer: http://stackoverflow.com/a/26074753
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26074845
has title: How to make an image toggle 2 divs visibility?
favorite count: 0
has body: im trying to make a div swapper type thing and so ill try and describe it for you... So here are the elements A image button (the toggle button) a div, lets call it div A and another div, div B (this is hidden by default) Here is a visual representation [Button image] This Is Div A when the button is clicked i want div A's visibility to go "hidden" and its display to be "none" while div B's visibility sets to "visible", so then pretty much I'm replacing div a with div b [Button image] This Is Div B then when the toggle image is clicked again i want it to swap back again (Div B's visibility set to "hidden" and it's display set to "none" while Div A's visibility sets to "visable") then i want it to keep going like that so it keeps changing. btw all of this is in a div that is fixed so this will stay at the top of the page. I tried the following which was based on a answer to this question Make an onClick event do something different every other click? my attempts was: Html This Is Div A This Is Div B Css function bindImageClick(){ $("#x").unbind("click"); $("#x").bind("click", function (event) { document.getElementById("b").style.visibility = "visible"; document.getElementById("a").style.visibility = "hidden"; document.getElementById("a").style.display= "none"; $(this).unbind("click"); $(this).bind("click", function(){ document.getElementById("a").style.visibility = "visible"; document.getElementById("b").style.visibility = "hidden"; document.getElementById("b").style.display= "none"; bindImageClick(); }); }); } bindImageClick(); Any help would be great and for some reason i couldn't indent the code so it had that grey background like me visual representations.
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40854250
has comment: http://stackoverflow.com/comment/40862516
tagged with: css
linked to: http://stackoverflow.com/q/13275831
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery

http://stackoverflow.com/comment/40838866
has text: -webkit-transition: font-size 0.3s ease, background-color 0.3s ease; -moz-transition: font-size 0.3s ease, background-color 0.3s ease; -o-transition: font-size 0.3s ease, background-color 0.3s ease; -ms-transition: font-size 0.3s ease, background-color 0.3s ease; transition: font-size 0.3s ease, background-color 0.3s ease;
comment on: http://stackoverflow.com/a/26065218
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26106449
tagged with: requirejs
answer count: 1
type: AnsweredQuestion
has title: RequireJS, Angular, Sharing factory between modules
has answer: http://stackoverflow.com/a/26115624
tagged with: javascript
tagged with: angularjs
type: Question
accepted answer: http://stackoverflow.com/a/26115624
score: 0
has body: We are using requirejs and angular. Right now we try to share a factory between different modules and can't get things working. How is it possible to access http services in a controller/our app? We include our Service file the requirejs way (small extract): requirejs.config( { paths: { httpServices: 'apps/services/Http' } } ); In addition to that we have our app javascript file where we inject our dependencies (the httpService): define( ['angularAMD', "httpServices", 'ngRoute', 'underscore'], function (angularAMD, httpServices) { var app = angular.module( "clientapp", ['ngRoute'] ); var scripts = document.getElementsByTagName( "script" ); var myScript = _.find( scripts, function (s) { return s.src.substr( s.src.lastIndexOf( '/' ) + 1, s.src.length ) === 'index.js'; } ); var url = myScript.src.replace( "index.js", "" ) + "partials/"; app.config(function ($routeProvider) { $routeProvider .when( '/', { templateUrl: url + "dashboard.html" } ) .when( '/basicdata/index/', { templateUrl: url + "basicdata/index.html" } ) } ); return angularAMD.bootstrap( app ); } ); Finally the service itself: define( ['angular'], function (angular) { 'use strict'; /* Root herausfinden */ var root = window.location.pathname.split( "/" )[1]; var httpServices = angular.module( 'httpServices', [] ); httpServices.factory( 'sharedApplication', ['$rootScope', '$http', function ($rootScope, $http) { var sharedApp; sharedApp = {}; sharedApp.currentView = "home-section"; sharedApp.pastEvents = null; $http.get( "/" + root + "/api/search/md:ProductManager/" ).success( function (response) { return sharedApp.pastEvents = response.data; } ); return sharedApp; }] ); return httpServices; } ); Our problem is, that we simply can not get/access the data of the $get-call. We always get an object, which looks like this: Object {_invokeQueue: Array[1], _runBlocks: Array[0], requires: Array[0], name: "httpServices", provider: function…} We guess that something is wrong with the timing of our ajax-call or the way…

http://stackoverflow.com/a/26155393
accepted answer of: http://stackoverflow.com/q/26155357
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26155357
type: Answer
score: 4
has body: You are creating a function called babe and it stays only within the scope of the immediately invoked function expression (IIFE) surrounding it. And since you are not returning anything to the caller, by default, the function call will be evaluated to undefined and that will be stored in a. That is why you are getting the error, TypeError: Cannot read property 'babe' of undefined It means that, you are trying to access a property called babe on an undefined value. In this case, a is undefined. Instead of all this, you can simply return the babe function from the IIFE, wrapped in an object, like this var a = (function() { return { babe: function() { console.log('yay'); } }; })() Now, that the returned object is assigned to a, you can invoke babe function like this a.babe();
upvote count: 4

http://stackoverflow.com/q/26088424
answer count: 1
has title: Mysterious famous-surface under famous-container
tagged with: javascript
score: 0
tagged with: famo.us
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42041848
has answer: http://stackoverflow.com/a/26104213
type: Question
has body: I have a simple mobile app I am putting together. I am trying to understand where a famous surface is coming from, because I think it is causing issues when I try to position an element in the upper-right-hand corner. (But for now let's stick with this mysterious surface) The following code: var mainContext = Engine.createContext() var surface = new ContainerSurface mainContext.add(surface) Results in an element structure: Where does that ... come from? What specifically concerns me is that the height is listed as '0px'. Thanks, JD
has comment: http://stackoverflow.com/comment/41038718

http://stackoverflow.com/q/26129854
answer count: 2
has comment: http://stackoverflow.com/comment/40955429
has comment: http://stackoverflow.com/comment/40955573
type: AnsweredQuestion
has body: I have these following arrays var category = ['Guitar', 'Bass', 'Amps']; var platform_a = ['platform-a1','platform-a2','platform-a3']; var platform_b = ['platform-b1','platform-b2','platform-b3']; var platform_c = ['platform-c1','platform-c2','platform-c3']; And I want to convert them into a json which should look like this { "Guitar":["platform-a1","platform-a2","platform-a3"], "Bass":["platform-b1","platform-b2","platform-b3"], "Amp":["platform-c1","platform-c2","platform-c3"] } How would I do this? I would have to do this in pure javascript
has comment: http://stackoverflow.com/comment/40955772
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40955691
possible better answer: http://stackoverflow.com/a/26129895
type: Question
has answer: http://stackoverflow.com/a/26129895
has answer: http://stackoverflow.com/a/26131349
tagged with: arrays
tagged with: javascript
has title: combining multiple arrays into an object with first array items as the key
accepted answer: http://stackoverflow.com/a/26131349
score: 0

http://stackoverflow.com/comment/40820407
comment on: http://stackoverflow.com/a/26056212
score: 0
type: AnswerComment
type: Comment
has text: @T.J.Crowder yes you are right but i am just shortening the code that it can be done with just two lines instead of writing so many lines to achieve this

http://stackoverflow.com/a/26169995
type: AcceptedAnswer
upvote count: 1
type: Answer
has body: Pretty straightforward approach would be: function doEach(collection) { $.each(collection, function(key, value) { $('#item_code') .append($("&lt;option&gt;&lt;/option&gt;") .attr("value",key) .text(value)); }); } or you could go with very simple plugin: $.fn.populate = function (collection) { return this.each(function () { var $self = $(this).empty(); $.each(collection, function (key, value) { $('&lt;option&gt;').attr('value', key).text(value).appendTo($self); }); }); }; $('#item_type').change(function () { switch (this.value) { case 'CH': $('#item_code').populate(cheeses); break; case 'Z': $('#item_code').populate(sizes); break; } });
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26169869
answers question: http://stackoverflow.com/q/26169869

http://stackoverflow.com/comment/40896158
has text: I think you don't fill in all the fields. Just to clarify: "Fruits", "Vegitables", "Weight" are not values, they are placeholders.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26097279

http://stackoverflow.com/q/26039232
type: AnsweredQuestion
has title: How to abort core-ajax in Polymer
type: Question
accepted answer: http://stackoverflow.com/a/26043997
tagged with: polymer
tagged with: javascript
has body: say I have a core-ajax element configured as such: &lt;core-ajax url='/api/endpoint' response='{{handler}}'&gt;&lt;/core-ajax&gt; say I happen to hit the API at a higher frequency than inverse response time. How do I ensure that handler only gets triggered by the last call to the api, regardless of return order? Basically when I make a new call I want to ignore all previous calls that haven't returned yet.
score: 0
has comment: http://stackoverflow.com/comment/40789059
answer count: 1
tagged with: ajax
has answer: http://stackoverflow.com/a/26043997

http://stackoverflow.com/comment/41774194
score: 0
has text: Yeah I've noticed the odd twirl as well... Not sure how to fix it. Maybe I need to have another intermediate frame inbetween?
type: Comment
comment on: http://stackoverflow.com/a/26127120
type: AnswerComment

http://stackoverflow.com/comment/40940653
comment on: http://stackoverflow.com/q/26122155
score: 0
type: Comment
type: QuestionComment
has text: ah yes, unless its from php :D

http://stackoverflow.com/comment/41021079
comment on: http://stackoverflow.com/a/26165389
type: AnswerComment
score: 0
type: Comment
has text: i added this to my answer above :)

http://stackoverflow.com/q/26051014
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to execute the function that was created separately called uploads.js . This javascript file is a custom image uploader function to be used in Wordpress. I was able to run that javascript file whenever i create a new button just by the of the HTML by sending the needed parameters. There is a part where i created a dynamic button creation function using jquery, where whenever a 'PLUS' sign button is pressed, that function will trigger and a new button is added. The id of that button is automatically incremented by one. The problem here is, whenever i click on the button that was created not by using the dynamic button function, it was able to execute the uploads.js function. But the dynamic created buttons are not able to. It seems like the id of the dynamic button was not detected. I even inspect the element of that page, the id that was sent is exactly the same from what I have sent as a parameter to the uploads.js function. Is there something that i have missed or I have done wrong? Below are the codes: HTML Component 1 Title #1 : Description #1 : uploads.js jQuery(document).ready(function($){ function dynamic_image( button , textbox ) { var custom_uploader; $(button).click(function(e) { e.preventDefault(); //If the uploader object has already been created, reopen the dialog if (custom_uploader) { custom_uploader.open(); return; } //Extend the wp.media object custom_uploader = wp.media.frames.file_frame = wp.media({ title: 'Choose Image', button: { text: 'Choose Image' }, multiple: false }); //When a file is selected, grab the URL and set it as the text field's value custom_uploader.on('select', function() { attachment = custom_uploader.state().get('selection').first().toJSON(); $(textbox).val(attachment.url); }); //Open the uploader dialog custom_uploader.open(); }); } dynamic_image('#upload_image_button' , '#upload_image'); dynamic_image('#section2_1' , '#section2_text1'); dynamic_image('#section2_2' , '#section2_text2'); dynamic_image('#section2_3' …
tagged with: php
accepted answer: http://stackoverflow.com/a/26051198
has title: Running external javascript function from a button clicked that was created dynamically using jquery in Wordpress
type: AnsweredQuestion
tagged with: wordpress
has answer: http://stackoverflow.com/a/26051198
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/comment/40940391
has text: The default value of $(this), the window I guess ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26122115
score: 0

http://stackoverflow.com/comment/40853162
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26073972
has text: No, I didn't mean this. I do not need to append a new one. I have a h4 tag, and I need to somehow make it look like in Google Chrome, Firefox, or probably IE9. So for example the h4 text is rotated, but the IE8 shows it without roation.

http://stackoverflow.com/comment/41153441
has text: Without seeing the larger context of this code it's hard to say, but it looks like you might be reassigning the value to zero with `var price = 0;` each time the button is clicked. Which would mean that it is successfully adding the value - to zero.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26106040

http://stackoverflow.com/a/26098398
type: AcceptedAnswer
has body: You could use mouseover instead and change the first line inside the event-callback, so var matchescan be omitted: document.addEventListener('mouseover', function (e) { if (e.target.tagName.toLowerCase() == 'label') { /* rest of your code */ }, false);
type: Answer
accepted answer of: http://stackoverflow.com/q/26097231
answers question: http://stackoverflow.com/q/26097231
score: 0

http://stackoverflow.com/q/26141012
upvote count: 0
score: -5
has comment: http://stackoverflow.com/comment/40975190
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40975241
has body: So i'm usually pretty good at figuring out these types of problems but this one has got me completely stumped as have been trying to fix for about 6 hours now. i have a web form which contains a username check using jquery script and a php script. it was working fine when i first wrote the code and now has completely stopped working(no idea why). The php script is a pretty standard mysqli query which returns the numrows and then i either echo 1 or 0 to the page depending on if a result was found. this script works fine and have tested it independently and echos 1 if no result was found and 0 if a result was found. in the jquery script i have a min value check and a no value check which both work fine. Then my ajax call and i receive the result with success:function(data). this also has been tested independently by printing the result(data) on screen and prints a 1 on screen when there is no record and a 0 on screen when a record if found so i know everything is working fine with the sent data and im getting the results back i expect. so my only thing left is there must be a problem with my if statement and how it is dealing with the returned data as it always skips to the else even when the condition is met. The only way for the if statement to work is when i set the variable myself and run the script. The long story short is everything works fine except for the final if statement where it always jumps to the else no matter what and says the username is available even when i know its not. Im testing on xampp. Could this be an issue too? Any ideas? Thanks in advance!!! Here is the code: javascript $(document).ready(function(){ //the min chars for username var usermin_chars = 6; //result texts var checking_html = 'Checking...'; //when button is clicked $('#username').blur(function(){ var usernameVal = $("#username").val(); if (usernameVal == '') { $("#username_result").html('Please enter a username!'); $('#username').removeClass(); $('#username').addClass("form_error"…
has comment: http://stackoverflow.com/comment/40976753
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40975431
favorite count: 0
tagged with: ajax
has title: jquery php ajax username check function
downvote count: 5
has comment: http://stackoverflow.com/comment/40978731
has answer: http://stackoverflow.com/a/26151216
tagged with: php
has comment: http://stackoverflow.com/comment/40975078
has comment: http://stackoverflow.com/comment/40975494
has comment: http://stackoverflow.com/comment/40975589

http://stackoverflow.com/comment/133833352
has text: Part of the articles: `Workspaces is known to not work with these frameworks: Create React App`
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26238442
type: Comment

http://stackoverflow.com/q/26156292
has answer: http://stackoverflow.com/a/55292366
has answer: http://stackoverflow.com/a/51981602
has body: What's the JavaScript equivalent to this C# Method: var x = "|f|oo||"; var y = x.Trim('|'); // "f|oo" C# trims the selected character only at the beginning and end of the string!
has answer: http://stackoverflow.com/a/51391391
has answer: http://stackoverflow.com/a/61155288
upvote count: 250
linked to: http://stackoverflow.com/q/399078
tagged with: string
answer count: 23
has answer: http://stackoverflow.com/a/47569033
has answer: http://stackoverflow.com/a/26156888
favorite count: 0
has answer: http://stackoverflow.com/a/54755091
linked to: http://stackoverflow.com/q/1966476
has answer: http://stackoverflow.com/a/58158540
accepted answer: http://stackoverflow.com/a/32516190
has answer: http://stackoverflow.com/a/64426665
has answer: http://stackoverflow.com/a/26156806
has comment: http://stackoverflow.com/comment/135723026
has answer: http://stackoverflow.com/a/69396806
has answer: http://stackoverflow.com/a/43333491
has title: Trim specific character from a string
has answer: http://stackoverflow.com/a/60791245
has answer: http://stackoverflow.com/a/48223242
tagged with: trim
linked to: http://stackoverflow.com/q/6223449
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26156363
has comment: http://stackoverflow.com/comment/139076373
has answer: http://stackoverflow.com/a/26156339
has answer: http://stackoverflow.com/a/73370864
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/78224976
linked to: http://stackoverflow.com/q/20196088
has answer: http://stackoverflow.com/a/32516190
has answer: http://stackoverflow.com/a/77885632
has answer: http://stackoverflow.com/a/55404737
tagged with: javascript
score: 249
possible better answer: http://stackoverflow.com/a/55292366
has answer: http://stackoverflow.com/a/55641743
has answer: http://stackoverflow.com/a/56217256

http://stackoverflow.com/comment/117529441
type: AnswerComment
has text: I have combined this method with the following https://stackoverflow.com/a/1760268/5923833 to resolve the issue with this error. In my case the trigger for the error was hitting enter or reload for the page and then changing the tab to another page. Now, with your code and the other solution I was able to prevent the error on page load and then add the event listener when the user comes back to the tab.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26107174

http://stackoverflow.com/comment/40869499
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26082800
has text: _Tag omission: Must have a start tag and must not have an end tag._ [input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input)

http://stackoverflow.com/q/26106620
has answer: http://stackoverflow.com/a/26106841
has comment: http://stackoverflow.com/comment/40912972
has comment: http://stackoverflow.com/comment/40912963
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/40916399
tagged with: jquery-validate
type: Question
has title: restrict invalid chars from being typed - jquery-validate
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40912953
score: 0
answer count: 1
tagged with: masking
has body: I am using the jquery-validation plugin to validate a simple form. It's working great. Is it possible to restrict the keys from being typed in the textbox completely. I got this FIDDLE which is somewhat close to what I want. &lt;form id="myform" method="post" action=""&gt; &lt;input type="text" id="cstName" name="cstName" /&gt; &lt;input type="text" id="cntNumber" name="cntNumber" /&gt; &lt;input type="submit" id="btn" name="btnSubmit" value="Submit" /&gt; &lt;/form&gt; $.validator.addMethod( "regex", function (value, element, regexp) { var re = new RegExp(regexp); return this.optional(element) || re.test(element); }, "Please check your input." ); $(document).ready(function () { $("#myform").validate({ rules: { cstName: { required: true, regex: /^[0-9\.\-\/]+$/ }, cntNumber: { required: true } } }); }); Here is a simple form created in my MYFIDDLE. Can the words be restricted from being typed using the jquery-validate plugin. And while it restricts, can the error message still be shown??
type: UnansweredQuestion

http://stackoverflow.com/q/26156714
has answer: http://stackoverflow.com/a/26207917
type: Question
tagged with: flash
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26207917
tagged with: easeljs
score: 0
tagged with: canvas
has comment: http://stackoverflow.com/comment/41062004
has body: I'm working in Flash CC to make a HTML5 Canvas game. However, I can't seem to figure out how to create a hitTest between two movieClips. I found some code on EaselJS web but it doesn't work, or I don't understand how it works. This is my code in The actions panel: this.addEventListener("tick",move.bind(this)); function move(){ if (collision(this.bird, this.bar)){ this.bird.play(5); } } function collision(a,b) { var locA = a.globalToLocal(100,0); if (b.hitTest(locA.x, locA.y)) { return true; } }
answer count: 1
has title: HitTest in HTML5 Canvas game using Flash CC
has comment: http://stackoverflow.com/comment/41033650
has comment: http://stackoverflow.com/comment/41028454
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/q/26154327
has title: Saving values from Html form into text file without using PHP
has answer: http://stackoverflow.com/a/26154515
has body: How can i save values from a form when i click submit without using PHP. &lt;form method="post" name="myform"&gt; &lt;p&gt;&lt;input name="login" placeholder="Username" type="text"&gt;&lt;/p&gt; &lt;p&gt;&lt;input name="pass" placeholder="Password" type="password"&gt;&lt;/p&gt; &lt;input name="submit" id="submit" onclick="show_alert();" value="submit" type="submit"&gt; &lt;/form&gt; If text file is not possible. then tell me about any other way to store the data without using PHP. And kindly tell the easiest way possible. I tried to find whole night but failed. Thanks !
has comment: http://stackoverflow.com/comment/41000049
has comment: http://stackoverflow.com/comment/41000120
type: Question
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41000130
has comment: http://stackoverflow.com/comment/41000038
has comment: http://stackoverflow.com/comment/41000050
score: 0
has comment: http://stackoverflow.com/comment/41000230
accepted answer: http://stackoverflow.com/a/26154515
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41000112
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41000053

http://stackoverflow.com/comment/41059681
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26186094
has text: @Barmar Perhaps, but that would violate the 2nd of his 3 OR expressions since that one does not contain a decimal point at all and simply matches `-?\d+` (he writes it as `-?\d\d*`). But I suppose it makes sense; IF there is a decimal point there should be at least 1 digit after it. So as you said `\d{1,3}` should do it (which is what he already has, albeit less simple like you noted too).

http://stackoverflow.com/comment/40954528
has text: Make generic icons if you want full control
type: QuestionComment
comment on: http://stackoverflow.com/q/26129177
score: 0
type: Comment

http://stackoverflow.com/comment/40974320
score: 0
type: Comment
has text: @NiettheDarkAbsol OP said "Cheers, it worked" in that case I guess this awnser is useful isn't it?
type: AnswerComment
comment on: http://stackoverflow.com/a/26140645

http://stackoverflow.com/q/26046071
has comment: http://stackoverflow.com/comment/40802178
has body: I have been trying to create a quick REST API using Nodejs and Express4 as I need an API quickly to make a prototype. While I need all basic CRUD operations, I tried to run the example from the following URL: http://runnable.com/U7bnCsACcG8MGzEc/restful-api-with-node-js-express-4 The example at this address only supports GET, but I believe I could quickly adapt it to support POST, PUT and DELETE. I do not care of having the data on memory, it is even preferable. You can click to see the code there. However, once I have started my server and go on http://localhost:8080/players I get "Cannot GET /players" in my browser. Any idea? If somebody has another short/quick example of a REST API with Nodejs with in-memory persistence, I'll take it as well :)
has answer: http://stackoverflow.com/a/26046160
tagged with: rest
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40802197
tagged with: node.js
has title: Basic REST API with Nodejs and Express4
has answer: http://stackoverflow.com/a/29071639
has comment: http://stackoverflow.com/comment/40802155
type: Question
has comment: http://stackoverflow.com/comment/40802240
tagged with: javascript
tagged with: express
score: 0
answer count: 2
tagged with: api

http://stackoverflow.com/a/26145212
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26144942
has body: When i tried your jsfiddle I clicked on 1 button and I had 3 file browser pop-up so your button are triggering evrey file input. Try this instead : $(document).ready(function () { $('input[id^=file]').hide(); $('button[id^=browse]').click(function () { $(this).prev('input[type=file]').click(); }) });

http://stackoverflow.com/comment/40838601
comment on: http://stackoverflow.com/q/26060234
has text: Thanks Mark for you reply. Yes you are right when click function is called it change the content fo browser and hence script fails. str is String variable which that str=we.toString(); but it display text code which is fetched by selenium
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41025056
score: 0
has text: Not sure if it's the only way, but I've seen it used in some MVVM frameworks, I think. A better way would be a server-side solution, ofcourse.
comment on: http://stackoverflow.com/a/26167735
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26095023
has answer: http://stackoverflow.com/a/26095552
accepted answer: http://stackoverflow.com/a/26095074
type: Question
has comment: http://stackoverflow.com/comment/40892034
tagged with: javascript
has answer: http://stackoverflow.com/a/26095074
score: 0
has comment: http://stackoverflow.com/comment/40892530
tagged with: onchange
has comment: http://stackoverflow.com/comment/40892032
has comment: http://stackoverflow.com/comment/40892654
has comment: http://stackoverflow.com/comment/40892073
has answer: http://stackoverflow.com/a/26095230
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26095152
answer count: 5
has title: JS hide button when change select option
has answer: http://stackoverflow.com/a/26095152
has body: I have simple form: male female male female JS: function myFunction() { $("#save").first().hide(); } I want to hide button "Save" only if select ('gender') have changed option for each user (form). Problem is, that when I change gender for user 2, then button for user 1 hide. Note: there are many forms and users
has comment: http://stackoverflow.com/comment/40891999
has answer: http://stackoverflow.com/a/26095156
type: AnsweredQuestion

http://stackoverflow.com/comment/41060377
comment on: http://stackoverflow.com/q/26186526
type: Comment
type: QuestionComment
score: 0
has text: You're accessing your folder through a webserver. "403 Forbidden" is an HTTP error.

http://stackoverflow.com/comment/40870795
comment on: http://stackoverflow.com/a/26083222
type: Comment
has text: `I hope it's obvious that element ID is completely separate from the name of any JavaScript variables which happen to be holding references to that element.` -- actually IDs do become global variables, see [section 7.2.4](https://html.spec.whatwg.org/multipage/browsers.html#named-access-on-the-window-object) of the HTML5 spec. Hard to tell whether it's relevant to the OP's problem, since the question is nonsense as it's worded now.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26043820
has answer: http://stackoverflow.com/a/73969798
downvote count: 0
has comment: http://stackoverflow.com/comment/40798162
score: 19
type: Question
tagged with: object
has body: I want to make a webpage that displays the current time. When the "12-hour format" button is clicked, the time in 12-hour time will display in the div area. When the "24-hour format" button is clicked, the time will show in 24-hour time in the div area. Currently nothing happens when these buttons are clicked. Help! HTML: Clock 12 Hour Format 24 Hour Format JavaScript: function getTwelveHours{ if (i < 10) { i = "0" + i; } return i; } function startTime() { var today = new Date(); var h = today.getHours(); var m = today.getMinutes(); var s = today.getSeconds(); m = checkTime(m); s = checkTime(s); document.getElementById('textbox').innerHTML = h + ":" + m + ":" + s; t = setTimeout(function () { startTime() }, 500); } startTime(); function getTwentyFourHrs() { var today = new Date(); var h = today.getHours(); var m = today.getMinutes(); var s = today.getSeconds(); m = checkTime(m); s = checkTime(s); document.getElementById('textbox').innerHTML = h + ":" + m + ":" + s; var t = setTimeout(function() { startTime() }, 500); } function checkTime(i) { if (i < 10) { i = "0" + i }; return i; }
tagged with: javascript
answer count: 6
upvote count: 19
has answer: http://stackoverflow.com/a/58698094
has answer: http://stackoverflow.com/a/56566746
has answer: http://stackoverflow.com/a/26044841
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40797994
has answer: http://stackoverflow.com/a/26043971
has title: Display 12-hour and 24-hour time
type: UnansweredQuestion
tagged with: datetime
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/58700231

http://stackoverflow.com/comment/40864082
type: Comment
type: QuestionComment
has text: There's a function called xmlhttpPost in the linked http://www.dimplex.co.uk/schema/js/pagescript.js file. I don't think it's related to the calculations, but it maybe. It'd be a bit of a pain to unravel the whole thing
comment on: http://stackoverflow.com/q/26048285
score: 0

http://stackoverflow.com/comment/43275454
score: 0
type: QuestionComment
type: Comment
has text: Table fields are given below . id,qualification,descriptions,status from that I need qualification in option and id as value its value
comment on: http://stackoverflow.com/q/26056058

http://stackoverflow.com/comment/40834296
has text: @SunilD. I'm using 1.2.23, i'll try change to 1.3.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26059172

http://stackoverflow.com/q/26079463
score: 2
tagged with: mustache
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40864652
upvote count: 2
tagged with: handlebars.js
type: Question
has title: Bind this to a handlebars button
has answer: http://stackoverflow.com/a/26079812
accepted answer: http://stackoverflow.com/a/26079768
tagged with: underscore.js
tagged with: javascript
has body: So I got a large JSON with many items nested into topics and I use mustache.js to make a button from each topic. Now I want to bind a reference to the sub-object into each button so that its onClick() will not have to perform a heavy lookup and without pasting huge amounts of data into the button's event. Can this be done with mustache or with another templating language? The JSON: myJson={ "topics": [ { "name":"topic 1", "id":1, "items":[ "name":"a great item", "data": {...} ] }, ... } The template: {{#topics}} &lt;button onClick="_.bind(browseToTopic,{{this}})"&gt;{{name}}&lt;/button&gt; {{/topics}}
answer count: 2
has answer: http://stackoverflow.com/a/26079768
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/26079812
linked to: http://stackoverflow.com/q/3896730

http://stackoverflow.com/a/26111893
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26111855
has body: You actually weren't too far off, this is going to refer to the current DOM node though, not the src of the image as your code assumes: $('.circle_hiw_cont img').click( function() { if(this.src == "content_img_1.jpg") { $("#content_1").css("display", "block"); $("#content_2").css("display", "none"); $("#content_3").css("display", "none"); } else { } } );

http://stackoverflow.com/q/26118815
type: Question
has comment: http://stackoverflow.com/comment/40934259
has comment: http://stackoverflow.com/comment/40934397
has title: Auto Set fields with $scope variables - AngularJS
downvote count: 0
tagged with: javascript
tagged with: angularjs-scope
has comment: http://stackoverflow.com/comment/40934777
has answer: http://stackoverflow.com/a/26119515
answer count: 1
score: 1
favorite count: 0
has body: aving trouble filling text field and pre select a dropdown. This is my angular code. angular.module('MyCtrl', []) .controller('myController', ['$scope','$http', function($scope,$http) { $scope.user = {}; $scope.master = {}; $scope.user.name='Fahad'; //this text field and is not working $scope.user.gender='Male'; //this is select and also not working $scope.update = function(user) { //... some code that take all the user fields and update to DB }; $scope.reset = function() { $scope.user = angular.copy($scope.master); }; $scope.reset(); }]); HTML: Male Female Everything else is fine. update function takes all the text fields and update, but for some reason i need to have some fields pre-filled. Thanks for hlep.
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40934271
has comment: http://stackoverflow.com/comment/40934437
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26119515
has comment: http://stackoverflow.com/comment/40934432
upvote count: 1
has comment: http://stackoverflow.com/comment/40934327

http://stackoverflow.com/comment/40800662
score: 2
has text: This seems like maybe it's a follow-up to a previous question or something, I'm not sure... but it's somewhat missing context. Can you explain clearly what you're doing here and what's going wrong with it?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26045296

http://stackoverflow.com/q/26077681
has body: I setup a form that people fill out. One of the form fields is a county dropdown. The form action creates a cookie: setcookie("county", $county, time() + 3600 /* one hour */, '/', 'subdomain.mydomain.com', false, false); On the confirmation page I have multiple divs that are hidden by default: County 1 Content County 2 Content County 3 Content and so on... Based on the county the user selects from the select drop down on the previous page I want the particular div to to display. I tried: <input id="county" name="county" value="<?php echo($_COOKIE['county']); ?>"> and $('#county').on('load', function () { if(this.value === "County1"){ $("#county1").show(); } else { $("#county1").hide(); } }); but input doesn't seem to support onLoad. Any suggestions? Thanks!!
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40860543
tagged with: cookies
type: Question
score: 0
answer count: 1
tagged with: javascript
has title: Show / Hide div based on Cookie Value
tagged with: jquery
has answer: http://stackoverflow.com/a/26077726
accepted answer: http://stackoverflow.com/a/26077726

http://stackoverflow.com/comment/40953789
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26127154
has text: Thanks so much! Works perfectly and taught me a few things about neat code as well :D

http://stackoverflow.com/a/26047074
accepted answer of: http://stackoverflow.com/q/26046504
answers question: http://stackoverflow.com/q/26046504
type: Answer
has body: From the documentation: Select2 provides some shortcuts that make it easy to access local data stored in an array... ... such an array must have "id" and "text" keys. Your json object does not contain "id" or "text" keys :) This should work though i have not tested it: results: function (data, page) { return { results: data, id: 'Id', text: 'Name' } } There's further documentation following the link on alternative key binding... I believe thats where your problem lies. Hopefully this helps.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40848003
has comment: http://stackoverflow.com/comment/40848115
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40810301

http://stackoverflow.com/q/26106941
score: 0
has comment: http://stackoverflow.com/comment/40915674
has comment: http://stackoverflow.com/comment/40914866
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
has body: I'm currently creating my own portfolio but i have a hard time fixing a problem. I did use this jquery code for smoothscroll: $(function() { $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') &amp;&amp; location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('html,body').animate({ scrollTop: target.offset().top }, 1000); return false; } } }); }); And the menu bar i did use this to scroll to a part of my page: &lt;a href="#skills"&gt;Skills&lt;a/&gt; and scrolling smooth to the place I create this: &lt;div id="Skills"&gt;&lt;/div&gt; its working. In my website i used a position:fixed; for my menu so it will scroll with me. When I use &lt;div id="Skills"&gt;&lt;/div&gt; i get a part of the text it has to show under (behind) the menu bar. When I use higher in the code it still wont get on the right place. You can see this as an example: http://soziev.com/ As you can see it stops at the right place, mine does stop under (behind) the menu bar Can you help me with this problem?
type: UnansweredQuestion
has title: Smartscroll not stopping at the right place
has comment: http://stackoverflow.com/comment/40914969
has comment: http://stackoverflow.com/comment/40914668
type: Question
has comment: http://stackoverflow.com/comment/40914256
tagged with: smooth-scrolling
has comment: http://stackoverflow.com/comment/40915028
has comment: http://stackoverflow.com/comment/40914499
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40915726
has comment: http://stackoverflow.com/comment/40915306

http://stackoverflow.com/comment/41051542
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26181989
score: 1
has text: You'll need an event-based solution, this is not going to work.

http://stackoverflow.com/a/26129730
score: -1
downvote count: 1
answers question: http://stackoverflow.com/q/26129633
has body: jQuery has $.browser object, see the documentation this might help you if(! $.browser.msie ) { $('#divid a').click(function(e) { e.preventDefault(); }); }
type: Answer
upvote count: 0
has comment: http://stackoverflow.com/comment/40955571
has comment: http://stackoverflow.com/comment/40955806
has comment: http://stackoverflow.com/comment/40955409

http://stackoverflow.com/q/26074432
upvote count: 1
has answer: http://stackoverflow.com/a/26075165
type: Question
tagged with: javascript
tagged with: chat
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26075165
has body: I would like to create a chat, with a facebook-like "xyz is typing" feature. onKeydownSource.subscribe(function() { var typing = true; }.bind(this)); onKeydownSource.throttle(500).subscribe(function(e) { var typing = false; }.bind(this)); I use this snippet to register, when the user stops typing. Now imagine e to be { userId: 13, conversationId: 23 } And my streams/subscriber to be onKeydownSource.subscribe(function(e) { typingInConversations[e.conversationId][e.userId] = true; }.bind(this)); onKeydownSource // What should be here? .subscribe(function(e) { typingInConversations[e.conversationId][e.userId] = false; }.bind(this)); This means for every keydown I register the user and the conversation the user is typing in. My question is, how can I throttle only "events" with the same userId+conversationId?
has title: RxJS Reactive Programming
tagged with: rxjs
favorite count: 0
tagged with: reactive-programming
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/41011603
comment on: http://stackoverflow.com/a/26158884
score: 0
type: AnswerComment
has text: @Ilyass I don't know why you should use such syntax but as you see it works (I found it in some docs in Google)
type: Comment

http://stackoverflow.com/q/26061098
score: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has title: Passing $routeParams between controllers via dependency injection
tagged with: controller
tagged with: angularjs
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/26061390
has body: I would like to know how to pass a variable within the scope of this controller to another controller. What i want to do is take the vm.search (searchParameters) and pass it to another controller. /// (function () { 'use strict'; var controllerId = 'GroupMaintenanceBrowsePlansCtrl'; angular.module('myApp').controller(controllerId, ['$scope', 'RenewalGroupDataService', 'logger', Controller]); function Controller($scope, datacontext, logger) { logger = logger.forSource(controllerId); var logError = logger.logError; var logSuccess = logger.logSuccess; var logWarning = logger.logWarning; var vm = {}; $scope.vm = vm; vm.getPlans = getPlans; vm.plans; vm.loadingPlans = false; vm.pageSize = 100; function getPlans(searchParameters) { vm.loadingPlans = true; vm.search = searchParameters; datacontext.getAssignedPlans(searchParameters, vm.pageSize).then(function (plans) { vm.plans = plans; //Compares which columns are being populated for choosing which headings to show if (vm.search.MchNumber != null ||vm.search.ContractNumber != null || vm.search.PlanCode != null) { vm.detail = true; } if (vm.search.DivisionName != null || vm.search.PoolName != null || vm.search.SubpoolName != null || vm.search.RenewalGroupName != null) { vm.detail = false; } //Sets values to NULL after every search is performed vm.search.MchNumber = vm.search.ContractNumber = vm.search.PlanCode = vm.search.DivisionName = vm.search.PoolName = vm.search.SubpoolName = vm.search.RenewalGroupName = null; }).finally(function () { vm.loadingPlans = false; }); } }; })();
has comment: http://stackoverflow.com/comment/40829523

http://stackoverflow.com/comment/40813022
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26051935
has text: @ohk Gani.You need table also dynamic.
score: 0

http://stackoverflow.com/comment/40851964
has text: So do you want a javascript function to output dd/mm/yyyyy from a Date object, to convert a string in that format to a Date, and to validate the resulting date?
comment on: http://stackoverflow.com/q/26072990
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26120514
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26120664
type: Question
has body: I want to use an ng-if inside an ng-repeat (as described in this question): However, I want to display a row in a table if and only if the if condition holds. In the answers to the question above, you will get empty div tags where the if condition does not hold. This does not cause much of a problem with divs, but when doing the same with tables, you do not want to have div (or span) tags inbetween tr tags. Is there another tag or directive that I could use?
has comment: http://stackoverflow.com/comment/41142491
has answer: http://stackoverflow.com/a/26120735
accepted answer: http://stackoverflow.com/a/26120735
tagged with: javascript
has answer: http://stackoverflow.com/a/26120703
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs
has title: What is the best way to only display some of the html elements in the ng-repeat loop
possible better answer: http://stackoverflow.com/a/26120664

http://stackoverflow.com/comment/40948346
type: Comment
comment on: http://stackoverflow.com/a/26125597
score: 0
type: AnswerComment
has text: Ah yes, I must have just been offended since you couldn't possibly be rightfully corrected. I'm satisfied with my vote placement. Given a page that has only 10 click handlers bound, and a user clicks somewhere on an element nested 10 levels deep, the `.is()` is going to run 100 times, even if the click took place where there was no targeted element. Nope, can't see suggesting that to people.

http://stackoverflow.com/comment/40824387
comment on: http://stackoverflow.com/a/26058441
type: AnswerComment
has text: @Arron if you want the slideshow to be in the right column than give the column an id and change the `getElementById()` to match the name of your id
score: 0
type: Comment

http://stackoverflow.com/comment/41053268
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26182587
score: 0
has text: just use ` display: none` in the CSS for that class element` and then set the class to `block` with jquery when you want to display the class. Take a look at this link : http://www.w3schools.com/cssref/pr_class_display.asp and http://www.w3schools.com/css/css_display_visibility.asp for info.

http://stackoverflow.com/comment/40825592
comment on: http://stackoverflow.com/a/26059114
type: Comment
has text: Thank you very much for the answer, but how can I then assign all the el.label.value elements to a dropdown menu? I would be grateful!
score: 0
type: AnswerComment

http://stackoverflow.com/a/26180058
downvote count: 0
has body: So here is the solution: if (window['phantom'] || window['_phantom']) return; location.reload(); window['phantom'] - indicates presence PhantomJS, but when you use grover this property is absent :( window['_phantom'] - indicates presence PhantomJS using grover Using this simple solution you can skip as may code as you want, good luck!
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26180057
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26180057

http://stackoverflow.com/comment/40795030
type: AnswerComment
has text: @RobinHellemans: When it comes to default operator precedence, apart from those that comes naturally from mathematics, you can't reason about their behavior. In these cases, the specification simply enforces the behavior.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26038083

http://stackoverflow.com/comment/40834602
comment on: http://stackoverflow.com/a/26063384
has text: That was it!! Thank you very much for the help unlike @torazaburo
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26186010
has answer: http://stackoverflow.com/a/26186558
has comment: http://stackoverflow.com/comment/41061452
type: Question
has comment: http://stackoverflow.com/comment/41060285
answer count: 2
has answer: http://stackoverflow.com/a/26187183
has comment: http://stackoverflow.com/comment/41059336
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/26187183
accepted answer: http://stackoverflow.com/a/26186558
has body: I am trying to repopulate a form with previously stored values, issue is that many of the select boxes are loaded dynamically with ajax and there are other functions bound to the change "event" that populate select boxes based on previous selection. My issue is that for some reason I can't get the .trigger("change") to work so my select boxes do not get populated and I have the code to bind onchange once a box is populated but cant get the first box to fire the changed event. If I enter $("#mybox").trigger("change") in browser console it works but not while inside js. The values get set alright but event never gets triggered selectBox.val(this.selectedValue).prop('disabled', this.disabled).trigger("change"); function repopulateForm(data){ $(data).each(function () { switch (this.type) { case "input": $("#" + this.id).val(this.value).prop('disabled', this.disabled); break; case "checkbox": $("#" + this.id).prop('checked', this.isCheckedBox).prop('disabled', this.disabled).trigger("change"); break; case "select": var selectBox = $("#" + this.id); //Check if the select box has options if (selectBox[0].length > 1) {/ if (this.disabled == false) //ignore disabled selectBox.val(this.selectedValue).prop('disabled', this.disabled).trigger("change"); } else { //Bind to element untill its filled $(selectBox).one("change", this, function (event) { data=event.data; $("#" + data.id).val(data.selectedValue).prop('disabled', data.disabled).trigger("change");; }); var test; } break; } }); }; This is how form looks initially: After I select a value the change event gets triggered and next box gets populated dynamically with options, and now it is enabled and has options. My issue is that I can't trigger the change event programmatically so next box can get populated.
tagged with: jquery-events
score: 2
has title: JavaScript trigger event inside loop
upvote count: 2
has comment: http://stackoverflow.com/comment/41061278
tagged with: each
type: AnsweredQuestion

http://stackoverflow.com/comment/63844601
score: 0
type: Comment
has text: The weather tiles would need to be refreshed.
comment on: http://stackoverflow.com/a/26125257
type: AnswerComment

http://stackoverflow.com/q/26151388
answer count: 1
has answer: http://stackoverflow.com/a/26151439
type: UnansweredQuestion
has body: I have an array, where each index causes an action to be performed in a buildup. When I slide the slider, I notice that when I do: ui.value, it sometimes "skips" numbers. For example... the slider may start 0,1,2,3,4, but if I slide a little faster, it may jump from 54 to 56, in which since 55 is skipped, I miss an actioin that is performed there. How can I make sure that if the user "slides the mouse a little fast", it will make sure the slide event is fired for each of the numbers with step size of 1? or is there a better way?
type: Question
has title: How to prevent jquery UI slider from skipping slide values?
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/q/26069440
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40845228
has comment: http://stackoverflow.com/comment/40845119
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
has title: css conflict with javascript
has comment: http://stackoverflow.com/comment/40845391
has body: I'm using a live chat service for my website which uses the following code inserted into the header: &lt;script type='text/javascript'&gt; (function() { var done = false; var script = document.createElement('script'); script.async = true; script.type = 'text/javascript'; script.src = 'https://app.mychat.com/VisitorWidget/WidgetScript'; document.getElementsByTagName('HEAD').item(0).appendChild(script); script.onreadystatechange = script.onload = function(e) { if (!done &amp;&amp; (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) { var w = new PCWidget({ c: 'd15cbifh-61bb-49f1-9f98-06d885919a84', f: true }); done = true; } }; })(); &lt;/script&gt; It is conflicting with one css div .btn on my site. I don't want to change all the css and code on my site for this one div, is there a work around, maybe some inline css I can use for the javascript? Thank you.
type: Question

http://stackoverflow.com/comment/40908155
score: 0
type: Comment
type: QuestionComment
has text: There's no JavaScript code in the jsfiddle you linked. How exactly did your ` ` attempt not work?
comment on: http://stackoverflow.com/q/26104139

http://stackoverflow.com/a/26114498
type: Answer
answers question: http://stackoverflow.com/q/26114435
score: 0
has comment: http://stackoverflow.com/comment/40926819
has comment: http://stackoverflow.com/comment/40926768
has body: Just remove controller name in you html

http://stackoverflow.com/comment/135779935
score: 0
type: AnswerComment
has text: @JonJaques why "naive"? this looks really nice and simple. I don't think this is incomplete in any way, is it? if so, it would be good to elaborate on why you think this approach is "naive" :-)
comment on: http://stackoverflow.com/a/34637436
type: Comment

http://stackoverflow.com/a/26034432
has body: Suggested improvements: When using jQuery avoid connecting events via attributes. Also use jQuery for select value checking (using val()). Remove the onchange attribute and try this instead: // Shortcut DOM ready handler $(function(){ // Listen for change event $('#CustomerType').change(function(){ // Use jQuery val() to get select values var customerType = $(this).val(); if (customerType == 10) { $("#TaxNumber").attr("data-required", 'false'); } if (customerType == 20) { $("#TaxNumber").attr("data-required", 'true'); } }); }); JSFiddle: http://jsfiddle.net/TrueBlueAussie/CmW9e/1/ If you inspect the DOM you will see the data-required attribute is set correctly. Your original "works" too: Your original code also works: http://jsfiddle.net/TrueBlueAussie/CmW9e/2/ so it is more likely the problem that your validation framework does not pickup dynamic changes to the required flag. Is the issue actually that you expected the validation rules to update automatically based on that attribute? Solution: Most validation frameworks allow you to change the rules client-side (add and remove rules etc), but you will need to provide details of the validation framework you are using to get a specific answer :)
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40780568
score: 0
answers question: http://stackoverflow.com/q/26034192
type: Answer
accepted answer of: http://stackoverflow.com/q/26034192

http://stackoverflow.com/comment/41054292
type: Comment
type: QuestionComment
score: 1
has text: @settinghead: You basically can't do it in IE8 and earlier, because if I'm understanding the desired behavior, you need `Object.defineProperty`, which IE8 didn't properly support. (You want writes to `b` to be completely ignored, right? So if `b` is a front to `a`, `b.foo = "whatever"` shouldn't change what you get back from `b.foo`, right?)
comment on: http://stackoverflow.com/q/26183148

http://stackoverflow.com/comment/40890171
has text: I am trying to select the word 'manik' but the select option has 'Manik'.so the code not works for this scenario..
comment on: http://stackoverflow.com/a/26092796
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26174151
has comment: http://stackoverflow.com/comment/41037412
has title: php won't post value to email
tagged with: php
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26174466
tagged with: forms
type: Question
has answer: http://stackoverflow.com/a/26174466
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41037141
has body: I have added a button onclick function to a web form, so that onClick new input text field is created. However when the forms posts to email, Quote_Num value isn't posted - it just says "Array" JS var counter = 1; var limit = 8; function addInput(divName) { if (counter == limit) { alert("You have reached the limit of adding " + counter + " inputs"); } else { var newdiv = document.createElement('div'); newdiv.innerHTML = "Quote Number " + (counter + 1) + " "; document.getElementById(divName).appendChild(newdiv); counter++; } } HTML Quote Number * Add Quote Number PHP <?php $Quote_Num = $_POST["Quote_Num"]; foreach ($Quote_Num as $eachInput) { echo $eachInput . " "; } ?> Anyone with my experience with PHP help me get the form to post value of Quote_Num?
has comment: http://stackoverflow.com/comment/41037330
score: 0

http://stackoverflow.com/q/26081187
has comment: http://stackoverflow.com/comment/40866863
has answer: http://stackoverflow.com/a/26081275
accepted answer: http://stackoverflow.com/a/26081286
has title: Javascript: cut string and return in different inputs
possible better answer: http://stackoverflow.com/a/26081317
has answer: http://stackoverflow.com/a/26081317
has body: I'm trying to cut a string in different part, and return each part into a different input. Here's an example: Consider the following string: Hello|World|! As you can see, there is a separator, which is |. I'd like to separate each part of the string cut by this | and return them into a different input. I can't use str.substr() (at least the usual use of it, maybe you have a trick) because the number of characters between the | is not fixed, sometimes it will be 2 characters, sometimes 16, and from what I know str.substr() requires to set the number of characters before the cut. Basically I'm looking for a solution as Excel provides in the Convert feature, where you define a separator and Excel will separate each part of the value into different cells each times he finds the separator set. This is the first part of the Javascript, taking the value of the textarea where the string is pasted: function cutTheString() { var str = document.getElementById('textarea').value; } And this would be the HTML: &lt;textarea id="textarea"&gt;&lt;/textarea&gt; &lt;br /&gt; &lt;input type="submit" value="Cut string" onClick="cutTheString()" /&gt; &lt;input type="text" id="string1"&gt;&lt;/input&gt; &lt;input type="text" id="string2"&gt;&lt;/input&gt; &lt;input type="text" id="string3"&gt;&lt;/input&gt; For now I have document.getElementById('string1').value = str(); which returns the full string into the first input. I also have the possibility to transform the separator | into , by using var res = str.split("|"); but that doesn't really help my case.
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40866737
has comment: http://stackoverflow.com/comment/40866723
has comment: http://stackoverflow.com/comment/40866700
answer count: 3
has comment: http://stackoverflow.com/comment/40866756
tagged with: javascript
tagged with: string
score: 0
has comment: http://stackoverflow.com/comment/40866828
has answer: http://stackoverflow.com/a/26081286

http://stackoverflow.com/q/26038716
has answer: http://stackoverflow.com/a/26038877
type: AnsweredQuestion
has title: IF condition to enable a script property (jquery) for IE7 users?
possible better answer: http://stackoverflow.com/a/26038790
type: Question
has answer: http://stackoverflow.com/a/26038790
accepted answer: http://stackoverflow.com/a/26038877
linked to: http://stackoverflow.com/q/15755459
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26038795
score: 0
answer count: 3
has body: To condition something in jquery for IE7, I read here it's best to use this in the &lt;HEAD&gt;: &lt;!--[if IE 7]&gt; &lt;html class="ie7"&gt; &lt;![endif]--&gt; Now, out of the following code, I want transition: "elastic", to be there only if it's ie7: $(document).ready(function() { $(".cbox").click(function(e) { e.preventDefault(); $.colorbox({ transition: "elastic", overlayClose: false, opacity: 0.8, }); return false }) }); So I tried doing something like: $(document).ready(function() { $(".cbox").click(function(e) { e.preventDefault(); $.colorbox({ if ($('html').hasClass('ie7') {transition: "elastic",} overlayClose: false, opacity: 0.8, }); return false }) }); But it's not the way to do this I guess... how should this be done?

http://stackoverflow.com/comment/41052907
has text: does not work because my position needs to be a fixed position @だらんぎんじょん
comment on: http://stackoverflow.com/a/26182626
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41027706
comment on: http://stackoverflow.com/q/26167489
score: 0
has text: updated including page source
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26105146
type: AnsweredQuestion
has title: validate if 1 to 3 chekboxes are cheked but with different id
accepted answer: http://stackoverflow.com/a/26105307
type: Question
linked to: http://stackoverflow.com/q/4227043
tagged with: javascript
has answer: http://stackoverflow.com/a/26105307
score: 0
tagged with: validation
answer count: 1
has comment: http://stackoverflow.com/comment/40910530
has body: I have a little problem here, so I have a form, inside I have 8 chekboxes in one section all are with images above them so if the user click over the image to check their specific chekboxes to . Here is the code of my chekboxex and the script to validate them: function logotype() { var group = document.newlogo.ltype; for (var i=0; i<group.length; i++) { if (group[i].checked) break; } if (i==group.length) return alert("Please select 1 to 3 Logo Types"); } Letter Mark Logo Emblerm Logo As you may see the id="ltype" if i make all my checkboxes with the same id it works with validating but after this my checkboxes can't be checked from images because for="anothername" if i put ltype it makes all jujst select one field . . So the question is: Can I somehow validate the checkboxes based on their class names so that at least 1 to three checkboxes are checked when submit?
tagged with: jquery
has comment: http://stackoverflow.com/comment/40910291
has comment: http://stackoverflow.com/comment/40910317
tagged with: checkbox

http://stackoverflow.com/comment/40874566
type: Comment
has text: "Now, obviously this doesn't work" — Why obviously? What behaviour do you get? What behaviour do you expect? What error messages are reported in your JavaScript console?
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26085668

http://stackoverflow.com/comment/40935129
has text: yes i got <?php require("timezone.php"); print get_time_zone("IN",""); ?> when i use this i got right result but how to get "IN","" by ip ??
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26118580
type: Comment

http://stackoverflow.com/comment/40935992
score: 0
type: Comment
has text: I'm trying out your updated code right now, but I'm a bit confused as to what settings I need to put in for the ajax settings. I see the list of settings [here](http://api.jquery.com/jquery.ajax/), but I'm just trying to move a div around so which settings would I need to insert?
comment on: http://stackoverflow.com/a/26119346
type: AnswerComment

http://stackoverflow.com/q/26061728
has comment: http://stackoverflow.com/comment/40831149
has body: I'm using AngularJS directive with custom templateUrl: directive('myDirective', function() { return { restrict: 'E', templateUrl: 'views/partials/templatel.html', replace: true, transclude: false }; }); Now, the problem is that I'm also loading jQuery plugin that is trying to bind the elements in template1.html, but this template file is loaded after the plugin, so it fails. Is there a way I can defer plugin loading after this template is loaded or what I should do in this case ?
favorite count: 0
answer count: 0
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/40830609
score: 1
has comment: http://stackoverflow.com/comment/40831263
type: Question
has comment: http://stackoverflow.com/comment/40831354
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: How to load directive's template before jQuery plugin?
has comment: http://stackoverflow.com/comment/40831064
has comment: http://stackoverflow.com/comment/40830990

http://stackoverflow.com/comment/41010857
type: Comment
score: 0
type: AnswerComment
has text: If you're going to use angular I recommend putting all logic inside of your angular code. I'm not sure why you would need a variable in a script tag outside of your angular code.
comment on: http://stackoverflow.com/a/26153755

http://stackoverflow.com/q/26181365
type: Question
answer count: 3
upvote count: 1
possible better answer: http://stackoverflow.com/a/26181468
has answer: http://stackoverflow.com/a/26181428
favorite count: 0
accepted answer: http://stackoverflow.com/a/26181428
has answer: http://stackoverflow.com/a/26181468
has body: I cannot understand where i am going wrong. Simple Form. Phone Number I have tried a couple other Regex's to get this to work but no luck. I am tring to get an output like: 1112223333, 111-222-3333, (111)222-3333, 111 222 3333, 111.222.3333 Currently it is not validating at all.
has answer: http://stackoverflow.com/a/26183227
tagged with: regex
has title: Regex with PHP and Javascript
downvote count: 0
score: 1
type: AnsweredQuestion
tagged with: javascript

http://stackoverflow.com/comment/92334273
score: 1
has text: you should add some context with your code to explain why and how it will solve the problem
comment on: http://stackoverflow.com/a/52701533
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40845775
type: Comment
has text: But it's in the value of an ` `, which does not collapse white-space (in general, for most HTML elements, you're right; but not in this context, unless I'm really mis-reading your answer?)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26069675

http://stackoverflow.com/comment/41056006
type: Comment
score: 2
comment on: http://stackoverflow.com/q/26183944
has text: Yeah, I know that. I was just wondering if there is something like optional chaining in JavaScript because JS is full of surprises.
type: QuestionComment

http://stackoverflow.com/comment/40811019
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26050829
has text: Tyler: I am not using any url, just sample viedo (i.e short-sample-video.mp4)
score: 0

http://stackoverflow.com/comment/40964446
score: 0
comment on: http://stackoverflow.com/q/26134530
type: Comment
type: QuestionComment
has text: IE 9, Tried everything in the comments. But nothing seems to be working.

http://stackoverflow.com/comment/41034928
type: AnswerComment
has text: A code snippet is executable HTML and Javascript in the question.
type: Comment
comment on: http://stackoverflow.com/a/26172761
score: 0

http://stackoverflow.com/q/26139312
duplicate of: http://stackoverflow.com/q/750486
has answer: http://stackoverflow.com/a/26139368
score: 0
has comment: http://stackoverflow.com/comment/40972132
answer count: 2
tagged with: javascript
has title: How to show current loop iteration in click function, javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26139382
type: AnsweredQuestion
tagged with: loops
upvote count: 1
accepted answer: http://stackoverflow.com/a/26139382
downvote count: 1
has body: JSFiddle var arr = [ [0], [1], [2], [3] ]; for ( var i = 0; i &lt; arr.length; i++ ) { $('#btn-' + i).click(function() { console.log(i); }); } When I'm clicking on corresponding button console.log always shows me last iteration instead of the current iteration. Why?
linked to: http://stackoverflow.com/q/750486
type: Question
possible better answer: http://stackoverflow.com/a/26139368

http://stackoverflow.com/a/54089284
answers question: http://stackoverflow.com/q/26046687
has body: In nodejs by using node-boolify it is possible var Boolify = require('node-boolify').Boolify; if (Boolify(myVar) == false) { //Instructions when satisfy } else { //Instructions when not satisfy } Boolean Conversion Results Boolify(true); //true Boolify('true'); //true Boolify('TRUE'); //null Boolify(1); //true Boolify(2); //null Boolify(false); //false Boolify('false'); //false Boolify('FALSE'); //null Boolify(0); //false Boolify(null); //null Boolify(undefined); //null Boolify(); //null Boolify(''); //null
type: Answer
upvote count: 2
downvote count: 2
score: 0

http://stackoverflow.com/q/26070565
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has title: Javascript: Removing media query from external css file
favorite count: 0
accepted answer: http://stackoverflow.com/a/26071161
tagged with: css
type: AnsweredQuestion
tagged with: media-queries
type: Question
has answer: http://stackoverflow.com/a/26071062
has answer: http://stackoverflow.com/a/36022184
tagged with: javascript
score: 4
possible better answer: http://stackoverflow.com/a/36022184
upvote count: 4
answer count: 3
has body: How could I remove media query loaded from external css file (&lt;link rel="stylesheet" type="text/css" href="XXXX.css" media="screen"&gt;)? Note that I cant disable the entire link tag because other important styles are included out of that media query: body{...} .container{...} ... @media(min-width:XXXpx) { .... } ... Thank you!
has answer: http://stackoverflow.com/a/26071161

http://stackoverflow.com/a/26130500
has comment: http://stackoverflow.com/comment/40956685
has comment: http://stackoverflow.com/comment/40956761
answers question: http://stackoverflow.com/q/26130450
has body: No jQuery (Bootstrap or other JS) plugins will work correctly with Angular without wrapping them in a directive. That's because the DOM is being torn down and recreated and jQuery plugins don't know about this, so they don't know when to run. A directive solves this using a post-compile hook called a "link function". You'll have to learn how to create a directive, or find one that's made already, in order for other JS plugins to work correctly. Think of the link function similarly to jQuery's $(document).ready() function.
has comment: http://stackoverflow.com/comment/40986976
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41166172

http://stackoverflow.com/a/26109007
accepted answer of: http://stackoverflow.com/q/26107249
type: Answer
answers question: http://stackoverflow.com/q/26107249
downvote count: 0
has body: You need to bind the handler just to the specific element, not all .decline elements. Remove the $(document).on('click', ...) handler, and change it to: wrapper.children('.decline').click(function() { ... });
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/40980250
type: Comment
type: QuestionComment
has text: `var google_conversion_value = 0;` this line kinda make that whole if block useless
comment on: http://stackoverflow.com/q/26143592
score: 0

http://stackoverflow.com/q/26055928
has title: Dynamically generate textboxes for php form, put them into array, implode to string and write string to db
upvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/40819842
tagged with: implode
tagged with: php
score: 2
type: AnsweredQuestion
downvote count: 0
favorite count: 0
tagged with: mysql
type: Question
tagged with: arrays
has body: The following Javascript function works and adds 1-10 input fields to a form. The user can choose how many using an option menu. function run() { var i = document.getElementById("radioNumber").value; while (document.getElementById("neu").firstChild) { neu.removeChild(neu.firstChild); } for(j=0; j<i; j++){ var feld = document.createElement("input"); feld.setAttribute("name", "myNewField[]"); document.getElementById("neu").appendChild(feld); } } This is the form: " method="post"> Name your textfield Choose a step Select 3 4 5 Choose a position How many radio fields do you want to add? Select 1 2 3 4 5 6 7 8 9 10 This is my PHP code where I try to insert the values in a db. Everything works great except inserting the variable $entries. I get the array myNewField[] and want to implode it in order to insert for example entry1$$entry2$$entry3$$entry4 as a string. The field entries in the db remains empty but print_r($_POST) shows me that the entries are written in the array myNewField[]... Does anyone see the error? <?php if(isset($_POST["title2"])){ $title2 = htmlspecialchars ($_POST["title2"]); $req = htmlspecialchars ($_POST["required"]); $step2 = htmlspecialchars ($_POST["step2"]); $pos2 = htmlspecialchars ($_POST["pos2"]); $entries = implode("$$",$_POST["myNewField[]"]); echo "test".$entries; mysql_query("INSERT INTO field(type_id, title, step, pos, visible, entries, required) VALUES ('2', '".$title2."', '".$step2."', '".$pos2."', '1', '".$entries."', '".$req."');"); print_r($_POST); } else{ $title2 = ""; $req =""; $step2 = ""; $pos2 = ""; $entries = ""; } ?>
tagged with: javascript
has answer: http://stackoverflow.com/a/26056080
accepted answer: http://stackoverflow.com/a/26056080

http://stackoverflow.com/q/26140707
type: AnsweredQuestion
tagged with: chart.js
has body: I'm using JQuery, ChartJS, Moment.js gathering data in JSON format for multiple charts on the same page, but from the same JSON source. In the JSON the height objects are one graph and the lengths another one. This is an example of how the JSON looks "Series": { "heights": [ { "Date": "2014-10-01", "Value": 22 }, { "Date": "2014-10-01", "Value": 53 }, { "Date": "2014-10-01", "Value": 57 }, ], "lengths": [ { "Date": "2014-10-01", "Value": 54 }, { "Date": "2014-10-01", "Value": 33 } ] } I've managed to loop through the JSON to display each graph but I'm not really able to do it using the "DRY - Don't repeat yourself" way. Which now I have large chunks of code that is hard to update/read. $.getJSON("data.json", function(data) { var dateArray = []; var valueArray = []; for ( var i = 0; i &lt; data.Series["heights"].length; i++) { var obj = data.Series.heights[i]; var date = obj["Date"].toString(); var Value = obj["Value"]; for ( var key in obj) { //console.log(obj["Value"]); //date = obj["Date"]; Value = obj[key].toString(); } valueArray.push(Value); dateArray.push(moment(date).format("MMMM Mo")); var dataArray = { labels: dateArray, datasets: [ { label: "Lengths", strokeColor: "rgb(26, 188, 156)", pointColor: "rgba(220,220,220,1)", pointStrokeColor: "#fff", pointHighlightFill: "#fff", pointHighlightStroke: "rgba(220,220,220,1)", data: valueArray } ] }; } var ctx = document.getElementById("lengthsChart").getContext("2d"); var myLineChart = new Chart(ctx).Line(dataArray, { scaleShowGridLines : true, bezierCurve : true, bezierCurveTension : 0.4, datasetStroke : false, fillColor: "rgba(0,0,0,0)", datasetFill : false, responsive: true, showTooltips: true, animation: false }); }); Right now I have this code in a switch statement for "heights", "lengths" etc... Which I guess is a horrible way to do it. But I've been unable to make a loop for the individual charts. I've tried things like this: for(var x in measurement) { console.log(measurement[x]); for ( var i = 0; i &lt; dat…
tagged with: http://stackoverflow.com/tag/json
has title: Looping through json array properties
type: Question
tagged with: arrays
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26144736
score: 0
accepted answer: http://stackoverflow.com/a/26144736
has comment: http://stackoverflow.com/comment/40977152
tagged with: properties

joomla
tags question: http://stackoverflow.com/q/26150153
tags question: http://stackoverflow.com/q/26051476
type: Tag
tag name: joomla
tags question: http://stackoverflow.com/q/26152797
tags question: http://stackoverflow.com/q/26073305

http://stackoverflow.com/a/26038858
downvote count: 0
answers question: http://stackoverflow.com/q/26038041
has body: You could use a Model shared between your controllers and your service that stores the state of your application, including the userName : angular.module('gitHubApp').factory('gitHubModel', function() { var model = { userName: ''; }; return model; }); You can then inject it wherever you want to share the userName. If you only need to store value and not behavior, you might use the simpler value recipe : angular.module('gitHubApp').value('gitHubModel', { userName: ''}); You can find more informations there : Providers (angularjs.org) Factory recipe (learn-angular.org) Value recipe (learn-angular.org)
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40807822
has comment: http://stackoverflow.com/comment/40816434

http://stackoverflow.com/a/71122773
type: Answer
answers question: http://stackoverflow.com/q/26134182
score: 0
has body: Use: moment-timezone - TypeError: moment().tz is not a function const moment = require('moment-timezone'); const time = moment.tz(1412144245453, 'America/Los_Angeles').format('MM/DD/YYYY h:mm a'); console.log("time : ", time); Output: time : 09/30/2014 11:17 pm

http://stackoverflow.com/a/26194257
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26194228
has body: You are using i.length, but i is not the list. You should return that no match was found after the loop when you know that none of the items match, not when the first match fails. To match what the _find method does, it should return the item, not the index of the item, and return undefined if there is no match. You are using the variable arr before assigning the value to it. var findIt = function(list, predicate) { for (var i = 0; i &lt; list.length; i++) { if (predicate(list[i]) == true) { return list[i]; } } return undefined; } var predicate = function (first) { return first % 2 == 0; } var arr = [1, 2, 3, 5]; console.log(findIt(arr, predicate));
answers question: http://stackoverflow.com/q/26194228
upvote count: 1

http://stackoverflow.com/a/26197115
has comment: http://stackoverflow.com/comment/98444118
has comment: http://stackoverflow.com/comment/98520911
score: 0
answers question: http://stackoverflow.com/q/26070386
upvote count: 1
has comment: http://stackoverflow.com/comment/98582050
has comment: http://stackoverflow.com/comment/98582212
downvote count: 1
has comment: http://stackoverflow.com/comment/98537194
has body: You need to adjust the perspective matrix. It's built with -left +right -bottom +top. Changing these will produce the effect you are looking for.
has comment: http://stackoverflow.com/comment/98422651
has comment: http://stackoverflow.com/comment/98551613
has comment: http://stackoverflow.com/comment/98537028
type: Answer

http://stackoverflow.com/a/26058055
upvote count: 1
score: 1
has body: Try this $(".numericOnly").keypress(function(e) { var code = e.which; if(($(this).val().indexOf(".") == -1 &amp;&amp; code == 46) || (code &gt;= 48 &amp;&amp; code &lt;= 57) || (code == 51) || (code == 8) || (code &gt;= 37 &amp;&amp; code &lt;= 40)) { return true; } return false; }) .bind("paste",function(e) { e.preventDefault(); });
downvote count: 0
answers question: http://stackoverflow.com/q/26057883
type: Answer

http://stackoverflow.com/q/26039603
linked to: http://stackoverflow.com/q/5384712
has answer: http://stackoverflow.com/a/26039857
downvote count: 0
has answer: http://stackoverflow.com/a/26039755
tagged with: javascript
tagged with: jquery
favorite count: 0
upvote count: 8
accepted answer: http://stackoverflow.com/a/26039710
answer count: 5
tagged with: http://stackoverflow.com/tag/html
score: 8
has title: Process a Form Submit with Multiple Submit Buttons in Javascript
possible better answer: http://stackoverflow.com/a/71146384
has answer: http://stackoverflow.com/a/71146384
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/66787274
has answer: http://stackoverflow.com/a/26039710
tagged with: forms
type: Question
has body: I have a form with multiple submit buttons, and I'd like to capture when any of them are pressed, and perform different JS code for each one. Go - One Go - Two Go - Three Looking at an older answer, I can process all of the submit buttons in JS: function processForm(e) { if (e.preventDefault) e.preventDefault(); /* do what you want with the form */ // You must return false to prevent the default form behavior return false; } var form = document.getElementById('my-form'); if (form.attachEvent) { form.attachEvent("submit", processForm); } else { form.addEventListener("submit", processForm); } But how can I discriminate amongst the different submit buttons? Is there a way to get the value and perform logic from there? I don't need to have three submit buttons, per se... I just need three different buttons in a form to perform three different actions. Thanks!

http://stackoverflow.com/comment/40825239
type: Comment
type: QuestionComment
has text: Dear Apul, yes thats it. Thank you!
score: 0
comment on: http://stackoverflow.com/q/26057241

http://stackoverflow.com/comment/40998363
comment on: http://stackoverflow.com/a/26153189
score: 0
type: AnswerComment
has text: @jfriend00 It would if `!important` is used for every rules, unless `!important` is already used on the inline style.
type: Comment

http://stackoverflow.com/comment/41027296
type: Comment
type: QuestionComment
score: 1
has text: Welcome to SO. Where exactly does the error occur?
comment on: http://stackoverflow.com/q/26168959

http://stackoverflow.com/comment/40823238
has text: here is the doc page : http://api.jquery.com/jquery.ajax/
comment on: http://stackoverflow.com/q/26057866
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26180520
has comment: http://stackoverflow.com/comment/41049512
accepted answer: http://stackoverflow.com/a/26181627
type: Question
has comment: http://stackoverflow.com/comment/41048919
tagged with: javascript
has body: So I'm running into this problem where I'm using ngView and I have a navigation bar that is static throughout like so: &lt;div ng-include="'views/nav.html'" ng-controller="NavCtrl"&gt;&lt;/div&gt; &lt;div class="container-fluid" ng-view=""&gt;&lt;/div&gt; This nav.html, the navigation bar, displays a certain set of functions (Login, Register) if the user is logged out (using ng-show) and other menu options if the user is logged in. Because of the heavy use of current user, I've put this information in the $rootScope like this: $rootScope.currentUser - returns user object, and $rootScope.signedIn - return boolean. Basically, I want to delay the navbar from loading until $rootScope.signedIn is loaded and either true or false, and $rootScope.currentUser is an object or undefined. I've tried messing around with creating promises in my app.config routes, but I'm not sure how I can return a promise to the permanent view state. Any help is appreciated. Edit: Here is the service in which I broadcast my login. This fires anytime a user is authenticated/logged in or anytime they logout: var authClient = new FirebaseSimpleLogin(refDownload, function(error, user) { if (error) { incorrectLogin(error.code); } if (user) { // user authenticated $rootScope.$broadcast('login'); correctLogin(user.id); } else { // user is logged out $rootScope.$broadcast('logout'); } }); This service is injected into the NavCtrl controller in the following way: $scope.isHidden = true; $scope.$on('login', function() { console.log('login broadcast'); $scope.isHidden = false; }); $scope.$on('logout', function() { console.log('broadcast logout'); $scope.isHidden = true; }); The template for this controller is nav.html that looks like this: &lt;div class="col-xs-4 centered" id="nav-hover" ng-show="isHidden"&gt; &lt;ul class="nav navbar-nav"&gt; &lt;li id="nav-login"&gt;&lt;a ng-href="#/login"&gt;&lt;span class="glyphicon glyphicon-log-in"&gt;&amp;nbsp;Login&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;…
has comment: http://stackoverflow.com/comment/41049160
has comment: http://stackoverflow.com/comment/41049282
answer count: 3
possible better answer: http://stackoverflow.com/a/26185545
downvote count: 0
has comment: http://stackoverflow.com/comment/41049218
has comment: http://stackoverflow.com/comment/41057223
has answer: http://stackoverflow.com/a/26185545
favorite count: 0
has comment: http://stackoverflow.com/comment/41048764
has title: Waiting for $rootScope value to resolve in Angular before page load
has answer: http://stackoverflow.com/a/26181627
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41057506
has comment: http://stackoverflow.com/comment/41048772
tagged with: angular-promise
has comment: http://stackoverflow.com/comment/41048666
has answer: http://stackoverflow.com/a/26188171
upvote count: 6
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41049674
has comment: http://stackoverflow.com/comment/41049250
score: 6

http://stackoverflow.com/comment/40936033
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26095351
type: Comment
has text: This is what I'm aiming for: **they prevent the user from accessing the rest of the program's interface until the dialog box is closed**. Is it possible to create a modal function in javascript?

http://stackoverflow.com/a/26152470
accepted answer of: http://stackoverflow.com/q/26137190
has body: It depends. It depends on HTTP request method. If the page was GET the browser may decide to cache it, and not re-request. POST and other HTTP methods are not cached as they may have side effects server side. This is why you even get a warning dialog if you go back to a page that was loaded by a POST request. It depends on caching headers. (See here) Pages that are explicitly allowed to be cached as described in their header may be reused when navigated back to. It depends on the browser. Some have optimized heavily for user experience (more caching, more speed, more staleness). Where others are simpler and simply re-request the page. It depends on memory usage, especially on mobile devices. The browser may decide not to keep the page content and state if the page is large or there isn't a lot of available memory. Browsers are complicated pieces of software, and smart people having been working to optimize them for a very long time. As far as what level of caching is used for back navigation, I think there are three primary levels (this is probably an oversimplication, but it'll give you the general idea.) Uncached. Page is re-requested. Cached assets. The content and assets are cached as they came from the server. This probably doesn't require memory, just disk space, since it's probably not very much data. Cached state. DOM state, JS heap, form field values, all preserved in memory. This probably requires a lot of memory, and is probably not written to disk since it could be many megabytes depending on the page.
upvote count: 10
type: AcceptedAnswer
downvote count: 0
score: 10
type: Answer
answers question: http://stackoverflow.com/q/26137190

alpha-transparency
type: Tag
tags question: http://stackoverflow.com/q/26147228
tag name: alpha-transparency

http://stackoverflow.com/a/26194057
has body: you should use this code for send data in php type: "POST", data: {data:post_data}, http://php.net/manual/en/function.json-decode.php and into json in PHP you can decode json for PHP
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26193997

http://stackoverflow.com/q/26158692
tagged with: javascript
has answer: http://stackoverflow.com/a/26596085
favorite count: 0
has body: I am trying to add ngAnimate to my angular app dependencies. Here is my angular app file: var carApp = angular.module("carApp", ["ngAnimate"]); Here is my TableBodyCtrl controller: carApp.controller("TableBodyCtrl", function($scope, $http){ $scope.loading = false; ... }); Here is my TablePanelCtrl: carApp.controller("TablePanelCtrl", function(){ this.tab = 1; ... }); My controller are in different files in the controller folder. Here is the script loads of angular libraries: Here is the script load of my angular app file: Here is the script loads of my controllers: When I run my web-app I get this error: Unknown provider: $$qProvider <- $$q <- $animate <- $compile https://docs.angularjs.org/error/$injector/unpr?p0=$$qProvider%20%3C-%20$$q%20%3C-%20$animate%20%3C-%20$compile This error only started to show up after I add "ngAnimate" to my angular app dependencies. How can I fix that?
accepted answer: http://stackoverflow.com/a/26159609
tagged with: angularjs
has answer: http://stackoverflow.com/a/27264988
answer count: 4
has answer: http://stackoverflow.com/a/29049375
upvote count: 14
has comment: http://stackoverflow.com/comment/41008188
score: 14
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26159609
has title: AngularJS: $injector:unpr error when using ngAnimate
has comment: http://stackoverflow.com/comment/41007993
type: Question
linked to: http://stackoverflow.com/q/26412093
downvote count: 0
possible better answer: http://stackoverflow.com/a/26596085

http://stackoverflow.com/comment/98551613
type: AnswerComment
has text: It looks like you are right and I am wrong. (And the worst is that I don't fully understand why. ;-) I mean, why no extra parameters are required to shift the focal point wrt. the center of the screen.) My downvote was indeed rushed. Sorry again. I would remove it if I could.
score: 0
comment on: http://stackoverflow.com/a/26197115
type: Comment

http://stackoverflow.com/comment/40937985
score: 0
type: QuestionComment
has text: Actually in my application multiple functions' are executing parallelly i.e in a event loop. So if there are some important high priority functions are there so I want these functions to be executed first and then other.
comment on: http://stackoverflow.com/q/26114749
type: Comment

http://stackoverflow.com/comment/40940133
score: 0
has text: @David I have posted couple of two possible result sets.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26121276

http://stackoverflow.com/comment/40915771
type: Comment
type: QuestionComment
has text: Is there a pattern to how things are set up? As in, could you grab all the child elements of the p tag and put them in an array, then remove those that are links?
comment on: http://stackoverflow.com/q/26107993
score: 0

web-services
type: Tag
tags question: http://stackoverflow.com/q/26111865
tags question: http://stackoverflow.com/q/26114887
tags question: http://stackoverflow.com/q/26182570
tag name: web-services
tags question: http://stackoverflow.com/q/26041974
tags question: http://stackoverflow.com/q/26069203
tags question: http://stackoverflow.com/q/26166525
tags question: http://stackoverflow.com/q/26094047
tags question: http://stackoverflow.com/q/26131264

http://stackoverflow.com/a/26050830
has body: Since you are specifically asking for not using Math object in Javascript, there is an answer I have found here in Stackoverflow that solves it in the way you want: function mymax(a) { var m = -Infinity, i = 0, n = a.length; for (; i != n; ++i) { if (a[i] &gt; m) { m = a[i]; } } return m; } I don't own this answer, so please check this link to see the orginal author's answer: https://stackoverflow.com/a/13794386/44852
answers question: http://stackoverflow.com/q/26050763
score: 0
type: Answer

http://stackoverflow.com/q/26100218
duplicate of: http://stackoverflow.com/q/4859208
has answer: http://stackoverflow.com/a/26100535
type: Question
has answer: http://stackoverflow.com/a/57397728
answer count: 8
has answer: http://stackoverflow.com/a/60024824
upvote count: 5
linked to: http://stackoverflow.com/q/1611427
score: 5
has comment: http://stackoverflow.com/comment/40900875
downvote count: 0
duplicate of: http://stackoverflow.com/q/1611427
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/60024438
has answer: http://stackoverflow.com/a/26100331
linked to: http://stackoverflow.com/q/958908
has body: I wrote a JS constructor which reverse a string variable: function ReverseString(string) { this.str = string; var size = this.str.length; this.reverse = function () { for(size; size &gt;= 0; --size) { console.log(this.str[size]); } } } When I invoke a reverse method on a new string object("asd") it produces the following output: undefined d s a Where this undefined came from? Could you help me eliminate this ?
has comment: http://stackoverflow.com/comment/40900984
has answer: http://stackoverflow.com/a/26100246
has answer: http://stackoverflow.com/a/57176037
linked to: http://stackoverflow.com/q/4859208
has answer: http://stackoverflow.com/a/26100347
has comment: http://stackoverflow.com/comment/40900823
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40901194
has title: Reverse String in JavaScript

http://stackoverflow.com/comment/44860164
type: Comment
has text: @timeNomad - http://english.stackexchange.com/questions/74548/is-caret-a-widely-understood-word
type: AnswerComment
comment on: http://stackoverflow.com/a/26170971
score: 0

http://stackoverflow.com/q/26183473
has answer: http://stackoverflow.com/a/26183522
has body: please help me i have 1 form with 2 input type="text" and 1 button submit function Test(){ var valid=true; $('input:text').css('border-color','#e0e0e0'); var inputs=$('input:text'); for(i=0;i&lt;inputs.length;++i) { if(inputs.val()=='') { $('input:text').css('border-color','red'); $('input:text').css('box-shadow','0 0 10px red'); valid=false; } } return valid; } i can't alert(inputs.val()) i don't want use ID of input because i have done! sorry because my english is very poor
has answer: http://stackoverflow.com/a/26183531
type: Question
has comment: http://stackoverflow.com/comment/41064204
type: AnsweredQuestion
score: -2
downvote count: 2
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26183531
favorite count: 0
accepted answer: http://stackoverflow.com/a/26183522
has answer: http://stackoverflow.com/a/26188750
has answer: http://stackoverflow.com/a/26183543
has title: Input type=text value null
answer count: 4
upvote count: 0
has comment: http://stackoverflow.com/comment/41054550

http://stackoverflow.com/a/26110065
downvote count: 0
type: AcceptedAnswer
score: 1
answers question: http://stackoverflow.com/q/26109758
has comment: http://stackoverflow.com/comment/40920111
accepted answer of: http://stackoverflow.com/q/26109758
type: Answer
has body: I assume the triggered click event is being propagated up to li.download-action which then starts the ajax download function all over again. A solution would be to use window.location.href to navigate the user to the new url or to move that link out side li.download-action.
upvote count: 1

http://stackoverflow.com/a/26190943
has body: Because you did a this.exit(); just after trying to open the urls in links. You need to understand that this works asynchronously. The programs exits immediately after casperjs starts loading the links one after the other.
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26187583
answers question: http://stackoverflow.com/q/26187583
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40800068
type: Comment
comment on: http://stackoverflow.com/a/26044986
score: 0
type: AnswerComment
has text: if i load template using ng-include="'views/main.html'" and add todo its return null value

http://stackoverflow.com/comment/110787298
type: Comment
has text: Weird you pick my answer to post that comment and the real solution is, return proper JSON.
comment on: http://stackoverflow.com/a/26172164
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40814746
type: QuestionComment
has text: Please be specific. Do you want to change the language display on you CI pages? or you want to change the input characters to a different language?
comment on: http://stackoverflow.com/q/26053110
score: 0
type: Comment

http://stackoverflow.com/a/26187108
has comment: http://stackoverflow.com/comment/41061451
answers question: http://stackoverflow.com/q/26187019
downvote count: 0
has body: Try this: Demo on Fiddle HTML: D JavaScript: $('#text').on('input', function() { var text = $(this).text(); if($(this).text().match('banana') == 'banana') { alert('banana!'); } });
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41061653
upvote count: 2

http://stackoverflow.com/q/26081635
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/40867635
has title: How to debug web service application in eclipse?
tagged with: jakarta-ee
score: 1
tagged with: java
tagged with: eclipse
type: Question
has comment: http://stackoverflow.com/comment/40867678
has body: I am learning Java EE technologies. Is there a way I can use Eclipse debugger to step through the code and see how it works step by step? For instance, this is a simple html5 + restful service. Is there any way I can debug from the index.html java script, and step through the code little by little in Eclipse? That would be the best way to study this stuff. Thanks a lot. /** * A simple CDI service which is able to say hello to someone * * @author Pete Muir * */ public class HelloService { String createHelloMessage(String name) { return "Hello " + name + "!"; } } @Path("/") public class HelloWorld { @Inject HelloService helloService; @POST @Path("/json/{name}") @Produces("application/json") public String getHelloWorldJSON(@PathParam("name") String name) { System.out.println("name: " + name); return "{\"result\":\"" + helloService.createHelloMessage(name) + "\"}"; } /** A simple rest service saying hello */ @POST @Path("/xml/{name}") @Produces("application/xml") public String getHelloWorldXML(@PathParam("name") String name) { System.out.println("name: " + name); return " " + helloService.createHelloMessage(name) + " "; } } Then, the front end html 5 + java script. HTML5 + REST Hello World HTML5 + REST Hello World Name
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26082236
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40867869

http://stackoverflow.com/comment/40875514
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26082080
type: Comment
has text: Sorry I was confused with the initial post. I updated my answer.

http://stackoverflow.com/comment/41084483
type: Comment
has text: Thanks @kellycode. This fixed my issue as far as getting the error to go away. Now the button won't work because since its an external page that replaces the form with a thank you messages after the form has been submitted its not originally loaded with the document. How do i fix this with out having to add a internal script tag to the thank-you.html that loads and keep my code with my external js file?
type: AnswerComment
comment on: http://stackoverflow.com/a/26188794
score: 0

http://stackoverflow.com/q/26069175
has comment: http://stackoverflow.com/comment/40844836
tagged with: java
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40845036
has comment: http://stackoverflow.com/comment/40844693
tagged with: user-interface
answer count: 1
tagged with: config
has body: I need to save some ui preferences selected by the admin, thinks like list of columns names to display in a table and other such display data that can be configured from the ui itself. Once its configured it will be saved in a file and then the file will be read subsequently to determine the display details and also send that data to backend service for querying. As its purely for ui purposes, I don't want to store it in the core module or in the backend DB, but would like to store it in the web module along side the html/jsp files. Has anyone done something like this - I was trying to figure out if there is a easy way to write files from jsp/html but it doesnt seem to be straightforward. If that is not recommended, any other suggestions on dealing with this scenario will be appreciated. Thanks.
has comment: http://stackoverflow.com/comment/40845089
has title: Where to store UI config in a java web app and read-write the config file from jsp page
has comment: http://stackoverflow.com/comment/40844864
has comment: http://stackoverflow.com/comment/40844898
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26069538
has comment: http://stackoverflow.com/comment/40844950

http://stackoverflow.com/a/26132047
downvote count: 0
has comment: http://stackoverflow.com/comment/40985268
answers question: http://stackoverflow.com/q/26129014
type: Answer
score: 1
upvote count: 1
has body: I made a jsfiddle to try and it works fine : http://jsfiddle.net/OxyDesign/0sgoqqco/ The result is good as in the Google Demo : https://developers.google.com/maps/documentation/javascript/examples/elevation-simple $(document).ready(function(){ $('#button').on('click',function(){ var elevator = new google.maps.ElevationService(), denali = new google.maps.LatLng($('[name=lat]').val(), $('[name=lng]').val()), positionalRequest = {'locations':[denali]}; elevator.getElevationForLocations(positionalRequest, function(results, status) { if (status == google.maps.ElevationStatus.OK) { if (results[0]) { $('#result').text(results[0].elevation); } else { alert("No results found"); } } else { alert("Elevation service failed due to: " + status); } }); }); }); And I didn't make a map Maybe I didn't get the problem
has comment: http://stackoverflow.com/comment/40998369

header
type: Tag
tags question: http://stackoverflow.com/q/26180938
tag name: header

http://stackoverflow.com/q/26041589
accepted answer: http://stackoverflow.com/a/26042015
tagged with: for-loop
answer count: 1
tagged with: arrays
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Uncaught TypeError in forum loggin
upvote count: 1
type: AnsweredQuestion
tagged with: if-statement
has answer: http://stackoverflow.com/a/26042015
score: 1
has body: I am making a forum for a school project, everything works fine, but my error message does no longer show up. The }else { boxAlertfail.style.display = "block"; boxAlertfail.innerHTML = "Go away, fail"; }}" ever since I added }else if (arrayAdmins[i].email == inputLoginMail.value &amp;&amp; arrayAdmins[i].password == inputLoginPassword.value) { I get the error "Uncaught TypeError: Cannot read property 'email' of undefined" function login () { if (checklogin()){ wallPanel.style.display = "block"; boxAlert.style.display = "block"; boxAlert.innerHTML = "Welcome" + aUsers.value; dropMenu.style.display = "block"; document.getElementById("signinForm").remove(); }else { boxAlertfail.style.display = "block"; boxAlertfail.innerHTML = "Go away, fail"; }} function checklogin(){ var validLogin = false; for (var i = 0; i &lt; aUsers.length; i++) { if (aUsers[i].email == inputLoginMail.value &amp;&amp; aUsers[i].password == inputLoginPassword.value) { validLogin = true; break; }else if (arrayAdmins[i].email == inputLoginMail.value &amp;&amp; arrayAdmins[i].password == inputLoginPassword.value) { validLogin = true; break; } } return validLogin;}
type: Question

http://stackoverflow.com/a/26087844
has comment: http://stackoverflow.com/comment/40878651
has body: Yes, definitely JS validation is more friendly and efficient, end user will get instant errors if any. And again, PHP side validation is also necessary, to prevent hacking and it is secure. What if someone just removes your JS validation via any debugger. To conclude, it is good to implement both.
upvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/26087804
score: 3
downvote count: 0

http://stackoverflow.com/a/26034712
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26034315
has body: First off, you should be sure you're allowed to remove these ads, doing so without permission could get you into trouble. Assuming by this point you are allowed to: Throwing an error will most likely crash your own script which tends to be a terrible idea. You could: Try to look for the script tag with the URL and remove it Make css rules to hide the div's before they are even displayed, then removing any code generated by the ads. Re-write your javascript so it doens't conflict with the other script.

http://stackoverflow.com/comment/72228518
type: AnswerComment
has text: Please add more description and/or information about your answer and how it solves the asked problem so others can easily understand it without asking for clarification
comment on: http://stackoverflow.com/a/42546321
type: Comment
score: 2

http://stackoverflow.com/q/26159472
has body: I have a directive called step-field, in the template of the directive i have input or select elements that should sometimes have max-length or ng-required or some custom directive like validate-username. The step field looks like this: I want to add "validate-username" and "required=true" to this directive so it will look like this And in the inside of the directive template i want the validate-username and required to be passed to the input field. (btw $scope.isRequired = attrs.required) {{fieldName}}: * How can i apply some of the directives i pass to step-field to the input field in the template? Thanks!
score: 2
answer count: 0
type: Question
has title: How to pass directives to an element in the directives template in AngularJS?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41036826
downvote count: 0
favorite count: 0
tagged with: angularjs
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/50253187
tagged with: angular-directive

http://stackoverflow.com/q/26077401
type: AnsweredQuestion
tagged with: angularjs
has answer: http://stackoverflow.com/a/27707567
answer count: 1
tagged with: node.js
has title: Develop Rest API and server-side rendering simultaneously in SailsJs
accepted answer: http://stackoverflow.com/a/27707567
has body: I am looking towards the SailsJs framework for nodeJs to build an app. Initially I planned to build just a REST API in sails and manage the Front-End using AngularJs, the API would also be useful for other non-browser apps. But then I realized since angularJs is client side data binding , My site might not be SEO friendly and IE-8 compatible. So what I am trying to find out now is that : Is it possible to develop a site which uses server-side(ejs) rendering and together with that, develop a REST API simultaneously with the least efforts. and if I go this way, What things one should keep in mind. Thanks.
score: 0
tagged with: sails.js
tagged with: javascript
tagged with: rest
type: Question

http://stackoverflow.com/q/26082215
tagged with: php
upvote count: 0
accepted answer: http://stackoverflow.com/a/26082285
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/26082285
type: Question
has body: I have a simple HTML where you can click images. These images, whence clicked will moved to the Top Nav bar, I have IDs from this images and able to get each of them using jquery/javascript. I have this IDs set to an array variable. My questions, is there a way to pass this to the Form then I issue a Submit so I can process the arrays. It is a 1D array with just IDs.
answer count: 1
tagged with: jquery
downvote count: 6
score: -6
favorite count: 0
has title: HTML Form Submit pass array to PHP
has comment: http://stackoverflow.com/comment/40868528
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26160649
answer count: 1
has body: I have multiple date pickers in my form. On default those are closed and once a date is selected, they close again. Also, even if I dont select a date and just click outside of it, it'll close automatically. However, when I open the first date and do not click outside or choose a certain date and then simply open the second date picker, the first date picker stays open. How can I avoid that and also make sure, that even when clicking to the second datepicker the first closes automatically? &lt;button type="button" id="dateButton" class="btn btn-default" ng-click="open($event,'dt')" &gt; &lt;input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt" is-open="datepicker.dt" min-date="minDate" max-date="maxDate" show-weeks="false" ng-required="true" datepicker-options="dateOptions" show-button-bar="false" readonly="readonly"/&gt; &lt;/button&gt; &lt;button type="button" id="dateButton" class="btn btn-default" ng-click="open($event,'dt2')" &gt; &lt;input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt2" is-open="datepicker.dt2" min-date="minDate" max-date="maxDate" show-weeks="false" ng-required="true" show-button-bar="false" readonly="readonly"/&gt; &lt;/button&gt; _ $scope.datepicker={ dt:false, dt2:false }; $scope.open = function($event,which) { $event.preventDefault(); $event.stopPropagation(); $scope.datepicker[which] = true; }; $scope.format = 'dd-MMM-yyyy'; Here is what I did: plnkr.co/edit/o9I3cRej9I7rZUcPpz6O?p=preview You see if you click one datepicker but then simply click the other one the first one will not close
tagged with: date
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26161922
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
has title: Close date picker when clicking to next date picker AngularJS
tagged with: angularjs
type: Question
tagged with: datepicker
tagged with: twitter-bootstrap
upvote count: 1
has answer: http://stackoverflow.com/a/26161922

http://stackoverflow.com/q/26068385
has answer: http://stackoverflow.com/a/26068573
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26068573
score: 0
answer count: 3
has title: AngularJS - Service exposing a string
has answer: http://stackoverflow.com/a/26068556
favorite count: 0
possible better answer: http://stackoverflow.com/a/26068482
tagged with: angularjs
tagged with: angular-services
has answer: http://stackoverflow.com/a/26068482
has body: I have a problem where I have a service which exposes a string. There is a function on this service which updates the value of the string. The service internally knows that the value has changed, however, externally the value NEVER updates. If I nest the string inside an object then it all works, but I don't really want to nest it. Can anyone explain why this is happening? It feels like it should work and feels like I am missing something basic. Service: myApp.service('neverChanges', function () { var id = 'Hello'; var changeId = function () { console.log('pre change:' + id); id = 'World'; console.log('post change:' + id); }; return { id: id, changeId: changeId }; }); Controller: myApp.controller('Controller1', ['neverChanges', function (neverChanges) { this.idValue = function() { return neverChanges.id; } this.clickHandler = function () { console.log('Trust me, I did fire...'); neverChanges.changeId(); console.log('external post change:' + neverChanges.id); }; }]); Markup: This will never change: Click Me! Values: id: {{vm.idValue()}} Fiddle showing the two scenarios: http://jsfiddle.net/KyleMuir/2nhoc2rz/
type: AnsweredQuestion

http://stackoverflow.com/a/26077755
accepted answer of: http://stackoverflow.com/q/26077690
type: Answer
has comment: http://stackoverflow.com/comment/40866319
has comment: http://stackoverflow.com/comment/40860769
has comment: http://stackoverflow.com/comment/40860023
has comment: http://stackoverflow.com/comment/40860116
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40860937
downvote count: 0
has body: You could just use something like parseInt() where you need to convert to integers. Here's the documentation https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt
answers question: http://stackoverflow.com/q/26077690
type: AcceptedAnswer

http://stackoverflow.com/a/26111301
score: 3
downvote count: 0
has body: A function is "added to the stack" when it is called. While a "call stack" implementation is not specified in ECMAScript 5th edition it does define the virtual behavior in 10.3 Execution Contexts: When control is transferred to ECMAScript executable code, control is entering an execution context. Active execution contexts logically form a stack. The top execution context on this logical stack is the running execution context [ie. currently running function]. A new execution context is created whenever control is transferred from the executable code associated with the currently running execution context to executable code that is not associated with that execution context. The newly created execution context is pushed onto the stack and becomes the running execution context. It is not technically the function that is part of the stack, but rather the execution context created from invoking the function. This also agrees with more general Call Stack concept where the active/current function context is also part of the stack. In computer science, a call stack is a stack data structure that stores information about the active subroutines [including the subroutine currently running] of a computer program .. the details are normally hidden and automatic in high-level programming languages.. Using this definition also ensures a function is never running "off the stack" - which agrees with such a concept from other languages/environments and JavaScript developer tools.
type: AcceptedAnswer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26111118
type: Answer
answers question: http://stackoverflow.com/q/26111118

http://stackoverflow.com/a/26113721
answers question: http://stackoverflow.com/q/26113680
type: Answer
has body: Since you are generating HTML dynamically with jquery you have to use event delegation . Instead of $("a.deleteRow").on("click", function () { $(this).parents("div.editorRow:first").remove(); return false; }); Try $(document).on("click", "a.deleteRow" ,function () { $(this).parents("div.editorRow:first").remove(); return false; }); Read More Here.
accepted answer of: http://stackoverflow.com/q/26113680
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40925507
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/41024724
type: Comment
comment on: http://stackoverflow.com/a/26160523
type: AnswerComment
has text: What if both event handler was attached to the document with an "on" method? Then both event will be caught on the document (because of event bubbling), in this way the event.stopPropagation() not working, am I right?
score: 0

http://stackoverflow.com/q/26080946
has comment: http://stackoverflow.com/comment/40866124
has comment: http://stackoverflow.com/comment/40866286
answer count: 2
tagged with: arrays
tagged with: javascript
has title: Array inside an array during javascript processing
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40866337
has answer: http://stackoverflow.com/a/26081015
accepted answer: http://stackoverflow.com/a/26081015
has comment: http://stackoverflow.com/comment/40866196
has body: I am trying to process a form using Ajax and have been having a problem with processing check boxes. I thought I could do an array inside an array which would add the checked boxes to the data object but that doesn't seem to be working. It doesn't show up as a part of the object in the console or anything like that. I tried a few variations and nothing was working. This is what it looks like currently: var formData = { 'fname' : $('input[name=fname]').val(), 'lname' : $('input[name=lname]').val(), 'phone' : $('input[name=phone]').val(), 'email' : $('input[name=email]').val(), 'sqft' : $('select[name=sqft]').val(), 'checked': $('input[name=services[]]:checked').each(function(){ checked.push($(this).val()); }); }; I know I could use serialize() but honestly I am simply not familiar with processing data from that method. Since I need to process the data with PHP I wanted to stick with what I know. This is the markup for the checkboxes: &lt;div class="checks span6"&gt; &lt;p&gt;Check which services you are interested in:&lt;/p&gt;&lt;br&gt; &lt;input type="checkbox" name="services[]" value="janitorial"&gt;&lt;p&gt;Janitorial&lt;/p&gt;&lt;br&gt; &lt;input type="checkbox" name="services[]" value="window"&gt;&lt;p&gt;Window cleaning&lt;/p&gt;&lt;br&gt; &lt;input type="checkbox" name="services[]" value="carpet"&gt;&lt;p&gt;Carpet service&lt;/p&gt;&lt;br&gt; &lt;input type="checkbox" name="services[]" value="restroom"&gt;&lt;p&gt;Restroom sanitation&lt;/p&gt;&lt;br&gt; &lt;input type="checkbox" name="services[]" value="facility"&gt;&lt;p&gt;Facility Maintenance&lt;/p&gt;&lt;br&gt; &lt;input type="checkbox" name="services[]" value="floors"&gt;&lt;p&gt;Floor strippin &amp;amp; re-waxing&lt;/p&gt;&lt;br&gt; &lt;input type="checkbox" name="services[]" value="moving"&gt;&lt;p&gt;Move in or move out&lt;/p&gt;&lt;br&gt; &lt;input type="checkbox" name="services[]" value="other"&gt;&lt;p&gt;Other&lt;/p&gt;&lt;br&gt; &lt;/div&gt;
has comment: http://stackoverflow.com/comment/40866157
has answer: http://stackoverflow.com/a/26081206
tagged with: php
possible better answer: http://stackoverflow.com/a/26081206
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40866148
has comment: http://stackoverflow.com/comment/40866298

http://stackoverflow.com/comment/40863476
type: AnswerComment
comment on: http://stackoverflow.com/a/26079293
has text: I'm not sure I understand. What does `console.dir(json.somenullproperty)` output when you pass in a value with a null value? Does it show `null` or `'null'` or something else?
type: Comment
score: 0

http://stackoverflow.com/comment/40979674
type: QuestionComment
comment on: http://stackoverflow.com/q/26143408
has text: Please provide more code, where you try to use this/that?
score: 0
type: Comment

http://stackoverflow.com/comment/110038739
type: Comment
has text: @user141350 I totally agree. Seems like an inconsistency?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26068481

jquery-mobile
tags question: http://stackoverflow.com/q/26054139
tags question: http://stackoverflow.com/q/26165955
tags question: http://stackoverflow.com/q/26161028
tags question: http://stackoverflow.com/q/26163355
type: Tag
tags question: http://stackoverflow.com/q/26037878
tags question: http://stackoverflow.com/q/26057886
tags question: http://stackoverflow.com/q/26150991
tags question: http://stackoverflow.com/q/26051568
tags question: http://stackoverflow.com/q/26135100
tags question: http://stackoverflow.com/q/26084845
tags question: http://stackoverflow.com/q/26060900
tags question: http://stackoverflow.com/q/26085826
tags question: http://stackoverflow.com/q/26085997
tags question: http://stackoverflow.com/q/26036776
tags question: http://stackoverflow.com/q/26191310
tags question: http://stackoverflow.com/q/26109206
tags question: http://stackoverflow.com/q/26085034
tags question: http://stackoverflow.com/q/26092610
tags question: http://stackoverflow.com/q/26170641
tags question: http://stackoverflow.com/q/26124321
tags question: http://stackoverflow.com/q/26161693
tags question: http://stackoverflow.com/q/26069889
tags question: http://stackoverflow.com/q/26088314
tags question: http://stackoverflow.com/q/26059383
tags question: http://stackoverflow.com/q/26107695
tags question: http://stackoverflow.com/q/26194417
tags question: http://stackoverflow.com/q/26154233
tags question: http://stackoverflow.com/q/26113439
tags question: http://stackoverflow.com/q/26153034
tags question: http://stackoverflow.com/q/26060074
tags question: http://stackoverflow.com/q/26145916
tag name: jquery-mobile
tags question: http://stackoverflow.com/q/26116057

http://stackoverflow.com/q/26193962
linked to: http://stackoverflow.com/q/17202986
linked to: http://stackoverflow.com/q/3698200
score: 1
has body: I have declared the same structure: 5m 1h which, according to this should enable me to attach an onclick event by adding: $(document).ready(function() { $('#past5m').click(function() { alert('hello'); }); }); JQuery is already included in the code. However, when `#past5m' is pressed, nothing happens. Can you please help me to spot the error? Thanks.
linked to: http://stackoverflow.com/q/20832568
downvote count: 1
has comment: http://stackoverflow.com/comment/41073398
type: Question
tagged with: javascript
tagged with: jquery
answer count: 2
has answer: http://stackoverflow.com/a/26193994
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41073415
has answer: http://stackoverflow.com/a/26194012
favorite count: 0
upvote count: 2
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: onclick on Bootstrap radio button does not work
has comment: http://stackoverflow.com/comment/41073375

http://stackoverflow.com/comment/40896611
score: 0
has text: @antyrat that's incorrect.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26097731

http://stackoverflow.com/comment/40851939
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26073111
has text: did not work tried that I had removed the hard coded manual icon that I put in and nothing showed up.

http://stackoverflow.com/q/26039740
answer count: 3
has answer: http://stackoverflow.com/a/33365970
has comment: http://stackoverflow.com/comment/40790890
tagged with: angularjs
tagged with: datepicker
has comment: http://stackoverflow.com/comment/40791781
has comment: http://stackoverflow.com/comment/40791075
has comment: http://stackoverflow.com/comment/40790532
accepted answer: http://stackoverflow.com/a/26040270
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40791413
has comment: http://stackoverflow.com/comment/40791305
has comment: http://stackoverflow.com/comment/40790747
possible better answer: http://stackoverflow.com/a/26062227
has comment: http://stackoverflow.com/comment/40790729
type: Question
has answer: http://stackoverflow.com/a/26062227
has comment: http://stackoverflow.com/comment/40791194
has body: I am building a web application in angular js and when I try to include a date picker it shows an error such as "elem.datepicker is not a function" I referred this link for the datepicker code which has the live demo. The below is my code which will injected to the index page of angularjs application HTML &lt;div id="wrapper" ng-app="myApp"&gt; &lt;p&gt;&lt;/p&gt; &lt;input type="text" ng-model="datePicker" datepicker /&gt; &lt;/div&gt; app.js var myApp = angular.module('myApp', []); myApp.directive("datepicker", function () { return { restrict: "A", require: "ngModel", link: function (scope, elem, attrs, ngModelCtrl) { var updateModel = function (dateText) { scope.$apply(function () { ngModelCtrl.$setViewValue(dateText); }); }; var options = { dateFormat: "dd/mm/yy", onSelect: function (dateText) { updateModel(dateText); } }; elem.datepicker(options); } } }); I tried lot to solve this but I couldn't.
has comment: http://stackoverflow.com/comment/40790809
tagged with: javascript
has comment: http://stackoverflow.com/comment/40790458
has title: Datepicker Error In Angularjs Application?
score: 0
has answer: http://stackoverflow.com/a/26040270

http://stackoverflow.com/comment/41055445
comment on: http://stackoverflow.com/q/26183944
has text: what you want value() to return when test() return undefined?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40833249
has text: Although I copied exactly the same code I'm using in my app, you're right it didn't behave like I described. Sorry for that. Anyway the code you added did the trick. Thanks.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26057362

http://stackoverflow.com/comment/40944552
type: QuestionComment
comment on: http://stackoverflow.com/q/26123810
has text: I am working also with cakephp and your solution requires to change the helpers. So I prefer to use type="number" because it's ready to use
score: 0
type: Comment

http://stackoverflow.com/q/26046695
type: Question
has comment: http://stackoverflow.com/comment/40803531
has title: React JSX compiling
score: 0
tagged with: reactjs
answer count: 1
has comment: http://stackoverflow.com/comment/40803379
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26046878
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26046878
has body: I'm trying to add the class name "active" to links when they are clicked. I can't get this JSX to compile. Deals Tasks Activities What am I doing wrong? ReactifyError: content.js: Parse Error: Line 740: Invalid regular expression while parsing file

http://stackoverflow.com/a/26047223
has comment: http://stackoverflow.com/comment/40805243
has comment: http://stackoverflow.com/comment/40804357
has comment: http://stackoverflow.com/comment/40804273
upvote count: 1
has comment: http://stackoverflow.com/comment/40805203
has comment: http://stackoverflow.com/comment/40804693
score: 1
has comment: http://stackoverflow.com/comment/40804286
accepted answer of: http://stackoverflow.com/q/26047159
has comment: http://stackoverflow.com/comment/40805564
has body: So you are fading in the div not the background image with your code. The div is visible. http://jsfiddle.net/8eudrmcx/1/ http://jsfiddle.net/8eudrmcx/2/ Set the div to display: none and it will fade in. You can set the bg image in css too.
answers question: http://stackoverflow.com/q/26047159
has comment: http://stackoverflow.com/comment/40804301
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40804998
has comment: http://stackoverflow.com/comment/40805145
has comment: http://stackoverflow.com/comment/40805872
type: Answer

http://stackoverflow.com/comment/40878333
type: QuestionComment
has text: Thanks that's useful. It doesn't exactly address my use case, which as I said I think is a lost cause, but just for fun, consider that I am a base 2 guy and want to write my number literals in base 2, so that when I say `var o = {a: 111}` and then `print o.a` it prints 7, as if I had somehow magically run `parseInt(val, 2)` on all number-valued properties in newly created objects.
score: 0
comment on: http://stackoverflow.com/q/26052415
type: Comment

http://stackoverflow.com/comment/40971074
type: Comment
comment on: http://stackoverflow.com/a/26123858
type: AnswerComment
has text: Thanks a lot, I'm not sure I understood WHY the problem comes up in this case, but I ended using a variation of this (valueAccessor containing both the jQuery selector and the offset).
score: 0

http://stackoverflow.com/comment/41072233
type: AnswerComment
score: 0
type: Comment
has text: Hi, thanks for the reply, I am trying to go by the second method, but in is not working, can u tell me the places where i need to make the changes
comment on: http://stackoverflow.com/a/26193228

http://stackoverflow.com/a/26123249
type: Answer
accepted answer of: http://stackoverflow.com/q/26102133
has body: The answer here actually turned out to be relatively simple, and was able to be gathered directly from the usemin documentation (as soon as I started to look hard enough): Blocks are expressed as: <!-- build:<type>(alternate search path) <path> --> ... HTML Markup, list of script / link tags. In my case for working with Laravel, I needed to specify an alternate search path of public/ and it wound up working just fine: @section('scripts') @stop
answers question: http://stackoverflow.com/q/26102133
upvote count: 1
type: AcceptedAnswer
downvote count: 0
score: 1

http://stackoverflow.com/a/26128225
downvote count: 0
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26128027
has body: The step callback is not necessarily called for every possible number in the sequence. Add this to the options parameter to .animate: complete: function () { $this.text(Math.ceil(this.Counter)); } this ensures that the final value is shown. See http://jsfiddle.net/3qfjta79/
score: 1
answers question: http://stackoverflow.com/q/26128027
type: AcceptedAnswer

http://stackoverflow.com/comment/41027157
has text: Good, you can validate the answer now :-)
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26168307

http://stackoverflow.com/q/26169111
has comment: http://stackoverflow.com/comment/41028186
has comment: http://stackoverflow.com/comment/41028168
has comment: http://stackoverflow.com/comment/41028508
has comment: http://stackoverflow.com/comment/41028320
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26169209
has answer: http://stackoverflow.com/a/26169400
has answer: http://stackoverflow.com/a/26169209
has comment: http://stackoverflow.com/comment/41028130
type: Question
has comment: http://stackoverflow.com/comment/41027907
answer count: 3
has comment: http://stackoverflow.com/comment/41027864
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41028108
accepted answer: http://stackoverflow.com/a/26169400
has answer: http://stackoverflow.com/a/26169307
score: 0
has title: Making Functions Public from Inside jQuery Function
has body: I have a block of JavaScript/jQuery that works fine. &lt;script type="text/javascript"&gt; $(function () { function doSomething() { // Do something amazing here! } // Many various jQuery handlers and support functions }); &lt;/script&gt; But now I'd like my doSomething() function to be callable from another block of script on the same page. I understand I can do that by moving doSomething() outside of the jQuery function ($(function () {})). But then doSomething() wouldn't be able to call the helper functions inside of the jQuery function. I could move the other functions outside of the jQuery function, but some of them are handlers that need to be initialized, and they share they same helper functions. Is there a way to keep all my functions inside my jQuery function, but just make one of them visible outside of it? And any suggestions on where I could go to read up on this?

http://stackoverflow.com/a/26100165
type: Answer
downvote count: 0
score: 1
has body: The code you provided will work with out any modifications, if the js code is written after the button. i.e. Address Add Address Make sure that the button and jquery is loaded before your code is executed. The best option is provided by "Kartikeya".
upvote count: 1
answers question: http://stackoverflow.com/q/26099317

http://stackoverflow.com/q/26162725
type: Question
upvote count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41015746
favorite count: 0
has body: I have a simple web form that, once the submit button has been pressed, checks to see if all required fields have data and then prints. Here's an example of what I have so far. First When a user clicks the submit button, the page is sent to the printer. Then once the page has been printed and the user returns to the page, THEN the required check is made by the browser. How can I flip these functions? Thanks, Alex
has comment: http://stackoverflow.com/comment/41015626
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41015625
has answer: http://stackoverflow.com/a/26162856
accepted answer: http://stackoverflow.com/a/26162856
score: 2
type: AnsweredQuestion
has title: HTML Form Check required="" Before onclick="window.print()"

http://stackoverflow.com/comment/40915458
type: AnswerComment
type: Comment
has text: Sorry some mistake, try the new code. Also in your jsfiddled you have messed up tables and divs, and there is no form closing. Updated it http://jsfiddle.net/6jf0hy17/3/
comment on: http://stackoverflow.com/a/26103446
score: 0

http://stackoverflow.com/a/26072913
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26050686
type: Answer
has body: You can do everything without closures. For example, state can be stored in an object with a designated method to "call the function". However, you will then need a different setInterval() function that takes your type of method, instead of the function type that it takes now.

http://stackoverflow.com/a/69027809
upvote count: 18
has body: Just in case somebody came looking for a TypeScript version of a util simplifying this task: export const deferred = &lt;T&gt;() =&gt; { let resolve!: (value: T | PromiseLike&lt;T&gt;) =&gt; void; let reject!: (reason?: unknown) =&gt; void; const promise = new Promise&lt;T&gt;((res, rej) =&gt; { resolve = res; reject = rej; }); return { resolve, reject, promise }; }; This can be used eg. like: const { promise, resolve } = deferred&lt;string&gt;(); promise.then((value) =&gt; console.log(value)); // nothing resolve('foo'); // console.log: foo
score: 18
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26150232

http://stackoverflow.com/comment/40784735
score: 0
has text: Maybe you forgot to add the path to your JS file to the manufest/"permissions" array? Sometimes you may also need to add this path to manufest/"web_accessible_resources"
type: QuestionComment
comment on: http://stackoverflow.com/q/26036345
type: Comment

http://stackoverflow.com/a/26087816
type: Answer
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26087732
has body: You don't declare the onyoutubeready function within the event handler. That event is dispatched once the script has been loaded, it makes no sense. Instead, you just construct the player within the hover. $(".video_wrap").on({ mouseenter: function () { $(this).prop('id', 'curr'); player = new YT.Player('curr', { height: '240', width: '320', videoId: 'wJnnT1SGEsc', }); }, mouseleave: function () { //stuff to do on mouse leave } }); jsFiddle
answers question: http://stackoverflow.com/q/26087732

datetime
tags question: http://stackoverflow.com/q/26074231
tags question: http://stackoverflow.com/q/26187543
tags question: http://stackoverflow.com/q/26157487
tags question: http://stackoverflow.com/q/26160448
tags question: http://stackoverflow.com/q/26101197
tag name: datetime
tags question: http://stackoverflow.com/q/26150735
tags question: http://stackoverflow.com/q/26061615
tags question: http://stackoverflow.com/q/26112366
tags question: http://stackoverflow.com/q/26192118
type: Tag
tags question: http://stackoverflow.com/q/26153910
tags question: http://stackoverflow.com/q/26102148
tags question: http://stackoverflow.com/q/26053685
tags question: http://stackoverflow.com/q/26165894
tags question: http://stackoverflow.com/q/26043820
tags question: http://stackoverflow.com/q/26125316
tags question: http://stackoverflow.com/q/26107720

http://stackoverflow.com/comment/40841316
type: Comment
type: QuestionComment
has text: http://stackoverflow.com/questions/24168040/upload-multiple-files-with-php-and-jquery/24168617#24168617
comment on: http://stackoverflow.com/q/26067173
score: 0

http://stackoverflow.com/q/26095362
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26100261
has title: Google maps api directions zoom not working
downvote count: 0
tagged with: javascript
tagged with: google-maps-api-3
answer count: 1
has body: Im using below code to show a distance between two distances but zoom doesn't work it always will be in default zoom level. I tried setting lot of values but it's not working. Please help. var directionsDisplay; var directionsService = new google.maps.DirectionsService(); var map; var from = ""; function initialize() { directionsDisplay = new google.maps.DirectionsRenderer(); directionsDisplay.preserveViewport = false; var dallas = new google.maps.LatLng(32.8931567, -97.0402193); var mapOptions = { zoom: 15, center: dallas }; map = new google.maps.Map(document.getElementById('googleMap'), mapOptions); map.setZoom(map.getZoom()+5); directionsDisplay.setMap(map); calcRoute(); } function calcRoute() { var start = 'dallas airport terminal a'; var end = 'SpringHill Suites'; console.log("HotelDetail: " + end); var request = { origin: start, destination: end, travelMode: google.maps.TravelMode.DRIVING }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } }); } google.maps.event.addDomListener(window, 'load', initialize);
favorite count: 0
has answer: http://stackoverflow.com/a/26100261

http://stackoverflow.com/comment/40897654
type: Comment
has text: Could you tell me what you mean by that or give an example? I tried a lot of codes, but nothing seems to work.
type: QuestionComment
comment on: http://stackoverflow.com/q/26097733
score: 0

http://stackoverflow.com/a/26052235
has comment: http://stackoverflow.com/comment/40834106
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40813343
has comment: http://stackoverflow.com/comment/40813214
has body: You don't need a count function, just do this: running total: {{ ($index+1) }} Example Update You can not use a function like that inside an ng-repeat expression, because that function will get evaluated in each $digest cycle and it will retrieve a different value every time, which will force the $digest to re-evaluate the result, which will retrieve a different value, and so on so forth until it has tried 10 times... If you need to do this kind of aggregates for the data of your ng-repeat, I think that what you should do is create a custom filter that should be used inside the ng-repeat (or the ng-repeat-start), that filter would retrieve a copy of your array of objects but adding the aggregate information as a new key of each item, so that you can consume it as any other property of the items of your iterations. Something like this: ng-repeat-start="data in data.nodes|aggregate:'fieldToAggregate'" Udate 2 On a second thought, there is a way to make your count function work, it's quite hacky but it works, change your count function, make it look like this: $scope.count = function(scope_, n) { if (!scope_.hasOwnProperty("__total")){ if(!scope_.$parent.hasOwnProperty("__count")){ scope_.$parent.__count=0; } scope_.$parent.__count+=parseInt(n, 10); scope_.__total=scope_.$parent.__count; } return scope_.__total; } And use it like this: running total: {{ count(this, data.n) }} Working Examle This function shouldn't fail like the other one because this one will always return the same result every time that it's evaluated in the scope of your repeated items.
accepted answer of: http://stackoverflow.com/q/26052170
type: Answer
has comment: http://stackoverflow.com/comment/40813380
upvote count: 1
has comment: http://stackoverflow.com/comment/40813293
has comment: http://stackoverflow.com/comment/40834038
has comment: http://stackoverflow.com/comment/40813371
answers question: http://stackoverflow.com/q/26052170
score: 1
has comment: http://stackoverflow.com/comment/40813505
has comment: http://stackoverflow.com/comment/40828173

http://stackoverflow.com/q/26194528
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41079437
tagged with: javascript
has comment: http://stackoverflow.com/comment/41075168
type: Question
score: 5
has comment: http://stackoverflow.com/comment/41074547
tagged with: jquery
has comment: http://stackoverflow.com/comment/41074931
favorite count: 0
has comment: http://stackoverflow.com/comment/41076753
has comment: http://stackoverflow.com/comment/41074832
upvote count: 5
has body: I try to run jQuery $.Deferred on node.js. The working code in Browser is http://jsfiddle.net/vLu35bbu/ console = { log : function(msg) { $("#console").append(msg); } }; var __t = function(time) { return $.Deferred(function(dfd) { setTimeout(dfd.resolve, time); }) .promise(); } __t(2000) .then(function() { console.log("Hello!"); }); So, just trying to migrate to node: https://www.npmjs.org/package/jquery npm install jquery then app.js var $ = require('jquery'); var __t = function(time) { return $.Deferred(function(dfd) { setTimeout(dfd.resolve, time); }) .promise(); }; __t(2000) .then(function() { console.log("Hello"); }); The error goes: /....../app.js:5 return jquery.Deferred(function(dfd) ^ TypeError: Object function ( w ) { if ( !w.document ) { throw new Error( "jQuery requires a window with a document" ); } return factory( w ); } has no method 'Deferred' at __t (/....../app.js:5:18) at Object.&lt;anonymous&gt; (/....../app.js:12:2) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:906:3 What do I miss? Thanks. EDIT Thanks to the comment, I try to use https://github.com/kriskowal/q instead. However, some error occurred. /Volumes/GD15/gd1/_book_project/app.js:5 return $.Deferred(function(dfd) ^ TypeError: Object function Q(value) { // If the object is already a Promise, return it directly. This enables // the resolve function to both be used to created references from objects, // but to tolerably coerce non-promises to promises. if (isPromise(value)) { return value; } // assimilate thenables if (isPromiseAlike(value)) { return coerce(value); } else { return fulfill(value); } } has no method 'Deferred' at __t (/Volumes/GD15/gd1/_book_project/app.js:5:13) at Object.&lt;anonymous&gt; (/Volumes/GD15/gd1/_book_project/app.js:12:2) at Module._compile (module.js:456:26) …
has title: node jQuery $.Deferred
has comment: http://stackoverflow.com/comment/41074761
tagged with: node.js
answer count: 0
downvote count: 0

http://stackoverflow.com/a/26137843
has body: You should select all items except first :not(:first). Then you the items with values of 3,5,7 $('.item').filter(function (index) { return index > 2 && index % 2 == 1 }).css('font-weight', 'bold'); Iterate over these values and if value equals the value you hover then don't add it to your text field. $('.item').filter(function (index) { return index > 2 && index % 2 == 1 }).css('font-weight', 'bold'); $('.item:not(:first)').mouseover(function() { var text =""; var itemval = $(this).text(); items = $('.item').filter(function (index) { return index > 1 && index % 2 == 0 && index < 8 }) $.each(items, function(i,val){ var value = $(val).text(); if( value != itemval ){ text += value + ' '; } }); $('.answer').text(text); }); 1 2 3 4 5 6 7 8 9
answers question: http://stackoverflow.com/q/26137231
type: Answer
score: 0

http://stackoverflow.com/a/26139170
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26138621
score: 1
has comment: http://stackoverflow.com/comment/40972852
answers question: http://stackoverflow.com/q/26138621
has body: Just change the change event handler like this, avoid reference to i. variable i is getting dangled here. $("#" + selectArray[i]).change(function() { var selectValue = $(this).val(); storage.set($(this).attr('id'), selectValue); }); This should work. Example
type: Answer
upvote count: 1

http://stackoverflow.com/q/26079997
tagged with: css
has comment: http://stackoverflow.com/comment/40865284
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26080148
score: 1
has answer: http://stackoverflow.com/a/26080148
has comment: http://stackoverflow.com/comment/40864201
upvote count: 1
has comment: http://stackoverflow.com/comment/40864208
has answer: http://stackoverflow.com/a/26080056
type: Question
has comment: http://stackoverflow.com/comment/40864238
tagged with: javascript
has answer: http://stackoverflow.com/a/26080072
has body: I am trying to make a button show up when I mouseover a certain row. The $index variable is the total number of rows in the table. The "#r"+a.toString() variable refers to the id of the table row and "#b"+a.toString() refers to the button of the row that I want to be displayed when I hover over a certain row of the table. Currently it displays the button in the last row whenever I mouseover any row. Item Quantity Price <?php $item_array; $index = 0; $index_2 = 1; $r = "r"; $b="b"; foreach ($item_array as $id_array){ ?> <tr id="<?php echo $r.$index_2; ?>"> <?php echo $item_array[$index] ?> <?php echo $quantity_array[$index] ?> <?php echo $price_array[$index];?> <button id="<?php echo $b.$index_2; ?>" type="button" style="float:right; visibility:hidden; align-content:right;" class="btn btn-sm btn-warning">Edit <?php $index++; $index_2++; echo " "; } ?>
answer count: 3
has title: Display button when hover over certain row in table
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40864191
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26080072
tagged with: php

meteor-helper
tag name: meteor-helper
tags question: http://stackoverflow.com/q/26169346
type: Tag

http://stackoverflow.com/q/26051326
type: Question
linked to: http://stackoverflow.com/q/26035638
has comment: http://stackoverflow.com/comment/40811890
score: 0
answer count: 1
has title: Angular 405 error on $http request
tagged with: javascript
has body: This question is sort of related to this question I posted. Allow my API to be access via AJAX I manage to fix the CORS error, I think by adding following the instructions on http://enable-cors.org/server_apache.html. The issue doesn't appear now. But this time, I am getting a 405 error, to which I am not sure why so. Client var appOrigin = 'http://event.chart.local/api/vendor/events.json'; app.factory('chartListLoadService',['$http',function($http){ return { fetchList: function(city){ var data = {city:city}; $http({ method:'post', url:appOrigin, data:data }).success(function(data){ alert(data); }); }, testFunction:function(){ alert('testing'); } }; }]); Server public function post_events() { $city = Input::post('city','all'); $c = Model_chart::format_chart($city); return $this-&gt;response($c); } Header Info Remote Address:127.0.0.1:80 Request URL:http://event.chart.local/api/vendor/events.json Request Method:OPTIONS Status Code:405 Method Not Allowed Request Headersview parsed OPTIONS /api/vendor/events.json HTTP/1.1 Host: event.chart.local Connection: keep-alive Access-Control-Request-Method: POST Origin: http://app.event.chart User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36 Access-Control-Request-Headers: accept, content-type Accept: */* Referer: http://app.event.chart/ Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Response Headersview parsed HTTP/1.1 405 Method Not Allowed Date: Fri, 26 Sep 2014 02:48:33 GMT Server: Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11 X-Powered-By: PHP/5.5.11 Access-Control-Allow-Origin: http://app.event.chart Access-Control-Allow-Methods: POST, GET, OPTIONS Access-Control-Allow-Headers: Content-Type Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26053662
tagged with: php
tagged with: fuelphp
has comment: http://stackoverflow.com/comment/40812316
has comment: http://stackoverflow.com/comment/40811842
has comment: http://stackoverflow.com/comment/40812120

http://stackoverflow.com/comment/40843569
has text: I just want to point out the difference between this answer and my own. This one executes the method even after scrolling has stopped (more of an interval debounce) where mine is a true throttle implementation. Also, you stole my checkmark :P
comment on: http://stackoverflow.com/a/26067895
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40953034
comment on: http://stackoverflow.com/a/26123519
score: 1
type: AnswerComment
has text: Really? I did understand http://www.w3.org/TR/animation-timing/: "*Using this API should result in more appropriate utilization of the CPU by the browser.*" like that.
type: Comment

http://stackoverflow.com/comment/40946278
type: Comment
type: QuestionComment
has text: it is tough to make a general solution becuase what if you want to do it after or before or in the middle of the trigger...or what if you want custom event objects / arguments for the events being called. it would be best to have some code like this `this.beforeAddEvent.callAll(arg1, arg2)` in all of your functions.
comment on: http://stackoverflow.com/q/26124290
score: 0

http://stackoverflow.com/comment/40925335
has text: You've got at least two major problems with your JavaScript before I even look at your JSP (which I know nothing about).
type: QuestionComment
comment on: http://stackoverflow.com/q/26113673
score: 2
type: Comment

http://stackoverflow.com/q/26098626
score: 0
linked to: http://stackoverflow.com/q/23799296
type: Question
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/26098669
has title: How to get updated height and width in JavaScript?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26098676
has body: How can I constantly get the width and the height of the browser via javascript? Simply using document.body.clientWidth or window.innerWidth gives the width once the page is loaded. However, how can one obtain the width and height updated whenever the user resizes the window?

http://stackoverflow.com/comment/41060649
type: Comment
has text: This is an awesome idea conceptually, and in line with what im trying to do.. but it doesn't work :( window.WebForm_OnSubmit is returning undefined =-\
type: AnswerComment
comment on: http://stackoverflow.com/a/26185212
score: 0

http://stackoverflow.com/q/26123956
has answer: http://stackoverflow.com/a/26124115
has title: Isotope Not Sorting
accepted answer: http://stackoverflow.com/a/26124115
answer count: 1
downvote count: 0
favorite count: 0
type: AnsweredQuestion
score: 3
upvote count: 3
type: Question
tagged with: javascript
tagged with: jquery-isotope
tagged with: jquery
has body: I am using isotope v1.5.24 and jQuery in no-conflict mode, and trying to sort the data by a number but it is not working. I've set up a jsfiddle here: http://jsfiddle.net/tgelles/esxw3kne/1/, and you can see the first item should be third in the list. The isotope code is: var $j = jQuery.noConflict(); $j(document).ready(function () { //set isotope variables var $container = $j('.section-container'); filters = {}; $container.isotope({ getSortData: { course_number: function ($elem) { return parseInt($elem.find('.course-number').text(), 10); } }, itemSelector: 'section', layoutMode: 'straightDown' }); $container.isotope({ sortBy: 'course_number' }); FWIW the 'course_number' sortBy is actually json decoded from an API, which in the fiddle is simple HTML.

http://stackoverflow.com/comment/40888448
has text: Just create a 2D array, with your spriral values, then bind the outer array to the rows, and the inner array to the columns in Angular. You can then add ng-click event to a button to dynamically create the 2D array and populate the values.
comment on: http://stackoverflow.com/q/26092923
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26138284
tagged with: screenshot
has body: I need to create a cross-browser extension that can detect locally active windows. Recently I came through Snagit Chrome extension where clicking on "Screen" detects the active windows of the system and allows to capture any desired screen. Can anyone please explain the platform/tech used to detect or get the window handles from browser app? or any other way to get the handles.. Thanks
has comment: http://stackoverflow.com/comment/40970675
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/40970219
tagged with: javascript
tagged with: browser
score: 0
has title: Snagit Chrome Extension Technology
answer count: 1
has answer: http://stackoverflow.com/a/26256206
accepted answer: http://stackoverflow.com/a/26256206
has comment: http://stackoverflow.com/comment/41145157
type: AnsweredQuestion

http://stackoverflow.com/comment/40909355
type: AnswerComment
score: 0
type: Comment
has text: @T.J.Crowder: Yes, it doesn't (matter). So let's not waste too much time on this. What I like about this solution is that it is elegant and readable. But it is wrong to say that my solution searches through all 100 elements; it searches (via `indexOf`) only until the first match, which except in degenerate cases is unlikely to be much further into the original array than the match in the resultant array you are searching. By my computation, your algorithm is `O((n-1) x n / 2)`, and mine is `O(n x (n+1) / 2)`, for a difference of `N`, or 2% in the case of 100 elements.
comment on: http://stackoverflow.com/a/26103523

http://stackoverflow.com/q/26053436
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40815479
has answer: http://stackoverflow.com/a/26053699
has comment: http://stackoverflow.com/comment/40815737
has comment: http://stackoverflow.com/comment/40815761
has body: On confirm the function is called but it skips the HTML5 validation and just redirects. As of now the page is static, no other validation is there. Email : HTML : Submit Any suggestions?
score: 0
has comment: http://stackoverflow.com/comment/40815901
has title: html5 validation and JS
type: Question
has comment: http://stackoverflow.com/comment/40815772
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40815493
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40815369
has comment: http://stackoverflow.com/comment/40815795
has comment: http://stackoverflow.com/comment/40815516
linked to: http://stackoverflow.com/q/24919337

http://stackoverflow.com/comment/40937792
has text: @Jayesh: when you use `FileReader`, you read `only the contents` whereas `changeEvent.target.files[0]` has `all information` including contents, fileName,...
comment on: http://stackoverflow.com/a/26118399
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/41024233
comment on: http://stackoverflow.com/a/26166849
score: 0
type: AnswerComment
has text: I quote Martin "2)img.width... ...It doesn't change when the others are set to some value."
type: Comment

http://stackoverflow.com/a/26192611
upvote count: 2
has comment: http://stackoverflow.com/comment/41074947
accepted answer of: http://stackoverflow.com/q/26187332
has comment: http://stackoverflow.com/comment/41083413
answers question: http://stackoverflow.com/q/26187332
score: 2
has body: You don't extend the constructor, but rather the prototype, by defining a new property on it, with a "getter": Object.defineProperty(Number.prototype, 'foo', { get: function() { return this * 2; } }); &gt; 1.foo SyntaxError // parser expected decimal part of number after dot &gt; (1).foo 2 &gt; 1..foo 2 &gt; 1.0.foo 2 &gt; Number(1).foo 2 &gt; new Number(1).foo 2 &gt; 1['foo'] 2 &gt; 1e0.foo // exponential notation 2 &gt; parseInt('1px').foo 2 &gt; 0x1.foo // hex 2 &gt; 01.foo // octal, disallowed in strict mode 2 &gt; Math.PI.foo 6.283185307179586 &gt; Infinity.foo Infinity &gt; NaN.foo NaN Why does the first example 1.foo fail? The JS parser, once it sees the dot, expects a decimal portion. There's no way around that. So you'll have to content yourself with saying 1.0.foo. But 1.0 is a primitive not an object, right? Then, how can 1.0.foo possibly work? Because JavaScript will coerce (cast, or transform) primitives to objects when necessary. In this case the numeric value is coerced to a number object just long enough to compute the value of foo, after which the object is thrown away (by garbage collection). One might be tempted to also implement a setter, as in set: function(v) { this = v/2; } but of course this is invalid; we can't set this!! And there's no way to access the PrimitiveValue underlying the Number object to set it. I do not recommend the above, It's not considered best practice to extend built-in types in this way. This is best placed in the realm of exotica.
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/26060824
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26060966
has answer: http://stackoverflow.com/a/26060966
tagged with: mysql
type: Question
accepted answer: http://stackoverflow.com/a/26060885
tagged with: javascript
has comment: http://stackoverflow.com/comment/40828727
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40828771
has comment: http://stackoverflow.com/comment/40828791
tagged with: jquery
has comment: http://stackoverflow.com/comment/40828747
has answer: http://stackoverflow.com/a/26060885
has title: Show wait div until server response in ajaxForm
has body: I am trying to show $("#wait").show(); until the server response returns. I am confused where to put "Wait" div. It should show waiting div until server response . There was sleep of 5 second on server script to check if the wait div was working.
tagged with: php

http://stackoverflow.com/q/26133889
tagged with: google-chrome
tagged with: youtube
has comment: http://stackoverflow.com/comment/41001604
tagged with: audio
has answer: http://stackoverflow.com/a/28082714
has body: I am creating all in one music app using multiple APIs. I want to stream only audio of youtube song. As i searched a lot but could not find actual solution. many of them says it will be against Youtube TOS. If it is so than how "StreamUs" chrome extension is working. I am not creating something this but i want to stream a song audio only as it is in above extension. Thanks in advance.
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29657030
has comment: http://stackoverflow.com/comment/40962571
downvote count: 0
tagged with: javascript
favorite count: 0
has title: how "streamus" chrome extension is streaming only audio of youtube video?
score: 2
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/comment/41062114
type: QuestionComment
has text: How are you checking the length? None of your code actually uses it. Probably, you are checking the length before it has loaded the items.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26187437

http://stackoverflow.com/comment/40804998
type: AnswerComment
comment on: http://stackoverflow.com/a/26047223
score: 0
type: Comment
has text: http://jsfiddle.net/8eudrmcx/10/ you can't use background image. You must use a normal image and fade it in.

http://stackoverflow.com/q/26125424
tagged with: mongodb
upvote count: 1
tagged with: arrays
answer count: 1
tagged with: mongoose
tagged with: javascript
has answer: http://stackoverflow.com/a/26125790
favorite count: 0
duplicate of: http://stackoverflow.com/q/23667086
has body: I'm new to this javascript thing and have i have some doubts about mongoose 'find' scope's. I wrote the code below to try to understand the problem. The code below searches into a Shopping collection and then search for the Stores assigned to this Shopping. storeMap is a hashmap of storeId => storeObject, but when the Store.findOne scope end, storeMap seems to rollback to an empty array... var storeMap = {}; Shopping.findOne({ name: shoppingName }, function(err, shopping){ shopping.stores.forEach(function(storeId) { Store.findOne({_id: storeId}, function(err, store) { if(err) console.log(err); console.log(store); //prints out store data storeMap[storeId] = store; console.log(storeMap); //prints out store data }); console.log(storeMap); //prints out an empty array }); }); So, why my storeMap array is printing an empty array instead of a store array?
linked to: http://stackoverflow.com/q/23667086
tagged with: node.js
downvote count: 0
type: UnansweredQuestion
type: Question
has title: Mongoose findOne scope doubts
score: 1

http://stackoverflow.com/q/26065907
has comment: http://stackoverflow.com/comment/40838822
has title: Placing each matched value in its own capturing group
tagged with: capturing-group
has answer: http://stackoverflow.com/a/26066134
has body: I've been at this for too long, trying to figure out how to match a comma-delimited string of values, while breaking apart the values into their own capturing groups. Here are my requirements: No leading comma Terms can be alphanumeric, with between 1 and 7 characters Min: 1 term; Max: unlimited Unlimited whitespace between terms and commas No trailing comma I'm so close, but I'm not able to get all terms in the string into their own capture groups. Instead it places the last matched term from the first capturing group into group #1, instead of placing all matches into previous groups. So here's my example: abc1234, def5678, ghi9012 I would expect abc1234 to be group #1, def5678 to be group #2, and ghi9012 to be group #3. Instead, using the expression below, I get def5678 in group #1 and ghi9012 in group #2. /(?:([A-z0-9]{1,7})\s*,\s*)+([A-z0-9]{1,7})/g Link to RegExr example I'm pretty sure I haven't set up my capturing/non-capturing groups correctly. Any help would be greatly appreciated.
type: AnsweredQuestion
score: 1
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26066134
tagged with: regex
favorite count: 0
upvote count: 1

http://stackoverflow.com/comment/40956243
score: 0
type: Comment
has text: My answer is the thing that solves the situation. thanks for your answer, but it was not sufficient to make it work. Definitely while replacing the code I mentioned I have accidentally added an extra bracket to the place, and this is not a different kind of problem in the code than you have suggested solution. Both are syntactic problems and the solutions. And the logical problem is another issue that can be another answer, but again not as complete as your answer and two of mine alone itself. And even more,your answer is mentioned in my answer to be belong not to me.
comment on: http://stackoverflow.com/a/26129325
type: AnswerComment

http://stackoverflow.com/a/26136071
score: 0
answers question: http://stackoverflow.com/q/26135380
type: Answer
has body: It will ask for Enable ActiveX in your browser, please say allow This ans was given in how validate file size using HTML and Javascript on client side

http://stackoverflow.com/a/26096583
score: 0
type: Answer
has body: You can use this code, here is the link http://jqueryvalidation.org/files/demo/ And here is the code view-source:http://jqueryvalidation.org/files/demo/
answers question: http://stackoverflow.com/q/26096463

http://stackoverflow.com/q/26175367
tagged with: css
accepted answer: http://stackoverflow.com/a/26175643
has title: Slide Toggle menu won't stay opened
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41039502
has comment: http://stackoverflow.com/comment/41039470
has body: $('span.nav-btn').click(function () { $('ul#menu').slideToggle(); }) $(window).resize(function () { if ( $(window).width() &gt; 900) { $('ul#menu').removeAttr('style') } }); $('span.sub-btn').click(function () { $('ul#sub').slideToggle(); $(this).toggleClass('active'); return ('false'); }) $(window).resize(function () { if ( $(window).width() &gt; 900) { $('ul#sub').removeAttr('style') } }); http://codepen.io/anon/pen/Hnhea when browser width scaled down to 900px or so, inside the "MENU" when product &amp; service clicked the script is still working but when mouse goes over the other place, the sub menu is hidden and make it looks like :hover. Does someone have a solution how to make the sub menu still show even mouse was in other place??? Thank you.
type: Question
has answer: http://stackoverflow.com/a/26175643
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41039261
favorite count: 0
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40986097
score: 0
comment on: http://stackoverflow.com/a/26146068
type: Comment
has text: @Frank No, I meant to do following `` so your link will take the same styles as your icon did. But as long as I don't know what properties your icon_2 class has set, there can be some problems. Could you add it to your question?
type: AnswerComment

http://stackoverflow.com/q/26145835
has title: window.load not working if the page has redirect
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery-events
has comment: http://stackoverflow.com/comment/40984664
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26146085
has body: I have got a strange problem. I am using window.open() to open a new window, and $(window).load() to check if the new window has been loaded or not. The problem is, if the new window has a redirect, the function doesn't work... Can there be a solution to that? I tried both $(window).load() and window.onload... Both give same results. Any help will be great.
type: UnansweredQuestion
score: 1

http://stackoverflow.com/comment/40940421
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26122115
score: 1
has text: You don't know...? O_o Well, the first thing I'd try is attaching to `document`.

http://stackoverflow.com/comment/41032936
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26171538
has text: You use `someMethodUsingSomeAPI =` where it should have been `someMethodUsingSomeAPI:`. Then, *instantiate* a `B`, and call the *method* on it. Or why were you defining a class at all?
score: 0

http://stackoverflow.com/q/26107500
downvote count: 3
tagged with: mysql
has body: I have read several tutorials on chartrooms in jquery and JavaScript with a back-end of PHP and mysql. I know the php part of this will work (or if it won't then I can fix it more than likley) however the problem lies in my extremely limited knowledge of jquery. So hopefully someone here can give some insight on where on where my (probably extremely obvious) error lies I would greatly appreciate it. Additionally: I am not looking for one person to show me EXACTLY what needs to be done, just a push in the right direction because I couldn't find anything that was actually helpful. main page: <?php include 'connect.php'; session_start(); include 'include/notloggedin.php'; ?> zyrnith test <?php include 'include/messages.php'; ?> <?php echo $_SESSION['username']; ?> Logout sendchat.php: <?php include("connect.php"); if(!isset($_SESSION['userid']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH'])=='xmlhttprequest'){ die(" "); } if(isset($_SESSION['userid']) && isset($_POST['message'])) { $message=htmlspecialchars($_POST['message']); if($message){ mysql_query("INSERT INTO chat (user,message) VALUES ('$_SESSION['userid']','$message')") or die(mysql_error()); } } ?> any other info you need let me know and I can update this. File Structure: include messages.php notloggedin.php sendchat.php changelog.txt connect.php error.php chat.php index.php login.php logout.php register.php Uncaught SyntaxError: Unexpected token ) -- Line 33
type: Question
has answer: http://stackoverflow.com/a/26111161
has comment: http://stackoverflow.com/comment/40914836
has title: having problems creating jquery + PHP +MySQL chatroom
has comment: http://stackoverflow.com/comment/40915433
has comment: http://stackoverflow.com/comment/40914879
tagged with: javascript
answer count: 2
upvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/40914822
favorite count: 0
has comment: http://stackoverflow.com/comment/40914769
has answer: http://stackoverflow.com/a/26107829
has comment: http://stackoverflow.com/comment/40914853
type: UnansweredQuestion
score: -3
tagged with: php

http://stackoverflow.com/comment/40915821
score: 0
type: Comment
has text: @adeneo there is the first "news" which already has a link - and as there is already a link, I do not want to replace it, just ignore it (if you inspect element, there would be two links there)
type: QuestionComment
comment on: http://stackoverflow.com/q/26107993

http://stackoverflow.com/comment/41043270
score: 0
has text: Is ID `submitme` unique on page?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26177688

http://stackoverflow.com/comment/40942793
type: AnswerComment
has text: Thanks for the quick response. But `icon.fillColor='red';` only works if you explicitly define the paths for the icon, not if you use an .svg file. When I do `console.log(marker.getIcon());` I get `Object {url: "/images/icon_image.svg", size: U, origin: T, anchor: T, fillColor: "red"}`. It displays the icon, but the color is still the default black.
type: Comment
comment on: http://stackoverflow.com/a/26073368
score: 0

http://stackoverflow.com/comment/40829266
has text: its a school assignment.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26050298
type: Comment

http://stackoverflow.com/comment/41035036
type: AnswerComment
type: Comment
has text: console.log(b == b) ??? false!? Can you explain this behaviour?
comment on: http://stackoverflow.com/a/26173068
score: 0

http://stackoverflow.com/comment/41030927
score: 0
comment on: http://stackoverflow.com/q/26170483
type: QuestionComment
type: Comment
has text: @IlyaStreltsyn No I havent, but javascript would be perfect to help me make this

http://stackoverflow.com/q/26049869
tagged with: date
has comment: http://stackoverflow.com/comment/40809116
has comment: http://stackoverflow.com/comment/40809303
has comment: http://stackoverflow.com/comment/40809294
type: Question
has comment: http://stackoverflow.com/comment/40809443
has comment: http://stackoverflow.com/comment/40810095
has comment: http://stackoverflow.com/comment/40809503
has title: Why might Date.prototype.toString() and Date.prototype.toLocaleString() return strings representing inconsistent points in time?
downvote count: 0
answer count: 1
tagged with: javascript
has body: var d = new Date(); // returns correct value "Fri Sep 26 2014 01:16:31 GMT+0300 (E. Europe Daylight Time)" d.toString(); // returns incorrect value one hour behind "9/26/2014 12:16:31 AM" d.toLocaleString(); It seems toLocaleString() is not taking DST into account for this test case. How are local times calculated by Date (eg, does Chrome apply DST rules itself or via OS) and how/why does the algorithm differ between toString() and toLocaleString()? Is this a bug or intended behavior? Tested on Chrome/37.0.2062.120 with location Nicosia, Cyprus (http://www.timeanddate.com/time/zone/cyprus/nicosia)
has comment: http://stackoverflow.com/comment/40809352
score: 1
has comment: http://stackoverflow.com/comment/40809486
has answer: http://stackoverflow.com/a/26050325
has comment: http://stackoverflow.com/comment/40809239
favorite count: 0
has comment: http://stackoverflow.com/comment/40809192
has comment: http://stackoverflow.com/comment/40809619
tagged with: timezone
tagged with: v8
upvote count: 1
tagged with: google-chrome
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40809327
accepted answer: http://stackoverflow.com/a/26050325
has comment: http://stackoverflow.com/comment/40809211

http://stackoverflow.com/comment/40867678
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26081635
has text: But can't set breaking point in javascript.
score: 0

http://stackoverflow.com/comment/40783580
has text: `$('.count-link span')[0]` will return a dom element reference so `.tex()` will throw anerror
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26036213
type: AnswerComment

http://stackoverflow.com/comment/40905898
type: QuestionComment
has text: Why would you match on `[\s\S]*` when what you want is "everything up to either `<` or `\n`"?
score: 0
comment on: http://stackoverflow.com/q/26102838
type: Comment

http://stackoverflow.com/a/26131844
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/26129417
has body: This line .. var priceLevel = nlapiGetLineItemValue('item', 'pricelevel')); .. does not give you Custom but the internal id of the Custom price level. If I recall correctly, this will be -1.
upvote count: 1
answers question: http://stackoverflow.com/q/26129417

http://stackoverflow.com/comment/40855577
type: Comment
has text: Thanks for the quick reply. Looking into your suggested web link
type: AnswerComment
comment on: http://stackoverflow.com/a/26075356
score: 0

http://stackoverflow.com/comment/42963080
comment on: http://stackoverflow.com/a/27232613
type: AnswerComment
has text: I tired but no difference than what I have. My problem is only in disabled dropdownlist and hoover mouse pointer near the dropdownlist it takes many hoover attempts to show tooltip. however when the dropdownlist is enabled via edit button on that page, the tooltip appear as quickly as I move mouse pointer over the dropdownList.
score: 0
type: Comment

http://stackoverflow.com/q/26083893
type: Question
tagged with: browser
has title: catching browser's volume event
has comment: http://stackoverflow.com/comment/40880924
tagged with: javascript
tagged with: actionscript
has body: I'm running an external flash video player on client side, and want to keep it muted all the time. I'm having difficulties to control the player's volume while playing an external swf (VPAID ads). Is there a way, through JavaScript, to tell if the browser's volume raised? I'm not using HTML5. Thanks
answer count: 1
downvote count: 0
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: volume
score: 2
has answer: http://stackoverflow.com/a/26089060

http://stackoverflow.com/q/26094858
type: Question
tagged with: javascript
tagged with: jquery
has body: I have an SPA that uses knockout components dynamically loaded with require. Here is what it currently looks like &lt;!-- ko if: state() === 'one' --&gt; &lt;component-one&gt;&lt;/component-one&gt; &lt;!-- /ko --&gt; &lt;!-- ko if: state() === 'two' --&gt; &lt;component-two&gt;&lt;/component-two&gt; &lt;!-- /ko --&gt; &lt;!-- ko if: state() === 'three' --&gt; &lt;component-three params="myParam: MyParam()"&gt;&lt;/component-three&gt; &lt;!-- /ko --&gt; &lt;!-- ko if: state() === 'four' --&gt; &lt;component-four&gt;&lt;/component-four&gt; &lt;!-- /ko --&gt; What I'm looking for is something that produces the same result as the if binding for virtual elements but also allows me to place a transition (fade in/ out) when the state changes. I have found something like this http://jsfiddle.net/rniemeyer/kNtdu/ which appears to work for knockout 2.1 but not 3.2. Please note I'm not looking for just a fadeVisible, but more along the lines of a fadeIf. Thanks for any help.
accepted answer: http://stackoverflow.com/a/26109773
upvote count: 1
has title: Knockout 3.2 - 'if' based transition between AMD loaded components
answer count: 1
has answer: http://stackoverflow.com/a/26109773
favorite count: 0
type: AnsweredQuestion
tagged with: knockout-components
downvote count: 0
score: 1
tagged with: knockout.js

http://stackoverflow.com/comment/40941903
score: 0
type: Comment
type: QuestionComment
has text: @X.L.Ant No Knockout is compliant back to IE6. Something inside the binding is failing more than likely.
comment on: http://stackoverflow.com/q/26120965

http://stackoverflow.com/a/26101586
upvote count: 2
has comment: http://stackoverflow.com/comment/41252538
has comment: http://stackoverflow.com/comment/40903522
answers question: http://stackoverflow.com/q/26101475
accepted answer of: http://stackoverflow.com/q/26101475
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40903436
has body: The CSS bottom property expects a length value. 300 is not a length. It isn't 0 and it doesn't have a unit. You probably mean '300px'.
type: Answer
score: 2

http://stackoverflow.com/q/26034917
accepted answer: http://stackoverflow.com/a/26036187
has answer: http://stackoverflow.com/a/26035125
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
type: Question
has answer: http://stackoverflow.com/a/26036187
has title: Meteor: using jQuery to retrieve selected value after clicking submit
tagged with: javascript
has body: How do I retrieve the selected value from the dropdown list created within my form using the following bootstrap classes? I am using Meteor 0.9.2 and mizzao:bootstrap-3 My HTML: Field One Two Three Four Five CLIENT.JS: Template.createpost.events({ 'submit form#createpost': function(e) { e.preventDefault(); var insertpost = { field: //CODE TO RETRIEVE THE VALUE OF THE SELECTED ITEM // } Meteor.call('insertPostData', insertpost); } }); SEVER.JS: Meteor.methods({ 'insertPostData': function(insertpost){ return insertpost._id = AllPosts.insert(insertpost); } });
score: 0
answer count: 2
tagged with: jquery
tagged with: meteor
possible better answer: http://stackoverflow.com/a/26035125

dialog
tag name: dialog
tags question: http://stackoverflow.com/q/26116727
tags question: http://stackoverflow.com/q/26156620
type: Tag
tags question: http://stackoverflow.com/q/26039012

http://stackoverflow.com/q/26097991
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26127537
score: 0
has title: SVG drag elements on the edges of the path
has body: I have the path as described in the attached image 1, and I want to drag and drop the another element (as rounded red) on the edges of the drawn path, so at the end I want to drag the red marked element on the black line that is edge of the path, not inside the path,and now i can move inside and outside the path, but I want only to be on the border of the path So here I have the customized the code as below on the mouseMove function and on the select case svgedit.compiled.js if (path_child == 'path') { var line_rotate = 90; if (group_w_d == "drag_drop_D") { var test = 'rotate(' + line_rotate + ',' + line_pt.x + ',' + line_pt.y + ') translate(' + trans_x + ',' + line_pt.y + ') scale(' + width + ',' + height + ')'; } else { var test = 'rotate(' + line_rotate + ',' + line_pt.x + ',' + line_pt.y + ') translate(' + line_pt.x + ',' + line_pt.y + ') scale(' + width + ',' + height + ')'; } selectedElements[0].setAttribute('transform', test); var cls = selectedElements[0].getAttribute('class'); //alert(cls); $('.' + cls).each(function() { $(this).attr('transform', test) }); } For example here is the fiddle link example, which I want exactly, here we can move the ellipse on the path wherever we want, but I want it to be on the edges of my path elements Edited: For example just imagine that we are creating a room using rectangle and in this room we have to fix a door or window,like marked as rounded red, so we can move the path along all the position of the rectangle but it should only on the edges not inside the rect or outside the rect, there is no problem about it we done it, But now we want split the wall to extended wall so we converted the rect into path after converting this the doors or windows are not moving along with the edges of the path instead of this the doors are moving anywhere on the working area of the SVG-EDIT and here my doors and windows are the g not ellipse, so i know ellipse only have the cx,cy and g may have the transform so am not clear how to do it …
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40923555
has comment: http://stackoverflow.com/comment/40943221
linked to: http://stackoverflow.com/q/25429067
has comment: http://stackoverflow.com/comment/40909975
type: Question

http://stackoverflow.com/comment/41060755
has text: What content type do you need to set? And what page was suggesting that?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26186765
score: 2

http://stackoverflow.com/a/26179156
score: 0
type: Answer
has body: Can be done like: &lt;?php $anyphpvariable='foo'; echo &lt;&lt;&lt;EOD &lt;script type="text/javascript"&gt; document.getElementById('my_element_id').innerHTML=$anyphpvariable; &lt;/script&gt; EOD; ?&gt; Anything from php can be assign to JS and its good practice. But not JS can assign anything to PHP.
answers question: http://stackoverflow.com/q/26179078
upvote count: 2
has comment: http://stackoverflow.com/comment/41047974
downvote count: 2
has comment: http://stackoverflow.com/comment/41047915
has comment: http://stackoverflow.com/comment/41048030
has comment: http://stackoverflow.com/comment/41047055

http://stackoverflow.com/comment/40878418
type: QuestionComment
comment on: http://stackoverflow.com/q/26081024
has text: @bnz I've updated the jsfiddle file with the HTML. Basically, what I'm trying to achieve is by using an Zillow API, I'm trying to extract the prices of the property. So, the xml file is connected with the API.
score: 0
type: Comment

http://stackoverflow.com/comment/40891945
type: Comment
type: QuestionComment
has text: A live example might be useful too. Try to make a jsfiddle for us, your question isn't so easy to understand...
comment on: http://stackoverflow.com/q/26094896
score: 0

http://stackoverflow.com/q/26061751
tagged with: jquery-plugins
score: 0
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40848692
has comment: http://stackoverflow.com/comment/40831142
answer count: 0
has body: I am using jQuery select2 plugin. In this plugin is there any option to select items which are already selected. Suppose in my application to search countries, i am using select2 plugin. Once i select a country named "Australia", i should be able to select "Australia" again. I have gone through the documentation, but i couldn't get anything.
type: Question
has title: jQuery select2 plugin - how to select repeated items. Clear explanation below
has comment: http://stackoverflow.com/comment/40830865
tagged with: jquery-ui
tagged with: javascript
linked to: http://stackoverflow.com/q/25954592

http://stackoverflow.com/a/26114723
type: Answer
has body: I'm not sure if I clearly understand what you mean by The reduce function will get an array of quadruplets like { variance, sumsquare, sum, count } for each subset of the entire dataset that was mapped onto a set of workers. Still, based on your code snipped I'd use something like: Array.sums = function (arr, addarr) { var newarr = [0,0,0]; if (addarr.length === arr.length) { arr.forEach( function (v,i) { newarr[i] = v + addarr[i]; }); } return newarr; } function variance(arr) { var summations = arr[0].map(function () {return 0;}); arr.forEach(function (v){ summations = Array.sums(v, summations); }); summations.unshift( (summations[2] / summations[0]) - Math.pow(summations[1] / summations[0], 2) ); // summations is now a quadruplet containing [variance, count, sum, sumsquare] return summations; } alert( variance([[3, 6, 14], [3, 15, 77], [3, 24, 194]])[0] );
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26089747
accepted answer of: http://stackoverflow.com/q/26089747
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40838746
type: Comment
type: QuestionComment
has text: The same here: `$(document).on('keyup', '.donation', function() { ...`
score: 0
comment on: http://stackoverflow.com/q/26065572

http://stackoverflow.com/a/26046260
type: Answer
downvote count: 0
score: 1
has body: You can do it like this: $("#dobpicker").on("dp.change",function (e) { $('#app').bootstrapValidator('revalidateField', 'dob'); }); Working Fiddle
accepted answer of: http://stackoverflow.com/q/26046062
answers question: http://stackoverflow.com/q/26046062
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26113583
has body: I have 3 select elements and I'm using $(".select-elem select").val() to get the value of each select element in an array but it returns the value of only the first element in the set of matched elements. For example, if a user selects '2' for the first select element, '3' for the second, and '4' for the third, the val() function returns 2 instead of [2,3,4]. Is there a function that would return an array containing values of all three select elements? 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
upvote count: 1
type: AnsweredQuestion
tagged with: event-delegation
type: Question
has title: .val() alternative that gets the current value of all elements in the set of matched elements
answer count: 2
has answer: http://stackoverflow.com/a/26113628
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/26113884
has answer: http://stackoverflow.com/a/26113884
tagged with: events
score: 1
accepted answer: http://stackoverflow.com/a/26113628

http://stackoverflow.com/q/26123757
has answer: http://stackoverflow.com/a/26124150
score: 1
favorite count: 0
tagged with: angularjs
upvote count: 2
possible better answer: http://stackoverflow.com/a/26124150
linked to: http://stackoverflow.com/q/3264270
tagged with: php
has title: How to replace `\n` with new line when print as in HTML?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26123928
has comment: http://stackoverflow.com/comment/40943612
has comment: http://stackoverflow.com/comment/40943762
downvote count: 1
accepted answer: http://stackoverflow.com/a/26123928
type: Question
answer count: 2
tagged with: javascript
has body: I get text file from PHP server that looks like: "File version: 5\n\nstart: 1410355285955(2014/09/10 11:58:05.955)\nend: 141090402750(2014/09/10 12:00:02.750)\nUEID: 301660031\nCNC: 118130\nVendor: 75306\nModel: 807182328\nOS: 1549568403\nPlatform: 1\nCarrier: -1337093915\nReported Networks: 0\n\nNum domains: 1\n Domain 276975141\n Num tags: 1\n -2032188703\n Num hostedApps: 2\n HostedApp: -2097733624, HostedVersion 300009300500000, ... How to replace \n with new line? Expected result should be: File version: 5 start: 1410450285955(2014/09/10 11:58:05.955) end: 1413350402750(2014/09/10 12:00:02.750) UEID: 301600031 CNC: 114130 Vendor: 75506 Model: 827112328 OS: 1539568403 Platform: 1 Carrier: -1347083915 Reported Networks: 0 Num domains: 1 Domain 276955141 Num tags: 1 -2032160703 Num hostedApps: 2 HostedApp: -2052733624, HostedVersion 3000003070500000, ... I print it as: &lt;pre&gt;{{myText}}&lt;/pre&gt; If it was json, I would use json filter: &lt;pre&gt;&lt;/pre&gt; This is how I open file in PHP: $file = file_get_contents($filePath, FILE_USE_INCLUDE_PATH);
has comment: http://stackoverflow.com/comment/40943678
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40924337
comment on: http://stackoverflow.com/a/26113113
has text: When I click the button to show that modal, the first time around it will focus, the second third, fourth so on and so forth, it will not work.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41026249
type: AnswerComment
has text: That's weird, then; can you reproduce that behaviour with a JS Fiddle, by any chance?
type: Comment
comment on: http://stackoverflow.com/a/26151697
score: 0

http://stackoverflow.com/comment/40824240
comment on: http://stackoverflow.com/a/26057931
type: Comment
has text: `self.options` - is member of Model object, it was passed while creation of model object
type: AnswerComment
score: 0

angular-ui-router
tags question: http://stackoverflow.com/q/26135382
tags question: http://stackoverflow.com/q/26043289
tags question: http://stackoverflow.com/q/26087066
tags question: http://stackoverflow.com/q/26101949
tags question: http://stackoverflow.com/q/26172461
tags question: http://stackoverflow.com/q/26065137
tag name: angular-ui-router
tags question: http://stackoverflow.com/q/26072737
tags question: http://stackoverflow.com/q/26165283
tags question: http://stackoverflow.com/q/26129224
tags question: http://stackoverflow.com/q/26056750
tags question: http://stackoverflow.com/q/26138140
tags question: http://stackoverflow.com/q/26168093
tags question: http://stackoverflow.com/q/26181771
tags question: http://stackoverflow.com/q/26138094
tags question: http://stackoverflow.com/q/26147597
type: Tag
tags question: http://stackoverflow.com/q/26043295
tags question: http://stackoverflow.com/q/26181141
tags question: http://stackoverflow.com/q/26132090

http://stackoverflow.com/q/26146108
type: Question
upvote count: 22
tagged with: anonymous-function
tagged with: addeventlistener
downvote count: 0
accepted answer: http://stackoverflow.com/a/26146974
has comment: http://stackoverflow.com/comment/40985472
tagged with: javascript
tagged with: dom-events
score: 22
has title: addEventListener firing multiple times for the same handle when passing in arguments with anonymous function
has answer: http://stackoverflow.com/a/71199110
possible better answer: http://stackoverflow.com/a/26146370
has answer: http://stackoverflow.com/a/26146370
tagged with: events
has comment: http://stackoverflow.com/comment/130087292
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/26146343
has body: For some reason, the event listener is firing twice for each element when passing arguments into an anonymous function. I.e., the click event on element el will register once and, thus, fire once. el.addEventListener("click", handle, false); el.addEventListener("click", handle, false); But if I want to pass my own arguments to it, it will register and fire twice. el.addEventListener("click", function() { handle(event, myArgument); }, false); el.addEventListener("click", function() { handle(event, myArgument); }, false); The question is why and what's the solution? I looked elsewhere and cannot seem to find a solution or understand why this problem is occurring. I tried implementing the solutions in How to pass an argument to the listener function passed in addEventListener? but they did not help -- I did the basic anonymous function or closure and then the more advanced version, which is the shown below but it did work. I don't get why passing no arguments causes the element event to register once and passing arguments causing the element event to register twice. Here is the code: Any help would be appreciated.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40985347
linked to: http://stackoverflow.com/q/10307136
has answer: http://stackoverflow.com/a/26146974

http://stackoverflow.com/a/26238903
has comment: http://stackoverflow.com/comment/41159966
has comment: http://stackoverflow.com/comment/41161014
upvote count: 5
has comment: http://stackoverflow.com/comment/41185037
type: Answer
downvote count: 0
has body: The issue is because the inner .highlight span is editable too. You need to set the spannode2 to contenteditable="false", add this line after you create the spannode2 element. spannode2.setAttribute('contenteditable', 'false'); Be sure the initial .highlight is setted to contenteditable="false". In short, all of .highlight span must have contenteditable="false". See the jsfiddle
score: 5
answers question: http://stackoverflow.com/q/26063574
has comment: http://stackoverflow.com/comment/41192672

http://stackoverflow.com/q/26161693
has body: I am trying to implement a slide-in menu for a responsive page, which appears when the device size is small. I used Bootstrap Simple Sidebar and added a top toolbar that appears when the screen width is small, which has a button to slide-in or slide-out the menu. All works well. I am now trying to also trigger the event to slide in or out the menu using swipe left and swipe right gestures. I added JQuery Mobile (custom build with only events included). The event triggers fine, my code looks something like this. &lt;script&gt; $(document).on("swiperight",function(e){ if ($('.smallscreen-toolbar').is(':visible')) { e.preventDefault(); if (!$("#wrapper").hasClass("toggled")) { $("#wrapper").addClass("toggled"); } } }); $(document).on("swipeleft",function(e){ if ($('.smallscreen-toolbar').is(':visible')) { e.preventDefault(); if ($("#wrapper").hasClass("toggled")) { $("#wrapper").removeClass("toggled"); } } }); &lt;/script&gt; The problem I have is that during the swipe left gesture (to close the menu), the page (which would be offset to the right) performs horizontal scrolling. When I tested it using Chrome's emulator I also got this error message: Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted., which I presume is related. I am trying to cancel the event using e.preventDefault(). Isn't this the right way? How do I block horizontal scrolling events (without blocking vertical scrolling)? I also tried to put overflow-x: hidden on the html, body and the &lt;div&gt; wrapping my content but when its margin is offset to the right (when the menu is visible) I can still drag it and move it around. If I bind an event to touchmove and do e.preventDefault() during it I block everything, including swipes.
has title: Capturing horizontal swipe and blocking horizontal scrolling
answer count: 0
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41017862
has comment: http://stackoverflow.com/comment/41018070
tagged with: jquery-mobile
tagged with: javascript
tagged with: swipe-gesture
has comment: http://stackoverflow.com/comment/41018322
tagged with: touch
has comment: http://stackoverflow.com/comment/49106072
has comment: http://stackoverflow.com/comment/41017591
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/41018142
favorite count: 0
linked to: http://stackoverflow.com/q/26478267
type: UnansweredQuestion

http://stackoverflow.com/a/26123230
answers question: http://stackoverflow.com/q/26122704
upvote count: 1
has body: IMO the only solution is to send some heartbeat signal every N seconds. If the heartbeat stops - user has closed the browser. There is no reliable JS event for browser closing. You can show a message with onbeforeunload event but you don't have enough time to send an ajax from that callback. If this callback does not return in a 1ms or so the page will just close. It is made this way because if a user enters a malicious page and wants to close it, the page won't be able to run some infinite loop in onbeforeunload callback to prevent the user from closing the page.
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40943558
type: Answer

http://stackoverflow.com/q/26068921
type: Question
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/46983703
has title: Chrome Extension KeyPress
tagged with: google-chrome-extension
favorite count: 0
has body: Is there anyway to send keyboard events for "left &amp; right arrow keys" through a Chrome extension? I know that client-side javascript cannot send keyboard events, so I was wondering if Google Chrome had any browser APIs to simulate keyboard presses.
answer count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46988746
score: 2
linked to: http://stackoverflow.com/q/26816306

http://stackoverflow.com/q/26061871
has answer: http://stackoverflow.com/a/26063182
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40833589
has comment: http://stackoverflow.com/comment/40831157
has title: Jquery works clearly Firefox, but not in Chrome and Explorer
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/40833476
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40831054
downvote count: 2
tagged with: css
has comment: http://stackoverflow.com/comment/40831104
has body: i have simple jquery code on my page for show and hide two panels. it works clearly Firefox, but not in Chrome and Explorer. when i click "Next" button later "Back" button, All the design of the page is distorted . And i added "show alert" button. When alert is show page is distorted again. $(function() { $("#button").click( function() { alert('button clicked'); } ); }); plaese refer problems link: http://bit.ly/1v982qc &lt;script&gt; $(function () { $("#adm2").hide(); $("#adm3").hide(); }); $('#button1').click(function () { if ($('#year1').prop('checked') == false &amp;&amp; $('#year2').prop('checked') == false) { } else { $('#adm1').hide(); $('#adm2').show() if ($('#year1').prop('checked')) { $("#ruckpanel").show(); } else { $("#ruckpanel").hide(); } } }); &lt;/script&gt; Thank You! INITIAL - From start the page look like this: After clicking "Next" button it looks like this: After clicking "Back" button it looks like this:
has comment: http://stackoverflow.com/comment/40831209
type: Question
has comment: http://stackoverflow.com/comment/40833212
has comment: http://stackoverflow.com/comment/40831638
has comment: http://stackoverflow.com/comment/40832965
has comment: http://stackoverflow.com/comment/40832409
upvote count: 0
score: -2
answer count: 1

http://stackoverflow.com/a/26109842
has comment: http://stackoverflow.com/comment/40918922
has comment: http://stackoverflow.com/comment/40918885
type: Answer
has body: Edit: Changed reference to window to use the jQuery version as the vanilla version is not working. When you define the function on the window like: $(window).initAutoComplete = function(textBox, query, isMustMatch, isAjaxAfterKeyPress) { //autocomplete logic } Then you also need to call it on the window like so: $(window).initAutoComplete($("#txt" + FromTo + "Country"), "WebAddr?srvList=Country&amp;areaCd=OT&amp;val=", true, false); The only other thing I would mention is to make sure that you calling it outside of the document.ready is in fact done after document.ready has fired.
answers question: http://stackoverflow.com/q/26109600
has comment: http://stackoverflow.com/comment/40919065
has comment: http://stackoverflow.com/comment/40919027
score: 0

ecmascript-harmony
tag name: ecmascript-harmony
type: Tag
tags question: http://stackoverflow.com/q/26099215
tags question: http://stackoverflow.com/q/26141991

http://stackoverflow.com/comment/41024301
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26166849
has text: Apologies for the miscomprehension then. I tried using style.width/height as well (even before posting this very thread) and my results were the same.

http://stackoverflow.com/q/26107825
accepted answer: http://stackoverflow.com/a/26108339
tagged with: node.js
type: AnsweredQuestion
score: 1
has title: Getting error in hapi server
upvote count: 1
type: Question
tagged with: hapi.js
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26108339
has body: I am building a simple log app and have tried to implement modularity to make the code more readable. However I am running into some trouble when I start my app. I have two files, index.js which is where I have my server configuration and have routes.js where I have my routing logic. The way I have written my routes is in accordance to the api documentation found in the hapi api. I am hoping someone could help me understand why I am getting the following error: /Users/mario/projects/loGym/node_modules/hapi/node_modules/hoek/lib/index.js:425 throw new Error(msgs.join(' ') || 'Unknown error'); ^ Error: Missing or undefined handler: / at Object.exports.assert (/Users/mario/projects/loGym/node_modules/hapi/node_modules/hoek/lib/index.js:425:11) at new module.exports.internals.Route (/Users/mario/projects/loGym/node_modules/hapi/lib/route.js:36:10) at /Users/mario/projects/loGym/node_modules/hapi/lib/router.js:110:25 at Array.forEach (native) at /Users/mario/projects/loGym/node_modules/hapi/lib/router.js:107:17 at Array.forEach (native) at internals.Router.add (/Users/mario/projects/loGym/node_modules/hapi/lib/router.js:104:13) at internals.Server._route (/Users/mario/projects/loGym/node_modules/hapi/lib/server.js:471:18) at internals.Server.route (/Users/mario/projects/loGym/node_modules/hapi/lib/server.js:465:10) at Object.&lt;anonymous&gt; (/Users/mario/projects/loGym/index.js:10:8) Am I not exporting the module correctly? Here is my code for routes.js: var path = require('path'); var _ = require('underscore'); var couchbase = require('couchbase'); //Connect to database. var db = db || new couchbase.Connection({host: 'localhost:8091', bucket: 'default'}, function(err) { if (err) { console.log('Connection Error', err); } else { console.log('Connected!'); } }); console.log(db); module.exports = [ {method: 'GET', path: '/static/{param*}', config: { handler: { directory: { path: 'static'}}}}, {method: 'GET', path:'/', config: landingPage}, {method: 'GET', path:'/workouts'…

http://stackoverflow.com/comment/40817429
type: Comment
comment on: http://stackoverflow.com/q/26054463
score: 0
has text: possible duplicate of [dynamically retrieve textbox values using foreach jquery which itself is dynamically created](http://stackoverflow.com/questions/4862976/dynamically-retrieve-textbox-values-using-foreach-jquery-which-itself-is-dynamic)
type: QuestionComment

http://stackoverflow.com/comment/40980630
type: Comment
comment on: http://stackoverflow.com/a/26143934
score: 1
has text: Indeed, also use tripe equals to make it a strict comparison. More info on strict comparing can be found here: http://stackoverflow.com/a/523647/1077230
type: AnswerComment

http://stackoverflow.com/comment/40938313
type: Comment
score: 0
type: QuestionComment
has text: @Sanket Could it be possible for you to move the high priority functions to a dedicated **[Child Process](http://nodejs.org/api/child_process.html)**?
comment on: http://stackoverflow.com/q/26114749

http://stackoverflow.com/a/29854672
type: AcceptedAnswer
downvote count: 0
has body: Solution: you can use my package shinyjs for that - you just call shinyjs::disable(id) and it will work. Explanation why it's not super simple: the problem is that when you use selectize, it creates another select box that is just pretty HTML but it's not a real HTML input element, so it doesn't respond to the disabled property like real HTML tags do. Disabling a selectize can be done using JS if you look at the selectize.js documentation, but it's not very convenient with shiny. :( If you don't use selectize (selectInput(selectize = FALSE)), disabling will work just fine.
type: Answer
answers question: http://stackoverflow.com/q/26142525
score: 6
accepted answer of: http://stackoverflow.com/q/26142525
upvote count: 6
has comment: http://stackoverflow.com/comment/122358879

http://stackoverflow.com/comment/40992173
type: Comment
comment on: http://stackoverflow.com/q/26149964
type: QuestionComment
score: 0
has text: The latter two are [already answered](http://stackoverflow.com/q/4968406/1612146). The first isn't really comparable.

http://stackoverflow.com/comment/40838278
comment on: http://stackoverflow.com/q/26065587
score: 0
type: QuestionComment
type: Comment
has text: 500 is not going to be with the clientside, look at the error message on the server.

http://stackoverflow.com/comment/40914260
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26107146
has text: try to give id to each element and save the state and id of elements, then when you reload the page collect all ids,find on the dom and give the active class if is the case.
type: Comment

http://stackoverflow.com/comment/41049931
score: 0
type: Comment
has text: Indeed. It's a little unclear in the question. I am editing now. But he SHOULD be able to solve it from here. :)
comment on: http://stackoverflow.com/a/26181103
type: AnswerComment

http://stackoverflow.com/comment/41000214
type: QuestionComment
has text: Use [.html()](http://api.jquery.com/html/) and [$.ajax()](http://api.jquery.com/jquery.ajax/)
type: Comment
comment on: http://stackoverflow.com/q/26154384
score: 0

http://stackoverflow.com/comment/40903701
comment on: http://stackoverflow.com/a/26100769
score: 0
type: Comment
has text: The image needs to be proportional. Not stretched. I edited the question to make this clearer. The Zoom effect in 6 does not work either. I believe the only way to get what I am after is by modifying the JS.
type: AnswerComment

http://stackoverflow.com/q/26151953
type: Question
has body: New to using jQuery and Magnific Popup - I have a grid of images, and when you click on an image I want magnific popup to display a div with information relevant to the particular image. A, aged 8 Who are you? What inspires you? What do you like most about design? Ab, aged 8 Who are you? What inspires you? What do you like most about design? F, aged 8 Who are you? What inspires you? What do you like most about design? And here's the jQuery - $(function() { $('.open-popup-link').magnificPopup({ type:'inline', midClick: true }) }); What's happening is when you click on ANY of my images in the grid (img.object) Magnific Popup only displays the div (.test-popup) from the first grid-item.
tagged with: javascript
has answer: http://stackoverflow.com/a/26152314
score: 0
has title: Magnific Popup showing first item only
answer count: 1
tagged with: jquery
tagged with: magnific-popup
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion

iframe
tags question: http://stackoverflow.com/q/26144875
tags question: http://stackoverflow.com/q/26061654
tags question: http://stackoverflow.com/q/26088984
tags question: http://stackoverflow.com/q/26092961
tags question: http://stackoverflow.com/q/26130043
tags question: http://stackoverflow.com/q/26089366
tags question: http://stackoverflow.com/q/26154763
tags question: http://stackoverflow.com/q/26084660
tags question: http://stackoverflow.com/q/26183875
tags question: http://stackoverflow.com/q/26173788
tags question: http://stackoverflow.com/q/26140522
tag name: iframe
tags question: http://stackoverflow.com/q/26107799
tags question: http://stackoverflow.com/q/26056274
tags question: http://stackoverflow.com/q/26045139
tags question: http://stackoverflow.com/q/26042235
tags question: http://stackoverflow.com/q/26090595
tags question: http://stackoverflow.com/q/26112359
tags question: http://stackoverflow.com/q/26050868
tags question: http://stackoverflow.com/q/26064605
tags question: http://stackoverflow.com/q/26177381
tags question: http://stackoverflow.com/q/26106257
tags question: http://stackoverflow.com/q/26187252
tags question: http://stackoverflow.com/q/26169997
tags question: http://stackoverflow.com/q/26174793
tags question: http://stackoverflow.com/q/26091984
tags question: http://stackoverflow.com/q/26160355
tags question: http://stackoverflow.com/q/26189144
tags question: http://stackoverflow.com/q/26084239
tags question: http://stackoverflow.com/q/26071137
tags question: http://stackoverflow.com/q/26173090
tags question: http://stackoverflow.com/q/26112160
tags question: http://stackoverflow.com/q/26081116
tags question: http://stackoverflow.com/q/26079476
tags question: http://stackoverflow.com/q/26165272
tags question: http://stackoverflow.com/q/26147064
tags question: http://stackoverflow.com/q/26117642
tags question: http://stackoverflow.com/q/26144269
type: Tag
tags question: http://stackoverflow.com/q/26162282
tags question: http://stackoverflow.com/q/26046030
tags question: http://stackoverflow.com/q/26159846
tags question: http://stackoverflow.com/q/26164181
tags question: http://stackoverflow.com/q/26064607
tags question: http://stackoverflow.com/q/26133382
tags question: http://stackoverflow.com/q/26034204
tags question: http://stackoverflow.com/q/26118674
tags question: http://stackoverflow.com/q/26168946
tags question: http://stackoverflow.com/q/26043446
tags question: http://stackoverflow.com/q/26039219
tags question: http://stackoverflow.com/q/26099697
tags question: http://stackoverflow.com/q/26036441

http://stackoverflow.com/q/26099147
has body: How to stop function doajax_red and doajax_blue , When checked radio button ? First , when you load page index.php and then press red button you will see loading img and the checked radio button BLUE and the checked radio button RED again loading img still show , . . How to stop function doajax_red when checked radio button BLUE and stop function doajax_blue when checked radio button RED http://jsfiddle.net/xq0kt3kk/4/ index.php . . RED BLUE
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
tagged with: php
tagged with: css
has comment: http://stackoverflow.com/comment/40899233
score: 0
has answer: http://stackoverflow.com/a/26099390
has title: How to stop function doajax_red and doajax_blue , When check radio button?
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40899060

http://stackoverflow.com/a/26183652
type: Answer
has comment: http://stackoverflow.com/comment/41056245
score: 1
has body: So you can't bring in your logx directly, as the you are in the .config() block. Instead, bring in the $injector service and get the logx service in the log delegate. As well, your decorator isn't decorating as much as just replacing the logger. If that was your intention, you can just create your own $log service rather than use a decorator. var app = angular.module('testApp', []) .config(function($provide) { $provide.decorator('$log', function($delegate, $rootScope, $injector) { var originalLog = $delegate.log; var originalError = $delegate.error; . . . $delegate.log = function() { var logx = $injector.get('logx'); originalLog.apply(null, arguments); originalError.apply(null, arguments); . . . logx.log(arguments); logx.error(arguments); . . . } });})
upvote count: 1
answers question: http://stackoverflow.com/q/26183244
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26183244

http://stackoverflow.com/q/26055976
tagged with: javascript
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/26056056
has body: I have an image button and three other buttons . When the page is loaded only the image button is visible and the other three buttons are hidden. When the user clicks on the image button, the image button should be hidden and the other three buttons should be visible. I want to do this activity at the same place. How can I solve this problem with javascript?
type: UnansweredQuestion
downvote count: 1
type: Question
has title: How to set multiple controls at the same place?
has comment: http://stackoverflow.com/comment/40819791
score: -1
upvote count: 0
answer count: 1

console
tags question: http://stackoverflow.com/q/26139742
type: Tag
tags question: http://stackoverflow.com/q/26145616
tag name: console

http://stackoverflow.com/comment/40937627
has text: If you set a property of `style` to `''` it uses the default value
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26120732

http://stackoverflow.com/a/26174784
type: Answer
upvote count: 3
score: 3
has body: Your click binding click: $root.modal(UserName) is wrong because you are not passing in a function but the result of the function. So KO will execute your function once when it processes the binding and not when your element is clicked. You need to use bind or wrap it into a new function if you want to pass in additional arguments to a click handler: Or Note: you don't need the ko.utils.unwrapObservable(UserName) in text binding just write text: UserName However because your UserName is observable you need to handle it in your modal function: self.modal = function (un) { localStorage.clear(); localStorage.setItem("speakto", ko.utils.unwrapObservable(un)); window.location.replace("http://somehost/operator/dialog"); } Or make sure that the click binding passes in the value with click: $root.modal.bind($data, ko.utils.unwrapObservable(UserName)) Note: since KO 2.3 there is shorthand for ko.utils.unwrapObservable and you can just write ko.unwrap
has comment: http://stackoverflow.com/comment/41038183
accepted answer of: http://stackoverflow.com/q/26174540
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26174540

http://stackoverflow.com/q/26111564
has comment: http://stackoverflow.com/comment/40921785
score: 0
tagged with: eval
answer count: 1
accepted answer: http://stackoverflow.com/a/26111686
has comment: http://stackoverflow.com/comment/40933833
has title: Array to dynamic function: Use eval or not?
has comment: http://stackoverflow.com/comment/40939610
type: AnsweredQuestion
tagged with: object
has comment: http://stackoverflow.com/comment/40921713
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40921952
has body: Having this object: // Better as array, thank you for the advice @user2864740 var rule = [ ['User', null], ['filter', [{ idgroup: 95, active: true}], ['order_by', ['name', 'created']] ]; I want to create a function based on the object above. I only know two ways to do it. First one is using eval and making the function literal: eval("User.filter({ idgroup: 95, active: true }).order_by('name', 'created')"); The other way is more complex and i'm not sure how to approach it yet. But the result should be something like this (With a for/while obviously): this['User']['filter'].apply(this['User'], [{ idgroup: 95, active: true }])['order_by'].apply(this['User'], ['name', 'created']); Is it worth writing a dynamic function to call the function as the second option, or is eval fast enough to solve this problem?
has comment: http://stackoverflow.com/comment/40930432
type: Question
has answer: http://stackoverflow.com/a/26111686
tagged with: function
tagged with: javascript
has comment: http://stackoverflow.com/comment/40921780

http://stackoverflow.com/comment/41008161
has text: this will select each .qtyissued class and check them, just think what if you want to allow 0 on some text box
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26158889
type: AnswerComment

http://stackoverflow.com/q/26062077
type: Question
has title: Google Translator Consumes memory of browser
tagged with: javascript
tagged with: google-translate
has comment: http://stackoverflow.com/comment/40831457
tagged with: browser
score: 0
has comment: http://stackoverflow.com/comment/40831407
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
has body: I use Google tranlator plugin in my site. My pages has iframes and therefore I had to add plugin in each frame as they are dynamically update. But it sounds that the plugin takes much memory. For example, if the site runs on Firefox browser for 5 minutes, Firefox itself increases the memory usage gradually then goes beyond 1gb and finally entire machine gets non responsive. Any one know any reason for this and any solution.

http://stackoverflow.com/q/26047170
type: Question
has answer: http://stackoverflow.com/a/28445282
has body: Using Angularjs i am working on a mobile app where I need to clear the cookies after logout. The service I got to use is cookie authenticated, so after logout I need to clear them out. For that I have tried traditional JS procedures to clear those cookies but didn't work. After doing some more research on it I have added angular-cookies libary and used ngCookies to got access of the $cookies and $cookieStore in my scope. All the examples or SO posts I got says how to add/edit/delete new cookie using $cookies and $cookieStore. But I am not setting the cookies by myself, its been set dynamically like JSESSIONID,SMSESSION..so on (a big string). When I try $cookieStore.get('JSESSIONID') results undefined. AFAIK cookies are key value pairs, if yes then why I am getting undefined. (Am I wrong somewhere) Is there anyway I can read all the cookies and reset/clear them using angular-cookies library.
has title: How can I clear cookies using angular-cookies
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/45093210
favorite count: 0
tagged with: cordova
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/40843942
tagged with: cookies
score: 1
has comment: http://stackoverflow.com/comment/40815410
has comment: http://stackoverflow.com/comment/40805781

http://stackoverflow.com/comment/41074624
comment on: http://stackoverflow.com/q/26194473
score: 0
has text: You are running your javascript serverside in a php file. That will never work. Load popup.js in the header of `index.php` and instead of `include_once('popup.js');` echo some response that triggers `centerpopup() and loadpopup()` clientside.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26041464
type: AcceptedAnswer
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/40793973
has comment: http://stackoverflow.com/comment/40794395
has comment: http://stackoverflow.com/comment/40795052
has comment: http://stackoverflow.com/comment/40794037
score: 2
has comment: http://stackoverflow.com/comment/40793938
has comment: http://stackoverflow.com/comment/40794612
answers question: http://stackoverflow.com/q/26041213
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26041213
has body: If I understand you correctly you want to pass a number, say 10, into the first function and have that return a string of numbers up to 10 and then for count to read that string and return 10 (as an integer) again? This will do the trick. It takes the string, splits it, and pops out the last number converting it to an integer before it returns it. function count(seq) { return parseInt(seq.split(', ').pop(), 10); } I could rewrite it like this: function count(seq) { // create an array var arr = seq.split(', '); // grab the last element (a string) var lastElement = arr.pop(); // convert the string to an integer var convertedInteger = parseInt(lastElement, 10); // return the integer return convertedInteger; } If you wanted to use reverse and grab the first element, do this: function count(seq) { return parseInt(seq.split(', ').reverse()[0], 10); } Or use shift which does the same thing: function count(seq) { return parseInt(seq.split(', ').reverse().shift(), 10); } DEMO
has comment: http://stackoverflow.com/comment/40794883

http://stackoverflow.com/comment/40889814
type: QuestionComment
comment on: http://stackoverflow.com/q/26087138
has text: I'm dynamically loading content based on the fragment ID. My anchors have #1, #2 etc as the href and when the hash changes, content is loaded. When my index loaded, I had it set to change the hash in the body onload function so that it loads the main content. Problem is, pagespeed was whinging that none of my content could be loaded without loading the external stuff. So I moved it internal. Now when you load the page, there isn't an ID to start with, so when I click a link, it loads the relevant stuff, but when I click back, the fragment ID disappears so it doesn't reload the initial content.
score: 0
type: Comment

http://stackoverflow.com/a/26051111
type: Answer
answers question: http://stackoverflow.com/q/26051088
downvote count: 2
score: -2
has comment: http://stackoverflow.com/comment/40811382
upvote count: 0
has comment: http://stackoverflow.com/comment/40811425
has body: Since field_name is a parameter of your function, it should not be enclosed in quotation marks. It should be: $(field_name).value() = "; only EDIT My bad. It should be $(field_name).val(""); rather

http://stackoverflow.com/comment/40842092
comment on: http://stackoverflow.com/q/26066648
score: 0
type: Comment
type: QuestionComment
has text: I have updated my answer. Noticed you were trying to use ng-controller twice and had no ng-app.

http://stackoverflow.com/comment/40852040
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26073111
type: AnswerComment
has text: Got it working was one of my other js was having effect on it

http://stackoverflow.com/q/26109849
answer count: 3
has answer: http://stackoverflow.com/a/26109904
linked to: http://stackoverflow.com/q/2507030
possible better answer: http://stackoverflow.com/a/26109904
tagged with: javascript
tagged with: forms
has answer: http://stackoverflow.com/a/26109896
type: AnsweredQuestion
has title: If statement to test that multiple inputs have been completed
has answer: http://stackoverflow.com/a/26109955
tagged with: jquery
has body: I have a simple form consisting of 3 input fields. All inputs are required. I have set the form's 'onsubmit' attribute to 'return validateForm()'. Within this function, I am doing the form validation. I have it working so far so that if all fields are empty, the error spans are displayed. Getting the individual errors to come up with the appropriate fields is the part I'm having trouble with. Basically, if I leave 2 fields empty, only one error message comes up. I want it so that no matter what fields are empty, the appropriate error messages appear. Here is my code: HTML: Name Please tell me your name. Email Please tell me your email address. Your Message Please leave me a message. Javascript: function validateForm() { var name = document.forms["contactForm"]["name"].value; var email = document.forms["contactForm"]["_replyto"].value; var message = document.forms["contactForm"]["message"].value; if ((name == null || name == "") && (email == null || email == "") && (message == null || message == "")) { $(".error").show(); return false; } else if (name == null || name == "") { $("#fname").show(); return false; } else if (email == null || email == "") { $("#yourEmail").show(); return false; } else if (message == null || message == "") { $("#yourMessage").show(); return false; } else { //submit form return true; } } Once the function returns true, am I right in saying that the form will then submit via the contact.php file? Thanks in advance.
has comment: http://stackoverflow.com/comment/40919358
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26109896
score: 0

http://stackoverflow.com/a/26165820
has comment: http://stackoverflow.com/comment/41021861
upvote count: 1
has comment: http://stackoverflow.com/comment/41021883
has body: You are selecting the parent element which is a label, not the tr. Use closest to find the tr that the checkbox is in. $("table tbody").on("change", "input[type='checkbox']", function() { $(this).closest("tr").toggleClass("info", this.checked); });
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26165639
type: Answer

http://stackoverflow.com/q/26179360
tagged with: javascript
tagged with: dom-events
score: 0
tagged with: google-chrome-extension
has body: I have a Chrome extension which renames document title, but It doesn't work for websites which live-updates the title such as Facebook, AngularJS SPA... So I need to detect this change to override it. The problem as you expect that it does an infinite loop: var target = document.querySelector('head > title'); var observer = new window.MutationObserver(function (mutations) { mutations.forEach(function (mutation) { console.log(mutation.target.textContent); // here change the title with a new value document.title = 'something'; }); }); observer.observe(target, { subtree: true, characterData: true, childList: true }); Then, how could I tell to my event "Do nothing if I am the one who fired you"? A bad way is to update the title every X seconds...
has title: Change document title when title has been changed by another script
accepted answer: http://stackoverflow.com/a/26179467
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26179467
type: Question
answer count: 1

http://stackoverflow.com/comment/40890115
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/62093/discussion-between-victor-and-arun-p-johny).
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26093451

http://stackoverflow.com/q/26151130
type: Question
has title: node.js and mocha-qunit-ui: test with asynchronous requirejs dependencies
tagged with: javascript
tagged with: mocha.js
has comment: http://stackoverflow.com/comment/40994830
accepted answer: http://stackoverflow.com/a/26236127
has body: Short description first: The test in the following snipped is never executed: setTimeout(function() { test("test", function() { ok(true, "okay"); }) }, 1000); Is there any way not to autostart the mocha-qunit-ui but wait for some asynchronous callbacks to create tests? So, why would I need it this way? I'm trying to run in-browser-tests for my classes with nodejs and the mocha-qunit-ui. The classes are loaded asynchrously by requirejs. So I could create a test like this: test("test", function() { stop(); requirejs( ['Dependency'], function(Dependency) { expect(1); var d = new Dependency(); ok(d.test(), "test"); start(); } ); } But I want to run multiple tests on the same class with the same dependencies, so I thought of creating a test object var d = new Dependency(); outside of the test. But then the test would be inside an asynchronous call, and therefore is never called.
answer count: 1
tagged with: asynchronous
tagged with: qunit
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41003214
has answer: http://stackoverflow.com/a/26236127
score: 0

http://stackoverflow.com/q/26036527
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40848442
score: 0
tagged with: html5-canvas
answer count: 1
has title: jigsaw puzzle source image is not displaying
tagged with: kineticjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26072705
has body: I'm trying jigsaw puzzle using kineticJs. I got the irregular shape pieces but source image is not displayed or fill in it. I'm stuck with this part. fill:{ image:imageObj, x:pieceWidth, y:pieceHeight, }, stroke: "#000000", strokeWidth: 4, lineCap: "round", draggable: true
type: Question

http://stackoverflow.com/q/26102304
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26102792
has answer: http://stackoverflow.com/a/26102625
type: UnansweredQuestion
has body: Practically I have a vertical tabs menu and what I am trying to achieve is to have the menu wrapper height dynamically set depending on the content or the tabs height (the one that is bigger wins) Here is a jsfiddle of what I have made so far : http://jsfiddle.net/f9zt9xqr/2/ HTML: Tab One Stuff for Tab One Tab Two "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla? Tab Three Stuff for Tab Three CSS: * { gmargin: 0; spadding: 0; } body { background: #f9f9fc; } #tab-1{ position: absolute; top: -200px; left: -200px; } #tab-3{ position: absolute; top: -200px; left: -200px; } #tab-2{ position: absolute; top: -200px; left: -200px; } #page-wrap{ position: relative; background:#123456; } .tabs { position: relative; hmin-height: 200px; /* This part sucks */ clear: both; smargin: 25px 0; } .tab { rfloat: left; sposition:absolute; height: auto; } .tab label { background: #f5f5f9; padding: 10px; border: 1px solid #ccc; margin-left: -1px; dposition: relative; left: 1px; width: 70px; display: block; } .tab[type=radio] { display: none; } .content { display:none; position: absolute; top: 0px; left: 92px; background: white; right: 0; zbottom: 0; padding: 20px; border: 1px solid #ccc; } [type…
has comment: http://stackoverflow.com/comment/40905219
has comment: http://stackoverflow.com/comment/40905517
has title: vertical tabs same height as content
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40905602

http://stackoverflow.com/comment/41035571
score: 1
type: AnswerComment
has text: a = 'a'; console.log(typeof a);// == string console.log(a / 2); // == NaN console.log(typeof a/2); // == NaN console.log(typeof (a/2));// == Number
type: Comment
comment on: http://stackoverflow.com/a/26173068

http://stackoverflow.com/comment/40936557
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26119515
has text: Oops... $scope.reset(); was the issues that was called at the end of the controller.
score: 0

http://stackoverflow.com/q/26081297
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/40877336
score: 2
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26088430
tagged with: ruby-on-rails
tagged with: ujs
has title: Rails unobtrusive javascript (UJS) ajax:before append data params
has body: I'm trying to append some parameters to a form before sending via ajax (via Rails UJS). $(document).on("ajax:before",".form-example", function(event) { event.data = $(":hidden").serialize(); }); The hidden inputs aren't within the form, so I need to collect them, serialize the, and add them to the request (which is a PUT request). However, in the above example, no parameters are being passed to the server, am I doing something wrong? How can I pass parameter called "items" with the serialized values of hidden inputs?
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/40879175
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41118281
score: 0
type: Comment
has text: Thanks, this actually helped me a lot, combined with a bit of server side code I had to add anyway.
comment on: http://stackoverflow.com/a/26193376
type: AnswerComment

http://stackoverflow.com/q/26087732
answer count: 1
has answer: http://stackoverflow.com/a/26087816
has title: Insert YouTube iframe on hover
tagged with: youtube-api
has body: I want to insert an iframe when user hovers on a div but it dosen't seem to be working. It works pretty well without the hover event but not on hover function. html: &lt;div class="video_wrap"&gt;&lt;/div&gt; css: .video_wrap { width: 320px; height: 240px; background: #b30054; } js: var tag = document.createElement('script'), firstScriptTag = document.getElementsByTagName('script')[0]; tag.src = "https://www.youtube.com/player_api"; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); $(".video_wrap").on({ mouseenter: function () { $(this).attr('id', 'curr'); var player; function onYouTubePlayerAPIReady() { player = new YT.Player('curr', { height: '240', width: '320', videoId: 'wJnnT1SGEsc', }); }; }, mouseleave: function () { //stuff to do on mouse leave } }); Fiddle: http://jsfiddle.net/508oknm7/4/
type: AnsweredQuestion
type: Question
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/26087816

http://stackoverflow.com/comment/70851463
score: 0
type: Comment
has text: Good stuff, but last comment happens to me too.
comment on: http://stackoverflow.com/a/26131085
type: AnswerComment

http://stackoverflow.com/a/26180261
upvote count: 2
has comment: http://stackoverflow.com/comment/41070025
has comment: http://stackoverflow.com/comment/41048547
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41070178
type: Answer
accepted answer of: http://stackoverflow.com/q/26180146
has comment: http://stackoverflow.com/comment/41051198
downvote count: 0
answers question: http://stackoverflow.com/q/26180146
has comment: http://stackoverflow.com/comment/41053836
has comment: http://stackoverflow.com/comment/41070115
score: 2
has comment: http://stackoverflow.com/comment/41049901
has body: Collection.insert returns the inserted object _id, so you just need to store it in a variable for later use. Meteor.methods({ 'insertPostData': function(insertPostData){ var user=Meteor.users.findOne(this.userId); // assuming postcreated is something like ["POSTID"] if(user.profile.postcreated.length&gt;=1){ return; } var postId=AllPosts.insert(insertPostData); Meteor.users.update(this.userId,{ $addToSet:{ 'profile.postcreated':postId } }); return postId; } });
has comment: http://stackoverflow.com/comment/41054345

http://stackoverflow.com/comment/40889268
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26093451
score: 1
has text: @Arun I understand, but the line before `$(this)` in OP's question is `$("#dialog2").dialog("close"); // this one works`, which might give indication that he wants the `dialog2` as `this`

http://stackoverflow.com/a/26164977
has comment: http://stackoverflow.com/comment/41020309
score: 20
has body: Is this the difference between the two frameworks, express and passport? No they are different in the purpose for which they are used for. Express is used as a application framework on node.js where as passport just handles the authentication part of a web application. about next() next() is part of connect which inturn is an express dependency. The purpose of calling next() is to trigger the next middle ware in express stack. To understand the next() concept in an easier way, you could look at a sample app built on express here. as you can see in the line pointed the application uses a route level middleware to check whether the user is logged in or not. app.get('/account', ensureAuthenticated, function(req, res){ Here ensureAuthenticated is the middleware which is defined at bottom like function ensureAuthenticated(req, res, next) { if (req.isAuthenticated()) { return next(); } res.redirect('/login') } as you can see if the user is authenticated the function invokes next() and passes control to the next layer in route handler written above, else it redirects to another route even without invoking the next() about done() done() on the other hand is used to trigger the return url handlers that we write for passport authentication. To understand more on how done works you could look at the code samples at passport here and check the section titled Custom Callback app.get('/login', function(req, res, next) { passport.authenticate('local', function(err, user, info) { if (err) { return next(err); } if (!user) { return res.redirect('/login'); } req.logIn(user, function(err) { if (err) { return next(err); } return res.redirect('/users/' + user.username); }); })(req, res, next); }); Here the second parameter to passport.authenticate is the definition of done() that you are going to call from the passport strategy. note Here going through the sample codes in the two links I provided above have helped alot in understanding its behavior than the docs. I would suggest you to d…
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41021163
has comment: http://stackoverflow.com/comment/41021757
has comment: http://stackoverflow.com/comment/41020973
type: Answer
has comment: http://stackoverflow.com/comment/41022044
has comment: http://stackoverflow.com/comment/41021627
answers question: http://stackoverflow.com/q/26164837
accepted answer of: http://stackoverflow.com/q/26164837
upvote count: 20

http://stackoverflow.com/q/26152670
type: Question
tagged with: labjs
downvote count: 0
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40997076
has title: LABjs loading error
has body: I wrote a page loading almost all JS using labJS &lt;script type="text/javascript" src="js/lab.min.js"&gt;&lt;/script&gt; &lt;script&gt; $LAB .script({ src:"http://vk.com/js/api/share.js?90", type:"text/javascript", charset:"windows-1251" }) .script("js/mootools.js").wait() .script("js/jquery-2.1.1.min.js").wait() .script("js/scroll.js") .wait(function(){ addEvent(); bind(); }) ; &lt;/script&gt; If I browse it locally, with Usbwebserver, all works fine but when I load it on the webserver it doesn't work. The debug console tells me "ReferenceError: $LAB is not defined" and all following calls to JS functions fail consequently. I wonder whether the second script is executed before labJS was fully loaded but I don't understand why and how to solve it...
has comment: http://stackoverflow.com/comment/41020821
answer count: 0
tagged with: loader
score: 1
upvote count: 1

http://stackoverflow.com/comment/41007438
comment on: http://stackoverflow.com/q/26158493
score: 0
type: Comment
type: QuestionComment
has text: Get the JSON from Ajax call, then populate the ` `. Try and post your code if you have problem.

http://stackoverflow.com/comment/40960307
type: AnswerComment
comment on: http://stackoverflow.com/a/26132747
has text: No you don't need a form, you can just use this code in the place where you are calling your alert function. And then you can handle this data in the php file.
type: Comment
score: 0

http://stackoverflow.com/a/26047136
upvote count: 1
answers question: http://stackoverflow.com/q/26047036
downvote count: 0
has body: You can redirect the parent of the iframe like this: parent.document.location.href = 'http://...'
type: Answer
score: 1

http://stackoverflow.com/q/26157287
tagged with: javascript
tagged with: angularjs-scope
has answer: http://stackoverflow.com/a/26157338
answer count: 3
downvote count: 0
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/26158525
has answer: http://stackoverflow.com/a/26158525
tagged with: model-view-controller
score: 2
type: AnsweredQuestion
upvote count: 2
has body: I'm having some basic problems with angular at the moment. I just wrote a service that reads the temperature of an external device in an interval of five seconds. The service saves the new temperature into a variable and exposes it via a return statement. This looks kind of this (simplified code): angular.service("tempService", ["$interval", function ($interval) { //revealing module pattern var m_temp = 0, requestTemp = function() {//some logic here}, onResponseTemp = function (temp) { m_temp = temp; }, //some other private functions and vars ... foo = bar; //request new temperture every 5s, calls onResponseTemp after new data got received $interval(requestTemp, 5000); return { getTemp = function(){return m_temp;} } }]); I use a controller to fetch the data from the service like this: angular.controller("tempCtrl", ["$scope", "tempService", function ($scope, tempService) { $scope.temp = tempService.getTemp(); }]); In my view I access it like this: &lt;div ng-controller="tempCtrl"&gt; &lt;p&gt;{{temp}}&lt;/p&gt; &lt;/div&gt; But I only get 0 and the value never changes. I have tried to implement a custom Pub/Sub pattern so that on a new temperature my service fires an event that my controller is waiting for to update the temperature on the scope. This approach works just fine but I'm not sure if this is the way to go as angular brings data-binding and I thought something this easy had to work by itself ;) Help is really appreciated.
has answer: http://stackoverflow.com/a/26158202
type: Question
accepted answer: http://stackoverflow.com/a/26158202
has title: AngularJS automatically updating controller data by service

http://stackoverflow.com/comment/41006185
score: 0
type: Comment
has text: problem is because i put dataType: "json",
type: AnswerComment
comment on: http://stackoverflow.com/a/26157183

http://stackoverflow.com/comment/76320909
type: Comment
has text: @Withhelds you got solution of above query ? i am facing same problem.
type: AnswerComment
comment on: http://stackoverflow.com/a/26191315
score: 0

http://stackoverflow.com/comment/40976129
type: Comment
has text: If their documentation doesn't match reality, then you should take it up with their technical support team.
score: 3
comment on: http://stackoverflow.com/q/26141578
type: QuestionComment

http://stackoverflow.com/a/26066844
has body: This question has been answered in other places before. Regarding Apple devices specifically: Can you autoplay HTML5 videos on the iPad? "Apple has made the decision to disable the automatic playing of video on iOS devices, through both script and attribute implementations. In Safari, on iOS (for all devices, including iPad), where the user may be on a cellular network and be charged per data unit, preload and auto-play are disabled. No data is loaded until the user initiates it." Safari HTML5 Audio and Video Guide - iOS-Specific Considerations "In Safari on iOS (for all devices, including iPad), where the user may be on a cellular network and be charged per data unit, preload and autoplay are disabled. No data is loaded until the user initiates it. This means the JavaScript play() and load() methods are also inactive until the user initiates playback, unless the play() or load() method is triggered by user action. In other words, a user-initiated Play button works, but an onLoad="play()" event does not." Googling will reveal more. I have read in a few places that Chrome on Android also behaves this way, though other Android browsers may not. How this applies to your case specifically: Normally, just clicking on a link would work fine if the player were in the same page, since the click on that link would be counted as valid user interaction to start the media playback. But, you're loading a new page, which resets this check for user interaction, and so media will not start until the user interacted with the new page in some way. Thus, the user has to scroll, touch, tap, swipe, or something, in order to auto play, or just hit the play button on the media player.
type: Answer
accepted answer of: http://stackoverflow.com/q/26066062
answers question: http://stackoverflow.com/q/26066062
upvote count: 10
type: AcceptedAnswer
downvote count: 0
score: 10

http://stackoverflow.com/a/26079902
has body: You aren't actually embedding the record, you're just specifying the id, in that case you should mark it as async. var Item = DS.Model.extend({ ..., organization: DS.belongsTo("organization", {async: true}) }); And remove your embedded records implementation.
score: 1
has comment: http://stackoverflow.com/comment/40864124
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26079799
type: Answer
answers question: http://stackoverflow.com/q/26079799
upvote count: 1

http://stackoverflow.com/q/26153487
has comment: http://stackoverflow.com/comment/40998663
score: 0
accepted answer: http://stackoverflow.com/a/26153797
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40998956
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40998646
has body: So i have been researching lately on how to do this but i have really not been able to find a good way to do this for my html + css navbar. Basically when you are on the homepage of the site, the tab color needs to be "active" or frozen as a different color. Right now as you can see in the jsfiddle when you hover over the navbar button it will change a different color until you take your mouse off of it. My question might be hard to understand my apologies. JsFiddle: http://jsfiddle.net/jyh715yn/ Thanks for the help! <!--[if lt IE 9]> <![endif]--> Home Gallery About Me Request Order Contact img { left: 10px; } body { width: 100%; max-width: 960px; margin: 0 auto; } nav { width: 100%; margin: 0px 0; } nav ul { list-style: none; overflow: hidden; } nav ul li { float: left; width: 20%; } nav ul li a { text-align: center; padding: 8px 0; display: block; width: 100%; background: #fff; /* Old browsers */ background: -moz-linear-gradient(top, #fff 0%, #fff 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fff), color-stop(100%,#fff)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, #fff 0%,#fff 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, #fff 0%,#fff 100%); /* Opera 11.10+ */ background: linear-gradient(to bottom, #fff 0%,#fff 100%); /* W3C, IE10+ */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff', endColorstr='#fff',GradientType=0 ); /* IE6-9 */ } nav ul li a, nav ul li a:focus, nav ul li a:visited, nav ul li a:hover, nav ul li a:active { color: #000; text-decoration: none; } nav ul li a:hover, nav ul li a:active { background: #D3D3D3; /* Old browsers */ background: -moz-linear-gradient(top, #D3D3D3 0%, #D3D3D3 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#D3D3D3), color-stop(100%,#D3D3D3)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, #D3D3D3 0%,#D3D3D3 100%); /* Chrome10+,Safari5.1+ */ backgroun…
has answer: http://stackoverflow.com/a/26153797
has comment: http://stackoverflow.com/comment/40998640
has comment: http://stackoverflow.com/comment/40998803
has title: Active HTML button on navbar
type: Question
tagged with: javascript

http://stackoverflow.com/q/26175851
answer count: 1
favorite count: 0
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/26175920
type: Question
has title: Slide down/up with ngAnimate?
tagged with: javascript
has answer: http://stackoverflow.com/a/26175920
upvote count: 1
has body: I want to add simple slide done/up animation. As an example, if you go to Fiddle you can see left-side panel, where you can add external resources, Ajax requests and so on. If click on some of those you can see simple animated slide down effect. What I am trying to achieve is a bit similar. I have an html button: {{typeBoxMessage}} And here is my check-boxes div: Check All {{carType.type}} When you click on the button, activeTypeBox is set to true, so ng-show="activeTypeBox" passes. When you click on this button again, activeTypeBox is set to false, so ng-show="activeTypeBox" fails. The only thing that I need to add is slide down/up animation. I prefer to use Angular-Animate because it is library that works with angular code. I have tried to find the solution, but I did't find the one that fits my requirements.

http://stackoverflow.com/q/26151158
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26151710
has comment: http://stackoverflow.com/comment/40995244
tagged with: angularjs
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40994962
score: 0
has answer: http://stackoverflow.com/a/26151884
tagged with: select
has body: I have an angular form with this select element: &lt;select ng-model="expense.category" ng-options="category.code for category in categories"&gt;&lt;/select&gt; where expense is my object to create/edit in the form and expense.category points to child object category (with properties "id" and "code"), which is to be selected by this control. This all works perfect for creating new expenses - category gets saved just the way it should be. When loading an expense for editing everything is fine also - the expense has its category in the controller. But on the form the select does not get pre-filled with the correct category-entry, it is empty, although all the categories are loaded into the select element. So binding works only one way (from form to model) but not in the other way (from model to form) for the select field. All the other fields (properties of expense) get filled correctly into the edit form though. Any ideas how to solve this?
has comment: http://stackoverflow.com/comment/40995415
has title: Two way binding with AngularJS select for a child object
tagged with: javascript
has answer: http://stackoverflow.com/a/26151710
accepted answer: http://stackoverflow.com/a/26151884

http://stackoverflow.com/comment/40972444
has text: It's a custom scraper for sites that have odd layouts - this one uses javascript to pull the image urls which is why I'm pulling from the a element. Thanks for your answer!
comment on: http://stackoverflow.com/a/26139324
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26159270
type: Answer
has body: It's working all right. However, the object {x:3} is the prototype obj. When Node prints out the object, it only prints its own properties. x is a prototype property. Try it! var proto = {x: 3}; var obj = Object.create(proto); alert(obj.x) // 3 (Yes, i know this is a browser, but it's the same JavaScript. :)) Read more: Object.create()
downvote count: 0
score: 7
has comment: http://stackoverflow.com/comment/41009851
answers question: http://stackoverflow.com/q/26159240
accepted answer of: http://stackoverflow.com/q/26159240
upvote count: 7
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41008849

http://stackoverflow.com/comment/40949940
has text: make sure you give the proper classname in the above code...the one which actually exists in the DOM (i.e first search the dom for proper classname)....let me know if u still have any problem..
comment on: http://stackoverflow.com/a/26127148
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40887352
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26091984
has text: i think its a typo you have a extra `<` with `input name="submit"` in html.

http://stackoverflow.com/q/26189704
type: Question
has comment: http://stackoverflow.com/comment/41066135
tagged with: javascript
answer count: 2
upvote count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26189744
has body: Here two example JS files that create an object. Lets say the doSomethingHelper function is never ever called outside of the doSomething function. Example 1 (helper assigned to object): (function() { var myObject = { doSomething: function (a) { // some code here this.doSomethingHelper(); // maybe more code here }, doSomethingHelper: function () { // code here } } return myObject; })(); Example 2 (helper NOT part of the object): (function() { var myObject = { doSomething: function (a) { // some code here doSomethingHelper.call(this); // maybe more code here } } function doSomethingHelper() { // code here } return myObject; })(); As far as I can tell, the second example can be easier to read at times, and avoids "polluting" the object's namespace. However, it's easier to write tests for the helper function in the first example. Are there any tradeoffs I'm missing?
has title: What are the trade-offs involved in assigning (or not assigning) helper functions to an object?
possible better answer: http://stackoverflow.com/a/26189771
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26189771
downvote count: 0
has answer: http://stackoverflow.com/a/26189744
score: 1
has comment: http://stackoverflow.com/comment/41066158

http://stackoverflow.com/comment/40830892
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26060694
has text: @Regent: Just noticed you posted the same idea I posted only 30 mins earlier in a comment. Why don't you post it as an answer as you were the first *by far* to suggest that faster solution :)
score: 0

http://stackoverflow.com/a/26183458
answers question: http://stackoverflow.com/q/26183307
has comment: http://stackoverflow.com/comment/41056017
type: Answer
upvote count: 2
score: 0
downvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26183307
has body: videoId: &lt;?php echo json_encode($videoId); ?&gt;, JSON-encoding is compatible with JavaScript and will take care of any escaping and what not that may need to be done.

http://stackoverflow.com/q/26043801
tagged with: web-storage
accepted answer: http://stackoverflow.com/a/26097137
tagged with: javascript
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26096980
has title: WebStorage - executeSql gives undefined is not a function in for loop
has answer: http://stackoverflow.com/a/26096980
has answer: http://stackoverflow.com/a/26097137
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40895344
has body: Here is my code : Given an object, I'm trying to insert some data in a webStorage db. Problem is that console returns me a "undefined is not a function", and I have no clue why Here is a snippet of my code try { db = openDatabase("mca", "1.0", "db mca", 200000); db.transaction(function(tx) { tx.executeSql("CREATE TABLE IF NOT EXISTS planning_x_material(id INTEGER PRIMARY KEY AUTOINCREMENT, planning_id INTEGER, material_id INTEGER, material_name TEXT)", []); }, onDbError, fillDb); } catch(e) { alert("webstorage error"); } function callback_planning_material(obj) { console.log(obj); db.transaction(function(tx) { for(var k = 0; k &lt; obj.length; k++) { for (var i = 0; i &lt; obj[k].material.length; i++) { (function (k, i) { var planning = obj[k]; var material = planning.material[i]; tx.execuseSql("INSERT INTO planning_x_material(planning_id, material_id, material_name) VALUES (?, ?, ?)", [planning.id, material.id, material.name]); // here console gives me "undefined is not a function" error })(k, i); } } }, onDbError); } function fillDb() { // example object var obj = [ { id: 1, name: "name 1", material: [ { id: 1, name: "mat. 1" }, { id: 2, name: "mat. 2" }, ] }, { id: 2, name: "name 2", material: [ { id: 3, name: "mat. 3" }, { id: 4, name: "mat. 4" }, ] } ]; callback_planning_material(obj); } Any idea?
type: Question

http://stackoverflow.com/q/26147293
has body: I cant understand the differences between the normal object and inheritance creation process and the whole prototype concept. Let's say I have this code: function Person(name, age,location){ this.name = name; this.age = age; this.location = location; this.greet = function(){ return console.log(this.name + " says hi from "+this.location); } } Person.prototype = { protoGreet: function(){ console.log(this.name + " says 'that greeting was sent using a prototype'") } } var alex = new Person("Alex",29,"earth"); var john = Object.create(Person); //now I can set john's location john.location = "wherever"; Whats the difference between greet and protoGreet methods. They both act completely the same. What is the difference between alex and john. One was created using the new keyword and the other one thru the prototype property of Person "class". I guess there's no right way because both are correct, but when should I prefer one method over the other?
tagged with: javascript-objects
has comment: http://stackoverflow.com/comment/40988000
has comment: http://stackoverflow.com/comment/40986959
upvote count: 1
has title: Javascript prototypal inheritance and object creation
type: Question
tagged with: javascript
tagged with: inheritance
tagged with: prototype
has answer: http://stackoverflow.com/a/26149216
answer count: 1
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40987017
has comment: http://stackoverflow.com/comment/40986997
type: UnansweredQuestion

http://stackoverflow.com/comment/41070299
score: 0
comment on: http://stackoverflow.com/q/26192220
type: Comment
has text: Please make your title lower case
type: QuestionComment

http://stackoverflow.com/comment/41069769
type: Comment
comment on: http://stackoverflow.com/q/26191771
has text: No, my specific case is like this: I want to keep list of links to external resources on my server. Then the served should generate the webpage with js which will download those resources on the client side and zip them on the fly allowing to download dynamicaly created zip file on the client side. Is this somehow possible without using server bandwidth to download those resources but do it by browser?
score: 0
type: QuestionComment

http://stackoverflow.com/q/26189940
score: 4
upvote count: 5
downvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26293331
accepted answer: http://stackoverflow.com/a/26293331
linked to: http://stackoverflow.com/q/32568261
has comment: http://stackoverflow.com/comment/41083989
has comment: http://stackoverflow.com/comment/41070577
tagged with: nashorn
type: AnsweredQuestion
has title: Java 8 Nashorn ArrayIndexOutOfBoundsException
tagged with: java
has body: What, if anything, can I do to stop Nashorn from throwing an ArrayIndexOutOfBoundsException all the time? This seemingly trivial and correct (there's no bug herein) code snippet causes Nashorn to the exception: File test.js: var test; (function (test) { (function (renderer) { var posts = { 0: null, 1: null, 2: null, 3: null // comment out this line --&gt; no exception thrown }; })(test.renderer = {}); // comment out 'test.renderer = ' --&gt; no exception thrown })(test = {}); Then run the script like so: /usr/lib/jvm/java-8-oracle/bin/jjs test.js Result: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4 at jdk.nashorn.internal.runtime.AccessorProperty.initGetterSetter(AccessorProperty.java:271) at jdk.nashorn.internal.runtime.AccessorProperty.&lt;init&gt;(AccessorProperty.java:250) at jdk.nashorn.internal.runtime.SetMethodCreator.createNewFieldSetter(SetMethodCreator.java:166) at jdk.nashorn.internal.runtime.SetMethodCreator.createNewPropertySetter(SetMethodCreator.java:156) at jdk.nashorn.internal.runtime.SetMethodCreator.createSetMethod(SetMethodCreator.java:122) at jdk.nashorn.internal.runtime.SetMethodCreator.createGuardedInvocation(SetMethodCreator.java:78) at jdk.nashorn.internal.runtime.ScriptObject.findSetMethod(ScriptObject.java:1911) at jdk.nashorn.internal.runtime.ScriptObject.lookup(ScriptObject.java:1632) at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:96) at jdk.internal.dynalink.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:176) at jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124) at jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:144) at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:232) at jdk.nashorn.internal.scripts.Script$test.L:2(test.js:3) at jdk.nashorn.internal.scripts.Script$te…
type: Question
has comment: http://stackoverflow.com/comment/59245740
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26044024
tagged with: javascript
has body: I have a working D3 example. I use the force and everything works fine. But I have a small issue. Let's say I have 4 Nodes. Just see this picture: https://i.sstatic.net/HwniH.png and now when I click on the Node "AKZO NV" then I want to get: https://i.sstatic.net/85oBp.png with the old nodes and links. So at the end I want to have 7 Nodes. And the "AKZO NV" shall be focused. All Nodes still have their links and the "AKZO NV" shall have two. I think you now know what I want. So I already have this code. Working like a charm but it's not properly adding the new nodes and links. I think there is a small issue with the order of the commands. Any ideas are welcome: var alreadyThere = false; var nodeCircles = {}; var svg, link, node; var force = d3.layout.force(); var nodes, links; var width = 700, height = 400; var boxIDName = "#main-rightinfo"; var JSONFORMERGING; function createRealGraph(jsonData){ //console.log(jsonData); if (alreadyThere == false){ JSONFORMERGING=jsonData; initializeGraph(jsonData); }else{ update(JSONFORMERGING.concat(jsonData)); } alreadyThere = true; } function update(jsonData) { console.log(jsonData); jsonData.forEach(function(link) { link.source = nodeCircles[link.source] || (nodeCircles[link.source] = {name: link.sourceName, ID: link.source, class: link.sourceClass}); link.target = nodeCircles[link.target] || (nodeCircles[link.target] = {name: link.targetName, ID: link.target, class: link.targetClass}); }); link = link.data(links); link.enter().insert("line") .attr("class", "link"); node = node.data(nodes); node.enter().append("g") .attr("class", "node") .attr("r", 5) .call(force.drag); force .nodes(d3.values(nodeCircles)) .links(jsonData) .start(); nodes = force.nodes(); links = force.links(); } function initializeGraph(jsonData){ jsonData.forEach(function(link) { link.source = nodeCircles[link.source] || (nodeCircles[link.source] = {name: link.sourceName, ID: link.source, class: link.sourceClass}); link.target = nodeCircles[link.target] || (no…
score: 0
accepted answer: http://stackoverflow.com/a/26117955
has comment: http://stackoverflow.com/comment/40800573
has comment: http://stackoverflow.com/comment/40799284
has comment: http://stackoverflow.com/comment/40805857
has comment: http://stackoverflow.com/comment/40799682
has comment: http://stackoverflow.com/comment/40799992
has comment: http://stackoverflow.com/comment/40804271
tagged with: d3.js
has comment: http://stackoverflow.com/comment/40802729
linked to: http://stackoverflow.com/q/9539294
type: AnsweredQuestion
tagged with: force-layout
has title: D3 force layout shall add nodes and links when clicking a node
has answer: http://stackoverflow.com/a/26117955
possible better answer: http://stackoverflow.com/a/30196139
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/30196139
has comment: http://stackoverflow.com/comment/40800315

junit
type: Tag
tag name: junit
tags question: http://stackoverflow.com/q/26102244

http://stackoverflow.com/q/26128667
type: Question
linked to: http://stackoverflow.com/q/10887676
has title: Add the URL of home-page for "Add to home screen" on my site
tagged with: iphone
tagged with: ios
tagged with: javascript
upvote count: 3
has comment: http://stackoverflow.com/comment/40952993
has body: In my website, I have several pages. When people tap on "add to home screen" on an iPhone device, they can save the icon on the phone like an app, but the icon opens that exact page. Is there any way that when users bookmark any pages on my website, the shortcut on the phone always open my home page? Is there a code that I can add to all the pages on my site to make it happen? Thanks.
downvote count: 1
favorite count: 0
type: UnansweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/40952977
answer count: 0

http://stackoverflow.com/q/26083970
has title: Disabling Checkboxes after selecting the max selection using jquery
favorite count: 0
tagged with: multidimensional-array
possible better answer: http://stackoverflow.com/a/26085146
upvote count: 1
has answer: http://stackoverflow.com/a/26085146
tagged with: php
tagged with: checkbox
accepted answer: http://stackoverflow.com/a/26084196
type: AnsweredQuestion
has body: I am trying to make this multidimensional array checkbox to disable after selecting the max number of selection. the problem is I don't know where the problem is in this jquery code. Any kind of help is appreciated. thank you :D here is my code. &lt;script&gt; $("input[name=chkservicecrew\\[&lt;?php echo $ar_serviceID_count;?&gt;\\]\\[\\]]").change(function(){ var max= &lt;?php echo $maxSelectedCrew;?&gt;; if( $("name=chkservicecrew\\[&lt;?php echo $ar_serviceID_count;?&gt;\\]\\[\\]]]:checked").length == max ){ $("name=chkservicecrew\\[&lt;?php echo $ar_serviceID_count;?&gt;\\]\\[\\]]").attr('disabled', 'disabled'); $("name=chkservicecrew\\[&lt;?php echo $ar_serviceID_count;?&gt;\\]\\[\\]]:checked").removeAttr('disabled'); }else{ $("name=chkservicecrew\\[&lt;?php echo $ar_serviceID_count;?&gt;\\]\\[\\]]").removeAttr('disabled'); } }); &lt;/script&gt;
downvote count: 1
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/26084196

http://stackoverflow.com/comment/40851239
comment on: http://stackoverflow.com/q/26072955
score: 0
type: QuestionComment
has text: hold on, need to update the question.
type: Comment

http://stackoverflow.com/q/26106025
answer count: 2
upvote count: 0
favorite count: 0
type: UnansweredQuestion
score: -3
has comment: http://stackoverflow.com/comment/40911877
downvote count: 3
type: Question
has answer: http://stackoverflow.com/a/26106040
tagged with: javascript
has body: I am making a reservation system. I want to program this so that if the user clicks on button with class A, their total price gets increased by 7.50. Same for button with class B, class C etc. I tried coding it like this: var price = 0; if (button.className === "A") { price + 7.50; } if (button.className === "B") { price + 11; } if (button.className === "C") { price + 13; } But the only output I get is 0! I'm probably making a rookie mistake, but can anyone help me out?
has answer: http://stackoverflow.com/a/26237240
has comment: http://stackoverflow.com/comment/40912516
has title: JavaScript: Adding Variables

http://stackoverflow.com/comment/40891893
comment on: http://stackoverflow.com/q/26094752
score: 0
type: QuestionComment
has text: No. you misunderstood. @Romski, please read my question one more time and you will understand what I mean.
type: Comment

http://stackoverflow.com/comment/41049153
type: Comment
type: QuestionComment
has text: "A more merciful solution" has no meaning to me. If you're asking if it is possible to circumvent this security measure - I hope not, it exists for good reasons.
comment on: http://stackoverflow.com/q/26177140
score: 0

http://stackoverflow.com/comment/99974465
comment on: http://stackoverflow.com/q/26095149
score: 0
type: QuestionComment
type: Comment
has text: The answer here (https://stackoverflow.com/questions/49106088/changing-pseudo-element-style-from-javascript) shows how you can use document.querySelector, just change the pseudo element to a span (if possible)

http://stackoverflow.com/a/26148225
type: Answer
has body: If you take a look at the directory structure in node_modules you will notice that each module has its own subdir node_modules for its dependencies. You shouldn't need to run "npm update" more than once.
has comment: http://stackoverflow.com/comment/40988789
score: 0
answers question: http://stackoverflow.com/q/26147864

http://stackoverflow.com/q/26153705
score: 1
has title: How to include global variables in angularjs app?
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26153755
tagged with: javascript
has answer: http://stackoverflow.com/a/26154367
accepted answer: http://stackoverflow.com/a/26154367
has answer: http://stackoverflow.com/a/26153755
upvote count: 1
favorite count: 0
tagged with: angularjs
has body: I have a global variable declared outside of angular context: var globalv = "Hello"; This variable does not change. I have a directive that wants to use it... $scope.somevar = globalv + "_"; What is the simplest way to include the globalv in my angularjs app/context? When I attempt to reference it in the above manner, I get an error.
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/26139245
type: AnsweredQuestion
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26140440
tagged with: modal-dialog
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40973103
tagged with: angular-ui
has comment: http://stackoverflow.com/comment/40973724
has body: I am very new to the angular world (second day) and trying to work around angular ui. I am trying to build my first modal dialog. The modal dialog is being shown properly but I m not able to use model in that modal dialog. Here is my demo plunker Here is what I've done so far: In controller: appRoot.controller('DemoCtrl', function ($scope, $modal) { $scope.openDemoModal= function (size) { var modalInstance = $modal.open({ templateUrl: 'ngPartials/_DemoModal.html', controller: 'modalCtrl', size: size, backdrop: true, keyboard: true, modalFade: true }); }; }); In index.html: Open Modal In _DemoModal.html Test Modal Test Cancel In controller modalCtrl appRoot.controller('modalCtrl', function ($scope, $modalInstance) { $scope.test= function () { var temp = $scope.testModel;//This shows undefined }; $scope.cancel = function () { $modalInstance.dismiss('cancel'); }; }); In modalCtrl $scope.testModel always remains undefined no mater what is in the text box. And if I first set the value of $scope.testModel="some value", it will never change no matter what is in the text box. What exactly wrong I am doing. Also I want to know, if is it possible to have communication between DemoCtrl and modalCtrl ? For this communication I tried to use concept of events as follows: In modalCtrl: $scope.test= function () { //var temp = $scope.testModel;//This shows undefined $scope.$emit('someEvent', 'some args'); }; In DemoCtrl: $scope.$on('someEvent', function (event, args) { alert('event called'); }); But this is also not working. What exactly I am doing wrong. Is I am creating angular modal in a wrong way? Any help will be great for me. Thanks in advance.
tagged with: angularjs
has answer: http://stackoverflow.com/a/26140440
has answer: http://stackoverflow.com/a/26139612
accepted answer: http://stackoverflow.com/a/26139612
has comment: http://stackoverflow.com/comment/40972006
has title: Unable to access model values for the angular ui modal dialog

http://stackoverflow.com/comment/40785087
type: QuestionComment
has text: you want to do it on server side or using client side JQuery?
comment on: http://stackoverflow.com/q/26036784
score: 0
type: Comment

http://stackoverflow.com/comment/40956166
score: 0
comment on: http://stackoverflow.com/q/26128809
type: Comment
type: QuestionComment
has text: @Patrick Q Not sure why my question was down voted. I asked a legitimate question and showed what I tried.

http://stackoverflow.com/comment/40973883
type: AnswerComment
type: Comment
has text: Added more to my answer. Hope that helps.
comment on: http://stackoverflow.com/a/26140225
score: 0

http://stackoverflow.com/comment/40838788
type: Comment
comment on: http://stackoverflow.com/q/26065725
has text: BECAUSE the form submits...you can not cancel the form submission with a dialog like this. Change the `return fieldcheck;` to `return false` and watch the "alert" appear.
score: 0
type: QuestionComment

http://stackoverflow.com/a/26181143
type: Answer
has comment: http://stackoverflow.com/comment/41075901
has comment: http://stackoverflow.com/comment/41052644
has body: I am only interested in the execution order of the async operations. That is why I'm not passing any successback or errback to the .then(). Most examples I came around are using the result of the promise in the following .then(), which again, in this case I'm not interested in. You don't have to use use the result argument, but you always need pass a callback function that the promise can execute later. I'm missing something crucial about promises in general A promise does represent the result of an operation, not the operation itself. That means when you have a promise, the task is already started. You need to use a function that can be executed and then returns a promise. What am I doing wrong? The .then() method does expect such a function - to be called when the result of the promise (whatever it is) has arrived. The function doesn't need to use that result, but it has to be callable. In your case, you are passing things like: console.log(…) - which immediately logs the argument and passes undefined resetCounter(um)) - which immediately calls the async function and passes the promise to then, where it is ignored (as it's not a function) clearCollection(nm) - which immediately calls the async function, but clearCollection does not return anything so we get back undefined. For example, // returns the amount of deleted entries var clearCollection = function (collection) { collection.remove({}, …); }; does not actually return anything. The only part where you've used return is inside the callback, where it is meaningless. You will need to construct a Promise similar to your resetCounter function - or you just use the Promisification feature: function clearCollection(collection) { return Promise.promisify(collection.remove, collection)({}); } Now, your chain should look like this: resetCounter(nm) .then(function() { console.log('1 -&gt; After newsmodel'); return resetCounter(sm); }) .then(function() { console.log('2 -&gt; After schoolmodel'); return resetCounter(um);…
upvote count: 1
has comment: http://stackoverflow.com/comment/41071265
accepted answer of: http://stackoverflow.com/q/26180606
type: AcceptedAnswer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26180606
has comment: http://stackoverflow.com/comment/41074795
has comment: http://stackoverflow.com/comment/41052152

http://stackoverflow.com/q/26046415
tagged with: jquery
favorite count: 0
has body: I have some razor code that I call my modal dialog and return a value but the value is not coming back before the function continues in to process the code. I am new to jQuery and javascript any help would be appreciated. &lt;div id="modalOverRide" title=" Override Tolerance" style= "display: none;" &gt; &lt;p id = "modalOverRide"&gt; &lt;/p&gt; &lt;/div&gt; I call this function from my CheckMin() function TmodalOverRide(message, callback) { $("#modalOverRide").text(message); $("#modalOverRide").data("callback", callback).dialog("open"); }; $(function () { $("#modalOverRide").dialog( { // This will allow the operator to pass a fail slice that is within .001in or 0.254mm //This goes with div modalOverride autoOpen: false, modal: true, closeOnEscape: false, buttons: { Yes: function () { $(this).dialog("close"); $(this).data("callback")(true); }, No: function () { $(this).dialog("close"); $(this).data("callback")(false); } } }); }); function CheckMin() { var mmMinTol = $('#textMM_MinTol').val(); mmMinTol = mmMinTol.trim(); var mmAdjMinTol = mmMinTol - 0.0254; var mmMaxTol = $('#textMM_MaxTol').val(); mmMaxTol = mmMaxTol.trim(); var mmAdjMaxTol = +mmMaxTol + +0.0254; var inMaxTol = $('#textIN_MaxTol').val(); inMaxTol = inMaxTol.trim(); var inAdjMaxTol = +inMaxTol + +0.001; var inMinTol = $('#textIN_MinTol').val(); inMinTol = inMinTol.trim(); var inAdjMinTol = inMinTol - 0.001; var OptoMin = $('#textOptoMin').val(); OptoMin = OptoMin.trim(); var mmOptoMin = (OptoMin * 25.4); var MinGMinTol var MinLMaxTol var MinTolDiff var MaxTolDiff var UOM = $('#textUOM').val(); if (UOM == "mm") { if (mmOptoMin &gt;= mmMinTol &amp;&amp; mmOptoMin &lt;= mmMaxTol) { var MinAnswer = "T" ('#HMinTestResult').val(MinAnswer) } else if (mmOptoMin &gt;= mmAdjMinTol) {// &amp;&amp; mmOptoMin &lt;= mmAdjMaxTol) { var HOverrideValue = TmodalOverRide() alert(HOverrideValue) $('#HMinTestResult').val(HOverrideValue) } else { $('#HMinTestResult').val("F") } } else { if (OptoMin &gt;= inMinTol &amp;&am…
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion
type: Question
tagged with: javascript
has title: Jquery dialog not returning value quick enough
tagged with: modal-dialog
downvote count: 0

http://stackoverflow.com/q/26183875
favorite count: 0
type: UnansweredQuestion
upvote count: 4
has title: Get parent document origin for cross-domain HTTPS iFrame
downvote count: 0
has comment: http://stackoverflow.com/comment/41055285
tagged with: iframe
tagged with: postmessage
has answer: http://stackoverflow.com/a/50591914
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41056039
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/41057899
has body: I want to read window.top.location.origin from inside an iFrame. The parent and iFrame are on different HTTPS domains. Trying to access that throws a security error in Chrome for example. [DOMException: Blocked a frame with origin "..." from accessing a cross-origin frame.] Is it at all possible to do that without triggering the error? I need window.top's origin because I send different postMessages based on that origin.
has answer: http://stackoverflow.com/a/26184009
tagged with: cross-domain
has comment: http://stackoverflow.com/comment/41055229

http://stackoverflow.com/a/26166873
type: Answer
has comment: http://stackoverflow.com/comment/41029287
has comment: http://stackoverflow.com/comment/41030381
has comment: http://stackoverflow.com/comment/41030102
has comment: http://stackoverflow.com/comment/41029619
downvote count: 0
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26166104
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41024202
answers question: http://stackoverflow.com/q/26166104
has comment: http://stackoverflow.com/comment/41030031
has body: try this :) function allPermutations(letters,maxSize){ function permutations(letters,size){ var results=[]; for(var i=0;i&lt;letters.length;i++){ var res=letters[i]; if(size===1){ results.push(res); }else{ var rest=permutations(letters,size-1); for(var j=0;j&lt;rest.length;j++){ results.push(res+rest[j]); } } } return results; }; var results=[]; for(var i=1;i&lt;=maxSize;i++){ results=results.concat(permutations(letters,i)); } return results; } console.log(allPermutations('abc',3)); http://codepen.io/anon/pen/ECHDK
has comment: http://stackoverflow.com/comment/41029298

http://stackoverflow.com/a/52681092
score: 0
answers question: http://stackoverflow.com/q/26046474
type: Answer
has body: You can separate the functions which do the temperature conversion as follows i did somw changes in the code. Fahrenheit Celsius:

http://stackoverflow.com/q/26068445
tagged with: debugging
has answer: http://stackoverflow.com/a/26238442
downvote count: 0
tagged with: javascript
has title: Live Editing Remote JavaScript in Chrome Inspector
has comment: http://stackoverflow.com/comment/72479493
has comment: http://stackoverflow.com/comment/58747780
linked to: http://stackoverflow.com/q/5067532
has answer: http://stackoverflow.com/a/48705994
answer count: 4
favorite count: 0
has body: I'm trying to debug remote javaScript using Google Chrome inspector. I recall in the past being able to: 1) Edit remote javascript using Chrome Inspector 2) 'Save' the change using (cmd + s) 3) Test the effect the the altered javaScript on the page Now when I try to 'save' the change I get a yellow warning icon in the 'tab' that says "Changes to this file were not saved to the file system" Can anyone help me with this, please bear in mind that I'm working with remote code (not trying to alter local files) and I do have the developer tools extension installed.
type: UnansweredQuestion
tagged with: web-inspector
score: 14
has answer: http://stackoverflow.com/a/42677472
upvote count: 14
tagged with: google-chrome-devtools
has answer: http://stackoverflow.com/a/77618839
tagged with: google-chrome
type: Question

http://stackoverflow.com/q/26171977
has comment: http://stackoverflow.com/comment/41033157
has title: Text input as variable for array with a while loop on javascript
answer count: 1
has answer: http://stackoverflow.com/a/26172099
tagged with: javascript
score: 0
type: UnansweredQuestion
has body: I am trying to figure out how to make a text box number reflect the number on the array i am trying to show. My code in attached. I am trying to make it that if i type "4" then 4 of my skills would pop up on my site. Click Here to see my top job duties
tagged with: loops
type: Question

http://stackoverflow.com/q/26066942
has answer: http://stackoverflow.com/a/26067094
has body: So, I have a form that I'm submitting via JQuery/Ajax HTML: Sign Me Up And then passing it through via Javascript JAVASCRIPT OK, so here's where it gets fun. I need to change the way the format in which the data is serialized, because the server is looking for this output: contact%5Bfirst_name%5D=data&contact%5Bemail%5D=data&etc=data EDIT: The server is looking for the words after contact to be in square brackets (IE: I need to find a way, when serializing, to input the square brackets or their character code equivalents to turn contactfirst_name into contact[first_name] and contactemail into contact[email]) - however, I cannot just rename the names contact[first_name] and contact[email]. This is a form hosted on a marketing automation platform, and [first_name] and [email] are system variables, which means that they would get converted on page load (why use the same syntax for both I don't know... beyond me). So, I guess I'm trying to use Javascript to insert the square brackets in after serializing, but without ever actually spelling out the full name. Changing the NAMES on the form are not an option, as using the unencoded characters (ie: contact[first_name], contact[email]) trigger variables in the platform that the form is hosted on. For the same reason, changing the php file I'm posting to is not an option, as it's a closed platform. Is there any way to do this with, say, beforesubmit? If so, where do I insert it into my script and what arguments am I passing through? In terms of comfort level here, I cobbled this script together from an example I found on W3Schools and another website - I'm very much a novice at Jquery and Javascript in general aside from replacing classes/id's where there are placeholders.
type: Question
possible better answer: http://stackoverflow.com/a/26067094
accepted answer: http://stackoverflow.com/a/26260415
tagged with: forms
score: 0
answer count: 3
has title: Possible to change names/serialization output in JQuery?
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/26260415
has answer: http://stackoverflow.com/a/26067243
type: AnsweredQuestion

http://stackoverflow.com/comment/40949303
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26126777
type: Comment
has text: Oh, i should have known. No-one else gives such crazy class names. :P They probably do have other wacky things going on.

random
tags question: http://stackoverflow.com/q/26061427
tags question: http://stackoverflow.com/q/26079643
tags question: http://stackoverflow.com/q/26154744
tags question: http://stackoverflow.com/q/26058400
tag name: random
type: Tag
tags question: http://stackoverflow.com/q/26070225

http://stackoverflow.com/comment/40850111
comment on: http://stackoverflow.com/a/26071258
type: AnswerComment
has text: Awesome, thanks for the reply! I guess though they are not storing all weather stations for history and are rolling the data up to a city view. Thanks for the comprehensive example!
score: 0
type: Comment

http://stackoverflow.com/comment/40867426
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26081563
score: 1
has text: your HTML+CSS is just fine, http://jsbin.com/layoguruwope/1/edit shows nothing weird, spacing wise, so that weird whitespace in your image seems to come from something else that you've not mentioned in your post

http://stackoverflow.com/a/26179225
upvote count: 7
accepted answer of: http://stackoverflow.com/q/26179160
type: AcceptedAnswer
type: Answer
has body: Your statement is syntactically correct, but it's achieving its result in a weird way. The .join() method does take an argument, and the argument is expected to be a string. If it's not a string, it's coerced to a string by normal means. In your code, the array [separator=','] when converted from an array will be the string ",". The equivalent (less weird) way to do the join would be ['a', 'b', 'c'].join(","); Note that the embedded assignment to the variable separator is a side effect that does not have anything to do with the behavior of the .join() function. The fact that that assignment took place before the function call (to .join()) is undetectable by that function. edit &mdash; the MDN documentation for the .join() method describes it like this: str = arr.join([separator = ',']) That's an unfortunately confusing notational convention used throughout the MDN documentation. The bracketed separator = ',' is a meta-syntactic convention meaning that the function accepts one optional argument. The fact that it's optional is indicated by the square brackets.
downvote count: 0
score: 7
answers question: http://stackoverflow.com/q/26179160

http://stackoverflow.com/a/26146695
score: 10
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26146420
answers question: http://stackoverflow.com/q/26146420
type: Answer
has body: Juste use toLocaleDateString instead of toLocaleTimeString and you should get the result you are expecting : var date = new Date('2014', '9', '08'); //Wed Oct 08 2014 00:00:00 GMT-0500 (Central Daylight Time) var options = {weekday: "long", year: "numeric", month: "long", day: "numeric"}; console.log(date.toLocaleDateString("en-US", options)); returns : "Wednesday, October 8, 2014" I will also second the above poster and recommend using moment.js; it is lightweight and very flexible.
upvote count: 10

http://stackoverflow.com/a/26079046
has body: You can try: 'images':'asset-url("/intro_png/intro-png_%2d.png")' or image: = '&lt;%= asset_path 'image.png' %&gt;' but you need rename your file to file.js.erb If any of this answers work try to find the solution here: asset_pipeline EDITING: And trying something like this: http://jsfiddle.net/mLv2s/2/
has comment: http://stackoverflow.com/comment/40862424
score: 0
has comment: http://stackoverflow.com/comment/40862395
has comment: http://stackoverflow.com/comment/40862369
answers question: http://stackoverflow.com/q/26078130
has comment: http://stackoverflow.com/comment/40862383
type: Answer
has comment: http://stackoverflow.com/comment/40862450

transform
tags question: http://stackoverflow.com/q/26126256
tags question: http://stackoverflow.com/q/26118420
tags question: http://stackoverflow.com/q/26085953
type: Tag
tag name: transform

http://stackoverflow.com/comment/40793540
has text: no @AlexG no it didn't work :(
score: 0
comment on: http://stackoverflow.com/q/26041060
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40978894
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26135211
type: AnswerComment
has text: Correct. My objective is to be able to scroll through the list of images on the left while the image on the right should not move. Syncing up the thumbnails with the main image will be done once I implement it into the site I'm working on.

http://stackoverflow.com/a/26066088
has body: You can also download a jQuery plugin. SyntaxHighlighter is very popular. The way they work is that you copy the files to your website, and then you just put your code into a tag, and the plugin automatically beautifies your code.
type: Answer
answers question: http://stackoverflow.com/q/26065854
score: 0

http://stackoverflow.com/a/26182079
has comment: http://stackoverflow.com/comment/41052253
has body: A rough template for a controller function. It includes a check if ajax and just returns JsonResponse. public function ajaxAction(Request $request) { if (! $request->isXmlHttpRequest()) { throw new \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException(); } // do whatever $rtn = array('foo' => 'bar'); return new \Symfony\Component\HttpFoundation\JsonResponse($rtn); } Standard ajax code to put in view; bob
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41051873
answers question: http://stackoverflow.com/q/26181866
has comment: http://stackoverflow.com/comment/41057404
has comment: http://stackoverflow.com/comment/41052087
has comment: http://stackoverflow.com/comment/41052218
has comment: http://stackoverflow.com/comment/41057253
downvote count: 0
has comment: http://stackoverflow.com/comment/41052147
has comment: http://stackoverflow.com/comment/41051800
type: Answer

http://stackoverflow.com/comment/41123648
score: 1
has text: It's ok for rar and tar, it returns : Type is application/x-rar (or x-tar) on MacOs/Chrome. On which OS / browser are you testing it ?
comment on: http://stackoverflow.com/q/26149389
type: Comment
type: QuestionComment

grunt-contrib-copy
type: Tag
tags question: http://stackoverflow.com/q/26190445
tag name: grunt-contrib-copy

http://stackoverflow.com/comment/41009969
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26139943
type: Comment
has text: I'm guessing it never gets to the console.log? Does the window directive have an onClick listener maybe that's blocking the click? Could always try pointer-events:none on it if that's the case? Also Ionic doesn't have any kind of click interceptor built in? (I haven't used it)

http://stackoverflow.com/q/26125846
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/26125934
answer count: 3
score: 5
has answer: http://stackoverflow.com/a/26125899
has answer: http://stackoverflow.com/a/26125909
tagged with: jquery
favorite count: 0
tagged with: ajax
has body: I have some problems. On click I rotate image with ajax and save new image. Everything is without page refresh. And problem is that old image won't refresh and put new refreshed image. Also new image have same name like the old one. QUESTION My question is how to update img from folder without page refresh? Only after click class slika-rotiraj. HTML : &lt;div class="slika"&gt; &lt;div class="slika-obrisi"&gt;&lt;/div&gt; &lt;div class="slika-rotiraj"&gt;&lt;/div&gt; &lt;img src="uploads/87b6f334f30717343acd69f3962142a0_542ad975e424d.jpg" /&gt; &lt;/div&gt; SCRIPT : $(document).on("click", ".slika-rotiraj", function() { var slika = $(this).next("img").attr("src"); var slika1 = $(this).parent(); var slika2 = $(this).next("img"); $(this).next("img").attr("src", slika); $.ajax({ type: "POST", url: "rotiraj.php", data: { slika: slika }, success: function(data) { } }); });
upvote count: 5
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
possible better answer: http://stackoverflow.com/a/26125899
accepted answer: http://stackoverflow.com/a/26125934
has title: update image after ajax call
type: Question

http://stackoverflow.com/q/26191142
has answer: http://stackoverflow.com/a/66449591
tagged with: javascript
has title: Selenium Nodejs CHROMEDRIVER path
has answer: http://stackoverflow.com/a/53971573
score: 20
possible better answer: http://stackoverflow.com/a/53971573
answer count: 7
has answer: http://stackoverflow.com/a/51678408
favorite count: 0
has body: Tried with "npm install selenium-webdriver" I'm still getting the error below. Any idea where the path is sops to be at? Error: The ChromeDriver could not be found on the current PATH. Please download the latest version of the ChromeDriver from http://chromedriver.storage.googleapis.com/index.html and ensure it can be found on your PATH. at Error (&lt;anonymous&gt;) at new ServiceBuilder (/var/www/nodejs/node_modules/selenium-webdriver/chrome.js:51:11) at getDefaultService (/var/www/nodejs/node_modules/selenium-webdriver/chrome.js:216:22) at new Driver (/var/www/nodejs/node_modules/selenium-webdriver/chrome.js:470:32) at Builder.build (/var/www/nodejs/node_modules/selenium-webdriver/builder.js:302:14) at Object.handle (/var/www/nodejs/node.js:31:4) at next_layer (/var/www/nodejs/node_modules/express/lib/router/route.js:103:13) at Route.dispatch (/var/www/nodejs/node_modules/express/lib/router/route.js:107:5) at c (/var/www/nodejs/node_modules/express/lib/router/index.js:195:24) at Function.proto.process_params (/var/www/nodejs/node_modules/express/lib/router/index.js:251:12)
has answer: http://stackoverflow.com/a/26561341
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/55662038
tagged with: selenium
upvote count: 21
has answer: http://stackoverflow.com/a/59584200
has answer: http://stackoverflow.com/a/58869081
downvote count: 1
accepted answer: http://stackoverflow.com/a/26561341
type: Question

http://stackoverflow.com/a/26053771
has body: You simply need to put single quotes before and after their values: $("input").on( "change", function() { var str = ""; if (byBrand.length) str += " AND brand='" + byBrand.join(" OR brand='") + "'\n"; if (byPrice.length) str += (str == "\n" ? " ":" AND price &gt; '") + "" + byPrice.join(" OR price &gt; '") + "'\n"; if (byCamera.length) str += (str == " \n" ? " ":" AND camera") + " ='" + byCamera.join(" OR camera ='") + "'\n"; $("#result").html(str); }); See the Updated Fiddle Here
score: 1
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26053633
downvote count: 0

http://stackoverflow.com/a/26058760
answers question: http://stackoverflow.com/q/26058399
has comment: http://stackoverflow.com/comment/40826192
has comment: http://stackoverflow.com/comment/40825253
score: 0
type: Answer
has body: web scraping is about sending require information to a web server and get the result. It is not about behaving like a user clicking button or entering search criteria. All you need to do in this example is send a POST request to http://watchout4snakes.com/wo4snakes/Random/NewRandomSentence. The result is just text in page.content, it does not even need to evaluate. So to get more than one sentence you just need to do a loop of page.open

http://stackoverflow.com/comment/41185037
type: AnswerComment
comment on: http://stackoverflow.com/a/26238903
type: Comment
has text: I am having issue in IE,after making span noneditable when I click after the highlighted span text the cursor automatically mives forward and also it is not allowing me to delete the content..It's working fine in Chrome...please advise
score: 0

http://stackoverflow.com/a/26103354
has body: One way of decoupling object references is to serialize and deserialize as JSON. In this case, you could do something like this: var newobj = JSON.parse(JSON.stringify(myjson.resource[i].obj[j])); Note that this won't work every time. Complex objects with functions or prototypes won't be saved, for example. It also comes with a slight performance hit.
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26102800
answers question: http://stackoverflow.com/q/26102800
type: Answer
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41048380
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26160428
type: AnswerComment
has text: @DeepikaAnand I am _deeply_ confused by what you said there.

http://stackoverflow.com/q/26090091
tagged with: javascript
has comment: http://stackoverflow.com/comment/40884678
has title: Can exports property be set to object instead of function?
tagged with: browserify
type: UnansweredQuestion
tagged with: module
tagged with: circular-dependency
tagged with: node.js
has comment: http://stackoverflow.com/comment/40885040
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/40884991
has comment: http://stackoverflow.com/comment/40885133
has comment: http://stackoverflow.com/comment/40884722
has body: I'm modularizing my client-side JavaScript code with Browserify. In my "page" module, I'm trying to export an object with methods, like so: // page.js exports.picker = { init: function () { ... }, getValue: function () { ... }, // etc. }; However, in another module, when I try to use one of these methods, I get a TypeError: // other module var page = require('./page'); // later... page.picker.init(); // throws "TypeError: page.picker is undefined" Not sure what I'm doing wrong. Is it maybe because I'm exporting an object instead of a function?
type: Question
has comment: http://stackoverflow.com/comment/40904668

http://stackoverflow.com/q/26090464
type: AnsweredQuestion
score: 1
has body: This question refers to one of mine about split(), and include an answered question about inserting specific thing if string number is x. Basically, I have one big string, with a specific separator which is :, and I'm using .split() in a loop to print each part of the string into a different input using the separator to cut it. This works perfectly. Now, what I want is to do a breakline after each 17 inputs (input 17 then linebreak, input 34 then linebreak, input 51...). I found a way to do it in the second link I shared, and the breakline works. The problem is that only the last line of inputs is now filled with the string parts (the last 7 parts of the string). All the other input are simply blank. Here's the final code: function cutTheString() { var str = document.getElementById('textareaString').value; var arrayOfStrings = str.split(':'); for(var i = 0; i &lt; arrayOfStrings.length; i++) { if ((i % 17) == 0) { document.getElementById('result').innerHTML += '&lt;br /&gt;'; } var div = document.getElementById('result'); var mi = document.createElement('input'); mi.setAttribute('type', 'text'); mi.setAttribute('size', '4'); mi.setAttribute('id', 'string' + (i+1)); div.appendChild(mi); document.getElementById('string' + (i+1)).value = arrayOfStrings[i]; } } Interestingly, in if ((i % 17) == 0), let's replace 0 by x. If x &lt; 17, only x - 17 inputs will be filled, starting by the last one of the list. If x &gt; 17, all inputs will be filled, but the breaklines will obviously not work. There is no error in the console, and my knowledge of Javascript makes me fail to understand why it's doing this. I quite see the correlation, but I can't think of any solution. I tried different operators than == without success. You can test it on this JSFiddle. Thanks for your help!
has comment: http://stackoverflow.com/comment/40883665
linked to: http://stackoverflow.com/q/13845437
type: Question
tagged with: for-loop
accepted answer: http://stackoverflow.com/a/26090538
has title: split() loop: if string number = x, insert
downvote count: 0
tagged with: javascript
answer count: 1
linked to: http://stackoverflow.com/q/26081187
tagged with: string
favorite count: 0
has comment: http://stackoverflow.com/comment/40883643
has answer: http://stackoverflow.com/a/26090538
upvote count: 1

http://stackoverflow.com/q/26069544
type: Question
answer count: 2
upvote count: 1
tagged with: javascript
has body: I have a database named 'mysqlproject' that contains two tables. One of the tables that i am interesting in is named markers and declared in database like this : CREATE TABLE IF NOT EXISTS `markers` ( `id` int(11) NOT NULL, `TitleEvent` varchar(60) NOT NULL, `Description` varchar(80) NOT NULL, `lat` float(10,6) NOT NULL, `lng` float(10,6) NOT NULL, `type` varchar(255) NOT NULL, `status` varchar(30) NOT NULL, `EventUserName` varchar(60) NOT NULL, `PhotosEvent` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=73 ; One of the columns is PhotosEventthat in there i want to save photo's url. So i capture a photo through a javascript file and i am sending it through ajax to a php file "camera.php" The ajax sending procedure is: $.ajax({ type: "POST", url: "camera.php", data: { imgBase64: dataURL } }).done(function( respond ) { // you will get back the temp file name // or "Unable to save this image." console.log(respond); }); So i am sending with method POST the image to the file "camera.php". In php file i am taking that image and saving it first in my "local server" in folder "EventImages". Ok that works .. But i want to save the url of the image in database in the field "PhotosEvent" only in raw where the active id is located.. Connecting with database : $connection = mysql_connect('localhost', 'root', ''); if (!$connection) //Success $Connection with server returns 1 { die("Database Connection Failed" . mysql_error()); } else { //Connection with server established } // Try Connection with mysql Database $select_db = mysql_select_db('mysqlproject'); if (!$select_db) //Success $Connection with Database returns 1 { die("Database Selection Failed" . mysql_error()); } else { //Connection with Database established } Save image to folder as .png (works) and attemp saving url to database (don't work): if ( isset($_POST["imgBase64"]) &amp;&amp; !empty($_POST["imgBase64"]) ) { define('UPLOAD_DIR', 'EventImages/'); // get the dataURL $dataURL = $_POST["im…
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/40845444
has title: Save image url to Mysql Database
has answer: http://stackoverflow.com/a/26077594
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40845389
tagged with: php
has comment: http://stackoverflow.com/comment/40845414
has comment: http://stackoverflow.com/comment/40845581
score: 1
has answer: http://stackoverflow.com/a/26069788
has comment: http://stackoverflow.com/comment/40845471
tagged with: database
tagged with: mysql

http://stackoverflow.com/q/26070052
has answer: http://stackoverflow.com/a/26070156
type: AnsweredQuestion
downvote count: 0
score: 1
has title: Duplicating div elements and their CSS on button click
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40846376
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/26070156
favorite count: 0
has body: I'm working on a page that has a div with the id "exam" and a button with the id "copy". The div includes the text "Exam 1" and has a 2px double black border around it. When the button is clicked, the div element is supposed to be duplicated and displayed below each time the button is clicked. I have gotten that part to work, however, it doesn't seem to be copying the div element's CSS, only the text inside the element, so each time I click the button, it's only displaying "Exam 1", but not the border. Here is my HTML (this also includes the Javascript and CSS): Exam 1 Tanner Taylor Exam 1 There's more to it, but I cut out the portions that didn't deal with this particular issue. Any ideas as to why it's not displaying the border around the text when the button is clicked?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40846329

http://stackoverflow.com/q/26104342
has comment: http://stackoverflow.com/comment/40908847
downvote count: 0
has comment: http://stackoverflow.com/comment/40911937
favorite count: 0
has title: How to create generic and specific directive in angular
tagged with: angularjs
type: UnansweredQuestion
tagged with: angular-directive
score: 2
answer count: 0
upvote count: 2
has body: I need to create generic "information boxes" that will be repeated over and over again in a web app. I need 3 different types of this boxes, let's say A, B and C. Their templates will be very similar, so I was thinking to create a "generic box" and then in some way make it more specific depending if I need the directive A, B or C. Let's take the image below as example: The spaces marked in green may or may not exist depending on which directive we are using, and of course their content and behaviour should change accordingly. As you can see the main directive is just a rectangle with some basic recurring info, like an image on the left, a title and a content area. Is there any way to create a generic directive in angular (like the main rectangle) and then using some sort of inheritance to create the "sub-directive"? If yes, is it possible to use only the main directive and passing it a parameter to let angular understand if from it should it create a directive A, B or C? Something like &lt;my-generic-directive type="A"&gt;&lt;/my-generic-directive&gt; &lt;my-generic-directive type="B"&gt;&lt;/my-generic-directive&gt; What are the possible drawbacks of this technique? I Hope I was clear
has comment: http://stackoverflow.com/comment/40910912
type: Question
tagged with: javascript

http://stackoverflow.com/q/26147406
tagged with: javascript
has comment: http://stackoverflow.com/comment/40987459
score: 0
has comment: http://stackoverflow.com/comment/40987251
has title: why it returns match like that
tagged with: regex
has answer: http://stackoverflow.com/a/26147930
answer count: 4
has answer: http://stackoverflow.com/a/26147466
has answer: http://stackoverflow.com/a/26147463
linked to: http://stackoverflow.com/q/25152849
has answer: http://stackoverflow.com/a/26147470
accepted answer: http://stackoverflow.com/a/26147470
type: AnsweredQuestion
has body: I tested code below: var str1 = 'chapter 4.5.3.1' var rslt = str1.match(/(\.\d)*/g) console.log(rslt) and it returns me matchs of ["", "", "", "", "", "", "", "", "", ".5.3.1", ""] if I goes var str1 = 'chapter 4.5.3.1' var rslt = str1.match(/(\.\d)*/) console.log(rslt) and it gives me: ["", undefined, index: 0, input: "chapter 4.5.3.1"] could somebody explain those match result to me, especially the 1st example, why there are so many empty string is returned. And the 2nd match, there is an empty string retuned. Thank you.
type: Question
possible better answer: http://stackoverflow.com/a/26147463

http://stackoverflow.com/a/26043426
downvote count: 1
score: -1
answers question: http://stackoverflow.com/q/26043288
upvote count: 0
has body: You can do a lot with DOM! You can manipulate simple html this way! Check out the W3 website : http://www.w3schools.com/js/js_htmldom.asp
type: Answer

http://stackoverflow.com/comment/40969692
type: Comment
has text: as far as I understand the issue, yes.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26119821

http://stackoverflow.com/a/26043542
has comment: http://stackoverflow.com/comment/40798825
downvote count: 0
has body: $(document).ready(function() { // Provide access to data outside of the getJSON call var m_oJsonCollectie = null; // Get the data $.getJSON( "js/collectie.json", function(data) { // Set the data m_oJsonCollectie = data; // Apply the click handler $( "#collectie li" ).click(function() { var thumb_id = $(this).data("id"); for(var i = 0; i &lt; m_oJsonCollectie.stoelen.length; i += 1) { if(m_oJsonCollectie.stoelen[i].ref == thumb_id) { $("#detailimage") .attr('src', m_oJsonCollectie.stoelen[i].image); $("#detailimage") .attr('title', m_oJsonCollectie.stoelen[i].title); $("#title") .html('&lt;h4&gt; '+ m_oJsonCollectie.stoelen[i].naam+' &lt;/h4&gt;'); $("#secondaryimage").attr('src', m_oJsonCollectie.stoelen[i].secondaryimage); $("#secondaryimage").attr('title', m_oJsonCollectie.stoelen[i].secondarytitle); $("#description") .html('&lt;p&gt; '+ m_oJsonCollectie.stoelen[i].description+' &lt;/p&gt;'); } } }); }); }); JS have block level scope, so you wont get the values outside of the function unless you provide access to them or they are declared in global scope (which is considered bad practice). This pattern should help you keep your data accessible, and only applies the click handler if the getJSON call is successful.
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26043424
has comment: http://stackoverflow.com/comment/40798299
has comment: http://stackoverflow.com/comment/40798498
has comment: http://stackoverflow.com/comment/40797296
has comment: http://stackoverflow.com/comment/40798694
has comment: http://stackoverflow.com/comment/40799124

http://stackoverflow.com/q/26090678
downvote count: 1
has comment: http://stackoverflow.com/comment/40884075
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26090725
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40884394
type: Question
has title: Selection Errors
has comment: http://stackoverflow.com/comment/40884189
has comment: http://stackoverflow.com/comment/40884108
has body: How can I get my selection box to show an error if nothing is selected? Currently, it doesn't give me any errors upon submitting because the "select" field is the first item in the field box so it's implying that it's filled in. This is only for gender country and state. include 'connection.php'; if ($_POST['submit']=="Sign Up") { if (!$_POST['firstname']) $error.=" Please enter your first name"; else { if (!preg_match("/^[- '\p{L}]+$/u", $_POST['firstname'])) $error.=" First name may only contain letters"; } if (!$_POST['lastname']) $error.=" Please enter your last name"; else { if (!preg_match("/^[- '\p{L}]+$/u", $_POST['lastname'])) $error.=" Last name may only contain letters"; } if (!$_POST['email']) $error.=" Please enter your email"; else if (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) $error.=" Please enter a valid email address"; if (!$_POST['password']) $error.=" Please enter your password"; else { if (strlen($_POST['password'])<8) $error.=" Please enter a password with at least 8 characters"; if (!preg_match('`[A-Z]`', $_POST['password'])) $error.=" Please enter at least 1 capital letter"; } if ($_POST['password'] !== $_POST['confirmpassword']) $error.=" Your passwords do not match."; if (!$_POST['gender']) $error.=" Please enter your gender"; if (!$_POST['country']) $error.=" Please enter your country"; if (!$_POST['s tate']) $error.=" Please enter your state"; Form: <form class="form-horizontal" method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"> First Name* <input type="text" name="firstname" id="firstname" class="form-control input-md" value="<?php echo addslashes ($_POST['firstname']); ?>" /> Last Name* <input type="text" name="lastname" class="form-control input-md" value="<?php echo addslashes ($_POST['lastname']); ?>" /> Email* <input type="email" name="email" class="form-control input-md" value="<?php echo addslashes ($_POST['email']); ?>" /> Password* Confirm Password* Gender* Select Male Female Country* State* …
answer count: 1
favorite count: 0
tagged with: phpmyadmin
tagged with: mysqli
tagged with: php
upvote count: 0
has comment: http://stackoverflow.com/comment/40884038
has comment: http://stackoverflow.com/comment/40884049
accepted answer: http://stackoverflow.com/a/26090725
has comment: http://stackoverflow.com/comment/40884068

http://stackoverflow.com/comment/40788144
type: Comment
has text: @James Thorpe: Agreed! but this feature is available through the jQuery.migrate plugin.
comment on: http://stackoverflow.com/a/26038795
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40787380
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26038148
score: 0
has text: You can use the native Date object in JavaScript

http://stackoverflow.com/comment/40914866
comment on: http://stackoverflow.com/q/26106941
type: Comment
has text: Probably just need to add `body { padding-top: height-of-menu; }`
type: QuestionComment
score: 0

http://stackoverflow.com/q/26169702
has comment: http://stackoverflow.com/comment/41028783
accepted answer: http://stackoverflow.com/a/26169851
tagged with: for-loop
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26169810
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 1
has answer: http://stackoverflow.com/a/26169810
favorite count: 0
has comment: http://stackoverflow.com/comment/41028790
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41028849
has comment: http://stackoverflow.com/comment/41028752
has comment: http://stackoverflow.com/comment/41028815
has answer: http://stackoverflow.com/a/26169851
has title: For loop is looping too much
answer count: 2
has body: I am looping through a for loop to perform a simple calculation. The results of each iteration are stored into an array. The array has the correct number of elements but the output has exponentially too many elements. HTML: Fibonacci Sequence: External JS: var result; var x = 0; var y = 1; var resultArray = [x,y]; function FibonacciCalculation(){ for(var i = 2; i < 5; i++){ result = x + y; x = y; y = result; resultArray.push(result); } } function getArray(){ FibonacciCalculation(); return resultArray; } window.onload = function(){ FibonacciCalculation(); };
upvote count: 1
has comment: http://stackoverflow.com/comment/41028793
has comment: http://stackoverflow.com/comment/41029652

http://stackoverflow.com/q/26041250
tagged with: javascript
has body: I wonder... Let's imagine I have a code something like that: $('#specific-element').change(some_long_and_ajax_function); Element with binded ID doesn't exist on all of my pages. On some of them only. I do check whether this element exists like this: if($('#specific-element').length &gt; 0){ $('#specific-element').change(some_long_and_ajax_function); // There can be more stuff related to this specific element } My question: is it worth it? Is there any performance impact for binding handlers for non-existing elements or checking length is worse than it? Or is it basically same and I have two useless rows? What would you recommend? The first one keeps code nice and clear but I'm not sure if this will be "healthy" for jQuery with dozens of examples like that. Thanks.
accepted answer: http://stackoverflow.com/a/26041541
has comment: http://stackoverflow.com/comment/40793487
has comment: http://stackoverflow.com/comment/40793208
possible better answer: http://stackoverflow.com/a/26041876
type: AnsweredQuestion
score: 3
downvote count: 0
tagged with: jquery
favorite count: 0
type: Question
has title: jQuery: better performance with check whether binding element exists?
upvote count: 3
answer count: 2
has answer: http://stackoverflow.com/a/26041541
has answer: http://stackoverflow.com/a/26041876
has comment: http://stackoverflow.com/comment/40793203

http://stackoverflow.com/comment/40851778
type: Comment
score: 1
has text: in most of the cases, anyone can say do this, then this, then this.. how to do it in a specific programming language is actually the issue... *"Just listen for document scrolling"* - how? please provide some sample code... "*and calculate div's position against view port*" - how? please provide some sample code...
comment on: http://stackoverflow.com/a/26072941
type: AnswerComment

http://stackoverflow.com/comment/40974776
has text: No errors storing it, but when I clone and apply it the same way as I do with the ajax response I do get an error. Undefined.. So $('html').html(); doesn't seem to be equivalent of Ajax html response data.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26140649
type: Comment

http://stackoverflow.com/comment/40882966
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26090120
has text: I'm going to stop fixing your post, now (and just up-vote you instead)... ;)
type: AnswerComment

http://stackoverflow.com/q/26168707
tagged with: javascript
favorite count: 0
tagged with: approximation
type: Question
score: 1
has title: How to disable approximation in HighchartJS?
has comment: http://stackoverflow.com/comment/41027627
has body: I have this now: I need to draw graph of this function: -3.6 * Math.exp(-3.5 * Math.pow(x, 2)) * Math.sign(Math.cos(31 * x - 7)); I decided to use HighchartJS. There are no problems with it, but I am not sure, that it is correct to approximate function (highchartJS does this). You can find my results here, on jsFiddle. You can see, that values of the graph are "jumping" with some amplitude, highchartJS approx it and I am getting continious line. Actually, graph of my function differs from this result. You can see that here, for example. Also, you can see the result on image below: Line is interrupting. The question is how I can get same result with highchartJS (or maybe I should use another library?) ? If graph is not running on Chrome try this, please
upvote count: 1
has comment: http://stackoverflow.com/comment/41027560
has comment: http://stackoverflow.com/comment/41027687
has comment: http://stackoverflow.com/comment/41027586
answer count: 1
has comment: http://stackoverflow.com/comment/41027500
has comment: http://stackoverflow.com/comment/41027282
type: UnansweredQuestion
tagged with: graph
has answer: http://stackoverflow.com/a/26178458
tagged with: highcharts
has comment: http://stackoverflow.com/comment/41027439
downvote count: 0

http://stackoverflow.com/a/28643481
score: 1
downvote count: 3
answers question: http://stackoverflow.com/q/26041791
upvote count: 4
has body: I would use Cheerio for this. module.exports = { "login": function (browser) { var cheerio = require("cheerio") browser .url("http://www.wikipedia.org") .waitForElementVisible('body', 1000) .waitForElementVisible('select#searchLanguage', 1000) .source(function(result) { // .source() dump the page source in the variable $ = cheerio.load(result.value) var num_languages = $('select#searchLanguage option').length console.log('Wikipedia.org Languages: ' + num_languages); }) .end(); } }; or simply using the .execute() command
has comment: http://stackoverflow.com/comment/68277603
has comment: http://stackoverflow.com/comment/49608113
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26041791

http://stackoverflow.com/comment/40781672
comment on: http://stackoverflow.com/a/26034948
type: AnswerComment
has text: It turns out the problem lied within the javascript file. There was some code I forgot to remove. After fixing I tried parseFloat as I have encountered a problem (See the Edit on my post). It returns beyond 2 decimal figures when I would only like 2 as well that's how british pounds work.
score: 0
type: Comment

http://stackoverflow.com/a/26169658
score: 0
answers question: http://stackoverflow.com/q/26169241
type: Answer
has body: You could use PHP to $_GET URL information. Let's say you have the following URL: https://www.wherever.com/some_file.php?css1=1&amp;css2=1 At another time, let's say the URL looks like: https://www.wherever.com/some_file.php?css3=1&amp;css4=1 When you're writing your PHP page that generates HTML: &lt;?php $css = ''; function link_builder(){ $a = func_get_args(); $lo = "&lt;link rel='stylesheet' type='text/css' href='"; $lc = "' /&gt;"; $o = ''; foreach($a as $v){ $o .= "$lo$v$lc"; } return $o; } if(isset($_GET['css1'], $_GET['css2']) &amp;&amp; $_GET['css1'] === '1' &amp;&amp; $_GET['css2'] === '1'){ $css = link_builder('cssPath1.css', 'cssPath2.css'); } if(isset($_GET['css3'], $_GET['css4']) &amp;&amp; $_GET['css3'] === '1' &amp;&amp; $_GET['css4'] === '1'){ $css = link_builder('cssPath3.css', 'cssPath4.css'); } echo $css; ?&gt; With this methodology you can create separate external CSS files in advance, which can be cached into the Client's Browser memory. JavaScript styling won't do that.

http://stackoverflow.com/a/26039581
type: Answer
has body: Since you create your link before returning the (initial) view to the user, you need a bit of trickery to change it. I recommend the following: set an id on your a element and change its href attribute; on your controller, set a parameter corresponding to the street number and pre-fill the view: Controller: public ActionResult ESRIMapView(string streetNumber) { ViewBag.Message = "Your contact page."; ViewBag.StreetNumber = streetNumber; return View(); } View containing the li (note the Id on the a element): @Html.ActionLink("Map", "ESRIMapView", "Home", null, new { @class = "k-button", id="myMapaction" }) View containing the textarea (ESRIMapView ): @ViewBag.StreetNumber grid.js: function onChange(e) { //get currently selected dataItem var grid = e.sender; var selectedRow = grid.select(); var dataItem = grid.dataItem(selectedRow); //change the link var actionElem = $("#myMapaction"); var url = actionElem.attr("href"); if (url.indexOf("=") === -1) { //first time selecting a row url += "?streetNumber=" + dataItem.StreetNumber; } else { url = url.substring(0, url.lastIndexOf("=") +1) + dataItem.StreetNumber; } actionElem.attr("href", url); //change the link var y = $.ajax({ url: "/api/ServiceOrderData/" + dataItem.id, type: 'GET', dataType: 'json' }); } This script simply adds the street number parameter in the query string. When the user selects a row for the first time, the streetNumber parameter is not present in the query string. After the first time, the parameter is there and we must change only the value. Please note that this solution has its limitations: it does not work if you have other parameters in the query string (the logic for adding/editing the parameter must be changed).
has comment: http://stackoverflow.com/comment/40790111
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40790281
has comment: http://stackoverflow.com/comment/40790387
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26038509
accepted answer of: http://stackoverflow.com/q/26038509

http://stackoverflow.com/q/26121115
favorite count: 0
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/29972053
upvote count: 2
possible better answer: http://stackoverflow.com/a/26121832
answer count: 3
has answer: http://stackoverflow.com/a/26121832
tagged with: ngtable
accepted answer: http://stackoverflow.com/a/29972053
tagged with: javascript
has body: I am trying to use ng-table but stuck with ngTableParams. I keep getting the [Error] Error: 'undefined' is not a constructor (evaluating 'new ngTableParams') error, no matter what things I try. The current code looks like $scope.tableParams = new ngTableParams({ page: 1, count: 200, sorting: { name: 'asc' } }, { groupBy: 'area', total: TheData.length, getData: function($defer, params) { // use build-in angular filter var orderedData = params.sorting() ? $filter('orderBy')(TheData, params.orderBy()) : TheData; $defer.resolve(orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count())); } }); The app and controller are invoked with ngTable and ngTableParams: angular.module('MegaList', ['ui.bootstrap', 'ngTable']); angular.module('MegaList').controller('DisplayMegaList', ['$scope', 'ngTableParams', function($scope, $http, ngTableParams) { ... } I think I've already tried all the ways to compose 'ngTable', 'ngTableParams' and ngTableParams keywords together, but it still just doesn't work. What should I try then?
has title: Error: 'undefined' is not a constructor (evaluating 'new ngTableParams')
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/37551260
score: 2
downvote count: 0

http://stackoverflow.com/comment/40972006
comment on: http://stackoverflow.com/q/26139245
score: 1
type: Comment
has text: can you gather your code in a jsfiddle/plunk example
type: QuestionComment

http://stackoverflow.com/comment/40790747
has text: @TomA use this http://codepen.io/n0m4dz/pen/nKLju link for the live demo
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26039740

http://stackoverflow.com/a/26132828
has comment: http://stackoverflow.com/comment/40960908
has comment: http://stackoverflow.com/comment/40960790
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40960938
has comment: http://stackoverflow.com/comment/40960853
has comment: http://stackoverflow.com/comment/40960923
has comment: http://stackoverflow.com/comment/40960848
upvote count: 1
has comment: http://stackoverflow.com/comment/40960874
has comment: http://stackoverflow.com/comment/40961343
has comment: http://stackoverflow.com/comment/40961122
has comment: http://stackoverflow.com/comment/40960940
has body: There is several ways that you can do this, but it also depends on the environment. You can create a session on form submission with a parameter that will be checked when redirecting to the page, then checking if the parameter exists after redirection as @michaelb suggested. form.php session_start(); $_SESSION['form_finished'] = true; header('location: /../mycode.php'); Then on destination.php... session_start(); if(!$_SESSION['form_finished']) { header("HTTP/1.0 404 Not Found"); exit; } EDIT: To redirect once form is submitted you will need to do something like this. if (isset($_POST['submit'])) { //form processing code// if ($no_errors) { session_start(); $_SESSION['form_finished'] = true; header('location: /../mycode.php'); } } If your users are logged in, and you are looking for a more permanent and secure solution, you could add a field to the database which you check on destination.php instead of the $_SESSION() variable.
has comment: http://stackoverflow.com/comment/40960826
type: Answer
has comment: http://stackoverflow.com/comment/40960667
has comment: http://stackoverflow.com/comment/40961054
downvote count: 0
answers question: http://stackoverflow.com/q/26132525
score: 1
accepted answer of: http://stackoverflow.com/q/26132525

http://stackoverflow.com/q/26147276
answer count: 2
has comment: http://stackoverflow.com/comment/40986851
tagged with: javascript
has comment: http://stackoverflow.com/comment/40987002
has comment: http://stackoverflow.com/comment/40986963
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26147329
has body: The following is the code am using to create on click method. I am getting an error when I click, nothing happens and I don't know what is wrong. &lt;!DOCTYPE html&gt; &lt;html lang="en" class="no-js"&gt; &lt;head&gt; &lt;meta charset="UTF-8" /&gt; &lt;title&gt;Blueprint: Vertical Icon Menu&lt;/title&gt; &lt;link rel="shortcut icon" href="../favicon.ico"&gt; &lt;link rel="stylesheet" type="text/css" href="css/leftmenu.css" /&gt; &lt;link rel="stylesheet" type="text/css" href="flaticon.css" /&gt; &lt;style&gt; body {position: relative;font-family: 'Lato', Calibri, Arial, sans-serif; color: #47a3da;} body, html { font-size: 100%; height: 100%; padding: 0; margin: 0;} a {text-decoration: none;} a:hover {color: #000;} #header{height:20%;width: 100%;background-color: #B9F5BB;} .dis123{width:75%;float:left; height:80%;text-align: left; } .postleftmen{width:25%;float:left;color:#f0f0f0;} div.subcte456{text-align: inherit;line-height: 150%;font-size:20px} div .subcte456 a{display:inline-block;padding:2px 6px;background-color:#47a3da;color:white;border-radius:4px;margin:3px;cursor:default;} &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="header"&gt; Head &lt;/div&gt; &lt;div class="postleftmen"&gt; &lt;ul class="cbp-vimenu"&gt; &lt;li&gt;&lt;a href="#" class="flaticon-number41" &gt;&amp;nbsp;&amp;nbsp;select category&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" class="flaticon-smart" onClick="mob(); return false;"&gt;&amp;nbsp;mobile&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" class="flaticon-pc6" onClick="ele(); return false;"&gt;&amp;nbsp;electronics&amp;nbsp;&amp;&amp;nbsp;computer&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" class="flaticon-car95" onClick="veh(); return false;"&gt;&amp;nbsp;vehicle&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" class="flaticon-livingroom6" onClick="hme(); return false;"&gt;&amp;nbsp;home&amp;nbsp;&amp;&amp;nbsp;furniture&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" class="flaticon-dog37" onClick="pet(); return false;"&gt;&amp;n…
accepted answer: http://stackoverflow.com/a/26147329
possible better answer: http://stackoverflow.com/a/26151639
has comment: http://stackoverflow.com/comment/40987277
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40987202
has title: onclick method ERROR
type: Question
has answer: http://stackoverflow.com/a/26151639

http://stackoverflow.com/comment/41070347
type: Comment
has text: @rene: even though you do - you have left the original capitalization for the original words. Which means that your "different" view perfectly matches to mine ;-D
score: 0
comment on: http://stackoverflow.com/q/26192220
type: QuestionComment

http://stackoverflow.com/q/26041806
tagged with: webrtc
has comment: http://stackoverflow.com/comment/40798072
favorite count: 0
upvote count: 2
has body: I am working on a WebRTC gateway project and I have a need to access a browsers fingerprint and its algorithm from Javascript. I would like to access this information to send it via a WebSocket signaling channel. I expected to get the fingerprint and hash algo via the browsers answer SDP, but on chrome its missing. I have searched for an answer and have had no luck. Here is a screen shot showing the information I want to access (via webrtc-internals): I'm looking for a cross-browser solution, but if it works in Chrome only for now that would be just fine. The parameters I want are shown in the image as "googFingerprint" and "googFingerprintAlgorithm". Update: screen shot of the offer Update: screen shot of the answer Update: latest offer + answer
answer count: 1
has comment: http://stackoverflow.com/comment/40798398
has comment: http://stackoverflow.com/comment/40807031
has title: How to access fingerprint and fingerprint algorithm for DTLS handshake
has comment: http://stackoverflow.com/comment/40798347
has answer: http://stackoverflow.com/a/26868694
has comment: http://stackoverflow.com/comment/40796257
has comment: http://stackoverflow.com/comment/40797595
has comment: http://stackoverflow.com/comment/40806270
score: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40810425
tagged with: dtls
has comment: http://stackoverflow.com/comment/40795464
type: Question
accepted answer: http://stackoverflow.com/a/26868694
has comment: http://stackoverflow.com/comment/40795173
type: AnsweredQuestion

http://stackoverflow.com/comment/40812616
type: Comment
comment on: http://stackoverflow.com/q/26051576
type: QuestionComment
score: 1
has text: You can't create a new html file on the server with client-side Javascript alone - you need something like PHP or NodeJS on the server to do this for you. A better way to get where you want to go would be to use a server side language like PHP to save your data into a database, then instead of having 100's of html files, use one PHP file to show the data for a single mentor from the database. Unfortunately PHP is far too broad a subject to teach in one question.

http://stackoverflow.com/a/26074555
score: 0
has comment: http://stackoverflow.com/comment/40857888
type: Answer
answers question: http://stackoverflow.com/q/26073120
has comment: http://stackoverflow.com/comment/40879078
has body: Check this JSBIN. This will help you. Replace locatStr by window.location.search; The below code will work in all scenarios function getParameterByName(){ var locatStr = '?xyz=123&amp;transaction[XXXX][zzzzz]=YYYYY', searchStr = locatStr.split('?')[1], matchArr = searchStr.match(/transaction\[[a-zA-Z0-9]+\]\[[a-zA-Z0-9]+\]/gi), para; if(matchArr){ var temp = searchStr.split(matchArr[0]+'=')[1]; return ((temp.indexOf('&amp;')!=-1) ? temp.split('&amp;')[0] : temp); } else{ return false; } } var param = getParameterByName(); console.log(param); if(param){ console.log('set cookie here'); } else{ console.log('no cookie present'); } P.S. Dont forget to accept the answer if satisfied

http://stackoverflow.com/a/26107690
type: Answer
score: 7
upvote count: 7
has comment: http://stackoverflow.com/comment/40915185
has body: No. What you have there are not decorators, they're just methods. Methods do mutate the object, decorators mutate behaviour by overwriting methods. They're quite similar to mixins, only that they don't create new methods. For example, let's give your Coffee class a setSize method: Coffee.prototype.setSize = function(size) { this._size = size || 'medium'; }; Now, let's have a crazy barista who doesn't get proportions right: function extreme(coffee) { var oldMethod = coffee.setSize; coffee.setSize = function(size) { oldMethod.call(this, size &amp;&amp; 'Xtra'+size[0].toUpperCase()+size.slice(1)); }; } and let him serve one that is ordered as "large": &gt; var coffee = extreme(new Coffee); &gt; coffee.setSize("large") &gt; coffee.info() XtraLarge, Array [], 100
accepted answer of: http://stackoverflow.com/q/26107091
answers question: http://stackoverflow.com/q/26107091
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26038041
answer count: 4
has answer: http://stackoverflow.com/a/26038737
type: UnansweredQuestion
type: Question
tagged with: angularjs-scope
linked to: http://stackoverflow.com/q/18934154
has body: I want to pass the $scope to services and store it in the services so other controllers can use it. For my application user input the UserName and through ng-model i am passing it back to controller, but it is very limited to that particular controller and other controller can't access that scope. I have also looked into $rootScope but it is not the answer. Is there a way that i can store this username into services and pass it to the API in services so i don't have to worry about it. Currently i am doing something similar to this post Pass scope to Service on AngularJS This what i have so far in my services (function() { var gitHubApiFactory = function($http) { var urlBase = "https://api.github.com"; var factory = {}; factory.getUserName = function(userName) { return $http.get(urlBase + "/users/" + userName); }; factory.getUserRepo = function(userName) { return $http.get(urlBase + "/users/" + userName + "/repos"); }; factory.getRepoLang = function(userName,repoName) { return $http.get(urlBase + "/repos/" + userName + "/" +repoName); }; return factory; }; gitHubApiFactory.$inject = ['$http']; angular.module('gitHubApp').factory('gitHubApiFactory',gitHubApiFactory); }()); I don't want to pass parameter(userName) everytime, instead just pass it in services. Thanks you all for the awesome support with angularjs.
tagged with: javascript
has answer: http://stackoverflow.com/a/26039009
has answer: http://stackoverflow.com/a/26038858
has title: passing $scope to the services in Angularjs
score: 0
has answer: http://stackoverflow.com/a/26038656
tagged with: angularjs

onclicklistener
tag name: onclicklistener
tags question: http://stackoverflow.com/q/26115696
type: Tag

http://stackoverflow.com/q/26064629
answer count: 1
tagged with: webgl
type: AnsweredQuestion
has title: Why do we need merge geometries ourselves?
tagged with: javascript
type: Question
has answer: http://stackoverflow.com/a/26066521
accepted answer: http://stackoverflow.com/a/26066521
score: 0
tagged with: three.js
has body: I'm finally understanding the performance impact of merged geometries. I've noticed the GPU has draw calls for all shared geometries combined with materials (or perhaps its just the material count). My question is why are developers forced to figure out how to merge geometries when its clear that the three.js will just divide everything out of your merged geometry anyways? I'm probably missing something.

http://stackoverflow.com/comment/40903813
score: 0
has text: @ccdavies basically what you need to be doing instead of what you are doing now is, preload all the images, do not attempt to start the animation (sequence) until all images in the sequence are loaded. This will fix your issues. (you can keep track of loaded images with a global variable, or you can stick your image sources in an array and pop them out as you load them, effectively creating a counter that takes care of itself)
type: AnswerComment
comment on: http://stackoverflow.com/a/26101016
type: Comment

http://stackoverflow.com/a/26086678
downvote count: 0
answers question: http://stackoverflow.com/q/26086650
type: AcceptedAnswer
score: 4
has body: setTimeout callback doesn't accept any parameters, you are overriding the i and e parameters of the each callback with undefined values: $('.tagline').each(function(i, e) { setTimeout(function() { $(e).addClass('animated'); }, 500 * i); });
has comment: http://stackoverflow.com/comment/40876323
type: Answer
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26086650

http://stackoverflow.com/comment/40989369
type: QuestionComment
score: 1
has text: Structuring your code as such doesn't prevent it from polluting the window namespace.
comment on: http://stackoverflow.com/q/26148543
type: Comment

http://stackoverflow.com/comment/40940887
type: Comment
has text: yes, it make the work ! , about my question, from iframe src link to other domain than 'simple dialog'(main) how I interact with 'main' objects/events like : onmouse over/click...
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26118004

http://stackoverflow.com/q/26188815
has comment: http://stackoverflow.com/comment/41064653
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26191297
answer count: 2
has comment: http://stackoverflow.com/comment/41064836
has title: How can I toggle show/hide all images instead of just hiding?
downvote count: 1
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
upvote count: 0
possible better answer: http://stackoverflow.com/a/26191297
has answer: http://stackoverflow.com/a/26188911
accepted answer: http://stackoverflow.com/a/26188911
tagged with: hide
type: Question
has comment: http://stackoverflow.com/comment/41064812
has body: I have a button set up to hide all images (under the class user_upload) but it only hides instead of toggling hide and show. How can I change my code so that it toggles? function hidei(id) { $('.user_upload').hide(); Thanks! :-)

http://stackoverflow.com/comment/41028258
comment on: http://stackoverflow.com/a/26169427
type: Comment
has text: So I just did that via the body tag and implemented like so at: jQuery(document).ready(function(){ if ($('#home-page').length) { $( "#google_map_vc_box" ).before( $( "#banners" ) ); $( "#google_map_vc_box" ).after( $( ".css3button" ) ); } });
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40937247
has text: can you maybe update this fiddle to reproduce the issue: http://jsfiddle.net/ezanker/cnrzcves/
score: 0
comment on: http://stackoverflow.com/q/26116057
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41051509
comment on: http://stackoverflow.com/q/26181833
type: Comment
type: QuestionComment
has text: jquery `append` is JS native => `innerHTML+=`
score: 0

http://stackoverflow.com/comment/40868329
type: AnswerComment
score: 0
type: Comment
has text: Thanks! It was really useful for understanding. So there's no way to choose somehow the destination x and y? maybe some jQuery plugin?
comment on: http://stackoverflow.com/a/26081450

http://stackoverflow.com/comment/40932607
score: 0
type: AnswerComment
has text: Yes,the same with select field.See the newest answer~
type: Comment
comment on: http://stackoverflow.com/a/26104300

http://stackoverflow.com/a/26040801
accepted answer of: http://stackoverflow.com/q/26040412
has body: $('.birth_date').hide(); $(document).on('focus', '#birth_year' ,function (e) { $('.birth_date').show(); }); on click retrieve the value of the element. and insert it has the value of your input. (then fadeOut) click() toggle off the is.(":focus") , the mousedown() does not. So you can check if the user is still focusing the good input when he click a .year. $('.year').mousedown(function(){ if ($('#birth_year').is(":focus")) { var year = $(this).html(); $('#birth_year').val(year); $('.birth_date').fadeOut(); } }); Edit: ok, you can also test the focus. Like that you populate and hide the input just if the focus is on it.
score: 1
answers question: http://stackoverflow.com/q/26040412
upvote count: 1
has comment: http://stackoverflow.com/comment/40792533
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40794352

http://stackoverflow.com/comment/80850408
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29339837
has text: Where to put the layout.xml file?

http://stackoverflow.com/q/26046443
tagged with: javascript
has body: I'm just learning javascript and I'm having some trouble. I'm making a choose your own adventure game where you go through a maze. There are pictures showing you what is going on. The pictures will change after each decision you make. I have a problem changing the pictures after typing in left or right. I keep getting Uncaught TypeError: Cannot set property 'src' of null error messages every time it tries to load the picture. Java says that the problem is occuring at Line 66 Here is my code: Brian.Bosco-Hazey Maze Adventure this is the start text
answer count: 3
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has title: Uncaught TypeError: Cannot set property 'src' of null...Choose your own adventure
has answer: http://stackoverflow.com/a/51586500
has answer: http://stackoverflow.com/a/67940547
tagged with: src
type: Question
has answer: http://stackoverflow.com/a/26046528
score: 5
has comment: http://stackoverflow.com/comment/40802830
tagged with: null
upvote count: 5

http://stackoverflow.com/comment/40862635
type: AnswerComment
has text: No, you were assigning the result of d3.tsv to var data in `var data =d3.tsv` (your code just changed) and then you pass `d` in the callback function but use `data`.
type: Comment
comment on: http://stackoverflow.com/a/26079105
score: 0

http://stackoverflow.com/comment/40896771
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26089903
has text: Thanks for those guidelines I tried to follow. See my initial post edited with some progress.
score: 0

http://stackoverflow.com/q/26105473
answer count: 4
score: 2
tagged with: ruby
upvote count: 2
tagged with: ruby-on-rails
type: Question
has answer: http://stackoverflow.com/a/26436602
has title: Change form multiple partials
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26540941
has answer: http://stackoverflow.com/a/26540941
has answer: http://stackoverflow.com/a/26540282
has answer: http://stackoverflow.com/a/26542903
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26540282
has comment: http://stackoverflow.com/comment/40910795
has body: I'm following this railscast on nested forms to create a similar application. In Ryan's application he has a structure like: Surveys ---> 2. Questions ---> 3. Answers So a user can create a survey and add/delete questions, with corresponding answers that they can add/delete. I'm trying to do it a little differently. I have: Surveys ---> 2. Questions ---> 3. Answers Or Comment For my application, after a user has created a question, the user can create an answer (just like Ryan's app). But there is a select box next to each answer, with the default being "Answer" and the other being "Comment". I'm trying to get basically the same functionality of Ryan's app, but with two tables: comments table and answers table. My code mimics the railscast, except for my answer_fields partial looks like: &lt;fieldset&gt; &lt;%= f.label :content, "Answer" %&gt; &lt;%= f.select :switch_answer_table options_for_select(["Answer", "Comment"]), class: "change-type" %&gt; &lt;%= f.text_field :content %&gt; &lt;%= f.check_box :_destroy %&gt; &lt;%= f.label :_destroy, "remove" %&gt; &lt;/fieldset&gt; and I have a comment_fields partial that looks like: &lt;fieldset&gt; &lt;%= f.label :content, "Comment" %&gt; &lt;%= f.select :switch_answer_table options_for_select(["Comment", "Answer"]), class: "change-type" %&gt; &lt;%= f.text_field :comment_content %&gt; ... (leaving out some stuff) ... &lt;%= f.check_box :_destroy %&gt; &lt;%= f.label :_destroy, "remove" %&gt; &lt;/fieldset&gt; My question.rb model looks like: class Question &lt; ActiveRecord::Base belongs_to :survey has_many :answers has_many :comments accepts_nested_attributes_for :answers, allow_destroy: true accepts_nested_attributes_for :comments, allow_destroy: true end I've been working on this, and I'm stuck. My jQuery only looks like this so far: jQuery -&gt; $('form').on 'click', '.remove_fields', (event) -&gt; $(this).prev('input[type=hidden]').val('1') $(this).closest('fieldset').hide() event.preventDefault() $('form').on 'cli…

http://stackoverflow.com/comment/41015117
has text: I am not sure that you can use two submits and use the required attribute the way you are wanting. Maybe you can leave the button you want to validate as a submit and change the other to a button like this... ` ` this should only call the validation when you use the submit button, not the save button
comment on: http://stackoverflow.com/a/26154784
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41000601
type: QuestionComment
has text: Raddio buttons can have a separate value from what is displayed i.e. upload a doc file or upload a doc file, write one now. This way you only need to check for a number or a single word.
score: 0
comment on: http://stackoverflow.com/q/26154596
type: Comment

http://stackoverflow.com/q/26132488
has title: Fullcalendar eventLimit in agendaWeek , agendaDay
type: Question
has comment: http://stackoverflow.com/comment/41554672
tagged with: javascript
has answer: http://stackoverflow.com/a/27052588
has comment: http://stackoverflow.com/comment/40971611
has comment: http://stackoverflow.com/comment/41473840
answer count: 1
has comment: http://stackoverflow.com/comment/41554677
favorite count: 0
has comment: http://stackoverflow.com/comment/41436981
upvote count: 2
type: UnansweredQuestion
has body: i tried to use eventLimit function in agendaWeek and agendaDay but it shows "+3 more" in only allday cells, not in Day cells. I tried to use eventLimit: { 'agenda': 6, // adjust to 6 only for agendaWeek/agendaDay 'default': true // give the default value to other views } but still same , is there any ways to show it on day cells or show similar string? :) Thank you.
has comment: http://stackoverflow.com/comment/41557583
has comment: http://stackoverflow.com/comment/40997082
score: 1
has comment: http://stackoverflow.com/comment/41441343
tagged with: fullcalendar
downvote count: 1

http://stackoverflow.com/q/26055595
tagged with: http://stackoverflow.com/tag/html
tagged with: input
type: AnsweredQuestion
has body: &lt;form novalidate class="simple-form"&gt; &lt;label ng-hide="tab==1"&gt;Reviews Min: &lt;input type="number" ng-init="revNum=30" class="form-control review-input" min="0" step="10" ng-model="revNum" /&gt;&lt;/label&gt; &lt;label&gt;Min Price &amp;#163;: &lt;input type="number" ng-init="minNum=0" class="form-control price-input" min="0" step="1000" ng-model="minNum" /&gt;&lt;/label&gt; &lt;label&gt;Max Price &amp;#163;: &lt;input type="number" ng-init="maxNum=0" class="form-control price-input" min="0" step="1000" ng-model="maxNum" /&gt;&lt;/label&gt; &lt;label&gt;&lt;select ng-model="currentCarType" style="display:block;" ng-options="key for key in carTypeObj"&gt; &lt;option value=""&gt;Select Type&lt;/option&gt; &lt;/select&gt;&lt;/label&gt; &lt;label&gt;&lt;button class="btn btn-primary " style="display:block;" ng-click="updateNumArray(revNum, minNum, maxNum); updateType(currentCarType)"&gt;Filter&lt;/button&gt;&lt;/label&gt; &lt;label&gt;&lt;button class="btn btn-primary " style="display:block;" ng-click="resetNumArray(); resetType()"&gt;reset&lt;/button&gt;&lt;/label&gt; &lt;/form&gt; Here is my controller: carApp.controller("TableBodyCtrl", function($scope, $http){ $scope.revNum = 30; $scope.minNum = 0; $scope.maxNum = 0; $scope.currentCarType = null; $scope.resetType = function(){ $scope.currentCarType = null; } $scope.resetNumArray = function(){ $scope.revNum = 30; $scope.minNum = 0; $scope.maxNum = 0; } When I click reset button my table updates and so currentCarType is null, revNum is 30, minNum is 0 and maxNum is 0. But my input fields as well as my select are not update. How can I fix that?
has answer: http://stackoverflow.com/a/26055783
score: 0
tagged with: select
has comment: http://stackoverflow.com/comment/40822238
type: Question
has comment: http://stackoverflow.com/comment/40821800
tagged with: javascript
linked to: http://stackoverflow.com/q/17606936
accepted answer: http://stackoverflow.com/a/26055783
answer count: 1
has title: AngularJS: reset function resets the table but not clears input field and select?
tagged with: angularjs

http://stackoverflow.com/comment/70154251
comment on: http://stackoverflow.com/a/26077620
score: 2
type: AnswerComment
type: Comment
has text: What if bluebird is not being used? Plain es6 promises only have a string error message that is passed to catch.

http://stackoverflow.com/q/26186355
has comment: http://stackoverflow.com/comment/41059988
accepted answer: http://stackoverflow.com/a/26186706
tagged with: ajax
type: AnsweredQuestion
type: Question
has title: Ajax - How to submit one by one input value - Codeigniter
tagged with: php
has body: Sorry for my english is not so good. And i'm newbie :) I want to update one-by-one input value with ajax in Codeigniter, but it not work right.. only one save button (one form) work, others form not work .. please help me edit below code Here's the demo code: View: <?$i=0;if(count($PPX) > 0)foreach($PPX as $item){$i++;?> <input type="text" name="p_ppx" id="p_ppx" size="8" value="<?= number_format($item['p_ppx'],0,'','')?>" class="i_ppx"> <input type="hidden" name="ids_p" id="ids_p" size="8" value="<?=$item['id']?>" class="i_ppx"> hello <?}else{?> Nothing here <?}?> Controller: function change_ppx3(){ $id_p = $_POST['ids_p']; $rs = $this->ppx->get_ppx_by_id($id_p); $ppx_value = $_POST['p_ppx']; $this->ppx->update_ppx(array("id"=>$id_p),array("ppx_r"=>$ppx_value)); if($_POST['p_ppx']): echo "done: "; print_r($_POST['ids_p']); echo "-"; print_r($_POST['p_ppx']); return true; endif; }
answer count: 1
has answer: http://stackoverflow.com/a/26186706
score: 0
tagged with: codeigniter
has comment: http://stackoverflow.com/comment/41060091
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41537293
comment on: http://stackoverflow.com/q/26160028
type: QuestionComment
has text: On [this documentation of typescript](https://typescript.codeplex.com/wikipage?title=Modules%20in%20TypeScript) you can check on the section named "Working with Other JavaScript Libraries" To find the solution you seek. Hope this helps.
score: 0
type: Comment

http://stackoverflow.com/comment/40841189
type: AnswerComment
comment on: http://stackoverflow.com/a/26066709
score: 0
type: Comment
has text: Didn't say they were. Was simply pointing out that updating his generator could potentially help, especially if the generator itself has documentation on deployment.

http://stackoverflow.com/comment/40908114
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26104032
score: 0
has text: Thanks guys it worked. If he wants he can make an answer for it so I can approve or something.

http://stackoverflow.com/a/26150123
answers question: http://stackoverflow.com/q/26148500
type: Answer
has comment: http://stackoverflow.com/comment/40995713
has body: I think the problem is you are broadcasting 'message:bar' and listening to 'message:foo' in controller. I have made simplified version of your code. You can see thet my code emits event to root scope and gots broadcasted event in child scope: This page is for capturing Data Data: {{data}} Foo Found!
score: 0

http://stackoverflow.com/comment/40830454
type: Comment
comment on: http://stackoverflow.com/a/26061475
score: 2
type: AnswerComment
has text: It doesn't work like this but if I replace webStorage.session with sessionStorage it works... don't really know why...

http://stackoverflow.com/comment/40819510
score: 0
type: QuestionComment
type: Comment
has text: yes check her link and delete all javascript / jquery its useless there
comment on: http://stackoverflow.com/q/26055435

http://stackoverflow.com/q/26135896
accepted answer: http://stackoverflow.com/a/26136306
has comment: http://stackoverflow.com/comment/40965955
has comment: http://stackoverflow.com/comment/40966160
type: AnsweredQuestion
has title: Knockout+DataTables Filtering doesn't work
tagged with: knockout.js
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26136306
tagged with: javascript
has answer: http://stackoverflow.com/a/32723538
score: 0
possible better answer: http://stackoverflow.com/a/32723538
has body: I have table with data, want to be able filter rows in it, data is coming from service and binded via knockout: Id Name function getUsers() { $.getJSON('/api/aspnetusers', null, function (users) { ViewModel.usersList.pushAll(users); }); } getUsers(); $(function () { $('.table').DataTable(); }); After entering something into filter input i always get: No data available in table
has comment: http://stackoverflow.com/comment/40966131

http://stackoverflow.com/comment/41253480
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26182807
has text: When I processed the file with sox, per your instructions, It played in my browser on Firefox:http://jsfiddle.net/laertiades/2hav4yLc/5/

http://stackoverflow.com/a/26055216
has comment: http://stackoverflow.com/comment/40820009
upvote count: 15
accepted answer of: http://stackoverflow.com/q/26055152
has comment: http://stackoverflow.com/comment/40818420
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26055152
score: 15
has comment: http://stackoverflow.com/comment/57364201
type: Answer
has body: For a matter of security you are allowed to retrieve the URL as long as the contents of the iframe, and the referencing javascript, are hosted in the same domain. Should it be the case, you can do something like: document.getElementById("frameid").contentWindow.location.href If the two domains are different then you'll have all the restrictions that apply to the cross-site reference scripting domain. Example: document.getElementById("frameid").src = 'http://www.google.com/'; alert(document.getElementById("frameid").documentWindow.location.href); Error: Permission denied to get property Location.href For sure (except if you find some huge security flaw in your browser) you simply cannot achieve what you need using javascript in the parent document. Let's see with a simple example why. If the browser allowed what you need, you could easily: Create a page, with a hidden iframe (e.g. http://malicous.com/dont-trust) In that iframe, open a child page with the login process of some website (e.g. http://insecure-web-site.com/redirectlogin) If cookies for child are present and under certain circumstances, the page inside the frame will redirect to the real website, proceeding with user login. From the parent page now you will be able to read all the sensitive informations gone through the login process contained inside the URL, e.g. access tokens, session IDs, ... At this point the victim website and its users are in front of a wide new set of possible security threats...
has comment: http://stackoverflow.com/comment/64209959
has comment: http://stackoverflow.com/comment/40828833

http://stackoverflow.com/comment/40860673
comment on: http://stackoverflow.com/a/26077967
score: 0
type: AnswerComment
has text: @Bergi The specific example that i worked with for his specific needs is perfectly valid (and better than array.length) - though i agree it's not suited for every case. The console.log is also placed where it needs to be. Check the code next time, before you comment.
type: Comment

http://stackoverflow.com/a/26046806
type: Answer
answers question: http://stackoverflow.com/q/26043970
accepted answer of: http://stackoverflow.com/q/26043970
has body: Sorry I was a bit stupid. The code I posted is correct and works well. The problem was, that the signal was emitted before it was connected to the slot.
type: AcceptedAnswer
score: 0

http://stackoverflow.com/comment/110661049
comment on: http://stackoverflow.com/a/26561341
score: 0
type: Comment
type: AnswerComment
has text: Fusion writing an answer to show people how to do that would help them.

http://stackoverflow.com/q/26178441
answer count: 10
has comment: http://stackoverflow.com/comment/41044769
favorite count: 0
has answer: http://stackoverflow.com/a/26178517
linked to: http://stackoverflow.com/q/1014861
tagged with: twitter-bootstrap
possible better answer: http://stackoverflow.com/a/26178518
has answer: http://stackoverflow.com/a/65720087
has title: How to toggle a highlighted selected item in a group list
type: AnsweredQuestion
score: 21
has answer: http://stackoverflow.com/a/26178503
has answer: http://stackoverflow.com/a/26178518
upvote count: 21
has answer: http://stackoverflow.com/a/48273098
type: Question
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/54494551
has answer: http://stackoverflow.com/a/26178733
accepted answer: http://stackoverflow.com/a/26178517
has answer: http://stackoverflow.com/a/67906684
has answer: http://stackoverflow.com/a/60607988
has body: I have this in using Bootstrap: Cras justo odio Dapibus ac facilisis in Morbi leo risus Porta ac consectetur ac Vestibulum at eros Cras justo odio Dapibus ac facilisis in Morbi leo risus Porta ac consectetur ac Vestibulum at eros The top row is selected. I only ever want to show to the User 1 selected row. I can raise an event when the User clicks on a row by adding a function to a Click-Event using Javascript. I can then set that Row to be Active. but what happens is that the previous selected Row needs to be deselected. What is the accepted way to do this? How do I enumerate and access each row to change its Class settings? Is there a better CSS way to do this? ADDITIONAL All these methods work (thanks everyone) but if I have more than 1 option group on my page how can I explicitly remove the active highlighted row on the one I am using?
has answer: http://stackoverflow.com/a/26178555
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41039311
type: QuestionComment
has text: Have you checked if there is data in $_IL_QUERY_INTERNAL ??
comment on: http://stackoverflow.com/q/26175299
score: 0
type: Comment

http://stackoverflow.com/comment/41048487
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26160389
score: 0
has text: Probably, you have to install server. For example: npm install static-server ; static-server

http://stackoverflow.com/q/26169045
tagged with: javascript
has comment: http://stackoverflow.com/comment/41027695
favorite count: 0
has body: Im just getting into app development and it seems that the style is to use an MVC style of coding where you have an app.js, controller.js, and service.js and etc. All codepens I see are always a single HTML file plus a single js file. What is the difference between these two styles? It seems like building putting them all in a single js file would be more convenient but why would someone go through the trouble of splitting up the code?
accepted answer: http://stackoverflow.com/a/26169512
type: Question
has comment: http://stackoverflow.com/comment/41031154
score: -2
has title: Single javascript file vs MVC
has comment: http://stackoverflow.com/comment/41027899
downvote count: 3
upvote count: 1
answer count: 1
tagged with: model-view-controller
has answer: http://stackoverflow.com/a/26169512
has comment: http://stackoverflow.com/comment/41027503
type: AnsweredQuestion

http://stackoverflow.com/comment/40974138
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26140526
type: Comment
has text: What does this have to do with JSON?

http://stackoverflow.com/a/26126770
has comment: http://stackoverflow.com/comment/41005485
has comment: http://stackoverflow.com/comment/40949135
answers question: http://stackoverflow.com/q/26126648
type: AcceptedAnswer
has body: The vanilla js DOM event for handling clicks is onclick(): MDN's docs for .onclick() var divTag = document.createElement("div"); divTag.onclick = function() { /* ... */ }; EDIT As well noted by torazaburo, the documentation adds: You may be inclined to use the EventTarget.addEventListener() method instead, since it is more flexible and part of the DOM Events specification. Example: var divTag = document.createElement("div"); divTag.addEventListener("click", function() { /* ... */ }, false);
accepted answer of: http://stackoverflow.com/q/26126648
score: 0
has comment: http://stackoverflow.com/comment/40949274
type: Answer

http://stackoverflow.com/q/26112365
type: AnsweredQuestion
has title: html tags not displaying using ng-bind-html in Angularjs
type: Question
has answer: http://stackoverflow.com/a/26112848
tagged with: javascript
has answer: http://stackoverflow.com/a/26112857
score: 0
accepted answer: http://stackoverflow.com/a/26112857
has comment: http://stackoverflow.com/comment/40923012
answer count: 3
upvote count: 1
downvote count: 1
favorite count: 0
possible better answer: http://stackoverflow.com/a/26112575
tagged with: angularjs
has body: I have html template like this: I want to bind this template using "ng-bind-html", like below: angular.module('bindHtmlExample', ['ngSanitize']) .controller('ExampleController', ['$scope', '$compile', function($scope, $compile) { var templateHTML = 'I am an HTMLstring with ' + ''; $scope.myHTML = $compile(templateHTML)($scope); } ]); nothing I'm getting. How to fix this.
has answer: http://stackoverflow.com/a/26112575
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41046658
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26179521
has text: Did you try to set z-index: 10000 ?

http://stackoverflow.com/comment/40782330
has text: Where the total price of all the components you have selected totals up in the HTML at the bottom of it all the exact place being How would I make that have a default value of for example £123.45 and then when an option it is selected they will add onto that value. Basically giving the PC a minimum value if all options are set to the value of £0.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26034948
type: AnswerComment

http://stackoverflow.com/a/26074744
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26074402
downvote count: 0
has body: You could do it like this: function rotateReview() { var turn = $('#review_rotator article'); intv = setInterval(function() { var next = ($('#review_rotator article[style*="display: block"]')).next()[0]; if(next == undefined) next = turn[0]; console.log(next); turn.fadeOut(300); $(next).delay(300).fadeIn(200); }, 1000) } Check it out: http://jsfiddle.net/b53t39u7/
type: Answer

http://stackoverflow.com/a/26128366
score: 2
accepted answer of: http://stackoverflow.com/q/26128246
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40953707
answers question: http://stackoverflow.com/q/26128246
type: Answer
has comment: http://stackoverflow.com/comment/40952677
has comment: http://stackoverflow.com/comment/40953224
has comment: http://stackoverflow.com/comment/40953474
upvote count: 2
has comment: http://stackoverflow.com/comment/40952760
has body: In PHP just echo using json_encode: $array = array(array('user' =&gt; 25)); echo json_encode($array); // [{"user":25}] In Jquery: var data = $.parseJSON(jsonString); // '[{"user":25}]' console.log(data[0].user); // 25

http://stackoverflow.com/comment/64897263
comment on: http://stackoverflow.com/q/26082616
has text: Consider using a proxy server to hide your real API endpoint and secure your server also using HTTPS.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40982469
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26144597
type: AnswerComment
has text: ive tried this. the problem is that the xhr object is of no help to me. { "readyState": 0, "status": 0, "statusText": "error" }

http://stackoverflow.com/comment/40825310
type: Comment
has text: http://jsfiddle.net/45nobcmm/24/ Here's the updated fiddle with borders removed and place for the back and forward images @Arron
comment on: http://stackoverflow.com/a/26058652
score: 0
type: AnswerComment

http://stackoverflow.com/q/26139270
has answer: http://stackoverflow.com/a/26139343
type: AnsweredQuestion
has title: How to keep the dropdown menu selected value after form is submitted?
has answer: http://stackoverflow.com/a/26139502
has comment: http://stackoverflow.com/comment/40971960
tagged with: forms
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26139502
upvote count: 5
has body: I am creating a very simple form with a dropdown menu and a text filed. It shows the errors if the form has empty field during the submission. I want to show the filled values after the form submission if there is any error. It works on text field as I expected. Ex: If fill the name and submit the form without filling the title dropdown menu, it showing the name I typed on the filed during the the error is appeared. But how can I do that for dropdown menu also? Ex: If I select the title drop down menu and submit the form without filling name field, it should show the selected title dropdown value during the the error is appeared. how can I do that? here is my code and it's a wordpress site: <?PHP $errors = array(); if($_POST["submit"]) { $name_title = $_POST["name_title"]; $sender = $_POST["sendername"]; //Check the name title that it is selected or none. if($name_title === none){ //if selected is none, add error to $errors array. $errors['name_title'] = "Please select the title of your name!"; } if(empty($sender)){ //Blank string, add error to $errors array. $errors['sendername'] = "Please enter your name!"; } // sending form if(empty($errors)){ $mail_sent = wp_mail( $to, $subject, $mailBody, $headers ); } } if ($mail_sent) { ?> Request sent. <?php } else { ?> <form id="" name="" action="<?php echo get_permalink(); ?>" method="post"> Title Select Title Mr Mrs Miss Ms <?php if(isset($errors['name_title'])) { echo ''.$errors['name_title'].''; } ?> Name <input type="text" name="sendername" value="<?PHP if(!empty($errors)) { echo $sender;} ?>" /> <?php if(isset($errors['sendername'])) { echo ''.$errors['sendername'].''; } ?> <?php } ?>
tagged with: javascript
score: 4
answer count: 3
has comment: http://stackoverflow.com/comment/40971848
favorite count: 0
has answer: http://stackoverflow.com/a/26140437
tagged with: http://stackoverflow.com/tag/html
tagged with: php
possible better answer: http://stackoverflow.com/a/26139343

http://stackoverflow.com/a/26039710
upvote count: 9
has comment: http://stackoverflow.com/comment/40791058
score: 9
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26039603
type: Answer
has comment: http://stackoverflow.com/comment/40790716
answers question: http://stackoverflow.com/q/26039603
has body: you can attach a custom click handler to all buttons, and that way you can check which button is clicked before submitting the form: Live Example $("#my-form button").click(function(ev){ ev.preventDefault()// cancel form submission if($(this).attr("value")=="button-one"){ //do button 1 thing } // $("#my-form").submit(); if you want to submit the form });

http://stackoverflow.com/comment/40815740
type: QuestionComment
has text: I guess, it is working as expected, if not, can you point me , what you need?
comment on: http://stackoverflow.com/q/26053627
score: 1
type: Comment

apache
tag name: apache
tags question: http://stackoverflow.com/q/26181081
type: Tag

http://stackoverflow.com/comment/41053293
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26181457
has text: Why do you want to detect it?

http://stackoverflow.com/q/26072718
answer count: 2
tagged with: onchange
has comment: http://stackoverflow.com/comment/40850920
has comment: http://stackoverflow.com/comment/40850857
linked to: http://stackoverflow.com/q/6826707
accepted answer: http://stackoverflow.com/a/26072781
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/9158238
has body: This is my HTML: I've tried this is JSFiddle, on my local PC, pretty much everywhere but for some reason, whenever I type something in the form's text box with the id "ppid" it isn't capitalizing it. What have I done wrong?
has comment: http://stackoverflow.com/comment/40850948
has comment: http://stackoverflow.com/comment/40850829
type: Question
has title: Onchange isn't working but the javascript script is fine
has answer: http://stackoverflow.com/a/26072781
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26072803
has answer: http://stackoverflow.com/a/26072803
score: 0

http://stackoverflow.com/comment/40800863
score: 4
has text: Events happen on client-side, please show the parsed HTML instead of that mess.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26045408

http://stackoverflow.com/q/26069926
answer count: 0
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/64468241
tagged with: javascript
tagged with: jquery
has title: knockout.js custom binding for yes / cancel pattern
score: 0
tagged with: confirm
has body: I wanted a reusable "yes / cancel" option for elements that when clicked send "review-worthy" POSTs, and didn't use an ugly confirm dialog. I searched online to little avail, so I created a custom binding using knockout.js - ko.bindingHandlers.confirm = { init: function (element, valueAccessor, allBindingsAccessor, viewModel) { var $span = $(''); var settings = ko.utils.unwrapObservable(valueAccessor()); $span.appendTo($(element)); $span.text(settings.buttonText); $(element).click(function (evt) { var $target = $(evt.target); //if we're in an anchor tag, prevent questiontext click if ($target.hasClass("_confirm") || $target.find("#yes, #cancel").length > 0) { return true; } $span.hide().html(settings.questionText + ' yes / cancel').show('fast'); var submitFunction = settings.submitFunction; $(this).find("#yes").on('click', function () { //prevent double clicks if event is async if ($(this).data('processing')) { return; } $(this).data('processing', true); if (typeof (submitFunction) === 'function') { //if submitfunction is deferred, double clicks are prevented $.when(submitFunction(ko.dataFor(this), evt)) .then(function () { $span.hide().html(settings.buttonText).show('fast'); $(this).data('processing', false); }); }; }); $(this).find("#cancel").on('click', function () { $span.hide().html(settings.buttonText).show('fast'); }); return true; }); }}; to use: So there it is, for anyone that may have been searching. My question is, is there a better way of implementing a "confirm-dialogless" yes/cancel pattern in ko without intermingling so much jquery? -Thanks kindly!
type: UnansweredQuestion
tagged with: design-patterns
has comment: http://stackoverflow.com/comment/40857250
has comment: http://stackoverflow.com/comment/64226765

http://stackoverflow.com/comment/40898488
type: QuestionComment
has text: yes,exactly what I want is convert everything except input types, like textareas,text fields and .... .everything expect inputs and text areas
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26098728

http://stackoverflow.com/a/31425693
has body: in angular-block-ui.js line 594 inject the $timeout and then use it in t[fnName].apply(t, args) just like below: blkUI.factory('blockUIUtils', function($timeout) { var $ = angular.element; var utils = { buildRegExp: function(pattern) { var match = pattern.match(/^\/(.*)\/([gim]*)$/), regExp; if(match) { regExp = new RegExp(match[1], match[2]); } else { throw Error('Incorrect regular expression format: ' + pattern); } return regExp; }, forEachFn: function(arr, fnName, args) { var i = arr.length; while(i--) { var t = arr[i]; $timeout(function(){ t[fnName].apply(t, args); }); } }
type: Answer
answers question: http://stackoverflow.com/q/26175648
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/comment/41045109
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26178675
has text: Since I am new to this field, so don't idea for different possible way to mesh with database.

http://stackoverflow.com/q/26044919
has answer: http://stackoverflow.com/a/26044991
tagged with: onpaste
answer count: 2
has answer: http://stackoverflow.com/a/26045194
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26044991
possible better answer: http://stackoverflow.com/a/26045194
tagged with: onchange
has title: Javascript Jquery on one of the multiple input fields changed
upvote count: 2
tagged with: onkeyup
has comment: http://stackoverflow.com/comment/40799941
type: Question
score: 2
type: AnsweredQuestion
has body: Lets say I have multiple input fields like distance, fuelConsumption, pricePerGallon and I need to calculate total price. But I want to calculate as the user types. So the total price need to be recalculated if any of those inputs changed. To get the single value of the field I use: $("#form_distance").on('change paste keyup input', function() { var distance= $(this).val(); }); $("#form_fuelConsumption").on('change paste keyup input', function() { var fuelConsumption= $(this).val(); }); and so on but how do I check not the single field but multiple fields?

http://stackoverflow.com/comment/40844989
has text: Ah. I think your understanding of the question is wrong. He wants to insert the sub_array into the array. Not the contents of sub_array. If you feel that your interpretation is correct please ask the OP to clarify.
comment on: http://stackoverflow.com/a/26069025
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40999538
has text: @JonathanKuhn where to ad that code
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26147451

http://stackoverflow.com/q/26185567
has comment: http://stackoverflow.com/comment/41058415
favorite count: 0
has answer: http://stackoverflow.com/a/26185624
type: UnansweredQuestion
tagged with: facebook
downvote count: 1
score: -1
has body: Why does this code run automatically when the page loads? I do not see any self invoking functions. function fbAsyncInit() { FB.init({ appId: '', xfbml: true, version: 'v2.1' }); FB.login(function() { FB.api('/me/feed', 'post', { message: 'This is a test message.' }); }, { scope: 'publish_actions' }); }; (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'));
has comment: http://stackoverflow.com/comment/41058515
type: Question
upvote count: 0
answer count: 1
has title: Why does this Javascript code run automatically?
tagged with: javascript

http://stackoverflow.com/q/26115906
has title: D3 How to only visualize visible nodes
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40931413
score: 2
has comment: http://stackoverflow.com/comment/40953807
answer count: 0
upvote count: 2
tagged with: d3.js
type: Question
has comment: http://stackoverflow.com/comment/40947897
has body: Let's say I make a force layout graph, however the graph has hundreds of nodes which make the visualization slow. Let's say I want to zoom in on a part of the graph. Does D3 not draw the visible parts of the graph? How do I basically only do the calculations for part of the graph that is visible while caching the nearby nodes so that if someone pans on the visualization, the nearby nodes would be generated faster. Thanks for the help.
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/40867116
type: AnswerComment
has text: @Jiang that's why I was curious about the full SQL if its a numeric array the single quotes aren't even needed a simple (1,2) is all that is needed.
type: Comment
comment on: http://stackoverflow.com/a/26081372
score: 0

http://stackoverflow.com/a/26194683
score: 0
has comment: http://stackoverflow.com/comment/41075162
has comment: http://stackoverflow.com/comment/41075208
type: Answer
answers question: http://stackoverflow.com/q/26194516
has comment: http://stackoverflow.com/comment/41075549
has comment: http://stackoverflow.com/comment/41076805
has body: Abuse of HTML element id is not a good habit (but it doesn't harm). You can use this inside event handler to identify which element has triggered the event. To find the element inside, jQuery provides children method. So here's my soluton. In your template: {job_title} {pubdate} {job_descr} In your javascript: $('#vacancies').on('click', 'a', function(event) { // var num = $(this).attr('data-id'); // {num} in template, but it seems useless in this case var $desc = $(this).children('.description'), $icon = $(this).children('.change-icon'); // you can use children to locate children elements, no need to assign id $desc.toggle(); // toggle visibility if ($desc.is(':visible')) { $icon.removeClass('fa-plus').addClass('fa-minus'); } else { $icon.removeClass('fa-minus').addClass('fa-plus'); } /* or simply use toggleClass $icon.toggleClass('fa-minus').toggleClass('fa-plus'); */ event.preventDefault(); });
has comment: http://stackoverflow.com/comment/41082208

http://stackoverflow.com/comment/40936209
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26119328
has text: @techy I need this will work http://jsfiddle.net/7e2vf763/ user can pick any year but still in range 01/09 and 01/12

http://stackoverflow.com/q/26034264
type: AnsweredQuestion
tagged with: object
has answer: http://stackoverflow.com/a/26034331
type: Question
tagged with: arrays
tagged with: javascript
has title: Constructing of an array with objects
tagged with: arraylist
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40780264
has comment: http://stackoverflow.com/comment/40780261
has answer: http://stackoverflow.com/a/26034992
accepted answer: http://stackoverflow.com/a/26034331
linked to: http://stackoverflow.com/q/2141520
possible better answer: http://stackoverflow.com/a/26034992
has comment: http://stackoverflow.com/comment/40780177
has body: I'd like to make an array how this: var varOne, varTwo, varThree; // (If vars are == null don't insert on array) var array = []; array = [ {"ONE": varOne}, {"TWO": varTwo}, {"THREE": varThree} ]; The inputs to the array I'd like to do only when varOne, varTwo and varThree are other than null Best regards

http://stackoverflow.com/comment/40800576
has text: @pjmorse Yep, I read that but I thought I could use flash.now to display it before the redirect. Not the case apparently.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26043862

http://stackoverflow.com/q/26154596
has comment: http://stackoverflow.com/comment/41000747
has title: how to only validate string length if checkbox is checked in c#
type: Question
has comment: http://stackoverflow.com/comment/41000547
tagged with: c#
tagged with: data-annotations
tagged with: asp.net-mvc
tagged with: javascript
has comment: http://stackoverflow.com/comment/41001075
has answer: http://stackoverflow.com/a/26154875
has comment: http://stackoverflow.com/comment/41000540
score: 0
tagged with: validation
answer count: 1
has comment: http://stackoverflow.com/comment/41000601
has comment: http://stackoverflow.com/comment/41000633
has comment: http://stackoverflow.com/comment/41000653
type: UnansweredQuestion
has body: on my system, users have the option to "upload a doc file", "write one now" or "dont use the doc file". I would like to validate a strng minimum using data annotations to validate the text area of "write one now", however the validation can only be triggered if "write one now" is checked. Can this be achieved using data annotations or only with javascript?
has comment: http://stackoverflow.com/comment/41000624
has comment: http://stackoverflow.com/comment/41000652
has comment: http://stackoverflow.com/comment/41001015

http://stackoverflow.com/q/26114707
tagged with: javascript
tagged with: node.js
possible better answer: http://stackoverflow.com/a/26246998
favorite count: 0
has title: Why Node.js function doesn't return JSDom serializeDocument result?
has answer: http://stackoverflow.com/a/26246998
tagged with: php
has answer: http://stackoverflow.com/a/26196611
downvote count: 1
type: AnsweredQuestion
score: 2
upvote count: 3
accepted answer: http://stackoverflow.com/a/26196611
tagged with: dnode
type: Question
answer count: 2
has body: I have PHP script which acts as a DNode client. Then I have Node.js Dnode server which evaluates code which receives from PHP client and it returns DOM as HTML. However, Node.js acts strangely to me (beeing a Node.js newbie). It doesn't return anything, even though the returning string is not empty. My code is below: PHP client code using DNode-PHP library: &lt;?php require(__DIR__.'/../../vendor/autoload.php'); $loop = new React\EventLoop\StreamSelectLoop(); $dnode = new DNode\DNode($loop); $dnode-&gt;connect(7070, function($remote, $connection) { $js = 'var a = document.createElement("A");'; $js.= 'document.getElementsByTagName("body")[0].appendChild(a);' $remote-&gt;zing($js, function($n) use ($connection) { print_r($n); $connection-&gt;end(); }); }); $loop-&gt;run(); ?&gt; Node.js server code: var dnode = require('dnode'); var jsdom = require("jsdom"); var server = dnode({ zing: function (n, cb) { var document = jsdom.jsdom('&lt;!DOCTYPE html&gt;'); var window = jsdom.parentWindow; eval(n); var html = jsdom.serializeDocument(document); // console.log(html); cb(html); } }); server.listen(7070); Console.log() clearly outputs &lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;a&gt;&lt;/a&gt;&lt;/body&gt;&lt;/html&gt; what is expected result. But it never gets to PHP client. But what is strange, if I change line cb(html); to cb('test');, PHP outputs "test". So the problem must be somewhere on the Node.js side. But I have no idea where to look for. Thanks in advance for any hints.

http://stackoverflow.com/q/26146821
has title: angularjs get a object from ng-repeat to a controller in a different page
has comment: http://stackoverflow.com/comment/40986649
has answer: http://stackoverflow.com/a/26151037
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40992117
has body: I have tried a lot of ways, services , $rootScope, broadcast... I just want to get an instance of the object in the ng-repeat that the user choose, and list its attributes into a new html page dynamically. Can someone show me the best solution for this case? Everything I've tried so far has gone wrong. I have two controllers one for the page 1 and another one for page 2 and a service that contains my list. app.service('selectedPost', function() { var list = { ... }; var post; return { getPost: function() { return post; }, setPost: function(p) { post = p; } }); app.controller('page2Ctrl', function($scope, selectedPost, $rootScope) { //tried: $scope.obj = selectedPost.getPost(); //tried $scope.obj = {p : selectedPost.getPost() }; //tried: $scope.obj = $rootScope.pobj; }); app.controller('pageCtrl', function($scope, selectedPost, $rootScope) { //I call this method in my page1 html and pass the ng-repeat object as parameter: //tried: $scope.selectPost = function(post) { selectedPost.setPost(post); }; //tried: $scope.selectPost = function(post) { $rootScope.pobj = post; }; $scope.postList = selectedPost.getPostList(); $scope.totalItems = $scope.postList.length; $scope.itemsPerPage = 6; $scope.currentPage = 1; $scope.maxSize = 5; $scope.setPage = function (pageNo) { $scope.currentPage = pageNo; }; $scope.pageChanged = function() { console.log('Page changed to: ' + $scope.currentPage); }; $scope.pageCount = function () { return Math.ceil($scope.postList.length / $scope.itemsPerPage); }; $scope.filter = function(items, groupedBy) { if (items) { var finalItems = [], thisGroup; for (var i = 0; i &lt; items.length; i++) { if (!thisGroup) { thisGroup = []; } thisGroup.push(items[i]); if (((i+1) % groupedBy) === 0) { finalItems.push(thisGroup); thisGroup = null; } } if (thisGroup) { finalItems.push(thisGroup); } return finalItems; } }; $scope.$watch('currentPage + itemsPerPage', function() { var begin = (($scope.currentPage - 1) * $scope.itemsPerPage), end = begin + $scope.items…
type: Question
accepted answer: http://stackoverflow.com/a/26151037
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40992242
favorite count: 0
has comment: http://stackoverflow.com/comment/40986860
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40986825
upvote count: 2

http://stackoverflow.com/q/26069451
accepted answer: http://stackoverflow.com/a/26069510
possible better answer: http://stackoverflow.com/a/26069502
type: Question
has title: Javascript while loop weird behavior with dates
has body: I am currently getting weird behavior from the following while loop in javascript. var i = 0; var endDate = new Date(); var startDate = new Date(); startDate.setDate(startDate.getDate() - 6); while (start &lt;= end){ alert (start.getDate()); start.setDate(start.getDate() + i); i++; } The output I would expect (assuming today is Sept. 26) would be : 20 21 22 23 24 25 26 However I get the following output 20 20 21 23 26 I don't think I am handling the scope of the startDate variable correctly but I am not sure how to fix this. Any help is greatly appreciated
has comment: http://stackoverflow.com/comment/40845239
tagged with: javascript
tagged with: date
has comment: http://stackoverflow.com/comment/40845209
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/40845184
has answer: http://stackoverflow.com/a/26069502
has answer: http://stackoverflow.com/a/26069500
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26069510

http://stackoverflow.com/q/26180640
has comment: http://stackoverflow.com/comment/41048814
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has answer: http://stackoverflow.com/a/26180689
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41048865
score: 1
has answer: http://stackoverflow.com/a/26180709
upvote count: 1
has answer: http://stackoverflow.com/a/26180691
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26180727
has body: How to get value from top input to bottom input ? Old code is &lt;span id="lblValue"&gt;&lt;/span&gt; but i try to add value to input type text it's not work &lt;input type="text" id="lblValue" value=""&gt; How can i do ? http://jsfiddle.net/VDd6C/744/ &lt;script&gt; function edValueKeyUp() { var edValue = document.getElementById("edValue"); var s = edValue.value; var lblValue = document.getElementById("lblValue"); lblValue.innerText = "The text box contains: "+s; //var s = $("#edValue").val(); //$("#lblValue").text(s); } &lt;/script&gt;
downvote count: 0
possible better answer: http://stackoverflow.com/a/26180691
favorite count: 0
accepted answer: http://stackoverflow.com/a/26180689
has title: How to get value from top input to bottom input?
has comment: http://stackoverflow.com/comment/41048836

http://stackoverflow.com/a/26116573
score: 3
has body: I think the reason is in this row: this.root.successors.forEach(this.minVal); You pass minVal as contextless reference, it will not be called in a context of your Computer instance (this) Here is how you can improve it: var self = this; this.root.successors.forEach(function() { self.minVal.apply(self,arguments); })
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26116464
type: Answer
answers question: http://stackoverflow.com/q/26116464
upvote count: 3

http://stackoverflow.com/a/26187344
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26187124
answers question: http://stackoverflow.com/q/26187124
has body: Follow the steps outlined in the accepted answer to this StackOverflow question. You can then make a request for the resource using for example, the excellent requests library: import requests r = requests.get("http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js") You can then search r.text using regex to find any links you are looking for. If you still need to parse the javascript then the most recent answer to this StackOverflow question recommends slimit once you have the javascript.
type: AcceptedAnswer

http://stackoverflow.com/comment/40933515
comment on: http://stackoverflow.com/a/26115953
has text: you can do it on dialog close on redirected page. as your error message shows and you click on ok or close then format URL on click.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26060706
has comment: http://stackoverflow.com/comment/40828582
has comment: http://stackoverflow.com/comment/40828581
score: 0
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26060784
has body: I have html form with three elements - buttons start and stop and text area. Once start button is pressed, I would like to do multiple ajax requests and once result is received to update the text area, once stop is pressed, processing of ajax requests should be stopped. I tried to do something like below: $(document).ready(function(){ var inProgress = false; $("#stop").click(function() { inProgress = false; }); $("#start").click(function() { inProgress = true; while (inProgress) { $('#textarea').html($('#textarea').val()+sometext+'\n'); $.ajax({url: 'http://example.com'}) .done(function(data, textStatus, jqXHR) { $('#textarea').html($('#textarea').val()+someresult+'\n'); }); } }); But it doesn't work as expected - browser tab hangs. What is wrong with my code?
has answer: http://stackoverflow.com/a/26060865
possible better answer: http://stackoverflow.com/a/26060827
answer count: 3
has answer: http://stackoverflow.com/a/26060827
tagged with: asynchronous
tagged with: ajax
has title: How to do ajax request and html element update in background?
has comment: http://stackoverflow.com/comment/40828673
accepted answer: http://stackoverflow.com/a/26060784
type: AnsweredQuestion

http://stackoverflow.com/comment/41081258
has text: @confile: I am not sure about how can we optimize the image completely on the client side, but you can search for other javascript libraries that may be able to do that.
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26197858

http://stackoverflow.com/comment/41061530
comment on: http://stackoverflow.com/q/26186377
type: QuestionComment
has text: I did disable the restriction but if you want to help you can set it to 128 bit, doesnt matter in that case. Is the standard padding in javascript not AES/CBC/PKCS7 and equals to java AES/CBC/PKCS5 padding?
score: 0
type: Comment

http://stackoverflow.com/a/26064843
has comment: http://stackoverflow.com/comment/40838860
score: 0
has comment: http://stackoverflow.com/comment/40837091
has comment: http://stackoverflow.com/comment/40838895
has comment: http://stackoverflow.com/comment/40837709
has comment: http://stackoverflow.com/comment/40838476
type: Answer
has comment: http://stackoverflow.com/comment/40838273
has comment: http://stackoverflow.com/comment/40839459
answers question: http://stackoverflow.com/q/26064301
has comment: http://stackoverflow.com/comment/40837827
has body: You will find that formatting dates in JavaScript is non-trivial. Consider using a library, such as moment.js, which makes things much easier, and covers edge cases you may not have thought about. moment(readingdatetime).format("MM-DD-YYYY HH:mm")
has comment: http://stackoverflow.com/comment/40838762
has comment: http://stackoverflow.com/comment/40839182

http://stackoverflow.com/comment/40793208
score: 3
comment on: http://stackoverflow.com/q/26041250
has text: `$('#specific-element').length` is useless, as jQuery will not bind anything if there are no matches. No big deal. On other hand you make 2 DOM searches when you go with your second version.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40935055
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26119347
type: Comment
has text: http://stackoverflow.com/a/18278346/609907

http://stackoverflow.com/comment/41059571
type: QuestionComment
comment on: http://stackoverflow.com/q/26186117
has text: a many dozens to hundreds
score: 0
type: Comment

http://stackoverflow.com/q/26188347
type: AnsweredQuestion
has body: I'm lost about jquery selectors and events. I'm trying to add a click behavior on a bootstrap table-hover, however the .click isn't triggered and i don't know why. I've tried : $( ".table-hover tbody tr" ).click(function() { alert("clicked"); }); and : $( ".table-hover tbody" ).on( "click", "tr", function() { alert("clicked"); }); as found around the web, but none of these triggered the click. I tried to test the selector with a simple img tag : $( "img" ).click(function() { alert("clicked"); }); This one works ... only on the first image of the document, but the other ones come from angularjs behaviors, like ng-repeat and ng-model after querying an api, i'm sure that's related but i don't know what's the problem for jquery since the .on() method should do the trick. I've read about the .on() which should add event even for elements added after the document is loaded, but no solution is working for me so far.
type: Question
linked to: http://stackoverflow.com/q/14201753
has answer: http://stackoverflow.com/a/26190647
tagged with: javascript
has comment: http://stackoverflow.com/comment/41064926
has title: jquery event not triggered with angularjs
tagged with: click
score: 0
possible better answer: http://stackoverflow.com/a/26188464
answer count: 2
has answer: http://stackoverflow.com/a/26188464
has comment: http://stackoverflow.com/comment/41063879
tagged with: jquery
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26190647
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/40925957
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26113971
has text: You're probably right about `batch`, but I can't declare it later because it too has event listeners that get attached to it. I'll post the code on github gist.

http://stackoverflow.com/q/26090389
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/26109281
tagged with: transition
has comment: http://stackoverflow.com/comment/40917949
type: Question
has body: Here is some example code and a fiddle of it: var w = 400; var h = 400; var r = 20; var factor = 5; var svg = d3.select("body").append("svg") .attr("width", w) .attr("height", h) .append("g") .attr("transform", "translate(" + w/2 + "," + h/2 + ")"); svg.append("circle") .attr("cx", 0) .attr("cy", 0) .attr("r", r) .style("fill", "black"); svg.append("circle") .attr("cx", 150) .attr("cy", 150) .attr("r", r) .style("fill", "red"); svg.selectAll("circle") .transition() .duration(2000) .attr("transform", "scale(" + 1/factor +")") .attr("r", r*factor); http://jsfiddle.net/o1wzfas7/2/ In the example, I am scaling two circles down by a factor of 5 (which also scales their positions and thus moves them "closer" to each other) and simultaneously scaling up the circles' radii by a factor of 5. The idea is that they'll appear to move closer to each other without changing size (as if I was changing their "cx" and "cy" attributes instead), but for some reason the scale transition and radius transition seem to go at different rates, so you see the circles get larger and then settle back to the initial size. Does anybody know how I would do this using scale and radius transitions, but having the two cancel each other out so that the circles don't appear to change in size?
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40911373
has comment: http://stackoverflow.com/comment/40911105
accepted answer: http://stackoverflow.com/a/26109281
has comment: http://stackoverflow.com/comment/40911366
answer count: 1
has title: Transition circle radius in d3 to cancel scaling transition--works but timing is off
favorite count: 0
has comment: http://stackoverflow.com/comment/40911089
tagged with: http://stackoverflow.com/tag/svg
upvote count: 2
tagged with: d3.js

http://stackoverflow.com/q/26184630
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26184733
possible better answer: http://stackoverflow.com/a/26191541
has comment: http://stackoverflow.com/comment/41056638
has answer: http://stackoverflow.com/a/26191541
answer count: 3
downvote count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26184733
has title: How to load website HTML using jquery
favorite count: 0
tagged with: css
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/3076414
type: Question
has answer: http://stackoverflow.com/a/26192741
score: 5
has body: How can I load some website in my java-script so that I can parse it? I want to get Html of e.g. www.google.com and I want to select all the tags in it using jquery.
upvote count: 6

http://stackoverflow.com/comment/41052881
has text: return a promise from mood, then do the alert when mood resolves the promise with the users choice, if you are using jquery then you can look into examples that use the deferred object or articles like this explain it quite well http://dailyjs.com/2014/02/20/promises-in-detail/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26181989

http://stackoverflow.com/q/26102800
has comment: http://stackoverflow.com/comment/40906108
tagged with: javascript
has answer: http://stackoverflow.com/a/26103354
accepted answer: http://stackoverflow.com/a/26103354
duplicate of: http://stackoverflow.com/q/122102
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40906405
has title: Save a json object but not for reference
has comment: http://stackoverflow.com/comment/40905853
has comment: http://stackoverflow.com/comment/40905960
linked to: http://stackoverflow.com/q/18829099
has comment: http://stackoverflow.com/comment/40905805
has comment: http://stackoverflow.com/comment/40906139
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40907175
downvote count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40906063
linked to: http://stackoverflow.com/q/122102
has comment: http://stackoverflow.com/comment/40906156
has comment: http://stackoverflow.com/comment/40906157
has body: here is my problem, reported in a way much more simplified this is the json (look at the json here if you want) {"resource":[{"id":"1408694994","obj":[{"id":"1","action":[{"name":"ON","id":"301"},{"name":"OFF","id":"302"}]},{"id":"2","action":[{"name":"ON","id":"303"},{"name":"OFF","id":"304"}]}]},{"id":"1408694995","obj":[{"id":"3","action":[{"name":"ON","id":"305"},{"name":"OFF","id":"306"}]},{"id":"4","action":[{"name":"ON","id":"307"},{"name":"OFF","id":"308"}]}]}]} Given an id (in this case we say id = 3), I must save the item with that ID. And i save in a new object (newobj) the object with that ID, but changing the array ACTION in an OBJ with the only action ON Example &lt;script&gt; var tt = '{"resource":[{"id":"1408694994","obj":[{"id":"1","action":[{"name":"ON","id":"301"},{"name":"OFF","id":"302"}]},{"id":"2","action":[{"name":"ON","id":"303"},{"name":"OFF","id":"304"}]}]},{"id":"1408694995","obj":[{"id":"3","action":[{"name":"ON","id":"305"},{"name":"OFF","id":"306"}]},{"id":"4","action":[{"name":"ON","id":"307"},{"name":"OFF","id":"308"}]}]}]}'; var myjson = JSON.parse(tt); var search = 3; console.log(myjson.resource[1].obj[0]); for(var i = 0 ; i &lt; myjson.resource.length; i++){ for(j = 0 ; j &lt; myjson.resource[i].obj.length; j++){ if(parseInt(myjson.resource[i].obj[j].id) == search){ var newobj = myjson.resource[i].obj[j]; var obj_action = newobj.action; for(var k = 0 ; k &lt; obj_action.length ; k++){ if(obj_action[k].name == "ON"){ newobj.action = obj_action[k]; } } } } } console.log(myjson.resource[1].obj[0]); &lt;/script&gt; I can easily save in the variable newobj the object that i want. But why the initial json is changed ??? UPDATE ok, I understand that it is clearly problem of how I save the obj in newobj variable. i dont' save the object, but only the reference at the object in json . how can I save it in the variable newobj ? (not by reference?)
type: Question
upvote count: 1

http://stackoverflow.com/a/26194283
score: 0
answers question: http://stackoverflow.com/q/26181912
type: Answer
has body: You can use a function like debounce from lodash or underscore library (http://lodash.com/docs#debounce), that can improve your performance a bit.

http://stackoverflow.com/comment/59222939
type: Comment
has text: Thanks for the answer Oleksander, but Grunt actually allows the 'verbose' flag to be passed in options. That is the purpose of the options property, to pass command line options via config, which is why my first example works.
comment on: http://stackoverflow.com/a/35775392
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40836783
type: QuestionComment
has text: Chrome version is :37.0.2062.124 and Explorer is v11
comment on: http://stackoverflow.com/q/26064806
score: 0
type: Comment

http://stackoverflow.com/comment/40904704
has text: you tagged the question **tinymce-4**
comment on: http://stackoverflow.com/a/26101452
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26075730
tagged with: jquery
has title: zClip - Copy only visible text
has body: Hey hopefully this is an easy solution: On click of the button I want to be able to copy only the text that is visible within the id="description". what am I doing wrong? HTML: Test test2 Click Me! jQuery:
type: Question
type: AnsweredQuestion
tagged with: zclip
tagged with: javascript
has answer: http://stackoverflow.com/a/26086071
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26086071

http://stackoverflow.com/q/26039154
has title: javascript create object using multiple variables for multiple property name
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26039270
accepted answer: http://stackoverflow.com/a/26039270
downvote count: 1
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40789005
score: -1
type: Question
has body: how can i create object using multiple variables for multiple property name. I am trying to create multiple versions of an object which has an init function. I have tried using the javascript 'new' function but in this case that does not work and the console notifies me this is because it is not a function. See the code for a clearer description of what I am trying to do. for (a=1;a&lt;=5;a++) { json.name={}; json.name[a]={}; for (b=1;b&lt;11;b++) { json.name[a][b]={}; json.name[a][b]=$("input#c"+b+"r"+a).val(); } //json.name.1.3 = the value from the input
upvote count: 0
tagged with: javascript

http://stackoverflow.com/q/26137532
has body: I'm animating a block of html that fades in (opacity) and moves slightly from the left (margin-left)... $('.latest-stats').delay(1000).animate({ opacity: 1, marginLeft: '55px' }, 1000, function () { ...code in here } .latest-stats { position:absolute; top:250px; opacity:0; margin-left:40px; } There is a delay and I need to perform some functions within that block of HTML after the transiiton has finished. Can this be done in css, maybe by adding a class that has the transitions upon it?
has answer: http://stackoverflow.com/a/26145055
type: Question
tagged with: javascript
score: 0
answer count: 2
has title: Using css3 transitions instead of jQuery animate
tagged with: jquery
has answer: http://stackoverflow.com/a/26137669
type: UnansweredQuestion
tagged with: css

http://stackoverflow.com/q/26105607
tagged with: uiwebview
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/pdf
tagged with: objective-c
has title: iOS 8 Application crashes when opening PDF file in UIWebView
score: 2
downvote count: 0
answer count: 0
type: Question
tagged with: ios8
has comment: http://stackoverflow.com/comment/40911850
has body: I have a Javascript application that runs into a UIWebView on iOS. This application sends commands to the native application (Objective-C) to control its behavior like changing the color of the status bar, or open another UIWebView to load an external web page or file. Since the release of iOS 8, I’m receiving a huge quantity of crash reports that are all generated from the same error. I was able to reproduce the crash with an iPhone 5S on iOS 8. When I open and close several external UIWebView with a link to a PDF file, the application crashes after 4-5 times. This is the crashing thread in the crash report: Exception Type: EXC_CRASH (SIGSEGV) Exception Codes: 0x0000000000000000, 0x0000000000000000 Triggered by Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libsystem_kernel.dylib 0x370d8ba8 __psynch_mutexwait + 24 1 libsystem_pthread.dylib 0x371541fa _pthread_mutex_lock + 274 2 WebCore 0x346407cc _WebTryThreadLock(bool) + 40 3 WebCore 0x34640fe8 WebThreadLock + 76 4 UIKit 0x2d4e1be0 -[UIWebBrowserView _webTouchEventsRecognized:] + 520 5 UIKit 0x2d36b556 -[UIWebTouchEventsGestureRecognizer _processTouches:withEvent:type:] + 294 6 UIKit 0x2d36b6c6 -[UIWebTouchEventsGestureRecognizer touchesBegan:withEvent:] + 146 7 UIKit 0x2d013538 -[UIWindow _sendGesturesForEvent:] + 408 8 UIKit 0x2d012f88 -[UIWindow sendEvent:] + 520 9 UIKit 0x2cfe9a04 -[UIApplication sendEvent:] + 192 10 UIKit 0x2d25bade _UIApplicationHandleEventFromQueueEvent + 13842 11 UIKit 0x2cfe849c _UIApplicationHandleEventQueue + 1300 12 CoreFoundation 0x299b257c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12 13 CoreFoundation 0x299b198a __CFRunLoopDoSources0 + 214 14 CoreFoundation 0x299afff0 __CFRunLoopRun + 768 15 CoreFoundation 0x298fe60c CFRunLoopRunSpecific + 472 16 CoreFoundation 0x298fe41e CFRunLoopRunInMode + 102 17 GraphicsServices 0x30e580a4 GSEventRunModal + 132 18 UIKit 0x2d048480 UIApplicationMain + 1436 19 MyApp 0x000c5472 main (main.m:16) …
upvote count: 2
has comment: http://stackoverflow.com/comment/40913355
tagged with: javascript

http://stackoverflow.com/a/26066726
downvote count: 0
answers question: http://stackoverflow.com/q/26066671
score: 4
has body: Does the file have a new-line character at the end? If so the last array item will be an empty string
type: Answer
upvote count: 4

http://stackoverflow.com/comment/40946647
comment on: http://stackoverflow.com/a/26099891
type: Comment
has text: I added the url $.connection.hub.url , when i call $.connection.hub.start().done(){} not working and in console $.connection.hub.state always is 0.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26106015
has comment: http://stackoverflow.com/comment/40925525
answers question: http://stackoverflow.com/q/26105917
score: 0
has body: Try this <%@ page import="java.io.*,java.util.*,java.sql.*"%> <%@ page import="javax.servlet.http.*,javax.servlet.*" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%> Inventory test First name: submit p1
type: Answer

http://stackoverflow.com/q/26085826
tagged with: jquery-mobile
tagged with: javascript
tagged with: twitter
answer count: 1
has answer: http://stackoverflow.com/a/26086242
has title: twitter integration jquery mobile application
has body: I am developing application using jQuery Mobile and Phonegap and this application i want to integrate twitter. i try this. JAVASCRIPT IS: function listTweets(data){ console.log(data); var output = ' '; $.each(data, function(key, val){ var text = data[key].text; var thumbnail = data[key].user.profile_image_url; var name = data[key].user.name; output += ' '; output += ' '; output += ' ' +text+ ' '; output += ' '; }); output += ' '; $('#tweetlist').html(output); } html is: it give me blank screen and when I inspect element it give me: Consider using 'dppx' units, as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: only screen and (-webkit-min-device-pixel-ratio: 1.5), not all, only screen and (min-resolution: 240dpi) Any suggestion Thanks in advanced.
tagged with: cordova
type: UnansweredQuestion
score: 0
type: Question

http://stackoverflow.com/a/26038316
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26038228
has body: You can change of any elements style from any file, But the standard practice is to add class instead of changing style of an element. To add class you can use .addClass('new-class') jQuery function. And put all your style for new class in separate CSS file. And if you just want to add style anyway without caring about standard, then you can use .css jquery function. $(".number").css({ 'attribute1': value, 'attribute2': value, });
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26038228
type: Answer
score: 2

http://stackoverflow.com/a/26130874
score: 1
downvote count: 0
type: Answer
has body: You can use jQuery lbs slider for that! Put anything inside div like photo text video, It will work! See link Below See jsfiddle here Html &lt;div class=&quot;slider-wrap&quot;&gt; &lt;div class=&quot;slider&quot;&gt; &lt;ul&gt; &lt;li&gt; &lt;div class=&quot;black&quot;&gt; &lt;img src=&quot;http://placekitten.com/g/200/200&quot;&gt;&lt;/div&gt; &lt;/li&gt; &lt;li&gt; &lt;span class=&quot;red&quot;&gt;text 1&lt;/span&gt; &lt;span class=&quot;blue&quot;&gt;text 2&lt;/span&gt; &lt;span class=&quot;blue&quot;&gt;&lt;img src=&quot;http://placekitten.com/g/200/300&quot; width=&quot;100&quot;&gt;&lt;/span&gt; &lt;span class=&quot;blue&quot;&gt;&lt;/span&gt; &lt;/li&gt; &lt;li&gt; &lt;span class=&quot;yellow&quot; style=&quot;width:300px;height:200px;&quot;&gt; &lt;iframe width=&quot;300&quot; height=&quot;200&quot; src=&quot;//www.youtube.com/embed/z0DCGnm429Y?list=UUDw2o0zdKA_TS3BsCgbyH4A&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt; &lt;/span&gt; &lt;/li&gt; &lt;li&gt; &lt;span class=&quot;blue&quot;&gt;&lt;/span&gt; &lt;/li&gt; &lt;li&gt; &lt;span class=&quot;green&quot;&gt;&lt;/span&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;a href=&quot;#&quot; class=&quot;slider-arrow sa-left&quot;&gt;&amp;lt;&lt;/a&gt; &lt;a href=&quot;#&quot; class=&quot;slider-arrow sa-right&quot;&gt;&amp;gt;&lt;/a&gt; &lt;/div&gt; css .slider-wrap {position: relative;margin: 50px auto;} .slider { position: relative; margin: auto; } ul { margin: 0; padding:0; } ul li { list-style: none; text-align: center; } ul li span { display: inline-block; vertical-align: middle; width: 100px; height: 100px; background: black; margin:5px; } .slider-arrow { position: absolute; top: 40px; width: 20px; height: 20px; background: black; color: #fff; text-align: center; text-decoration: none; border-radius: 50%; } .sa-left {left: 10px;} .sa-right {right: 10px;} .black {} .red {background: red;} .green {background: green;} .blue {background: blue;} .yellow {background: yellow;} js jQuery('.sl…
upvote count: 1
answers question: http://stackoverflow.com/q/26130551

http://stackoverflow.com/comment/40790169
type: Comment
comment on: http://stackoverflow.com/a/26038966
has text: I wanted to shuffle whole group of picture in priority to have 4 tiles always visible but in the different place when page is refreshed. When I did not separate those tiles from the whole group (like you did) they were disappearing. Now, they are not and the rest of the images is shuffling also :)
score: 0
type: AnswerComment

http://stackoverflow.com/comment/84442658
has text: I didn't do double the memory and need to resize? How do I do this?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/32444643

http://stackoverflow.com/a/26116645
downvote count: 0
answers question: http://stackoverflow.com/q/26116464
upvote count: 2
has body: The simplest and quickest solution is just to change this.root.successors.forEach(this.minVal); to this.root.successors.forEach(this.minVal.bind(this)) This solves the problem in the same as the other answers, but in a way some might consider more compact. Or, you can pass a "this" to the forEach function as the second argument, a somewhat under-utilized feature of forEach: this.root.successors.forEach(this.minVal, this) This feature is also available on other Array prototype methods that take functions, including map, filter, some, every (but not reduce and reduceRight). ES6 arrow functions handle this differently, so you can do this.root.successors(forEach(e =&gt; this.minVal(e)));
type: Answer
score: 2

http://stackoverflow.com/comment/40991935
comment on: http://stackoverflow.com/a/26149686
has text: not sure why "name=password" was there. Worked! Thanks.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26104827
downvote count: 0
type: Answer
has body: Short answer: definitely do it the first way. Event delegation is way more performant, but requires extra conditionals in your code, so it's basically a complexity versus performance tradeoff. Longer Answer: For a small number of elements, adding individual event handlers works fine. However, as you add more and more event handlers, the browser's performance begins to degrade. The reason is that listening for events is memory intensive. However, in the DOM, events "bubble up" from the most specific target to the most general triggering any event handlers along the way. Here's an example: If you clicked on the tag, that click event would fire any event handlers in this order: img a div body html document object Event delegation is the technique of listening to a parent (say ) for a bunch of event handlers instead of the specific element you care about (say ). The event object will have a target property which points to the specific dom element from which the event originated (in this case ). Your code for event delegation might look something like this: $(document).ready(function(){ $(' ').on('click', function(e) { // check if e.target is an img tag // do whatever in response to the image being clicked }); }); For more information checkout Dave Walsh's blog post on Event Delegation or duckduckgo "event delegation". NOTE ON CODE SAMPLE IN OP: In the first example, target.hasClass('editable') means that the specific thing clicked on must have the class editable for the if block to execute. As one of the commenters pointed out, that's probably not what you want. You might want to try something along these lines instead: $(document).on('click', function(e) { if ($(e.target).parents(".editable").length) { // Do whatever } }); Let's break that down a bit: $(e.target) - anything that on the page that was clicked converted to jQuery .parents(".editable") - find all the ancestors of the element clicked, then filter to only include ones with the class "editable" .length - this…
answers question: http://stackoverflow.com/q/26104525
upvote count: 12
accepted answer of: http://stackoverflow.com/q/26104525
score: 12
type: AcceptedAnswer

http://stackoverflow.com/a/26042491
upvote count: 1
has comment: http://stackoverflow.com/comment/40836288
answers question: http://stackoverflow.com/q/26041995
score: 1
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40801416
has body: It looks like you might be referring to Ramsey or The Financial Fitness Pack from life leadership. I see what you are trying to do, but do you want to pay off the lowest amount first like these courses suggest or the highest interest rate first? There are psychological reasons for paying the lowest one off first and then applying that payment to the next one. Put all the minimum payments in your spreadsheet for each row along with the total debt and interest. example total amount extra to apply: 25 total Interest Jan Feb Mar Apr May 1253 17.3% Visa card: 25 25 25 25 25 4700 22.1% Master : 35 35 35 35 35 ... Next you will need to add a row to update the amount. calculations are simplified, you can use these or get more exact calculations. example jan feb mar apr Visa card : min min min min paid : *A* *A* *A* *A* int : *B* *B* *B* *B* new total : *C* *C* *C* *C* Master card: min min min min paid : *D* *D* *D* *D* int : *B* *B* *B* *B* new total : *C* *C* *C* *C* ... *A* formula = min payment + extra payment *B* formula = (interest/12)*total *C* formula = total - paid + *A* after the first column use 'new total' instead of total from above in all formulas now you can add an if statement to each of the paid boxes. the if statement should be something like if new total &lt; min then pay new total when new total = 0 payment will be 0 for the every debt after the first one you change the formula for A to be something like *D* formula = min + (extra payment - *A* from above) the min is whatever the minimum payment is for that debt.

http://stackoverflow.com/comment/41005953
has text: The first one should be good for you. It gets completely cleared because you need to initialise flexslider again. Can you pastbin your code plz ?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26145260

http://stackoverflow.com/q/26108481
has title: Hide Angular Bootstrap modal instead of close
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40918902
has comment: http://stackoverflow.com/comment/40918195
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40918917
favorite count: 0
linked to: http://stackoverflow.com/q/24653888
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
has body: I am using Angular Bootstrap Modal to open a bunch of modals including video player inside http://angular-ui.github.io/bootstrap/#/modal I want to be able to keep where the video is at even if the modal is closed. It's just so next time I open the same modal again, I can see where I left off in the video. In order to do that, I need to do: Create each modal a separate instance Instead of close(), I need to hide() the modal instead. Therefore the DOMs are still in there and the video player don't get re-created What's the elegant way to do this as the Bootstrap modal has no hide feature. Should I just use jQuery to show/hide the .modal-backdrop and .modal classes?
tagged with: css
score: 2
has comment: http://stackoverflow.com/comment/40917413
upvote count: 2
has answer: http://stackoverflow.com/a/26109561

http://stackoverflow.com/q/26127540
has title: Loading a Split GIF in Sync - playing multiple GIFs in sync
tagged with: animated-gif
tagged with: synchronization
answer count: 0
upvote count: 2
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/6878030
score: 2
tagged with: http://stackoverflow.com/tag/gif
type: Question
linked to: http://stackoverflow.com/q/12861343
tagged with: split
downvote count: 0
tagged with: javascript
favorite count: 0
has body: Please note that I have an extremely basic understanding of code. I have split a large vertical gif (1000px x 8000px) into 8 1000px x 1000px pieces - I need to seamlessly stack them so that they all play in sync with one another - resulting in one giant animated gif. from searching I have read that preloading the gifs should do the trick but what I have working for me now plays out of sync - I have done many tests changing the size and frame rate of my gif files without success. I appreciate any help or advice, see below for the code I'm working with. They all seem to be preloading and displaying the images, however they remain out of sync. and this is the script: var img = new Image(); var imgCount = 0; img.onload = loadCount; img.src="pinkPlastic_SuperSculpture_aA.gif" var img2 = new Image(); img2.onload = loadCount; img2.src="pinkPlastic_SuperSculpture_aB.gif" var img3 = new Image(); img3.onload = loadCount; img3.src="pinkPlastic_SuperSculpture_aC.gif" var img4 = new Image(); img4.onload = loadCount; img4.src="pinkPlastic_SuperSculpture_aD.gif" var img5 = new Image(); img5.onload = loadCount; img5.src="pinkPlastic_SuperSculpture_aE.gif" var img6 = new Image(); img6.onload = loadCount; img6.src="pinkPlastic_SuperSculpture_aF.gif" var img7 = new Image(); img7.onload = loadCount; img7.src="pinkPlastic_SuperSculpture_aG.gif" var img8 = new Image(); img8.onload = loadCount; img8.src="pinkPlastic_SuperSculpture_aH.gif" function loadCount() { imgCount++; if(imgCount==8) { var canvas = document.getElementById('canvas'); console.log(img); canvas.appendChild(img); canvas.appendChild(img2); canvas.appendChild(img3); canvas.appendChild(img4); canvas.appendChild(img5); canvas.appendChild(img6); canvas.appendChild(img7); canvas.appendChild(img8); } } loadCount(); I also tried some code that was posted here: Load and display multiple animated gifs at the same time (synchronised) with Javascript // This function will add an array of images to div#images function showImages(image…

http://stackoverflow.com/a/26154364
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41000299
answers question: http://stackoverflow.com/q/26153828
has body: You may try something like this: var tr = $('#tableID tr').not('table table tr').not('tr:has(table)');
type: Answer
has comment: http://stackoverflow.com/comment/41000339
has comment: http://stackoverflow.com/comment/41000395
score: 0
accepted answer of: http://stackoverflow.com/q/26153828

http://stackoverflow.com/q/26165789
score: 0
has title: How to get model updated onkeyup in rivetjs
answer count: 1
tagged with: rivets.js
tagged with: javascript
has answer: http://stackoverflow.com/a/26603936
type: UnansweredQuestion
has body: First of all thanks for RivetJS, I'm using it for flow, is awesome! Question: In AngularJS is usual to get the a binding in an input to update the model onkeyup. In RivetJS the default seems to be updating the model onblur. Is there a way to get it updating the model with each onkeyup event? Thanks
tagged with: data-binding
type: Question

http://stackoverflow.com/comment/40923062
comment on: http://stackoverflow.com/a/26112393
score: 0
type: Comment
type: AnswerComment
has text: @RiggsFolly If it helps them get better insight to write better code sooner than later it'll mean less hassle trying to figure it all out...and then there are all the other people who ask the same question and end up reading this. It may seem like overkill to some people, it may end up saving hundreds of hours for others.

http://stackoverflow.com/comment/40999014
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26153641
has text: Looks like $(event.target).closest("div.item").remove() traverses up the dom and removes your main

http://stackoverflow.com/a/26181468
has body: Why are you using the [/ and /] at the start and ending of the RegEx? Try removing it.
has comment: http://stackoverflow.com/comment/41050874
answers question: http://stackoverflow.com/q/26181365
type: Answer
has comment: http://stackoverflow.com/comment/41052667
has comment: http://stackoverflow.com/comment/41050847
has comment: http://stackoverflow.com/comment/41054160
score: 0

http://stackoverflow.com/a/26052962
has comment: http://stackoverflow.com/comment/40814489
has comment: http://stackoverflow.com/comment/40814747
has body: You can use CSS selectors such as ID or classes. If you want to differentiate between your response style and any other style, you would create a class named response .response and use that to reference your a tags. The css would look like: .response a {color:green} and the html would look like: <a href"http://stackoverflow.com">Some link in the response
upvote count: 1
has comment: http://stackoverflow.com/comment/40814953
answers question: http://stackoverflow.com/q/26052908
score: 1
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40814585

http://stackoverflow.com/comment/40960266
has text: I'm glad that i could help =) The reason that items 2 and 3 don't have any validation data is because they have dynamic names. I have updated my answer with this information.
comment on: http://stackoverflow.com/a/26132358
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41025235
type: Comment
has text: Looks like you could loop over document.styleSheets and look at the cssRules attribute (or "rules" for some browsers) for each sheet.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26167691

http://stackoverflow.com/comment/40798486
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26044097
has text: @Sean the array "prize" should simply return the content of "$prize"

http://stackoverflow.com/comment/41061019
score: 0
has text: it is totally a blank string. Teemu wanan put the answer and I'll mark correct. Believe it or not this isnt a question on stack.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26186868

http://stackoverflow.com/comment/91634028
has text: I told you that you can "fetch" username and password that are sent by basic authentication method via this code. Your problem now is "sending" these data and is not related to this question. Because you can test the above code by using curl and see that it fetches username and password: ```curl -XGET http://user:pass@localhost:3000/``` As I told you before, browsers no longer send basic authentication data and if you are sending requests to your server with your browser, you can't access them in your server.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/52308324
type: Comment

http://stackoverflow.com/q/26152113
has body: Is there a way to hide the confirm dialog when onbeforeunload is called ? I tried with : return null return 0 return an empty var (undefined) return false e.preventDefault(); e.stopImmediatePropagation(); e.stopPropagation(); But nothing work. I use firefox and chrome. My code window.onbeforeunload = test; function test(){ // some code return false; } EDIT: withouth result the code is not run.
has title: How to canced onbeforeupload confirm dialog
type: Question
tagged with: javascript
tagged with: warnings
has answer: http://stackoverflow.com/a/26426381
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26387000
tagged with: onbeforeunload
type: UnansweredQuestion

http://stackoverflow.com/q/26121785
type: AnsweredQuestion
score: 2
has body: I am using d3.js for ploting data. On x axis I have time in various ranges. So the tick labels could look like that: I would like to emphasize the years, so I would like to have year labels bold, while months will stay not bold. I have not found a solution. Is it possible to do that? If yes, how?
upvote count: 2
has title: D3.js - How to use different styles for tick labels in one plot?
tagged with: d3.js
type: Question
accepted answer: http://stackoverflow.com/a/26123734
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26123734

http://stackoverflow.com/comment/41010263
type: Comment
score: 0
has text: @RoyiNamir It is precisely what he asked for. What part of it does not answer the question?
type: AnswerComment
comment on: http://stackoverflow.com/a/26159334

gridview
tags question: http://stackoverflow.com/q/26118347
tag name: gridview
tags question: http://stackoverflow.com/q/26049483
type: Tag
tags question: http://stackoverflow.com/q/26072205

http://stackoverflow.com/q/26137393
has title: How to import VRML Files in three.js?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26140886
accepted answer: http://stackoverflow.com/a/26140886
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40974255
favorite count: 0
has comment: http://stackoverflow.com/comment/40974412
type: Question
has body: I'm trying to import a VRML file in three.js, but it doesn't work. Here is the VRML file: #VRML V2.0 utf8 #Created by CINEMA 4D DEF B1 Transform { translation 600 0 0.333333 children [ DEF _60_ Transform { translation -600 0 0 children [ ] } DEF Button Transform { translation 679.734143 0 0 children [ Shape { appearance DEF MAT_Metal_010 Appearance { material Material { ambientIntensity 0.2 diffuseColor 0.815686 0 0.223529 specularColor 0 0 0 emissiveColor 0 0 0 shininess 0.1 transparency 0 } } geometry DEF FACESET_Button IndexedFaceSet { ccw FALSE creaseAngle 1.396263 coord Coordinate { point [ -100 -100 -100,-100 100 -100,-100 -100 100,-100 100 100,100 -100 100, 100 100 100,100 -100 -100,100 100 -100 ] } texCoord TextureCoordinate { point [ 0 1,1 0, 0 0,0 0,1 1,0 1,1 1, 0 0,1 0,1 0,0 1,1 1, 1 0,0 0,1 1,0 1,0 0, 1 0,0 1,1 1 ] } coordIndex [ 0,1,3,2,-1,2,3,5,4,-1,4,5,7,6,-1, 6,7,1,0,-1,1,7,5,3,-1,6,0,2,4,-1 ] texCoordIndex [ 2,5,11,8,-1,7,10,14,12,-1,13,15,19,17,-1, 16,18,4,1,-1,3,18,14,9,-1,16,0,6,12,-1 ] } } ] } ] } DEF Timer TimeSensor { startTime 0 stopTime 0 cycleInterval 14.4 loop TRUE } And here is my JavaScript code for the import: var loader = new THREE.VRMLLoader(); loader.addEventListener( 'load', function ( event ) { scene.add(event.content); } ); loader.load( "models/MyVRML.wrl" ); The error message in the browser is: TypeError: a is undefined three.js:1636. I use the actual three.js (not minified) Thanks for your help!
tagged with: javascript
upvote count: 1
answer count: 1
tagged with: vrml
tagged with: three.js

http://stackoverflow.com/comment/41044975
score: 1
type: QuestionComment
type: Comment
has text: Hey, the media needs to be loaded in the browser, so that's the wait period, which then depends on the network quality.
comment on: http://stackoverflow.com/q/26175598

http://stackoverflow.com/q/26115916
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26116762
score: 2
answer count: 1
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/19573074
has title: How to maintain noConflict and include 2 versions of jQuery in Bootstrap 3.2
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
upvote count: 2
has answer: http://stackoverflow.com/a/26116762
has body: I'm modifying the UI of an old project which uses Flexigrid and Bootstrap 3.2. Flexigrid depends on jQuery 1.4.1 and Bootstrap 3 requires jQuery 1.9.0 or higher. I tried using the older version of jQuery with Bootstrap but it breaks; likewise I tried using the newer version with Flexigrid.. it breaks. I'm wondering if I can include both versions and force Bootstrap to use jQuery.noConflict somehow? EDIT: Since we had a lot of js code which relied upon jQuery 1.4.1, I did this: Added both versions of jQuery to the page (1.4.1 and 1.9.1) in the following order: &lt;script src="/js/jquery-1.9.1.js"&gt;&lt;/script&gt; &lt;script src="/js/bootstrap.js"&gt;&lt;/script&gt; &lt;script&gt; var $jQuery1_9 = jQuery.noConflict(true); &lt;/script&gt; &lt;script src="/js/jquery-1.4.1.js"&gt;&lt;/script&gt; &lt;!-- Include other js files here --&gt; Now, everything works fine (so far!). You may also find this post useful.
type: Question

http://stackoverflow.com/comment/41058039
type: QuestionComment
score: 1
has text: im pooped just reading this
comment on: http://stackoverflow.com/q/26185439
type: Comment

http://stackoverflow.com/q/26161602
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41013303
has title: A drop down select that's actually a text input box, like on Google Calendar?
has answer: http://stackoverflow.com/a/26161707
type: UnansweredQuestion
tagged with: google-calendar-api
has body: I noticed Google calendar uses this instead of &lt;select> &lt;input class="text dr-time" id=":3r-st" size="7" title="From time" tabindex="0" dir="ltr" /&gt; It let's the user type the time instead of selecting an option from the drop down list. Is there a plugin or nice widget someone wrote that does the same thing?
has answer: http://stackoverflow.com/a/26161718
type: Question
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/41013619
score: 0

http://stackoverflow.com/a/26043272
has comment: http://stackoverflow.com/comment/40807036
type: Answer
has body: jQuery defines the data parameter as Type: PlainObject or String or Array Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key based on the value of the traditional setting (described below). I'd be willing to bet that your return value of that.getByDataSelected() is not consistent with the expected parameter if it isn't getting sent. In this case, your error function should be receiving an Internal Server Error [500]
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40806920
answers question: http://stackoverflow.com/q/26043089
downvote count: 0
has comment: http://stackoverflow.com/comment/48549629

http://stackoverflow.com/q/26157225
answer count: 2
upvote count: 0
has answer: http://stackoverflow.com/a/26157588
favorite count: 0
score: -1
has comment: http://stackoverflow.com/comment/41006409
has title: How to rename list ids according to current position using jquery .sortable()?
has comment: http://stackoverflow.com/comment/41005573
type: AnsweredQuestion
tagged with: jquery-ui-sortable
has body: First of all I am sorry that I cannot explain the scenario as for my poor english.This is what actually I need to do. I have a list as follows, 1 2 3 4 list IDs and their values are same.Normally,if I move list ID 4 to top using jquery sortable then I get the new list as, 4 1 2 3 But What I need to do is rename/reorder the IDs to Ascending as for current order of list. which means ID 4 => ID 1 ID 1 => ID 2 ID 2 => ID 3 ID 3 => ID 4 Is this possible using jQuery .sortable(). If so how would I overcome this problem? Thanks a lot.
accepted answer: http://stackoverflow.com/a/26157588
has answer: http://stackoverflow.com/a/26157891
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41005887
has comment: http://stackoverflow.com/comment/41005687
tagged with: jquery-ui
possible better answer: http://stackoverflow.com/a/26157891
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26171564
score: 0
has body: There are a few things wrong with your javascript/HTML, and a few things you missed. $('#convRate').val(aptsCovRate); should be $('#convRate').val(aptsCo**n**vRate); The end submit and end ready should be }); not }}; You do not have a HTML input with orderVal as an ID. It needs to be changed. Finally, what you missed - your form will submit and refresh and you'll lose the calculated values. You can fix this by using e.stopPropagation(); and e.preventDefault(); Updated fiddle should be working for you: http://jsfiddle.net/u3xx4ubv/17/
type: Answer
answers question: http://stackoverflow.com/q/26171456

http://stackoverflow.com/comment/40844038
has text: Just set `$scope.myData = {states:['CA', 'TX']};` It will get selected. http://plnkr.co/edit/WzUENG?p=preview
score: 0
comment on: http://stackoverflow.com/q/26068784
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26126193
has body: I'm trying to get the properties of jQuery ui's "sortable" from the outside of jQuery ui. I have tried console.log(jQuery.ui.sortable.items); console.log(jQuery.sortable.items); console.log(sortable.items); console.log(jQuery.ui.sortable.options.items); and so on, but none of them works as I aimed. Does anyone know the answer?
type: Question
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/26145432
tagged with: javascript
has title: How to get the properties of jQuery ui's plug-in?
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/26145411
tagged with: jquery
has answer: http://stackoverflow.com/a/26145411
possible better answer: http://stackoverflow.com/a/26145432
type: AnsweredQuestion

http://stackoverflow.com/comment/40972177
has text: OK, just making sure I got this correct - so it doesn't matter if there is no domain (files opened locally).
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26097630
type: Comment

http://stackoverflow.com/comment/40955564
comment on: http://stackoverflow.com/a/26126679
type: Comment
has text: @dizel32 sorry I was a bit sloppy, it does work, but only partially! when navigating from the top to a div it works fine, but when I try to use the menu to go from a div to another div it bugs out. Any suggestions? Oh, and thanks for your help dizel3d, I really appreciate it!
score: 0
type: AnswerComment

http://stackoverflow.com/q/26167245
possible better answer: http://stackoverflow.com/a/26167365
has answer: http://stackoverflow.com/a/26167365
has title: Knockoutjs foreach third nested level not working
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/41024317
tagged with: javascript
has answer: http://stackoverflow.com/a/26167367
has body: This is my first project using knockout.js and I'm having an issue I can't resolve. I'm attempting to have foreach binding 3 levels deep. The first two levels work, but the third one does not. I can't see anything wrong with either my HTML or JavaScript. JavaScript var viewModel = { publication: 'Medieval Fantasy Skills', categories: ko.observableArray([ { name: 'Physical & Social Combat Skills', realms: ko.observableArray([ { name: 'The Realm of Combat Tactics Skills', skills: ko.observableArray([ { name: 'Craft Profession', id: 0 } ]) } ]) } ]) }; ko.applyBindings(viewModel);
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/26167367
type: AnsweredQuestion

http://stackoverflow.com/a/26054700
has comment: http://stackoverflow.com/comment/40817945
has comment: http://stackoverflow.com/comment/40817751
has comment: http://stackoverflow.com/comment/40818863
score: 6
accepted answer of: http://stackoverflow.com/q/26054570
has body: You have wrong syntax. The problem is that your variables are private, and they will not be accessible by the stringify() function. In fact if you try to access a private variable directly you will get 'undefined'. Serialization works only on the public members, and that makes sense, since the private variables are not accessible. This should work as a quick hack, but it makes your variables public (as soon as you use this.category_id = value), so it is breaking encapsulation which is not good: function UserContext() { this.category_id; this.biller_id; this.get_category_id = function() { return this.category_id; } this.set_category_id = function(value) { this.category_id = value; } this.get_biller_id = function() { return this.biller_id; } this.set_biller_id = function(value) { this.biller_id = value; } } var contextObj = new UserContext(); contextObj.set_category_id('SOME VALUE'); contextObj.set_biller_id('65'); alert(JSON.stringify(contextObj)); A better approach would be to keep category_id and biller_id really private, and still be able to serialize your object. You con do that by implementing the ToJson() method in your object, and specifying explicitly what you want to serialize: function UserContext() { var category_id; var biller_id; this.get_category_id = function() { return category_id; } this.set_category_id = function(value) { category_id = value; } this.get_biller_id = function() { return biller_id; } this.set_biller_id = function(value) { biller_id = value; } this.toJSON = function() { return { "category_id": category_id, "biller_id": biller_id }; }; } var contextObj = new UserContext(); contextObj.set_category_id('SOME VALUE'); contextObj.set_biller_id('65'); alert(JSON.stringify(contextObj)); As a result, your variables are only accessible through your setters and getters, and you are also able to serialize your object using your private members! i would call that a Win-Win situation!
answers question: http://stackoverflow.com/q/26054570
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40817793
has comment: http://stackoverflow.com/comment/40817663
type: Answer
upvote count: 6

http://stackoverflow.com/comment/41055563
comment on: http://stackoverflow.com/q/26183979
score: 0
type: Comment
type: QuestionComment
has text: @AdamMerrifield CSS can't limit by character count (which may be a good thing, but it doesn't fulfill the requirement).

http://stackoverflow.com/q/26118420
linked to: http://stackoverflow.com/q/4649836
score: 12
type: UnansweredQuestion
has title: Free Transform plugin for SVG - creating placeholder element
has body: I'm trying to create html5 collage editor, where you can edit images in similar way to one you see in Word (cropping images instead of scaling them when dragging edges, being able to drag/rotate/scale images inside free transform area (so sort of placeholder funcionality), etc.). It means we need using SVG and clipping/masking, and binding position of free transform elements to those masks/clippings. Whole generated SVG should later be scalable for print dimensions (but that is not the issue here). The idea is simple - use already made jQuery Free Transform plugin - https://github.com/gthmb/jquery-free-transform bind it's controlls area transformation to SVG masks The issue: Even if transformed SVG mask has exact copy of transformation and position of FT div, it acts weird when transformation contains rotation. Seems like transform - origin does not work, rotating and scaling somehow is connected to left-upper corner instead of center, don't know why:/ Here is a fiddle, just try to rotate element and you will see what is the problem: Fiddle (simplifed code with already made svg) Main js part : var refreshSVGMask = function(){ //get element transform var elTransform = $('#ft').css("transform"); //quick parse of matrix transform: var elMatrix = elTransform.substring(elTransform.indexOf("matrix") + 7, elTransform.indexOf(")")); //modify matrix, to apply last two values (top and left position), which in jquery free transform are in "top" and "left" css attributes. Note - I've also tried applying same matrix, but changing "x" and "y" attributes in SVG (like: .attr("x", elTop)) -&gt; got exactly same results. var elTop = parseInt($("#ft").position().top); var elLeft = parseInt($("#ft").position().left); var matrixChanged = elMatrix.substring(0, elMatrix.length-6) + ", " + elLeft + ", " + elTop; //apply matrix to SVG element: $("#SvgjsRect1008").attr("transform", "matrix("+matrixChanged+")") .attr("transform-origin", "50%,50%"); // also - put transform origin, but it does …
tagged with: http://stackoverflow.com/tag/svg
type: Question
tagged with: transform
upvote count: 12
has answer: http://stackoverflow.com/a/30373029
tagged with: javascript
has comment: http://stackoverflow.com/comment/42847443
tagged with: css-transforms
has comment: http://stackoverflow.com/comment/41156355
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/40852901
score: 0
type: Comment
has text: I got it! Just a clarification: you said: not recommended because it stops the rendering of the page until all the JS are parsed. This means that I shouldn't to put the js file between " "? But if I don't do this W3C will always return an error. After that, we've done. Thanks for your time.
comment on: http://stackoverflow.com/a/26069272
type: AnswerComment

http://stackoverflow.com/comment/40987704
has text: What do you mean by *I'm returning the CSS from the server*?
type: Comment
comment on: http://stackoverflow.com/q/26147604
score: 0
type: QuestionComment

size
type: Tag
tags question: http://stackoverflow.com/q/26048451
tag name: size

http://stackoverflow.com/comment/40944602
comment on: http://stackoverflow.com/q/26124092
score: 0
type: Comment
type: QuestionComment
has text: Sorry, i'm a beginner. I don't know all the tools yet. I am making a JSFiddle now.

http://stackoverflow.com/a/26113872
has body: Edit: forgot to put in the timeout, to make sure the browser is ready! add the following line to your setCountDown() function: $timeout(function (){ document.querySelector('#focusbox').focus(); },0) You need to inject the $timeout in your controller That will probably do the trick! However, this will work, but dom manipulation should be done in a directive!
has comment: http://stackoverflow.com/comment/41002147
type: Answer
answers question: http://stackoverflow.com/q/26112186
has comment: http://stackoverflow.com/comment/41006507
has comment: http://stackoverflow.com/comment/40963585
has comment: http://stackoverflow.com/comment/40958493
score: 0

http://stackoverflow.com/q/26055804
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40819840
has comment: http://stackoverflow.com/comment/40823030
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40819460
has title: Can I suspend jquery ready event until my script execution is finished?
has body: I have some problem, I have to do some regex replacement to document.innerHTML on page load. but all jquery plugins and jquery method cannot detect body's child elements, I want to rescan document.body object after my regex replace operation. though Not a resonable solution, I did this with jquery as $("body").html($("body").html()); after body.innerHTML replacement, It works, jquery method can detect newly changed elements, but it also effect scripts within body tag causing double triggering plugins and requesting script file to server again. I want jquery to detect modified body's element. To do so, can I suspend $(document).ready() event till body's content is updated or is there other technique to reload document.body object. Please don't refer to delegate() on() and live() methods. I know usage of these methods, I don't want to use this approache, I just want jquery to detect modified elements in body, Please help me, thanks alot.
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40822787
type: UnansweredQuestion
answer count: 0

http://stackoverflow.com/q/26119108
has comment: http://stackoverflow.com/comment/40935419
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40934797
tagged with: knockout.js
type: Question
tagged with: knockout-mvc
has body: I'm in a bit of trouble from good 20 hours now. I am using knockout.js and dynamically add/remove rows from html table. I am having trouble in displaying an extra column for the remove button dynamically, my template is: //template that gets called from HTML table. //template called inside the template If i add remove button in 'LineItemDataTemplate' template, it renders the remove button after every column (makes sense). And if i add remove button in 'LineItemsBodyScript', it gets overwritten by the child template. My model is, List>. How and where could i add the remove button? I looked around and found afterRender afterAdd methods but they are not going to solve the issue. Note: No. of columns are unknown (therefore i made a generic class for Column-Name & Column-Value)
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26120656
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26120656
has title: Remove button UI issue inside nested templates - Knockout.js

http://stackoverflow.com/comment/40818974
type: Comment
comment on: http://stackoverflow.com/a/26055017
type: AnswerComment
has text: for `B` I have added required in validate
score: 0

http://stackoverflow.com/comment/41075900
type: AnswerComment
has text: Thanks a lot, parchment! You're a life saver!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26193170

http://stackoverflow.com/q/26124804
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
has title: AngularJS: Style individual form fields when ng-model is changed in texfield
favorite count: 0
tagged with: angularjs
upvote count: 1
has answer: http://stackoverflow.com/a/26125327
type: AnsweredQuestion
score: 1
type: Question
has body: So I've asked a similar question a couple of times already, and I'm afraid I've not been specific enough. Suppose in my controller I have an object of type person called "guy" that looks like this: {"ID" : "1234", "firstName" : "Bob", "lastName" : "Michael", "phone" : "555-555-5555", } (Note: The object that I'm working with is similar to this -- but it's much larger) Now suppose I had a webpage with a form and a search box. The form has a field for each attribute in the object, like this: First Name: Last Name: Phone Number: When an "ID" number is searched on the page, the form is populated with the corresponding data in the object. There is also an "import" button on the page. When this is pressed, a person object is brought in to the controller that is identical to guy except firstName is now "Dan" and phone is now "111-111-1111". The variable "guy" is set equal to this newly imported object, effectively changing or "updating" the object with these changes. These changes immediately show up in the form, as expected. What I would like to be able to do is to highlight the fields that have been changed once the import button has been pressed. However, I've been unsuccessful in my attempts. I tried doing something like this: First Name: But this only works when I type a change in the text box manually -- not when I click the import button and the actual object itself is changed. When I asked this question before, someone suggested that I use $watch like this: Controller function demoCtrl ($scope) { $scope.$watch('myModel', function (newValue, oldValue) { if (newValue) { $scope.hasChanged = true; } }, true); $scope.changeMyModel = function () { $scope.myModel = 'wonderful'; }; } HTML Stuff change model But this doesn't work either. For one thing, the $watch doesn't seem to register when I press the button, so I've not gotten it to run successfully yet. For another, I'm not sure how this would work for what I'm trying to do. Assuming all of my labels/inputs are set up …
accepted answer: http://stackoverflow.com/a/26125327
downvote count: 0

http://stackoverflow.com/comment/40972729
comment on: http://stackoverflow.com/a/26139806
type: AnswerComment
has text: Using console.log is probably a blocking operation, bad for compare.
type: Comment
score: 1

http://stackoverflow.com/comment/40897786
comment on: http://stackoverflow.com/a/26098374
type: Comment
has text: Yeah if you can catch it before hand, it's definitely a better solution. Since this solution adds overhead to your initial page load.
type: AnswerComment
score: 0

http://stackoverflow.com/q/26147067
favorite count: 0
has comment: http://stackoverflow.com/comment/40987052
has answer: http://stackoverflow.com/a/26148976
has comment: http://stackoverflow.com/comment/40987917
has body: OK, I doubt this is a unique situation, so either someone has done this, or someone has decided this isn't possible, at least in the way I am asking. I have 2 prototyped variables (functions), one is the parent, the other is a helper. What I'd like to do is reference the parent from within the helper such that each instance of each parent can utilize the helper while allowing the helper to essentially extend the parent. I'm using jQuery and javascript. Here's a simplified example: var Parent = function(identity) { this.identity = identity; this.group = $(this.identity); this.helper = new Helper(this); return this; }; Parent.prototype = { _setup : function(dolisten) { dolisten = dolisten || false; var that = this; that.group.each(function(i) { if ($(this).data('key') !== 'undefined') { that.elems[i] = new Object(); that.elems[i].key = parseInt($(this).data('key')); // build out rest of elems object } }); if (dolisten) { this._listen(); } }, _listen : function() { var that = this $('body').on('click tap', that.identity, function() { that.helper._showbusy(this, true); // do some other stuff } } }; var Helper = function(reference) { this.reference = reference; }; Helper.prototype = { _showbusy : function(elem, isbusy) { console.log(this.reference); // do some stuff to elem }, }; This works but creates an essentially infinite reference to Parent from within its own .helper node. So, without actually passing the parent every single time (hoping to create a single point of reference just once, the above seems to cause a reference "loop"?), can this be done elegantly? In the end, what I would like is a simple: var obj = new Parent('.myClass'); console.log(obj); // result : Parent { identity:'.myClass', group: [Object object], helper: {reference : *Parent without helper key included, which is where the looping seems to occur}, etc... EDIT: For the time being, I'm resorting to passing in the specific keys of the parent that are needed by the helper. This prevents the helper f…
linked to: http://stackoverflow.com/q/1999840
accepted answer: http://stackoverflow.com/a/26147921
downvote count: 0
possible better answer: http://stackoverflow.com/a/26148976
linked to: http://stackoverflow.com/q/4816099
has answer: http://stackoverflow.com/a/26147921
type: AnsweredQuestion
score: 1
has title: Javascript prototype - Need help adding a Helper prototype
tagged with: prototype
type: Question
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/40986501
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40884533
comment on: http://stackoverflow.com/a/26090841
type: AnswerComment
score: 0
type: Comment
has text: I did :3 I know its obviously and (and) operator but what is its purpose in this statement. Andddd as I was typing this I just got it.. lmao. But to be on the safe side, its also checks if 0===1 then && is saying also do this if its found true. Otherwise neither statement is used?

http://stackoverflow.com/comment/54187341
comment on: http://stackoverflow.com/a/26168052
has text: It now worked because of `$scope.$apply(function() {$scope.csvFile = reader.result;});`
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26118458
answers question: http://stackoverflow.com/q/26118384
type: Answer
score: 3
upvote count: 3
has body: There is a diffirence between '+999' and +999. The one with quotes is a string, whereas the one without is a integer value. What you want to do is numeric comparison, not string comparison.
downvote count: 0

http://stackoverflow.com/q/26054139
upvote count: 3
has comment: http://stackoverflow.com/comment/40818103
has comment: http://stackoverflow.com/comment/40818063
type: Question
has comment: http://stackoverflow.com/comment/40819018
score: 3
tagged with: jquery-mobile
has body: In jquery mobile popup enter some text and refresh the current page using changePage. After that open the open it shows in the text box what i enter previously. How to refresh the popup(Please dont suggest empty the textbox value). The code is: localStorage.setItem("name","tiger"); $(document).on("click","#save",function(){ $("#openpopup").popup("close"); localStorage.setItem("name",$("#pText").val()); $.mobile.changePage("#page1",{ allowSamePageTransition : true, transition : 'none', }); }); $(document).on("pageshow","#page1",function(){ if(localStorage.getItem("name")){ $("#name").val(localStorage.getItem("name")); } }); Here is the FIddle
tagged with: javascript
has comment: http://stackoverflow.com/comment/40817719
accepted answer: http://stackoverflow.com/a/26056271
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40819109
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26056271
has comment: http://stackoverflow.com/comment/40818024
has title: Refresh the popup contents in jquery mobile
has comment: http://stackoverflow.com/comment/40820131
has comment: http://stackoverflow.com/comment/40817935
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40818033

http://stackoverflow.com/a/26075080
has body: you can pass the id to the function like onclick="chkAlert(this.id)", please try as shown click me var chkAlert = function(id){ alert("Clicked with Id "+id); alert("Clicked with Id "+id); };
score: 1
answers question: http://stackoverflow.com/q/26075007
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/q/26169104
has comment: http://stackoverflow.com/comment/41051316
tagged with: twitter-bootstrap-3
has title: Different behavior when using jade instead of EJS
has body: In my node.js application, I've been using EJS as a template engine. But due to some limitations, I decided to switch to Jade. In my homepage, I have a navbar produced by Bootstrap 3. Inside this navbar, I have a form with 2 buttons. When I used EJS, these buttons were space-separated, exactly like in Bootstrap's navbar documentation : But when I switched to Jade, the result was : I tried with the code from Bootstrap's navbar documentation, and I got the same issue : no spaces with Jade. (http://getbootstrap.com/components/#navbar) And my body contains 2 divs. With EJS, I had a space between them (I supposed it was some Bootstrap's magic), none with Jade I checked all my files twice. They contain exactly the same CSS, the same markup. I'm struggling with this issue. Can you help me ? Thanks in advance. EDIT: Here is the code, I took a very basic example from bootstrap's documentation Jade Express Activer la navigation Envoi Express Template doctype html html head title= title link(rel='stylesheet', href='/stylesheets/style.css') link(rel='stylesheet', href='/js/bower_components/bootstrap/dist/css/bootstrap.min.css') script(src='/js/bower_components/bootstrap/dist/js/bootstrap.min.js') body nav.navbar.navbar-default(role='navigation') div.container-fluid div.navbar-header button.navbar-toggle.collapsed(type='button', data-toggle='collapse', data-target='#bs-example-navbar-collapse-1') span.sr-only Activer la navigation span.icon-bar span.icon-bar span.icon-bar div#bs-example-navbar-collapse-1.collapse.navbar-collapse form#uploadFileForm.navbar-form.navbar-left(role='send', enctype='multipart/form-data') div.form-group input#textFile.form-control(type='text', placeholder='Envoi de fichier') button.btn.btn-default(type='submit') Envoi p.navbar-text.navbar-right= title EJS Express Activer la navigation Envoi Express Template <%= title %> Activer la navigation Envoi <%= title %> style.css body { padding: 50px; font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; } a…
has comment: http://stackoverflow.com/comment/41039407
tagged with: node.js
has comment: http://stackoverflow.com/comment/41039766
has answer: http://stackoverflow.com/a/27076015
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41040040
has comment: http://stackoverflow.com/comment/41028223
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27076015
score: 0
tagged with: pug
answer count: 1
tagged with: css

http://stackoverflow.com/q/26191448
type: AnsweredQuestion
has body: I have a form in my code &lt;form class="validate form-horizontal" role="form" id="formLogin" action='actions.php' method="post" enctype="multipart/form-data"&gt; &lt;input type="hidden" name="id" value="&lt;?php echo @$selectedUser['id'];?&gt;" /&gt; &lt;input type="hidden" name="j" value="&lt;?php echo "3"; ?&gt;" /&gt; &lt;div class="form-group clearfix"&gt; &lt;div class="col-lg-offset-4 col-lg-9"&gt; &lt;button type="submit" class="btn btn-success"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Save&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/button&gt; &lt;a class="btn btn-default" href="index.php"&gt;Cancel&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="form-group clearfix"&gt; &lt;div class="col-lg-offset-4 col-lg-9"&gt; &lt;button type="submit" class="btn btn-success"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Approve&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/button&gt; &lt;input style="margin-left: 10px;" type="checkbox" name="emailCheckBox" style="height: 25px"&gt; &lt;label style="margin-left: 10px;" class="control-label"&gt;Email Tami&lt;/label&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; I have two different buttons here , Save and Approve. There are atleast 7 more input fields in this form. Now i want it, so that when save button is clicked, it should send value of j = 3 and if Approve is pressed, it should send value of j to be 4 How can I override the form activity and maybe write some code in javascript to achive this, keeping in mind the data of other 7 etc input fields is being sent too, and its same for both buttons
downvote count: 0
score: 1
favorite count: 0
type: Question
answer count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: php
upvote count: 1
has answer: http://stackoverflow.com/a/26191569
has title: Sending different values of input with different buttons in php form
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26191569
possible better answer: http://stackoverflow.com/a/26191676
has answer: http://stackoverflow.com/a/26191676

http://stackoverflow.com/comment/41216694
has text: Got it. Thank you so much for all the responses on time.
score: 0
comment on: http://stackoverflow.com/a/26235775
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41001184
has text: use `localStorage`: **http://www.w3schools.com/html/html5_webstorage.asp**... No cookies needed
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26154744
type: Comment

http://stackoverflow.com/comment/40822216
comment on: http://stackoverflow.com/q/26057349
type: QuestionComment
type: Comment
has text: show what you have tried so far????
score: 0

http://stackoverflow.com/comment/41057767
comment on: http://stackoverflow.com/q/26185267
type: Comment
has text: How are you running it? It is for me. IIRC the `undef` option will complain.
score: 1
type: QuestionComment

http://stackoverflow.com/comment/40844384
type: AnswerComment
has text: This is PERFECT! Except one last thing :) It doesnt solve the parent parent then sibling of that's scope.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26066232

http://stackoverflow.com/comment/40839073
type: QuestionComment
comment on: http://stackoverflow.com/q/26066124
score: 0
has text: Can you try with $scope.$parent ?
type: Comment

http://stackoverflow.com/comment/40819511
type: QuestionComment
has text: the fiddle link you have provided is not updated one???
comment on: http://stackoverflow.com/q/26055435
score: 0
type: Comment

http://stackoverflow.com/q/26056182
answer count: 2
possible better answer: http://stackoverflow.com/a/26062930
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26062930
favorite count: 0
has title: How to integrate socket.io with mootools
accepted answer: http://stackoverflow.com/a/26099935
has body: I have a question about integration between mootools and socket.io on client : Suppose : - server application developed in node.js which have a socket.io listen I want to define a class to manage connection with the server, client socket.io must reside inside this class. Actually i'm able to send connection from this class but i'm not able to manage push event. How to correct this code ? var Push = new Class({ Implements: [Events], initialize : function() { this.socketServer = '192.168.1.3'; this.listeningPort = '8080'; this.socketIoUrl = 'http://'.concat(this.socketServer,':', this.listeningPort); // this.socketIO = io.connect(this.socketIoUrl, { 'connect timeout' : 500, 'reconnect' : false, 'reconnection delay' : 0, 'reopen delay' : 500, 'max reconnection attempts' : 0 }); // Attach Socket.io events this.attachEvents(); // Creating a socket.io room this.socketIO.emit('create', this.filterName); }, // SOCKET.IO EVENTS attachEvents : function() { socketIO.on = function(e) { log.info('aaa'); socket.on('disconnect', function() { log.error("SOCKET.IO CLIENT disconnected"); this.fireEvent("disconnect", [ e.data, e ]); }); socket.on('connect_failed', function() { log.error("SOCKET.IO connection failed "); this.fireEvent("connect_failed", [ e.data, e ]); }); socket.on('message', function() { log.debug(e.data); processMessage(e.data); this.fireEvent("message", [ e.data, e ]); }); }.bind(this) return this } });
type: AnsweredQuestion
upvote count: 1
tagged with: socket.io
tagged with: mootools
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26099935

http://stackoverflow.com/comment/40938492
has text: How to add default month as "Jan"
comment on: http://stackoverflow.com/a/26121154
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26158674
has body: In short: does the child_process automatically dies after certain time not being accessed for certain period( or is there anyway we can set this), or do we always have to explicitly kill the processes all the time? in Long: I am doing some decoding work, using require('child_process').fork(), when the first data comes in, i initialize a child, and as more data packets come in, i use the child to decode them( I send it in from client side), when I see that the last data packet is decoded, I kill the child through child.kill(), this works perfectly well, but under certain scenarios, the streaming fails in between, though I show appropriate error in client side, I am scared that this would lead to memory leak in server as the child_process is never killed.
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41009291
tagged with: child-process
tagged with: node.js
has title: node.js Child Process has timeout?
has comment: http://stackoverflow.com/comment/41007817
answer count: 0
has comment: http://stackoverflow.com/comment/41007814
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41009812
type: Question

http://stackoverflow.com/comment/41033604
score: 0
type: Comment
has text: It reaches all the way to the second if statement but its not properly pulling the input from the html form so it says the .value is undefined.
type: AnswerComment
comment on: http://stackoverflow.com/a/26170926

knockout.js
tags question: http://stackoverflow.com/q/26140774
tags question: http://stackoverflow.com/q/26115663
tags question: http://stackoverflow.com/q/26148246
tags question: http://stackoverflow.com/q/26093804
tags question: http://stackoverflow.com/q/26047660
tags question: http://stackoverflow.com/q/26084674
tags question: http://stackoverflow.com/q/26158235
tags question: http://stackoverflow.com/q/26192064
tags question: http://stackoverflow.com/q/26185519
tags question: http://stackoverflow.com/q/26140522
tags question: http://stackoverflow.com/q/26119108
tags question: http://stackoverflow.com/q/26068744
tags question: http://stackoverflow.com/q/26157428
tags question: http://stackoverflow.com/q/26059618
tags question: http://stackoverflow.com/q/26069926
tag name: knockout.js
tags question: http://stackoverflow.com/q/26156317
tags question: http://stackoverflow.com/q/26178762
tags question: http://stackoverflow.com/q/26048987
tags question: http://stackoverflow.com/q/26192972
tags question: http://stackoverflow.com/q/26037284
tags question: http://stackoverflow.com/q/26173957
tags question: http://stackoverflow.com/q/26155111
tags question: http://stackoverflow.com/q/26120965
tags question: http://stackoverflow.com/q/26102698
tags question: http://stackoverflow.com/q/26103863
tags question: http://stackoverflow.com/q/26045017
tags question: http://stackoverflow.com/q/26129842
tags question: http://stackoverflow.com/q/26138152
tags question: http://stackoverflow.com/q/26063105
tags question: http://stackoverflow.com/q/26051927
tags question: http://stackoverflow.com/q/26121307
tags question: http://stackoverflow.com/q/26167245
tags question: http://stackoverflow.com/q/26135896
tags question: http://stackoverflow.com/q/26050659
tags question: http://stackoverflow.com/q/26145943
tags question: http://stackoverflow.com/q/26155866
type: Tag
tags question: http://stackoverflow.com/q/26059329
tags question: http://stackoverflow.com/q/26094858
tags question: http://stackoverflow.com/q/26037058
tags question: http://stackoverflow.com/q/26174540
tags question: http://stackoverflow.com/q/26039075
tags question: http://stackoverflow.com/q/26137523
tags question: http://stackoverflow.com/q/26046956
tags question: http://stackoverflow.com/q/26069369
tags question: http://stackoverflow.com/q/26043433

http://stackoverflow.com/comment/41017250
type: Comment
has text: Got it working now I had another menu in the way conflicting with the responsive menu thank you very much for your help :)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26161133

http://stackoverflow.com/a/26040507
answers question: http://stackoverflow.com/q/26040444
has comment: http://stackoverflow.com/comment/40792255
has comment: http://stackoverflow.com/comment/40792626
has comment: http://stackoverflow.com/comment/40793415
has comment: http://stackoverflow.com/comment/40792281
has comment: http://stackoverflow.com/comment/40792734
has comment: http://stackoverflow.com/comment/40793362
has body: You don't need to pass the ID at all, it's already available as a property of the clicked element: function setTab2(element) { var id = element.id; ... } and then change the onclick attribute to onclick="setTab2(this)". The latter ensures that the click handler is passed a reference to the clicked element. Note that it would be preferable not to use inline event handlers at all: $('#2').on('click', setTab2); NB: numeric IDs are only permitted in HTML5, and are not permitted in CSS3.
score: 2
has comment: http://stackoverflow.com/comment/40792581
has comment: http://stackoverflow.com/comment/40792817
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40792019
has comment: http://stackoverflow.com/comment/40793222
accepted answer of: http://stackoverflow.com/q/26040444
upvote count: 2
has comment: http://stackoverflow.com/comment/40792861
type: Answer

processing
tags question: http://stackoverflow.com/q/26035806
type: Tag
tag name: processing

http://stackoverflow.com/a/26049236
answers question: http://stackoverflow.com/q/26047123
downvote count: 0
has comment: http://stackoverflow.com/comment/40825971
has body: SignalR uses Json.NET which is definitely able to to serialize a Dictionary&lt;string, string&gt;. You should be able to access the dictionary from JS code in the exact manner you suggest in your question. Have you tried sending an instance of your MyClass using SignalR? If so, how does it fail?
type: Answer
upvote count: 2
score: 2

http://stackoverflow.com/comment/137215056
score: 0
type: Comment
comment on: http://stackoverflow.com/a/77823444
has text: Yip, JS generated at runtime by the parent, thanks. Question now edited.
type: AnswerComment

http://stackoverflow.com/q/26034735
type: Question
has answer: http://stackoverflow.com/a/26036495
tagged with: javascript
has body: I have in my application several select, like this: a b c d a b c d I need in my Javascript / coffeescript to make a method that returns true if all the selected values have text: "b". _tAreB: -> selecteds = $('select[id^=t_] option:selected').contents() for t in selecteds return false unless t == "b" return true The == fails, because t is a Text, and can't compare to a String, How can I convert t to a String as well? UPDATE: If on the console I do: >a = $('select[id^=t_] option:selected').contents() >a <- ["b","b","a"] >a.constructor.prototype <- [] >a[0].constructor.prototype <- Text {splitText: function, replaceWholeText: function, getDestinationInsertionPoints: function, substringData: function, appendData: function…}
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/40781037
tagged with: jquery
has comment: http://stackoverflow.com/comment/40781747
has answer: http://stackoverflow.com/a/26035152
favorite count: 0
has comment: http://stackoverflow.com/comment/40781237
score: -1
has comment: http://stackoverflow.com/comment/40781898
type: AnsweredQuestion
has title: how to convert from Text to String, Jquery
tagged with: coffeescript
accepted answer: http://stackoverflow.com/a/26035152
possible better answer: http://stackoverflow.com/a/26036495
downvote count: 1
has comment: http://stackoverflow.com/comment/40781079

http://stackoverflow.com/comment/40892034
comment on: http://stackoverflow.com/q/26095023
type: Comment
type: QuestionComment
has text: @Kartikeya Good point. Changed. I was creating forms by function.
score: 0

http://stackoverflow.com/q/26117985
score: 0
tagged with: itext
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40933362
tagged with: http://stackoverflow.com/tag/pdf
has title: Creating a PDF merge tool with itextsharp that supports embedded JavaScript
has body: I want to create a PDF merge tool using itextsharp that will preserve embedded JavaScript from the input files. I haven't used itextsharp before so I'm not sure if this is possible. Before I spend time creating this, I just want to check if this is feasible? When I copy one page from the input file to the new document, will this also copy the JavaScript or do I need to explicitly get the JavaScript from one file and copy it into the new document? Thanks, Ben.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40934980
tagged with: merge
has comment: http://stackoverflow.com/comment/40946157
answer count: 0

http://stackoverflow.com/comment/40844651
comment on: http://stackoverflow.com/a/26069122
type: AnswerComment
score: 0
type: Comment
has text: Or is the code running in node.js and you don't have access to the DOM? If so there are also solutions that provides a virtual DOM in node.

http://stackoverflow.com/q/26120408
favorite count: 0
answer count: 0
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
has body: I have a Angular directive to build a table with bootstrap table. This table has a "formatter" for each column, to render the HTML data of a column, row by row. The formatter must return a HTML, and in my case, my HTML is returning containing a ngClick. But this ngClick isn't working, because angular hasn't compiled it. How can I watch/monitor table DOM changes to force angular to processs/compile it directives after the changes? I was trying this, but without success: app.directive('myBootstrapTable', ['$compile', function($compile) { return { restrict: 'A', link: function(scope, el, attrs) { // watching for table DOM changes, to force angular to process it directives scope.$watch(function() { return el.html(); }, function(current, old) { $compile(el.contents())(scope); console.log('bootstraptable: compile'); }); } }; }]); Another possible problem is that I cannot compile more than 1 time an element. If I do this, for example, a ng-click will be executed twice.
tagged with: angularjs-directive
has title: Angular $compile on DOM changes
downvote count: 0
score: 1
type: Question
tagged with: javascript
upvote count: 1

http://stackoverflow.com/q/26143639
has comment: http://stackoverflow.com/comment/40987680
score: 1
accepted answer: http://stackoverflow.com/a/26180130
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40987921
has comment: http://stackoverflow.com/comment/40982284
has comment: http://stackoverflow.com/comment/40981252
downvote count: 0
has title: Jquery isotope filtering mechanism not working, instead page just refreshes
tagged with: javascript
tagged with: jquery-isotope
tagged with: jquery
has comment: http://stackoverflow.com/comment/40980684
has body: I'm trying to use Isotope for a filtering mechanism in my Rails application. I have included in a JS file I send to the client: /*-----------------------------------------------------------------------------------*/ /* ISOTOPE PORTFOLIO /*-----------------------------------------------------------------------------------*/ $(document).ready(function () { var $container = $('.items'); $container.imagesLoaded(function () { $container.isotope({ itemSelector: '.item', layoutMode: 'fitRows' }); }); $('.portfolio .filter li a').click(function () { $('.portfolio .filter li a').removeClass('active'); $(this).addClass('active'); var selector = $(this).attr('data-filter'); $container.isotope({ filter: selector }); return false; }); }); as for my HTML: All Vegan Organic How to cook quinoa How to organic food When I click on a filter button, all it does is refresh the webpage. Additionally, I send over to the client jquery.isotope.min.js which should be the source for isotope to work. This code came as part of a theme used for the Rails application. There are no console errors indicating a problem with isotope. EDIT: The code is working fine, but is not being executed in the browser after placing a breakpoint on the JS function. Also, I notice the template and my rails app is using jquery.isotope.min.js, where as the fiddle is using isotope.pkgd.min.js The template can be found at: http://themeforest.net/item/-slowave-multipurpose-responsive-wordpress-theme/6870792
has comment: http://stackoverflow.com/comment/40980725
answer count: 1
has comment: http://stackoverflow.com/comment/40982429
has comment: http://stackoverflow.com/comment/40988093
tagged with: templates
has answer: http://stackoverflow.com/a/26180130
favorite count: 0
has comment: http://stackoverflow.com/comment/40982200
has comment: http://stackoverflow.com/comment/40981435
tagged with: ruby-on-rails
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40982115

http://stackoverflow.com/comment/40981901
type: QuestionComment
has text: @braw, you're fine. It's not the load that's an issue.
comment on: http://stackoverflow.com/q/26144013
score: 0
type: Comment

http://stackoverflow.com/a/31688178
answers question: http://stackoverflow.com/q/26188152
score: 0
type: Answer
has body: I moved this functionality to jQuery and removed the liquid from the product page. In other words, I was using an implementation like the one mentioned by Steph Sharp, but came up against the restriction she mentions. My quantity select element is now empty: &lt;select id="quantity" name="quantity"&gt;&lt;/select&gt; Using jQuery, I implemented the quantity dropdown that tracks stock thusly: for(var counter = 1; counter &lt;= variant.inventory_quantity; counter++){ if(counter === 1){ $('#quantity').empty(); } var newQtyOption = $("&lt;option&gt;&lt;/option&gt;").val(counter).html(counter); $('#quantity').append("&lt;option value='" + counter + "'&gt;" + counter + "&lt;/option&gt;") } This clears the select element and then adds a child option element for each quantity for this variant. This was built up from Caroline Schnapp's code https://gist.github.com/carolineschnapp/1083007

http://stackoverflow.com/comment/40872625
comment on: http://stackoverflow.com/a/26083781
type: AnswerComment
score: 0
type: Comment
has text: just try the following then as response to check if this is a client problem: echo json_encode(array('type' => 2)); in your callback function just check response.type then.

http://stackoverflow.com/a/26188118
type: AcceptedAnswer
has body: One way to solve this is using a simple guard abstraction. It works like this: var sayHi = guard("enabled", function(){ alert("hi"); }); guard.deactivate("enabled"); sayHi(); // nothing happens guard.activate("enabled"); sayHi(); // shows the alert Using this for event handlers is similar: handleChange: guard("something", function(e){ // if 'something' is deactivated, the input won't change this.setState({value: e.target.value}); }) // or return click me! Here's an implementation of guard var guard = function(key, fn){ return function(){ if (guard.flags[key]) { return fn.apply(this, arguments); } }; }; guard.flags = {}; guard.activate = function(key){ guard.flags[key] = true }; guard.deactivate = function(key){ guard.flags[key] = false };
accepted answer of: http://stackoverflow.com/q/26187189
type: Answer
answers question: http://stackoverflow.com/q/26187189
downvote count: 0
score: 7
upvote count: 7

http://stackoverflow.com/comment/40970302
score: 0
type: QuestionComment
has text: try with `.html()` instead of `replaceWith()`
type: Comment
comment on: http://stackoverflow.com/q/26138386

http://stackoverflow.com/comment/40802642
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26045866
has text: `escape` or `encodeURIComponent` requires mandrillapp to decode them, else you end up with lots of %xy in ` ` text. The base64 string looks good.

http://stackoverflow.com/q/26134288
tagged with: extjs4
tagged with: datepicker
has comment: http://stackoverflow.com/comment/40964697
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26135461
possible better answer: http://stackoverflow.com/a/33305428
has comment: http://stackoverflow.com/comment/40967247
has comment: http://stackoverflow.com/comment/40962939
has body: I want to show to text fields start_date and end_date, while clicking on this should show the datepicker for each. Any suggestions on this. Thanks in advance Below is the image And below is the code snippet Ext.define('CustomApp', { extend: 'Rally.app.App', componentCls: 'app', _startDate : 0, _endDate : 0, launch: function() { var that = this; var minDate = new Date(new Date() - 8640000000*90); //milliseconds in day = 86400000 var datePicker = Ext.create('Ext.panel.Panel', { title: 'Choose a PSI Dates', bodyPadding: 10, width: 400, layout: { type: 'hbox', }, renderTo: Ext.getBody(), items: [{ xtype: 'datepicker', title: 'PSI start date', minDate: minDate, id: 'start_date', handler: function(picker, date) { that._startDate = Ext.getCmp('start_date').getValue(); } }, { xtype: 'datepicker', title: 'PSI end date', minDate: minDate, id: 'end_date', handler: function(picker, date) { that._endDate = Ext.getCmp('end_date').getValue(); that._prepareChart(); } } ] }); this.add(datePicker); //this.add(enddatePicker); },
type: Question
has answer: http://stackoverflow.com/a/26135461
tagged with: javascript
has comment: http://stackoverflow.com/comment/40963517
has answer: http://stackoverflow.com/a/33305428
score: 0
answer count: 2
has title: How to show datepicker on click of textfield
has comment: http://stackoverflow.com/comment/40964177
has comment: http://stackoverflow.com/comment/40962968
tagged with: rally
tagged with: extjs

http://stackoverflow.com/q/26173092
has comment: http://stackoverflow.com/comment/41035199
has comment: http://stackoverflow.com/comment/41035245
answer count: 1
downvote count: 0
has body: In ember I have a Model like this App.IndexRoute = Ember.Route.extend({ model: function() { return { model1: ['red', 'yellow', 'blue'], model2: [{color:'green'}] }; } }); In handlebars I can access the model 2 like {{#each item in model2}} &lt;li&gt;{{model2.color}}&lt;/li&gt; {{/each}} How can I access model2 without using {{each}}? When I use, &lt;li&gt;{{model2.color}}&lt;/li&gt; it reurns no value, when I use &lt;li&gt;{{model2}}&lt;/li&gt; it shows [object Object] so how can I access model2 objects without using {{#each}}? JsBin : http://emberjs.jsbin.com/tuvozuwa/6/edit Thanks
favorite count: 0
tagged with: ember.js
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26173188
accepted answer: http://stackoverflow.com/a/26173188
tagged with: http://stackoverflow.com/tag/json
has title: Accessing JSON object in Handlebars [object Object] error
tagged with: javascript

http://stackoverflow.com/comment/41094816
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26186420
has text: @Neysor, not sure what you mean by "doesn't work the same way as in the "normal" chart field". The wind arrows aren't part of the "chart". It's actually drawn on top of the xaxis.

http://stackoverflow.com/q/26174412
answer count: 1
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
has body: I would like to create foreignObject in SVG using pure javascript. I don't know why it doesn't work. My foreign object is in a <g> element. And inside it is a simple div. I tried using "requiredExtensions" and "xmlns" I thought that my div was somewhere outside the window but i checked getBoundingClientRect().left; and it is not. My code is here: SVG TEST
upvote count: 3
has answer: http://stackoverflow.com/a/26174535
type: Question
score: 3
tagged with: http://stackoverflow.com/tag/xhtml
tagged with: javascript
has title: creating foreignObject in svg using javascript

http://stackoverflow.com/comment/40997243
type: Comment
has text: Hi thnx for replying to me i tried your code doesnt work here's the full code //Getting the generated Auth Key $.ajax({ url: your_url, type: 'GET', success: function(res) { var text = res.responseText; var auth = text.match("BEGIN(.*)/END"); } }); //this code will be ouputed for the user as html to play the media with JWplayer mplayer("content").setup({ playlist: [{ sources: [{ file: 'http://dnswebsite.tld/appz?UserSign="I WANT MY auth VAR HERE"/playpath', }] }], });
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26152379

http://stackoverflow.com/comment/40827885
type: Comment
type: QuestionComment
has text: @IngoBürk: Only the first instance :) Very good question :)
comment on: http://stackoverflow.com/q/26059473
score: 0

http://stackoverflow.com/comment/40988093
has text: Also, I notice the template and my rails app is using jquery.isotope.min.js, where as the fiddle is using isotope.pkgd.min.js
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26143639
type: QuestionComment

http://stackoverflow.com/a/26041708
has body: Try this function isScrolledIntoView($elem) { var docViewTop = $(window).scrollTop(); var docViewBottom = docViewTop + $(window).height(); var elemTop = $elem.offset().top; var elemMiddle = elemTop + $elem.height()/2; return docViewBottom &gt;= elemMiddle &amp;&amp; docViewTop &lt;= elemMiddle; } $(window).scroll(function(){ $elem = $("div"); //or what element you like if(isScrolledIntoView($elem)){ $elem.css('background-image','url("img/background.jpg")').fadeIn(); } });
answers question: http://stackoverflow.com/q/26041244
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40803668

http://stackoverflow.com/comment/40857644
type: Comment
has text: Thank you everyone for the good suggestions, I find the answer by @FredericNault to be most suitable for my needs, so I'll use that. Thank you.
type: QuestionComment
comment on: http://stackoverflow.com/q/26075924
score: 0

http://stackoverflow.com/q/26171037
score: 0
tagged with: while-loop
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I have been learning Jquery and i made a small banner that animates out, and back in giving information. But, i would like it to be on a timed loop; ie. It runs the animation every 5 mins. This is the code: Test Jquery Twitter @Geekster_Alan How would i get it too loop? Also, if you see anything wrong with the general code it would be appreciated if you point it out! I am new to Jquery, JS and HTML/CSS so positive criticism will help me learn! Thanks!
has title: Jquery Loop for timed banner animation
accepted answer: http://stackoverflow.com/a/26171089
tagged with: css
type: AnsweredQuestion
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26171089

http://stackoverflow.com/comment/40946157
type: Comment
type: QuestionComment
has text: The buttons have different names in the different documents?
comment on: http://stackoverflow.com/q/26117985
score: 0

http://stackoverflow.com/comment/40820211
comment on: http://stackoverflow.com/q/26056124
type: Comment
type: QuestionComment
score: 1
has text: Note that `var selectOperator = $(".cartDdlOptions option").eq(0);` will only give you the **first** matching select's first option, but you have multiple selects.

http://stackoverflow.com/q/26101197
has body: I have an existing date time string in place new Date('2014-08-01T00:00:00') But instead of returning 2014-08-01, it returns as 2014-07-31 in the actually angularJS view. I wonder is this date time string valid, if not, why its not valid. Could the T be the reason that the string return a wrong date? The console.log return a date of Thu Jul 31 2014 20:00:00 GMT-0400 (EDT) Thank You Lets call those -2 are toxic vote downs. They should really recall the days when they are struggling to understand the basic concepts that now apparant to them. Its a shame.
tagged with: datetime
accepted answer: http://stackoverflow.com/a/26101281
has comment: http://stackoverflow.com/comment/41215916
tagged with: angularjs
upvote count: 3
downvote count: 3
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40902754
has title: new Date() return a day before the day in date time string in javascript
type: Question
has comment: http://stackoverflow.com/comment/40902799
possible better answer: http://stackoverflow.com/a/26101278
score: 0
has comment: http://stackoverflow.com/comment/40902816
answer count: 3
has answer: http://stackoverflow.com/a/26101281
has answer: http://stackoverflow.com/a/26101278
tagged with: javascript
favorite count: 0
tagged with: datetime-format
has answer: http://stackoverflow.com/a/73066422

http://stackoverflow.com/comment/40848712
has text: sortInitialOrder : 'desc', // sort direction on first click I also change sortInitialOrder from 'asc', to 'desc', but this is on first click whereas I want the table to automatically show descending
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26051237

http://stackoverflow.com/q/26038140
has answer: http://stackoverflow.com/a/26064296
upvote count: 3
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26038447
has title: Managing service callbacks from controller using promises in AngularJS?
type: AnsweredQuestion
score: 3
downvote count: 0
accepted answer: http://stackoverflow.com/a/26038447
favorite count: 0
has body: I have to manage the callback when calling a service function from a controller. My idea is to wrap the service functionality in a promise but then I can't reference the service function from the controller directly. Instead I have to create another function to handle the view events. function exampleSrv($q) { this.exampleFn = function() { var q = $q.defer(); // Do something q.resolve(); return q.promise; }; } function exampleCtrl(exampleSrv) { this.exampleFn = exampleSrv.exampleFn; /* This works but I want to avoid this if possible this.clickHandler = function() { this.exampleFn() .then(function() { console.log('yay'); }) }; */ /* And instead do something like this but as a reference not as a call this.exampleFn() .then(function() { console.log('yay'); }) */ } Is there a better approach to do this? Example: http://plnkr.co/edit/jg5yoC?p=info
tagged with: angularjs
type: Question
possible better answer: http://stackoverflow.com/a/26064296

http://stackoverflow.com/comment/40871788
type: Comment
comment on: http://stackoverflow.com/a/26080020
type: AnswerComment
score: 0
has text: Thank you guys! I have learned your all of the suggestion! I will be more carefull next time! I have made some stupid mistakes this time, but i promise i will not be such stupid to make the same mistakes next time! Really thank you!!!

http://stackoverflow.com/comment/41056366
has text: You're welcome as well :-) I found featherlight not to be to best option for me at the end. I'm now working with the Blueimp gallery, the look and functionality is awesome! check it out here: https://github.com/blueimp/Gallery and the gallery extension: https://github.com/blueimp/Bootstrap-Image-Gallery
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26159314
type: Comment

http://stackoverflow.com/a/26073163
has body: Try This Code, byte[] imgBytes = (byte[])yourbytedata; string base64String = Convert.ToBase64String(imgBytes, 0, imgBytes.Length); string htmlstr = "data:image/png;base64," + base64String;
type: Answer
score: -1
has comment: http://stackoverflow.com/comment/40851705
upvote count: 2
downvote count: 3
answers question: http://stackoverflow.com/q/26072366
has comment: http://stackoverflow.com/comment/40851970

http://stackoverflow.com/comment/40844139
type: Comment
score: 0
has text: Thanks. This is based on the value, what about if I want to base it off the name. As I mentioned, I don't know the ID of the state.
type: QuestionComment
comment on: http://stackoverflow.com/q/26068784

http://stackoverflow.com/comment/40848183
comment on: http://stackoverflow.com/q/26071079
score: 0
type: Comment
type: QuestionComment
has text: oh my god!sorry array is a typo...

http://stackoverflow.com/comment/40868502
type: QuestionComment
comment on: http://stackoverflow.com/q/26081024
has text: Add a simple jsfiddle to make it easier for us to help you.
score: 0
type: Comment

http://stackoverflow.com/comment/41148382
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26168026
has text: I am getting the same error even after changing the format. This InvalidStateError is coming in getUserMedia() only when the "chromeMediaSource":"desktop". What could be the possible reasons for this?

http://stackoverflow.com/q/26061676
favorite count: 0
accepted answer: http://stackoverflow.com/a/26061872
possible better answer: http://stackoverflow.com/a/26061859
has answer: http://stackoverflow.com/a/26061859
upvote count: 1
tagged with: css
has body: I am trying to get a bullet list inside the hover box but its showing up outside. The link http://jsfiddle.net/krs8785/kzd1zw6c/ Need to get it inside the hover box. It would be great to get it inside the box. What would be the correct way to to this ? span{ background:#F8F8F8; border: 5px solid #DFDFDF; color: #717171; font-size: 13px; height: 30px; letter-spacing: 1px; line-height: 30px; position: relative; text-align: center; text-transform: uppercase; top: -80px; left:-30px; display:none; padding:0 20px; } p{ margin:100px; float:left; position:relative; cursor:pointer; } p:hover span{ display:block; } Hover here mark john Katty
type: AnsweredQuestion
downvote count: 3
has comment: http://stackoverflow.com/comment/40830667
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26061872
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/40830828
has comment: http://stackoverflow.com/comment/40830555
has title: Bullet List inside hover box CSS
has comment: http://stackoverflow.com/comment/40830699
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26125316
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26125582
tagged with: unix-timestamp
type: Question
has comment: http://stackoverflow.com/comment/40946532
answer count: 2
tagged with: datetime
has answer: http://stackoverflow.com/a/26125382
has title: How to take only part of the javascript timestamp
accepted answer: http://stackoverflow.com/a/26125382
score: 0
has body: I have a js timestamp of Tue Sep 30 2014 12:02:50 GMT-0400 (EDT) with .getTime() I got 1412092970.768 for most cases, its a today's specific time stamp. I wonder, if I could always ONLY pick out the day month and year and hour, min, day will be always stay with 0. So for our situation, it should become Tue Sep 30 2014 00:00:00 GMT-0400 (EDT). I wonder what kind of conversion should I be doing? Because seem convert to unix timestamp with getTime() will result in unknown way of calculation... and I can not really find a way to set time like I would do in PHP. Any fix for this situation? Thanks
tagged with: javascript
has comment: http://stackoverflow.com/comment/40946598
tagged with: date
has answer: http://stackoverflow.com/a/26125582

http://stackoverflow.com/comment/40894714
score: 0
has text: Then I have no idea what it can be..
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26096094

http://stackoverflow.com/a/26065182
type: Answer
has body: I'd recommend page-worker. You can either create a new page-worker for each "poll" and destroy the old one when it's no longer needed, for refresh a single page-worker using PageWorker(/*...*/).contentURL = "https://google.com"; If you can use the request module though, then that would be better since it is more lightweight.
score: 2
has comment: http://stackoverflow.com/comment/40863070
has comment: http://stackoverflow.com/comment/40849058
answers question: http://stackoverflow.com/q/26059724
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/40962791
has text: @hislam...welcome.. if answer solved your problem then accept the answer so that accepted answer help others also..... thanks.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26120144
type: Comment

http://stackoverflow.com/comment/40892927
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26061612
has text: Thank you, I just came up with writing a little loop for setting indexes right before posting the data. However, your "setter" binding definetely tought me another color of knockout :)
type: Comment

http://stackoverflow.com/comment/40974813
type: QuestionComment
has text: Why is this tagged as 'ColdFusion'?
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26140575

http://stackoverflow.com/q/26100666
favorite count: 0
score: 5
tagged with: node.js
accepted answer: http://stackoverflow.com/a/26101273
type: AnsweredQuestion
has body: I'm using Gulp to collect front-matter (via gulp-front-matter plugin) and then, after aggregating it, I'm saving it into another file. Among other data, I'm saving a bunch of CSS. Here's what I have for my compileCSS task: var collected = []; gulp.src('./client/**/*.html') .pipe(frontMatter({ property: 'meta', remove: true })) .pipe(through.obj(function(file, enc, callback) { var css = file.meta; collected.push(css); })) .pipe(gulp.dest('./build/templates')) .on('end', function() { var cssPath = ['build', 'assets', 'css', 'compiled.css']; fs.writeFileSync(cssPath.join(path.sep), cssPath); }) ; The task works as expected (note, it's a simplified version). Everything works as expected and I get a compiled.css file with all of the front-matter CSS. However, I found a need to use the Prefixer not only on my regular css file but on this new compiled.css as well. So I created a prefix task: gulp.task('prefix', ['compileCSS', 'copy'], function() { gulp.src('./build/assets/css/*.css') .pipe(autoprefixer({ browsers: ['last 3 versions'] })) .pipe(gulp.dest('build')) ; }); Now, the problem is that the on('end' function runs at the end of ALL the tasks, not just the compileCSS task. My question is, is there a way to inject an "on end" type task for each task? Or is there a way to use streams somehow (since the last task isn't an actual stream and doesn't take advantage of it, I don't see how).
possible better answer: http://stackoverflow.com/a/26101024
has answer: http://stackoverflow.com/a/26101024
type: Question
upvote count: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/26101273
answer count: 2
has title: How do you run a gulp "on end" task but only at the end of the current task?
has comment: http://stackoverflow.com/comment/40902347
downvote count: 0
tagged with: gulp

http://stackoverflow.com/comment/40786972
type: QuestionComment
comment on: http://stackoverflow.com/q/26037646
score: 0
has text: OK, I was researching bit more on this.. I came across `cordova`. Do you have idea on this so the above can work with `cordova`?
type: Comment

http://stackoverflow.com/q/26188579
accepted answer: http://stackoverflow.com/a/26188699
tagged with: node.js
type: AnsweredQuestion
has body: I am building a mongo query in node as such: query = {"status":{$ne:"Complete"}}, {"processId":1, "_id":0}; then I execute the query: return this.engine.dbcollectionName.find(query).toArray(function(err, result){... If i evaluate "conditions", the result is 'status=$ne:"Complete"'...however, my projection is missing. Am I missing something about how to represent json in javascript variable? It is acting like I didn't include anything after the comma. Another way to say it, in mongo CLI I want: db.collection.find( {"status":{$ne:"Complete"}}, {"processId":1, "_id":0}) whereas within node, i'm getting equivalent of (notice no projection): db.collection.find( {"status":{$ne:"Complete"}}) Any help appreciated! Thanks
type: Question
tagged with: mongodb
tagged with: javascript
has answer: http://stackoverflow.com/a/26188736
has answer: http://stackoverflow.com/a/26188699
has title: Mongo query doesn't include my filter clause
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26188736

http://stackoverflow.com/comment/46039787
has text: Code only answers can generally be improved by adding some explanation.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/28887460
type: AnswerComment

http://stackoverflow.com/q/26112035
has answer: http://stackoverflow.com/a/26112203
type: Question
tagged with: jquery-animate
has body: Ok, so the full example I was going to show is no longer online so I will have to try to explain. What I'm trying to do is have a looping video as the full-screen background, and overtop of that will be a DIV containing a video that continuously moves SLOWLY back and forth across the screen. Here's an example of the animation portion, yet it's too fast: fiddle sample HTML CODE &lt;div style='position:absolute; background-color: blue; height: 50px; width:50px;'&gt;&lt;/div&gt; JS CODE setInterval(function(){ $("div").stop(true,true).animate({left: 300}, 10000, function(){ $(this).stop(true,true).animate({left: 0}, 1000); }); }, 20000); I'm not very good with javascript so maybe someone can just help me figure out the timing aspect. Thank you!
has title: How to Move a DIV Back & Forth SLOWLY Overtop a Background?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26112203
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: animation
tagged with: css
score: 2
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/40922740

http://stackoverflow.com/q/26164181
upvote count: 1
accepted answer: http://stackoverflow.com/a/26164218
possible better answer: http://stackoverflow.com/a/26164256
type: AnsweredQuestion
score: 1
type: Question
answer count: 2
has body: I am refreshing an iframe every 20s using the following src update method: function refresh(){ $('#1').attr('src',function(i, val){ return val; }); }; setInterval(refresh, 20*1000); Is there a way to make the refresh smoother by fading the iframe out then back in? The sudden flash of nothing then somthing is really ugly. Thanks
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26164218
favorite count: 0
has title: Fade out and in iframe on refresh?
has answer: http://stackoverflow.com/a/26164256
tagged with: fadein
tagged with: iframe

http://stackoverflow.com/a/26112831
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26112503
has comment: http://stackoverflow.com/comment/40925012
has body: first i added position to localStorage localStorage.setItem("scrollTop", document.body.scrollTop); then getting same position from it onload(reload) window.onload = function() { var scroll = parseInt(localStorage.getItem("scrollTop")); //parseInt(localStorage.scrollTop); if (!isNaN(scroll)) document.body.scrollTop = scroll; }
accepted answer of: http://stackoverflow.com/q/26112503
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/112621327
score: 2
has comment: http://stackoverflow.com/comment/40925076

http://stackoverflow.com/comment/40847240
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26070383
has text: Check this out. https://developer.chrome.com/devtools/docs/commandline-api

http://stackoverflow.com/a/26180188
upvote count: 2
has body: Try this: window.onbeforeunload = disconnect; In order to reference a function to another variable/property you have to assign the function body itself, that you can access by calling only the function name, e.g. disconnect(type it on your console and you will have the function body). When you try to assign the function with () you are executing it, and assigning its return value at the moment of the assign, so the event will try to evaluate its return value at the moment it will be triggered and not the function itself. I hope this is clear.
downvote count: 0
answers question: http://stackoverflow.com/q/26180128
type: Answer
score: 2

http://stackoverflow.com/a/26098973
answers question: http://stackoverflow.com/q/26098944
downvote count: 0
has comment: http://stackoverflow.com/comment/40898782
has body: You need to use val() method to get input value. And you have a typo of getting text content of tag. Should be $(this).text(), not $(this).text $('button#test_button').click( function(event) { event.preventDefault(); // Get the text in the input box: var input_text = $('input#input_test').val(); $("#selectId > option").each(function() { if( $(this).text() == input_text ) { alert("Alert Triggered"); } }); }); Foo Test Click me!
has comment: http://stackoverflow.com/comment/40898805
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26098944
has comment: http://stackoverflow.com/comment/40898724
score: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26093139
type: Question
has answer: http://stackoverflow.com/a/26093207
has answer: http://stackoverflow.com/a/33959045
tagged with: magento
score: 10
upvote count: 10
has body: I am modifying a Magento theme. And want to add a js file into the theme /js folder. I have added the following code: skin_js js/custom-script.js into the /app/design/frontend/theme-name/default/layout/page.xml and published the js file into /skin/frontend/theme-name/default/js/. But no luck. It is not showing on the page.
downvote count: 0
has answer: http://stackoverflow.com/a/33060851
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/38717745
has answer: http://stackoverflow.com/a/32158701
answer count: 9
has answer: http://stackoverflow.com/a/29339837
has answer: http://stackoverflow.com/a/26111795
has answer: http://stackoverflow.com/a/26093227
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26093272
has title: How to add/include js file into Magento theme

http://stackoverflow.com/q/26096967
tagged with: javascript
favorite count: 0
tagged with: angularjs
has title: AngularJs Filter to single array element and output a property
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/26097458
accepted answer: http://stackoverflow.com/a/26097458
type: AnsweredQuestion
has body: Im trying to access the property of an array of objects by the current id in a loop. {{ available_features | filter:{id: feature.feature_id} }} x Available_features: { id: 1 name: "Feature 1" }, { id: 2 name: "Feature 2" }, { id: 3 name: "Feature 3" }, element.features is an array of ids, the id references the id in the available_features array. This outputs the object but I want the .name property. UPDATE: Seems It works by: {{ (available_features | filter:{id: feature.feature_id})[0].name }}
upvote count: 1
tagged with: angularjs-filter
answer count: 1

http://stackoverflow.com/comment/40851705
type: Comment
has text: Question is about javascript
comment on: http://stackoverflow.com/a/26073163
score: 5
type: AnswerComment

http://stackoverflow.com/comment/40931844
type: AnswerComment
has text: Yeah, the data could only be recognized with the post type of call. Thanks !
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26117335

http://stackoverflow.com/comment/82461392
type: Comment
comment on: http://stackoverflow.com/a/26075553
has text: tried this, doesn't work, FF and Edge will exit fullscreen even if you change iframe src and don't touch location.href
type: AnswerComment
score: 0

http://stackoverflow.com/q/26187694
downvote count: 2
has comment: http://stackoverflow.com/comment/41062593
has comment: http://stackoverflow.com/comment/41062674
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26187741
has body: how i can combine the 2 variables torso and comb to access the the string in the array correctly var comb = new Array("MT 1.1","MT 1.2","MT 1.3","MT 1.4","MT 1.5","MT 1.6","MT 1.7","MT 1.8","MT 1.9","MT 2","MT 2.1","MT 2.2"); var torso = 2; var num = comb[+torso+];
has title: Combine 2 Variables in JavaScript
type: Question
has comment: http://stackoverflow.com/comment/41062690
score: -2
tagged with: arrays
tagged with: javascript
upvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/26187741
favorite count: 0

http://stackoverflow.com/q/26119150
possible better answer: http://stackoverflow.com/a/26119278
downvote count: 2
has answer: http://stackoverflow.com/a/26119278
has comment: http://stackoverflow.com/comment/40934640
type: Question
has answer: http://stackoverflow.com/a/26119242
score: -2
has title: How can i remove the undefined value in selected list
tagged with: javascript
tagged with: jquery
answer count: 3
has body: here is my code if ($("option:contains('" + data.strRoundName + "')").length == 0) $("#selectRound_Type").append(" " + data.strRoundName + " "); PFB my output screen(getting undefined value)
upvote count: 0
has answer: http://stackoverflow.com/a/26119303
has comment: http://stackoverflow.com/comment/40936488
favorite count: 0
has comment: http://stackoverflow.com/comment/40934795
accepted answer: http://stackoverflow.com/a/26119242
has comment: http://stackoverflow.com/comment/40934703
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40934866

http://stackoverflow.com/q/26189884
has comment: http://stackoverflow.com/comment/41066554
upvote count: 1
has comment: http://stackoverflow.com/comment/41066707
favorite count: 0
downvote count: 0
type: UnansweredQuestion
tagged with: php
linked to: http://stackoverflow.com/q/19462649
has title: How to pass a value from JavaScript in php?
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
has body: Translate translator from Google. So that did not swear if something is not clear. Itself from Russia. The question arose. How to pass the value of the alert in the javascript in the variable $ value in php, and write it in the case file. And another question: how to hide the alert? or use instead to visually it was not visible, but the value was passed? //a lot of code { console.log(data); alert(data['value']); } }); So. Also there is a PHP script that writes logs (current page and the previous one) to a file. According to this principle here: //a lot of code $home = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $referer = $_SERVER['HTTP_REFERER']; $value = how the value of the java script to convey here?; $lines = file($file); while(count($lines) &gt; $sum) array_shift($lines); $lines[] = $home."|".$referer."|".$value."|\r\n"; file_put_contents($file, $lines); It is necessary that the value of js is transferred to the php-script and write to the file. How to do it? Prompt please. I am a novice in all of this.
has comment: http://stackoverflow.com/comment/41066529
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41066609
tagged with: jquery
has answer: http://stackoverflow.com/a/26190105

http://stackoverflow.com/a/26124708
answers question: http://stackoverflow.com/q/26109152
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26109152
type: Answer
upvote count: 1
has body: Please see my comment to @Steve above:
score: 1

http://stackoverflow.com/comment/40926431
has text: whats your error? please post it here.
score: 1
comment on: http://stackoverflow.com/q/26114297
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40940625
has text: PHP had already added `checked="checked"` to one of the radio buttons. The above code doesn't add the class in this situation.
type: QuestionComment
comment on: http://stackoverflow.com/q/26122155
type: Comment
score: 0

http://stackoverflow.com/comment/40832441
type: Comment
type: QuestionComment
has text: iframe has required jQuery and windows have one domain
score: 0
comment on: http://stackoverflow.com/q/26062636

canjs-model
tags question: http://stackoverflow.com/q/26109763
tag name: canjs-model
type: Tag

http://stackoverflow.com/q/26159079
has comment: http://stackoverflow.com/comment/41016149
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/41009232
tagged with: javascript
has comment: http://stackoverflow.com/comment/41008887
has comment: http://stackoverflow.com/comment/41008542
score: 0
tagged with: firefox
has comment: http://stackoverflow.com/comment/41009348
tagged with: jquery
has comment: http://stackoverflow.com/comment/41008618
has comment: http://stackoverflow.com/comment/41008903
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41009380
has comment: http://stackoverflow.com/comment/41009446
has body: I am newbie to jQuery... I intend to load html from another location. When I try to load something bigger, I don't get any error (except 'error') or anything, nothing happens instead. Here is my code: $(function () { var text; $("a").on('click', function (e) { $.ajax({ url: $(this).attr('href'), type: 'GET', dataType: 'html' }).done(function (loadedData) { text = $(loadedData).match(/\d{3}/g); $.ajax({ url: '@Url.Action("MvcMethod", "Home")', type: 'POST', dataType: 'html', data: { fulltext: text, filter: '' } }) .done(function (tagData) { $("#target").html(tagData); }); }); e.preventDefault(); }); }); I have a link, full path for a file. The file is exists of course. When I click on it, I would like to pass its content to an MVC action method. What's wrong, help me pls. Thanks. UPDATE: the link maybe points OUT OF domain!
has title: jQuery load() does not work either Chrome or Firefox
answer count: 0
has comment: http://stackoverflow.com/comment/41009284

http://stackoverflow.com/comment/134874726
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/76453616
has text: While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/34532057)

http://stackoverflow.com/q/26056821
has title: How to write parametrized test with Jamine?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26056822
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/34831949
has answer: http://stackoverflow.com/a/34831949
tagged with: jasmine
has body: How to write parametrized tests with Jasmine unit testing framework (or any other other BDD JavaScript testing framework)?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26056822
tagged with: unit-testing
type: Question
has answer: http://stackoverflow.com/a/77497384

http://stackoverflow.com/comment/40962238
has text: @ArunPJohny - yep, fixed.
type: AnswerComment
comment on: http://stackoverflow.com/a/26133790
score: 0
type: Comment

http://stackoverflow.com/q/26139948
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40973273
has title: Changing localStorage with
tagged with: append
answer count: 0
tagged with: onclick
has body: I am making a forum with an admin panel, where the admin can change the information users provide. I am retrieving the user from localStorage to an , but I am not able to change the information and save it in the localStorage. I get the erorr Uncaught TypeError: Cannot set property 'firstName' of undefined every time I click the edit button. P.S: School project. function seeUser(){ $(document).on('click', ".user .glyphicon-edit", function() { var dataPage = "PersonalProfile"; var personalProfileDiv = $("#personalProfile"); $(".MyPage").css({"display":"none"}); $("#personalProfile").html(""); personalProfileDiv.append(" "); personalProfileDiv.append(" "); personalProfileDiv.append(" "); personalProfileDiv.append(" "); personalProfileDiv.append(" Edit user "); }); } $(document).on('click', "#editUserBtn", function() { var userId = $(this).attr("data-userId"); var userFirstNameChange = $(this).prev().prev().prev().prev().val(); var userLastNameChange = $(this).prev().prev().prev().val(); var userEmailChange = $(this).prev().prev().val(); var userPasswordChange = $(this).prev().val(); arrayUsers[userId].firstName = userFirstNameChange; arrayUsers[userId].lastName = userLastNameChange; arrayUsers[userId].email = userEmailChange; arrayUsers[userId].password = userPasswordChange; localStorage.users = JSON.stringify(arrayUsers); });
tagged with: local-storage
type: Question
has comment: http://stackoverflow.com/comment/40973072
score: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40973030
has comment: http://stackoverflow.com/comment/40973854

http://stackoverflow.com/q/26053309
has comment: http://stackoverflow.com/comment/40815209
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: How to create animation based on scroll like this website?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26053438
accepted answer: http://stackoverflow.com/a/26053438
has comment: http://stackoverflow.com/comment/40815231
type: Question
score: 0
upvote count: 1
answer count: 1
downvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/11800622
has body: I recently come across this website http://estimote.com/ First you may notice at the end of this website there is a man standing at the room door . You may search keywords "What are the practical applications?" to locate that place. There is a effect that , when the user scroll the mouse , the screen has some reaction base on the scroll , say , in this website, the man will walk in the room , if user scroll downside , on the other hand, if user scroll another side then , the man leave the room. It seems the effect is just scroll then change image url? I would like to make the question more specific , how to override the scroll event, and execute some function ? Thanks

http://stackoverflow.com/q/26106873
has body: I use a dateDisable variables to hide the div date-warp, the button 'add one', can to change dateDisable variable value to False, but the button 'add date' can not change variable to True. How can I let the code can work? thank you. HTML add one add date JS var app = angular.module('GroupApp',[]); app.controller('addDateControl', function ($scope) { $scope.dateDisable = true; $scope.showDate = function ($event) { $event.preventDefault(); $scope.dateDisable = !$scope.dateDisable; }; }) .directive('voteSelectList', [ function () { return { restrict: 'A', link: function (scope, iElement, iAttrs) { iElement.bind('click', function(event) { event.preventDefault(); }); } }; }]);
possible better answer: http://stackoverflow.com/a/26108954
type: Question
accepted answer: http://stackoverflow.com/a/26108962
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26108962
has answer: http://stackoverflow.com/a/26108954
tagged with: angularjs
has title: How can I binding variable from directive to controller in angular.js?
type: AnsweredQuestion

http://stackoverflow.com/a/26174761
accepted answer of: http://stackoverflow.com/q/26173957
answers question: http://stackoverflow.com/q/26173957
type: AcceptedAnswer
score: 0
type: Answer
has body: For example you can used this code: "mRender": function () { var returnValue = " "; var types = vm.types; var listItems = ""; for (var i = 0; i < types.length; i++) { listItems += " " + types[i].type + " "; } return returnValue.concat(listItems, " "); }

http://stackoverflow.com/a/26154777
answers question: http://stackoverflow.com/q/26114380
type: Answer
has body: i tried more and more to find the right way to solve that bad problem. and finally i found that. the tags, should have a "display:none" property at first. and after page loaded, with jQuery i change them to "display:block" . thats it!
score: 0

http://stackoverflow.com/comment/40851862
has text: Is there any way we can start a chat room here?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26073201
type: Comment

http://stackoverflow.com/a/26075880
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26075321
accepted answer of: http://stackoverflow.com/q/26075321
type: Answer
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/40860092
has body: Try this as javascript: &lt;script type="text/javascript"&gt; $(document).ready(function () { $(document).on('click', 'button', function(){ var selectval = $('select').val(); location.href = "?selectval="+selectval; }); }); &lt;/script&gt;
upvote count: 3

http://stackoverflow.com/q/26121059
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26121154
has comment: http://stackoverflow.com/comment/40938181
score: 0
answer count: 3
has body: As of now i have made this function, but it looks lengthy and ugly. is there any way to generate the months dynamically or another Approach. To better understand please see this fiddle http://jsfiddle.net/Yq3DW/67/ function formatMonth(d) { switch (d) { case 0: return "Jan"; break; case 1: return "Feb"; break; case 2: return "Mar"; break; case 3: return "Apr"; break; case 4: return "May"; break; case 5: return "Jun"; break; case 6: return "jul"; break; case 7: return "Aug"; break; case 8: return "Sep"; break; case 9: return "Oct"; break; case 10: return "Nov"; break; case 11: return "Dec"; default: return "Jan" } } function (d) { return formatMonth(d); }
has comment: http://stackoverflow.com/comment/40938171
has comment: http://stackoverflow.com/comment/40938279
has comment: http://stackoverflow.com/comment/40938327
has title: how to write months in javascript in proper manner
has answer: http://stackoverflow.com/a/26121476
has answer: http://stackoverflow.com/a/26121154
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40938359
type: Question
possible better answer: http://stackoverflow.com/a/26121139
has answer: http://stackoverflow.com/a/26121139
has comment: http://stackoverflow.com/comment/40938152

http://stackoverflow.com/a/26158630
has comment: http://stackoverflow.com/comment/41007801
has comment: http://stackoverflow.com/comment/41007836
has comment: http://stackoverflow.com/comment/41007735
answers question: http://stackoverflow.com/q/26158493
has comment: http://stackoverflow.com/comment/41008119
has comment: http://stackoverflow.com/comment/41007917
score: 0
has comment: http://stackoverflow.com/comment/41007701
has comment: http://stackoverflow.com/comment/41007655
type: Answer
has comment: http://stackoverflow.com/comment/41007732
has body: Something like this: head of the html page (with php extension) <?php include 'pathTo/find.php' ?> in your script tag: var i, len, html = '' list = <?php echo getUsers(); ?>; for ( i = 0; len = list.length; i < len ) { html += ' '+ list[i].firstname +' '; } // $( html ).appendTo( $( '#myList' ) ); <-- jQuery method document.getElementById( 'myList' ).innerHtml = html; your body tag: Selecting elements Select list
has comment: http://stackoverflow.com/comment/41008076

http://stackoverflow.com/comment/40848645
comment on: http://stackoverflow.com/q/26070225
type: Comment
type: QuestionComment
has text: @vernonner3voltazim, I don't think you understand my question, because your answer doesn't make sense to me.
score: 0

http://stackoverflow.com/q/26071772
has comment: http://stackoverflow.com/comment/40859509
has answer: http://stackoverflow.com/a/26071789
type: Question
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/19531624
has comment: http://stackoverflow.com/comment/40859760
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26079242
has comment: http://stackoverflow.com/comment/40860196
has title: Bootstrap tab is working but the tab content is not showing
has comment: http://stackoverflow.com/comment/40856764
has body: I am working on admin dashboard with html, css and javascripts. This is my first time working on it. I used bootstrap for the responsive layout and some bootstrap js (tabs, collaps). I also use chartjs for pie chart and line chart and sidr responsive menu. But the problem is with bootstrap tab and collaps function. They didn't work properly.When i click on the tab menu tabs are working but don't showing chart content in it. I spent lot of time to fix this. But i can't. I need your help. Here is the link for the admin dashboard: http://demo.devkinz.com/admindashboard/
has comment: http://stackoverflow.com/comment/40859463
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40859488
tagged with: twitter-bootstrap-3
tagged with: chart.js

http://stackoverflow.com/comment/41064908
score: 0
type: Comment
type: QuestionComment
has text: Why do you use `cont1.substring(0)` instead of just `cont1`?
comment on: http://stackoverflow.com/q/26188898

http://stackoverflow.com/comment/40943393
comment on: http://stackoverflow.com/a/26123182
type: AnswerComment
has text: Of 'coz you can set some variable to global scope. But this is not a good idea. As a result you have a choice : require vs argument (you can set argument as a array or object and you have a possibility to pass not only Model to context)
score: 0
type: Comment

http://stackoverflow.com/a/26040878
has comment: http://stackoverflow.com/comment/40792414
has comment: http://stackoverflow.com/comment/40792547
accepted answer of: http://stackoverflow.com/q/26040300
has comment: http://stackoverflow.com/comment/40792641
has comment: http://stackoverflow.com/comment/40792346
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40792485
answers question: http://stackoverflow.com/q/26040300
type: Answer
score: 2
has body: Typically we use data binding with core-ajax, but if you need to get at it with JS you can either get the response out of the core-response event that core-ajax fires, or you can look at the response property of the core-ajax tag itself. jsbin example edit: OP wants to get at a core-ajax element inside an auto binding template You should listen for the template-bound event fired by the auto-binding template when it stamps its content to the page. Then you can querySelector for core-ajax. jsbin example edit: To show a nicer approach Since the original poster was specifically asking about getting the response using JavaScript, I gave the fully JS approach. You can clean this up quite a bit using bindings. jsbin example {{data.date}}: {{data.time}}
upvote count: 2

http://stackoverflow.com/comment/76798134
has text: "*attach a function to extend the promise itself.*" - don't do that. Promises are result values, they should not provide the capability to resolve them. You don't want to pass those extended ones around.
type: AnswerComment
comment on: http://stackoverflow.com/a/41604402
score: 0
type: Comment

http://stackoverflow.com/q/26093804
has body: I am trying to create a custom binding handler to apply a role based access to fields on page. In custom handler it will check values of other observables from viewModel and based on condition it will enable or disable input control. But I am not able to get current ViewModel through bindingContext.$parent , $root, $data or $rawData. when I debug on IE it only displays {...} The issue occurs only on IE, It works fine on google crome. Can someone help me on how do I get current ViewModel through bindingContext. var divForm = document.getElementById('divform'); function AuditFormViewModel() { self = this; self.Name = ko.observable("Kiran"); self.Email = ko.observable("kiranparab0@gmail.com"); self.Complete = ko.observable(true); self.Send = ko.observable(false); self.conditionArray = [ { Field: "Name", condition: [{ Property: "Complete", Value: true }, { Property: "Send", Value: true }] }, { Field: "Email", condition: [{ Property: "Complete", Value: false }] } ]; } ko.bindingHandlers.hasAccess = { update: function (element, valueAccessor, allBindings, viewModel, bindingContext) { var field = valueAccessor(); var accessConditions = []; accessConditions = bindingContext.$data.conditionArray; var condition = accessConditions.filter(function (cnd) { return cnd.Field === field })[0].condition; var value = true; for (var i = 0; i &lt; condition.length; i++) { var cndProp = condition[i].Property; var cndVal = bindingContext.$data[cndProp](); value = value &amp;&amp; (condition[i].Value === cndVal); } ko.bindingHandlers.enable.update(element, function () { return value }); } }; auditFormViewModel = new AuditFormViewModel(); ko.applyBindings(auditFormViewModel, divForm); &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.1.0/knockout-min.js"&gt;&lt;/script&gt; &lt;div id="divform"&gt; Name : &lt;input type="text" data-bind="value:Name, hasAccess:'Name'" /&gt; &lt;br /&gt; Email : &lt;input type="text" data-bind="value:Email, hasAccess:'Email'" /&gt; &lt;/div&gt;…
has comment: http://stackoverflow.com/comment/40927130
has comment: http://stackoverflow.com/comment/40998170
has comment: http://stackoverflow.com/comment/40890447
has title: knockout binding handler - undefined bindingContext.$data on IE9
has comment: http://stackoverflow.com/comment/41104891
has comment: http://stackoverflow.com/comment/40890342
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42121954
tagged with: knockout.js
has answer: http://stackoverflow.com/a/26967131
upvote count: 4
tagged with: knockout-3.0
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26967131
tagged with: javascript
tagged with: jquery
score: 4
favorite count: 0

http://stackoverflow.com/a/26304750
answers question: http://stackoverflow.com/q/26183841
has body: The issue I had with my code turned out to be the dataType: "jsonp" statement. I went through a number of iterations of my code. At one point, I was referencing an different domain. Which led me to use the jsonp datatype. In the end, I am referencing a Relative Url which did not need to have the jsonp datatype. I changed the ajax call to dataType: "json" and it was fixed.
score: 0
type: Answer

http://stackoverflow.com/q/26125267
downvote count: 2
answer count: 1
has body: Has anyone else been experiencing issues with Yammer embed breaking their JS this morning. We have several different applications spanning across different technologies (SharePoint, IBM, etc) that has been working for months but this morning we're seeing a lot of "Object Doesn't Support this method" errors. Removing the embed scripts resolve the issues.
has answer: http://stackoverflow.com/a/26137173
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/40946424
accepted answer: http://stackoverflow.com/a/26137173
favorite count: 0
type: Question
has title: Yammer Embed breaking existing JavaScript starting 9/30/2014
tagged with: yammer
upvote count: 2
score: 0

http://stackoverflow.com/q/26090595
upvote count: 2
type: UnansweredQuestion
tagged with: iframe
tagged with: scroll
score: 2
has answer: http://stackoverflow.com/a/26101187
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/40884529
downvote count: 0
tagged with: javascript
favorite count: 0
has title: mouse scrolling wheel not working when the cursor is on the iFrame
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40884063
tagged with: css
has body: Here is my Html: and Here is my CSS .foo1{margin: 0; padding: 0; width:100%; height:90em; overflow-x: scroll; } As I know, overflow-x: scroll; is not necessary, even I removed it, but still It's same. I'm using this for parallax web scrolling. For your information, I tried to use z-index: function, but not effected! Actually mouse scrolling is working in other web areas but not in iFrame specific area. Thanks in Advance.

http://stackoverflow.com/comment/40897135
type: AnswerComment
has text: if (this.className === "A") { alert("i am an a"); } else { alert("i am something else"); } //this was my last attempt
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26097716

http://stackoverflow.com/q/26101435
has comment: http://stackoverflow.com/comment/40903458
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40903539
favorite count: 0
type: AnsweredQuestion
tagged with: popup
has comment: http://stackoverflow.com/comment/40903535
has comment: http://stackoverflow.com/comment/40903273
has title: How to make Popup window always on top
type: Question
has body: I want to open a popup window which should be on top when ever a link from its parent page is clicked. For example when I click on a link (on a parent page) a popup window open and when I click on another link of parent page the previous popup window become on top of that parent page (and all other open browser's windows) I have tried the following codes in that popup window HTML but with no luck. &lt;body onLoad="window.focus();"&gt; and &lt;body onLoad="self.focus();"&gt; and &lt;body onBlur="self.focus();"&gt; Neither of these works. I am using Chrome browser if that helps. Please help!
has comment: http://stackoverflow.com/comment/40903304
has comment: http://stackoverflow.com/comment/40903655
has answer: http://stackoverflow.com/a/26101719
accepted answer: http://stackoverflow.com/a/26101719
tagged with: javascript
score: 0
upvote count: 1
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26140971
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40985523
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26141476
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26141230
has title: Not able to get the content of model in multiple controllers AngularJS
has body: Hope, my question itself, conveys what I am look for. Will put the words in detail 1. Created the Module. var ang = angular.module('myApp', []); I have a controller called controller1, and includes the 'campaign' factory. //controllerone.js ang.controller('controller1', function(campaign){ $scope.campaigns = new campaign(); //Here the whole campaign object is displayed with data, refer the Image 1 attached console.log($scope.campaigns); }); ang.factory('campaign', function($http){ var campaign = function(){ this.timePeriodList = buildTimePeriodList(); ... ... this.campaignList = []; }; Campaigns.prototype.fetchCampaigns = function() { //Some service call to load the data in this.campaignList }; }); Now trying to call the same campaign factory in the second controller, getting only the object structure, not getting the data. //controlertwo.js ang.controller('controller2', function(campaign){ $scope.campaigns = new campaign(); //Here only the campaign object structure is displayed, but no data for campaignList, ref image 2 attached console.log($scope.campaigns); }); Since, factory service is a singleton object, I was expecting for same result as I got in controllerone.js, Image 1: Image 2:
tagged with: prototype-programming

http://stackoverflow.com/comment/40948283
type: Comment
has text: @jmares see update for some example of parameter passing
comment on: http://stackoverflow.com/a/26124541
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40939658
comment on: http://stackoverflow.com/a/26121424
type: Comment
score: 2
has text: @Santhos this is by design in knocout because there is no notions of types in it. However it is a common problem and there is a common pattern exists to solve it: http://knockoutjs.com/documentation/extenders.html#live-example-1-forcing-input-to-be-numeric
type: AnswerComment

http://stackoverflow.com/comment/40953333
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26126587
has text: @ebidel Thanks. Apparently then webdriver still can't see user-created shadow dom. Bummer.

http://stackoverflow.com/q/26184309
linked to: http://stackoverflow.com/q/3779477
tagged with: javascript
linked to: http://stackoverflow.com/q/3802192
has title: Regex fail if more than 3 alpha or 2 special characters exist
linked to: http://stackoverflow.com/q/1444666
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/26184470
favorite count: 0
has body: Trying to validate a string of text. Rules are: Must only have alpha, numeric, special (including space) Cannot have more than 3 alpha characters consecutively Cannot have more than 2 special characters consecutively The validation should fail if the Regex is matched. Separately, these work, but I've been unable to combine them correctly: /^[^\x20-\x7F]+$/ - Regular expression to match all characters on a U.S. keyboard /^(\w)\1{3,}$/ - Regex for detecting the same character more than five times? Invalid Examples: Thiiis would fail. Thiiis wooould 222 fail 2 times. !! is not allowed either. Use case is not allowing users to dirty up postings on a marketplace (think Craigslist). Regex engine is Javascript in an AngularJS directive. Bonus: I would also like to let the user know what failed in the string. Currently I'm doing that for single characters, but not sure how to best output failed consecutive characters "!! is invalid": Current Working Code Snippet: var alphaNumeric = /^[^0-9a-zA-Z\- ]+$/; var charArray = new Array(); for (var i = 0; i &lt; userstring.length; i++) { if (alphaNumeric.test(userstring[i])) { charArray.push(userstring[i]); } } var errorMsg = charArray.join().toString() + " are invalid characters.";
tagged with: regex
downvote count: 0
type: UnansweredQuestion
score: 1
type: Question

http://stackoverflow.com/comment/40794233
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26041737
has text: can you be more clear on what you want, it is not obvious what you want to achieve
score: 0

http://stackoverflow.com/a/26212596
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26163212
answers question: http://stackoverflow.com/q/26163212
score: 0
has body: The problem seems to be that IE < 11 doesn't trigger events on empty . Adding a transparent to the div solves the problem:

http://stackoverflow.com/q/26070260
tagged with: css
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26070453
type: Question
has body: The page I am working on contains a div element with the id "exam", a button with the id of "copy" and a second button with the id "array". The div element contains the text "Exam 1" and when the "copy" button is clicked, this div is duplicated each time the button is clicked. The "array" button is supposed to add each of these "exam" divs to an array and use the alert function to display the length of the array. I can't figure out how to go about having these div elements added to an array when the button is clicked. Here is the HTML I have so far (this also includes Javascript and CSS): Exam 1 Tanner Taylor Exam 1 There's more to it, but I removed the parts that didn't actually deal with this problem. As you can see, I've started the makeArray() function, but wasn't really sure where to go from there, I feel like this is the function I need the most help with. Any suggestions?
answer count: 2
tagged with: arrays
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40846841
accepted answer: http://stackoverflow.com/a/26070454
has title: Adding div elements to an array on button click
possible better answer: http://stackoverflow.com/a/26070453
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26070454
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/40846958

http://stackoverflow.com/q/26167826
has comment: http://stackoverflow.com/comment/41027060
linked to: http://stackoverflow.com/q/8663298
has comment: http://stackoverflow.com/comment/41030633
answer count: 0
type: Question
has title: How to show a real number in JavaScript without rounding it?
has comment: http://stackoverflow.com/comment/41025329
has comment: http://stackoverflow.com/comment/41029661
has comment: http://stackoverflow.com/comment/41025479
score: 0
has comment: http://stackoverflow.com/comment/41030091
linked to: http://stackoverflow.com/q/5812096
linked to: http://stackoverflow.com/q/2108729
has comment: http://stackoverflow.com/comment/41025690
has body: Please look at my code: Click Now Why when I press the button I see 123456789987654320 and not the whole number? I want the paragraph text to be the whole number, that is 123456789987654321.987654321123456789. I know I can cast the number to a string and then go over all the chars in the array. Do you know a simpler way?
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41025568

http://stackoverflow.com/comment/41062674
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26187694
has text: Do you know how to access an array element without a variable? (i.e. directly using the index).

http://stackoverflow.com/comment/41012717
type: QuestionComment
has text: Just let you know that jsfiddle is always helpful
comment on: http://stackoverflow.com/q/26160596
score: 1
type: Comment

http://stackoverflow.com/a/43498200
has body: You need to load the font in preload: var font; function preload() { font = loadFont('thefont.ttf'); } function setup() { createCanvas(600, 400); textFont(font); } function draw() { background(255); text('The Text', 280, 300); }
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/138395165
downvote count: 0
answers question: http://stackoverflow.com/q/26110959
has comment: http://stackoverflow.com/comment/138007836
upvote count: 1

http://stackoverflow.com/a/26183725
score: 0
has body: The best way to do this is to just include the third party library in the head of the HTML file where you include your own js, making sure it is before yours:
type: Answer
answers question: http://stackoverflow.com/q/26183649

http://stackoverflow.com/q/26045410
accepted answer: http://stackoverflow.com/a/26045645
linked to: http://stackoverflow.com/q/10736957
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
tagged with: angularjs
has body: I'm trying to make a page with two sections, which can be slid back and forth horizontally to take up different relative widths on the page. The idea was to track the percentile width of the (to-be) draggable bar separating the two panes/sections, and use ng_style to automatically update the widths of the two "panes" in relation to where that bar is dragged. The following is in a Rails app, with integrated Angular. The Angular's loading just fine -- no errors, and the rest is all working -- and the ng_style is being loaded from the Angular controller when the page first loads up -- but it's not changing when I attempt to drag the spacer in between the two "panes", as it's supposed to. Here's a simplified version of my HAML (sorta like Jade. Just indented HTML): #full-page.fluid{ ng_controller: "ExerciseCtrl", ng_mousemove: 'updateSidebarWidth($event)', ng_mouseup: 'untrackMouseMove()', ng_cloak: true } .spacer .fixed-section-container .exercise-show %div .sidebar-section{ ng_style: '{{ sidebarWidthStyle }}' } .sidebar_header .sidebar %div{ markdown: @exercise.body } .sidebar-toggle{ ng_mousedown: 'trackMouseMove()' } .work_area{ ng_style: '{{ workAreaWidthStyle }}' } And here are the relevant lines in my (Coffeescript) Angular Controller. $scope.sidebarWidth = 35 $scope.trackingMouse = false $scope.trackMouseMove = -&gt; $scope.trackingMouse = true $scope.untrackMouseMove = -&gt; $scope.trackingMouse = false $scope.updateSidebarWidth = (event) -&gt; if $scope.trackingMouse pageWidth = $('.emelyn-layout.middle.fluid').width() x_percent = (event.pageX * 100) / pageWidth x_percent = Math.max( Math.min(100, x_percent), 0 ) $scope.sidebarWidth = x_percent $scope.workAreaWidthStyle = { width: "#{99 - $scope.sidebarWidth}%", marginLeft: "#{$scope.sidebarWidth + 1}%" } $scope.sideBarWidthStyle = { width: "#{$scope.sidebarWidth}%" } In other words, I have this .sidebar-section on the left, then a .sidebar-toggle (just a vertical bar), which should be draggable (which causes …
favorite count: 0
has title: NG Style Failing to automatically bind to page
upvote count: 1
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/26045645
type: Question
tagged with: angularjs-directive
type: AnsweredQuestion

http://stackoverflow.com/comment/66029690
has text: @Saki Is that true? Creating a workspace does copy the library into (e.g.) myws/ext but this is only shared for the purpose of _building_ the apps. The production build of each app _includes_ the ext library (or supposedly just those parts that are actually used by the app, though in my experience this makes little difference) in the app's aggregate js file. (Admittedly, this is based on my experience with ExtJS 6 but I don't believe much has changed in this respect since version 5.)
type: Comment
comment on: http://stackoverflow.com/a/26145043
score: 0
type: AnswerComment

http://stackoverflow.com/a/26183384
answers question: http://stackoverflow.com/q/26183148
has comment: http://stackoverflow.com/comment/41056312
has comment: http://stackoverflow.com/comment/41055075
has comment: http://stackoverflow.com/comment/41054314
has comment: http://stackoverflow.com/comment/41055233
has body: You can setup the prototype chain for this: var a = {}; var Syncer = function(){}; Syncer.prototype = a; var b = new Syncer(); a.foo = 123; b.foo; // 123 b.bar = 456; a.bar // undefined Any property not set on b directly will be looked for on the prototype object, which is a. You can even wrap this up in a convenience function: var follow = function(source) { var Follower = function(){}; Follower.prototype = source; return new Follower(); } var a = {}; var b = follow(a); a.foo = 123; b.bar = 456; a.foo; // 123 b.foo; // 123 a.bar; // undefined b.bar; // 456
score: 0
has comment: http://stackoverflow.com/comment/41054383
upvote count: 1
has comment: http://stackoverflow.com/comment/41054372
downvote count: 1
type: Answer

http://stackoverflow.com/comment/41028095
score: 0
has text: I have content in a html page which is processed by MathJax JS library and yeilds the actual DOM content. This DOM is dynamic is not available unless the DOM content is processed by MathJax. Thats the reason Javascript is in question.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26167306

http://stackoverflow.com/a/26070957
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26051553
type: Answer
accepted answer of: http://stackoverflow.com/q/26051553
upvote count: 1
has comment: http://stackoverflow.com/comment/59399544
score: 1
has body: I made the changes mentioned by @richsilv and @saimeunt and it worked. Resulting code: Meteor.startup(function(){ Meteor.setInterval(function(){Meteor.call('saveStreams');}, 1000); });

http://stackoverflow.com/comment/41042943
type: QuestionComment
comment on: http://stackoverflow.com/q/26177561
score: 0
has text: show some .aspx code
type: Comment

http://stackoverflow.com/q/26101335
upvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/26101709
favorite count: 0
has answer: http://stackoverflow.com/a/26101754
tagged with: http://stackoverflow.com/tag/html
has body: An example, http://www.laravel.com I want to mimic this effect. I've seen it used a lot across the web lately, but I've never seen a tutorial covering how to create it. Anyone happen to have some instructions or perhaps a tutorial on recreating this effect?
accepted answer: http://stackoverflow.com/a/26101709
possible better answer: http://stackoverflow.com/a/26101754
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40903365
downvote count: 2
type: Question
tagged with: jquery-animate
score: -2
has title: How can I make a content div slide over the header div as I scroll?
tagged with: javascript
answer count: 2

http://stackoverflow.com/a/26068930
upvote count: 0
has body: html then js looks like $('.question').get(index) Get Jquery Documentation
type: Answer
downvote count: 1
score: -1
answers question: http://stackoverflow.com/q/26068839

http://stackoverflow.com/comment/41045030
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26178590
has text: Exactly. And if you want some method to be used out of the Base, you have to define it inside it's prototype. Otherwise, it's just defined in scope of instance of your Base class.
score: 0

http://stackoverflow.com/q/26138785
has answer: http://stackoverflow.com/a/26138913
has answer: http://stackoverflow.com/a/26138926
has title: jQuery adding two totals together
has comment: http://stackoverflow.com/comment/40971073
has answer: http://stackoverflow.com/a/26139175
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26138926
type: Question
has body: I have a basic form where customers can select a range of tickets via Checkboxes and Select Boxes. Then it generates a sub total. I am just looking to how I can add these two sub totals together. My HTML is Additional Adults - £228 1 2 3 4 5 0 1 2 3 4 5 Young Adults 16-21 - £146 1 2 3 4 0 1 2 3 4 Base Fee RESULT HERE My Code is: var total_adults = $("#adults_total"); var checkBox_adults = $("#adults input[type='checkbox']"); var _select_adults = $("#adults select"); checkBox_adults.click(function(){ checkBox_adults.prop("checked", false); var _index = $(this).attr("id"); total_adults.val(_index * 228); _select_adults.val(_index); checkBox_adults.each(function(){ if (_index > 0) { $(this).prop("checked", true); _index--; } }); }); _select_adults.change(function() { checkBox_adults.prop("checked", false); var _val = $(this).val(); total_adults.val(_val * 228); checkBox_adults.each(function() { if (_val > 0) { $(this).prop("checked", true); _val--; } }); }); var total_young = $("#young input[name='Young Sub Total']"); var checkBox_young = $("#young input[type='checkbox']"); var _select_young = $("#young select"); checkBox_young.click(function(){ checkBox_young.prop("checked", false); var _index = $(this).attr("id") total_young.val(_index * 146); _select_young.val(_index); checkBox_young.each(function(){ if (_index > 0) { $(this).prop("checked", true); _index--; } }); }); _select_young.change(function() { checkBox_young.prop("checked", false); var _val = $(this).val(); total_young.val(_val * 146); checkBox_young.each(function() { if (_val > 0) { $(this).prop("checked", true); _val--; } }); }); For adding in jQuery I tried doing this but its not working var num1 = $("#adults_total").val(), num2 = $("#young_total").val(), result = parseInt(num1, 10) + parseInt(num2, 10); $(".result").text(result); I also have a fiddle demo here - http://jsfiddle.net/barrycorrigan/L2as6143/1/
tagged with: javascript
tagged with: jquery
score: 0
possible better answer: http://stackoverflow.com/a/26138913
answer count: 3

http://stackoverflow.com/a/26155498
score: 1
has comment: http://stackoverflow.com/comment/41003038
has comment: http://stackoverflow.com/comment/41002381
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26154774
has body: You can use javascript to change height. &lt;body onresize="resizediv()"&gt; &lt;div class="mybanner" id="mybanner"&gt; ... &lt;script&gt; function resizediv() { div = document.getElementById('mybanner'); var imageSrc = div.style.backgroundImage.replace(/url\((['"])?(.*?)\1\)/gi, '$2').split(',')[0]; var image = new Image(); image.src = imageSrc; var width = image.width, height = image.height; div.style.height = image.height; } &lt;/script&gt; Or There are all background size valid properties, you can chose best one: http://www.w3schools.com/cssref/playit.asp?filename=playcss_background-size&amp;preval=contain Or simple don't use background, put the IMG to the div as a object and set image width 100% don't edit div and image height, it will compute automatically.
type: Answer
has comment: http://stackoverflow.com/comment/41002413
has comment: http://stackoverflow.com/comment/41002978
has comment: http://stackoverflow.com/comment/41003129
answers question: http://stackoverflow.com/q/26154774
upvote count: 1
has comment: http://stackoverflow.com/comment/41002605

http://stackoverflow.com/comment/40806982
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26048527
has text: @MathiasBrandt what build of PhpStorm are you using?
type: AnswerComment

http://stackoverflow.com/q/26150613
tagged with: events
has comment: http://stackoverflow.com/comment/40994094
has title: How can I detect the event of FireFox closing?
has answer: http://stackoverflow.com/a/26151716
has comment: http://stackoverflow.com/comment/40994060
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40994280
type: Question
linked to: http://stackoverflow.com/q/9973816
score: 0
tagged with: firefox
answer count: 1
has body: I would like to execute some code when a user refresh the page but Firefox won't execute my code and nothing work for me. I tried the example below which deoesn't work. I have a global variable called websocket (window.websocket). window.onunload=function(){ return window.websocket.send(JSON.stringify({type: 'disconnect'})); }; $(window).on("unload",function() { return window.websocket.send(JSON.stringify({type: 'disconnect'})); }; $(window).unload = function() { return window.websocket.send(JSON.stringify({type: 'disconnect'})); }; window.addEventListener("unload", function (e) { window.websocket.send(JSON.stringify({type: 'disconnect'})); (e || window.event).returnValue = null; //Gecko + IE return null; //Webkit, Safari, Chrome etc. }); I've tried some more but nothing work in firefox expect the example below who show me a message come from nowhere and ask me to confirm exit page, but I don't want any confirmation. I really don't understand. window.addEventListener("beforeunload", function (e) { var confirmationMessage = "\o/"; (e || window.event).returnValue = confirmationMessage; //Gecko + IE return confirmationMessage; //Webkit, Safari, Chrome etc. }); I don't want any message, just run my code. It's impossible with Firefox?
tagged with: javascript
has comment: http://stackoverflow.com/comment/40993678
favorite count: 0
has comment: http://stackoverflow.com/comment/40993401
has comment: http://stackoverflow.com/comment/40994936
has comment: http://stackoverflow.com/comment/40994477
has comment: http://stackoverflow.com/comment/40993575
has comment: http://stackoverflow.com/comment/40993563
has comment: http://stackoverflow.com/comment/40993508

http://stackoverflow.com/q/26170427
has comment: http://stackoverflow.com/comment/41030202
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/44760282
has comment: http://stackoverflow.com/comment/41030188
has title: Javascript string comparison error
has body: I have a problem with a piece of code that I use to check if a function returns a string that is equal to another string. The problem sounds trivial, but I cannot seem to get it to work. Here is the code, and make sure you yell at me if you'll need any more code. &lt;script&gt; function emptyElement(x){ _(x).innerHTML = ""; } function login(){ var e = _("email").value; var p = _("password").value; if(e == "" || p == "") { _("status").innerHTML = "Fill out all of the form data"; } else{ _("loginbtn").style.display = "none"; _("status").innerHTML ='please wait...'; var ajax = ajaxObj("POST", "index.php"); ajax.onreadystatechange = function() { if(ajaxReturn(ajax) == true) { document.write(ajax.responseText); // returns "login_failed" when I try it if(ajax.responseText == "login_failed"){ _("status").innerHTML = "Login unsuccessful, please try again."; _("loginbtn").style.display = "block"; } else { //window.location = "afterlogin.php?u="+ajax.responseText; } } } ajax.send("e="+e + "&amp;p="+p); } } &lt;/script&gt; The window.location function is commented out for testing purposes. Don't mind that. Below, I will post code for the two scripts that are used, "main" and "ajax". function ajaxObj( meth, url ) { var x = new XMLHttpRequest(); x.open( meth, url, true ); x.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); return x; } function ajaxReturn(x){ if(x.readyState == 4 &amp;&amp; x.status == 200){ return true; } } And the code for main.js function _(x){ return document.getElementById(x); } I do not want to take credit for the original code; it is gathered from developphp.com and just altered slightly. The problem is that, as I've commented, the line ajax.responseText == "login_failed" never seems to be true, not matter how I do. This is what I need guidance on. Regards
type: Question
tagged with: javascript
tagged with: comparison
has comment: http://stackoverflow.com/comment/41030187
tagged with: ajax
has comment: http://stackoverflow.com/comment/41030326
score: 0
answer count: 1
tagged with: string

http://stackoverflow.com/a/26188234
has comment: http://stackoverflow.com/comment/73694845
has comment: http://stackoverflow.com/comment/73706017
has body: Per the documentation: If caused by a click, the clicked element is available as the relatedTarget property of the event. But you're just calling .modal('toggle'). That doesn't involve any click event, hence why relatedTarget in undefined in your case.
has comment: http://stackoverflow.com/comment/46352075
type: Answer
score: 2
upvote count: 3
downvote count: 1
answers question: http://stackoverflow.com/q/26187370
has comment: http://stackoverflow.com/comment/46336553

http://stackoverflow.com/a/26111748
type: Answer
answers question: http://stackoverflow.com/q/26110433
has body: how about: openDialog : function() { var me = this; var dialog = Ext.create('Ext.window.Window', { title : 'Permission Uesr', itemId : 'adduserpopup', id : 'adduserpopup', closeAction: 'hide', modal : true, width : 1000, height : 400, layout : { type: 'vbox', align: 'stretch', padding: 5 }, resizable : false, items : [ createuserinformation,itemselectorGrid], buttons : [ { text : 'Save', id : 'okbutton', handler: function () { console.log("Save user Data 1 :"+this.up('window')); me.saveUserData(); // instead using this use local variable me } } ] }); dialog.show(); },
score: 0

http://stackoverflow.com/q/26178152
tagged with: javascript
has title: Can I make this function defenition even shorter?
answer count: 2
has comment: http://stackoverflow.com/comment/41044169
tagged with: functional-programming
downvote count: 0
has comment: http://stackoverflow.com/comment/41044258
has answer: http://stackoverflow.com/a/26178381
accepted answer: http://stackoverflow.com/a/26179868
favorite count: 0
has comment: http://stackoverflow.com/comment/41044171
possible better answer: http://stackoverflow.com/a/26178381
has comment: http://stackoverflow.com/comment/41047916
has comment: http://stackoverflow.com/comment/41045381
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/41044916
has comment: http://stackoverflow.com/comment/41045271
has body: I am trying move more towards functional programming in my javascript applications. I currently use the library ramda as a base lib for this. My desire: Create a function findWithId(id, list) which returns the item in the list with the property _id matching the input id. Make the implementation of it as short as possible, relying on existing code as much as possible. Acheived so far: My base is R.find which has this defenition find :: (a -&gt; Boolean) -&gt; [a] -&gt; a | undefined I tried some different solutions shown below: //Using ramdajs (ramdajs.com) var hasId = R.curry(function(id, item) { return item._id === id }); //This doesn't work var findWithId_v1 = R.find(hasId); //This works but can I make it as short as v1? var findWithId_v2 = function(id, list) { return R.find(hasId(id), list); } Question Can I make findWithId_v2 as short as findWithId_v1 by using standard functional programming tools like compose, curry etc? Plunker demo http://plnkr.co/edit/xAYx15yk6lBzutdAL9HC?p=preview
upvote count: 3
tagged with: ramda.js
has comment: http://stackoverflow.com/comment/41044207
has comment: http://stackoverflow.com/comment/41044097
type: Question
has answer: http://stackoverflow.com/a/26179868
linked to: http://stackoverflow.com/q/17386706
has comment: http://stackoverflow.com/comment/41045042
tagged with: currying

http://stackoverflow.com/comment/41057478
comment on: http://stackoverflow.com/a/26176648
type: Comment
score: 0
type: AnswerComment
has text: Exactly. Then what I think it's happening is that when you try to register the click handler nothing guarantees you that the iframe document is ready. I mean, when the `$(document).ready` executes the iframe may not be loaded yet and you are just trying to register the click handler on an empty DOM.

http://stackoverflow.com/q/26037486
answer count: 1
has comment: http://stackoverflow.com/comment/40786352
tagged with: javascript
favorite count: 0
upvote count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/33266402
tagged with: angularjs
downvote count: 0
type: UnansweredQuestion
score: 3
type: Question
has title: angularjs directive with isolated scope doesn't parse variable in template
has body: I have a directive: angular.module('spApp.directives').directive("clickToEditPlain", function() { var editorTemplate = ' ' + ' ' + '{{value}} ' + 'Edit' + ' ' + ' ' + ' ' + 'Save' + ' or ' + 'cancel.' + ' ' + ' '; return { restrict: "A", replace: true, template: editorTemplate, scope: { value: "=clickToEditPlain", ngModel: "=", inputName: "@", inputId: "@" }, controller: function($scope) { } }; }); It works as expected. There is well parsed html on page where I can see properly evaluated inputId and inputName: But when I check a structure in debugger I see that name inputName evaluated in {{inputName}}: Also the directive placed in ng-form.

http://stackoverflow.com/comment/40892821
comment on: http://stackoverflow.com/q/26095044
has text: btw is this a typo `activityconunt` ? shouldnt this be `activitycount` ? and updated my answere with a faster and tested solution. Its way less code the all other solutions. Actually only one line ^^
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26046651
has comment: http://stackoverflow.com/comment/40803427
has body: I personally hate Do-it Buttons so I'd go with a more dynamic solution: // Get the Input elements: var $f = document.getElementById("f"); var $c = document.getElementById("c"); function FC_CF() { var temp; // Will hold the temperature value var $targ; // Used to target the element we're not typing into: if (this.id === "c") { // If we're typing into #c... $targ = $f; // use #f as target element temp = (this.value * 9 / 5) + 32; // C2F } else { $targ = $c; temp = (this.value - 32) * 5 / 9; // F2C } // Write the result "as we type" in the other ($targ) field: $targ.value = !isNaN(temp) ? parseFloat(temp.toFixed(1)) : "Err"; // (Above:) temp is a num ? return floated number, else: "Show some error" } // Assign input listeners to trigger the above function: $f.oninput = FC_CF; $c.oninput = FC_CF; Celcius: &lt;input id="c"&gt; Fahrenheit: &lt;input id="f"&gt;
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40803177
upvote count: 1
has comment: http://stackoverflow.com/comment/40803157
has comment: http://stackoverflow.com/comment/40803188
type: Answer
answers question: http://stackoverflow.com/q/26046474

http://stackoverflow.com/q/26053343
score: 4
has comment: http://stackoverflow.com/comment/52890548
has body: I want to create a small project where a user enters in a word (preferably a palindrome) and the second half is flipped. Like the good ol' ABBA logo but the other way around. I have been reading quite a few pages but none have satisfied my need. I thought about using SVG's &lt;text&gt; element but I didn't quite understand some things about it. Basically, my expected output would be something like this: This is just a dodgy image I whipped up and it's not a great example because a B rotated 180 degrees can look like one flipped horizontally depending on the font. What I'm basically asking is, is what I'm after achievable with CSS and/or JavaScript?
answer count: 3
has answer: http://stackoverflow.com/a/26053538
has title: CSS Flip Letter Horizontally
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26053505
favorite count: 0
has answer: http://stackoverflow.com/a/26053505
has answer: http://stackoverflow.com/a/26053425
has comment: http://stackoverflow.com/comment/40815184
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/52846766
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/52855690
has comment: http://stackoverflow.com/comment/40816436
downvote count: 3
upvote count: 7
has comment: http://stackoverflow.com/comment/52888557
accepted answer: http://stackoverflow.com/a/26053425
type: Question
has comment: http://stackoverflow.com/comment/40815271

http://stackoverflow.com/comment/40925189
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26113402
has text: Yea, from what I've read (and experienced) when using ng-click to set a variable, that is set first, so setting form.isUpdating to true immediately disables the form, so the button is disabled, img is there, but nothing else is triggered.
score: 0

http://stackoverflow.com/q/26115441
has comment: http://stackoverflow.com/comment/40928336
has answer: http://stackoverflow.com/a/26115715
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26115676
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40928880
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Closing or hiding an info box with an x
tagged with: cookies
has comment: http://stackoverflow.com/comment/40928362
linked to: http://stackoverflow.com/q/1458724
type: Question
has comment: http://stackoverflow.com/comment/40928531
has body: I have tried searching for clues, but drawn a big blank. Probably I am searching for the wrong thing! I have created a basic info block on a page. I would like to give users the option to hide or close that box by clicking on an x. I am assuming that I would need to use a cookie - but no idea where to start! Maybe jquery, as I have that loaded on every page for other elements? The one important factor is that it should re-appear when new information is displayed. How is that done? Can anyone assist? Thanks!
tagged with: javascript

http://stackoverflow.com/q/26179180
answer count: 1
accepted answer: http://stackoverflow.com/a/26179255
tagged with: angularjs
has body: There are many examples using directives for creating dynamic forms with angularjs but i'm trying to do something different. Currently i am using this in my js file: .directive('myCustomer', function() { return { restrict: 'E', templateUrl: 'my-customer.html' }; }); This is my-customer.html Name: {{customer.name}} Address: {{customer.address}} How to request a templateUrl from web like this: .directive('myCustomer', function() { return { restrict: 'E', templateUrl: 'http://www.garsoncepte.com/my-customer.php' }; }); Working example can be seen here: http://plnkr.co/edit/U41xyBeeFXV7Osr7pI2Y?p=preview
type: AnsweredQuestion
has title: Is it possible to use dynamic templateurl from web with angularjs?
has answer: http://stackoverflow.com/a/26179255
type: Question
tagged with: javascript
tagged with: ionic-framework
score: 0

http://stackoverflow.com/comment/41074774
comment on: http://stackoverflow.com/q/26193675
score: 0
has text: I guess that's because you don't translate anything. What do you expect it to do?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26075259
upvote count: 2
has body: In vanilla, you could use node.querySelector or node.querySelectorAll with a selector which matches these attributes, for example function getTds(row, col) { // NodeList return document.querySelectorAll('td[row="' + row + '"][col="' + col + '"]'); } Then for row 4 col 0 var td = getTds(4, 0)[0]; // HTMLTableCellElement or undefined
answers question: http://stackoverflow.com/q/26075241
has comment: http://stackoverflow.com/comment/40855271
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/q/26075199
answer count: 3
has comment: http://stackoverflow.com/comment/40855152
tagged with: jquery
has answer: http://stackoverflow.com/a/26075451
tagged with: http://stackoverflow.com/tag/html
tagged with: increment
has answer: http://stackoverflow.com/a/26075242
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26075242
tagged with: dom
type: Question
has title: Javascript increment through elements within div?
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26075236
has body: Ok, so I have the following HTML: I need to increment through each of these divs and compare classes that each has. How would I go about doing this? Currently I have this: $('.calculator-section').each(function(i, obj) { $(this).$('p').each(function(i, obj) { //This bit doesn't work //Check classes for $(this) here? }); }); But I'm not sure what to do for that inner loop. Any ideas?
has answer: http://stackoverflow.com/a/26075236
score: 0

http://stackoverflow.com/comment/84496480
type: AnswerComment
has text: Note that the order of the bindings matters. This does not work when the `checked` binding is before the `attr.value` binding.
type: Comment
comment on: http://stackoverflow.com/a/26241126
score: 0

http://stackoverflow.com/a/26053170
answers question: http://stackoverflow.com/q/26052485
accepted answer of: http://stackoverflow.com/q/26052485
type: AcceptedAnswer
downvote count: 0
has body: Just add custom header from nginx to node Usually it's proxy_set_header X-Forwarded-Proto $scheme; and in node it will appear in request.headers['x-forwarded-proto']. References: http://nginx.org/r/$scheme http://nginx.org/r/proxy_set_header http://nodejs.org/api/http.html#http_message_headers
upvote count: 3
type: Answer
score: 3

http://stackoverflow.com/comment/40937032
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26113633
has text: I didn't used ng-table but I have done something I hope that can help you : http://codepen.io/anon/pen/oFreq?editors=101 Ask me for more information.

http://stackoverflow.com/a/26052705
type: Answer
has comment: http://stackoverflow.com/comment/40845907
has comment: http://stackoverflow.com/comment/40845359
score: 0
has body: I think you need to JSON.stringify instead of parse, since parse if used the other way around. JSON.parse takes a string and converts it to a JSON object. Try to stringify your testdata $.ajax(url, { type: "POST", data: JSON.Stringify(testdata), contentType: 'application/x-www-form-urlencoded' }).always(showResponse) return false; }; If that doesn't work, leave out the contentType from the ajax call, or write contentType:"application/json" instead. And also post your SubmissionInputModel. Could be some naming that is wrong there :)
answers question: http://stackoverflow.com/q/26052501
has comment: http://stackoverflow.com/comment/40845918

http://stackoverflow.com/a/26142335
has comment: http://stackoverflow.com/comment/40977570
has comment: http://stackoverflow.com/comment/40977657
has comment: http://stackoverflow.com/comment/40977613
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40977580
answers question: http://stackoverflow.com/q/26142252
downvote count: 0
has comment: http://stackoverflow.com/comment/40977717
type: Answer
has body: Problems in your code :- 1)-You have concatenated your strings in the wrong way. 2)-You used background .You should use background-image. 3)-You have written ; in your jQuery css code ( "url("+bgImg+");") ) Try this :- var bgImg = "http://www.domain.com/my-image.jpg"; $('#myBanner').css({"background-image":"url('"+bgImg+"')"});
has comment: http://stackoverflow.com/comment/40977710

http://stackoverflow.com/comment/40787459
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26038003
has text: Alright. that was helpful. but how should i calculate the available space. that depends on browser windows size. any lead or help ?
score: 0

http://stackoverflow.com/a/26293331
score: 1
upvote count: 1
type: AcceptedAnswer
has body: Apparently this was a bug in Java 8. I posted to the Nashorn mailing list; here is the reply: I can reproduce the problem with 8u20, however it seems to be fixed in JDK 9 and JDK8u40. You can download a preview release of 8u40 here: https://jdk8.java.net/download.html The email: http://mail.openjdk.java.net/pipermail/nashorn-dev/2014-October/003614.html ( Edit: There's another ArrayIndexOutOfBounds error in 8u40, read more here: http://mail.openjdk.java.net/pipermail/nashorn-dev/2015-March/004268.html "Cannot parse JSON: { 0: null, 100: null }". That problem has been fixed in 8u60. )
accepted answer of: http://stackoverflow.com/q/26189940
type: Answer
answers question: http://stackoverflow.com/q/26189940
downvote count: 0

http://stackoverflow.com/q/26073317
upvote count: 3
has answer: http://stackoverflow.com/a/32142396
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has body: Why pictures don't appear on my page? Uncaught IndexSizeError: Failed to execute 'insertCell' on 'HTMLTableRowElement': The value provided (1) is outside the range [-1, 0] - this error call on this string. [JS]var cell = row.insertCell(i);[/JS] function createPreview() { var f = document.createElement("table"); var row = f.insertRow(); var cell = row.insertCell(i); for(var j = 0; j &lt; count ; j++) { var img = new Image(); img.src = "image/" + j + ".jpg"; img.id = "i" + j; cell.appendChild(img); } document.body.appendChild(f); } &lt;/script&gt;[/JS]
favorite count: 0
type: UnansweredQuestion
has title: Uncaught IndexSizeError: Failed to execute 'insertCell' on 'HTMLTableRowElement': The value provided (1) is outside the range [-1, 0]
score: 3
has comment: http://stackoverflow.com/comment/40852862
downvote count: 0
has answer: http://stackoverflow.com/a/72872545
type: Question
has answer: http://stackoverflow.com/a/33556688
tagged with: javascript

http://stackoverflow.com/comment/40929610
score: 0
comment on: http://stackoverflow.com/q/26115976
type: Comment
type: QuestionComment
has text: I did console.log(this.section) and I get undefined. How can I solve this?

http://stackoverflow.com/q/26183148
has comment: http://stackoverflow.com/comment/41054240
has comment: http://stackoverflow.com/comment/41054170
accepted answer: http://stackoverflow.com/a/26183194
has body: For security purposes, I have a need for a "mirrored" object. i.e. if I create object A, and shallow-clone a copy of A and call it B, whenever a property of A changes, I hope to have B automatically update itself to reflect the changes, but not the other way around. In other words, one-way property syncing. My question: is there already a solution out in the wild that I'm not aware of? Was thinking of implementing a library with observe-js (https://github.com/polymer/observe-js), but thought I should ask around before proceeding. Thanks.
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26183384
tagged with: object.observe
has answer: http://stackoverflow.com/a/26183384
has title: JavaScript Object Mirroring/One-way Property Syncing
type: Question
has comment: http://stackoverflow.com/comment/41054292
has comment: http://stackoverflow.com/comment/41055812
has comment: http://stackoverflow.com/comment/41055187
tagged with: javascript
has answer: http://stackoverflow.com/a/26183194
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41053890
has comment: http://stackoverflow.com/comment/41054016

http://stackoverflow.com/a/26086463
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40875910
answers question: http://stackoverflow.com/q/26086234
has body: You're setting the hidden field asynchronously, after your form has already submitted. You need to only submit the form after the async response arrives.

http://stackoverflow.com/comment/40803486
score: 0
type: AnswerComment
has text: (I personally still prefer the `typeof` check for semantic reasons, I'm just arguing the point about redefining the value)
type: Comment
comment on: http://stackoverflow.com/a/26046726

http://stackoverflow.com/a/26059602
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/26059539
answers question: http://stackoverflow.com/q/26059539
score: 2
has body: To check if a post request is made: if($_SERVER['REQUEST_METHOD']=='POST'){ echo "working"; } Note that uploaded files data will be in the $_FILES superglobal, not $_POST, and as mentioned by Fred, you will need to add the enctype attribute on your form

http://stackoverflow.com/a/61373094
has comment: http://stackoverflow.com/comment/108576071
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26079611
downvote count: 3
score: -2
has body: I did this and now my app is working properly, res.sendFile('your drive://your_subfolders//file.html');

http://stackoverflow.com/comment/86682317
has text: Hi @Gari, did you find a solution for this? could you please help me?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26082742

http://stackoverflow.com/q/26106072
type: Question
tagged with: javascript
tagged with: gruntjs
has title: How to change the path to JS .map files in Grunt & Coffee Script
downvote count: 0
tagged with: relative-path
favorite count: 0
type: UnansweredQuestion
has body: I have the following snippet in my gruntfile: coffee: { dev: { options: { bare: true, sourceMap: true, sourceMapDir: 'grails-app/assets/javascripts/map/' }, expand: true, cwd: "grails-app/assets/javascripts/coffee/", src: [ "**/**.coffee" ], dest: "grails-app/assets/javascripts/js/", ext: ".js" } }, ... when it creates the .js files it attaches the following line to the file: //# sourceMappingURL=../../../../../grails-app/assets/javascripts/map/Init.js.map which results in 404 errors in js console But What I want to see is: //# sourceMappingURL=assets/javascripts/map/Init.js.map I can edit the actual coffee script module, but wanted to know if there is any other ways to change the relative path using Grunt
answer count: 0
score: 1
tagged with: coffeescript
upvote count: 1

http://stackoverflow.com/comment/40811925
has text: So the correct way is to do{ this.attributes = { 'title' : 'undefined' // or title : 'undefined' ? using or not using a string as the key
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26051151
type: Comment

http://stackoverflow.com/comment/40901194
type: QuestionComment
comment on: http://stackoverflow.com/q/26100218
has text: Let's see, you searched for "reverse string javascript" before posting this question and found nothing, I guess. Seems no-one ever had this problem before. Except http://stackoverflow.com/questions/1611427/reversing-a-string-in-javascript, http://stackoverflow.com/questions/4859208/recursive-string-reversal-function-in-javascript (see duplicate answer below), and off-site resources such as http://eddmann.com/posts/ten-ways-to-reverse-a-string-in-javascript/.
score: 3
type: Comment

http://stackoverflow.com/q/26050677
type: Question
tagged with: google-closure-compiler
has body: My application assigns variables to the $scope in a controller, like $scope.myVariable = 123; After I run Closure Compiler, that code gets turned into $scope.a = 123; and $scope.b = 123; and so on... My html templates have things like &lt;p&gt;{{ myVariable }}&lt;/p&gt; I need to update the templates to &lt;p&gt;{{ a }}&lt;/p&gt; to match the new name of the renamed property myVariable. I know that I can use the CC /** @expose */ annotation, or I can do something like $scope['myVariable'] = 123 so that CC does not rename that specific property. However, I would like to keep renaming the variable properties. I have 2 options that I see: Write a script that uses the _props_map.out from the CC, and write a script that sear-replaces the strings in my HTML. Write my templates in javascript, so that CC will also process my templates, and then run the template function which spits out html of a template. What would be the best way to keep renaming my variables and update the template html?
tagged with: javascript
has title: Update AngularJS template HTML after running Google Closure Compiler on app code
upvote count: 4
has answer: http://stackoverflow.com/a/29319664
downvote count: 0
answer count: 1
tagged with: templates
favorite count: 0
has comment: http://stackoverflow.com/comment/57369052
tagged with: angularjs
type: UnansweredQuestion
tagged with: node.js
score: 4

http://stackoverflow.com/comment/40900461
has text: The query should be parameterized. Never build a SQL statement string by concatenating user input.
type: Comment
comment on: http://stackoverflow.com/a/26096888
score: 0
type: AnswerComment

http://stackoverflow.com/q/26060212
accepted answer: http://stackoverflow.com/a/26060526
type: Question
has answer: http://stackoverflow.com/a/26060526
tagged with: javascript
score: 0
answer count: 1
has title: coloring paths from external svg
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I am searching for a way to color svg paths from an external file and found this tutorial from Drew Baker. But it does not seem to work for me. This is how my files look like: SVG test The SVG-File contains paths like . Can you spot an error or is this method simply deprecated? I could need a hand here... Thanks in advance!
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/svg
linked to: http://stackoverflow.com/q/11978995

http://stackoverflow.com/q/26051553
accepted answer: http://stackoverflow.com/a/26070957
has comment: http://stackoverflow.com/comment/40847878
score: 1
has body: I am in the process of learning Meteor while at the same time experimenting with the TwitchTV API. My goal right now is to call the TwitchAPI every minute and then insert part of the json object into the mongo database. Since MongoDB matches on _id and Twitch uses _id as its key I am hoping subsequent inserts will either update existing records or create a new one if the _id doesnt exist yet. The call and insert (at least the initial one) seem to be working fine. However, I can't seem to get the Meteor.setTimeout() function to work. The call happens when I start the app but does not continue occurring every minute. Here is what I have in a .js. file in my server folder: Meteor.methods({ getStreams: function() { this.unblock(); var url = 'https://api.twitch.tv/kraken/streams?limit=3'; return Meteor.http.get(url); }, saveStreams: function() { Meteor.call('getStreams', function(err, res) { var data = res.data; Test.insert(data); } } }); Deps.autorun(function(){ Meteor.setTimeout(function(){Meteor.call('saveStreams');}, 1000); }); Any help or advice is appreciated.
has comment: http://stackoverflow.com/comment/40819803
type: Question
tagged with: mongodb
answer count: 1
downvote count: 0
tagged with: javascript
has title: Meteor - Server-side API call and insert into mongodb every minute
has comment: http://stackoverflow.com/comment/40812846
favorite count: 0
has answer: http://stackoverflow.com/a/26070957
tagged with: meteor
upvote count: 1
type: AnsweredQuestion
tagged with: settimeout

http://stackoverflow.com/q/26088553
score: 0
answer count: 1
tagged with: javascript
type: UnansweredQuestion
tagged with: ember.js
tagged with: checkbox
has answer: http://stackoverflow.com/a/26089081
tagged with: handlebars.js
has title: Using EmberJS capture the dynamically generated checkbox checked Events
type: Question
has body: Hi I am using emberjs and mapbox.js in my application and as per the mapboxjs It will automatically display the map and along with overlays[checkboxes]on the map once my page loads App.FullMap = Ember.View.extend({ /** * Public construction properties */ vehicles: [], /** * Private properties & methods */ _vmarkers: [], classNames: ['map full-map'], didInsertElement: function() { this.map = L.map(this.get('element'), { minZoom: 4, maxZoom: 16, attributionControl: false, worldCopyJump: true }); this.set('controller.map', this.map); var overlays = []; overlays['2 wheelers'] = {name:"2 wheelers"}; overlays['3 wheelers'] = {name:"3 wheelers"}; overlays['4 wheelers'] = {name:"4 wheelers"}; overlays['Heavy Load'] = {name:"Heavy Load"}; // Build the layer control _.maps.layerControl(this.map, 'topleft', { normal: true, satellite: true }, overlays); $('.leaflet-map-pane').addClass('normal-view'); this.createMarkers(); }); After loading this view in HBS the mapbox will autoamtically genrate these checkbox overlays as follows <input type="checkbox" class="leaflet-control-layers-selector 2 wheelers 3 wheelers 4 wheelers Heavy Load Now My Question is how to access the checkbox property using ember,because that checkboxes will be automatically rendered by added Overlays of the Map BoxJS,and How can I will be check the checkbox. Based on the checkbox event I want to display list of markers on the map Kindly help me to call this function based on the checkbox event this.createMarkers();

http://stackoverflow.com/q/26163565
answer count: 0
has comment: http://stackoverflow.com/comment/41017378
tagged with: wordpress
has comment: http://stackoverflow.com/comment/41017877
has comment: http://stackoverflow.com/comment/41018182
has body: I'm trying to work out how to do a normal php or WP loop inside a javascript function and I cannot work out the correct solution. Below is where I am currently at, as I wish for the available Tags to be those that fall under a certain post type, or even just a normal PHP loop. EDIT/UPDATE: I am trying to output an entire loop of page titles so I do not need to update the auto-complete when users searching, as it will take it directly from page titles. UPDATE 2: The mission of the below is to created a comma separated value of page titles. &lt;script&gt; $(function() { var availableTags = [ &lt;?php query_posts('post_type=uc_university'); if (have_posts()) : while (have_posts()) : the_post(); ?&gt; "&lt;?php the_title(); ?&gt;", &lt;?php endwhile; endif; wp_reset_query(); ?&gt; "Search" ]; $( "#s" ).autocomplete({ source: availableTags }); }); &lt;/script&gt;
upvote count: 1
downvote count: 1
has title: PHP Loop inside Javascript
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41017765
has comment: http://stackoverflow.com/comment/41017375
score: 0
has comment: http://stackoverflow.com/comment/41018561
has comment: http://stackoverflow.com/comment/41018979
has comment: http://stackoverflow.com/comment/41017354
has comment: http://stackoverflow.com/comment/41017424
has comment: http://stackoverflow.com/comment/41017397
has comment: http://stackoverflow.com/comment/41017777
has comment: http://stackoverflow.com/comment/41017369
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41018191
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/41017386

http://stackoverflow.com/a/26185548
score: 1
upvote count: 1
has body: Check this out: http://jsfiddle.net/v9d7bjms/2/ function find() { var productsArray = [ [{"sku" : "131674"}, {"sku" : "84172"}], [{"productID" : "1234"} ,{"productID" : "12345"}], [{"test": 1},{"test": 1}], [{"test": 1},{"sellAlone": false,"test": 1}], [{"test": "00544MF24F575"}], [{"sellAlone": false,"test": 1}] ], pList = productsArray, productSKUArray = [ "00544MF24F575", "131674", "84172" ]; // All arrays matching your productsSKUArray var findings = productsArray.filter(function (productProperty) { // .some returns true after finding first matching element (and breaks the loop) return productProperty.some(function (obj) { var keys = Object.keys(obj); // We need to get all the "values" from object so we interate over // the keys and check if any value matches something from productSKUArray return keys.some(function (key) { // Check if value exists in productsSKUArray return productSKUArray.indexOf(obj[key]) &gt; -1; }); }); }); return findings; } console.log(find()); .filter will return all arrays containing objects with values from productSKUArray. See Array.prototype.filter, Array.prototype.some and Array.prototype.indexOf for method reference.
answers question: http://stackoverflow.com/q/26185135
has comment: http://stackoverflow.com/comment/41058568
accepted answer of: http://stackoverflow.com/q/26185135
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41058830
has comment: http://stackoverflow.com/comment/41058354
has comment: http://stackoverflow.com/comment/41058895
type: Answer

http://stackoverflow.com/comment/40829436
has text: Or: what does the book/exercise mean by "module"? Maybe you could link or cite it, or at least mention the title.
score: 0
comment on: http://stackoverflow.com/q/26061120
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26174122
has title: Javascript match all regex that returns an array of all phrases wrapped in double quotes
upvote count: 1
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26174142
tagged with: string
accepted answer: http://stackoverflow.com/a/26174142
favorite count: 0
tagged with: regex
type: AnsweredQuestion
score: 1
type: Question
has body: I have a string something like '"this one" and "that one"'. I want to return an array of all double quoted strings i.e. [this one, that one]. So far I've tried: var mystring = '"this one" and "that one"'; var m = mystring.match(/"(.*?)"/); alert(m[1]); It works fine at detecting the first occurrence of a double quoted string, but how do I get all of the phrases / words wrapped in double quotes?
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/comment/40932057
comment on: http://stackoverflow.com/a/26117358
score: 0
type: AnswerComment
has text: With that philosophy we should teach OP to attach the listener onDOMReady or window.onload and perhaps even wrap it in AMD or a CommonJS module and sprinkle it with some architectural advise? Question is: how far is to far?
type: Comment

http://stackoverflow.com/comment/40835021
type: Comment
comment on: http://stackoverflow.com/q/26063959
score: 0
has text: @bhowden: No, it's not. He is really trying to debug his PHP
type: QuestionComment

http://stackoverflow.com/comment/40812836
comment on: http://stackoverflow.com/q/26051814
type: QuestionComment
has text: I don't think it is possible to pass extra param.. but it is possible to do something like http://jsfiddle.net/arunpjohny/7rydsyb2/1/
score: 0
type: Comment

http://stackoverflow.com/comment/40782621
score: 0
comment on: http://stackoverflow.com/q/26035476
type: Comment
type: QuestionComment
has text: I have just edited it.

http://stackoverflow.com/comment/40803559
comment on: http://stackoverflow.com/q/26046851
score: 1
has text: Possible duplicate of http://stackoverflow.com/questions/10453300/jquery-how-do-i-call-a-url-by-checking-a-checkbox
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26105230
has comment: http://stackoverflow.com/comment/40910200
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26105282
upvote count: 4
tagged with: jsonp
has body: before I explain my issue I would like to mention that I'm a naive on jsonp. This is actually my very first attempt to work with JSONP. Im using jquery ajax call to pullback data from a website. my jquery code is below $.fn.checkTPS = function(){ return this.each(function(){ var interval; $(this).on('keyup', function() { var api_key = 'asdfasfsadfsadfsad'; var format = 'json'; var username = 'dame@example.co.uk'; var self = $(this); var selfValue; var feedback = $('.tps-feedback'); if(interval === undefined){ interval = setInterval(function(){ if(selfValue !== self.val()) { selfValue = self.val(); if (selfValue.length &gt; 9){ $.ajax({ url: 'https://www.selectabase.co.uk/api/v1/tps/' + selfValue + '/', type: 'get', dataType: 'jsonp', data: { format: format, username: username, api_key: api_key }, success: function(data) { console.log(data); }, error: function() { }, jsonp: 'jsonp' }); } } },3000); } }); }); }; I want to accommodate a service from selectabase.co.uk, according to them this is how I should use the service https://www.selectabase.co.uk/api/v1/tps/[number]/?format=json&amp;username=[username]&amp;api_key=[api key] when I send request using ajax I get this error Uncaught SyntaxError: Unexpected token : and when clicked this opens up {"ctps": false, "number": "1452500705", "resource_uri": "/api/v1/tps/01452500705/", "tps": false} by the way this I want but don't know what's this error is unexpected token : I've copied the following link from inspect element tab (you can see the image below) I think this is the call that has been generated by json https://www.selectabase.co.uk/api/v1/tps/01452500705/?jsonp=jQuery17102731868715648129_14120077325500&amp;format=json&amp;username=dame40example.co.uk&amp;api_key=asdfasfsadfsadfsad&amp;_=14120077325500 I copied the link below from inspect element &gt; source tab in chrome.. I think I should add an image to describe properly where this json data and link I've copied from. I hope I've manage to convey my message ac…
has comment: http://stackoverflow.com/comment/40910163
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: ajax
has title: JSONP - "Uncaught SyntaxError: Unexpected token"
score: 3
linked to: http://stackoverflow.com/q/17406990
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/40910214
answer count: 1
downvote count: 1
linked to: http://stackoverflow.com/q/19165925
has comment: http://stackoverflow.com/comment/40910205

http://stackoverflow.com/comment/40951474
has text: And if they re-enter the field? Do you wish to re-show them?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26127301
score: 0

http://stackoverflow.com/comment/40931221
type: AnswerComment
score: 0
has text: Is this possible to group the child elements based on the parental elements? I updated my question with JSON.
type: Comment
comment on: http://stackoverflow.com/a/26057889

http://stackoverflow.com/a/26066945
answers question: http://stackoverflow.com/q/26066463
downvote count: 0
upvote count: 2
type: Answer
has body: Get silly wit it http://jsfiddle.net/jkabxpkw/1/ var values = document.getElementById('form') ? (function (array) { var elements = document.getElementById('form').children; for (var element in elements) { if (elements.hasOwnProperty(element)) { if (elements[element].value) { array.push(elements[element].value); } } } return array; }([])) : null;
score: 2
has comment: http://stackoverflow.com/comment/40846099

http://stackoverflow.com/comment/40847018
type: QuestionComment
comment on: http://stackoverflow.com/q/26070416
has text: You just need to append, `.innerHTML = ...` will overwrite. `.innerHTML += ...` appends. Also note `showHighScore` isn't defined.
score: 0
type: Comment

http://stackoverflow.com/comment/40812302
comment on: http://stackoverflow.com/q/26051605
type: QuestionComment
has text: You can use [*Object.defineProperty*](http://ecma-international.org/ecma-262/5.1/#sec-15.2.3.6) to create non–enumerable properties. Also see [*MDN—Object.defineProperty*](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty). So yes, it's possible in ES5 compliant hosts. Whether it's a good idea depends on the rest of the design, options for achieving the same result and criteria for "good".
score: 2
type: Comment

http://stackoverflow.com/q/26126960
type: Question
accepted answer: http://stackoverflow.com/a/26127573
has body: Anyone know how can I set auto-scroll (with loop) in div with overflow:hidden; ? Example final effect? Show element_01 -> wait 5 sec -> smooth scroll to element_02 -> wait 5 sec // and repeat
possible better answer: http://stackoverflow.com/a/26127082
tagged with: javascript
has answer: http://stackoverflow.com/a/26127082
score: 0
answer count: 3
tagged with: jquery
has answer: http://stackoverflow.com/a/26127573
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: overflow hidden auto-scroll
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26127478

http://stackoverflow.com/comment/40868483
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26081955
has text: Nope. You might want to ask a follow up question about your new issue; you can link to this one, as it might help people understand what's going on.
type: Comment

http://stackoverflow.com/comment/40963469
type: Comment
type: QuestionComment
has text: PHP executes all of the page code, at once, rendering it to static HTML. On the first time you visit the page, $_SESSION has no values in it, but $_SESSION['test_width'] RIGHT NOW. After ALL OF THIS PHP has been rendered into HTML, it is sent to the user's browser, where the javascript code (your `complete` function) will then be called - but the missing PHP session value was already turned into HTML, so it will not have any value yet.
score: 1
comment on: http://stackoverflow.com/q/26133760

http://stackoverflow.com/comment/40994980
type: Comment
has text: @Brian While I agree yours is more complete, I'm not sure it's worth any sort of rebuttal. As far as "firsties" go, IIRC the difference was sub-minute.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26145432

http://stackoverflow.com/q/26145434
has title: Using both closetag.js & closebrackets.js in Codemirror on same line
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26151421
tagged with: codemirror
has body: so I'm implementing the Codemirror library with a textarea so I can autoclose HTML tags and brackets - {}, (), []. However, I've noticed when using them that they don't work together on the same line. Say I'm typing out a tag like this: &lt;div&gt;&lt;/div&gt; It autocloses and the cursor is in the middle between the two tags above. But if I try to add a bracket: &lt;div&gt;{&lt;/div&gt; It won't close because of how closebrackets.js works. On it's own line it works. I found a cheap hack where inside closetag.js (Line 80), you can add a space, changing it from: text: "&gt;" + (indent ? "\n\n" : "") + "&lt;/" + tagName + "&gt;", To text: "&gt;" + (indent ? "\n\n" : " ") + "&lt;/" + tagName + "&gt;", And then the tags close like this: &lt;div&gt; &lt;/div&gt; But then it's kind of annoying and ugly because you have this extra space, just to make it a little more fluent. Any idea on how to implement both of these on the same line?
type: Question
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/40928716
has text: +1 but it might be better to use content groupings (which do not necessarily need code plus they might save a precious custom dimension).
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26066313

http://stackoverflow.com/comment/40856529
comment on: http://stackoverflow.com/q/26075340
score: 0
type: Comment
type: QuestionComment
has text: squint, thank you very much for your help! I didn't know about profiles, I'll try to understand it better. I guess you are right, jQuery might be leaving garbage behind.

http://stackoverflow.com/comment/41019189
comment on: http://stackoverflow.com/q/26159691
type: Comment
type: QuestionComment
has text: You can extend Backbone Events and build a very lightweight version yourself: http://backbonejs.org/#Events
score: 0

http://stackoverflow.com/comment/40814098
score: 0
has text: please share the html first.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26052743

http://stackoverflow.com/q/26115069
tagged with: jquery
has title: Change the get URL parameter on page refresh
favorite count: 0
has body: I have a form in a popup. User fills the details and submits the form. On form submission, the popup is closed and the user is redirected to the homepage. On submission, a message is displayed on the home screen (whether form submission is success or not). This is done by adding a parameter in the home page url. When user opens the site, the url will be ..../home. And the user clicks on the popup button and submitting a form. On success, the url will be redirected to ..../home?error=0 On Failure, the url will be redirected to ..../home?error=1 Based on the error flag value, i display the message on home page. After this step, if user refreshes the home page, he still gets the form submission message because the error flag is present in the url. But after refresh, i dont want to display the message on home page. So, i tried to remove/set the error flag on page refresh using the following code. &gt; $(window).unload(function() { &gt; var currentURL = window.location.href; &gt; var index = currentURL.indexOf("?error="); &gt; if(index &gt; -1) { &gt; window.location.href = currentURL.substring(0, index); &gt; } }); It works well in Firefox but not in chrome. Not tested in other browsers. But jQuery unload has been deprecated in 1.8. How to remove/set the error flag on page refresh? Or is there any other method for not to display the message on home page after page refresh. The solution should work in all major browsers (IE, chrome, firefox. opera, safari) Note: This is a continuation of Change the URL on page refresh Thanks for your help!
answer count: 5
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 1
has answer: http://stackoverflow.com/a/26115336
has answer: http://stackoverflow.com/a/26115953
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26115272
tagged with: javascript
has answer: http://stackoverflow.com/a/26115354
linked to: http://stackoverflow.com/q/26085609
has answer: http://stackoverflow.com/a/26115424
downvote count: 0

http://stackoverflow.com/a/26090295
score: 0
answers question: http://stackoverflow.com/q/26090041
type: Answer
has body: Sorry folks, for some reason the referenced file from the url had been deleted. That's why it wouldn't find it. I have a lot of debugging to do it seems, omg. Wish me luck. Thanks for your time

http://stackoverflow.com/a/26142339
has body: For greater than and less than symbol. var string = '&lt;&gt;&lt;&gt;'; string = string.replace(/[\&lt;\&gt;]/g,'*'); alert(string); For special characters var string = '&lt;&gt;&lt;&gt;'; string = string.replace(/[&amp;\/\\#,+()$~%.'&quot;:*?&lt;&gt;{}]/g,'_'); alert(string);
answers question: http://stackoverflow.com/q/26141732
type: Answer
score: 0

http://stackoverflow.com/comment/41004983
has text: It's well worth your time to spend an hour or two reading through [the jQuery API documentation](http://api.jquery.com). It really only takes that long, and it answers this question and hundreds more.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26157054

http://stackoverflow.com/a/26154325
answers question: http://stackoverflow.com/q/26147113
score: 0
type: Answer
has body: Solved this using Ajax: 1) I make the following Ajax request in jobs.js (categoryID is derived from an earlier call to val(): $.ajax("/gears", {dataType: "script", data:{category_id: categoryID}}) 2) In gears_controller.rb: def index @gears = Gear.where(category_id: params[:category_id]) end 3) The controller renders the Gear index, which is .js.erb, which in turn renders a collection partial with one button for each Gear: /views/gears/index.js.erb $("#gear-button-list").html("&lt;%=j render partial: '/gears/gear_buttons', collection: @gears, as: :gear %&gt;") 4) The partial: .btn.btn-large.btn-default.gear-button{"data-id" =&gt; gear.id} %p %h5 #{gear.name} ($#{gear.charge}) &lt;br /&gt; %small #{gear.description}

http://stackoverflow.com/comment/41009380
type: QuestionComment
comment on: http://stackoverflow.com/q/26159079
has text: @Zeshan oh, common, I have already said it twice.
score: 0
type: Comment

http://stackoverflow.com/a/26131349
has comment: http://stackoverflow.com/comment/40964391
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26129854
answers question: http://stackoverflow.com/q/26129854
type: AcceptedAnswer
downvote count: 0
has body: Let's present three different approaches to your case: First one If you want just to create the json object with your data try: http://jsfiddle.net/csdtesting/tap2xom9/ var platform_a = ['platform-a1', 'platform-a2', 'platform-a3']; var platform_b = ['platform-b1', 'platform-b2', 'platform-b3']; var platform_c = ['platform-c1', 'platform-c2', 'platform-c3']; var category = ['Guitar', 'Bass', 'Amps']; var obj = { Guitar: platform_a, Bass: platform_b, Amps: platform_c }; document.write(JSON.stringify(obj)); Second If you want to create it dynamically do something like that: http://jsfiddle.net/csdtesting/tap2xom9/ var category = ['Guitar', 'Bass', 'Amps']; var platform_a = ['platform-a1', 'platform-a2', 'platform-a3']; var platform_b = ['platform-b1', 'platform-b2', 'platform-b3']; var platform_c = ['platform-c1', 'platform-c2', 'platform-c3']; var FinalObject = {}; FinalObject[category[0]] = platform_a; FinalObject[category[1]] = platform_b; FinalObject[category[2]] = platform_c; document.write(JSON.stringify(FinalObject)); Finally If you want to be more dynamic then try this : http://jsfiddle.net/csdtesting/kqwz72os/ var FinalObject = {}; var category = ['Guitar', 'Bass', 'Amps']; var platforms = { platform_a: ['platform-a1', 'platform-a2', 'platform-a3'], platform_b: ['platform-b1', 'platform-b2', 'platform-b3'], platform_c: ['platform-c1', 'platform-c2', 'platform-c3'] }; for (var i = 0; i &lt; category.length; i++) { FinalObject[category[i]] = platforms[Object.keys(platforms)[i]]; } document.write(JSON.stringify(FinalObject)); Hope this helps!

http://stackoverflow.com/comment/41043221
type: Comment
score: 0
has text: Can you tell us which jQuery Autocomplete plugin you're using ? There's plenty of Autocomplete plugins out there.
type: QuestionComment
comment on: http://stackoverflow.com/q/26176064

http://stackoverflow.com/q/26102461
has title: MySQL Query onclick event on table row
tagged with: javascript
linked to: http://stackoverflow.com/q/5004233
has comment: http://stackoverflow.com/comment/40905439
has comment: http://stackoverflow.com/comment/40928224
has comment: http://stackoverflow.com/comment/40906543
has comment: http://stackoverflow.com/comment/40906902
has comment: http://stackoverflow.com/comment/40905351
has answer: http://stackoverflow.com/a/26124772
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40945460
linked to: http://stackoverflow.com/q/8567114
tagged with: php
has comment: http://stackoverflow.com/comment/40967570
type: AnsweredQuestion
tagged with: mysql
linked to: http://stackoverflow.com/q/14220321
type: Question
accepted answer: http://stackoverflow.com/a/26124772
has body: I intend to run a query onclick event on table row. I have created a function in javascript and I can read the id of each row. Now I wanted to be able to run a query with this id as a condition. Can they help me please? Realize my question? Below I show my code. -------------Javascript Function-----------------! &lt;script&gt; function addRowHandlers() { var table = document.getElementById("tableId"); var rows = table.getElementsByTagName("td"); for (i = 0; i &lt; rows.length; i++) { var currentRow = table.rows[i]; var createClickHandler = function(row) { return function() { var cell = row.getElementsByTagName("td")[1]; var id = cell.innerHTML; alert("id:" + id); }; }; currentRow.onclick = createClickHandler(currentRow); } } window.onload = addRowHandlers(); &lt;/script&gt; -----Query I intend to run----------- $result= mysql_query("select * from tasks where idTask = id"); while($row = mysql_fetch_array($result)) { $image = $row['image']; header("Content-type:image/jpeg"); echo $image; }
has comment: http://stackoverflow.com/comment/40905841

http://stackoverflow.com/comment/40819635
has text: It took 5 seconds to find this solution. https://stackoverflow.com/questions/46155/validate-email-address-in-javascript A comment points this out : "This regex eliminates valid, in-use emails. Do not use. Google for "RFC822" or "RFC2822" to get a proper regex"
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26055883
score: 0

http://stackoverflow.com/comment/40970055
comment on: http://stackoverflow.com/a/26138150
score: 0
type: AnswerComment
has text: Now it doesn't open anything. Nothing happens using your codes.
type: Comment

http://stackoverflow.com/comment/41063999
type: AnswerComment
has text: Thanks guys, I managed, I had to put the callback() inside the .onComplete() of another function.
type: Comment
comment on: http://stackoverflow.com/a/26188389
score: 0

http://stackoverflow.com/q/26058534
has answer: http://stackoverflow.com/a/26058605
score: 3
possible better answer: http://stackoverflow.com/a/26058697
downvote count: 0
has answer: http://stackoverflow.com/a/26058697
favorite count: 0
tagged with: regex
has title: Javascript Regex to remove any spaces, special characters and numbers
accepted answer: http://stackoverflow.com/a/26058605
type: AnsweredQuestion
upvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/40824562
has body: At the moment I have the following $scope.user.username.replace(/[\s]/g, ''); This removes and special characters and spaces, I need to add in the ability to prevent numbers and special characters too but I can't quite grasp how Regex works. Would someone be able to help me out?
tagged with: javascript
answer count: 2

http://stackoverflow.com/q/26138722
score: 3
tagged with: datepicker
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26301301
has answer: http://stackoverflow.com/a/26208621
tagged with: timestamp
has answer: http://stackoverflow.com/a/26317051
upvote count: 3
type: Question
tagged with: angular-strap
has title: Angular Strap Datepicker: Inconsistent timestamps returned, UTC +0 vs UTC +12 hours
downvote count: 0
tagged with: javascript
has body: Situation: We are using Angular-Strap's datepicker and want to return UTC timestamps to the server. When selecting a date (no time selection) we found out that some computers return a timestamp with a time of 0:00, and some with a time of 12:00. This was browser independent, but differed between computers. Problem: Some computers return 0:00, some 12:00. What I tried: While debugging I found out that the problem arose at line 379 of angular-strap/dist/modules/datepicker.js#L379, the controller.$dateValue returns 'Sat Mar 28 1987 12:00:00 GMT+0100 (W. Europe Standard Time)' instead of 'Sat Mar 28 1987 00:00:00 GMT+0100 (W. Europe Standard Time)', the value that is returned by other computers. Question: How to return a 0:00 time in all situations?
tagged with: angularjs
answer count: 3

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/26120951
tags question: http://stackoverflow.com/q/26120407
tags question: http://stackoverflow.com/q/26056808
tags question: http://stackoverflow.com/q/26063856
tags question: http://stackoverflow.com/q/26081635
type: Tag

http://stackoverflow.com/a/26108149
has body: Well..., in my opinion the way you have done it is perfectly idiomatic angularjs and I wouldn't start to micro-optimize it. (Remember "Premature optimization is the root of all evil" as well as Michael A. Jacksons rules about optimization and other quotes - http://en.wikipedia.org/wiki/Program_optimization ) No, I don't think there is any sensible way to do it without jQuery (or at least jqLite or manual dom access). If you do that, you should encapsulate it in a directive (which arguably is the only place explicit DOM access/manipulation should be).
score: 0
answers question: http://stackoverflow.com/q/26107632
type: Answer

http://stackoverflow.com/q/26175889
downvote count: 2
has answer: http://stackoverflow.com/a/26176128
score: -2
answer count: 1
tagged with: cookies
linked to: http://stackoverflow.com/q/3800512
has comment: http://stackoverflow.com/comment/41040425
has comment: http://stackoverflow.com/comment/41040310
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41040456
tagged with: jquery
has body: I have to create a JS cookie when a user click a button, this cookie will remember him after 10 minutes with another popup. Example: Click me! and the button will hide when user click, after 10 minutes the button will show again: Click me! Script part: function setCookieMsg(name) { var d = new Date(); var time = d.setTime(d.getTime() + (600000)); document.cookie = name + "=" + time; } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i<ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1); if (c.indexOf(name) != -1) return c.substring(name.length, c.length); } return ""; } function checkCookieMsg() { var cookie = getCookie("name"); var d = new Date() - 600000; if (cookie == "") { setCookie("name", cookie); }else if (d => cookie) { $().getUnReadMessage(); } } What I've wrong?
type: UnansweredQuestion
has title: Create cookie Javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41040307
type: Question

http://stackoverflow.com/a/26189311
has comment: http://stackoverflow.com/comment/41071292
has comment: http://stackoverflow.com/comment/41065498
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26188791
type: AcceptedAnswer
has body: you can do what I did, hide the video element, keep a canvas in it's place, and keep some custom play/pause, mute/unmute button on it as overlay, and you can keep drawing the canvas using requestAnimationFrame or setTimeout edit : a demo
has comment: http://stackoverflow.com/comment/41089096
answers question: http://stackoverflow.com/q/26188791
type: Answer
upvote count: 1
score: 1

communication
tag name: communication
type: Tag
tags question: http://stackoverflow.com/q/26157447

http://stackoverflow.com/q/26139537
has title: Bower install does nothing
tagged with: bower
answer count: 0
has comment: http://stackoverflow.com/comment/40972738
score: 1
upvote count: 1
has body: I am using bower with my rails4 project. Here is my bower.json { "name": "sinestro", "version": "0.0.1", "homepage": "https://github.com/ind9/sinestro", "authors": [ "Bharath ツ &lt;bharathraja@live.com&gt;" ], "description": "Product Catalog", "license": "MIT", "private": true, "ignore": [ "**/.*", "node_modules", "bower_components", "app/assets/javascripts/lib/bower", "test", "tests" ], "dependencies": { "jquery": "~2.1.1", "jquery-ui": "~1.10.4", "backbone": "~1.1.2", "bootstrap": "~3.0.0", "underscore": "~1.7.0", "requirejs": "~2.1.14", "requirejs-text": "~2.0.12", "image-center": "git://github.com/boxlight/bl-jquery-image-center", "spin.js": "~2.0.1", "numeral": "~1.5.3", "ix" : "git@github.com:ind9/magneto.git" }, "resolutions": { "jquery-ui": "~1.11.1", "bootstrap": "~3.2.0" } } and here is my .bowerrc { "directory": "bower_lib" } The bower version is 1.3.12. When I say bower install - it prints the log that it resolving dependencies and fetching it - but it doesn't install it anywhere. There is no directory named bower_lib is getting created. Can someone help me? And there are no errors in the output as well.
type: Question
tagged with: javascript
downvote count: 0
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/26497380
has comment: http://stackoverflow.com/comment/50989509
accepted answer of: http://stackoverflow.com/q/26167885
has comment: http://stackoverflow.com/comment/52236109
type: Answer
answers question: http://stackoverflow.com/q/26167885
has comment: http://stackoverflow.com/comment/86296184
has comment: http://stackoverflow.com/comment/62263130
upvote count: 10
score: 10
downvote count: 0
type: AcceptedAnswer
has body: You can get away with putting your controllers in subdirectories as in your example, because nested controllers are fully supported by Sails. However, nested models are not fully supported because of the ambiguity they would cause (see this comment on the matter). If you put two model files both named Cat.js in separate subfolders, they'll collide and the second one will overwrite the first in memory when Sails lifts. That's sort of an academic point though, since you'll need some way to distinguish between your two model versions anyway in code. That is, in your v1 controller you'll want to make sure you're referencing your v1 Cat model, and likewise for v2. The simplest solution would be to go with a scheme like you have in your example, but add a suffix to your models (or at least everything after v1): api/ |-- controllers/ |---- v1/ |------ CatController.js |---- v2/ |------ CatController.js |-- models/ |---- v1/ |------ Cat.js |---- v2/ |------ Cat_v2.js The subfolder for the models will be ignored by Sails, so to make sure your blueprints work the way you want, you can add a _config property to your controllers to force them to use the correct model. api/controllers/v1/CatController.js: module.exports = { _config: { model: 'cat' }, ... } api/controllers/v2/CatController.js: module.exports = { _config: { model: 'cat_v2' }, ... } Update (for Sails 1.0) The usage of _config in a controller is no longer valid in Sails 1.0. Instead, you can use the parseBlueprintOptions config function to set which model a blueprint operates on, e.g.: parseBlueprintOptions: function(req) { // Get the default query options. var queryOptions = req._sails.hooks.blueprints.parseBlueprintOptions(req); // Add the _v2 suffix to the `using` property. queryOptions.using = queryOptions.using + '_v2'; return queryOptions; }

http://stackoverflow.com/a/26130407
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40956340
has comment: http://stackoverflow.com/comment/40956305
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/26129944
downvote count: 0
answers question: http://stackoverflow.com/q/26129944
has body: I noticed a much improved "first run" experience after using gulp to pre-cache. Even though it's loading templates from the same device, i.e. not the internet, it's still seems to be faster. I used this Gulp task: https://github.com/miickel/gulp-angular-templatecache which just creates a nice module for you to include.

http://stackoverflow.com/comment/41063681
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26188199
type: AnswerComment
has text: Just checked it out. Pretty funny post :) Definitely will use next time I have to use viewport units!

http://stackoverflow.com/q/26110642
linked to: http://stackoverflow.com/q/2628050
type: Question
tagged with: reactjs
has answer: http://stackoverflow.com/a/26125251
tagged with: javascript
score: 0
has title: Why does Khan Academy use templates with just empty space?
answer count: 1
tagged with: templates
favorite count: 0
has body: In Khan Academy's Perseus repo they use {' '} instead of raw &amp;nbsp;. What is this purpose of this?
has comment: http://stackoverflow.com/comment/40920089
accepted answer: http://stackoverflow.com/a/26125251
upvote count: 1
downvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/q/26116727
has comment: http://stackoverflow.com/comment/40951852
tagged with: dojo
tagged with: dialog
type: Question
has comment: http://stackoverflow.com/comment/40937730
has comment: http://stackoverflow.com/comment/40966736
has body: While I have opend a Dialogwindow, i cant open the Comboboxes we use properly. Normaly you just click and it pops up, but in this case you need to hold the Mouse to open the Menu and choose an object. When I close the dialog, everything works normal. Have anybody faces the same Problem? We tried to change the Index of the dialog, disable the widgets inside and change the theme ( in our case claro ) but nothing changes this behaviour. The dialog and the comboboxes are setup programmatic. var dialCont = " "; dialCont += " "; ... dialCont += " Erzeugen "; drawKieWoDialog = new Dialog({ title: "Eventareas", id:"DKiWo", content: dialCont, style: "width: 600px;height:550px;overflow:auto;z-index:-1000" }); drawKieWoDialog.show(); UPDATE: It seems the dialog blocks the focus to all other widget. Regards, Miriam
tagged with: javascript
score: 0
tagged with: combobox
answer count: 0
type: UnansweredQuestion
has title: Dojo Combobox won't open properly when a Dialogwindow is open
has comment: http://stackoverflow.com/comment/40937944

http://stackoverflow.com/comment/41072397
comment on: http://stackoverflow.com/q/26193406
type: QuestionComment
type: Comment
has text: Note that in your example, because of the spaces, each child div has two class names. i.e. the first child of object1 has classes "element" and "1". You may not have wanted that.
score: 1

http://stackoverflow.com/a/28174029
upvote count: 27
has body: I had exactly the same issue. I just moved to a place with a pretty bad internet connection. Loading time of static files in my node.js app increased to more then 40s per file. I just moved the static middleware app.use(express.static(__dirname + '/public')); to the top of app.configure function, before all the other app.* calls. It's now working significantly faster.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26106399
answers question: http://stackoverflow.com/q/26106399
type: Answer
has comment: http://stackoverflow.com/comment/59662327
has comment: http://stackoverflow.com/comment/111877135
has comment: http://stackoverflow.com/comment/97715098
score: 27

http://stackoverflow.com/a/26089621
answers question: http://stackoverflow.com/q/26089532
score: 10
has body: the Component itself changes its state, and changes not its own, but the children's props. <Child name={ this.state.childName } /> Parent can change its own state and change the child name, but it will change the props for his children. edit1: for calling events from the child to its parent, you should pass in the child an event handler like so: var Child = React.createClass({ render: function() { return ( Hey ); } }); var Parent = React.createClass({ onChildClick: console.log.bind(console), // will print the event.. render: function() { return (<Child onClick={ this.onChildClick } />); } }); React.renderComponent( , document.body); in this code, when you'll click on the Child's button, it will pass the event to its parent. the purpose of passing the events is decoupling the components. maybe in your app you need this specific action, but in another app you'll have, you'll use it differently.
upvote count: 10
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40882077
has comment: http://stackoverflow.com/comment/40954383

http://stackoverflow.com/comment/40902690
score: 1
has text: @TahinRahman key=value is equivalent to key:value. They're just two different conventions for the same thing.
type: AnswerComment
comment on: http://stackoverflow.com/a/26101070
type: Comment

http://stackoverflow.com/comment/41084172
score: 1
type: AnswerComment
has text: well i was intending to pass the value in the same file, it works when i did it in seperate files. Problem solved, thanks!
type: Comment
comment on: http://stackoverflow.com/a/26194019

http://stackoverflow.com/comment/40901428
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26051237
has text: Thanks! Please add an answer below so we all know you found one. I'll upvote you even!

http://stackoverflow.com/a/26058652
has body: There were alot of small bugs, i fixed them for you. you didn't put a semicolon after your javascript statements, tey aren't neccesary but it's cleaner code, you didn't exit alot of html tags Back Image Forward Image Javascript: (function() { var photos=[]; var text= []; var which=0; var what=0; photos[0]="image1.bmp"; photos[1]="image2.bmp"; photos[2]="image3.bmp"; text[0]="Image One"; text[1]="Image Two"; text[2]="Image Three"; document.getElementById('description').innerHTML = text[0] backward = function(){ if (which>0){ which--; window.status=''; what--; console.log(which); document.images.photoslider.src=photos[which]; document.getElementById('description').innerHTML = text[what]; } } forward = function(){ if (which < (photos.length-1)){ which++; console.log(which); document.images.photoslider.src=photos[which]; what++; document.getElementById('description').innerHTML = text[what]; } else { document.getElementById('description').innerHTML = 'End of gallery'; } } function type() { alert("This textbox will only display default comments") } })(); And last but not least i've created the fiddle to show you it's working: http://jsfiddle.net/45nobcmm/24/
has comment: http://stackoverflow.com/comment/40824847
has comment: http://stackoverflow.com/comment/40829099
has comment: http://stackoverflow.com/comment/40824822
has comment: http://stackoverflow.com/comment/40829233
answers question: http://stackoverflow.com/q/26058084
score: 0
has comment: http://stackoverflow.com/comment/40827889
has comment: http://stackoverflow.com/comment/40825310
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26058084
type: Answer
has comment: http://stackoverflow.com/comment/40827858

http://stackoverflow.com/comment/40890447
comment on: http://stackoverflow.com/q/26093804
score: 0
type: Comment
type: QuestionComment
has text: jsFiddle Link is updated or you can even check by running the code snippet from stackoverflow post.

http://stackoverflow.com/a/26139320
type: Answer
answers question: http://stackoverflow.com/q/26139203
has body: If your function doesn't end with the return statement it has the return value undefined. So you should just write: return $('a.asdf')[0].getAttribute('href'); It's basically equivalent to what you already got (it's a little looser, by virtue of the truthy check you got.
score: 0

http://stackoverflow.com/a/26126253
has body: Toggling the class, then checking if it is on the element would be easier: DEMO $('.navbar-toggle').on("click", function(event) { $('.navbar-collapse').toggleClass('in'); if ($(".navbar-collapse").hasClass('in')) { $('.navbar-collapse').slideToggle(); $('.content-below').animate({'margin-top':'200px'}); } else { $('.navbar-collapse').slideToggle(); $('.content-below').animate({'margin-top':'0px'}); } });
downvote count: 1
has comment: http://stackoverflow.com/comment/40949035
has comment: http://stackoverflow.com/comment/40950313
has comment: http://stackoverflow.com/comment/40950282
score: -1
has comment: http://stackoverflow.com/comment/40950426
has comment: http://stackoverflow.com/comment/40950155
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40948956
answers question: http://stackoverflow.com/q/26126080
type: Answer
has comment: http://stackoverflow.com/comment/41120606
accepted answer of: http://stackoverflow.com/q/26126080
has comment: http://stackoverflow.com/comment/40950190
upvote count: 0

http://stackoverflow.com/comment/40913930
has text: this blocks the invalid letters from being typed, but no error message appears. Just like how it appears in the default error messages of the plugin.
comment on: http://stackoverflow.com/a/26106841
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/40820260
type: QuestionComment
comment on: http://stackoverflow.com/q/26056223
has text: what is your code so far?
score: 0
type: Comment

http://stackoverflow.com/q/26104288
upvote count: 3
type: Question
has answer: http://stackoverflow.com/a/26105131
accepted answer: http://stackoverflow.com/a/26105131
tagged with: ember-data
tagged with: javascript
has title: Check related object is null in Ember and Ember Data
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ember.js
type: AnsweredQuestion
has body: When related data is serialized in a 0-1 relationship, everything works fine. "lesson": { "id": 1, "title": "foo", "user_completion": { "id": 1, "percent": 30 }, "is_available": true } However, when the related model hasn't been created yet, the web service returns null for that relation. "lesson": { "id": 1, "title": "foo", "user_completion": null, "is_available": false } It appears that when the ember model is instantiated with this data, the user_completion becomes a PromiseObject instead. Should my web service be returning null for this relation when no related one-to-zero-or-one record exists? Is it right for Ember Data to have put a promise object on this property of the model, even though it can never resolve to anything? Am I missing something important? What should I be doing in cases where I need to check for the existence of related data, as in the following example? model.filter(function(item) { return item.get('is_available') || item.get('user_completion') !== null; }); Do I really just need to check if user_completion is a PromiseObject? That seems a little odd, and I feel like I've made a mistake somewhere else.
score: 3

http://stackoverflow.com/a/26082597
type: Answer
has comment: http://stackoverflow.com/comment/40870753
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26082421
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26082421
downvote count: 0
has body: Multiselect has a special way to add new option items.You have to add multiselect('refresh') to render your new options: Here is how to add a value: (http://jsfiddle.net/csdtesting/mpy72gyf/) var el = $('#resourceviewstop').multiselect({ header:false, includeSelectAllOption: true }); var newItem = $('#newItem'); var opt = opt = $('&lt;option /&gt;'); $("#add").click(function(){ var v = newItem.val(), opt = $('&lt;option /&gt;', { value: v, text: v }); opt.appendTo(el); el.multiselect('refresh'); }); So, you have to change the append operation to: $.each(response, function (index, item) { var opt = $('&lt;option /&gt;', { value: item.Id, text: item.Description }); opt.appendTo(el); el.multiselect('refresh'); }); Hope this helps! Revisioned solution asked vol.1: http://jsfiddle.net/csdtesting/mpy72gyf/1/ vol2 http://jsfiddle.net/mpy72gyf/2/

http://stackoverflow.com/comment/40875329
type: Comment
has text: prob just do a `$(function(){$('.car-search-button').click()})` to submit on load. Please remember to accept the answer
comment on: http://stackoverflow.com/a/26084073
type: AnswerComment
score: 0

http://stackoverflow.com/q/26148229
type: Question
tagged with: javascript
tagged with: express
score: 0
tagged with: mongodb
has answer: http://stackoverflow.com/a/26152094
has body: I'm working on making a simple Twitter clone for a project using node.js and express, and storing the tweets using MongoDB. I am trying to implement deleting functionality for the tweets. a user's profile displays all their tweets, and I was hoping to put a little button or link under each tweet that a user will click for deleting. So, I was thinking the easiest way to do this would be specifying a "delete URL" for each tweet, like ..../profile/delete/[mongoDB object id here]. And then in node,say that when the router receives a get request for a URL like that, remove the object with the specified id from the database. I have heard you can use regular expressions to match and parse URLs to do this, but I can't really find any resources on how. So how can I write a regular expression to match these URLs, and then parse the URL to get the object ID? Or is there a better way to do this?
answer count: 1
has comment: http://stackoverflow.com/comment/40988833
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: deleting MongoDB entry when URL is visited - node.js
tagged with: node.js

http://stackoverflow.com/a/26079812
has comment: http://stackoverflow.com/comment/40863905
score: 1
answers question: http://stackoverflow.com/q/26079463
has body: The way I found (in handlebars, but probably appliable also to Mustache) to do this is the following: create a helper that returns this object in JSON (stringified) create a function that parses the JSON and returns the object call that function from within the template. The code: Handlebars.registerHelper('getThis', function() { return JSON.stringify(this); }); browseToTopic = function(obj){ console.log(JSON.parse(obj)); // do other stuff.. } HTML/template: {{#topics}} &lt;button onClick="_.bind(browseToTopic,{{getThis}})"&gt;{{name}}&lt;/button&gt; {{/topics}} See an example (different names but same operation) in action here: http://jsfiddle.net/awhb772m/ Update: added an example more similar to your initial code: http://jsfiddle.net/fbL7xjet/ Please take into account that: 1) your object is malformed. The following part: "items":[ "name":"a great item", "data": {...} ] should be: "items":[ { "name":"a great item", "data": {...} } ] 2) The code I wrote is just a proof of concept, and you'd probably want to improve the getThis helper to escape the stringified JSON; 3) the this object you'll find inside the browseToTopic function is not a 1:1 copy of the original context, but it has been converted to JSON and then again to object. This means that the destination object will lack all the non primitive object (e.g. functions). Consider if this could be enough for your needs.
downvote count: 0
has comment: http://stackoverflow.com/comment/40864000
has comment: http://stackoverflow.com/comment/40880004
has comment: http://stackoverflow.com/comment/40864202
type: Answer
upvote count: 1

http://stackoverflow.com/a/26041861
has comment: http://stackoverflow.com/comment/40794429
type: Answer
has comment: http://stackoverflow.com/comment/40794735
upvote count: 4
has comment: http://stackoverflow.com/comment/40794965
has body: xmlhttp.send('{"Header":{"Procedure".......'); Basically, you need to construct a string of your JSON, and call xmlhttp.send(jsonStr). One way to create that JSON string is like this: var jsonStr = JSON.stringify({ Header: { Procedure: 'Family_Insert' }, Body: .... }); Also, you seem to be using the wrong address. Complete sample: var xhr = new XMLHttpRequest(); xhr.open('POST', 'http://dev.domain.us/API/v02/JsonWs.svc/json/V02'); xhr.setRequestHeader('Content-Type', 'application/json; charset=utf-8'); var jsonStr = JSON.stringify({ Header: { Procedure: 'Family_Insert' }, Body: .... }); xhr.send(jsonStr);
has comment: http://stackoverflow.com/comment/40794489
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/40794271
has comment: http://stackoverflow.com/comment/40794224
has comment: http://stackoverflow.com/comment/40794467
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26041654
answers question: http://stackoverflow.com/q/26041654
has comment: http://stackoverflow.com/comment/40794411

http://stackoverflow.com/q/26124329
tagged with: javascript
tagged with: jquery
has body: I am working on this demo. How can I push values of checked rows in JS Array or Object? var obj=[ { id : "001", name : "apple", category : "fruit", color : "red" }, { id : "002", name : "melon", category : "fruit", color : "green" }, { id : "003", name : "banana", category : "fruit", color : "yellow" } ] $.each(obj, function (index, item) { var eachrow = " " + " " + " " + item["id"] + " " + " " + item["name"] + " " + " " + item["category"] + " " + " " + item["color"] + " " + " "; $('#tbody').append(eachrow); });
answer count: 2
possible better answer: http://stackoverflow.com/a/26124558
has title: Getting table values from checkbox in rows
downvote count: 0
favorite count: 0
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26124558
accepted answer: http://stackoverflow.com/a/26124640
score: 1
type: Question
has answer: http://stackoverflow.com/a/26124640

http://stackoverflow.com/comment/41040792
type: QuestionComment
comment on: http://stackoverflow.com/q/26155866
has text: where is it? i cant see it
score: 0
type: Comment

http://stackoverflow.com/a/26088368
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26088329
downvote count: 0
type: Answer
has body: I think you meant to say: $("#test_id").fadeIn(1000);

http://stackoverflow.com/q/26193426
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41073350
type: AnsweredQuestion
has title: Prototypes and object properties. Why do they act differently?
has body: Why does the prototype differ from a normal object? var obj={'length':4} obj._length=obj.length console.log(obj._length); // 4 An array is an object and its prototype is too, so the same behavior should be seen... var a=[0,1,2,3]; Array.prototype._length=Array.prototype.length; console.log(a.length,a._length); // 4,0 I am not going to use this in practice but, I do want to better understand what is going on here. Edit: How would you see the same behavior?
score: 1
type: Question
tagged with: object
has answer: http://stackoverflow.com/a/26193465
accepted answer: http://stackoverflow.com/a/26193465
downvote count: 0
tagged with: javascript
tagged with: prototype
upvote count: 1

http://stackoverflow.com/comment/40832970
type: Comment
type: QuestionComment
score: 1
has text: If you didn't recognize [object initializer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects#Using_object_initializers) in the return value, you should start to learn some basics of JavaScript.
comment on: http://stackoverflow.com/q/26057312

http://stackoverflow.com/comment/40798221
type: QuestionComment
comment on: http://stackoverflow.com/q/26043862
has text: this should be on client-side, so i think with `Ruby` no chance.
score: 0
type: Comment

http://stackoverflow.com/comment/40860234
type: AnswerComment
type: Comment
score: 2
has text: Or, you could parse your JS with Esprima and rewrite it to include your `locals` variable in each function. The fact that what you are trying to do involves transforming JS, or using a macro pre-processor, would hopefully give you pause.
comment on: http://stackoverflow.com/a/26077692

http://stackoverflow.com/a/26394083
has comment: http://stackoverflow.com/comment/41453581
score: 3
has body: To clarify - Node.js is not single-threaded. Your application code is executed in one thread, but under the hood it uses them when needed - take a look here (both the answer and the comments below it): To a Javascript program on node.js, there is only one thread. If you're looking for technicalities, node.js is free to use threads to solve asynchronous I/O if the underlying operating system requires it. And: As far as the user of node.js (ie the Javascript programmer) is involved, the abstraction is that there is only a single thread. In the case of the underlying runtime (v8), it uses threads internally for - for example - profiling, and it may do so freely as long as it doesn't leak that information up to the Javascript. In other words, if you dive down inside the actual runtime, you will find more than one thread helping to keep the single Javascript thread running smoothly. As you can see the mysql module you use requires you to pass a callback for the query() method (and probably for many more). So when you call it, the execution of your code continues and the callback is called when the results from database arrive. As for your question - you are not creating a new connection for every request. Take a look at the readme file of the mysql module, the Pooling Connections section: Connections are lazily created by the pool. If you configure the pool to allow up to 100 connections, but only ever use 5 simultaneously, only 5 connections will be made. Connections are also cycled round-robin style, with connections being taken from the top of the pool and returning to the bottom. When a previous connection is retrieved from the pool, a ping packet is sent to the server to check if the connection is still good. When you call dbPool.getConnection() the connection is created only if there are no more available connections in the pool - otherwise it just grabs one from the top of it. Calling objConn.release() releases the connection back to the pool - it's not being disc…
has comment: http://stackoverflow.com/comment/41463116
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41463685
answers question: http://stackoverflow.com/q/26118700
has comment: http://stackoverflow.com/comment/41450647
type: Answer
has comment: http://stackoverflow.com/comment/41461309
accepted answer of: http://stackoverflow.com/q/26118700
upvote count: 3
has comment: http://stackoverflow.com/comment/41453066
has comment: http://stackoverflow.com/comment/41447193
has comment: http://stackoverflow.com/comment/41481126
has comment: http://stackoverflow.com/comment/41462181

http://stackoverflow.com/q/26075401
upvote count: 3
has title: Not able to update JSON file data by react.js
has comment: http://stackoverflow.com/comment/40856032
type: Question
score: 3
has comment: http://stackoverflow.com/comment/40856011
tagged with: http://stackoverflow.com/tag/json
has body: I am trying to update the comments.json by using one of tutorial example of Comment app of React.js. I have done very few changes in code : handleCommentSubmit: function(comment){ var comments = this.state.data; var newComments = comments.concat([comment]); this.setState({data: newComments}); $.ajax({ url: 'test.php', dataType: 'json', type: 'POST', data: comment, success: function(data) { this.setState({data: data}); }.bind(this), error: function(xhr, status, err) { console.error(this.props.url, status, err.toString()); }.bind(this) }); }, Code of Test.php as folllows: &lt;?php $json = $_POST['json']; echo $json; if (json_decode($json) != null) { /* sanity check */ $file = fopen('comments.json','w+'); fwrite($file, $json); fclose($file); } else { echo "error found"; } ?&gt; Any help will be good for me, because I am very new to JavaScript.
tagged with: javascript
has comment: http://stackoverflow.com/comment/40855982
has comment: http://stackoverflow.com/comment/40856493
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/40855749
has comment: http://stackoverflow.com/comment/40856058
answer count: 0

http://stackoverflow.com/comment/40829258
type: Comment
has text: @darkginger : Have you check my answer??
comment on: http://stackoverflow.com/q/26051643
score: 0
type: QuestionComment

http://stackoverflow.com/q/26180401
accepted answer: http://stackoverflow.com/a/26180552
possible better answer: http://stackoverflow.com/a/56016123
has comment: http://stackoverflow.com/comment/41048476
has title: $timeout not working in angular.js
has answer: http://stackoverflow.com/a/56016123
has comment: http://stackoverflow.com/comment/41048394
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/26180552
has body: i am using $timeout in my controller but its not working! app.controller("Friendsrequests",['$http','$log','$location','$timeout','$scope', function($http,$log,$location,$timeout,$scope){ //getting base url of application this.baseUrl = function() { var base_url = window.location.origin; var pathArray = window.location.pathname; return base_url; // return base_url+pathArray; }; // assigning to a variablebase_url('login/f_request'); var ThroughUrl = this.baseUrl()+'/keon/login/f_request'; //declare a variable var ata = this; ata.notifications = [ ] ; ata.counts=' '; //sending ajax request function getNotifications() { $http({method: 'POST', url: ThroughUrl,}) .success(function(data) { // this callback will be called asynchronously // when the response is available //assign data to the variable ata.notifications=data; ata.counts =data.length; }). error(function(data, status, headers, config) { // called asynchronously if an error occurs // or server returns response with an error status. }); } $timeout(function() { getNotifications(); }, 1000); }]); what is the issue .
type: Question
tagged with: angularjs
score: 0
answer count: 2

closures
tags question: http://stackoverflow.com/q/26050686
tags question: http://stackoverflow.com/q/26044498
tags question: http://stackoverflow.com/q/26173241
tags question: http://stackoverflow.com/q/26140489
tags question: http://stackoverflow.com/q/26092101
tag name: closures
tags question: http://stackoverflow.com/q/26147077
type: Tag
tags question: http://stackoverflow.com/q/26181841
tags question: http://stackoverflow.com/q/26174053
tags question: http://stackoverflow.com/q/26165922

http://stackoverflow.com/a/26187032
answers question: http://stackoverflow.com/q/26169188
has body: Actually the solution to this problem is very simple: I just went with the sessionStorage which seems to fit perfectly my needs in this case as I need the big dataset persisted just for this session and it doesn't matter if it's lost on the next one. The goal is to prevent fetching it more than once, that is, more than necessary, as the values inside are not likely to be changed during that session.
accepted answer of: http://stackoverflow.com/q/26169188
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/26093407
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26093219
has body: maybe this could help var temp = {}; temp.mail = new Array(); temp.mail.push("email"); temp.mail.push("email"); you need to initialize first the object property before you can manipulate contents;

http://stackoverflow.com/comment/40880102
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26088568
has text: I was hoping to be pointed in the right direction of an example or a starting point. All of the javascript quiz tutorials and examples seem to only offer a final score at the end as opposed to 1 of 4 results based on the answers. Any suggestions?
score: 0

http://stackoverflow.com/a/26059831
downvote count: 0
type: Answer
upvote count: 1
has body: There is no builtin methods. The best way is to use not minified version of plugin, search for line: self.save and self.show And add extra lines, it would be great if someone had added filter functions to the plugin. In my case it is: self.save = function() { var myData = angular.copy(self.scope.$data); myData = myData.replace(/(?:\r\n|\r|\n)/g, '&lt;br /&gt;'); valueGetter.assign($scope.$parent, myData); }; insteed of: self.save = function() { valueGetter.assign($scope.$parent, angular.copy(self.scope.$data)); };
answers question: http://stackoverflow.com/q/26055954
score: 1

http://stackoverflow.com/q/26092819
downvote count: 1
has comment: http://stackoverflow.com/comment/40889446
type: Question
upvote count: 5
has answer: http://stackoverflow.com/a/26127030
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/40888308
accepted answer: http://stackoverflow.com/a/26092864
has answer: http://stackoverflow.com/a/63790011
has comment: http://stackoverflow.com/comment/40888030
answer count: 3
favorite count: 0
possible better answer: http://stackoverflow.com/a/63790011
has comment: http://stackoverflow.com/comment/40888254
has comment: http://stackoverflow.com/comment/40888151
tagged with: javascript-objects
tagged with: lodash
has body: Suppose we have 2 objects: var foo = { a: 3, b: 'yellow', c: { d: 5, e: 'green' } }, bar = { b: 'yellow', c: { d: 5, e: 'green' } }; What is the best way to check that foo contains bar? I am already using Lodash in my application, so you can use functions from that library if it makes it easier. Otherwise, vanilla JS is fine. [EDIT] Well, let me try to explain what I mean when I use term 'contain'. I will do it in LoDash terminology. LoDash has _.extend method, so that if have 2 objects: var obj1 = {a:1, b:2}, obj2 = {b:4, c:{d:'green', e:5}} then the operation _.extend(obj1, obj2) will 'extend' obj1 - it will now have the value {a:1, b:4, c:{d:'green', e:5}} i.e. obj1 'contains' obj2 now.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26092864
has title: How to check if an object's properties represent a super set of another object?
has comment: http://stackoverflow.com/comment/40889368

http://stackoverflow.com/comment/40832573
type: Comment
has text: I made a JSON file out of it: https://gist.github.com/tedbarth/3856304ac78e5cb853d3
comment on: http://stackoverflow.com/a/26062108
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40924249
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26093357
has text: @RajaprabhuAravindasamy check mail da

http://stackoverflow.com/a/26185652
score: 1
upvote count: 1
has body: Once you've created your view model correctly: var profileModel = function() { this.firstname = ko.observable("Bob"); this.lastname = ko.observable("Smith"); }; Make sure you create a new instance of it before binding: var vm = new profileModel(); And bind that: ko.applyBindings(vm); Also, be careful with your use of the with binding. You've created a context around your shell model which forces you to use $root to access your profile view model.
answers question: http://stackoverflow.com/q/26185519
downvote count: 0
has comment: http://stackoverflow.com/comment/41059313
type: Answer

http://stackoverflow.com/a/26110983
has comment: http://stackoverflow.com/comment/40956211
has comment: http://stackoverflow.com/comment/40958137
has body: You appear to be looking for MutationObserver. This is the methodology which permits you to register that your code is to be informed about changes the DOM. It appears that you will need to set up a MutationObserver on every element for which you desire to know if it changes. To do this, you will need to walk the DOM adding the MutationObservers to the elements. In general, you should avoid using MutationObservers in most production code as they can significantly impact performance. However, it sounds like you want to specifically investigate the operation of some code, not use it in regular use. For that purpose, they should be fine. A brief overview A more in-depth discussion A screencast by Chromium developer Rafael Weinstein The mutation summary library The DOM standard which defines the MutationObserver interface Old Mutation events interface Example code: // select the target node var target = document.querySelector('#some-id'); // create an observer instance var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { console.log(mutation.type); }); }); // configuration of the observer: var config = { attributes: true, childList: true, characterData: true }; // pass in the target node, as well as the observer options observer.observe(target, config); // later, you can stop observing observer.disconnect(); The list of additional reading and above code was taken from the MutationObserver page on MDN. That page lists the source of the example code as this blog post. EDIT 2: For such a large task as you described ("programmably scan thousands of websites") it might be easier for you to download the source code for Firefox and modify that code to make a record of the changes that each page's JavaScript makes to the page's DOM. This could very reasonably make a record of which section of code, which function, and even which line number within the source is making the change. You want to "programmably scan thousands of websites". …
type: Answer
has comment: http://stackoverflow.com/comment/40957054
has comment: http://stackoverflow.com/comment/40956736
has comment: http://stackoverflow.com/comment/40956592
upvote count: 2
has comment: http://stackoverflow.com/comment/40958966
has comment: http://stackoverflow.com/comment/40959855
answers question: http://stackoverflow.com/q/26045836
score: 2
downvote count: 0

http://stackoverflow.com/a/26153332
type: AcceptedAnswer
type: Answer
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/40998525
has body: Answers.prototype._read() ... you are assigning a value to a function call. Just change it to Answers.prototype._read = function() ....
accepted answer of: http://stackoverflow.com/q/26153320
answers question: http://stackoverflow.com/q/26153320
upvote count: 3

http://stackoverflow.com/comment/41049938
type: QuestionComment
comment on: http://stackoverflow.com/q/26180547
type: Comment
has text: If you don't want to pass this information to the server and just have the client browser decide, use _localStorage_ instead.
score: 0

http://stackoverflow.com/q/26129664
favorite count: 0
type: AnsweredQuestion
tagged with: jsf
upvote count: 2
has title: Primefaces GMap addMarker (JavaScript) + selectMarker (overlaySelectEvent)
has answer: http://stackoverflow.com/a/26545119
type: Question
tagged with: google-maps
tagged with: primefaces
tagged with: javascript
has body: I have been struggling to combine both the GMap AddMarker and Selection examples from the Primefaces Showcase. What I try to achieve here is to get the overlaySelectEvent fired when clicking on a marker that has been added to the map using JavaScript, having also those markers in the map model, correctly in sync. JSF and JavaScript: &lt;p:growl id="messages" showDetail="true" /&gt; &lt;p:gmap id="gmap" center="36.890257,30.707417" zoom="13" type="HYBRID" style="width:600px;height:400px" model="#{mapBackingBean.emptyModel}" onPointClick="handlePointClick(event);" widgetVar="map" /&gt; &lt;p:ajax event="overlaySelect" listener="#{mapBackingBean.onMarkerSelect}" update="growl" /&gt; &lt;p:dialog widgetVar="dlg" showEffect="fade"&gt; &lt;h:form prependId="false"&gt; &lt;h:panelGrid columns="2"&gt; &lt;h:outputLabel for="title" value="Title:" /&gt; &lt;p:inputText id="title" value="#{mapBackingBean.title}" /&gt; &lt;f:facet name="footer"&gt; &lt;p:commandButton value="Add" actionListener="#{mapBackingBean.addMarker}" update=":messages" oncomplete="markerAddComplete()" /&gt; &lt;p:commandButton value="Cancel" onclick="return cancel()" /&gt; &lt;/f:facet&gt; &lt;/h:panelGrid&gt; &lt;h:inputHidden id="lat" value="#{mapBackingBean.lat}" /&gt; &lt;h:inputHidden id="lng" value="#{mapBackingBean.lng}" /&gt; &lt;/h:form&gt; &lt;/p:dialog&gt; &lt;script type="text/javascript"&gt; var currentMarker = null; function handlePointClick(event) { if(currentMarker === null) { document.getElementById('lat').value = event.latLng.lat(); document.getElementById('lng').value = event.latLng.lng(); currentMarker = new google.maps.Marker({ position:new google.maps.LatLng(event.latLng.lat(), event.latLng.lng()) }); PF('map').addOverlay(currentMarker); PF('dlg').show(); } } function markerAddComplete() { var title = document.getElementById('title'); currentMarker.setTitle(title.value); title.value = ""; currentMarker = null; PF('dlg').hide(); } function cancel() { PF('dlg').hide(); currentMarker.s…
tagged with: google-maps-markers
score: 2
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/26545119

http://stackoverflow.com/a/26109589
has comment: http://stackoverflow.com/comment/74312975
has comment: http://stackoverflow.com/comment/82429115
downvote count: 0
has comment: http://stackoverflow.com/comment/40932856
type: Answer
upvote count: 11
has comment: http://stackoverflow.com/comment/74309316
score: 11
has body: If you want to do something quick and dirty, then you can do something like this (based on your example in the comments). App init - read the .js template file and cache it: // this should be async, but hey, not teaching you that part here yet var fileJs = fs.readFileSync('file.js.template'); File.js: (function() { $(window).on('load', function() { alert('Your api key is API_KEY_CONST'); }); })(); Request: GET /api/file.js?key=123 Router: app.get('/api/file.js', function(req, res) { var key = req.query.key; var key = fetchKeyFromDBSync(); // just to make it easier here, no async. var out = fileJs.replace(API_KEY_CONST, key); res.setHeader('content-type', 'text/javascript'); res.write(out); res.end(); }); Now, this is really dumb and you should not try it at home, but it simply demonstrates how to do what you wanted. Edit: Depending on the file length, you might perform a bit better if you put the chunks of the file into an array, like: var fileChunks = ['(function(){ blablabla;', 'var myAPIKey=', 'KEY_PLACEHOLDER', '; alert (myAPIKey);', '})()'] So later when you're resolving it with the real API key, you join the file. fileChunks[2] = '12345'; var responseData = fileChunks.join(''); res.write(responseData); But your last-accessed api key is then held in an array. Not quite future proof, but it shouls work if you need something quick.
answers question: http://stackoverflow.com/q/26094297
has comment: http://stackoverflow.com/comment/82449744
has comment: http://stackoverflow.com/comment/40932930
has comment: http://stackoverflow.com/comment/40924021

http://stackoverflow.com/a/26083926
downvote count: 0
score: 1
has body: You did not attach anything to the dom, it all lives in memory and that is why you'll get 0. Try doing something like: $('body').append(node); var found = node.find("div:visible"); ... See bin: http://jsbin.com/kuyagijezono/1/edit
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26083881
answers question: http://stackoverflow.com/q/26083881
type: Answer

http://stackoverflow.com/comment/41010116
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26159919
has text: Semantically you should use the `title` attribute the `alt` means alternative, which should been displayed in case of an loading error or an plain text browser.

http://stackoverflow.com/comment/40886371
has text: You would use a conditional statement to check the value of the radio button and then deliver the redirect using `header("http://domain.tld/ext");`..etc
score: 3
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26091872

http://stackoverflow.com/q/26163833
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26163923
has title: JavaScript get value or property of an Array of objects if object has that property
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41018407
tagged with: arrays
answer count: 1
tagged with: jquery
has body: say I have an array var test = [{a: 26, b:14, c:null},{d:67, e: 8}]; say I want the value of c, I don't know what value c will have or which array will have c; I was thinking of using $.grep but it does seem like I could use it in that way So how do I go about getting the value of c? EDIT Just test as per my comment you can do $.grep(test,function(e){return e.hasOwnProperty('c')}) This will return the array that has the object/objects of the property you want
has answer: http://stackoverflow.com/a/26163923

http://stackoverflow.com/comment/41050845
type: AnswerComment
has text: Why did I receive a down vote? The answer was cross domain issue, which is a browser security policy and some browsers report "No Transport" in the statusText.
type: Comment
comment on: http://stackoverflow.com/a/26181159
score: 0

http://stackoverflow.com/comment/41064025
has text: F12 and debug is your friend.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26188480

http://stackoverflow.com/q/26169678
has title: Why certain .wav files cannot be decoded in Firefox
has answer: http://stackoverflow.com/a/26182095
tagged with: html5-audio
has comment: http://stackoverflow.com/comment/76898123
has answer: http://stackoverflow.com/a/48241303
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/48241303
upvote count: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/26182807
tagged with: wav
type: Question
has body: I have a web page which decodes wave files for certain reasons. Chrome and Safari seem to work fine. Firefox occasionally is unable to decode the file and gives the error: "The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully." I have created a jsfiddle which illustrates the issue: var audioCtx = new (window.AudioContext || window.webkitAudioContext)(); var source; function getData() { source = audioCtx.createBufferSource(); request = new XMLHttpRequest(); request.open('GET', 'https://mpclubtest.s3.amazonaws.com/Malice_Bass.wav', true); request.responseType = 'arraybuffer'; request.onload = function() { var audioData = request.response; audioCtx.decodeAudioData(audioData, function(buffer) { source.buffer = buffer; source.connect(audioCtx.destination); }, function(e){"Error with decoding audio data" + e.err}); } request.send(); } getData(); source.start(0); Can anyone tell me what the issue is and if there is any way to circumvent? Many Thanks. EDIT Thanks to the substantial contributions of Michael Chaney I was able to implement some javascript which processes the wave so that it can be played in Firefox. The code trims any part of the "fmt" chunk over 16 bytes. Code located at: jfiddle var audioCtx = new (window.AudioContext || window.webkitAudioContext)(); var source; function getData() { source = audioCtx.createBufferSource(); request = new XMLHttpRequest(); request.open('GET', 'https://mpclubtest.s3.amazonaws.com/Malice_Bass.wav', true); request.responseType = 'arraybuffer'; request.onload = function() { var audioData = request.response; var dv = new DataView(audioData); var junk = 0; var position = 12; do { var header = String.fromCharCode.apply(null, Uint8Array(audioData, position, 4)); var length = dv.getUint32(position + 4, true); if (header.trim() === 'fmt') { junk = junk + length - 16; } position = position + 8 + length; }while(position &lt; audioData.byteLength); var productArray = new Uint8Array(audioData.byt…
score: 5
tagged with: firefox
downvote count: 0
tagged with: web-audio-api
has comment: http://stackoverflow.com/comment/41213860
favorite count: 0
has comment: http://stackoverflow.com/comment/41213388
answer count: 3
accepted answer: http://stackoverflow.com/a/26182807

http://stackoverflow.com/comment/41034189
type: Comment
has text: Forgot to mention, typeahead was not being destroyed it just hit an error when it tried to compare the previous value of the input to the current value of the input which happens after you select an item.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26172625

http://stackoverflow.com/comment/41044916
type: QuestionComment
has text: @Cerbrus: Just because `var findWithId = R.compose(R.find, R.propEq('_id'))` is so much more concise than `var findWithId = R.curry(function(id, list) { return R.find((function(item) { return item._id === id }, list); })` ? :-)
comment on: http://stackoverflow.com/q/26178152
score: 0
type: Comment

http://stackoverflow.com/q/26039309
has comment: http://stackoverflow.com/comment/40789284
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26039551
has body: So here is my code prev prev How do I make it both click if I click any of it ? If I click .slider-1-prev, at the same I click .slider-2-prev If I click .slider-2-prev, at the same I click .slider-2-prev How to make it by javascript ?
has answer: http://stackoverflow.com/a/26039431
accepted answer: http://stackoverflow.com/a/26039551
possible better answer: http://stackoverflow.com/a/26039499
upvote count: 1
has answer: http://stackoverflow.com/a/26039499
has comment: http://stackoverflow.com/comment/40790174
has comment: http://stackoverflow.com/comment/40789945
has comment: http://stackoverflow.com/comment/40790351
has comment: http://stackoverflow.com/comment/40790133
answer count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/40790397
has comment: http://stackoverflow.com/comment/40789996
type: AnsweredQuestion
has title: 2 anchor with one click
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26039520
type: Question
has comment: http://stackoverflow.com/comment/40789829
has answer: http://stackoverflow.com/a/26039471

http://stackoverflow.com/q/26184415
tagged with: html-table
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41057309
has comment: http://stackoverflow.com/comment/41056246
has comment: http://stackoverflow.com/comment/41056526
accepted answer: http://stackoverflow.com/a/26184514
tagged with: jquery
favorite count: 0
type: Question
has body: I am reading data from an HTML table and then sending the results to server based on whether a checkbox is checked. The problem is when you read the td with the checkbox input it returns an empty string, which I would like to eliminate. Here's some code: addToPlan : function(){ var deleteSQL = ''; deleteSQL = $('#user').val() + '#' + $('#pass').val() + '# \r'; $('tr').has(':checkbox:checked').each(function(){ $(this).find('td').each(function(){ //+var selected = $('tr').has(':checkbox:checked').find('td').each(function(){ deleteSQL +='"' deleteSQL += $(this).text() deleteSQL += '",'; }); deleteSQL +='\r'; }); console.log(deleteSQL); // use this to get things to be deleted $.ajax({ type : 'post', url : 'deleteSites.jsp', data : {q : deleteSQL}, }); So what I want is a bunch of comma separated values further delimited by \r, but I want to skip the td /td in $.this that has a checkbox Current output looks like this: Query= ## "192.168.0.101","ria","","Ping", "192.168.0.101","ria","","Ping", Note the offending empty strings.
possible better answer: http://stackoverflow.com/a/26184469
has answer: http://stackoverflow.com/a/26184469
has title: Eliminate empty strings from output string
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41056436
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/26184514
has comment: http://stackoverflow.com/comment/41098186
tagged with: javascript
has comment: http://stackoverflow.com/comment/41056557
has comment: http://stackoverflow.com/comment/41056212

http://stackoverflow.com/a/26120735
has comment: http://stackoverflow.com/comment/40968585
has comment: http://stackoverflow.com/comment/40939490
has comment: http://stackoverflow.com/comment/40941275
upvote count: 1
has comment: http://stackoverflow.com/comment/41117779
has comment: http://stackoverflow.com/comment/41116334
score: 1
has comment: http://stackoverflow.com/comment/41123546
has comment: http://stackoverflow.com/comment/40939249
has comment: http://stackoverflow.com/comment/40963615
type: AcceptedAnswer
downvote count: 0
has body: A better idea is to use a (custom) filter. That way, only the needed rows are generated, in stead of hiding/removing existing ones. I just made a plunk for another question, that showed how to use a filter: the relevant line is this one: &lt;tr ng-repeat='item in appVm.users |filter:test'&gt; you can use a object directly in your code like this: &lt;tr ng-repeat='item in appVm.users |filter:{age:32}'&gt; If you put that line in the sample I linked in, you can see how that would work out! Does this help you?
accepted answer of: http://stackoverflow.com/q/26120514
type: Answer
has comment: http://stackoverflow.com/comment/41019522
answers question: http://stackoverflow.com/q/26120514

http://stackoverflow.com/comment/40950144
comment on: http://stackoverflow.com/q/26126218
score: 0
type: Comment
type: QuestionComment
has text: What sets the size of your map? What does your CSS for the map look like?

http://stackoverflow.com/a/26071315
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26071243
upvote count: 1
type: Answer
has body: Well you can go for the static MATHQUILL that is a much faster way of getting the mathematical equations. However mathquill.js sometimes gets random. HOwever if you will use the static mathquill, you will never face any issues. It works like a charm.

http://stackoverflow.com/comment/40993639
has text: I looked around and found that it could work on Firefox. It does display the file content, but the problem is that it's not syntax coloured.
score: 0
comment on: http://stackoverflow.com/q/26150526
type: QuestionComment
type: Comment

http://stackoverflow.com/a/78638504
score: 0
type: Answer
has body: The most concise solution I found to this issue is Promise.withResolvers() const { promise, resolve, reject } = Promise.withResolvers(); The function returns an object allowing invokation from outside the executor function.
answers question: http://stackoverflow.com/q/26150232
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/40871416
score: 0
has text: I think converting it to a regex is a common way of doing this
comment on: http://stackoverflow.com/q/26083969
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40999600
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26153641
has text: Yes, right, the first only, as this is element that never change. But i want to manipulate (delete actually) with cloned elements. That's why on add action I'm using div.item:first, but on delete action event.target.
score: 0

http://stackoverflow.com/comment/40858801
score: 0
type: Comment
has text: That is close to what I was looking for, but it didn't seem to work right for me - it wasn't able to capture the multiple elseifs correctly if they had the `{#gender|capitalise}` inside them.
type: AnswerComment
comment on: http://stackoverflow.com/a/26076100

http://stackoverflow.com/comment/40920409
comment on: http://stackoverflow.com/q/26110091
has text: code is datastructures. Once you run into problems like this, it's a clear indication you're not using the right structure for your data. Write (or grab off the internet) an ordered list object instead, and start working with those rather than with plain arrays.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40833224
score: 0
type: Comment
has text: Yes, every tag I need to extract will be either that with "password" or that with "username"
type: AnswerComment
comment on: http://stackoverflow.com/a/26062824

http://stackoverflow.com/a/26179711
upvote count: 2
has comment: http://stackoverflow.com/comment/41075187
has body: You could use a datalist to transfer the options to the text input which will then turn it into a combobox I slimmed your code write down to the very basics to make a simple example. Tags: $(function () { var availableTags = new Array(10); var j = 0; for (var i = 1; i < availableTags.length; i++) { $('#options').append(" "); } }); here is a JSFIDDLE showing the basic functionality
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41075074
answers question: http://stackoverflow.com/q/26128133
type: Answer
has comment: http://stackoverflow.com/comment/53569369

http://stackoverflow.com/comment/40798245
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26043790
has text: tank you That's what I meant But Can I access the value only without link
type: AnswerComment

http://stackoverflow.com/comment/41056151
type: QuestionComment
has text: Thank you for the clarification, but what we're doing should actually be fine until Nov, at which time we'll just take the promotion down :)
score: 0
comment on: http://stackoverflow.com/q/26181457
type: Comment

http://stackoverflow.com/a/26052636
type: AcceptedAnswer
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/40813947
downvote count: 0
has body: You can use target target="_blank" OR target target="_new". You can refer to JSFiddle
has comment: http://stackoverflow.com/comment/40814088
accepted answer of: http://stackoverflow.com/q/26052477
answers question: http://stackoverflow.com/q/26052477
score: 4
has comment: http://stackoverflow.com/comment/40814445

http://stackoverflow.com/comment/41012024
score: 1
has text: http://jsfiddle.net/qrvj2ohx/1/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26160496

http://stackoverflow.com/comment/41031890
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26171247
has text: is it always in the hash as shown? Use `location.hash` instead of `href` if it is
score: 0

http://stackoverflow.com/q/26165167
accepted answer: http://stackoverflow.com/a/26165846
answer count: 1
favorite count: 0
tagged with: d3.js
has title: How to rebind methods that have the same name
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26165846
score: 1
has body: Having coded a reusable chart in d3.js I want to expose the .tickFormat() method of both the X-axis AND Y-axis. The problem is that they both have the same method name, so my histogram object can only call the most recently added .tickFormat() method. d3.ninja.histogram = function module() { var x = d3.scale.ordinal(), y = d3.scale.linear(), xAxis = d3.svg.axis().scale(x).orient('bottom').tickSize(6, 0), yAxis = d3.svg.axis().scale(y).orient('left').tickSize(6, 0); function chart(selection) { selection.each(function (data) { // make something nice }); } // Expose the x-axis' tickFormat method. d3.rebind(chart, xAxis, 'tickFormat'); // Expose the y-axis' tickFormat method. d3.rebind(chart, yAxis, 'tickFormat'); return chart; } Mike Bostock mentions that The rebind operator allows inherited methods (mix-ins) to be rebound to a subclass on a different object. I don't really understand how to do this, but wonder if it is a way to tackle my problem?
type: Question
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41045615
comment on: http://stackoverflow.com/q/26178915
score: 0
has text: You can create all content dynamic like facebook does but it is bad for SEO and your javascript would need some structure.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26123443
downvote count: 0
has comment: http://stackoverflow.com/comment/40968660
type: Answer
has body: You CAN do this in Azure Scheduler! It provides a special mssql object which is initialized with connection to the current Database associated with the Azure Mobile Service. And it is extremely easy to use: function sql() { mssql.query('select top 3 * from TestTable', { success: function(results) { console.log(results); for (var testObj in results) { console.log('id: ' + results[testObj].id + 'name : ' + results[testObj].fname); } }, error: function(err) { console.log("error is: " + err); } }); } (Note that here 'sql' is just the name of my Scheduler Job) The only trick is, that if you want to access tables that are not part of the Standard Mobile Services API tables, you will have to explicitly grant read/write access to those tables following this nice guide. The Result of execution of the above script is this: Looping through the records you can do much more than just dumping to the log - i.e. execute other queries, etc. You can read the full documentation of the mssql object here.
has comment: http://stackoverflow.com/comment/40970508
answers question: http://stackoverflow.com/q/26079043
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40972696
has comment: http://stackoverflow.com/comment/40971025

http://stackoverflow.com/comment/40866744
comment on: http://stackoverflow.com/q/26076996
score: 0
type: Comment
type: QuestionComment
has text: Thanks for the comment! For my use I actually just used jQuery to prevent the click if the mousing was hovering. I added the code to the bottom of the question for those who are also wondering. Thanks again brasofilo!

http://stackoverflow.com/q/26137978
type: UnansweredQuestion
tagged with: sockets
score: 5
tagged with: node.js
has comment: http://stackoverflow.com/comment/115582730
answer count: 0
type: Question
upvote count: 5
tagged with: javascript
has title: Catching "socket hang up" error in request module
downvote count: 0
has body: I'm using the request module to send requests (GET &amp; POST) to a 3rd-party API. I'm using the timeout option to limit the waiting time for the response (can't wait too long for it). The problem is that sometimes the following exception is thrown: Error: socket hang up at createHangUpError (http.js:1476:15) at Socket.socketCloseListener (http.js:1526:23) at Socket.emit (events.js:117:20) at TCP.close (net.js:465:12) I'm guessing that's because requests are aborted (due to timeout) but the socket is still open and hangs up after 2 minutes. The question is - what can I do to close the socket when a request is aborted or how to catch this exception and handle it gracefully. Here is the relevant code I use: var request = require('request'), requestOptions = { url: 'http://example.com/api', timeout: 1000 }; request(requestOptions, function onResponse(error, response, body) { if (error) { //Trying to close the socket (to prevent socket hang up errors) //**Doesn't help** this.req.socket.destroy(); this.req.destroy(); return; } //Handle the response });
favorite count: 0

http://stackoverflow.com/comment/40929441
type: QuestionComment
comment on: http://stackoverflow.com/q/26116041
type: Comment
score: 3
has text: When people say "validate", you don't normally figure `replace` would be involved. "validate" means "figure out if it's okay or not", not fix the original contents into something more conformant.

http://stackoverflow.com/q/26101275
tagged with: mobile-safari
has body: In Safari on iOS 7 this code works (have used it for the past two years): setTimeout("document.location = 'MyAppName://type=a&amp;id=123';",10); But it dosn't work in Safari iOS 8 and I can't seem to find any clues anywhere. Does somebody have a clue?
answer count: 1
has answer: http://stackoverflow.com/a/26106061
downvote count: 0
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40928890
type: Question
tagged with: ios8
has comment: http://stackoverflow.com/comment/40911840
has title: iOS 8; open native app from javascript

http://stackoverflow.com/q/26044679
score: 2
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/26046063
type: Question
has title: The equivalent of jquery $.when in Python Tornado
tagged with: javascript
tagged with: tornado
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/26046063
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26044978
accepted answer: http://stackoverflow.com/a/26044978
tagged with: python
has body: In jQuery $.when(promise1, promise2...) is used as a master promise to represent the overall status of its children promises. We can then attach .done(callback) to the $.when promise so that when ALL promise1, promise2... finish the callback will be executed. In Python (Tornado), the Future acts similar to the promise in javascript, and the fetch() in AsyncHTTPClient returns a Future. In the following code I have a list of futures from tornado.httpclient import AsyncHTTPClient httpclient = AsyncHTTPClient() futures = [ httpclient.fetch("http://google.com") httpclient.fetch("http://example.com") httpclient.fetch("http://example.org") ] def all_futures_done_callback(): ... How do I execute the all_futures_done_callback when all futures finished?

http://stackoverflow.com/comment/50937941
has text: Also, FYI, I don't think sorting in the publication does anything. It works only in the helper.
score: 0
comment on: http://stackoverflow.com/a/26099578
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26083231
has comment: http://stackoverflow.com/comment/40870345
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/26088500
type: Question
upvote count: 2
has title: rehash of encrypted pass returns different results with crypto in Node.js
answer count: 1
has answer: http://stackoverflow.com/a/26088500
tagged with: javascript
has comment: http://stackoverflow.com/comment/40870457
has body: I have benn going at this for a few hours now and can't seem to find a similar problem on here or anywhere else. After desperately looking for small typos or other errors I turn to you. I am implementing encryption for the first time and so far all has been working out succesfully, I am using the crypto library together with Node.js to hash and salt the passwords. So far that has worked fine, but when I try to do the iterative rehashing I do not get the same key. Let me show you my code: from the app.get method: var salt = crypto.randomBytes(128); var hash = crypto.createHash('sha256'); hash.update(salt.toString('base64') + request.query.password); var hashedKey = hash.digest('base64'); console.log("original pass is: " + hashedKey) var stretchedKey = crypto.pbkdf2Sync(hashedKey, salt, 1000, 128); var promise = db.User.create({ username: request.query.username.toLowerCase(), email: request.query.email.toLowerCase(), encryptedPassword: stretchedKey.toString('base64'), randomSalt: salt.toString('base64'), premium: true }); as you can see in the above I generate a random salt for the new user, append the password to it and hash it. After that I try to stretch it and then save it in the database Here is the code from the authentication method: var hash = crypto.createHash('sha256'); hash.update(user.randomSalt.toString('base64') + request.query.password); var hashedKey = hash.digest('base64'); console.log("redone pass is: " + hashedKey) var stretchedKey = crypto.pbkdf2Sync(hashedKey, user.randomSalt, 1000, 128); console.log("!! " + stretchedKey.toString('base64') + "\n!! " + user.encryptedPassword) //protect against timing attacks var check = 0; for (var i = 0; i &lt; stretchedKey.toString('base64').length; i++) { if (stretchedKey.toString('base64').charAt(i) !== user.encryptedPassword.charAt(i) ) { check++; } } if (check === 0) { response.json({ status: 'correct pass' }); } else { response.json({ status: 'wrong pass' }); } }); The two console.log that logs "hashedKey" s…
tagged with: security
tagged with: node.js
favorite count: 0
tagged with: hash
downvote count: 0
tagged with: encryption

http://stackoverflow.com/a/26052357
answers question: http://stackoverflow.com/q/26052259
has comment: http://stackoverflow.com/comment/40813491
type: Answer
has comment: http://stackoverflow.com/comment/40813529
score: 0
has body: There is two mistake in your code: First: You have passed wrong index value in $_REQUEST try following: &lt;?php $name=$_REQUEST['name']; echo $name.'is updated'; ?&gt; Second: You are trying to get value of element with id "#txt" which doesn't exist. try following: &lt;script&gt; cbChanged = function(checkboxElem) { if (checkboxElem.checked) { $.post("b.php", {name: "Hello"}).done(function(data){ $('#stage').html(data); } ); alert("That box was checked."); } else { alert("That box was unchecked."); } } &lt;/script&gt;

http://stackoverflow.com/q/26152652
has comment: http://stackoverflow.com/comment/41010704
type: Question
score: 5
has answer: http://stackoverflow.com/a/26160598
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41001257
accepted answer: http://stackoverflow.com/a/26160598
answer count: 1
has body: I need some assistance. We seem to be having an issue with iOS with regards to getting the base64 of an image via HTML 5 / Canvas. Everything works fine if we use the default height / width of the canvas or hard code the height and width. However if we set the canvas height / width to that of the image src then the image won’t load into the canvas and therefore we won’t get the image as base64. Code snippet which works: function convertImageToBase64(imgUrl, callback) { var canvas = document.createElement("canvas"); var context = canvas.getContext('2d'); // load image from data url var imageObj= new Image(); imageObj.onload = function () { var dataUrl; context.drawImage(imageObj, 0, 0, canvas.width, canvas.height); dataUrl = canvas.toDataURL("image/png"); callback.call(this, dataUrl); canvas = null; }; imageObj.src = imgUrl; } Code snippet which does not work on iOS but does work on Android: function convertImageToBase64(imgUrl, callback) { var canvas = document.createElement("canvas"); var context = canvas.getContext('2d'); // load image from data url var imageObj= new Image(); imageObj.onload = function () { var dataUrl; canvas.width = imageObj.width; canvas.height = imageObj.height; context.drawImage(imageObj, 0, 0, canvas.width, canvas.height); dataUrl = canvas.toDataURL("image/png"); callback.call(this, dataUrl); canvas = null; }; imageObj.src = imgUrl; } We need to be able to establish the canvas height / width based upon the image itself. Any guidance or assistance is most appreciated.
has title: iOS HTML5 Canvas toDataURL
upvote count: 5
tagged with: ios
tagged with: javascript
tagged with: canvas
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/40998150
favorite count: 0

http://stackoverflow.com/comment/40857893
type: Comment
comment on: http://stackoverflow.com/q/26076625
has text: sidenote: `#` hashtags cannot be read server side
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41057303
has text: by 'flip', do you actually mean flip as in [reverse](http://en.wikipedia.org/wiki/Flipped_image) of flip colors or whatever? Or do you just mean 'change to a different image', change the `src`... to my knowledge, that not something one would describe using the word flip (might be useful if you want people to understand what you want)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26184509

http://stackoverflow.com/comment/41030928
has text: You're absolutely right, I was looking at this completely the wrong way. It didn't dawn on me to merge the arrays. Works beautifully with my most frequent words count function too. Thanks Christophe.
type: Comment
comment on: http://stackoverflow.com/a/26169704
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40986864
type: QuestionComment
comment on: http://stackoverflow.com/q/26147218
has text: possible duplicate of [How to return the response from an Ajax call?](http://stackoverflow.com/questions/14220321/how-to-return-the-response-from-an-ajax-call)
score: 0
type: Comment

http://stackoverflow.com/q/26087804
tagged with: javascript
answer count: 2
downvote count: 2
has title: Which is more secure to validate my form with, Javascript or PHP?
tagged with: validation
has body: I have just finished an HTML form with processing in PHP. My form is validated in Javascript, but I was wondering if it would be better to validate my form in PHP. Which would be more secure and efficient?
favorite count: 0
has comment: http://stackoverflow.com/comment/40878541
has comment: http://stackoverflow.com/comment/40878606
tagged with: php
has answer: http://stackoverflow.com/a/26087844
has answer: http://stackoverflow.com/a/26087897
upvote count: 0
type: UnansweredQuestion
type: Question
score: -2

http://stackoverflow.com/comment/40931413
comment on: http://stackoverflow.com/q/26115906
score: 0
has text: You will have to find the startX, startY, endX and endY(Calculate using panX, panY from zoom behavior) points of the visible area and check if the nodes bounding box is inside visible area. Apply operations on filtered result of nodes.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26195693
score: 1
accepted answer of: http://stackoverflow.com/q/26095448
has comment: http://stackoverflow.com/comment/41155915
answers question: http://stackoverflow.com/q/26095448
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
has body: this works, i also show 2 methods to get to webNavigation. the second method is just longed winded way to teach other stuff, recommended way is method 1. var processNewURL = function(e) { console.log('e:', e); var win = e.originalTarget.defaultView; //start - method 1 to get to webNav: var webNav = win.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebNavigation); var referredFromURI = webNav.referringURI; //end - method 1 //start - method 2 long winded way: /* var domWin = win.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebNavigation) .QueryInterface(Ci.nsIDocShellTreeItem) .rootTreeItem .QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindow); var tab = domWin.gBrowser._getTabForContentWindow(win); //console.log('tab:', tab); var referredFromURI = tab.linkedBrowser.webNavigation.referringURI; */ //end - method 2 if (referredFromURI != null) { win.alert('referred from:' + referredFromURI.spec); } else { win.alert('not redirected'); } } gBrowser.addEventListener('DOMContentLoaded', processNewURL, false);
has comment: http://stackoverflow.com/comment/41213243
has comment: http://stackoverflow.com/comment/41176285

http://stackoverflow.com/comment/41032104
type: QuestionComment
comment on: http://stackoverflow.com/q/26171373
score: 0
has text: Have you tried anything so far? Can you share any code?
type: Comment

http://stackoverflow.com/a/26134939
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Try this $('#depart, #departc, #depart_modify').Zebra_DatePicker({ format: 'd/m/Y', selectWeek: true, inline: true, pair: $('#return, #returnc'), firstDay: 1, direction: true // add this line }); $('#return, #returnc, #depart_review').Zebra_DatePicker({ format: 'd/m/Y', selectWeek: true, direction: true // change 0 to true });
answers question: http://stackoverflow.com/q/26134706
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26134706

http://stackoverflow.com/a/26104176
has comment: http://stackoverflow.com/comment/40908158
answers question: http://stackoverflow.com/q/26104032
has body: Try using the live() method $('#removeUser').live('click', function (e) { alert('teste'); e.preventDefault(); });
score: -1
has comment: http://stackoverflow.com/comment/40908312
type: Answer
downvote count: 1
upvote count: 0

http://stackoverflow.com/q/26055454
accepted answer: http://stackoverflow.com/a/28850750
tagged with: http://stackoverflow.com/tag/html
score: 2
upvote count: 2
tagged with: excel
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28850750
type: Question
tagged with: export
answer count: 1
has body: I'm exporting a table from a HTML page using the following Javascript code: some table content This code converts the table to an excel sheet. But superscript characters are not moved up but stay as it is. Example: X2 becomes X2 in excel. I have tried unicode \u00B2 as well but it doesn't work. Is it possible to export superscript characters to excel? If yes, how can i achieve this. Thanks in advance. [Edit] I get output like XÂ² if I use unicode ² or ² or ²
downvote count: 0
has title: Superscript in excel sheet while exporting using javascript
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/26077168
type: Answer
answers question: http://stackoverflow.com/q/26077063
has comment: http://stackoverflow.com/comment/40858968
score: 2
upvote count: 2
has body: Yes, it's possible and you've (almost) answered your question yourself. You can do the following: var gS = $.settings.gridSize; if(!(agent % gS === 0 &amp;&amp; value % gS == 1) &amp;&amp; !(agent % gS == 1 &amp;&amp; value % gS === 0)) { freeCells.push(value); }
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26077063

http://stackoverflow.com/comment/41015083
score: 0
type: Comment
has text: and i want to not allow `--` it's meant i allow `-a-` or `-222-` but not allow `--`
type: AnswerComment
comment on: http://stackoverflow.com/a/26162411

http://stackoverflow.com/q/26054463
has answer: http://stackoverflow.com/a/26055768
accepted answer: http://stackoverflow.com/a/26055768
type: AnsweredQuestion
upvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/4862976
linked to: http://stackoverflow.com/q/16136305
has title: Dynamic generated textboxs values sum
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/40817429
has comment: http://stackoverflow.com/comment/40817973
tagged with: http://stackoverflow.com/tag/html
score: -1
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40817707
has body: How sum of all dynamic generated text boxes? This is my JavaScript: This is my HTML: Untitled Document ITEMS STOCK UNIT RATE PER ITEM

http://stackoverflow.com/comment/40841718
score: 1
comment on: http://stackoverflow.com/a/26066400
type: AnswerComment
has text: @Brad - I added a new version that uses jQuery progress notifications.
type: Comment

http://stackoverflow.com/comment/41051677
score: 0
comment on: http://stackoverflow.com/q/26181237
has text: what's the issue here?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40828646
score: 0
comment on: http://stackoverflow.com/a/26060606
type: Comment
has text: -1 means it wasn't found. So basically `if ('value' is not "not found")... `
type: AnswerComment

http://stackoverflow.com/a/26099231
has comment: http://stackoverflow.com/comment/40899836
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26099071
has comment: http://stackoverflow.com/comment/40899923
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40900121
accepted answer of: http://stackoverflow.com/q/26099071
has body: Try this "click" function attached to the ul but filtered by the li's (this allows the list to remain dynamic), it allows you to add the individual names (two versions one that overwrites the existing textfield info and the second that appends to it): DEMO $("#people").on("click", "li", function() { var content = $(this).html(); //$("#testbox").val(content); //replace existing name in textbox $("#testbox").val($("#testbox").val() + content + "\n"); //add new name to textbox });
type: Answer

http://stackoverflow.com/comment/40928430
comment on: http://stackoverflow.com/a/26104294
type: AnswerComment
has text: It works, thanks - Have you faced any issues while working with linq.js 3.x as it is still beta?
score: 0
type: Comment

ecmascript-6
tags question: http://stackoverflow.com/q/26179693
tags question: http://stackoverflow.com/q/26177776
tag name: ecmascript-6
tags question: http://stackoverflow.com/q/26156536
tags question: http://stackoverflow.com/q/26138037
type: Tag
tags question: http://stackoverflow.com/q/26052699

http://stackoverflow.com/comment/40986149
has text: I tried that and it didn't work. I downloaded the parser.js included it. I have :
comment on: http://stackoverflow.com/q/26146655
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40791225
has text: Why are you doing this? Just for fun?
type: Comment
comment on: http://stackoverflow.com/q/26040282
type: QuestionComment
score: 1

http://stackoverflow.com/a/26122357
answers question: http://stackoverflow.com/q/26121911
downvote count: 0
type: Answer
has body: This code will do the trick NOTE : I moved the var inputnum = $("Fooinput").val(); inside of the click event because as OP you will get value on page load not on click. $(document).ready(function(){ $("#foobutton").click(function(){ var inputnum = $("Fooinput").val(); for (var i=0; i<inputnum;i++){ $("#fillout").append(' OPTIONS '); } }); });
upvote count: 1
score: 1

http://stackoverflow.com/a/61548724
upvote count: 13
answers question: http://stackoverflow.com/q/26049303
has body: DeepCompare method to compare two json objects.. deepCompare = (arg1, arg2) =&gt; { if (Object.prototype.toString.call(arg1) === Object.prototype.toString.call(arg2)){ if (Object.prototype.toString.call(arg1) === '[object Object]' || Object.prototype.toString.call(arg1) === '[object Array]' ){ if (Object.keys(arg1).length !== Object.keys(arg2).length ){ return false; } return (Object.keys(arg1).every(function(key){ return deepCompare(arg1[key],arg2[key]); })); } return (arg1===arg2); } return false; } console.log(deepCompare({a:1},{a:'1'})) // false console.log(deepCompare({a:1},{a:1})) // true
score: 13
downvote count: 0
has comment: http://stackoverflow.com/comment/138367060
has comment: http://stackoverflow.com/comment/138367014
type: Answer

http://stackoverflow.com/comment/40851711
type: Comment
comment on: http://stackoverflow.com/a/26072195
type: AnswerComment
has text: Thank you very much,single quote should be used,that is the solution for this!
score: 0

http://stackoverflow.com/a/26093874
accepted answer of: http://stackoverflow.com/q/26093530
has comment: http://stackoverflow.com/comment/40901342
answers question: http://stackoverflow.com/q/26093530
has comment: http://stackoverflow.com/comment/40974753
has comment: http://stackoverflow.com/comment/40904034
has body: In order to simply display that data on Y-Axis, use the below code (considering your object is named "data": $('#container').highcharts({ title: { text: "Showing Frequencies", }, series: [{ name: "Frequencies", data: data.Freq }] }); See the DEMO here
score: 0
has comment: http://stackoverflow.com/comment/40900966
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40925626
has comment: http://stackoverflow.com/comment/40965871
has comment: http://stackoverflow.com/comment/40900682
type: Answer

http://stackoverflow.com/comment/40819980
comment on: http://stackoverflow.com/a/26056040
score: 0
type: AnswerComment
type: Comment
has text: Ok thanks but is there any way by which we can apply priority to queued jobs in a event loop of nodejs.

http://stackoverflow.com/a/26138824
upvote count: 1
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40971206
has comment: http://stackoverflow.com/comment/40971048
has body: What you should see: Your code: &lt;link href="css/bootstrap.css" rel="stylesheet" media="screen"&gt; Fix: &lt;link href="css/bootstrap.css" rel="stylesheet" type="text/css"&gt; You didn't declare to the browser that the .css is indeed a stylesheet (for older browsers). Also, you don't need to use media="screen". In the new HTML5, you can drop type="text/css" too, but I would keep it there just to be safe this year(2014).
score: 1
has comment: http://stackoverflow.com/comment/40971062
answers question: http://stackoverflow.com/q/26138211

http://stackoverflow.com/comment/40974307
comment on: http://stackoverflow.com/q/26140435
type: QuestionComment
has text: JSONFile is already declared variable var JSONFile ="filename.json"
type: Comment
score: 0

http://stackoverflow.com/q/26105014
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26105688
type: Question
linked to: http://stackoverflow.com/q/572897
has body: Im trying to understand javascript prototyping principles and cant get some basic things to work. One thing that im trying to achieve is, to create a base object, that handles constructor input, and sets values based on that input, or default values if no constructor parameter is given. Also, i cant quite figure out how to store this this in a variable so that it would point to correct instance of the object( parent object perhaps ) Below are 2 versions which i have tried to create basic inheritance. ( first one ive seen used before, but it doesnt allow me to handle constructor parameters passed to extended object using its base object's constructor. The second version...is something i came up with to enable it, but...i have never seen anyone using prototypes like this and im sure its the wrong way ( since the prototype property is a function instead of an object) Whats the correct way of solving both of the problems. var Person = function(conf) { if (!conf) {conf = {};} var _person = this; this.first_name = conf.first_name; this.last_name = conf.last_name; this.greet = function() { alert("Hi, im " + this.first_name + " " + this.last_name ); } this.callback_greet = function() { alert("Hi, im " + _person.first_name + " " + _person.last_name ); console.log("this:", this, " _person:", _person ); } } var Student = function(conf) { if (!conf) {conf = {};} /* id like to pass this conf on to Person constructor */ this.report = function() { alert( this.first_name + " " + this.last_name + " is ready to study" ); } } Student.prototype = new Person(); var Teacher = function(conf) { if (!conf) {conf = {};} this.teach = function() { alert( this.first_name + " " + this.last_name + " is ready to teach...maggots" ); } } Teacher.prototype = new Person(); student = new Student({first_name: "Mike", last_name: "Stud"}); //student.first_name="Mike"; //student.last_name="Stud"; student.greet(); /* alerts Hi, im Mike Stud */ teacher = new Teacher(); teacher.first_name="John"; teacher.last…
tagged with: javascript
tagged with: inheritance
tagged with: prototype
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/26105450
linked to: http://stackoverflow.com/q/12592913
possible better answer: http://stackoverflow.com/a/26105688
has title: Javascript prototype handling self and constructor parameters
linked to: http://stackoverflow.com/q/12180790
has answer: http://stackoverflow.com/a/26105450

http://stackoverflow.com/q/26079653
tagged with: http://stackoverflow.com/tag/json
type: Question
upvote count: 2
tagged with: w2ui
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/33635324
has answer: http://stackoverflow.com/a/26220148
accepted answer: http://stackoverflow.com/a/26220148
answer count: 2
has body: I'm using version 1.4.1 of w2ui Grid. I'm trying to do an inline edit whilst loading data from the server using the urls property. $(function () { $('#grid').w2grid({ name: 'grid', // begin block that causes grid to be uneditable // url: { // get : '&lt;?php echo site_url('sections')?&gt;/all', // save : '&lt;?php echo site_url('sections')?&gt;/save' // }, // end block that causes grid to be eneditable show: { toolbar: true, footer: true, toolbarSave: true, toolbarEdit: true }, columns: [ { field: 'code', caption: 'Code', size: '120px', sortable: true, resizable: true, editable: { type: 'text' } } ], // this records array can be removed once the urls are added back records: [ { recid: 1, code: '100' } ] }); }); If I uncomment the "url" block, the "code" field on the grid is no longer editable on double click. If I remove it, it is. Does anyone have a working example of loading data dynamically from the server while also allowing for inline editing? ANSWER As described below, my return structure was incorrect. I am using CodeIgniter (CI) on the back end and my controller method looks like: public function all() { $data = $this-&gt;myModel-&gt;findAll (); $gridData = new W2GridData ( $data ); echo $gridData-&gt;toJson(); //important to put "echo" here and not "return" } where the findAll() method in my model class is: function findAll() { $query = $this-&gt;db-&gt;get ( TABLE_NAME ); return $query-&gt;result (); } and my utility class for wrapping a CI db result is now: &lt;?php class W2GridData { var $total = "-1"; var $records = "-1"; function __construct($items) { $this-&gt;records = $items; $this-&gt;total = count ( $this-&gt;records ); } function toJson() { $strValue = json_encode ( $this ); return str_replace ( "\"id\":", "\"recid\":", $strValue ); // this line was missing } } As you can see, I was returning "id" straight from the db, and not translating it to w2ui's preferred "recid", thus the grid was not rendering correctly.
favorite count: 0
possible better answer: http://stackoverflow.com/a/33635324
has title: W2UI Grid Inline Edit with Data Source
type: AnsweredQuestion
score: 2

http://stackoverflow.com/q/26114922
score: 1
tagged with: strophe
favorite count: 0
type: Question
answer count: 2
upvote count: 1
has body: I am writing an application for agent to make it able to accept/reject chat request and could chat as well with the customers. For work-group I am using Open-fire's Fast-path plugin. Up-to now I am able to log in to the server as well as could set my status to work-group using strohpe.js well it was a tough task too. I can too accept the chat request distributed by Fast-path to agents but I don't know what to do next. how could i send messages back to work-group so that I will be transferred to customer who requested. Thanks
tagged with: openfire
has answer: http://stackoverflow.com/a/26451603
downvote count: 0
has answer: http://stackoverflow.com/a/26115516
tagged with: javascript
type: UnansweredQuestion
has title: Agent application for FastPath(openfire)
has comment: http://stackoverflow.com/comment/40927927

http://stackoverflow.com/comment/40932539
type: QuestionComment
type: Comment
score: 0
has text: the problem is function logout is inside a another script called fop.php, therefore when i give the href it right away redirect there and nothing happens
comment on: http://stackoverflow.com/q/26116865

http://stackoverflow.com/comment/40816243
comment on: http://stackoverflow.com/q/26053952
has text: it's id should be 'CompareModal', as you're telling highcharts to render this chart to a div with 'CompareModal' id
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26065587
has title: How to fix/debug AJAX script that is intermittenly returning 500 errors
tagged with: jquery
has comment: http://stackoverflow.com/comment/40838083
has comment: http://stackoverflow.com/comment/40838047
tagged with: ajax
has comment: http://stackoverflow.com/comment/40838003
tagged with: php
linked to: http://stackoverflow.com/q/12979510
has comment: http://stackoverflow.com/comment/40838257
has comment: http://stackoverflow.com/comment/40838244
has body: I have an AJAX script that I am using to do some database magic after an order is placed on my site. Here is how I reference it on my order confirmation page: &lt;script&gt; // I define my function function voucherRedeem(str) { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { document.getElementById("confirmation").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","redeemvoucher.php?order="+str,true); xmlhttp.send(); } // This grabs the order number in the confirmation field. var finisher = jQuery('div.col-main p a:first').text(); // This executes the function. voucherRedeem(finisher); &lt;/script&gt; I'm having cases where the script actually works but I see 500. Other times I see 500 and there are no results. Ultimately, I don't want there to be any 500. This is a staging server with plenty of resources so I don't foresee a network or CPU issue. The error I'm seeing in Firebug: GET http://www.website.com/redeemvoucher.php?order=123456 500 Internal Server Error 1.33s Can I set a delay on this JS function or maybe a document.ready? Again, not really sure what is happening.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40838179
has comment: http://stackoverflow.com/comment/40838152
has comment: http://stackoverflow.com/comment/40838278
has comment: http://stackoverflow.com/comment/40838200
has answer: http://stackoverflow.com/a/26065751
tagged with: javascript
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26065747

http://stackoverflow.com/q/26057280
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26057340
score: 2
type: AnsweredQuestion
upvote count: 3
downvote count: 1
type: Question
has body: Find the code below. I would like to make work the same functionality in the IE. I am struggling to make it work on IE 9. Jquery's attr() function doesn't seems to be working in IE 9. Alternatively I tried this remove.onclick = function(){removeBarColor(color)}; this also doesn't seems to be working in IE9. Hope my problem is clear. Thanks for help in anticipation.
tagged with: internet-explorer
tagged with: javascript
has title: Jquery attr function not working in IE 9
has answer: http://stackoverflow.com/a/26057340
answer count: 1
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/26160701
accepted answer of: http://stackoverflow.com/q/26160589
answers question: http://stackoverflow.com/q/26160589
upvote count: 3
type: Answer
has body: use it like the follow $(function() { $('input').on('blur',function(){ $(this).attr('disabled','disabled'); //or use readonly }); $('input').on('focus',function(){ $(this).removeAttr('disabled'); //or use readonly attribute }); });
has comment: http://stackoverflow.com/comment/41019998
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/41020183
type: AcceptedAnswer

http://stackoverflow.com/q/26143141
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/40979285
tagged with: css
has comment: http://stackoverflow.com/comment/40979191
has answer: http://stackoverflow.com/a/26143776
score: 1
type: Question
has title: Mobile menu links not working
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I have an issue with a mobile drop down menu where the links within the menu do not trigger and it just send the div back to hiding without going to page. <a href="<?php echo home_url(); ?>">Home Memberships Platinum Membership Our Equipment Video Production Contact
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/40941204
comment on: http://stackoverflow.com/q/26122507
score: 1
has text: Why not use `.on()` for the click handler instead of having the href call js?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40859803
has text: @K.Ly no, it is not. Value of `input` is set by ` `.
score: 1
comment on: http://stackoverflow.com/q/26077544
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26133415
type: Answer
accepted answer of: http://stackoverflow.com/q/26091744
answers question: http://stackoverflow.com/q/26091744
has body: MINOR CORRECTION - there should be "" around predef in the .jshintrc file. Fixed by adding this to the jshint options in my Gruntfile.coffee: predef: [ "jasmine" "describe" "xdescribe" "before" "beforeEach" "after" "afterEach" "it" "xit" "it" "inject" "expect" "spyOn" ] .jshintrc: "predef": [ "jasmine", "describe", "xdescribe", "before", "beforeEach", "after", "afterEach", "it", "xit", "it", "inject", "expect", "spyOn", ]
upvote count: 22
type: AcceptedAnswer
downvote count: 0
score: 22
has comment: http://stackoverflow.com/comment/59527433

http://stackoverflow.com/q/26085462
has comment: http://stackoverflow.com/comment/40874199
tagged with: validation
has body: I'm using a Bootstrap template for my web app. Now in one form I'm accepting a US Zip code value from the user, submitting the form to the desired page and showing the result. Now I have to put validations for it as follows: The value entered by user in input field "zip_code" should only be Valid US zip code. If he/she enters invalid value then the error message in red color should appear above the text field intended for entering zip code. The form should not get submit. This validation should be done by using jQuery and on clicking of a map-marker icon which I made to behave like a submit button. Following is the necessary HTML code snippet : LOGIN REGISTER STATUS CONTACT MY ACCOUNT SHOP DESTINATOR As I'm a relatively new to the Bootstrap framework can someone please help me in this regard? Thanks for spending some of your valuable time in understanding my issue. If you need any other information regarding my issue please do let me know. Any kind of help would be greatly appreciated. Waiting for your precious replies.
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has title: How to validate US zip code using jQuery and show error message in red color above the text field in Bootstrap template?
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: error-handling
linked to: http://stackoverflow.com/q/160550
has comment: http://stackoverflow.com/comment/40874401
has answer: http://stackoverflow.com/a/26085558
duplicate of: http://stackoverflow.com/q/160550
linked to: http://stackoverflow.com/q/19011993
type: Question
has comment: http://stackoverflow.com/comment/40874283

http://stackoverflow.com/comment/40823392
has text: Thanks for answer but i don't want to get URL, i just want to remove it from my URL ba
comment on: http://stackoverflow.com/a/26057949
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26146639
score: 0
has answer: http://stackoverflow.com/a/26146746
tagged with: javascript
has body: I am working with Angularjs and i want to understand something. I have a html page: ... {{myvalue}} Here i am able to display my value i defined in scope. I don't need to use Route since all are in the same page. But when i divide my view with ng-view i am missing something. I don't understand why it's not working. Here is my code. The plunker link is here When i try to add a partial i am getting a error about ngRoute. I provide library ngRoute and i use RouteProvider. What's missing please ? Here is the plunker Thanks
has title: Why cannot access my scope.variable in partial view
tagged with: angularjs
has answer: http://stackoverflow.com/a/29589781
has comment: http://stackoverflow.com/comment/40985867
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26146746
type: Question
has answer: http://stackoverflow.com/a/26146726
accepted answer: http://stackoverflow.com/a/26146726
has answer: http://stackoverflow.com/a/26146943

http://stackoverflow.com/a/26125518
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26125401
has body: You can build your querystring looping through the array (here I used .each()) and using the .split() function to separate your coordinates. var qs; $.each(arr,function(i,v){ qs += "x" + i + "=" + v.split("#")[0] + "&amp;y" + i + "=" + v.split("#")[1] + ((i+1)!=arr.length) ? "&amp;" : ""; }); var url = "http://host/app?" + qs;
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26125401

http://stackoverflow.com/a/26146904
score: 3
accepted answer of: http://stackoverflow.com/q/26143612
has comment: http://stackoverflow.com/comment/40998098
answers question: http://stackoverflow.com/q/26143612
has body: I think you'll find that this.handleFileEmail isn't necessarily the same function since you are adding/removing the component. Try removing the listener in componentWillUnmount instead. componentWillUnmount: function() { window.removeEventListener("fileThisEmail", this.handleFileEmail, false); }
has comment: http://stackoverflow.com/comment/41010260
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41008625
upvote count: 3
has comment: http://stackoverflow.com/comment/41023228
type: Answer
has comment: http://stackoverflow.com/comment/40991435
downvote count: 0
has comment: http://stackoverflow.com/comment/40993650
has comment: http://stackoverflow.com/comment/40991390

http://stackoverflow.com/q/26155870
has body: Now, this code perfectly works fine in Firefox, but when I try to execute it on IE8 I'm getting the following error from the browser (exactly after selecting the files). I'm totally clueless about how to resolve it. IE8 Error: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.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) Timestamp: Thu, 2 Oct 2014 06:53:20 UTC Message: 'length' is null or not an object Line: 2 Char: 2815 Code: 0 URI: http://localhost:8090/JQueryStrutsFileUploadTest/js/jquery-1.11.1.min.js HTML Line: Max File Size: 2 Mb - Display last 20 files File Name File Size File Type Cancel Action JQuery Line:
tagged with: internet-explorer-8
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26155949
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26155949
has title: Unable to upload file in IE8 using JQuery
type: Question

http://stackoverflow.com/q/26130245
accepted answer: http://stackoverflow.com/a/26130894
score: 1
tagged with: post
type: Question
has comment: http://stackoverflow.com/comment/40956335
downvote count: 0
tagged with: javascript
has title: XMLHttpRequest POST returning blank responseText
tagged with: ajax
has answer: http://stackoverflow.com/a/26130894
answer count: 1
has comment: http://stackoverflow.com/comment/40956385
favorite count: 0
has body: I am attempting to make a HTTP POST via AJAX in Javascript (not using jquery) ajax_post = function(aData) { var k, v, xmlhttp; xmlhttp = new XMLHttpRequest(); xmlhttp.open("POST", aData.path, true); xmlhttp.setRequestHeader('Content-Type', 'application/json'); xmlhttp.send(JSON.stringify(aData)); return xmlhttp.responseText; }; Server side is getting the POST and is sending a response. I know a response is hitting client side because I tested the server with http://code.google.com/p/chrome-rest-client/ and it responds with the JSON that the server sent as expected. I dump the entire XMLHttpRequest object to the console but still dont see what I am missing: statusText status 0 response responseType responseXML null responseText upload XMLHttpRequestUpload {ontimeout: null, onprogress: null, onloadstart: null, onloadend: null, onload: null…} withCredentials false readyState 1 timeout 0 onreadystatechange null ontimeout null onprogress null onloadstart null onloadend null onload null onerror null onabort null open function open() { [native code] } setRequestHeader function setRequestHeader() { [native code] } send function send() { [native code] } abort function abort() { [native code] } getAllResponseHeaders function getAllResponseHeaders() { [native code] } getResponseHeader function getResponseHeader() { [native code] } overrideMimeType function overrideMimeType() { [native code] } UNSENT 0 OPENED 1 HEADERS_RECEIVED 2 LOADING 3 DONE 4 addEventListener function addEventListener() { [native code] } removeEventListener function removeEventListener() { [native code] } dispatchEvent function dispatchEvent() { [native code] } What is wrong with my client side POST request?
has comment: http://stackoverflow.com/comment/40956391
upvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/a/26138752
score: 0
has body: ok i fixed it ;) Forgot that var list = document.getElementsByClassName("all_leagues") returns an Array so the right selector is var list = document.getElementsByClassName("all_leagues")[0]; full code: var list = document.getElementsByClassName("all_leagues")[0]; list.getElementsByClassName("league_check "); thx anyways ;)
type: Answer
has comment: http://stackoverflow.com/comment/40970879
answers question: http://stackoverflow.com/q/26138642

http://stackoverflow.com/a/26182795
answers question: http://stackoverflow.com/q/26182598
score: 0
type: AcceptedAnswer
has body: You don't need to clear the input and then add the new value in, the JS can be streamlined to this: $('#input').val(string); // Contains 14,023 char string To be sure the value is being truncated, can you try and do a truthy match like so: if (string === $('#input').val()) { console.log('the values match'); } If it does return true then it is just a visual thing, the content of the input box is intact :-) If not, then I would suggest adding a maxlength attribute to the input. Hope this helps!
has comment: http://stackoverflow.com/comment/41055189
type: Answer
accepted answer of: http://stackoverflow.com/q/26182598

http://stackoverflow.com/q/26115535
has title: Google CSE Branding on IE Re-appearing on custom search Box
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
tagged with: google-custom-search
type: UnansweredQuestion
upvote count: 1
has body: I have chose to CSE Result Only look and feel in order to implement my box. I did the branding of Google CS by attaching functions to onblur and onfocus. I found the code on a Demo by Google. Everything works fine, but here is an annoying scheme on IE: A user types in the box and searches A user clicks on link that open in the current window If he clicks back, the box shows the query and the box's background. On different browsers the query is removed. My problem is how to either clear the box or remove the background. IE is not running my codes (which works in my branding code) after the user clicks back. Here is the Code I used to bind events. (function() { var f = document.getElementById('cse-search-box-form-id'); if (f && f['cse-search-input-box-id']) { var q = f['cse-search-input-box-id']; var n = navigator; var l = location; var du = function(n, v) { var u = document.createElement('input'); u.name = n; u.value = v; u.type = 'hidden'; f.appendChild(u); return u; }; var su = function(n, t, v, l) { if (!encodeURIComponent || !decodeURIComponent) { return; } var regexp = new RegExp('(?:[?&]' + n + '=)([^&#]*)'); var existing = regexp.exec(t); if (existing) { v = decodeURIComponent(existing[1]); } var delimIndex = v.indexOf('://'); if (delimIndex >= 0) { v = v.substring(delimIndex + '://'.length, v.length); } var v_sub = v.substring(0, l); while (encodeURIComponent(v_sub).length > l) { v_sub = v_sub.substring(0, v_sub.length - 1); } du(n, v_sub); }; var pl = function(he) { var ti = 0, tsi = 0, tk = 0, pt; return function() { var ct = (new Date).getTime(); if (pt) { var i = ct - pt; ti += i; tsi += i * i; } tk++; pt = ct; he.value = [ti, tsi, tk].join('j'); }; }; var append = false; if (n.appName == 'Microsoft Internet Explorer') { var s = f.parentNode.childNodes; for (var i = 0; i < s.length; i++) { if (s[i].nodeName == 'SCRIPT' && s[i].attributes['src'] && s[i].attributes['src'].nodeValue == unescape('http:\x2F\x2Fwww.google.com\x2Fcse\x2Fbrand?form=cse-search-box…
type: Question
tagged with: internet-explorer
score: 1

http://stackoverflow.com/comment/40992440
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26149940
has text: Thank you for your explanation. But i cannot still display ng-repeat value

http://stackoverflow.com/comment/41005485
score: 0
type: AnswerComment
has text: I figured out my mistake on my own, but thanks anyways
type: Comment
comment on: http://stackoverflow.com/a/26126770

http://stackoverflow.com/comment/41080669
has text: Ok - these errors emanate from the installer itself but npm still installs successfully, follow discussion here: github.com/npm/npm/issues/6334
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26072277
score: 0

http://stackoverflow.com/comment/41340407
type: AnswerComment
score: 0
type: Comment
has text: Yes, your JavaScript might be doing some magic. Please confirm that.
comment on: http://stackoverflow.com/a/26085169

http://stackoverflow.com/comment/40942602
comment on: http://stackoverflow.com/a/26123233
score: 0
type: AnswerComment
type: Comment
has text: My products is not array but object so I set isArray to false. If isArray is set to true but backend returns object angular throws errow Error: [$resource:badcfg] so I can not do this

http://stackoverflow.com/comment/40909647
type: AnswerComment
has text: @KevinRave Check an answer again.
comment on: http://stackoverflow.com/a/26104472
type: Comment
score: 0

http://stackoverflow.com/comment/41004097
score: 0
type: Comment
has text: Also, is a **.svc** file extension valid to be the second argument of the `post` method here?
comment on: http://stackoverflow.com/a/26120199
type: AnswerComment

http://stackoverflow.com/comment/41043579
type: QuestionComment
comment on: http://stackoverflow.com/q/26155866
has text: Oh sorry. But why you need your own custom made observable? I am bit curious. I am not so expert but trying to help you out
score: 0
type: Comment

http://stackoverflow.com/q/26075276
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40855322
accepted answer: http://stackoverflow.com/a/26075396
type: AnsweredQuestion
score: 1
has title: Display only one div and hide the rest using index
has answer: http://stackoverflow.com/a/26075393
has answer: http://stackoverflow.com/a/26075416
upvote count: 1
has comment: http://stackoverflow.com/comment/40855267
type: Question
possible better answer: http://stackoverflow.com/a/26075393
tagged with: javascript
has answer: http://stackoverflow.com/a/26075396
answer count: 3
has comment: http://stackoverflow.com/comment/40855307
has body: I want to have a function that will fadeIn() a div with class image on hover on another class. However there are multiple divs from each class and would like to have each div correspond to another. I havet hought about using index() to get the inex number of each class and then equal each index number to only display the one corresponding. To clarify I'll express it as code: The idea is that when hovering the first woot div it will display the first image div, if hovering the second one it will display the second one and the same process for the rest.
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/41043391
score: 0
type: Comment
type: QuestionComment
has text: I saw and made corrections to my javascript... still not working var dateofBirth = document.getElementById("tbDOB"); var datepicker = document.getElementById("dbDatePicker");
comment on: http://stackoverflow.com/q/26125111

http://stackoverflow.com/a/26179919
has comment: http://stackoverflow.com/comment/41077276
accepted answer of: http://stackoverflow.com/q/26179693
has comment: http://stackoverflow.com/comment/41077219
answers question: http://stackoverflow.com/q/26179693
has body: Iterators […] keep their state internally, so it seems there's no way Yes, and that for a good reason. You cannot clone the state, or otherwise you could tamper too much with the generator. It might be possible however to create a second iterator that runs alongside of the first one, by memorizing its sequence and yielding it later again. However, there should be only one iterator that really drives the generator - otherwise, which of your clones would be allowed to send next() arguments?
has comment: http://stackoverflow.com/comment/41049393
score: 7
has comment: http://stackoverflow.com/comment/41078155
upvote count: 7
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41047541
type: Answer
has comment: http://stackoverflow.com/comment/55114432
downvote count: 0

http://stackoverflow.com/comment/41218237
comment on: http://stackoverflow.com/a/26057741
score: 0
type: Comment
has text: Glad it worked. I don't know how plain CSS tooltips can be made to work, actually. There surely must be a way... Interesting problem.
type: AnswerComment

http://stackoverflow.com/a/26074309
downvote count: 0
answers question: http://stackoverflow.com/q/26073885
type: Answer
upvote count: 1
score: 1
has body: I've been reading a lot about loops. I've lerned that the fastest way to do a loop in javascript is when you [while loop] Loops in javascript in modern browsers are highly optimised, there is usually little or no difference in current browsers between for, while and do loops. There were differences a few years back, but they were inconsistent across browsers so what was faster in one wasn't in another. So just use the loop that suits and if there is a performance issue, investigate. It will generally have little or nothing to do with the type of loop. It looks like it's fast because it does seems to only do the one check while also setting at the same time Not necessarily. It's less typing to write it that way, but often it's faster to do assignments separately to the test (but the difference is small either way), e.g. while (i) { --i; } may well be faster, or at least no slower than, while (--i) { ... } But again, use whichever seems appropriate in the context of the surrounding code. See Elias' answer regarding premature optimisation.

http://stackoverflow.com/comment/40982764
has text: Most of the code you've posted here doesn't look relevant to the problem you're describing. Where are your event handlers? Define "does not work" for us—are exceptions being thrown? What behavior are you expecting versus what you're seeing?
comment on: http://stackoverflow.com/q/26143408
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40840176
type: AnswerComment
type: Comment
has text: thanks for your replies. it turns out my mistake was even more beginner... i was importing the csv and the numbers were being recorded as strings and not numbers - which I assume made the filtering weird (that makes sense, yeah)? Thanks for the info on the filters bins, those were still helpful.
comment on: http://stackoverflow.com/a/26066210
score: 0

getparameter
tag name: getparameter
type: Tag
tags question: http://stackoverflow.com/q/26073120

http://stackoverflow.com/comment/40981008
has text: Looks like it's on your server, if so then you should already have the base URL for it. Either way, [you shouldn't parse HTML with Regexp](http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454), try using an XML or DOM parses instead like phpQuery for example.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26144069
type: Comment

http://stackoverflow.com/q/26180800
has comment: http://stackoverflow.com/comment/41049837
tagged with: javascript
has comment: http://stackoverflow.com/comment/41049496
score: 0
tagged with: google-webfonts
has comment: http://stackoverflow.com/comment/41050152
has body: Okay, so i have this problem, i tried searching it on google, had no luck. When a browser loads my site, it says that there are unsafe scripts there, but all the scripts are working properly except google fonts. To make them work i have to click "load all scripts anyways". Is it possible to make that browsers wouldn't recognise my scripts and google fonts as unsafe? i'm hosting my site on a dropbox.
tagged with: unsafe
has comment: http://stackoverflow.com/comment/41050443
tagged with: cross-browser
has title: How to make all my site scripts safe for browsers?
has comment: http://stackoverflow.com/comment/41049519
answer count: 0
has comment: http://stackoverflow.com/comment/41073891
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/26056581
upvote count: 8
type: Answer
accepted answer of: http://stackoverflow.com/q/26056434
has comment: http://stackoverflow.com/comment/130631488
score: 7
downvote count: 1
answers question: http://stackoverflow.com/q/26056434
has body: Try this : var time1 = "01:00:00"; var time2 = "00:30:00"; var time3 = "00:30:00"; var hour=0; var minute=0; var second=0; var splitTime1= time1.split(':'); var splitTime2= time2.split(':'); var splitTime3= time3.split(':'); hour = parseInt(splitTime1[0])+parseInt(splitTime2[0])+parseInt(splitTime3[0]); minute = parseInt(splitTime1[1])+parseInt(splitTime2[1])+parseInt(splitTime3[1]); hour = hour + minute/60; minute = minute%60; second = parseInt(splitTime1[2])+parseInt(splitTime2[2])+parseInt(splitTime3[2]); minute = minute + second/60; second = second%60; alert('sum of above time= '+hour+':'+minute+':'+second);
type: AcceptedAnswer

http://stackoverflow.com/comment/40844062
type: Comment
has text: I'm still not getting to be this in this answer. ( I don't suppose it to be there in your answer, it's not about `this`)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26068723

http://stackoverflow.com/a/26162243
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26162128
type: Answer
accepted answer of: http://stackoverflow.com/q/26162128
has body: Like so ... $(ddl).html(li); $(ddl + ' :not([value="' + x + '"])').hide(); } else { $(ddl + ' :not([value="' + x + '"])').show(); } ... Instead of removing the item completely, you simply hide. When you empty the input field, re-show all the items.
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/136244582
upvote count: 2

http://stackoverflow.com/comment/40980090
score: 0
has text: it's checking if 1.0 is truthy, which is always the case.
type: Comment
comment on: http://stackoverflow.com/q/26143592
type: QuestionComment

http://stackoverflow.com/q/26131800
has title: Javascript password hashing for sending insecurely
accepted answer: http://stackoverflow.com/a/26131873
tagged with: passwords
type: AnsweredQuestion
tagged with: authentication
type: Question
answer count: 1
tagged with: javascript
has body: I want to send a password over HTTP. Scenario: User enters his username and password into a form. Password is hashed and sent to the server with the username. Server checks password hash and username and authenticates user. (the server doesn't know the plain text password either.) If someone somehow intercepts the authentication message, he will obtain the hashed password and username, and he could potentially log in to that user's account. Essentially, the hashed password IS the password, according to the server. Here's the thing: I don't care. It's rare enough that someone would have that data hijacked, and even so, it's not really a problem if your account gets stolen, you can just make a new one. The Question: What is a good way to hash the user's password in JavaScript? The hash can't use random salt since it needs to be recognized by the server. The only thing I am concerned about is the user's plain text password being found out if the message is intercepted. The reason being that the plain text password could also be used to compromise other services the person uses that may actually contain important information. EDIT: to clarify, the question is mainly about what hashing algorithm to use, and if there is a lightweight library for it.
score: 0
has answer: http://stackoverflow.com/a/26131873
tagged with: hash

http://stackoverflow.com/q/26078006
has answer: http://stackoverflow.com/a/26078141
has comment: http://stackoverflow.com/comment/40861234
has comment: http://stackoverflow.com/comment/40860498
has comment: http://stackoverflow.com/comment/40860637
duplicate of: http://stackoverflow.com/q/8305915
type: Question
has comment: http://stackoverflow.com/comment/40860554
has body: We can pretend for using unary operator as an IIFE like below: +function(){ return 5; }();//5 -function(){ return 5; }();//-5 ~function(){ return 5; }();//-6 !function(){ return 5; }();//false So, is there real-world use case for such IIFE or we should avoid using IIFE by using unary operator and just use real IIFE: (function(){ return 5; }()); //5
score: -1
has answer: http://stackoverflow.com/a/26078333
has title: IIFE with unary operator: real world use case
upvote count: 2
answer count: 2
linked to: http://stackoverflow.com/q/8305915
has comment: http://stackoverflow.com/comment/40860514
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40860485
downvote count: 3
type: UnansweredQuestion

http://stackoverflow.com/comment/41027677
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26166758
has text: When the test runs it does not appear that it is waiting for at least 10 seconds before it determines that the element is not visible. My understanding is that this is what `setFindTimeout()` should do.

http://stackoverflow.com/a/26044233
score: 0
type: Answer
has body: Take a look at this plugin : https://github.com/carhartl/jquery-cookie You may want to use $.slideDown() and $.slideUp() so you can differentiate whether you are opening or closing the element When you open the drawer: $.cookie('drawer_state', 'open'); and when you close the drawer: $.cookie('drawer_state', 'close'); then read the drawer state when your document loads: $(document).ready(function(){ if($.cookie('drawer_state') == "open"){ $("#drawer").slideUp(); }else{ $("#drawer").slideDown(); } }); HTML: open folder ... ... ...
answers question: http://stackoverflow.com/q/26044020

http://stackoverflow.com/q/26042779
tagged with: angularjs
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: twitter-bootstrap-3
has comment: http://stackoverflow.com/comment/40795969
upvote count: 1
has title: How can I pass a list as a parameter to a dialog?
answer count: 1
has body: Y must pass a list of data to a dialog to fill a combobox. In other part of the code I passed a string to dialogs, but, using the same method for this case, It didn´t work. Here is my js code: $scope.addPartido = function () { if ($scope.dataProv.locationsProv.provincias) { $modal.open({ templateUrl: '../../secure/addPartido/addPartidoDialog.html', controller: function ($scope, $modalInstance) { $scope.close = function () { $modalInstance.close(); }; } }); } }; Inside my controler I have the variable $scope.dataProv.locationsProv.provincias fill with de data. And here is my html code: Provincia* Cerrar
has answer: http://stackoverflow.com/a/26047110
tagged with: javascript
type: UnansweredQuestion
tagged with: angular-ui-bootstrap
downvote count: 0
score: 1
favorite count: 0

http://stackoverflow.com/comment/40829243
type: Comment
comment on: http://stackoverflow.com/a/26059208
score: 0
type: AnswerComment
has text: thx! this looks good. One addition: you don't need the keycode: `if(e.target.id!='test')` is enough

sequelize.js
type: Tag
tags question: http://stackoverflow.com/q/26092913
tag name: sequelize.js
tags question: http://stackoverflow.com/q/26100791

http://stackoverflow.com/comment/87044006
type: Comment
comment on: http://stackoverflow.com/a/26073494
score: 0
type: AnswerComment
has text: $http get is a promise. You should return the promise, not map it to function delegates

http://stackoverflow.com/q/26045659
has answer: http://stackoverflow.com/a/26045731
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26045750
has answer: http://stackoverflow.com/a/26046258
has comment: http://stackoverflow.com/comment/40801341
has comment: http://stackoverflow.com/comment/40801297
type: Question
downvote count: 4
has comment: http://stackoverflow.com/comment/40801294
upvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I need to change the text of '#foo #three' using 'this' to get the text of the div#one The output I need is: cat dog cat Html: cat dog mouse JS: $("#foo #three").text($(this).parent().children().first().text()); I need this code dynamically http://jsfiddle.net/Kodam/s466a31q/
has comment: http://stackoverflow.com/comment/40801312
tagged with: css
has comment: http://stackoverflow.com/comment/40801350
answer count: 4
has answer: http://stackoverflow.com/a/26053217
has title: How select the selector from its method?
has answer: http://stackoverflow.com/a/26045750
score: -4
possible better answer: http://stackoverflow.com/a/26045731
has comment: http://stackoverflow.com/comment/40802254

http://stackoverflow.com/q/26164776
answer count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/41019810
tagged with: php
accepted answer: http://stackoverflow.com/a/26164928
type: AnsweredQuestion
tagged with: wordpress
has title: wordpress php issue echoing html elements to page
has body: I'm having a nightmare with wordpress and PHP as I'm not great with either. I'm trying to dynamically generate an options menu and I'm using the following lib: http://loudev.com/ But, the output to the page appears as plain text values of the array I've pulled from my database (this is returned from the getB2BCountSelection(); function) I've got the lib referenced in my header for the css and js file and jquery referenced etc. so far as I can tell its simply that my HTML tags are not being written to the page DOM. Here is an example of the output: select alldeselect all Abattoir Machinery and Equipment Abattoirs Abrasive Products - Production Of Abrasive Products - Wholesale & Supply Access Equipment Accident Administration & Management Services Accommodation Any ideas ? EDIT: I'm running the below PHP and still getting the above issues and non tagged output. [php] $row = getB2BCountSelection(); $pages = count($row); echo ' '; echo 'select all'; echo 'deselect all'; for ($i = 0; $i < $pages; $i++) { echo " ".$row[$i][0]." "; } echo ' '; [/php]
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/26164928
has comment: http://stackoverflow.com/comment/41039075

http://stackoverflow.com/comment/65721779
has text: @Academia I find it confusing that you say "nothing can be done to avoid this", and at the same time you propose a working solution :) As you quoted, just need to attach a click event handler and prevent default behaviour :)
comment on: http://stackoverflow.com/a/26148715
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40906484
comment on: http://stackoverflow.com/a/26103031
type: AnswerComment
type: Comment
score: 0
has text: Right, he may intend for it to be that way. Not sure. However the loop is actually closed. The `if` statement doesn't use curly braces. :)

http://stackoverflow.com/comment/40848853
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26059539
has text: ya its my fault.. Left office.. And didn't made proper response.

http://stackoverflow.com/a/26152602
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/40997308
has comment: http://stackoverflow.com/comment/40997211
score: 4
has body: jQuery becomes very useful here $('input[type="submit"]') This will allow you to make html changes with immunity and support older browsers that still have 1% usage. Your 2nd example should work without the ; in the middle of the line. However not all browsers support getElementsByTagName. Update using no ready made libs. If you are a build it yourself person, who wants to make his own lib. function getElementsByAttrib(attrib) { return document.querySelectorAll('[' + attrib + ']'); } var elements = getElementsByAttrib('type="submit"'); MySubmit = elements[0]';
answers question: http://stackoverflow.com/q/26152401
has comment: http://stackoverflow.com/comment/40997105
downvote count: 2

http://stackoverflow.com/comment/40903905
has text: TJ - what function should this be wrapped in? I've tried to put it in $().ready(function() but neither var - product_id or product_price are sent through
comment on: http://stackoverflow.com/a/26098222
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26040564
has answer: http://stackoverflow.com/a/26040659
has body: I understand the first part of the if, but isn't the second part stating "since 'n' is not equal to zero, return 'n' in the even function modified with the logical NOT(!) operator."? Doesn't that return 4 if I were to pass 5 as the argument to fn();? var fn = function even (n) { if (n === 0) { return true; } else { return !even(n - 1) } }; fn(5); //=&gt; false
score: 4
has title: Can someone explain how you get false in this function expression?
has answer: http://stackoverflow.com/a/26040695
possible better answer: http://stackoverflow.com/a/26040699
has answer: http://stackoverflow.com/a/26040699
accepted answer: http://stackoverflow.com/a/26040659
has answer: http://stackoverflow.com/a/26040752
tagged with: javascript
has comment: http://stackoverflow.com/comment/40841546
upvote count: 4
answer count: 4
type: AnsweredQuestion
downvote count: 0
favorite count: 0
type: Question

http://stackoverflow.com/comment/41025061
type: Comment
score: 3
has text: It's about performance, not perception, so this is no good for me unfortunately.
type: AnswerComment
comment on: http://stackoverflow.com/a/26167737

http://stackoverflow.com/q/26135458
possible better answer: http://stackoverflow.com/a/26135528
has answer: http://stackoverflow.com/a/26135528
has body: I am working with this jQuery lightbox which is featherlight and don't understand how to fire bellow events as I am not good so I am hopping someones help: Before Open: beforeOpen: function(event){ } After Open: afterOpen: function(event){ } My Code Work: Load Lightbox on click event Delete Item Are you Sure? blubblub? Close Yes $('#openbox').click(function() { $.featherlight('#fl1'); }); My Fiddle: http://jsfiddle.net/g68bZ/29/ Thanks.
score: 2
type: AnsweredQuestion
tagged with: lightbox
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26154056
type: Question
tagged with: featherlight.js
has title: jQuery lightbox(featherlight) how to run beforeOpen and afterOpen event
upvote count: 2
answer count: 2
accepted answer: http://stackoverflow.com/a/26154056

http://stackoverflow.com/q/26153132
score: 0
tagged with: ratchet
answer count: 1
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41012936
has body: I've been googling around and looking for examples on implementations with ratchet and angular js and php as my server. But no luck, I'm still not that advanced in angular, but I have a experience with ratchet. If there was a way on doing this where should I put the following codes in my angular app? var conn = new WebSocket('ws://localhost:8080'); conn.onopen = function(e) { console.log("Connection established!"); }; conn.onmessage = function(e) { console.log(e.data); };
has answer: http://stackoverflow.com/a/26163020
has title: ratchet with angular js implementation
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26163020
tagged with: javascript
type: Question

http://stackoverflow.com/comment/41081076
comment on: http://stackoverflow.com/a/26197858
type: AnswerComment
type: Comment
score: 0
has text: If I get you right the files are always saved as .jpg even in browsers that does not support it? Do you know a way how I can optimize the exported image without reducing the quality in the browser? On desktop I take imageoptim https://imageoptim.com/ which works great on MAC. The exported image can be reduced by 35% in size without loosing quality. Do you have any idea how to do this in the browser?

http://stackoverflow.com/comment/40799667
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26044515
has text: No problem Brett, thanks for trying anyway! Gonna stare at the code some more i guess :).
type: AnswerComment

http://stackoverflow.com/comment/40943703
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26123781
type: QuestionComment
has text: Object keys returns an array of strings, not instances.

http://stackoverflow.com/comment/40933308
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26118162
has text: yes there's a noticed time like 1 sec to retrieve a big amount of data, so what other ways can i use ? im fine by changing them but i dont want it to be slo

http://stackoverflow.com/a/26116746
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26116714
has body: You can use Object.keys() to get the keys of that object and with each key, you can get the corresponding values, like this &gt; var dataObject = { ... "Not In Build Scope": 37, ... "Incomplete": 1 ... }; &gt; var keys = Object.keys(dataObject); &gt; var values = keys.map(function(key) { ... return dataObject[key]; ... }); &gt; keys [ 'Not In Build Scope', 'Incomplete' ] &gt; values [ 37, 1 ]
answers question: http://stackoverflow.com/q/26116714
type: AcceptedAnswer

http://stackoverflow.com/comment/40936479
type: QuestionComment
has text: not clear what are you asking for?
score: 1
comment on: http://stackoverflow.com/q/26120157
type: Comment

http://stackoverflow.com/comment/40916198
score: 0
type: Comment
type: QuestionComment
has text: @dragosrsupercool Glad it works. I posted it as answer per your suggestion so whoever it may help don't have to go through the comments.
comment on: http://stackoverflow.com/q/26104297

http://stackoverflow.com/q/26051164
has answer: http://stackoverflow.com/a/26071040
accepted answer: http://stackoverflow.com/a/26071040
answer count: 1
has comment: http://stackoverflow.com/comment/40848120
tagged with: javascript
has comment: http://stackoverflow.com/comment/40815659
upvote count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/40845949
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
downvote count: 0
tagged with: animation
has title: RaphaelJS / CSS - Animating text/numbers
has comment: http://stackoverflow.com/comment/40835873
type: AnsweredQuestion
score: 1
has body: So, I am just diving into simple web animations for a game, and I am looking for advice. Eventually, I'll get a good grip on beziers and arcs and learn how to animate along a path to get some nice Diablo III-esque curving numbers but, for now, I am just trying to get the fundamentals down. First (real) attempt The key code is pretty simple- paper.text(170, 95, dmgValue).attr({fill:"white", "font-size":16}).animate({ transform:"t0,-50", "fill-opacity":0} ,500).node.setAttribute("class", "no-select"); A CSS styling prevents the text from being highlighted (thanks to a user here for the help). The main issue, is that the text is still there with no opacity- you can hover over it and see the text cursor. Although it works, it' kind of messy looking. Also, since there is no variable assigned, I don't think I can dispose of it with Element.remove(); Where I am at now There were a lot of small revisions I made in-between saved versions that made the code to the bulkiness that it is now. I wanted the ability to limit the number of numbers flying around at once (for slower computers), so I put them into an array that can be looped endlessly and used, although that probably isn't needed and it wouldn't be a big deal to leave it out. Also moved from using transform, to setting the y-coords, and placing the .hide() into a separate function for the callback (which, for some reason worked instead of placing it at the end of the animation). This version appears to work at first, but the animations get interrupted when you click too many times and I'm not sure why. I am sure I can figure it out in the end with enough time, but I might be making this too complicated, anyway. The full code- var paper = Raphael(0, 0, 350, 350); paper.canvas.style.backgroundColor = "Black"; var dmgValues = [], dmgValuesIndex = 0, maxMsgs = 15, dmgXMaxOffset = 25, dmgYMaxOffset = 25, dmgXRef = 170 - dmgXMaxOffset, dmgYRef = 250 - dmgYMaxOffset, dmgMaxDistance = 50; for (i=0; i&lt; maxMsgs; i++) { dmgVal…
tagged with: raphael
type: Question

http://stackoverflow.com/q/26178807
has answer: http://stackoverflow.com/a/26178843
has body: I have a code which give the error unterminated string literal. What is that error. Here is a code in which i am working. I check console and the error is in $('#mydiv').append('\ in this line. Any suggestion. Thanks. $('#mydiv').append('\ &lt;TABLE cellpadding=0 cellspacing=0 class="t1"&gt;\ &lt;TR&gt;\ &lt;TD class="tr1 td8"&gt;&lt;P class="p13 ft13"&gt;T E S T&lt;/P&gt;&lt;/TD&gt;\ &lt;TD class="tr1 td9"&gt;&lt;P class="p2 ft6"&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;\ &lt;TD class="tr1 td10"&gt;&lt;P class="p14 ft13"&gt;RESULT&lt;/P&gt;&lt;/TD&gt;\ &lt;TD class="tr1 td11"&gt;&lt;P class="p2 ft13"&gt;Cutoff&lt;/P&gt;&lt;/TD&gt;\ &lt;TD class="tr1 td11"&gt;&lt;P class="p2 ft13"&gt;Patient&lt;/P&gt;&lt;/TD&gt;\ &lt;/TR&gt;\ &lt;TR&gt;\ &lt;TD class="tr4 td12"&gt;&lt;P class="p2 ft14"&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;\ &lt;TD class="tr4 td13"&gt;&lt;P class="p2 ft14"&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;\ &lt;TD class="tr4 td14"&gt;&lt;P class="p2 ft14"&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;\ &lt;TD class="tr4 td15"&gt;&lt;P class="p2 ft14"&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;\ &lt;TD class="tr4 td15"&gt;&lt;P class="p2 ft14"&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;\ &lt;/TR&gt;\ ');
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26178852
has title: SyntaxError: unterminated string literal in jquery
type: UnansweredQuestion

selectors-api
tag name: selectors-api
type: Tag
tags question: http://stackoverflow.com/q/26068390
tags question: http://stackoverflow.com/q/26161405

http://stackoverflow.com/comment/41007334
comment on: http://stackoverflow.com/a/26128247
has text: Version that also returns the value from a Promise when counting: http://jsfiddle.net/t3v61te1/1/
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26156616
has comment: http://stackoverflow.com/comment/41004366
answer count: 0
upvote count: 1
has body: Hi I am new at using select 2 plugin I have an select2 dropdown with an placeholder &lt;select id="active_media_videos"&gt; &lt;option&gt;&lt;/option&gt; &lt;/select&gt; $("#active_media_videos").select2({ allowClear: true, placeholder: "Select a Store" }); The dropdown is populated with using ajax. When I press my cancel button in my form I empty the dropdown $("#active_media_videos").select2().empty() and when I open the form again the placeholder is gone. Is there a way to get the placeholder back again?
type: Question
score: 1
has title: using select2 plugin for dropdown
downvote count: 0
tagged with: javascript
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/41038509
type: Comment
has text: So there is no built-in way to do this?
comment on: http://stackoverflow.com/a/26174846
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41039248
comment on: http://stackoverflow.com/a/26175195
has text: If I do remove the return statement will it still have the same functionality? I mean will it not call btnDimensionDel_Click if the Javascript returns false and call it if it returns true? I thought return was necessary for this.
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41064487
type: AnswerComment
type: Comment
has text: yes, this way really work, i will post the final code.. thanks.
comment on: http://stackoverflow.com/a/26185837
score: 0

http://stackoverflow.com/q/26149927
answer count: 3
tagged with: jquery
has comment: http://stackoverflow.com/comment/40992084
accepted answer: http://stackoverflow.com/a/26150086
has comment: http://stackoverflow.com/comment/40992134
has title: concatenate the texts of various text input fields present in a paragraph
has answer: http://stackoverflow.com/a/26150903
type: AnsweredQuestion
has body: I have a paragraph which can have various input fields at random indices. I want the full text in exact order as they were present &lt;p&gt; blah1 &lt;input type="text" value="INPUT1"&gt; blah2 blah3 &lt;input type="text" value="INPUT2"&gt; &lt;input type="text" value="INPUT3"&gt; &lt;/p&gt; output needed: blah1 INPUT1 blah2 blah3 INPUT2 INPUT3
possible better answer: http://stackoverflow.com/a/26150190
type: Question
has answer: http://stackoverflow.com/a/26150190
has answer: http://stackoverflow.com/a/26150086
tagged with: javascript
score: 0

http://stackoverflow.com/q/26129533
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40954762
has body: I have a form which has radio buttons and I want to submit that form without using submit button. I want to use AJAX calls. I used a piece of javascriptcode to make the radio buttons uncheckable. I want to use AJAX in the same page i used id attribute for the uncheck part. I need to send AJAX request to another PHP page when any changes occur to the form I am wondering what should I do how to write AJAX calls for form submission do I need to use them in the radio button area or I have to use it on the whole form once a simple example will help me a lot, here is my radio button part &lt;?php for($i=0 ;$i&lt;20;$i++){ echo" &lt;input type='radio' class='radio-button' name='{$i}'&gt;"; echo" &lt;input type='radio' class='radio-button' name='{$i}'&gt;"; echo" &lt;input type='radio' class='radio-button' name='{$i}'&gt;" ."&lt;/br&gt;"; echo "&lt;script type=\"text/javascript\"&gt;"; echo" var allRadios = document.getElementsByName('{$i}');"; echo" var booRadio;"; echo" var x = 0;"; echo" for(x = 0; x &lt; allRadios.length; x++){"; echo"allRadios[x].onclick = function() {"; echo" if(booRadio == this){"; echo" this.checked = false;"; echo" booRadio = null;"; echo" }else{"; echo" booRadio = this;"; echo"}"; echo" };"; echo" }"; echo"&lt;/script&gt;"; } ?&gt;
tagged with: radio-button
downvote count: 1
answer count: 1
has title: form submission without submit
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26129744
tagged with: php
upvote count: 0
has comment: http://stackoverflow.com/comment/40954706
type: Question

http://stackoverflow.com/comment/40817382
type: QuestionComment
score: 0
has text: @Quentin: I am saying if you are using jQuery already then it makes sense to drop `onClick().` I'm not disputing you can also do that without using jQuery.
comment on: http://stackoverflow.com/q/26053837
type: Comment

http://stackoverflow.com/q/26068692
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26068713
score: 2
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: How to handle the same jQuery event handler on multiple elements?
tagged with: jquery-events
has body: Suppose you have the following code to update many elements: Name: update Name: update And JavaScript to handle the update: function updateName(name, id){ ... } What is the jQuery handler that can find the value and id and call updateName? $('button.update').click(function() { name = ? id = ? updateName(name, id) } EDIT: The expected behavior is that when the user updates the input field, the updated value is sent to updateName(), not the original value. Also, note that the data-id and value are on the input, not the button. http://jsfiddle.net/e3g6nfc1/8/
answer count: 3
tagged with: events
has answer: http://stackoverflow.com/a/26068723
has answer: http://stackoverflow.com/a/26069289

http://stackoverflow.com/comment/40892298
comment on: http://stackoverflow.com/q/26095149
score: 7
has text: CSS Pseudo-classes will never return any elements, as specified in the Selectors API http://www.w3.org/TR/selectors-api/#grammar
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40831000
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26061427
has text: +1 to this question that made me learn something I could not think was possible!
score: 0

http://stackoverflow.com/q/26075685
score: 0
has answer: http://stackoverflow.com/a/26075831
answer count: 3
has body: i am trying to use the window.location js to redirect user when they click the submit button but when i test run the website, clicking the button did not work
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26075749
has answer: http://stackoverflow.com/a/26075749
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26075731
has answer: http://stackoverflow.com/a/26075731
has title: Moving between pages html
type: Question
tagged with: c#
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26153189
has comment: http://stackoverflow.com/comment/40998363
has comment: http://stackoverflow.com/comment/40998609
answers question: http://stackoverflow.com/q/26153140
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26153140
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40998400
has comment: http://stackoverflow.com/comment/40998327
upvote count: 2
has body: The simplest thing you could do to add styles and restore them without any disturbance would be to put your new styles in a class and add/remove that class rather than setting inline styles. Make sure that all styles within the class are made !important. var $span = $('span'); $('button').click(function () { var $this = $(this), override = $this.text() === 'Override'; $span.toggleClass('outline-override'); $this.text(override? 'Restore' : 'Override'); }); .outline-override { outline: 1px solid red !important; } test Override
score: 2

http://stackoverflow.com/a/26115077
accepted answer of: http://stackoverflow.com/q/26114932
answers question: http://stackoverflow.com/q/26114932
has comment: http://stackoverflow.com/comment/40927950
has comment: http://stackoverflow.com/comment/40928635
has body: I think you are looking for something like this (Updated): HTML: {{ mySizes }} - - Make Selection - - {{ size.name}} Duplicate Select Tags Selected values: {{selectTag.value}} JS: var app = angular.module("app",[]); app.controller('ListsCtrl',function($scope){ $scope.sizes = [{name: "blue"},{name: "green"},{name: "red"},{name: "yellow"}]; $scope.selectTags=[{ value:null }]; $scope.duplicateSelectTag = function() { $scope.selectTags.push({}); } }); Demo
has comment: http://stackoverflow.com/comment/40928064
has comment: http://stackoverflow.com/comment/40928439
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40928138
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/40928293
upvote count: 2

http://stackoverflow.com/comment/40924998
has text: The official documentation, https://egghead.io/ and https://thinkster.io/angulartutorial/a-better-way-to-learn-angularjs/ will give you a head start. I am too writing book on "AngularJS by Example" but that is still a few months away :).
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26073910

http://stackoverflow.com/comment/41055281
has text: You can add it to your answer, separated by a ` `.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26183762

http://stackoverflow.com/comment/40855307
type: Comment
has text: Yes, I mean display while the mouse is over the div.
type: QuestionComment
comment on: http://stackoverflow.com/q/26075276
score: 0

http://stackoverflow.com/a/26120273
type: Answer
answers question: http://stackoverflow.com/q/26120198
has body: Try this : remove onchange="autoSelect()" from all select boxes and bind change event as shown below and select second option for each select box except the current one for which change event fired - $(function(){ $('.film').change(function(){ //iterate all other select box except current using `not(this)` $('.film').not(this).each(function(){ // get selected option for the current select box var $selected = $(this).find('option:selected'); // if index of selected option is greater than 1, // it means option is selected. if($selected.index()&gt;1) $(this).val($(this).find('option:eq(1)').val()); }); }); }); DEMO
score: 0

http://stackoverflow.com/comment/40868707
comment on: http://stackoverflow.com/q/26082299
type: Comment
has text: Since the `1` - `12` are "IDs" rather than necessarily indices, perhaps a plain [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) would be appropriate.
score: 3
type: QuestionComment

http://stackoverflow.com/comment/40896454
comment on: http://stackoverflow.com/q/26097284
score: 0
type: QuestionComment
has text: Yeah the HTML code alone is fine, i have no idea where the problem is though. How can i make it easier for you to troubleshoot?
type: Comment

http://stackoverflow.com/comment/40836459
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26064450
has text: Ah I just noticed the url wasn't the actual socket.io library :X what @jfriend00 is asking for is the missing piece. When you connect: `var socket = io('http://localhost');` does that url have the 8080 in it? Because if not, that's likely the problem.
score: 0

http://stackoverflow.com/comment/41129859
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26161028
has text: I'd prefer to "identify specifically" the device in use.
score: 0

http://stackoverflow.com/a/26125041
downvote count: 0
upvote count: 1
type: Answer
has body: This should work unless you have additional constraints: var srNo = /^\d+-\d+$/; If you prefer the [0-9] syntax: var srNo = /^[0-9]+-[0-9]+$/;
score: 1
answers question: http://stackoverflow.com/q/26124991

http://stackoverflow.com/q/26089940
score: 1
accepted answer: http://stackoverflow.com/a/26090074
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/24659684
has comment: http://stackoverflow.com/comment/40882848
tagged with: peg
has body: Given the input &lt;outer&gt; Content &lt;inner&gt; Inner &lt;single/&gt; &lt;/inner&gt; &lt;/outer&gt;. How would I write grammar that parses the &lt;single&gt; node along with the nodes that have a matching closing node? Here's my current grammer that was taken from here: Content = (Element / Text)* Element = startTag:StartTag content:Content endTag:EndTag { if (startTag != endTag) { throw new Error( "Expected &lt;/" + startTag + "&gt; but &lt;/" + endTag + "&gt; found." ); } return { name: startTag, content: content }; } StartTag = "&lt;" name:TagName "&gt;" { return name; } EndTag = "&lt;/" name:TagName "&gt;" { return name; } TagName = chars:[a-z]+ { return chars.join(""); } Text = chars:[^&lt;]+ { return chars.join(""); } This only works with nodes that have a closing node. I think the problem lies with the Text rule. So I've been experimenting with altering it to include a negative lookahead like: Text = chars:(!EndTag .)* EndTag { return chars.join(""); } But that hasn't yielded anything successful yet. Any ideas?
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/xml
has title: XML single node parsing with peg.js
has answer: http://stackoverflow.com/a/26090074
has comment: http://stackoverflow.com/comment/40882971
type: AnsweredQuestion

http://stackoverflow.com/a/26073486
type: Answer
answers question: http://stackoverflow.com/q/26066198
score: 2
has body: Keeping things simple, you can define a generalised classical constructor. var Progress = function(promiseArray, reporter) { this.promiseArray = promiseArray; this.reporter = reporter || function(){}; this.complete = 0; $.each(promiseArray, function(i, p) { p.then(this.increment).then(this.report); }); }; Progress.prototype.increment = function() { this.complete += 1; }; Progress.prototype.report = function() { return this.reporter(this.complete, this.promiseArray.length); }; Progress.prototype.get = function() { return { complete:this.complete , total:this.promiseArray.length}; }; Then, for eg a progress thermometer : var progObj = new Progress(requests, function(complete, total) { var scale = 150; $("selector").css('someProperty', (scale * complete / total) + 'px'); }); Or for ad hoc enquiry : console.log( progObj.get() ); The benefit of this approach is reusability. new Progress() could be called on any number of arrays of promises, each with its own reporter callback. If you wanted, Progress could be made to return a jfriend-style notifiable promise, though I wouldn't do it that way for reasons jfriend has already given. And with some more thought Progress could be framed as a jQuery plugin, allowing you to call, for example, as follows : $("selector").progress(function(complete, total) { var scale = 150; $(this).css('someProperty', (scale * complete / total) + 'px'); }); which may have advantages in some circumstances.
downvote count: 0
upvote count: 2

http://stackoverflow.com/a/26836472
accepted answer of: http://stackoverflow.com/q/26125223
type: Answer
answers question: http://stackoverflow.com/q/26125223
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
has body: Part of the image I was using had was white. And so it just so happend that that was the part of the image which I was cropped.

http://stackoverflow.com/comment/40966160
type: Comment
has text: Please provide code of filtering also
type: QuestionComment
comment on: http://stackoverflow.com/q/26135896
score: 0

http://stackoverflow.com/comment/40985872
has text: When you run `db.yourcollection.find({intimeOrderNumber: '3'})`, from `mongodb` console, does it return the document you expect?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26146156

http://stackoverflow.com/comment/40830860
score: 1
has text: @FrancescoMM the nice thing about `Object.defineProperty` is it doesn't require any special syntax and it works after the object is instantiated. If you don't mind special-purpose syntax and can get away with setting up the accessor during instantiation, your solution works too (+1 to you).
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26061545

http://stackoverflow.com/q/26087184
answer count: 2
linked to: http://stackoverflow.com/q/22940055
has title: Making multiple AJAX calls recursively is a bad idea
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/26087775
has body: I already gone through this question. Are recursive AJAX calls a bad idea? Here answer provided by Justin Niessner is good (by using promises) But my problem is little bit different. I want to call 10 ajax calls recursively. Like when first ajax call completed , I render that data(provided by ajax call) in my view and at the same time I will call second ajax call.So my code sample will look like this: (function() { var downloadAsync = function(url, callback) { var httpRequest; if (window.XMLHttpRequest) { httpRequest = new XMLHttpRequest(); } else if (window.ActiveXObject) { httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); } httpRequest.onreadystatechange = function() { if (httpRequest.readyState === 4 &amp;&amp; httpRequest.status === 200) { callback(httpRequest.responseText); } } httpRequest.open("GET", url, true); httpRequest.send(); } function renderData(data) { //data render logic } downloadAsync("mathmatics.json", function(response) { renderData(response); downloadAsync("science.json", function(response) { renderData(response) downloadAsync("english.json", function(response) { renderData(response); .................................... }); }); }); })(); I want to render each data as soon as possible. So in success of every ajax call I am rendering that data. Here are my problems : Is there is any better of doing this ? can I use promises in this case ? (rendering data is necessary as soon as possible). If yes than how and if no than what is the best way of doing this kind of calls. Note : rendering data on ajax success is my priority. Edit - Browser support -latest chrome,firefox and IE-11. Edit - according to comments improvement : var array = ["mathematics.json", "science.json", "english.json"]; for (var i = 0; i &lt; array.length; i++) { downloadAsync(array[i], renderData); } function renderData(data) { console.log(data); }
has answer: http://stackoverflow.com/a/26093649
accepted answer: http://stackoverflow.com/a/26087775
has comment: http://stackoverflow.com/comment/40878990
favorite count: 0
has comment: http://stackoverflow.com/comment/40877415
tagged with: promise
possible better answer: http://stackoverflow.com/a/26093649
has comment: http://stackoverflow.com/comment/40877377
type: AnsweredQuestion
tagged with: recursion
has comment: http://stackoverflow.com/comment/40877517
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40877429
has comment: http://stackoverflow.com/comment/40877976
type: Question

http://stackoverflow.com/comment/40923555
comment on: http://stackoverflow.com/q/26097991
score: 0
has text: in the fiddle attached they used `Raphael.js` and am using `SVG` alone so i don't know how to adapt this function to my `SVG-Edit`
type: Comment
type: QuestionComment

regex
tags question: http://stackoverflow.com/q/26136302
tags question: http://stackoverflow.com/q/26093146
tags question: http://stackoverflow.com/q/26153390
tags question: http://stackoverflow.com/q/26160496
tags question: http://stackoverflow.com/q/26051911
tags question: http://stackoverflow.com/q/26184309
tags question: http://stackoverflow.com/q/26062794
tags question: http://stackoverflow.com/q/26184925
tags question: http://stackoverflow.com/q/26068870
tags question: http://stackoverflow.com/q/26117080
tags question: http://stackoverflow.com/q/26093545
tags question: http://stackoverflow.com/q/26080638
tags question: http://stackoverflow.com/q/26098728
tag name: regex
tags question: http://stackoverflow.com/q/26158166
tags question: http://stackoverflow.com/q/26170688
tags question: http://stackoverflow.com/q/26068579
tags question: http://stackoverflow.com/q/26162338
tags question: http://stackoverflow.com/q/26149509
tags question: http://stackoverflow.com/q/26074070
tags question: http://stackoverflow.com/q/26046599
tags question: http://stackoverflow.com/q/26190445
tags question: http://stackoverflow.com/q/26068637
tags question: http://stackoverflow.com/q/26192614
tags question: http://stackoverflow.com/q/26083969
tags question: http://stackoverflow.com/q/26169389
tags question: http://stackoverflow.com/q/26147406
tags question: http://stackoverflow.com/q/26065907
tags question: http://stackoverflow.com/q/26184434
tags question: http://stackoverflow.com/q/26089098
tags question: http://stackoverflow.com/q/26133593
tags question: http://stackoverflow.com/q/26140947
tags question: http://stackoverflow.com/q/26154783
tags question: http://stackoverflow.com/q/26084681
tags question: http://stackoverflow.com/q/26192024
tags question: http://stackoverflow.com/q/26105837
tags question: http://stackoverflow.com/q/26188570
tags question: http://stackoverflow.com/q/26164774
tags question: http://stackoverflow.com/q/26186094
tags question: http://stackoverflow.com/q/26184335
tags question: http://stackoverflow.com/q/26179214
tags question: http://stackoverflow.com/q/26170810
tags question: http://stackoverflow.com/q/26054681
tags question: http://stackoverflow.com/q/26096172
tags question: http://stackoverflow.com/q/26087876
tags question: http://stackoverflow.com/q/26061970
tags question: http://stackoverflow.com/q/26133281
tags question: http://stackoverflow.com/q/26152033
tags question: http://stackoverflow.com/q/26181365
tags question: http://stackoverflow.com/q/26173404
tags question: http://stackoverflow.com/q/26062332
tags question: http://stackoverflow.com/q/26192660
tags question: http://stackoverflow.com/q/26142148
tags question: http://stackoverflow.com/q/26166673
tags question: http://stackoverflow.com/q/26131137
tags question: http://stackoverflow.com/q/26102838
tags question: http://stackoverflow.com/q/26134870
tags question: http://stackoverflow.com/q/26127301
tags question: http://stackoverflow.com/q/26139389
tags question: http://stackoverflow.com/q/26124991
tags question: http://stackoverflow.com/q/26120885
tags question: http://stackoverflow.com/q/26177664
tags question: http://stackoverflow.com/q/26054691
tags question: http://stackoverflow.com/q/26058534
tags question: http://stackoverflow.com/q/26055883
tags question: http://stackoverflow.com/q/26079327
tags question: http://stackoverflow.com/q/26174122
tags question: http://stackoverflow.com/q/26034690
tags question: http://stackoverflow.com/q/26121611
tags question: http://stackoverflow.com/q/26078478
tags question: http://stackoverflow.com/q/26097944
tags question: http://stackoverflow.com/q/26113091
tags question: http://stackoverflow.com/q/26153663
tags question: http://stackoverflow.com/q/26143304
tags question: http://stackoverflow.com/q/26146991
tags question: http://stackoverflow.com/q/26054387
type: Tag
tags question: http://stackoverflow.com/q/26075334

http://stackoverflow.com/a/26174844
has body: Expanding upon this, here is a regex that doesn't use reluctant matching and potentially more efficient: (?:[^.]+|\.\S)+\. And if you would like to match the sentences themselves, and remove the one trending space that you would get from using the regex of the accepted answer, you can use this: \S(?:[^.]+|\.\S)+\. Here is a regex demo.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26158166

http://stackoverflow.com/q/26190589
score: 0
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/41067922
answer count: 1
has title: Chrome Extension background view invalid
has body: I am developing a chrome extension, I load unpackage extension, the Extension Manager show the infomation background.html (invalid) ， and the extension is not working， such as the below picture: (ps: I use the Chrome of Chinese Version, so I don't know what is the information in English Version) when I refresh the extension, the extension is available, and a few seconds later, it's not working...go round and begin again, please help.
has answer: http://stackoverflow.com/a/26191179
tagged with: google-chrome
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26191179
has comment: http://stackoverflow.com/comment/41068320
type: Question
tagged with: javascript

http://stackoverflow.com/a/26089495
has comment: http://stackoverflow.com/comment/40887328
accepted answer of: http://stackoverflow.com/q/26089436
answers question: http://stackoverflow.com/q/26089436
type: AcceptedAnswer
has body: You can't do this, you'll need to enable it to see/get it server-side (otherwise the "client won't send it at all"). The browser "doesn't include disabled controls" in the " submission", since they "don't count as "successful" controls". so better assign some value to this check box by default at the time of your submission. see this article:http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2 e.g.:enable/disable checkbox on button click PHP
score: 0
has comment: http://stackoverflow.com/comment/40887505
type: Answer

http://stackoverflow.com/q/26154744
score: 0
answer count: 2
tagged with: random
has title: javascript advance number onclick or on reload
has body: I display a random DIV every time my webpage is reloaded using a simple function. This produces too many repeats because I only have seven divs. &lt;script type="text/javascript"&gt; randomNumber = Math.floor(Math.random()*7+1); window.onload = function() { if (randomNumber == 1) { document.getElementById("n1").style.display = "inline"; } if (randomNumber == 2) { document.getElementById("n2").style.display = "inline"; } ...[ETC. through 7] } } &lt;/script&gt; I would like to solve this by replacing the "random number" with a predictable "progressing number". Can I advance a variable with every reload or onclick and execute the function to display each DIV in sequence? 1,2,3... displaying all seven divs before repeating. I worry I would need cookies to do this with each individual visitor. Because the traffic is very low (likely one visitor at a time), perhaps I could use code from a page counter to achieve this. I searched for any examples of this in action but found none. I would be very appreciative of any and all suggestions. Thanks for your time.
has answer: http://stackoverflow.com/a/26155485
tagged with: onload
has answer: http://stackoverflow.com/a/26154868
possible better answer: http://stackoverflow.com/a/26155485
has comment: http://stackoverflow.com/comment/41001275
has comment: http://stackoverflow.com/comment/41001184
type: Question
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26154868

http://stackoverflow.com/a/26062936
has body: Just no need for for in the label the following code works fine for me &lt;div id="regionCheckBox" class="span12"&gt; &lt;span ng-repeat="region in histCtrl"&gt; &lt;label &gt;{{'regionCheckbox'+$index}} &lt;input class="checkbox" type="checkbox" name="RegionCheckBox" id="{{'regionCheckbox'+$index}}" value="{{region}}" ng-click="test($index)" /&gt; {{region}} &lt;/label&gt; &lt;/span&gt; in my controller $scope.histCtrl = ['a','b','c']; $scope.test =function(id){alert(id)}; and i also get the alert with index
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26062708
upvote count: 2

http://stackoverflow.com/a/26102435
upvote count: 2
has comment: http://stackoverflow.com/comment/40906402
answers question: http://stackoverflow.com/q/26102279
type: AcceptedAnswer
downvote count: 0
has body: I adjusted your fiddle to give you an idea on how to do this: updated Fiddle What the filter - function basically does is return only DOM - elements where the passed anonymous-function returns true, so in this case, you only need to provide a fitting function, for example: return $(this).find('td').eq(3).text() !== "0" By using .find('td').eq(3) I just select the td-element where the balance is stored, which is the fourth td in your table-row (.eq is zero-index based) The whole code that gets executed when a change - event is triggered on the checkbox: $('#filter2').on('change', function(){ if(this.checked){ $('.searchable tr').hide(); $('.searchable tr').filter(function() { return $(this).find('td').eq(3).text() !== "0" }).show(); }else{ $('.searchable tr').show(); } }); There are several ways to keep the state of the checkbox over various sessions, you could use Cookies or something like LocalStorage for example.
accepted answer of: http://stackoverflow.com/q/26102279
type: Answer
score: 2

http://stackoverflow.com/comment/41071482
comment on: http://stackoverflow.com/a/26192818
has text: Your answer is educational. Yepp, this is exactly what I'm looking for. Very impressive.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40949339
type: AnswerComment
comment on: http://stackoverflow.com/a/26125823
type: Comment
has text: Yes, I am needing to do this for SEO purposes. I actually have read the article and done it, but unfortunately it does not mention about updating particularly the meta description tags. :(
score: 0

http://stackoverflow.com/a/26140842
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/40974686
downvote count: 1
has comment: http://stackoverflow.com/comment/40975000
has comment: http://stackoverflow.com/comment/40975214
score: 1
answers question: http://stackoverflow.com/q/26140640
has comment: http://stackoverflow.com/comment/40974774
has comment: http://stackoverflow.com/comment/40975487
has comment: http://stackoverflow.com/comment/40975377
has body: Use object for insertion var IDs = {}; $('#divDynamicFields').find("input").each(function () { IDs[this.id]= $(this).val(); }); And similarly loop $.each(IDs , function (index, value) { alert( index + ' : ' + value ); });

http://stackoverflow.com/a/26105050
has comment: http://stackoverflow.com/comment/40910273
has comment: http://stackoverflow.com/comment/46152162
answers question: http://stackoverflow.com/q/26104941
has comment: http://stackoverflow.com/comment/46152457
score: 0
has comment: http://stackoverflow.com/comment/46151949
accepted answer of: http://stackoverflow.com/q/26104941
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40910587
has comment: http://stackoverflow.com/comment/46152052
type: Answer
has comment: http://stackoverflow.com/comment/46152289
has comment: http://stackoverflow.com/comment/40909917
has body: "What is the best way to dynamically create jQuery Validation rules using PHP?" There is no "best" way. Since the PHP constructs the page (incl the JavaScript) on the server and the jQuery Validation plugin only runs in the browser, I don't understand your issue. How could using JavaScript's ajax to retrieve the parameters be more secure than just using a PHP echo to put those parameters into the page in the first place, before it's sent to the browser? No matter how you construct your page, the JavaScript code will/should look exactly the same when it gets to the browser. &lt;script&gt; $(function() { $( "#myform" ).validate( &lt;?php echo .... ;?&gt; ); }); &lt;/script&gt;

http://stackoverflow.com/q/26120669
has comment: http://stackoverflow.com/comment/40939524
score: 0
linked to: http://stackoverflow.com/q/16955101
answer count: 1
tagged with: asp.net
type: UnansweredQuestion
tagged with: razor
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/40939220
has body: The model: public class oPage { public int PageId { get; set; } public List&lt;oContent&gt; Contents { get; set; } } The oContent object have properties: Id and Text. The view: (Razor) @for (int i = 0; i &lt;= Model.Agrees.Count; i++) { @Html.TextAreaFor(m =&gt; Model.Agrees[i].Text) } I want to let to user to add another content from the client. I found some solutions that I don't like: Write the html markup manually. I don't like it because maybe in one day the rendering's structure will change and my code will not word. (Like here: http://www.techiesweb.net/asp-net-mvc3-dynamically-added-form-fields-model-binding/) Get the structure from the server. I don't like this because.. well I'm always prefer not use the server unless I have to. (Like here: How to add items to MVC model in javascript?) I'm looking for a better and smarter solution.
has comment: http://stackoverflow.com/comment/40939429
has title: Allow to use to add an item to model asp.net mvc4
type: Question
has answer: http://stackoverflow.com/a/26124299
has comment: http://stackoverflow.com/comment/40938277
tagged with: asp.net-mvc
tagged with: javascript

http://stackoverflow.com/q/26125565
has comment: http://stackoverflow.com/comment/40947088
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40947236
has answer: http://stackoverflow.com/a/26125694
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40947000
has answer: http://stackoverflow.com/a/26125597
has body: I am using jQuery each function and on click on current i.e $(this) I am executing JS code, It will be more clear if you look on following code $('.switch-cal').each(function(){ $(this).on( 'click', function( e ){ .... CODE HERE .... Please tell me correct way of use "this" with ".on" inside ".each" function. Thank you.
type: Question
has title: How to use jQuery this with .on function and .each function
linked to: http://stackoverflow.com/q/18966222
score: 0
answer count: 2

http://stackoverflow.com/q/26054620
has title: change google marker in a wordpress template
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26054738
has body: hey guys i building a new website at the moment and i'm almost done, but there is one litle thing that i would like to chang. its a property website with a google maps by each property and i would like to know how to change the google maps marker. example link property page i found in a custom.js this line where i could change the zoom of it but there was no option to change the marker `if($("div#single-gmap").length ) { var $title = $("div#single-gmap").data("title"); var $lat = $("div#single-gmap").data("lat"); $lat = ( $.trim($lat).length &gt; 0 ) ? $lat : "-37.80544394934272"; var $lng = $("div#single-gmap").data("lng"); $lng = ( $.trim($lng).length &gt; 0 ) ? $lng : "144.964599609375"; var myLatlng = new google.maps.LatLng($lat,$lng); var mapOptions = { zoom: 15, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP }`
upvote count: 0
linked to: http://stackoverflow.com/q/10376617
type: Question
tagged with: google-maps
tagged with: javascript
score: -1
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
answer count: 1

http://stackoverflow.com/comment/41144654
type: Comment
has text: I edit the op because there are several mistakes.
type: QuestionComment
comment on: http://stackoverflow.com/q/26129417
score: 0

http://stackoverflow.com/q/26171610
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has title: smoother lineWidth changes in canvas lineTo
score: 0
tagged with: line
has answer: http://stackoverflow.com/a/54112288
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26174363
tagged with: canvas
has body: so i'm trying to create a drawing tool in HTML5 canvas where the weight of the stroke increases the faster you move the mouse and decreases the slower you move. I'm using ctx.lineTo() but on my first attempt noticed that if i move too quickly the change in thickness is registered as obvious square increments ( rather than a smooth increase in weight ) so i changed the ctx.lineJoin and ctx.lineCap to "round" and it got a little better but this is still not as smooth as i'd like. i'm shooting for something like this any advice on how to make the change in weight a bit smoother would be great! here's a working demo: http://jsfiddle.net/0fhag522/1/ and here' a preview of my "dot" object ( the pen ) and my draw function: var dot = { start: false, weight: 1, open: function(x,y){ ctx.lineJoin = "round"; ctx.lineCap = "round"; ctx.beginPath(); ctx.moveTo(x,y); }, connect: function(x,y){ ctx.lineWidth = this.weight; ctx.lineTo(x,y); ctx.stroke(); ctx.closePath(); ctx.beginPath(); ctx.moveTo(x,y); }, close: function(){ ctx.closePath(); } } function draw(){ if(down){ if(!dot.start){ dot.close(); prevx = mx; prevy = my; dot.open(mx,my); dot.start=true; } else { var dx = (prevx&gt;mx) ? prevx-mx : mx-prevx; var dy = (prevy&gt;my) ? prevy-my : my-prevy; dot.weight = Math.abs(dx-dy)/2; dot.connect( mx,my ); prevx = mx; prevy = my; } } }
type: Question

http://stackoverflow.com/comment/40869518
type: Comment
type: QuestionComment
has text: Don't ever use `.eval()`. If you need it, it means your code has a problem.
comment on: http://stackoverflow.com/q/26082840
score: 0

http://stackoverflow.com/a/26106382
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: If you have: { foo-bar: 1 } You'll get a "SyntaxError: Unexpected token :" error since the "-" is mistaken as a subtraction operator: { foo - bar : 1 } Then you need quotes to indicate that this is a property name: { "foo-bar": 1 } If you use underscores instead of dashes, there is no ambiguity: { "foo_bar": 1 } { foo_bar: 1 } // This also works
answers question: http://stackoverflow.com/q/26106325

http://stackoverflow.com/q/26122695
upvote count: 1
linked to: http://stackoverflow.com/q/16930748
has comment: http://stackoverflow.com/comment/41010513
has body: I need to create web page where user can choose a type of a list (linked, doubly linked, circular linked list etc.) and see how it looks like. User can add and remove elements from a list and see how list is changing. Which library is better to use for visualization of List? It would be good to find library which can take a list as input param and return image or canvas. But If such library doesn't exists I need library which can draw rectangles with text inside and connect it with each other with lines.
has comment: http://stackoverflow.com/comment/41005971
has answer: http://stackoverflow.com/a/26150492
type: UnansweredQuestion
downvote count: 0
answer count: 1
has title: Javascript library for visualization of Lists (data structure)
tagged with: javascript
tagged with: data-structures
favorite count: 0
has comment: http://stackoverflow.com/comment/41016968
linked to: http://stackoverflow.com/q/7034
type: Question
tagged with: visualization
tagged with: data-visualization
score: 1
has comment: http://stackoverflow.com/comment/41010540
has comment: http://stackoverflow.com/comment/41187945

http://stackoverflow.com/a/26175283
has comment: http://stackoverflow.com/comment/41039390
has comment: http://stackoverflow.com/comment/41099202
has comment: http://stackoverflow.com/comment/41039136
has comment: http://stackoverflow.com/comment/41039154
answers question: http://stackoverflow.com/q/26175055
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26175055
has comment: http://stackoverflow.com/comment/41039862
has body: Use this code: &lt;script type = "text/javascript" &gt; function watchdelete() { var manufacturer = document.getElementById('&lt;%:drpManufacturer.ClientID%&gt;'); var strManufacturer = manufacturer.options[manufacturer.selectedIndex].value; if (strManufacturer) // If there is a selected Manufacturer { return confirm("Are you Sure You want to delete this Dimension Detail?"); } else { alert("Please select a Manufacturer first before deleting"); return false; } } &lt;/script&gt;
type: Answer
has comment: http://stackoverflow.com/comment/41039858
has comment: http://stackoverflow.com/comment/41039483
score: 1
has comment: http://stackoverflow.com/comment/41039537
upvote count: 1
has comment: http://stackoverflow.com/comment/41039886

onchange
tags question: http://stackoverflow.com/q/26045053
tag name: onchange
tags question: http://stackoverflow.com/q/26072718
type: Tag
tags question: http://stackoverflow.com/q/26089285
tags question: http://stackoverflow.com/q/26148243
tags question: http://stackoverflow.com/q/26176271
tags question: http://stackoverflow.com/q/26095023
tags question: http://stackoverflow.com/q/26044919
tags question: http://stackoverflow.com/q/26185332

http://stackoverflow.com/a/26174382
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26174335
downvote count: 0
type: Answer
has body: All that means is that the loop is using an external variable to keep track of iterations. Meaning that there is no int i = 0. You can actually leave all three parts out as all part are optional for(;;) and have an infinite loop.

http://stackoverflow.com/comment/41104487
type: Comment
type: QuestionComment
has text: Ok, How can i show you guys my code?
score: 0
comment on: http://stackoverflow.com/q/26179678

http://stackoverflow.com/comment/40799135
score: 0
comment on: http://stackoverflow.com/a/26044164
type: AnswerComment
type: Comment
has text: Yeah, first-letter doesn't match spaces, punctuation or other special characters, only letters, I'm just noting that the OP actually has a space for some strange reason in the span ?

http://stackoverflow.com/a/26121189
answers question: http://stackoverflow.com/q/26120928
score: 0
accepted answer of: http://stackoverflow.com/q/26120928
type: Answer
has body: Use click function instead of mouseenter function Use this code // start right moving jQuery("#scroll_right").click(function(){ jQuery(this).mouseenter_trigger_right(); }); // start left moving jQuery("#scroll_left").click(function(){ jQuery(this).mouseenter_trigger_left(); }); // stop moving jQuery("#scroll_stop").mouseleave(function() { clearInterval(timer); }); instead of below code. jQuery("#scroll_right").mouseenter(function(){ jQuery(this).mouseenter_trigger_right(); }); jQuery("#scroll_left").mouseenter(function(){ jQuery(this).mouseenter_trigger_left(); }); jQuery("#scroll_right,#scroll_left").mouseleave(function() { clearInterval(timer); });
type: AcceptedAnswer

http://stackoverflow.com/comment/40995446
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26151441
score: 0
has text: yes, something like Node is what I mean

http://stackoverflow.com/a/26172326
has body: Interceptors are in the documentation here. Here's an example of how to write one. .config([ '$httpProvider', function($httpProvider) { var interceptor = [ '$q', '$rootScope', 'userSession', function($q, $rootScope, userSession) { var service = { // run this function before making requests 'request': function(config) { if (config.method === 'GET' || userSession.isAuth()) { // the request looks good, so return the config return config; } // bad request, so reject return $q.reject(config); } }; return service; } ]; $httpProvider.interceptors.push(interceptor); } ]) The reason there's nothing on the $httpProvider documentation page about interceptors is because the developers didn't include the following code in the $http script from which the docs are generated: /** * @ngdoc property * @name $httpProvider#interceptors * @description // etc Documentation in general is known to be incomplete, inaccurate, and/or confusing. Until recently, I always thought I was the problem when I couldn't find or understand something, but I've found that it's often because documentation is just lousy. However, we should all be thankful that we have such great tools to use and keep in mind that perhaps the documentation is poor because time had to be focused on writing the tool instead of the manual for the tool. The most reliable "documentation" is the source code itself, though it can be a lot less friendly to read! In the source code I linked above, you can see this.interceptors = []. this refers to the $httpProvider, so it is assigning the property interceptors to $httpProvider with the value being an empty array. To add your interceptors, you simply push() your interceptor to this array.
downvote count: 0
has comment: http://stackoverflow.com/comment/41064967
has comment: http://stackoverflow.com/comment/41035772
has comment: http://stackoverflow.com/comment/41085179
has comment: http://stackoverflow.com/comment/41034303
has comment: http://stackoverflow.com/comment/41081588
score: 27
has comment: http://stackoverflow.com/comment/41034449
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26171986
has comment: http://stackoverflow.com/comment/41033803
has comment: http://stackoverflow.com/comment/41036762
has comment: http://stackoverflow.com/comment/41036079
accepted answer of: http://stackoverflow.com/q/26171986
type: Answer
has comment: http://stackoverflow.com/comment/41089991
has comment: http://stackoverflow.com/comment/56424841
upvote count: 27

http://stackoverflow.com/a/26188909
has comment: http://stackoverflow.com/comment/41064854
type: Answer
has comment: http://stackoverflow.com/comment/41064947
answers question: http://stackoverflow.com/q/26188813
has body: Your conceptual approach seems reasonably sound, just a few implementation issues. The code might look something like this: $(document).ready(function () { if(window.location.search &amp;&amp; window.location.search.indexOf('&amp;') !== -1) { var pairs = window.location.search.replace('?', '').split('&amp;'); $.each(pairs, function (index, pair) { var parameter = pair.split('=')[0]; var value = pair.split('=')[1]; if(parameter === 'AFFILIATE_ID' || parameter === 'SUB_1') { $('input[name="' + parameter + '"]').val(value); } }); } }); NOTE: this answer uses jQuery, which in this situation would probably be best for browser compatability, but I can post a pure JS solution if you need one.
has comment: http://stackoverflow.com/comment/41064875
score: 0
has comment: http://stackoverflow.com/comment/41064911
has comment: http://stackoverflow.com/comment/41065279

http://stackoverflow.com/q/26063621
has comment: http://stackoverflow.com/comment/40834559
duplicate of: http://stackoverflow.com/q/9899372
has answer: http://stackoverflow.com/a/26064079
has body: I have the following script inside my master page :- &lt;script type= "application/javascript"&gt; document.getElementById("currentdate").innerHTML = EMBEDformatAMPM(); var myVar=setInterval(function(){myTimer()},30000); function myTimer() { document.getElementById("currentdate").innerHTML = EMBEDformatAMPM(); } //code goes here }&lt;/script&gt; but the problem i am facing is that the script will run before the (currentdate").innerHTML loads, and the script will raise a null reference exception, so my question is basically about how i can force the javaScript to run after the page loads.? Thanks EDIT My jQuery file is raising the following error ,, not sure why :- Error: Syntax error, unrecognized expression: unsupported pseudo: visited
upvote count: 0
has title: Run JavaScript after the page loads (document.ready)
has comment: http://stackoverflow.com/comment/40834267
linked to: http://stackoverflow.com/q/2728922
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/799981
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40834498
has answer: http://stackoverflow.com/a/26063685
has comment: http://stackoverflow.com/comment/40834645
linked to: http://stackoverflow.com/q/9899372
has answer: http://stackoverflow.com/a/26063677
answer count: 4
downvote count: 2
has comment: http://stackoverflow.com/comment/40834779
type: Question
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/26063704

http://stackoverflow.com/comment/40899382
type: AnswerComment
has text: The simplest idea is to set url of your icon. Instead of drawing it I would prefer using completed one
comment on: http://stackoverflow.com/a/26098248
score: 0
type: Comment

http://stackoverflow.com/a/26146100
has comment: http://stackoverflow.com/comment/70586271
score: 22
has body: The best way to do this is to set up a '$routeChangeStart' listener which checks an 'authProvider' service function to verify that there is a user logged in. In our 'app.js' or in a separate file: angular.module('myApp') .run(['$rootScope', '$location', 'authProvider', function ($rootScope, $location, authProvider) { $rootScope.$on('$routeChangeStart', function (event) { if (!authProvider.isLoggedIn()) { console.log('DENY : Redirecting to Login'); event.preventDefault(); $location.path('/login'); } else { console.log('ALLOW'); } }); }]) Then for our 'authProvider' service: angular.module('myApp') .factory('authProvider', function() { var user; return { setUser : function(aUser){ user = aUser; }, isLoggedIn : function(){ return(user)? user : false; } }; }); This solution was created from an answer here on stack overflow. Thank you @MohammadAwwaad
has comment: http://stackoverflow.com/comment/64562078
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40986047
downvote count: 1
upvote count: 23
type: Answer
has comment: http://stackoverflow.com/comment/45885478
accepted answer of: http://stackoverflow.com/q/26145871
answers question: http://stackoverflow.com/q/26145871

http://stackoverflow.com/q/26171983
tagged with: jquery
has comment: http://stackoverflow.com/comment/41037623
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 0
has title: How to get Anchor tag (which works with JS function call) to work using rightClick > open in new tab?
type: Question
tagged with: anchor
has body: I'm using an anchor tag asdasdasd This javascript function dynamically decides on the page to open. Works all right on click. But when I right click and Open in new tab, it just shows me a blankie!! Any suggestions?
has answer: http://stackoverflow.com/a/26174420
tagged with: javascript
has answer: http://stackoverflow.com/a/26174505
answer count: 2

http://stackoverflow.com/q/26160965
has body: Please forgive any breaches of protocol and correct me if need be: long-time reader, first-time poster here. I could not find any solutions online that worked or were terribly recent and I was wondering if anyone else had encountered this. I've been enabling full screen on a web page with meta tags and adding a shortcut to the home screen. I recently upgraded to iOS 8.0.2 on an iPad Air and have noticed that the status bar information (iPad, Wifi, Clock, battery, lock) are now on top of the top edge of the website window instead of over an unusable black status bar. As well, there seems to be white dead space now at the bottom of the page, probably displacing the now non-existent status bar. Does anyone know how I can either revert back to having the status bar or use the bottom part of the page using javascript? Many thanks for any help you can provide. I've attached some screen shots and some brief code below. Cheers, Kurt Full Screen A B C D E F G H Images here: http://postimg.org/gallery/2cm224s78/
tagged with: http://stackoverflow.com/tag/html
tagged with: statusbar
has comment: http://stackoverflow.com/comment/41107041
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/26221394
type: Question
tagged with: fullscreen
tagged with: ios8
has comment: http://stackoverflow.com/comment/44299855
has title: iOS 8: blank gap at bottom of full screen Safari home screen page
score: 4
upvote count: 4
has comment: http://stackoverflow.com/comment/41019894
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/25884806
tagged with: javascript
has answer: http://stackoverflow.com/a/26307876
favorite count: 0
has comment: http://stackoverflow.com/comment/41016405

http://stackoverflow.com/comment/40886119
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26091762
has text: i thnik i am using javascript code in jquery can you guide
score: 0

http://stackoverflow.com/q/26170368
has title: How to handle Microsoft Word character encoding
has body: I have a simple text area on a page. When you click submit, it grabs the value of the text area and stores it into the database. &lt;input type="text" class="form-control" id="theField" placeholder="Enter Data"&gt; When a user types the following into the field it stores it fine: "this is a test" item's However, if they type that into microsoft word and then paste it into the field, the outcome is : â€œThis is a testâ€ for itemâ€™s All I am doing is getting the value like so: var nominee = $('#theField').val() What is the best way to handle this situation?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26170540
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26170540
tagged with: ms-word

http://stackoverflow.com/q/26157729
has body: I am relatively new on Node JS. I am working on an application fetching XML-files from a server. In summary I want to do this: Download XML-files from FTP server and store the XML-content as a string. Return the string to the browser as plain text. I am able to use jsftp.get to download files to a local directory, but I am not able to get the downloaded data as a string. What am I doing wrong? My code is like this: var http = require("http"); var url = require("url"); var JSFtp = require("jsftp"); var myStrToReturn = new String(); http.createServer(function(req, res) { // URL var parsedUrl = url.parse(req.url, true); var queryAsObject = parsedUrl.query; var str = new String(); var myFunction = queryAsObject["function"]; var Ftp = new JSFtp({ host: "ftp.ftp.ftp", port: 21, // defaults to 21 user: "user", // defaults to "anonymous" pass: "passwd", // defaults to "@anonymous" debugMode: true }); var str = ""; Ftp.get("Production/Offers/datafile.xml", function(err, socket) { if (err) return; socket.on("data", function(d) { str += d.toString(); }) socket.on("close", function(hadErr) { if (hadErr) console.error('There was an error retrieving the file.'); }); socket.resume(); }); myStrToReturn = str.toString("binary"); res.writeHead(200, { 'Content-Encoding':'utf-8', 'charset' : 'utf-8', 'Content-Type': 'text/plain;charset=utf-8'}); res.write(myStrToReturn.toString()); res.end(); console.log(myStrToReturn); }); Ftp.on('jsftp_debug', function(eventType, data) { console.log('DEBUG: ', eventType); console.log(JSON.stringify(data, null, 2)); }); }).listen(8030); console.log("Server listening on port 8030");
answer count: 1
tagged with: javascript
score: 0
tagged with: node.js
tagged with: http://stackoverflow.com/tag/xml
tagged with: ftp
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/30858050
has title: Node JS JSftp Get binary data, return string

http://stackoverflow.com/comment/40914561
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26105267
has text: Sorry, but would be very hard to help you if you dont know exactly what you need to achieve, what exactly is not working, and pointing to the relevant flow of code.
type: Comment

http://stackoverflow.com/q/26148956
has comment: http://stackoverflow.com/comment/40991063
type: Question
accepted answer: http://stackoverflow.com/a/26149512
has comment: http://stackoverflow.com/comment/40991264
tagged with: if-statement
has title: javascript conditional logic not working
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40990507
has comment: http://stackoverflow.com/comment/40990237
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40990725
has comment: http://stackoverflow.com/comment/40990271
has comment: http://stackoverflow.com/comment/40990987
possible better answer: http://stackoverflow.com/a/26149198
has comment: http://stackoverflow.com/comment/40990219
has answer: http://stackoverflow.com/a/26149198
has body: When I try to run the code below, and step into it in the browser debugger, the length it's showing me is 1 or higher, yet it still drops into this block as if it were evaluated as true...am I missing something here? function checkEmpty() { var empty = false; $('form input:text').each(function () { console.log($(this).val()) if ($(this).val().length === 0) { empty = true; } }); if (empty) { $('#btnContinueCheckout1').attr('disabled', 'disabled'); $('#btnContinueCheckout2').attr('disabled', 'disabled'); } else { $('#btnContinueCheckout1').removeAttr('disabled'); $('#btnContinueCheckout2').removeAttr('disabled'); } } HTML: (these are the input fields, and they are wrapped around a form, and have 2 checkout buttons that are not shown) &lt;br /&gt; &lt;br /&gt; &lt;label&gt;&lt;strong&gt;Full Name: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/strong&gt;&lt;/label&gt;&amp;nbsp;&amp;nbsp; &lt;input type="text" required="required" onkeyup="checkEmpty()" name="FullName" style="width: 235px;" /&gt;&lt;br /&gt; &lt;br /&gt; &lt;label&gt;&lt;strong&gt;Mailing Address: &amp;nbsp;&lt;/strong&gt;&lt;/label&gt; &lt;input type="text" required="required" name="Address" onkeyup="checkEmpty()" style="width: 235px;" /&gt;&lt;br /&gt; &lt;br /&gt; &lt;label&gt;&lt;strong&gt;Email: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/strong&gt;&lt;/label&gt;&amp;nbsp; &lt;input type="text" required="required" style="width: 235px;" name="Email" onkeyup="checkEmpty()" /&gt;&lt;br /&gt; &lt;br /&gt; &lt;label&gt;&lt;strong&gt;Phone Number: &lt;/strong&gt;&lt;/label&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;input type="text" required="required" name="Phone" onkeyup="checkEmpty()" /&gt;
has comment: http://stackoverflow.com/comment/40991008
type: AnsweredQuestion
tagged with: conditional-statements
has comment: http://stackoverflow.com/comment/40990272
has answer: http://stackoverflow.com/a/26149512
has comment: http://stackoverflow.com/comment/40990674

http://stackoverflow.com/q/26074533
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40861353
has body: The following code below connects to a web socked server and once function lighton() is called it send a web socket message to the server, however this is not working for some reason, any help var cam_on; var sock = null; function connect() { var url = "ws://" + location.host + ":8888/ws"; var ws = new WebSocket(url); ws.onopen = function() { $('#lighton').button("enable"); $('#lightoff').button("enable"); $('#stop').button("enable"); }; ws.onmessage = function (evt) { alert(evt.data); }; ws.onclose = function(evt) { alert("Connection close"); $('#lighton').button("disable"); $('#lightoff').button("disable"); $('#stop').button("disable"); }; }; function ws_send(message) { if(ws) { ws.send(message); } }; function lighton() { alert("button pressed"); ws_send("IR on"); }; update: solved, but the above is cleaner if it is possible function init() { // connect(); var url = "ws://" + location.host + ":8888/ws"; var ws = new WebSocket(url); ws.onopen = function() { $('#lighton').button("enable"); $('#lightoff').button("enable"); $('#stop').button("enable"); }; ws.onmessage = function (evt) { alert(evt.data); }; ws.onclose = function(evt) { alert("Connection close"); $('#lighton').button("disable"); $('#lightoff').button("disable"); $('#stop').button("disable"); }; var lighton = document.getElementById("lighton"); var lightoff = document.getElementById("lightoff"); lighton.addEventListener("click", function(event) { ws.send("IR on"); }); lightoff.addEventListener("click", function(event) { ws.send("IR off"); }); }
has comment: http://stackoverflow.com/comment/40860002
answer count: 0
has title: websocket sending messages issue
type: Question
has comment: http://stackoverflow.com/comment/40861455
tagged with: javascript
has comment: http://stackoverflow.com/comment/40854318
score: 0
tagged with: websocket

http://stackoverflow.com/q/26139118
type: Question
has body: My JS / jQuery skills aren't great - and I'm having trouble with the following: jQuery(document).ready(function($) { // if element exists if ($('.myelement').length > 0) { // insert html back button $( '.myelement' ).append( " Go Back " ); // back function function goBack() { window.history.back() } } )}; I'm trying to achieve the following. if .myelement HTML class exists then insert back button html Appreciate the help.
tagged with: javascript
has comment: http://stackoverflow.com/comment/40971476
score: 0
answer count: 3
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26139186
has answer: http://stackoverflow.com/a/26139314
has title: JavaScript / jQuery 'back button'
has comment: http://stackoverflow.com/comment/40971501
has answer: http://stackoverflow.com/a/26139207

http://stackoverflow.com/comment/40795081
has text: You should create separate StackOverflow questions for each question that you have. It is not appropriate to place multiple tangential questions inside of a single question if they are not directly related to something that has arisen as a result of the answer(s) you have employed.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26034468
score: 0

http://stackoverflow.com/comment/40960708
comment on: http://stackoverflow.com/q/26132392
type: QuestionComment
has text: Please now see the question.
score: 0
type: Comment

http://stackoverflow.com/a/26238755
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41156675
has comment: http://stackoverflow.com/comment/41157370
upvote count: 1
has comment: http://stackoverflow.com/comment/41158526
has comment: http://stackoverflow.com/comment/41158614
has body: Do you want to catch if zoom is active? There's no window.onZoom listener, but you can read this thread: Catch browser's "zoom" event in JavaScript and this answer: https://stackoverflow.com/a/995967/3616853 There's no way to actively detect if there's a zoom. I found a good entry here on how you can attempt to implement it. I’ve found two ways of detecting the zoom level. One way to detect zoom level changes relies on the fact that percentage values are not zoomed. A percentage value is relative to the viewport width, and thus unaffected by page zoom. If you insert two elements, one with a position in percentages, and one with the same position in pixels, they’ll move apart when the page is zoomed. Find the ratio between the positions of both elements and you’ve got the zoom level. See test case. http://web.archive.org/web/20080723161031/http://novemberborn.net/javascript/page-zoom-ff3 You could also do it using the tools of the above post. The problem is you're more or less making educated guesses on whether or not the page has zoomed. This will work better in some browsers than other. There's no way to tell if the page is zoomed if they load your page while zoomed.
type: Answer
answers question: http://stackoverflow.com/q/26193667

http://stackoverflow.com/comment/41039736
score: 0
has text: I added the reference to bootstrap.min.css (I had the others). After that point, the only error in the console is one on startup, saying something in that CSS file is wrong. When I actually change the dropdown selected item, no errors in the Chrom dev tools console. It's so weird, since we have the EXACT same code... yet it works for you.
comment on: http://stackoverflow.com/a/26173396
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41017369
has text: Generally speaking, functions don't tend to `echo` a result, but `return`. You may need `<?php echo the_title(); ?>`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26163565

less
tags question: http://stackoverflow.com/q/26188803
type: Tag
tag name: less
tags question: http://stackoverflow.com/q/26034679
tags question: http://stackoverflow.com/q/26042124

http://stackoverflow.com/a/26123406
has body: Variable input isn't defined. You can either assign a value to input, such as: var input = 1; Or use another variable for your calculation, such as opt: var square_size = $('#gridContainer').width() / opt - 2; http://jsfiddle.net/nkcokmaq/3/
score: 0
answers question: http://stackoverflow.com/q/26123075
type: Answer

import
type: Tag
tags question: http://stackoverflow.com/q/26119331
tag name: import
tags question: http://stackoverflow.com/q/26068585

http://stackoverflow.com/q/26116281
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40929875
accepted answer: http://stackoverflow.com/a/26116360
has body: I am using AngularJS. I have a function in my controller that gets .json file from the server, working with data and store it in $scope. So basically this function needs biggest amount of time when the page is loading. So I have something like this, my page has loaded but but my table (that populates with ng-repeat) has not. It takes few seconds to load the table. And while the table is loading I want to add progress circle like that: What is appropriate way to do it in AngularJS? Here is a controller demo: var serverData = $http.get('data/topCarObj.json'); function sortCars(){ angular.forEach($scope.tabArray, function(tab){ serverData.success(function(data){ angular.forEach(data, function(key){ .... return myCarList; }); }); }); }
has answer: http://stackoverflow.com/a/26116446
tagged with: http://stackoverflow.com/tag/html
tagged with: progress
favorite count: 0
possible better answer: http://stackoverflow.com/a/26116446
tagged with: angularjs
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/26116360
upvote count: 3
has title: Appropriate way to add progress circle in AngularJS
type: Question
answer count: 2

http://stackoverflow.com/q/26049855
upvote count: 7
type: Question
linked to: http://stackoverflow.com/q/55191198
linked to: http://stackoverflow.com/q/3224834
tagged with: counter
tagged with: javascript
has answer: http://stackoverflow.com/a/26050234
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/26050078
tagged with: jquery
score: 7
has answer: http://stackoverflow.com/a/26049990
favorite count: 0
possible better answer: http://stackoverflow.com/a/26049990
accepted answer: http://stackoverflow.com/a/26050234
type: AnsweredQuestion
has body: I have a new business, where I just hired someone to work for me, I am trying to make it easy for her to track her time, so I created a clock in button, that creates a record in a database, I have it pop up a small window, that she can click to clockout when she is done working. I want it to show her on that popup window a counter that will show how long she has been working, so I want to create a javascript or jQuery that will start at a certain time and count from there. She is on the East Coast, our company is in the Central Timezone, so 1 hour behind her. How can I get a javascript to start from a certain time and keep updating the timer, so she can see something like this: [You've been working for: 01:01:01 HH::MM::SS] - and it is actively updating, climbing up. All the timers I've found are not about time itself, but about starting at a time and counting down, or starting at 0 and counting up. Is there a way to tell it a start time, so that way if she reloads the page, it does not start from 0, but will start at the time she clocked in, then add the time since and start from there? I know it can be done, but I'm more of a Perl guy than a Javascript guy. I'm doing this on Wordpress, so I could use PHP and just tell her to refresh the page to see the current amount of time and then have it on page load show the current amount of time, but I think having a counter would be better and make it easier for her. is there some code already done that I could modify myself to make it work? I cannot find any, anywhere. I'm willing to do all the work, I'm not asking for someone to do it for me. I found this example someone did: function get_uptime() { var t1 = new Date() var t2 = new Date() var dif = t1.getTime() - t2.getTime() seconds = dif / 1000; Seconds_Between_Dates = Math.abs(seconds); document.getElementById("seconds").innerHTML = Seconds_Between_Dates; setTimeout(get_uptime, 1000); } get_uptime(); That is sort of it, but I don't now how to put the first time in t1,…
has title: javascript - time counter since start date and time

http://stackoverflow.com/comment/40890810
comment on: http://stackoverflow.com/a/26092309
type: AnswerComment
score: 0
type: Comment
has text: @beyondit01 that means your PHP code itself is not getting executed, isn't it

http://stackoverflow.com/q/26055270
answer count: 0
has comment: http://stackoverflow.com/comment/40924824
type: UnansweredQuestion
has title: Highcharts angular gauge chart
tagged with: dotnethighcharts
type: Question
has comment: http://stackoverflow.com/comment/40902030
tagged with: highcharts
tagged with: javascript
has body: Can we print text across the angular gauge in highcharts representing the level of that value. For example if we have the gauge speedometer ranging from 0-100 km. i want to give 0-30 a different color and place a text across along its perimeter indicating slow, similarly 30-70 medium and 70-100 as fast. So that tells us if he's driving slow, medium or fast independent of magnitude. Thanks.
score: 0
tagged with: gwt-highcharts
has comment: http://stackoverflow.com/comment/40818489

http://stackoverflow.com/comment/40910566
type: QuestionComment
comment on: http://stackoverflow.com/q/26105384
type: Comment
score: 2
has text: It's very very unlikely that the cause of the error is the long line. Try the code unminified.

http://stackoverflow.com/a/26184889
has body: I've not done this before, but here are a couple of things you could try: Have a simple web backend that, when hit, reads the image directory for all files and randomly chooses one to give back to you. Use requestFileSystem to implement the above in javascript Keep your image names in javascript code and random choose from them. Then, once you have an image selected, you could: Change the src attribute of the image element Create an Image element and attach it to the DOM Options 1 and 1 are probably easiest, but figured I'd shoot out a couple more ideas.
score: 0
answers question: http://stackoverflow.com/q/26184791
type: Answer

http://stackoverflow.com/a/26101965
has comment: http://stackoverflow.com/comment/40905877
upvote count: 3
score: 1
downvote count: 2
has comment: http://stackoverflow.com/comment/40905722
answers question: http://stackoverflow.com/q/26101355
type: Answer
has body: The trick is to wait until the image has been loaded. var imgArray = ['&lt;img src="http://placehold.it/400x300/cf5"&gt;', '&lt;img src="http://placehold.it/400x300/555"&gt;', '&lt;img src="http://placehold.it/400x300/f0f"&gt;', '&lt;img src="http://placehold.it/400x300/05b"&gt;'] counter = -1; function imgTransition() { $('#result1').fadeOut(300, function() { $('#result1').html(imgArray[counter]); $('#result1 &gt; img').on('load', function() { $('#result1').fadeIn(500); }); }); }; $('#nextimage').click(function () { counter = (counter + 1) % imgArray.length; console.log(imgArray[counter]); imgTransition(); }); $('#previmage').click(function () { counter = (counter - 1); console.log(imgArray[counter]); imgTransition(); }); JSFiddle

http://stackoverflow.com/comment/40953929
type: AnswerComment
score: 0
type: Comment
has text: I tested, it works fine. http://jsfiddle.net/7j2h3Lu4/ . And I updated the answer.
comment on: http://stackoverflow.com/a/26118266

http://stackoverflow.com/comment/41029661
type: QuestionComment
comment on: http://stackoverflow.com/q/26167826
has text: I don't know how it works in C#, maybe it has a builtin bigint library or support for arbitrary-precision arithmetics - of which JavaScript indeed has neither.
score: 0
type: Comment

http://stackoverflow.com/q/26184143
favorite count: 0
answer count: 1
has title: Pass Data Between Angular UI Modals
tagged with: angular-ui
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26184962
upvote count: 1
has body: I am looking to pass data between modals using Angular UI. Here is the modalController that defines the controller and view partial for each modal. app.controller("modalController", function($scope, $modal){ $scope.registerOpen = function(size) { var modalInstance = $modal.open({ templateUrl: "templates/registrationModal.html", controller: 'modalInstanceController', size: size }); }; $scope.categoriesOpen = function(size) { var modalInstance = $modal.open({ templateUrl: "templates/categoriesModal.html", controller: 'modalInstanceController', size: size }); }; }); Here is the Modal Instance Controller which is called for each modal which handles closing and opening the modal app.controller("modalInstanceController", function($scope, $modalInstance){ $scope.ok = function () { $modalInstance.close($scope.selected.item); }; $scope.cancel = function () { $modalInstance.dismiss('cancel'); }; }); Here is the register modal body that has two nested controllers. the model formData points to en empty object inside of registerFormController. Register Modal Body: Sign In With Facebook Passwords do not match! Next {{formData}} Categories Modal: Sports Bars Family Movies Submit {{formData}} Here, in the categories modal, {{formData}} doesn't reflect the input values from the previous modal. I think I might need to resolve and return the data back to the controller to pass it along to the next, but not sure how to implement this. Finally the registerFormController app.controller('registerFormController', function($scope, $http){ $scope.formData = {}; $scope.processForm = function() { $http({ method: 'POST', url: '/user', data: $scope.formData, headers: {"Content-Type": "application/json"} }).success(function(data){ if(!data) { console.log('not working'); } else if (data) { console.log('successfully POSTing!'); } }); }; }); Whew... Sorry for the long post. Somewhat new to angular so I really appreciate the responses and help. I can convert this to a codepen if necessary. Thanks in …
type: AnsweredQuestion
score: 1
tagged with: angularjs-scope
type: Question
tagged with: modal-dialog
has answer: http://stackoverflow.com/a/26184962
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/26157621
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41017907
has body: Send the data as JSON to the server using jQuery as your bridge to handle the server side interaction with it's $.ajax() wrapper. First, you need to mutate the data into a JSON object to be sent over and easily parsed. In knockout, you can use the .toJSON(model) method on a ko object to get the JSON interpretation of it, such as: var jsonData = ko.toJSON(ViewModel); Which will give you your JSON String. This is ready to be passed to the server, so now you can construct your $.ajax() call to your PHP script. $.ajax({ url: '/path/to/my/script.ext', type: 'GET', //default anyway, provided for clarity dataType: 'json', //the returned data from the server will be automatically parsed as json data: jsonData, //the KO model we converted earlier success: function(data){ //the server's response is in "data" above, jsonParsed already. } });
has comment: http://stackoverflow.com/comment/41007419
has comment: http://stackoverflow.com/comment/41006605
type: Answer
has comment: http://stackoverflow.com/comment/41006659
accepted answer of: http://stackoverflow.com/q/26157428
has comment: http://stackoverflow.com/comment/41007339
has comment: http://stackoverflow.com/comment/41006867
has comment: http://stackoverflow.com/comment/41006834
answers question: http://stackoverflow.com/q/26157428

http://stackoverflow.com/a/26036027
score: 1
upvote count: 1
downvote count: 0
has body: You can use like this : <?php echo ' button '; ?> And function openConfirm(id) { alert(id); $.modal.confirm('Sicuri di voler cancellare il cliente?', function() { window.location.href = "deletecustomer.php?customerid="+id; //the php file where I have the delete query }, function() { window.location.href = "newcustomer.php"; }); };
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26035620
type: Answer
accepted answer of: http://stackoverflow.com/q/26035620

cryptography
tag name: cryptography
type: Tag
tags question: http://stackoverflow.com/q/26040715

http://stackoverflow.com/comment/41061612
type: Comment
has text: Haha glad I could help. That's a great looking site you got there, btw!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26184001

http://stackoverflow.com/comment/40944306
score: 0
has text: Well, my problem is to replace comma with point because I need to add my data into an sql database, is there any way?
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26123893

http://stackoverflow.com/comment/41061934
comment on: http://stackoverflow.com/q/26187357
has text: Please fix your code formatting.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40842499
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26067927
type: Comment
has text: You should provide rendered HTML instead of PHP code.

http://stackoverflow.com/comment/40855516
type: QuestionComment
has text: If the page is truly reloading (clicking a link or something), it shouldn't leak. Which browser(s) show this behavior? EDIT: ...I now see it's a chrome extension.
score: 0
comment on: http://stackoverflow.com/q/26075340
type: Comment

http://stackoverflow.com/a/26124787
answers question: http://stackoverflow.com/q/26124728
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26124728
has body: $('.inner').click(function(e){ console.log("inner has been triggered"); e.stopPropagation(); });
type: Answer
upvote count: 4
score: 4
has comment: http://stackoverflow.com/comment/40954089

http://stackoverflow.com/comment/40933189
comment on: http://stackoverflow.com/a/26117464
score: 0
type: Comment
has text: I do know what you mean, but here you are redirecting the user so unsetting $_SESSION['id'] is redundant.
type: AnswerComment

http://stackoverflow.com/q/26130043
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26131313
type: Question
score: 0
answer count: 1
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26131313
has title: Why does chrome dev tools show the extension ID blow the iFrames?
has body: Normally, when I use the Console tab of the developer tools in Chrome, I see a list of iFrames like the following: However, after I installed a certain extension I see the extension ID below a number of iFrames in the Console tab like following: Can anybody tell me what does that mean? I suppose that those iFrames' parent is the extension but I am not sure. Can anyone please correct me if I am wrong? Also, if those iFrames' parent is the extension is there any way to track them? By track them I mean that say I want to run the command window.open = function () { debugger; } for all such frames, is it possible for me to do so?
tagged with: iframe
tagged with: google-chrome

http://stackoverflow.com/q/26135728
has answer: http://stackoverflow.com/a/26135833
has comment: http://stackoverflow.com/comment/40965479
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40965530
has comment: http://stackoverflow.com/comment/40986873
has comment: http://stackoverflow.com/comment/40965600
answer count: 3
has body: $(".fancybox-effects-b").fancybox({ openEffect : 'none', closeEffect : 'none', closeClick : true, helpers : { title : { type : 'inside' } } }); This is a code for fancy box i included the entire lib folder and source folder of fancy box but i still get Uncaught TypeError: undefined is not a function in the $(".fancybox-effects-b").fancybox what may be the cause of this what is the solution for this UPDATE got the code here this is all the script i used
tagged with: fancybox
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26135814
has comment: http://stackoverflow.com/comment/40966504
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40967089
has comment: http://stackoverflow.com/comment/40965488
has title: Uncaught TypeError: undefined is not a function for fancy box
has comment: http://stackoverflow.com/comment/40998373
downvote count: 1
has answer: http://stackoverflow.com/a/26135819
type: Question
has comment: http://stackoverflow.com/comment/40965595

http://stackoverflow.com/comment/41040649
comment on: http://stackoverflow.com/q/26176158
has text: WHERE do you execute that statement. And no, Fx does not natively support ActiveX: http://stackoverflow.com/questions/20118868/enabling-activex-control-in-chrome-and-firefox - lastly, w3schools is a very poor resource
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40930654
type: Comment
type: QuestionComment
has text: hi. hide them with $(".list_comment").hide();
comment on: http://stackoverflow.com/q/26114380
score: 0

http://stackoverflow.com/q/26085182
has title: Why isn't my file watcher triggering?
type: UnansweredQuestion
upvote count: 1
type: Question
tagged with: typescript
score: 1
has answer: http://stackoverflow.com/a/26085516
tagged with: compilation
has comment: http://stackoverflow.com/comment/40906257
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: webstorm
favorite count: 0
has body: I've set up my file watcher to compile my TypeScript to JavaScript. It has worked, but if I change a file it doesn't compiles again. I'm messing already for 2 hours with this problem. You can see my file watcher settings in the screen provided. My settings

http://stackoverflow.com/a/26162734
answers question: http://stackoverflow.com/q/26162271
has body: var wordlist1 = ["Aggressive", "Amazing", "Attractive", "Black", "Broken", "Brave", "Caring", "Cold", "Corny"] var randomNumber = Math.floor(Math.random() * wordlist1.length); var displayword1 = wordlist1[randomNumber]; document.getElementById("word1").innerHTML = displayword1 var media = new Media(randomNumber+".mp3", function(){/*success*/}, function(){/*error*/}); media.play(); maybe you will need to change the success callback to be the one calling this.play();
type: Answer
has comment: http://stackoverflow.com/comment/41042833
has comment: http://stackoverflow.com/comment/41015641
has comment: http://stackoverflow.com/comment/41071502
score: 0

http://stackoverflow.com/comment/41063248
type: Comment
type: QuestionComment
has text: Your fiddle will also not work in Chrome as you have `window.onload = ... ` there and the `onLoad` option on the left. If you correct this it also seems to work with FF.
comment on: http://stackoverflow.com/q/26188020
score: 0

http://stackoverflow.com/comment/40944090
has text: ..it doesn't work yet, and the error is the same on my main project. http://plnkr.co/edit/RfRFPq2OVNr5I6iGVtdq?p=preview
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26119825

http://stackoverflow.com/comment/40830085
comment on: http://stackoverflow.com/q/26061195
score: 0
type: Comment
type: QuestionComment
has text: @amazingacademy IS anything getting saved into the database?

http://stackoverflow.com/a/26178555
score: 3
has body: var $lis = $('.list-group li') $lis.on('click', function(){ $lis.removeClass('active') $(this).addClass('active') })
upvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/26178441
downvote count: 0

http://stackoverflow.com/comment/40844693
type: QuestionComment
has text: Seems open to opinion. Implement with maximum simplicity and consistency. And no one can say ye nae
comment on: http://stackoverflow.com/q/26069175
score: 0
type: Comment

http://stackoverflow.com/comment/40954506
type: Comment
has text: exactly what ian said. "I have a banana, but need to use a hammer. how can I turn the banana into a hammer? I don't want to change the banana"
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26123893

http://stackoverflow.com/a/26134734
has comment: http://stackoverflow.com/comment/40963786
has comment: http://stackoverflow.com/comment/40963674
answers question: http://stackoverflow.com/q/26134699
has comment: http://stackoverflow.com/comment/40963802
type: AcceptedAnswer
downvote count: 0
has body: Since that code is not PHP, it should not be inside the &lt;?php ... ?&gt; block. Remove those tags around it, so it will just be output literally. If this Javscript code is in an HTML page, it should be inside a &lt;script&gt; tag, so it should be: &lt;script&gt; $(function(){ $("#province_wrapper").hide(); $("#kelas").change(function(){ if($(this).val() != 0){ $("#province_wrapper").show(); $.get("ajax.php?id_kelas="+$(this).val(),function(anggota){ var p_html = ""; for(var i=0;i&lt;anggota.length;i++){ p_html += "&lt;option value='"+anggota[i].noanggota+"'&gt;"+anggota[i].nama_lengkap+"&lt;/option&gt;"; } $("#anggota").html(p_html); },"json"); } }); }); &lt;/script&gt;
type: Answer
accepted answer of: http://stackoverflow.com/q/26134699
has comment: http://stackoverflow.com/comment/40963741
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/40963722

http://stackoverflow.com/a/26124857
type: AcceptedAnswer
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/26089174
answers question: http://stackoverflow.com/q/26089174
has body: It turns out adding the data as request.post multipart information isn't good enough, and will make the Flickr API throw an "Invalid API Key (Key has invalid format)" error instead of saying what's actually wrong. The following request call, with exactly the same data, works: var uploadOptions = ... var flickrURL = ...; var req = request.post(flickrURL, function(error, response, body) { callback(error, body); }); var form = req.form(); uploadOptions.photo = fs.createReadStream(...); Object.keys(photoOptions).forEach(function(prop) { form.append(prop, photoOptions[prop]); }); Despite not making all that much sense call wise (why would the POST not already be done by the time we call form = req.form()?) this is request's "proper" way to send the POST payload over the wire, and makes the Flickr API process the photo upload just fine.

http://stackoverflow.com/comment/41006577
has text: `transition` property is not animatable. Set it in your CSS or use `.css({transition: "all 0.2s linear"})` somewhere in your chain.
comment on: http://stackoverflow.com/q/26156593
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26064605
upvote count: 1
tagged with: global-variables
type: Question
has answer: http://stackoverflow.com/a/26146782
has title: Javascript: List all variables in the same scope (iframe)
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26146782
tagged with: scope
answer count: 2
possible better answer: http://stackoverflow.com/a/26096845
has body: I do have some custom code in an iframe, where I declare a global variable. Within the iframe there is also third party code, which globals I would like to access. Question Broadly: Is it possible to list all variables, which are in the same scope as another variable? More specifically: Is it possible to list all global variables in an iframe, if have custom code within it? What I've tried To list all variables from a certain scope I used: var listScopeVars = function(scope) { for (var prop in scope) { if(scope[prop] &amp;&amp; typeof(scope[prop]) != "function") { console.log(prop + "=" + scope[prop]); } } }; From within the iframe I then called: listScopeVars(window); /* throws an cross domain error */ listScopeVars(document); listScopeVars(document.body); listScopeVars(document.documentElement); None of them seems to bring the desired result, as they don't even list my global var.
has answer: http://stackoverflow.com/a/26096845
downvote count: 0
favorite count: 0
type: AnsweredQuestion
score: 1
tagged with: iframe

http://stackoverflow.com/a/26135273
score: 0
answers question: http://stackoverflow.com/q/26120885
type: Answer
has body: This plugin solves my problem: https://github.com/akzhan/jquery-keyfilter/blob/master/jquery.keyfilter.js

http://stackoverflow.com/q/26160156
score: 0
has body: I made a simple code : JSFiddle: http://jsfiddle.net/xmocartx/sr194nsb/4/ The problem is that when you hover the mouse fast blocks mixed. In Jquery I am a newbie. Please tell me how to fix this? Thank you. $(document).ready(function() { var flag = 1; var liLength = $(".slideMenu ul li").length; var num = 1; var numHover; var numTmp=0; $(".slideMenuCont .item").fadeOut(0); $(".slideMenuCont .item:eq(0)").fadeIn(500); var myInterval = function(){ interval = setInterval(function(){ if(num&gt;=liLength) num=0; $(".slideMenu ul li").removeClass("active"); $(".slideMenu ul li:eq("+num+")").addClass("active"); $(".slideMenuCont .item").fadeOut(0); $(".slideMenuCont .item:eq("+num+")").fadeIn(500); num++; },3000); } var stop = function(){ clearInterval(interval) } $(".slideMenu ul li").on({ mouseenter: function () { stop(); if(num&gt;=1) numTmp=num-1; else numTmp=num; numHover=$(".slideMenu ul li").index(this); num=numHover; if(numHover!=numTmp){ $(".slideMenu ul li").removeClass("active"); $(this).addClass("active"); $(".slideMenuCont .item").fadeOut(500); $(".slideMenuCont .item:eq("+num+")").fadeIn(500); } }, mouseleave: function () { if(num&lt;liLength) num++; myInterval(); } }); var Auto = function(){ myInterval(); } Auto(); });
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26160584
tagged with: http://stackoverflow.com/tag/html
has title: Jquery sequential display units when the mouse
type: AnsweredQuestion
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26160584

http://stackoverflow.com/comment/40999706
comment on: http://stackoverflow.com/a/26153196
type: AnswerComment
score: 0
type: Comment
has text: I believe that jQuery.css() takes computer styles into account.

http://stackoverflow.com/comment/40875902
comment on: http://stackoverflow.com/q/26086275
type: QuestionComment
score: 0
has text: Yes I have runed but rendering not happening as i have mentioned.
type: Comment

http://stackoverflow.com/a/26055783
type: Answer
answers question: http://stackoverflow.com/q/26055595
score: 2
has body: I guess you probably are falling for the problem discussed here: Why don&#39;t the AngularJS docs use a dot in the model directive? The input's model is initialized on a parent scope, but as soon as you edit in there the value is stored in a child scope and subsequently also read from there.
accepted answer of: http://stackoverflow.com/q/26055595
type: AcceptedAnswer
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/40785838
type: Comment
comment on: http://stackoverflow.com/a/26037051
type: AnswerComment
score: 0
has text: I tried them both but no change still button click not fire and user control disappear

http://stackoverflow.com/q/26112082
possible better answer: http://stackoverflow.com/a/26115803
tagged with: ruby-on-rails
type: Question
has body: I'm trying to make a script that works when something is selected, a checkbox would be checked and some would be disabled. Here's my code: <%= f.label :company_code, "Company:" %> Mcdo Burger King KFC Select Role: <%= f.check_box :boss, :id => 'boss' %>Boss <%= f.check_box :manager, :id => 'manager' %>Manager <%= f.check_box :crew, :id => 'crew' %>Crew
tagged with: javascript
has title: Rails jQuery: Check checkboxes when something is selected
has answer: http://stackoverflow.com/a/26112127
score: 0
answer count: 2
tagged with: jquery
has comment: http://stackoverflow.com/comment/40922558
accepted answer: http://stackoverflow.com/a/26112127
has answer: http://stackoverflow.com/a/26115803
type: AnsweredQuestion

http://stackoverflow.com/a/26155080
accepted answer of: http://stackoverflow.com/q/26155056
has comment: http://stackoverflow.com/comment/41001959
answers question: http://stackoverflow.com/q/26155056
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41040235
has comment: http://stackoverflow.com/comment/41040698
type: Answer
score: 2
upvote count: 2
has body: Missing msdropdown plugins msdropdown and css Include this code befor you call msdropdown in jsFiddle these external links are included too on the left panel here is snapshot . Also read What is the difference between $(window).load and $(document).ready? Update after OP's comment You are placing msdropdown plugin before you have included jQuery file . msdropdown is a jQuery plugin so jQuery file must be added before the plugin script is called. So it should look like this: put your scripts at bottom of the page and css at the top to improve page load speed.

http://stackoverflow.com/q/26107027
has answer: http://stackoverflow.com/a/26111323
downvote count: 0
has answer: http://stackoverflow.com/a/44199386
tagged with: javascript
tagged with: mocha.js
has answer: http://stackoverflow.com/a/57118100
accepted answer: http://stackoverflow.com/a/26111323
score: 39
upvote count: 39
answer count: 4
tagged with: node.js
favorite count: 0
has title: Running Mocha setup before each suite rather than before each test
has body: Using NodeJS and Mocha for testing. I think I understand how before() and beforeEach() work. Problem is, I'd like to add a setup script that runs before each "describe" rather than before each "it". If I use before() it will run only once for the entire suite, and if I use beforeEach() it will execute before every single test, so I'm trying to find a middle ground. So, if this is my test file: require('./setupStuff'); describe('Suite one', function(){ it('S1 Test one', function(done){ ... }); it('S1 Test two', function(done){ ... }); }); describe('Suite two', function(){ it('S2 Test one', function(done){ ... }); }); I'd like to have "setupStuff" contain a function that runs before 'Suite one' and 'Suite two' Or, in other words, before 'S1 Test one' and 'S2 Test one' but NOT before 'S1 Test two'. Can it be done?
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/36241857
has answer: http://stackoverflow.com/a/36241857

http://stackoverflow.com/comment/45362545
has text: Hi! I'm using streamqueue thanks to you.. but running into issues :( mind a look? http://stackoverflow.com/questions/28522916/how-to-order-the-compiling-of-javascript-files-in-gulp
type: Comment
comment on: http://stackoverflow.com/a/26098747
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40936890
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26119977
score: 0
has text: Thanks but when I change this , to some thing like , the plunker is breaking out. Essentially I want to pass model value ({{user.Name}}) to getTitle function. Is there any mistake in my above change?

session-timeout
type: Tag
tags question: http://stackoverflow.com/q/26047036
tags question: http://stackoverflow.com/q/26082224
tag name: session-timeout

http://stackoverflow.com/q/26129343
has answer: http://stackoverflow.com/a/26129993
has body: I'm very new at javascript and highstock. I want to put datetime into Highstock and realized that it accepted just only Unix time stamp. However, my datetime data is in yyyy-mm-dd format how can I convert datetime data in object and put it back to the same position? My data is object = a: [ '2014-04-12'(string), 120], b: [ '2013-02-12', 300], c: [ '2013-03-15', 300] But, there are 1000 data in my object I would be grateful if you could help me with this issue. Thank you!
has comment: http://stackoverflow.com/comment/40954350
has title: Convering yyyy-mm-dd to unix timestamp in array and put it back at the same position after converted it. [Javascript]
accepted answer: http://stackoverflow.com/a/26129993
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40957084
upvote count: 1
type: Question
tagged with: highcharts
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/26130701
tagged with: variables
favorite count: 0
has body: I am new to JavaScript and I am trying to write my first simple app. I would like to have a code fragment which gets the value from an HTML text form and then assigns that value to a global variable. What I've got so far in HTML: Type something: &lt;input type="text" id="user_text"&gt; &lt;input type="button" onclick="getText()" value="Submit"&gt; and in JS: function getText() { var click_value = document.getElementById("user_text").value; return(click_value); } Is there a way to assign the value returned by the getText function to a global variable (so that I could later on use it in other functions)?
tagged with: http://stackoverflow.com/tag/html
tagged with: getelementbyid
has title: How to get value from an HTML form and assing it to a global variable in JS?
type: UnansweredQuestion
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26130826
score: -1
tagged with: forms
has answer: http://stackoverflow.com/a/26130903
has comment: http://stackoverflow.com/comment/40956995
answer count: 2
has comment: http://stackoverflow.com/comment/40956874
upvote count: 0
has comment: http://stackoverflow.com/comment/40957106

http://stackoverflow.com/comment/40976859
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26138792
type: Comment
has text: This is dynamic sql with some string formatting im not sure if my answer is directly what you want but i think you can achieve it in this way :)

http://stackoverflow.com/comment/40988536
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26147921
type: AnswerComment
has text: Well, thank you for your answer. I was hoping for an alternative way of doing this, but if it's fine to do it the way that I did, then I guess I shouldn't be concerned about the "cascading", or circular, reference. I'll give others a chance to offer alternatives before marking your answer, but if nobody else can offer a better solution, you win. ;)

http://stackoverflow.com/q/26167843
possible better answer: http://stackoverflow.com/a/26168452
tagged with: javascript
has answer: http://stackoverflow.com/a/26168452
answer count: 2
downvote count: 0
favorite count: 0
has body: I'm trying to find a way to control how lines break in a menu listing, so that we don't wind up with a single word in the second line. For example, I have a navigation menu that is 200px wide. One of the items is "City Development Reources &amp; Plan." Natively, the line breaks like this: City Development Resources &amp; Plan What I want is a minimum number of words or characters to break, so that it looks more like this: City Development Resources &amp; Plan I'm not finding anything in pure CSS to manage that, and before I go down the javascript rabbit-hole, I was wondering if anyone had something already handy. Thanks for any help, ty
has title: Controlling Line Break Lengths
has answer: http://stackoverflow.com/a/26167947
tagged with: css
accepted answer: http://stackoverflow.com/a/26167947
tagged with: line-breaks
type: AnsweredQuestion
score: 3
upvote count: 3
type: Question

http://stackoverflow.com/q/26147526
tagged with: partial-views
has comment: http://stackoverflow.com/comment/40990515
has comment: http://stackoverflow.com/comment/40995855
type: UnansweredQuestion
answer count: 0
has body: I am creating an MVC3 web app. It has a series of cascading dropdowns and related buttons. Depending on what the dropdowns are set to and which buttons the user presses, many different things can be displayed. So far in my view I have added each of these possibilities in a div tag and then using javascript I have hidden or shown them as needed. This has created one giant view that is kind of unmanageble. Lately I have come across partial views in my research. I think I might be able to just save each of the possibilities that can be shown into partial views and then just have a particular partial view be shown based on the button presses. However, from research, this doesn't seem to be what partial views are meant for. Should I keep using divs that I hide/show as needed, or are partial views a better choice, or is there a better solution that I haven't thought of/found?
score: 0
tagged with: asp.net-mvc-3
type: Question
has title: Should I display chosen pieces of a view by hiding/showing with div or using partial views?
tagged with: javascript

http://stackoverflow.com/comment/40902540
comment on: http://stackoverflow.com/q/26101042
has text: Hint: http://api.jquery.com/attr/
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40841827
type: QuestionComment
comment on: http://stackoverflow.com/q/26067147
has text: @MikeHofer: No, the best practice is to define an overall strategy that works together sensibly as a unit. This may involve extending native prototypes, or may not. What's a bad practice is to have various strategies that when used together, produce bugs.
score: 2
type: Comment

http://stackoverflow.com/comment/41074353
comment on: http://stackoverflow.com/q/26193791
score: 0
type: Comment
type: QuestionComment
has text: Yes, I am using 4.9.0. I will look into your other point. Thank you.

http://stackoverflow.com/comment/40930018
type: QuestionComment
score: 2
has text: No underscore bashing here, and I'm not an expert, but you should check out 'lo-dash'. It was inspired by underscore, but should be more efficient and have more features. As seen here: http://stackoverflow.com/questions/13789618/differences-between-lodash-and-underscore. I'm just commenting it here so you can check it out if your project is rather new and you can still easily replace it.
type: Comment
comment on: http://stackoverflow.com/q/26116298

http://stackoverflow.com/comment/41112419
comment on: http://stackoverflow.com/a/26213899
score: 0
type: AnswerComment
type: Comment
has text: Thanks for your help! I was following you until you said "Then in your JavaScript, center the #scrollsurface and and pass the scroll events to the element underneath." I have no idea how to pass a scroll event to the element beneath :-/

http://stackoverflow.com/comment/40858520
type: Comment
type: QuestionComment
has text: I think you might need to clarify your question a little bit. I'm assuming the array above is what ends up on the server side? If so, why do you want to browse it with javascript? I know almost nothing about Wordpress but I'm pretty sure it doesn't use Nodejs on the server. Or are you trying to use javascript to look at the array before it's posted?
score: 0
comment on: http://stackoverflow.com/q/26076625

http://stackoverflow.com/q/26154128
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26154518
tagged with: toggle
type: Question
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/40999677
possible better answer: http://stackoverflow.com/a/26154216
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/26154216
has answer: http://stackoverflow.com/a/26154518
favorite count: 0
score: 28
has title: How do I make a element a regular tab stop within a form?
upvote count: 28
tagged with: http://stackoverflow.com/tag/html
has body: I made a form control which uses as its container (see the Yes/No toggler below) Here's the code for that: Yes No My CSS isn't relevant to the question, but it's included for comprehension of my control: .toggle { width:auto; height: 20px; display: inline-block; position: relative; cursor: pointer; vertical-align: middle; padding: 0; margin-right: 27px; color: white !important;} .toggle i { display: block; padding: 0 12px; width: 100%; height: 100%; -webkit-border-radius: 12px; -moz-border-radius: 12px; border-radius: 12px; text-align: center; font: 11px/20px Arial !important; text-transform: uppercase; } .toggle i:first-child { -moz-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5) inset; box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5) inset; background-color: #73B9FF; } .toggle i:last-child { -moz-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5) inset; box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5) inset; background-color: #cc0000; position: relative; top: -20px; z-index: -1; } .toggle.on i:first-child { z-index: 1; } /* they overlap but on click they switch who gets to be on top. */ .toggle.on i:last-child { z-index: -1; } .toggle.off i:first-child { z-index: -1; } .toggle.off i:last-child { z-index: 1; } .toggle.off i:last-child:before { content: " "; display:block; position:absolute; left:1px; top:1px; text-indent: -9999px; width: 18px; height: 18px; -webkit-border-radius: 11px; -moz-border-radius: 11px; border-radius: 11px; z-index: 1; background-color: #fff; } /* circle */ .toggle.on i:first-child:after { content: " "; display:block; position:absolute; right:-23px; top:1px; text-indent: -9999px; width: 18px; height: 18px; -webkit-border-radius: 11px; -moz-border-radius: 11px; border-radius: 11px; z-index: 1; background-color: #fff; } /* circle */ and the JS that makes it all work: .on('click', '.toggle', function(){ var input = $(this).next('input'); if(input.val() == 1) { $(this).removeClass('on').addClass('off'); input.val(0).change(); } else { $(this).removeClass('off').addClas…

http://stackoverflow.com/comment/40905485
type: Comment
type: QuestionComment
score: 3
has text: try maybe $(this).attr('name');
comment on: http://stackoverflow.com/q/26102617

http://stackoverflow.com/q/26180222
possible better answer: http://stackoverflow.com/a/26180490
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26180585
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26180307
has body: I have a generic template that I use multiple times. {{#each item}} {{> genericTemplate}} {{/each}} Inside of this template I have a button that when it is clicked fires a hidden file input in the generic template. $(".upload").click(); Unfortunately for each template the ".upload" class gets fired. So if I had four items, it would give me 4 file inputs. I can't give the buttons a unique id="" because then I would have to explicitly define each event for each id, negating the entire reason for creating the generic template in the first place. What is the proper way to achieve something like this? EDIT: My template events look like this: Template.generic.events({ 'click .fileUpload' : function () { $(".upload").click(); // sets off the 4 templates .upload class }, 'change .upload' : function (e) { console.log('upload') } }) HTML: UPLOAD FILE
tagged with: javascript
has answer: http://stackoverflow.com/a/26180490
has answer: http://stackoverflow.com/a/26180307
answer count: 3
downvote count: 0
has title: Meteor class being fired multiple times from JQuery.click()
tagged with: jquery
tagged with: meteor
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26037058
has comment: http://stackoverflow.com/comment/40788543
has title: knockout js data binding is working on parent screen but not working in popup window on a asp.net / vb.net web app
tagged with: knockout.js
has comment: http://stackoverflow.com/comment/40789414
answer count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40787332
tagged with: jquery
type: UnansweredQuestion
has body: I am developing a web application built with asp.net and vb.net I have a page (update_status.aspx) which is using knockout js to display a datepicker depending upon the value selected by the user on select box. the code is like below. <%@ Page Title="" Language="VB" MasterPageFile="E4.master" AutoEventWireup="false" CodeFile="update-status.aspx.vb" Inherits="E4_Jobs_Details_Application_update_status" %> <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server"> <input type="hidden" id="appId" value="<%= VacancyApplication.ID%>" /> Current status <input type="text" readonly="readonly" value="<%= VacancyApplication.Status%>" /> New status (required) Start date (required, format: DD-MMM-YYYY) </asp:Content> The problem is this data-binding doesnot work when i convert this page as popup page by changing its master page (like below). that is the calender doesnot come up when user selects the right status. <%@ Page Title="" Language="VB" MasterPageFile="E4_Popup.master" AutoEventWireup="false" CodeFile="update-status.aspx.vb" Inherits="E4_Jobs_Details_Application_update_status" %> Both E4.master and E4_Popup.master is using the same style and same code file . <%@ Master Language="VB" CodeFile="E4.master.vb" Inherits="_resx_E4" %> the only difference is they are different files and E4_Popup.master doesnot contains the extra bits of the web page (e.g; headers and footers ). But even if I copy E4.master page as E4_Popup.master page and refer it to the update status page .. the calender does not come up. It just not working on the pages other than E4.master page. I dont understand what the problem is.. What shall I do? Please help me with right advice. Please see the knockout apply bindings code below <asp:Content ID="Content2" ContentPlaceHolderID="ScriptContent" runat="Server"> </asp:Content> When I run the application ... for the E4.master page,E4_popup.master page and update_status_popup.aspx page the following type of warning comes up Namespace or type…
tagged with: asp.net-ajax
tagged with: asp.net
type: Question
score: 0

http://stackoverflow.com/comment/40938133
comment on: http://stackoverflow.com/a/26120240
score: 0
has text: That's cracked it. Thank you. The hyperlink also pulls in bits of php too, and works fine bringing it into the script. The missing link... many thanks.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26136716
answer count: 1
tagged with: angularjs
has body: Just need some help, Im stuck and don't have an idea how to implement this append in Angular. I want to append a new data when the user scroll and the scrollbar hits the bottom. here is my code. note DataModel.getAllData access the api with paging parameters. I stuck on how to add new elements during onScroll. here is what i am trying to achieve on scroll I want to use the list_of_data.html. put all the new data in list_of_data. get the final output then append it on data_list. directive app.directive('scroll', function() { console.log('scroll directive'); return function(scope, elm, attr) { var raw = elm[0]; elm.bind('scroll', function() { if (raw.scrollTop + raw.offsetHeight >= raw.scrollHeight - 20) { scope.$apply(attr.scroll); } }); }; }); main.html list_of_data.html mydata.name mydata.description controller var next; $scope.onScroll = function() { if(next != null || next != "undefined"){ DataModel.getAllData(user_info,next) .then(function (data) { $scope.list_of_data = data; next = data.next; }, function (error) { console.log("error"); }); } } $scope.getData = function(){ $scope.data_uri= 'views/list/list_of_data.html'; DataModel.getAllData(user_info) .then(function (data) { $scope.list_of_data = data; next = data.next; }, function (error) { console.log("error"); }); } //EDIT I tried something like this. but it just overrides the data
type: AnsweredQuestion
type: Question
has title: Angular Load data OnScroll
tagged with: javascript
has answer: http://stackoverflow.com/a/26137618
accepted answer: http://stackoverflow.com/a/26137618
score: 0

http://stackoverflow.com/comment/41024210
has text: First of all thanks for the reply and clarification. I already had some of these in mind. I considered using style.width/height methods but for some reason in this particular case they return an empty value.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26167077

http://stackoverflow.com/q/26099183
has body: I would like to trigger an event on a meteor server when a document on my collection changes to a specific value, say some field changes from false to true. I am familiar with binding events to the client; however, I want this event to only be called when the server state changes, specifically the value of a given document in my collection. I want to trigger an external HTTP call from the server when this happens, as I need to message external applications.
answer count: 2
score: 5
has comment: http://stackoverflow.com/comment/43151134
has comment: http://stackoverflow.com/comment/51021509
has answer: http://stackoverflow.com/a/32125531
upvote count: 5
tagged with: mongodb
downvote count: 0
has title: Meteor trigger event on server collection change
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43150715
type: Question
has answer: http://stackoverflow.com/a/32125698
tagged with: meteor
favorite count: 0
has comment: http://stackoverflow.com/comment/43151152

http://stackoverflow.com/q/26120825
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26121030
has title: jquery tabs default tab
type: AnsweredQuestion
has body: I have jQuery tables on my webpage: Name1 Name2 Name3 Name4 Name5 Name6 Name7 Name8 Name9 How can I set default Name (table) on this script? Because this should work but nothing: $( "#tabs" ).tabs({active: 2});
score: 1
upvote count: 1
type: Question
tagged with: jquery-ui
accepted answer: http://stackoverflow.com/a/26121030
tagged with: javascript
tagged with: jquery-ui-tabs
has answer: http://stackoverflow.com/a/26121465
answer count: 3
possible better answer: http://stackoverflow.com/a/26121072
downvote count: 0
has answer: http://stackoverflow.com/a/26121072
tagged with: jquery

http://stackoverflow.com/a/26150031
answers question: http://stackoverflow.com/q/26149734
has comment: http://stackoverflow.com/comment/40994323
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: There are a few ways to do this. You can chain your filters: {{eachEvent.Title}} {{eachEvent.Status}} Or you can combine your filter into one using $ to match anything: {{eachEvent.Title}} {{eachEvent.Status}} Or you can create a custom function that determines what is filtered and pass that to the filter These all assume the following select has ngModel of "status" and you are filtering by a property called Status and the "Any" option has a blank value. Any InProgress Completed Canceled
score: 1
accepted answer of: http://stackoverflow.com/q/26149734

http://stackoverflow.com/q/26055177
has answer: http://stackoverflow.com/a/26055490
type: UnansweredQuestion
downvote count: 2
has body: hello dynamic function does not work Where is the problem? DynamicCreateFunction function works but runtimeFunction not working. http://i.hizliresim.com/VyXkRv.png function DynamicCreateFunction(func) { var runtimeFunction = new Function(func); runtimeFunction (); } function ExpensesGrid() { alert('working'); }
tagged with: dynamic
has title: dynamic function does not work
type: Question
answer count: 2
upvote count: 0
score: -2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26055832
favorite count: 0

http://stackoverflow.com/q/26036442
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
type: Question
tagged with: php
has comment: http://stackoverflow.com/comment/40785064
upvote count: 1
tagged with: jquery-masonry
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has body: I'm using jquery masonry in my project, where i need to make layout with filter such as category1, category2, category3 and all. And also need the ajax load more option for add more elements in the layout. All is done means ajax is working good with the db and masonry layout. But the filter is not working with ajax (Filter is working without ajax). I'm using here another script which is founded on github here the link know as multiple-filter-masonry Here's my js code... // Start Masonry var $container = $('.posts.load-more').multipleFilterMasonry({ // columnWidth: 150, itemSelector: '.post', filtersGroupSelector:'.filters', isAnimated: true // gutter: 20, // isFitWidth: true }); // Get some more blocks $('#more').click(function(){ // $('.loader').show(); $start = $('.posts.load-more .post').length; $end = 6; $.post('blocks.php', {start: +$start, end: +$end}, function(data){ // $('.loader').hide(); // make jQuery object var $moreBlocks = $( data ); // Append new blocks $container.append( $moreBlocks ); // Have Masonry position new blocks $container.masonry( 'appended', $moreBlocks ); }); Hope someone having the solution for that... or suggest me any idea to complete this. Thanks in advance
has title: Build Masonry layout with filter and ajax Load More option Using Jquery Masonry

http://stackoverflow.com/comment/40884836
type: Comment
has text: um , i am actually a begginer in php , `session_check.include` doesnt sound like a file name to me , should it end with .php or something ? the actual filename is session_check.php ? and i need to add $login = new Login(); if ($login->isUserLoggedIn() !== true) { exit(); } this code there ? and change my `.htaccess` file as you showed in you answer ?
comment on: http://stackoverflow.com/a/26091049
type: AnswerComment
score: 0

http://stackoverflow.com/q/26101969
accepted answer: http://stackoverflow.com/a/26102015
type: Question
tagged with: object
tagged with: javascript
has comment: http://stackoverflow.com/comment/40904160
score: 0
has title: Javascript: append single quotes to individual object results
answer count: 1
has body: I have an object with multiple properties, I want to wrap the results in single quotes and commas if there are multiple values please see the following fiddle. http://jsfiddle.net/efv7sh9d/1/ var obj = { WKF001: ['test1'], WKF002: ['test2','test3'], WKF003: ['test4','test5','test6','test7'], WKF004: ['test8','test8','test9','test10','test11'], WKF005: ['test12','test13','test14','test15','test16'] } function returnCodes(wkf, obj) { for (var d in obj) { if (d.indexOf(wkf) &gt; -1) { return obj[d]; } } return 'Unknown'; } var wkftest1 = "WKF001"; var wkftest2 = "WKF002"; var wkftest3 = "WKF003"; document.write(returnCodes(wkftest3, obj).join("','")); This will return test4','test5','test6','test7 and I need it to be 'test4','test5','test6','test7'
has answer: http://stackoverflow.com/a/26102015
type: AnsweredQuestion

http://stackoverflow.com/q/26134155
tagged with: javascript
has comment: http://stackoverflow.com/comment/40963043
score: 2
type: AnsweredQuestion
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26171619
has comment: http://stackoverflow.com/comment/40962898
type: Question
has comment: http://stackoverflow.com/comment/40963198
tagged with: memory-leaks
has comment: http://stackoverflow.com/comment/40962935
tagged with: node.js
has comment: http://stackoverflow.com/comment/40962932
has comment: http://stackoverflow.com/comment/40962941
has comment: http://stackoverflow.com/comment/40962956
has title: Node.js net socket memory leak?
upvote count: 2
has comment: http://stackoverflow.com/comment/40962878
tagged with: garbage-collection
tagged with: v8
answer count: 1
has comment: http://stackoverflow.com/comment/40963145
has answer: http://stackoverflow.com/a/26171619
has body: I have this script. var net = require("net") , heapdump = require("heapdump"); function onConnection (client) { client.on("data", function (data) { client.end(); }); }; function onListen () { var socket = net.connect({host: "127.0.0.1", port: 3000}); socket.bigBuffer = new Buffer(50000000); //50MB Buffer heapdump.writeSnapshot(__dirname + "/initial.heapsnapshot", function writeInitialSnapshot () { console.log("Wrote initial heap snapshot"); socket.write("data"); }); socket.on("close", function () { writeEndSnapshot(); }); }; function writeEndSnapshot () { setTimeout(function () { console.log("Running GC"); gc(); heapdump.writeSnapshot(__dirname + "/final.heapsnapshot", function writeFinalSnapshot () { console.log("Wrote final heap snapshot"); }); }, 1000); }; net.createServer(onConnection).listen(3000, onListen); What test.js does is pretty straight forward: It creates a net server, which closes the clients right after receiving any data, and binds it to the port 3000 in localhost. When the server listens, the onListen function is executed, which instantiates a socket that connects to the server, and then takes a heap snapshot (please notice that in the line 13 we set a 50MB bigBuffer to the socket, this is just to easily locate it in the heap snapshot) Right after taking the initial snapshot, the sockets writes some data to the server and gets ended, this is when the writeEndSnapshot function gets executed, which waits for the next tick, forces a GC (garbage collection) cycle, and then takes a final heap snapshot. It seemed pretty clear for me that by the time the final snapshot is taken, the socket should have been disposed, and therefore, garbage-collected. However, this is not what I'm seeing in the Google Chrome's profiler when I load the snapshots. Initial heap snapshot Final heap snapshot As you can see in the final snapshot, bigBuffer is still held by the socket. I have no idea why the socket is still alive. All I can see in the retainers tree after socket i…

http://stackoverflow.com/comment/41016871
has text: Thanks! I had the Featherlight js **above** the Owl carousel JS, that was the issue somehow. I changed the order and now they work together as expected.... Thanks! Any idea how this is an issue?
type: Comment
comment on: http://stackoverflow.com/a/26159314
score: 0
type: AnswerComment

http://stackoverflow.com/q/26180344
answer count: 2
possible better answer: http://stackoverflow.com/a/26180423
upvote count: 0
tagged with: arrays
has answer: http://stackoverflow.com/a/26180423
has comment: http://stackoverflow.com/comment/41048343
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41048215
favorite count: 0
has answer: http://stackoverflow.com/a/26180460
has body: I have an array of objects as follows: myArr:[obj{}. obj{}, obj{}, obj{}] How can I return the index of each object in the array? This snippet is inside a bigger for loop which will iterate the same amount of times as there are objects in my array. var ret = 'Index: ' if(myArr.length &gt; 0){ var idx = myArr.obj.index?? var ret += idx; } console.log(ret); //Which will hopefully be Index: 0 etc... Any advice would be greatly appreciated. Cheers
has title: How do I get the index of an object in this array?
tagged with: indexing
type: AnsweredQuestion
downvote count: 1
accepted answer: http://stackoverflow.com/a/26180460
type: Question

http://stackoverflow.com/comment/40911325
has text: I think Crockford is innocent, the author is David Flanagan :- http://www.amazon.co.uk/JavaScript-Definitive-Guide-David-Flanagan/dp/0596101996
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26105662
score: 1

http://stackoverflow.com/q/26170866
type: Question
has answer: http://stackoverflow.com/a/26171059
tagged with: javascript
has title: Why does bitwise OR on undefined in javascript produce a large negative number, and get used as the non-zero result?
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/26171013
linked to: http://stackoverflow.com/q/16369280
tagged with: nan
has body: A bitwise OR (single pipe | ) produces a strange output for an undefined property (once it becomes NaN). As this post implies, ToInt32 is called internally on undefined, producing NaN. But why does NaN|largeNumber result in a large negative number if NaN | smallNumber results in a small number? In action, (see console output): http://jsfiddle.net/4ev1asw7/6/ Here's the code: var foo = {}; foo.date = 1412146800000; //some epoch timestamp as an integer console.log( 'result: ' + foo.notDefinedThingy | foo.date ); // outputs -897440384 console.log( 'to int 32: ' + parseInt(undefined) ); //outputs NaN console.log( 'to int 32: ' + parseInt(undefined) | foo.date ); //outputs -897440384 console.log( 'Small number ' + parseInt(undefined) | 5 ); // outputs 5
tagged with: integer
type: AnsweredQuestion
tagged with: numbers
has comment: http://stackoverflow.com/comment/41031182
tagged with: bit-manipulation
has comment: http://stackoverflow.com/comment/41031209
possible better answer: http://stackoverflow.com/a/26171059
has answer: http://stackoverflow.com/a/26171013

http://stackoverflow.com/comment/41103274
score: 0
type: Comment
has text: I believe this is happening because your trying to connect to another server, one that is different from the one that servers your client. Your basically having a CORs issue. You should look into COrs in general. It is pretty important regarding security. Here are some links that might be helpful: http://stackoverflow.com/questions/24433099/how-to-disable-withcredentials-in-http-header-with-node-js-and-request-package http://en.wikipedia.org/wiki/Cross-origin_resource_sharing
comment on: http://stackoverflow.com/a/26125976
type: AnswerComment

http://stackoverflow.com/q/26063199
score: 1
favorite count: 0
has body: Is there any possibility that I jump to/show specific week by using week number? For example, if I want to display week number 43, is there any way I can do that? I know how to do it using goToDate option and then changing view to week, but is there any possibility to do it using week number?
has title: Jump to/show specific week in calendar by using week number
linked to: http://stackoverflow.com/q/7580824
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26078265
upvote count: 1
tagged with: date
type: Question
downvote count: 0
tagged with: javascript
tagged with: fullcalendar
accepted answer: http://stackoverflow.com/a/26078265
answer count: 1

http://stackoverflow.com/a/26115449
accepted answer of: http://stackoverflow.com/q/26115412
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26115412
type: Answer
has comment: http://stackoverflow.com/comment/40928810
score: 2
upvote count: 2
has body: No, getElementsByTagName only accepts a tag name. But you can use querySelector and querySelectorAll with a CSS selector : var element = document.querySelector("parent child grand-child"); or var elements = document.querySelectorAll("parent &gt; child &gt; grand-child");
has comment: http://stackoverflow.com/comment/40929400
has comment: http://stackoverflow.com/comment/40928448

http://stackoverflow.com/a/26114478
has body: A transcluded element is always bound to the parent scope, irrespective of whether you are using isolated or not. This is what the documentation on transclude states transclude compile the content of the element and make it available to the directive. Typically used with ngTransclude. The advantage of transclusion is that the linking function receives a transclusion function which is pre-bound to the correct scope. In a typical setup the widget creates an isolate scope, but the transclusion is not a child, but a sibling of the isolate scope. This makes it possible for the widget to have private state, and the transclusion to be bound to the parent (pre-isolate) scope.
accepted answer of: http://stackoverflow.com/q/26114433
answers question: http://stackoverflow.com/q/26114433
has comment: http://stackoverflow.com/comment/40926936
has comment: http://stackoverflow.com/comment/40927039
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40927609
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40926834
score: 1

http://stackoverflow.com/q/26172311
has body: This is interesting to me. Look at the following D3 code: var scale = d3.scale.linear() .domain([100, 500]) .range([10, 350]); scale(100); //Returns 10 scale(300); //Returns 180 scale(500); //Returns 350 Is there a function that inverse of scale? For example, inverseScale(10); //Returns 100 inverseScale(180); //Returns 300 inverseScale(350); //Returns 500
has answer: http://stackoverflow.com/a/26172369
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Invert scale function
upvote count: 56
type: AnsweredQuestion
tagged with: d3.js
score: 56
type: Question
accepted answer: http://stackoverflow.com/a/26172369

http://stackoverflow.com/a/26089656
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26089535
has body: document.querySelector() will return only the first found node. document.querySelectorAll would return a list that you would need to iterate. However, this can be done with jQuery easily: var selectedSong = ''; $('.playBtn').on('click', function() { selectedSong = $(this).val(); }); See fiddle. Or with pure JS using getElementsByClassName or querySelectorAll var selectedSong = ''; var a_btn = document.getElementsByClassName('playBtn'); // or querySelectorAll // var a_btn = document.querySelectorAll('.playBtn'); for(var i = 0; i &lt; a_btn.length; i++) { a_btn[i].onclick = function() { selectedSong = this.value; }; }; See fiddle.

http://stackoverflow.com/comment/41003489
comment on: http://stackoverflow.com/q/26156166
score: 0
type: Comment
type: QuestionComment
has text: I'm unfamiliar with ionic, but to make your code simpler, you don't have to check for the status in the `success` handler, if you have no connection it'll go into `error`

http://stackoverflow.com/comment/40942741
comment on: http://stackoverflow.com/q/26123170
has text: Hovering the links I see you are using anchor tag reference. The return false in your script won't add the hash tag to the url, which you use as your scroll reference. When I do those things I usually add an id to the link e.g. "menu-contact" and then clicking it I will look for an element with the id contact, calculate it's top position and then scroll there.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41118561
type: QuestionComment
has text: I was trying to pass the html within a div back to the server to have it converted to a pdf.
comment on: http://stackoverflow.com/q/26154384
score: 0
type: Comment

http://stackoverflow.com/comment/41001994
score: 0
type: Comment
has text: following your syntax I have tried this `function findKey(map, term) { for(var key in map) { if(map[key] == term){ console.log(key); } } }` I am expecting `foo` when I call `findKey(map, { foo1: true })` but to my surprise it is not logging anything. Do you know why?
type: AnswerComment
comment on: http://stackoverflow.com/a/26147719

http://stackoverflow.com/comment/40939498
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26110702
has text: Thanks for your answer. Some party of my question were badly phrased. For the rest: I still read in many articles that Meteor and security is a very big issue and that it is nowhere near production ready (I mean they haven't reached v 1.0) yet. A collection of youtube videos where the founders of Meteor praise their system doesn't really assure me. About SEO: Launching an entire web browser on your server, render the page, then pass that to the search engine is extremely inefficient and makes you prone to a DDOS attack. https://andrewmunsell.com/blog/the-odd-state-of-nodejs-and-its-frameworks

http://stackoverflow.com/a/26060817
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26060341
has body: I never use ngAnimate, but animate.css. Here comes the code, http://plnkr.co/edit/DjuxVfOjcUa0N4nOCSGN?p=preview {{no}} Hello Plunker!
accepted answer of: http://stackoverflow.com/q/26060341
type: Answer
upvote count: 1

http://stackoverflow.com/a/26110672
has comment: http://stackoverflow.com/comment/40920493
answers question: http://stackoverflow.com/q/26110649
type: Answer
has comment: http://stackoverflow.com/comment/40921141
has body: Don't use IDs for toggling visibility of lots of elements. It's unmaintainable, and misses the point of what IDs are for; they're for a unique property when you need to do targeted work (navigate to them, manipulate a single element, etc). Give all those bits a class attribute with the same class (or if they already have one, give them all the same class as extra class), and the toggle that single class. &lt;div id="..." class="line"&gt; ...&lt;/div&gt; &lt;div id="..." class="line"&gt; ...&lt;/div&gt; &lt;div id="..." class="line"&gt; ...&lt;/div&gt; &lt;div id="..." class="line"&gt; ...&lt;/div&gt; and then a simple $(".line").hide(); to hide everything, with $(".line").hide(); $("#justthatline").show(); to show individual parts
downvote count: 1
has comment: http://stackoverflow.com/comment/40920567
upvote count: 4
has comment: http://stackoverflow.com/comment/40920922
score: 3

http://stackoverflow.com/a/26154552
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/41039525
accepted answer of: http://stackoverflow.com/q/26154532
answers question: http://stackoverflow.com/q/26154532
has body: Check This, anchor.onclick = function () { app.activateAnchor(this); } Usually you should assign function reference to event handler. anchor.onclick = app.activateAnchor
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41001144
has comment: http://stackoverflow.com/comment/41000758
has comment: http://stackoverflow.com/comment/41016050

http://stackoverflow.com/comment/41079613
comment on: http://stackoverflow.com/q/26072277
type: Comment
type: QuestionComment
score: 1
has text: I'm having the same issue, mine says 'unbuild' before saying 'It worked'

http://stackoverflow.com/q/26034890
type: Question
tagged with: javascript
score: 0
has title: Radio button is checked but value of ng-model is undefined
has comment: http://stackoverflow.com/comment/40781675
tagged with: angularjs
type: UnansweredQuestion
has body: So basically a restaurant has two attributes dine_in or home_delivery. If both of them are true, then I let the user decide which he/she wants to use. But if only dine_in or only home_delivery is available at I would show them only the corresponding radio button and they need not click on radio button again. Here is my code: Location: Dine-In Home Delivery / Take-away Here my problem is although Home-Delivery or Dine-In button is shown as checked but value of ng-model checkin.location is undefined. Only when I click on the radio button again, ng-model is passed corresponding value. checkin_select_dirty is for the case when both options are available and user hasn't checked any one of them. It is used to prompt user to select one of them.
answer count: 0
has comment: http://stackoverflow.com/comment/40781853

ckeditor
tags question: http://stackoverflow.com/q/26142523
tag name: ckeditor
tags question: http://stackoverflow.com/q/26064496
tags question: http://stackoverflow.com/q/26085305
tags question: http://stackoverflow.com/q/26156620
tags question: http://stackoverflow.com/q/26054381
tags question: http://stackoverflow.com/q/26181100
tags question: http://stackoverflow.com/q/26110905
tags question: http://stackoverflow.com/q/26148593
type: Tag
tags question: http://stackoverflow.com/q/26099815

http://stackoverflow.com/comment/40945327
type: Comment
type: QuestionComment
has text: @tainterr The shown lines are the shortest paths between the locations. Re-routing them may not be as easy as it sounds.
comment on: http://stackoverflow.com/q/26124349
score: 0

http://stackoverflow.com/a/26159550
has comment: http://stackoverflow.com/comment/88092171
has comment: http://stackoverflow.com/comment/88106243
score: 12
has comment: http://stackoverflow.com/comment/88109990
has comment: http://stackoverflow.com/comment/119995595
type: AcceptedAnswer
has body: You have a bug in your calculation : it's 0 month. And if you mean d/m/y then 1 year, 1 month, and 0 day old. you said between the two dates ( not include) - look here Anyway here is the right code which include actually count each month - how many days it has ! ( leap year consideration): notice : I instantiated it as d/m/yyy. feel free to send right pattern in : alert(getAge( new Date(1978,11,22),new Date())) function getAge(date_1, date_2) { //convert to UTC var date2_UTC = new Date(Date.UTC(date_2.getUTCFullYear(), date_2.getUTCMonth(), date_2.getUTCDate())); var date1_UTC = new Date(Date.UTC(date_1.getUTCFullYear(), date_1.getUTCMonth(), date_1.getUTCDate())); var yAppendix, mAppendix, dAppendix; //-------------------------------------------------------------- var days = date2_UTC.getDate() - date1_UTC.getDate(); if (days &lt; 0) { date2_UTC.setMonth(date2_UTC.getMonth() - 1); days += DaysInMonth(date2_UTC); } //-------------------------------------------------------------- var months = date2_UTC.getMonth() - date1_UTC.getMonth(); if (months &lt; 0) { date2_UTC.setFullYear(date2_UTC.getFullYear() - 1); months += 12; } //-------------------------------------------------------------- var years = date2_UTC.getFullYear() - date1_UTC.getFullYear(); if (years &gt; 1) yAppendix = " years"; else yAppendix = " year"; if (months &gt; 1) mAppendix = " months"; else mAppendix = " month"; if (days &gt; 1) dAppendix = " days"; else dAppendix = " day"; return years + yAppendix + ", " + months + mAppendix + ", and " + days + dAppendix + " old."; } function DaysInMonth(date2_UTC) { var monthStart = new Date(date2_UTC.getFullYear(), date2_UTC.getMonth(), 1); var monthEnd = new Date(date2_UTC.getFullYear(), date2_UTC.getMonth() + 1, 1); var monthLength = (monthEnd - monthStart) / (1000 * 60 * 60 * 24); return monthLength; } console.log(getAge(new Date(1978, 11, 22), new Date())); console.log(getAge(new Date(1990, 2, 14), new Date())); console.log(getAge(new Date(1963, 2, 3), new …
accepted answer of: http://stackoverflow.com/q/26159269
has comment: http://stackoverflow.com/comment/139193826
type: Answer
has comment: http://stackoverflow.com/comment/73709659
answers question: http://stackoverflow.com/q/26159269
has comment: http://stackoverflow.com/comment/88113408
upvote count: 12
downvote count: 0
has comment: http://stackoverflow.com/comment/58097081

http://stackoverflow.com/comment/41011313
has text: @Quentin What about this? http://jsfiddle.net/3BRN7/380/
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26160352
type: QuestionComment

http://stackoverflow.com/a/26101024
has body: You can try run-sequence: var runSequence = require('run-sequence'); gulp.task('mytask', function(cb) { runSequence( ['parallel1', 'parallel2'], 'seq1', 'seq2', cb ); }); If you want something more related to your gulpfile, you should include it to your question.
downvote count: 0
has comment: http://stackoverflow.com/comment/40910128
type: Answer
has comment: http://stackoverflow.com/comment/40975963
score: 7
upvote count: 7
answers question: http://stackoverflow.com/q/26100666

http://stackoverflow.com/q/26127021
has comment: http://stackoverflow.com/comment/40953497
type: Question
downvote count: 0
has body: Are there significant differences between using d3.text(filepath, "text/csv", function) and d3.csv? Are these equivalent or is one faster than the other?
tagged with: javascript
favorite count: 0
answer count: 0
upvote count: 2
tagged with: d3.js
type: UnansweredQuestion
score: 2
tagged with: performance
has title: d3.csv versus d3.text performance

http://stackoverflow.com/comment/41050574
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26177140
has text: @Gimby Oh god, no! No one wants to circumvent anything. The question is how to forecast this possible security fails. Silly speaking: `if ( stylesheet == "restricted" ) { don't ask for this stylesheet; } else { doTheRoutines(); }`. Because now just asking for the stylesheet causes the WHOLE script to fail.

http://stackoverflow.com/a/26048221
score: 1
answers question: http://stackoverflow.com/q/26047892
downvote count: 0
type: Answer
has body: You shouldn't care about who created the UUID. The server should only check if the UUID sent by the client respects the UUID format and perhaps check if somehow the same UUID was used already (this depends on your needs). That is unless your UUID value is used as a secret (e.g. an activation number). In this case, the value shouldn't be generated client-side and the server should keep track of the values it generated.
upvote count: 1

http://stackoverflow.com/comment/117421159
has text: Replace the two ifs in the "general solution" with regex escape for it to safely support multiple characters: `c = c.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&')`
type: Comment
comment on: http://stackoverflow.com/a/32516190
score: 1
type: AnswerComment

http://stackoverflow.com/q/26156801
has answer: http://stackoverflow.com/a/26156873
has answer: http://stackoverflow.com/a/26156876
has comment: http://stackoverflow.com/comment/41005141
type: Question
score: 3
has body: I was playing around with cookies and stuff, until I noticed a website saying that you can easily set cookies via the navigation bar with one simple code; javascript: document.cookie="SESSID=IDOFSESSIONHERE;path=/" while doing this, I could login on one computer, copy the cookie data to another computer, and set the same cookie via this code, after a refresh I was logged in with the same user. (just on a simple webpage I made myselve) this seems like a security issue to me, I mean, ofcourse they would first need to get the cookie data, but without that, I imagine that you could do alot of damage with the javascript: from the cookies aside. Is there any way to prevent the usage of javascript: from the navigation bar?
has answer: http://stackoverflow.com/a/26156867
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26156867
has comment: http://stackoverflow.com/comment/41012808
downvote count: 1
has comment: http://stackoverflow.com/comment/41005080
has comment: http://stackoverflow.com/comment/41005355
linked to: http://stackoverflow.com/q/3939773
favorite count: 0
has title: preventing javascript injections from navigation bar
upvote count: 4
has answer: http://stackoverflow.com/a/26156857
has comment: http://stackoverflow.com/comment/41005239
answer count: 4
accepted answer: http://stackoverflow.com/a/26156857
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41005238

http://stackoverflow.com/q/26093266
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26093378
score: 0
answer count: 3
has title: A short way of cheking multiple blank text fields jQuery
has answer: http://stackoverflow.com/a/26093288
type: AnsweredQuestion
has body: I need to check if there are blank input text fields in my &lt; form >. Instead of doing this multiple times $.trim($('#myMessage').val()) == '' || $.trim($('#myage').val()) == '' .//so on... What is the best way to check multiple blank text fields?
accepted answer: http://stackoverflow.com/a/26093288
possible better answer: http://stackoverflow.com/a/26093357
type: Question
has answer: http://stackoverflow.com/a/26093357

http://stackoverflow.com/a/26146527
answers question: http://stackoverflow.com/q/26146478
score: 0
has body: You forgot to wrap style value in ' or ", try this:
type: Answer

http://stackoverflow.com/comment/40850664
has text: Well, event is the way browser notify all parent elements that something happens. When you click somewhere inside `table` (our case) table is _see_ that and trigger callback that receives `event` object with all required information about what happens as first argument. You can find more technical info at MDN here https://developer.mozilla.org/en-US/docs/Web/API/Event (i'm personally recommend this resource).
type: AnswerComment
comment on: http://stackoverflow.com/a/26072365
type: Comment
score: 1

http://stackoverflow.com/comment/41056460
comment on: http://stackoverflow.com/a/26184006
type: AnswerComment
type: Comment
score: 1
has text: +1 @Karl-AndréGagnon you're quite right. I figured it out and updated my answer -- `.get()` not required when using the `$.map()` version. Thanks.

http://stackoverflow.com/comment/40979196
score: 0
type: Comment
type: QuestionComment
has text: You can't just concat an array to a string. You have to create a string from it in anyway.
comment on: http://stackoverflow.com/q/26143169

http://stackoverflow.com/comment/40981115
has text: Using the same method you could generate a _HTML_ page :)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26143887
type: AnswerComment

http://stackoverflow.com/a/46936821
downvote count: 0
score: 1
has body: Plenty of right answers, but technically the OP just asked about negating. You can also use reject, it's essentially the opposite of filter. To achieve the compound condition of 1611 and not Shakespeare: _.reject(_.filter(listOfPlays, function(play){ return play.year === 1611 }), function(play) { return play.author === 'Shakespeare'; });
answers question: http://stackoverflow.com/q/26143852
upvote count: 1
type: Answer

http://stackoverflow.com/q/26174403
has comment: http://stackoverflow.com/comment/41037624
has comment: http://stackoverflow.com/comment/41037877
type: Question
has comment: http://stackoverflow.com/comment/41037741
tagged with: javascript
has comment: http://stackoverflow.com/comment/41037922
score: 0
has comment: http://stackoverflow.com/comment/41037827
has comment: http://stackoverflow.com/comment/41037498
type: UnansweredQuestion
has title: Values in MySQL table are not getting updated
tagged with: php
has comment: http://stackoverflow.com/comment/41037996
answer count: 0
has comment: http://stackoverflow.com/comment/41037796
tagged with: mysql
has body: Here is the javascript code I have placed script links at end Now twoupdate.php has following code <?php session_start(); if (!$_SESSION['login']){ header('Location: index.php'); } function updatepoints() { mysql_connect("localhost","user","password") or die (mysql_error()); mysql_select_db("database") or die ("Cannot connect to database"); $query = mysql_query("SELECT *from member WHERE username='" . $_SESSION["username"] . "'"); $row=mysql_fetch_array($query); $points = $row["points"]; $points = $points + 2; mysql_query("UPDATE member set points='" . $points . "' WHERE username='" . $_SESSION["username"] . "'"); } if($_POST['action_type'] == 'update') { updatepoints(); } ?> The code for two class is like this Facebook(Mobile user) When user clicks on this link his points need to be updated.However, after I click on the link and open it in a new tab.If I refresh my original pageI don't see updated points. The point value is set at 100. This was the default value that I had set in MySQL table. Why is the table not updating.

http://stackoverflow.com/a/26060784
has body: Don't use while loop. You should do it in an asynchoronous way: At the end of .done function, put another asynchronous ajax call. // other stuff goes here function doRequest() { $.ajax({url: 'http://example.com'}) .done(function(data, textStatus, jqXHR) { $('#textarea').html($('#textarea').val()+someresult+'\n'); if (inProgress) doRequest(); }); } $("#start").click(function() { inProgress = true; $('#textarea').html($('#textarea').val()+sometext+'\n'); doRequest(); });
accepted answer of: http://stackoverflow.com/q/26060706
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26060706
upvote count: 1
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/30770652
upvote count: 2
downvote count: 1
has body: For the users who are using Edge version of Jasmine: it('Should spy on Date', function() { var oldDate = Date; // and.callFake spyOn(window, 'Date').and.callFake(function() { return new oldDate(); }); var d = new Date().toISOString; expect(window.Date).toHaveBeenCalled(); });
score: 1
answers question: http://stackoverflow.com/q/26152796
type: Answer

http://stackoverflow.com/comment/41010653
has text: Yeah u are right, they were not there, when i started typing my answer. For me that is no reason to vote something down! I am sorry, but i didn't see it while giving my answer...
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26160185

http://stackoverflow.com/q/26053642
answer count: 2
has body: I have the below HTML and then the JS below that with my service and controller: Account Account Sign Up Sign In The ng-hide works properly, however, the ng-show does not. Auth.is_authenticated() .success(function(data) { $scope.is_authenticated = data.authenticated; }); Service: return { is_authenticated: function() { return $http.get('/api/users/is_authenticated'); }, When I go to the API endpoint in the URL it returns `{"authenticated": true} What is this happening? Edit: When I view the source in the developer tools it seems like for some reason the HTML with for ng-show is not even there. Should this be true?
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26054375
has title: Angular ng-show not working properly
has comment: http://stackoverflow.com/comment/40816221
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
has answer: http://stackoverflow.com/a/26054208

http://stackoverflow.com/a/26065515
has comment: http://stackoverflow.com/comment/40838024
has comment: http://stackoverflow.com/comment/40837936
score: -2
accepted answer of: http://stackoverflow.com/q/26065456
answers question: http://stackoverflow.com/q/26065456
has body: EDIT: You can also use .toFixed(n) see Answer below Greetings,...
upvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40838854
type: Answer
has comment: http://stackoverflow.com/comment/40840606
downvote count: 2

http://stackoverflow.com/a/39562493
type: Answer
has body: If you send any non-200 response header Dropzone will detect it as an error and fire the error(file, response) event. The error info can go in as JSON and is accessible via response.your_msg_variable Note that just printing response won't show anything useful as it's an object, you can use console.log(JSON.stringify(responseText, null, 4)); This will pretty print the object upto 4 levels down
upvote count: 2
answers question: http://stackoverflow.com/q/26085272
score: 2
downvote count: 0

http://stackoverflow.com/q/26087979
tagged with: arrays
answer count: 1
has comment: http://stackoverflow.com/comment/40878860
has title: Array to javascript string
tagged with: php
accepted answer: http://stackoverflow.com/a/26088030
type: AnsweredQuestion
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26088030
has body: So I have this string: [{values: {"US" : "rgba(29, 79, 207, 1)"}},{values: {"NL" : "rgba(29, 79, 207, 1)"}}] This string sets colours for jvectormap. the entire reason for this function, I will only show countries that visited. It's from Javascript, and I need to use this same format but in PHP and I think it has something to do with json encode but I can't get it to work.. So what I want to do is make an array into this string.. How would I do that? When I make an array in PHP and encode it to json, this comes out: [["NL","black"],["US","blue"]] and this format wont work of course.
score: 0

http://stackoverflow.com/comment/40999801
has text: Cheery fiddle was really helpful. Sebastian I must have been playing with fiddle while you were trying it. I am a little new to it. My bad.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26133454
score: 0

http://stackoverflow.com/q/26143082
has answer: http://stackoverflow.com/a/26143121
has body: I need to find all the path elements in the drawn SVG with an attribute marker-end. I tried: $('path').attr("marker-end") // Returns undefined $('path').prop("marker-end") // Returns undefined Update Also path element not having the given attribute. Update 2 ok, got $('path:not([marker-end])')
score: -1
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26143121
linked to: http://stackoverflow.com/q/9210073
downvote count: 1
has title: Find all elements having attribute
type: Question
duplicate of: http://stackoverflow.com/q/9210073
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40979257
answer count: 1

http://stackoverflow.com/a/26043827
has comment: http://stackoverflow.com/comment/40827093
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/40798421
answers question: http://stackoverflow.com/q/26036776
has comment: http://stackoverflow.com/comment/40800175
downvote count: 0
has comment: http://stackoverflow.com/comment/40828456
has comment: http://stackoverflow.com/comment/40827972
has body: On one of my projects i use this code to remember the last scrolled position on a page. Demo (just scroll on the list, got to page 2 and come back) http://jsfiddle.net/ukzuvtyh/ Jquery code for remmebring last position var storePosition = { /// initializing the storeposition topCoordinate : null } storePosition.topCoordinate = $(this).offset().top; /// storing the position if(storePosition.topCoordinate !== 0) { // if we are at the top no point doing anything $("html, body").animate({"scrollTop": storePosition.topCoordinate}, 500); } If you see that on some pages when you go back the scroll to the last position is off by some pixels subtract or add to get the exact position. It will be ok after that. You will need to judge a little before the right amount. - 60 indigates 60 pixels minus on the scroll. I had this issue, don't know why so its a fix $("html, body").animate({"scrollTop": storePosition.topCoordinate - 60}, 500);
type: Answer
has comment: http://stackoverflow.com/comment/40821707

http://stackoverflow.com/q/26079043
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26123202
has answer: http://stackoverflow.com/a/26123443
tagged with: azure
possible better answer: http://stackoverflow.com/a/26123443
has body: I have been trying to achieve this myself for 3 days now and combined with my knowledge and searching have come up blank! Just edited and change the question to be a bit more "generic" but lead me to a solution. Using the azure mobile services scheduler, JavaScript, I want to increment a value for each record in a table. Basically run "turns++" on the table, up to a maximum of a certain amount. Is there a way to run a native SQL command in the azure scheduler? For Example: Connect to the database and run "SELECT * FROM tableName" as this will let me run the increment that I need. Alternatively is there a way, which I'm assuming more complicated, to run "for each" on records from the table and then update them with a field incremented? Thanks in advance!
favorite count: 0
accepted answer: http://stackoverflow.com/a/26123202
upvote count: 1
downvote count: 1
has title: Run Native SQL Command in Azure Scheduler
type: AnsweredQuestion
score: 0

http://stackoverflow.com/comment/41005532
has text: Sure, shame on me I didn't post it before.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26124515

http://stackoverflow.com/comment/41293607
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26302232
has text: Thank you for your help. I am trying with outside JSON. How can I use json file to load in this? can we use d3.json for this? I need to show the names of the values in td. For this I used some modifications in the above code but I couldn't get the datas. please check my question. I updated it. Also can I show only two table heads? I want to show only Florida and New-York only and not Tennessee.
type: Comment

http://stackoverflow.com/comment/40963874
has text: Thank you Andreas for the edits, I have been looking at this screen for 12+ hours...
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26134803
type: QuestionComment

http://stackoverflow.com/comment/40882056
type: Comment
type: QuestionComment
score: 0
has text: possible duplicate of [jQuery - Variable Increment +1](http://stackoverflow.com/questions/26089185/jquery-variable-increment-1)
comment on: http://stackoverflow.com/q/26089607

http://stackoverflow.com/q/26124469
has answer: http://stackoverflow.com/a/26124647
has comment: http://stackoverflow.com/comment/40945107
tagged with: javascript
has comment: http://stackoverflow.com/comment/40945042
has title: Javascript onKey event && operater
favorite count: 0
accepted answer: http://stackoverflow.com/a/26124647
upvote count: 2
possible better answer: http://stackoverflow.com/a/26124872
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/7837456
has answer: http://stackoverflow.com/a/26124872
score: -1
has comment: http://stackoverflow.com/comment/40945072
type: AnsweredQuestion
has body: document.onkeyup = function(event){ var key_press = String.fromCharCode(event.keyCode); var status = document.getElementById('status'); status.innerHTML = "UP Event Fired For : "+key_press; if (key_press == "38") { &amp;&amp; } if (key_press == "39") { &amp;&amp; } else if (key_press == "40") { &amp;&amp; } else if (key_press == "37") { alert ("First born beauty"); } }); } Hello, I try to make the purpose of this code to action event/popup when arrow keys have been pressed in the right order (left>up>right>down) important that it is body that listens. :) http://jsfiddle.net/50hup6y1/7/
downvote count: 3
has comment: http://stackoverflow.com/comment/40945146
has comment: http://stackoverflow.com/comment/40944880
has comment: http://stackoverflow.com/comment/40945101
type: Question
has comment: http://stackoverflow.com/comment/40945069
answer count: 2

http://stackoverflow.com/comment/41004643
has text: Uhm.. but I'm not sure I want a separate collection. Does it change something? Or is it just a logical matter?
type: Comment
comment on: http://stackoverflow.com/a/26156773
score: 0
type: AnswerComment

http://stackoverflow.com/a/26142379
upvote count: 3
type: Answer
has body: You're including the range A-z, which includes all uppercase letters, all lowercase letters, and the characters in between those - including ^. Selecting just the alphabet will do the job: function validateInputFields(f) { !(/^[A-Z ,.'-]+$/i).test(f.value) ? f.value = f.value.replace(/[^A-Z,.'-]/ig, '') : null; }
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26142148

http://stackoverflow.com/comment/40914600
comment on: http://stackoverflow.com/q/26107249
has text: @Barmar - Good eyes, following it back I see how the `friends` array is built now, it's still not very easy to follow, and why suddenly use Underscore ?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26109314
has comment: http://stackoverflow.com/comment/40920099
has comment: http://stackoverflow.com/comment/40917950
tagged with: cross-browser
tagged with: serialization
accepted answer: http://stackoverflow.com/a/26110680
upvote count: 2
has comment: http://stackoverflow.com/comment/40917968
has title: Will serialized object contain the same json content when serialized again (the crossbrowser case)
has comment: http://stackoverflow.com/comment/40917930
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40918272
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40918822
type: Question
has comment: http://stackoverflow.com/comment/40917948
has answer: http://stackoverflow.com/a/26110680
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40917913
favorite count: 0
has comment: http://stackoverflow.com/comment/40918258
has comment: http://stackoverflow.com/comment/40917848
has body: I need to perform deep object comparisons between source and target object that are pretty specific to my usage and are complex too. But I can simplify things if it was possible to compare object's json representations. I mean if it was guaranteed that the order of properties is preserved after serialization. In other words by having two objects: { a: "a", b: "b" } and { b: "b", a: "a" } which have the same content but whose json representations are different. There are two cases that can be described by the following code snippets: The first one: var json = '{"a":"a","b":"b"}'; var x = JSON.parse(json); var y = JSON.parse(json); var comparison = JSON.stringify(x) === JSON.stringify(y); // will it always be true? The second one: var json = '{"a":"a","b":"b"}'; var x = JSON.parse(json); var y = JSON.parse(json); delete y.a; delete y.b; y.b = "b"; // Notice the order is changed y.a = "a"; // Notice the order is changed var comparison = JSON.stringify(x) === JSON.stringify(y); // will it always be true? The questions: Will both cases be always true for all browsers? Are there any other scenarios that can make JSON.stringify(x) !== JSON.stringify(y) Is there a way to achieve previously described guarantee via implementing own serialization technique (like for example sorting properties before serializing) That's it, thanks!

http://stackoverflow.com/a/26142131
upvote count: 2
downvote count: 1
has comment: http://stackoverflow.com/comment/40977264
has body: You can create a function for this. Something like: function ListObjectsOfType(type) { var result = []; for( var w in window ) { var val = window[w]; if( val instanceof type ) result.push(val); } return result; } If you invoke this from the Chrome Console, you can plainly inspect/collapse the resulting objects. You can extend it to traverse all window vars (you'll want to skip the defaults though). I think by definition it is impossible to inspect e.g. the following: function SomeObj() { var b = new Kitten('kitty'); } new SomeObj(); I expect the memory heap to have this obj, but it will not be available/detectable via JS ever.
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/40977412
answers question: http://stackoverflow.com/q/26141991

http://stackoverflow.com/q/26155751
type: UnansweredQuestion
has body: I have a code that deals with azimutal operations. I'd like to distinguish if the azimuth is near 0,100,200,300,400 or 0, PI/2, PI, PI*(3/2), 2*PI, (N, E, S, W). The most of cases I'm going to receive an angle that is not in this range so I'd need the fastest way to discard I have these values. I want to do this to have control on line equations for pure horizontal or vertical azimuths. Of course I'm going to use epsilon approach. So I'd have: if Math.abs(azi)&lt; 0.0000001 ... else if Math.abs(azi-100)&lt; 0.0000001 ... else Math.abs(azi-200)&lt; 0.0000001 ... else Math.abs(azi-300)&lt; 0.0000001 ... else Math.abs(azi-400)&lt; 0.0000001 ... else other As you can see I have to check 5 conditions to check I have 'other' value. By other hand, you know that sin(N) =0, sin(S) = 0 and cos(E)=0 and cos(W) =0, so: if Math.abs(Math.cos(azi) ) &lt; 0.0000001 ... else if Math.abs(Math.sin(azi) ) &lt; 0.0000001 ... else other Now I have two conditions with a math trigonometric operation vs 5 simple aritmetic operations. As you can see at jsperf, arithmetic is faster. jsperf angle check My question is: is there any other fast way to do this?
type: Question
has answer: http://stackoverflow.com/a/26155888
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41003135
answer count: 1
has title: Fastest code to know if an angle could be North, South;west or East

http://stackoverflow.com/comment/40928577
comment on: http://stackoverflow.com/a/26115272
type: AnswerComment
score: 0
has text: Haha, that was in my answer below :D
type: Comment

http://stackoverflow.com/comment/40903231
has text: Thanks Adam, would you know any way to do this in spring-mvc?
comment on: http://stackoverflow.com/q/26101420
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26192072
has comment: http://stackoverflow.com/comment/41070158
has title: getting the id of the clicked element using javascript
has comment: http://stackoverflow.com/comment/41070416
has body: window.onload = function () { boxElement = document.getElementById('button1_id'), boxMove = document.getElementById('button2_id'); if (boxElement) { boxElement.addEventListener('click', function () { var boxLeftPos = boxMove.offsetLeft, rightper = boxMove.offsetRight; if (boxLeftPos &gt; 0) { direction = (boxMove.offsetWidth - 50)*-1; boxMove.style.left = (direction) + 'px'; } if (boxLeftPos &lt; 1) { direction = 10; boxMove.style.right = (rightper) + '%'; boxMove.style.left = ''; } }); } }; I would like to fetch a button id of the clicked button and use it further on in the code, so instead of the naming the id´s boxElement = document.getElementById('button1_id'), boxMove = document.getElementById('button2_id'); i would like to get them with the js.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26192122
has comment: http://stackoverflow.com/comment/41070446
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41070093
tagged with: javascript
has answer: http://stackoverflow.com/a/26192176
tagged with: jquery
score: 0

filtering
tags question: http://stackoverflow.com/q/26105898
tag name: filtering
tags question: http://stackoverflow.com/q/26118497
type: Tag
tags question: http://stackoverflow.com/q/26060036

http://stackoverflow.com/comment/40802240
type: QuestionComment
comment on: http://stackoverflow.com/q/26046071
score: 0
has text: @Rodrigo - Yes, I have changed the port from 80 to 8080 in the server.js. Sorry I have forgot to mention that. You were right regarding the URL: http://localhost:8080/api/players works. Thanks!
type: Comment

http://stackoverflow.com/comment/40948138
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26125245
has text: I don't quite understand. Are you saying to bind the validation to the model and then check to make sure the model is formatted correctly? How does it know where to attribute the error in the DOM to?

http://stackoverflow.com/q/26036023
has answer: http://stackoverflow.com/a/26036099
answer count: 3
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/26036106
has answer: http://stackoverflow.com/a/26036199
accepted answer: http://stackoverflow.com/a/26036099
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26036106
has title: How to get all different dropdown have selected value or not
type: Question
has body: I want to check that all dropdown on page have select value or not? fox Ex:- --- abc xyz --- abc xyz Both are not same page and and issue there is dynamic id and name are assign to both of dropdrop down so i can't use jQuery by id or name and get selected value, not i want to check that both have selected value by Javascript or jQuery? How can I do this? Regards, Vinit
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26081550
has comment: http://stackoverflow.com/comment/40867435
has comment: http://stackoverflow.com/comment/40867775
has comment: http://stackoverflow.com/comment/40867704
has comment: http://stackoverflow.com/comment/40867509
has comment: http://stackoverflow.com/comment/40867588
has comment: http://stackoverflow.com/comment/40867727
upvote count: 1
has comment: http://stackoverflow.com/comment/40867917
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26081432
has comment: http://stackoverflow.com/comment/40867878
has comment: http://stackoverflow.com/comment/40867492
has comment: http://stackoverflow.com/comment/40868020
has comment: http://stackoverflow.com/comment/40867752
answers question: http://stackoverflow.com/q/26081432
type: Answer
has comment: http://stackoverflow.com/comment/40867637
has body: You just use the completion handler from the third animation: $(function () { // DOCUMENT ready shorthand var imgs = ["src1.jpg", "src2.jpg", "src3.jpg", "src4.jpg"]; var cntr = 0; function polariodSlideshow() { $("#polaroid").animate({ opacity: 1, top: 80 }, 1500); $("#polaroid").animate({ opacity: 0, top: 250 }, 1800); $("#polaroid").animate({ opacity: 0, top: 0 }, 1900, function() { // change the image here var newImg = imgs[cntr % imgs.length]; ++cntr; // use newImg here // then kick off the next iteration polariodSlideshow(); }); } polariodSlideshow(); }); If the new image .src is not already cached, then you may also need to add code that waits for it to load or better yet, make sure it's precached so that isn't an issue.
downvote count: 0
has comment: http://stackoverflow.com/comment/40867414
score: 1
has comment: http://stackoverflow.com/comment/40867987

http://stackoverflow.com/comment/40856676
comment on: http://stackoverflow.com/a/26075828
has text: The above function tries to move an element. Put your own logic to play with your situation. I posted here to move an element from its current position. You can implement it your way to satishfy your needs.
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/44849755
comment on: http://stackoverflow.com/a/26174582
type: Comment
has text: @CaptainStack `var` is for declaring non-global variables. If `x` hasn't been declared in the current function, `var x = 0` makes a new variable local to the current function, whereas `x = 0` sets the global value of `x`, creating a new variable if necessary. Best practice is to make variables local (with `var`) unless they *need* to be global.
score: 0
type: AnswerComment

angularjs-directive
tags question: http://stackoverflow.com/q/26106816
tags question: http://stackoverflow.com/q/26059172
tag name: angularjs-directive
tags question: http://stackoverflow.com/q/26123493
tags question: http://stackoverflow.com/q/26179431
tags question: http://stackoverflow.com/q/26151591
tags question: http://stackoverflow.com/q/26186007
tags question: http://stackoverflow.com/q/26043620
tags question: http://stackoverflow.com/q/26185845
tags question: http://stackoverflow.com/q/26045410
tags question: http://stackoverflow.com/q/26175486
tags question: http://stackoverflow.com/q/26056620
tags question: http://stackoverflow.com/q/26177004
tags question: http://stackoverflow.com/q/26113402
tags question: http://stackoverflow.com/q/26136363
tags question: http://stackoverflow.com/q/26117304
tags question: http://stackoverflow.com/q/26057077
tags question: http://stackoverflow.com/q/26179273
tags question: http://stackoverflow.com/q/26109567
tags question: http://stackoverflow.com/q/26097842
tags question: http://stackoverflow.com/q/26123803
type: Tag
tags question: http://stackoverflow.com/q/26080340
tags question: http://stackoverflow.com/q/26056689
tags question: http://stackoverflow.com/q/26169188
tags question: http://stackoverflow.com/q/26043803
tags question: http://stackoverflow.com/q/26052766
tags question: http://stackoverflow.com/q/26162826
tags question: http://stackoverflow.com/q/26177032
tags question: http://stackoverflow.com/q/26135898
tags question: http://stackoverflow.com/q/26157447
tags question: http://stackoverflow.com/q/26120408
tags question: http://stackoverflow.com/q/26119465
tags question: http://stackoverflow.com/q/26146881
tags question: http://stackoverflow.com/q/26081885

http://stackoverflow.com/a/26068399
answers question: http://stackoverflow.com/q/26068322
has comment: http://stackoverflow.com/comment/40913214
has body: As @j08691 said, you have to mark the field readonly: &lt;input type="text" readonly name="AnnualizingFactor" /&gt; Or set the readonly property of the input programmatically: function Init() { var selectionValue = document.all.AnnualizingFactor; selectionValue.readonly = true; register(); if (selectionValue.value == "") { OnChange(); } }
score: 0
has comment: http://stackoverflow.com/comment/40906657
type: Answer

c#
tags question: http://stackoverflow.com/q/26059834
tags question: http://stackoverflow.com/q/26065021
tags question: http://stackoverflow.com/q/26114732
tags question: http://stackoverflow.com/q/26156397
tags question: http://stackoverflow.com/q/26175518
tags question: http://stackoverflow.com/q/26157487
tags question: http://stackoverflow.com/q/26138284
tags question: http://stackoverflow.com/q/26065183
tags question: http://stackoverflow.com/q/26159073
tags question: http://stackoverflow.com/q/26187029
tags question: http://stackoverflow.com/q/26177561
tag name: c#
tags question: http://stackoverflow.com/q/26084594
tags question: http://stackoverflow.com/q/26118347
tags question: http://stackoverflow.com/q/26162732
tags question: http://stackoverflow.com/q/26054570
tags question: http://stackoverflow.com/q/26126206
tags question: http://stackoverflow.com/q/26036920
tags question: http://stackoverflow.com/q/26091088
tags question: http://stackoverflow.com/q/26106053
tags question: http://stackoverflow.com/q/26166065
tags question: http://stackoverflow.com/q/26087087
tags question: http://stackoverflow.com/q/26115402
tags question: http://stackoverflow.com/q/26176831
tags question: http://stackoverflow.com/q/26076823
tags question: http://stackoverflow.com/q/26075685
tags question: http://stackoverflow.com/q/26070783
tags question: http://stackoverflow.com/q/26064621
tags question: http://stackoverflow.com/q/26104952
tags question: http://stackoverflow.com/q/26104351
tags question: http://stackoverflow.com/q/26094321
tags question: http://stackoverflow.com/q/26140940
tags question: http://stackoverflow.com/q/26055801
tags question: http://stackoverflow.com/q/26079049
tags question: http://stackoverflow.com/q/26170308
tags question: http://stackoverflow.com/q/26113595
tags question: http://stackoverflow.com/q/26176077
tags question: http://stackoverflow.com/q/26049702
tags question: http://stackoverflow.com/q/26154596
tags question: http://stackoverflow.com/q/26125111
tags question: http://stackoverflow.com/q/26047206
tags question: http://stackoverflow.com/q/26165821
tags question: http://stackoverflow.com/q/26172723
tags question: http://stackoverflow.com/q/26072699
tags question: http://stackoverflow.com/q/26176741
tags question: http://stackoverflow.com/q/26051927
tags question: http://stackoverflow.com/q/26050659
tags question: http://stackoverflow.com/q/26185273
type: Tag
tags question: http://stackoverflow.com/q/26175348
tags question: http://stackoverflow.com/q/26142426
tags question: http://stackoverflow.com/q/26136885
tags question: http://stackoverflow.com/q/26181779
tags question: http://stackoverflow.com/q/26059329
tags question: http://stackoverflow.com/q/26159884
tags question: http://stackoverflow.com/q/26058766
tags question: http://stackoverflow.com/q/26100527
tags question: http://stackoverflow.com/q/26167489
tags question: http://stackoverflow.com/q/26112233
tags question: http://stackoverflow.com/q/26121276
tags question: http://stackoverflow.com/q/26089320
tags question: http://stackoverflow.com/q/26065319
tags question: http://stackoverflow.com/q/26067743
tags question: http://stackoverflow.com/q/26039968
tags question: http://stackoverflow.com/q/26047094
tags question: http://stackoverflow.com/q/26138447

http://stackoverflow.com/a/26181875
score: 1
has body: Your router returns 404 because it can't recognize the path. You should either encode the url param as suggested in the comments, or slice it further, as: .get('/api/site/:domain/: file', cb) The trouble there is that if you also pass the protocol, you have to match even that. Don't have a console to try now, but I think you might be able to pass a wildcard: '/api/sitemap/*' You would have to parse out the url on your own then, but it's simple: var url = req.url.substr(14); (Not sure if it's 13 or14 on the index there, counting on hands since I'm on my mobile :-)).
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26164668
answers question: http://stackoverflow.com/q/26164668
type: Answer
upvote count: 1

http://stackoverflow.com/a/26055738
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26052594
type: Answer
answers question: http://stackoverflow.com/q/26052594
upvote count: 1
has body: You can use classList object instead setAttribute. https://developer.mozilla.org/en-US/docs/Web/API/Element.classList Then wrap everything inside another div, this should e pretty easy, try this code tableAdd: function(entry) { var $tr = document.createElement('div'), $wrap = document.createElement('div'), $td, key; $tr.setAttribute("class", "mylist_zeile clearfix"); $wrap.setAttribute("class", "mylist_wrapper"); var count = 0; for (key in entry) { if (entry.hasOwnProperty(key)) { count++; $td = document.createElement("div"); $td.appendChild(document.createTextNode(entry[key])); $td.classList.add("mylist_spalte"); $td.classList.add("row_"+count); $wrap.appendChild($td); } } $tr.appendChild($wrap); $td = document.createElement("span"); $td.setAttribute("class", "mylist_remove"); $td.innerHTML = 'X'; $tr.appendChild($td); $tr.setAttribute("id", "entry-"+ entry.id); mylist.$table.appendChild($tr); }

http://stackoverflow.com/comment/40928297
has text: You should take a look at [querySelector](https://developer.mozilla.org/en-US/Add-ons/Code_snippets/QuerySelector)
score: 0
comment on: http://stackoverflow.com/q/26115412
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41209044
has text: Can you create a jsfiddle to demo this problem?
type: Comment
comment on: http://stackoverflow.com/q/26074431
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41009471
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26159234
has text: What part isn't understood exactly? I just want a DIV to open in the center of the page and on every click anywhere it will close. In the most simple way in the world :)
type: Comment

http://stackoverflow.com/q/26064777
type: UnansweredQuestion
tagged with: checkbox
downvote count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/14220321
type: Question
has body: I'm trying to load in a html a JSON file with a editable form but without sucess. This is the form (JSON file - CompleteForm2014.json) {"type":"Design","zone":null,"children":[{"type":"Page","properties":{"id":"page1"},"children":[{"type":"Content","zone":"content","children":[{"type":"CheckboxGroup","children":[{"type":"Checkbox","properties":{"id":"checkbox1"}},{"type":"Checkbox","properties":{"id":"checkbox2"}},{"type":"Checkbox","properties":{"id":"checkbox3"}}]},{"type":"CheckboxGroup","children":[{"type":"Checkbox","properties":{"id":"checkbox4"}},{"type":"Checkbox","properties":{"id":"checkbox5"}},{"type":"Checkbox","properties":{"id":"checkbox6"}}]}]}]}],"pInfo":{"name":"CompleteForm2014","theme":"Default","accessDate":1404304220520,"device":{"name":"Phones","screenWidth":320,"screenHeight":480,"rotating":false}}} and this is my HTML file that is supose to load the JSON: title Any one can help me ?..i just see a blank page and i wanto to see six checkbox that is a form...
has comment: http://stackoverflow.com/comment/40836762
duplicate of: http://stackoverflow.com/q/14220321
upvote count: 1
has comment: http://stackoverflow.com/comment/40838122
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40836694
has comment: http://stackoverflow.com/comment/40836969
has comment: http://stackoverflow.com/comment/40837155
favorite count: 0
has comment: http://stackoverflow.com/comment/40863368
has title: Loading a JSON editable Form
answer count: 0

http://stackoverflow.com/q/26086275
has body: I have a page which contains a textarea. The user will input mathML inside it and when the user clicks on the output button, MathML should be rendered and displayed below the textarea. But rendering is not happening. Textarea may contain more than one mathml codes for rendering. Below is the code I have used. MathML Previewer Paste your MathML: Reset Click the button to get output Output
has answer: http://stackoverflow.com/a/26088701
score: 3
tagged with: http://stackoverflow.com/tag/html
has title: MathML is not rendered and displayed below the textarea
favorite count: 0
has comment: http://stackoverflow.com/comment/40875902
accepted answer: http://stackoverflow.com/a/26088701
tagged with: mathjax
type: AnsweredQuestion
upvote count: 3
tagged with: mathml
has comment: http://stackoverflow.com/comment/40875597
type: Question
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40877409
tagged with: javascript

http://stackoverflow.com/comment/40993650
type: AnswerComment
comment on: http://stackoverflow.com/a/26146904
type: Comment
score: 0
has text: Hmm, so I think I'm confused about the setup. You have your own react component outside of gmail's ui, but you're inserting another react component into gmail's ui, right?

http://stackoverflow.com/comment/40868634
score: 0
type: Comment
type: QuestionComment
has text: It is for a particular type of binding framework I am playing with. I'm quite sure this is not possible, unless I want to hack a JS parser.
comment on: http://stackoverflow.com/q/26052415

http://stackoverflow.com/a/26118004
has comment: http://stackoverflow.com/comment/40962908
type: Answer
has body: Example: $("#simple").dialog( { autoOpen: false, open: function() { $("#withIframe").dialog( "moveToTop" ); }, focus: function( event, ui ) { $("#withIframe").dialog( "moveToTop" ); } }); $("#withIframe").dialog( { autoOpen: false, open: function(ev, ui){ $('#if').attr('src','http://www.jQuery.com'); $(this).dialog( "moveToTop" ); } }); $(".link").click(function() { $("#simple").dialog('option','modal',$('#isModal').prop('checked')).dialog( "open" ); }); $(".link_iframe").click(function() { $("#withIframe").dialog( "open" ); }); Is Modal? link link (iframe) Simple dialog
has comment: http://stackoverflow.com/comment/40965856
has comment: http://stackoverflow.com/comment/40941005
has comment: http://stackoverflow.com/comment/40936935
has comment: http://stackoverflow.com/comment/40963362
has comment: http://stackoverflow.com/comment/40962843
has comment: http://stackoverflow.com/comment/40940887
has comment: http://stackoverflow.com/comment/40969948
has comment: http://stackoverflow.com/comment/40939624
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40940125
has comment: http://stackoverflow.com/comment/40938837
upvote count: 1
has comment: http://stackoverflow.com/comment/40971328
accepted answer of: http://stackoverflow.com/q/26117326
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26117326

http://stackoverflow.com/a/26044182
answers question: http://stackoverflow.com/q/26042773
accepted answer of: http://stackoverflow.com/q/26042773
type: AcceptedAnswer
score: 0
type: Answer
has body: There are 2 options you can do to get the box to animate to the right edge of the area. 1) You could set the css "left: auto", and animate the css "right:0". To do this you would need to take some extra steps. You would need to set css "position: absolute" to the box and would need to wrap the box in a div that has the css "position: relative" with a width of 100%. That way, the box knows where the right edge because its most immediate parent that has css "position:relative" is setting the boundary. Doing this option would require a little fine tuning because switching between animating the left position and the right position will cause some jumping. 2) This option you could continue animating the left position, but to get it to animate to the right, you would need jquery to calculate how wide the page is, and subtract the with width of the box. It would look like this: left: ($(document).outerWidth() - $('#box1').outerWidth())

google-maps-api-3
tags question: http://stackoverflow.com/q/26066141
tags question: http://stackoverflow.com/q/26122419
tags question: http://stackoverflow.com/q/26106501
tags question: http://stackoverflow.com/q/26095362
tags question: http://stackoverflow.com/q/26083033
tags question: http://stackoverflow.com/q/26037104
tags question: http://stackoverflow.com/q/26081024
tags question: http://stackoverflow.com/q/26088073
tags question: http://stackoverflow.com/q/26097122
tags question: http://stackoverflow.com/q/26065450
tags question: http://stackoverflow.com/q/26171285
tags question: http://stackoverflow.com/q/26149770
tags question: http://stackoverflow.com/q/26068732
tags question: http://stackoverflow.com/q/26128916
tags question: http://stackoverflow.com/q/26077276
tags question: http://stackoverflow.com/q/26130691
tags question: http://stackoverflow.com/q/26169425
tags question: http://stackoverflow.com/q/26122246
tags question: http://stackoverflow.com/q/26052462
tags question: http://stackoverflow.com/q/26115523
tags question: http://stackoverflow.com/q/26055845
tags question: http://stackoverflow.com/q/26099764
tags question: http://stackoverflow.com/q/26091926
tags question: http://stackoverflow.com/q/26193435
tags question: http://stackoverflow.com/q/26131874
tags question: http://stackoverflow.com/q/26096199
tags question: http://stackoverflow.com/q/26101575
tags question: http://stackoverflow.com/q/26180348
tag name: google-maps-api-3
type: Tag
tags question: http://stackoverflow.com/q/26047114
tags question: http://stackoverflow.com/q/26140073
tags question: http://stackoverflow.com/q/26088925
tags question: http://stackoverflow.com/q/26073984
tags question: http://stackoverflow.com/q/26057886
tags question: http://stackoverflow.com/q/26075250
tags question: http://stackoverflow.com/q/26127702
tags question: http://stackoverflow.com/q/26109825
tags question: http://stackoverflow.com/q/26120828
tags question: http://stackoverflow.com/q/26036488
tags question: http://stackoverflow.com/q/26063447

http://stackoverflow.com/comment/40921118
type: QuestionComment
has text: See this answer to an unrelated question for a long discussion of the call stack (and how closures are related): http://stackoverflow.com/questions/26061856/javascript-cant-access-private-properties/26063201#26063201
comment on: http://stackoverflow.com/q/26111118
score: 0
type: Comment

http://stackoverflow.com/comment/40991412
type: Comment
type: QuestionComment
has text: Ok that's interesting. When you try to get this value from the Console window directly you get false.. that's strange?
comment on: http://stackoverflow.com/q/26149491
score: 0

http://stackoverflow.com/q/26126850
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26880864
score: 0
has title: JSON values from PHP to JQuery and run function
answer count: 1
has body: Hello I described the following problems im having below before every piece of code. thanks in advance!! I’m reading X,Y Coordinates from MySQL Database. I am now using 3 files : coordinate_array, db_conn and map.php Connection : <?php //declaring connection $db_user = "u"; $db_pwd = "p"; $db_server = "v"; $db_name = "sandbox"; //1. connection to the database $conn = mysqli_connect($db_server, $db_user, $db_pwd); //check connection if(!$conn){ die("Database connection failed: " . mysqli_error()); }else{ echo "connected to MySQL "; } // 2. Select a database to use $db_select = mysqli_select_db($conn, $db_name); if (!$db_select) { die("Database selection failed: " . mysqli_error()); } mysqli_close($conn); ?> In coordinate_array: I am making a multidimensional arrays so I can draw all of the rectangles being fetch by my query, I then use json_encode($desk). I am ignoring the coordinate_id from the table since I only need x,y values for the Javascript part. <?php $select_coordinate_query = "SELECT * FROM coordinates";// WHERE coordinate_id ='1' $result = mysqli_query($conn,$select_coordinate_query); //see if query is good if($result === false) { die(mysqli_error()); } //array that will have number of desks in map area while($row = mysqli_fetch_assoc($result)){ //get desk array count $desk = array( array("x" => $row['x_coord']), array("y" => $row['y_coord']) ); // Frame JSON // Return the x, y JSON here echo json_encode($desk); } //end while loop ?> In map.php : I am trying to get those value with the use of JQuery. I want to get the values and run a loop that will execute my Paint function which will keep drawing rectangles for every row thats in the table. I am very new with JSON and JQuery and starting to use it. Section A Also, do I have the correct syntax for my when including my jquery file.. its in the same as every other file that I’m using. Another question I have is: Is it good to include the connection file in every file and close it at the end or keep the con…
type: UnansweredQuestion
tagged with: php
tagged with: http://stackoverflow.com/tag/json
tagged with: mysql
type: Question

http://stackoverflow.com/a/48273032
answers question: http://stackoverflow.com/q/26064802
has body: Assuming ^M indicates a mac-style carriage return, support for carriage return was included in a previous release so your code should just work. Source: I'm the author of jquery-csv
score: 0
type: Answer

http://stackoverflow.com/a/26055657
type: Answer
answers question: http://stackoverflow.com/q/26055496
has body: Try something like this (would work with multiple select boxes (uses the nearest submit): Select one value value 1 value 2
score: 0

http://stackoverflow.com/q/26188661
has comment: http://stackoverflow.com/comment/41064380
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26188720
has body: Im using a jquery plugin called tablesorter to sort tables when one of the headers is clicked. However, the table im using is capable of losing/gaining and changing rows. So the HTML is changing, but the tablesorter plugin is not recognizing these changes. So the tablesorter plugin adds old rows when initiated. I've created an example here: http://jsfiddle.net/mgtc24d8/9/. You can see the issue by clicking "Delete row", then sorting the table by clicking one of the headers. It will re-add the deleted row. code
has title: jQuery not recognizing changes to html
linked to: http://stackoverflow.com/q/1903788
tagged with: tablesorter
duplicate of: http://stackoverflow.com/q/1903788
type: Question
has comment: http://stackoverflow.com/comment/41064383
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1

http://stackoverflow.com/comment/40785930
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26037105
has text: Try to `console.log(object.style.top, positiehuidigtop, aantalpixels)` and see the actual values. Also add `console.log("something")` markers to your code to see what's being executed and what's not.

http://stackoverflow.com/comment/40801563
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26045293
has text: Note that a $scope.expenses.remove(expense) did quite do the job. I learned that the indexBased deletion is the only one reliable in JS. Thkx again.

http://stackoverflow.com/q/26046296
has answer: http://stackoverflow.com/a/26046419
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/40802575
accepted answer: http://stackoverflow.com/a/26047828
has title: PHP while loops causing an infinite load
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40802511
downvote count: 0
has answer: http://stackoverflow.com/a/26047828
score: 1
has comment: http://stackoverflow.com/comment/40802470
possible better answer: http://stackoverflow.com/a/26046419
type: Question
has comment: http://stackoverflow.com/comment/40802718
tagged with: javascript
has comment: http://stackoverflow.com/comment/40802565
has body: I am trying to upload an image and some strings/numbers using AJAX. The code is working fine (as in, everything is getting into the database) except for one very important problem. I very much want the "character" variable to be unique, and every attempt I use to bring up an error message for trying a character name that has already been taken does not work. Here is my code: AJAX: function CSubmit() { clearInterval(MoveDrawTimer); var a=document.forms['form-id']["thefiles"].value; if (a == "") { document.getElementById("info").innerHTML="You must upload an image."; return }; if (showFileSize() &gt; 5000000) { document.getElementById("info").innerHTML="File is too big. Maximum size is 5,000,000 bytes."; return }; var accepted = [".gif",".png",".jpg",".jpeg"]; if (Ext in oc(accepted) == true) { var dataURLToBlob = function(dataURL) { var BASE64_MARKER = ';base64,'; if (dataURL.indexOf(BASE64_MARKER) == -1) { var parts = dataURL.split(','); var contentType = parts[0].split(':')[1]; var raw = parts[1]; return new Blob([raw], {type: contentType}); } var parts = dataURL.split(BASE64_MARKER); var contentType = parts[0].split(':')[1]; var raw = window.atob(parts[1]); var rawLength = raw.length; var uInt8Array = new Uint8Array(rawLength); for (var i = 0; i &lt; rawLength; ++i) { uInt8Array[i] = raw.charCodeAt(i); } return new Blob([uInt8Array], {type: contentType}); }; newImage = dataURLToBlob(dataURL); } else { document.getElementById("info").innerHTML="Cannot send file. Check your extensions."; return }; var canvas = document.getElementById("Cinfo"); var context = canvas.getContext("2d"); context.clearRect(0, 0, 400, 400); var TotalSpent = StrPts + IntPts + WisPts + SpdPts + MovPts; var theform = document.getElementById("CharName"); if (theform.value == "") { document.getElementById("info").innerHTML="Your character must have a name."; return } if ( /[^a-zA-Z0-9]/.test(theform.value) ) { document.getElementById("info").innerHTML="Name must contain only letters and / or num…
answer count: 2
upvote count: 1

http://stackoverflow.com/a/26121154
downvote count: 0
has comment: http://stackoverflow.com/comment/40938492
type: Answer
accepted answer of: http://stackoverflow.com/q/26121059
answers question: http://stackoverflow.com/q/26121059
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40938762
has body: function formatMonth(d) { var months = ["Jan", "Feb", "Mar", "Jul", "Jun", "Aug", "Sep", "Oct", "Nov", "Dec"]; return month = months[d]; } formatMonth(3) http://jsfiddle.net/6058zj9q/
has comment: http://stackoverflow.com/comment/40947943
type: AcceptedAnswer

http://stackoverflow.com/comment/40862815
comment on: http://stackoverflow.com/q/26079026
type: Comment
type: QuestionComment
has text: @TheStatehz tried this but this is also not working. As per the answer you posted (not sure if that has been deleted by mistake by me), you were passing the inner HTML value to another HTML (with id = 'output-area') but here my requirement is little different. I just want to fetch the inner HTML text value from the page and use that value for some other purpose. The challenge I am facing is just on fetching the inner HTML value from the page.
score: 0

http://stackoverflow.com/q/26134822
has comment: http://stackoverflow.com/comment/40995411
has body: I need some advice here. Im working with jquery sortable lists. Ive got two collections 'users' and lists'. User is able to add new lists aswell as new users, then moves them around. I want to know which user is in which list. I have two options. Either list in 'lists' collection will contain all users which belong to that list, or user in 'users' collection would have a field like: 'list' ( they belongs to ). I chose the second option, which in my opinion would give me more flexibilty ( im no expert ), but I encountered a problem. When a user will add a new list I will end up without a helper for that list. What do you guys think? Which solution is better here? And if there's any way to go around the problem I met ?
type: Question
tagged with: mongodb
has comment: http://stackoverflow.com/comment/40996950
tagged with: javascript
score: 0
tagged with: meteor
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40996857
has title: Meteor - Collections schema advice needed

http://stackoverflow.com/a/26110259
has comment: http://stackoverflow.com/comment/40919749
downvote count: 0
has comment: http://stackoverflow.com/comment/41132264
has body: There are a couple of steps to do this. First create the CSV Import Mapping that you want the script to use. When saving the mapping, there should a field named 'Script Id'. The value in this field will be used by your script. Create a scheduled script that will check the folder location for new files and trigger the import automatically. In this scheduled script, you will use the nlapiSubmitCSVImport() and use the 'Script Id' field above to trigger the CSV Import Wizard. Search nlapiSubmitCSVImport() in NS Help for more details. You can not import XLS files, only CSV files are supported in CSV Import.
answers question: http://stackoverflow.com/q/26068585
has comment: http://stackoverflow.com/comment/40958679
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41056030
score: 1

http://stackoverflow.com/comment/41032383
type: Comment
comment on: http://stackoverflow.com/a/26171558
score: 1
type: AnswerComment
has text: All you have to do fanfare, is to change `var s= '';` to `var s= 'Any Letter';`;

http://stackoverflow.com/q/26132230
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40959726
has title: Angular view doesn't get updated
answer count: 0
has comment: http://stackoverflow.com/comment/40959903
type: Question
has comment: http://stackoverflow.com/comment/40959572
tagged with: javascript
has comment: http://stackoverflow.com/comment/40959750
has comment: http://stackoverflow.com/comment/40959587
score: 0
has comment: http://stackoverflow.com/comment/40959403
has body: My application performs a get request on ng-init as follows: <div class="container-fluid" ng-controller = "dashboardCtrl" ng-init = "getTables('<?php echo base_url();?>')"> {{table}} Then I want to perform another get request by using the ng-click directive that is auto generated by the ng-repeat you can see above. The problem is that I'm fetching the server side data correctly but my scope variable is not getting updated in my view. I have tried with $scope.$apply(fn) and $scope.$apply() but I get a $digest in progress error, here's my controller: require(['app'], function(app){ app.controller('dashboardCtrl',function($scope,$http){ $scope.base_url = ""; $scope.tablename = ""; $scope.tables = ""; $scope.columns = []; $scope.getTables = function(base_url){ $scope.base_url = base_url; $http.get($scope.base_url + 'index.php/dashboard/getTables').success(function(data){ $scope.tables = data; //this works fine }); } $scope.getColumns = function(param){ $scope.tablename = param; $http({ url: $scope.base_url + 'index.php/dashboard/getColumns', method: "GET", params: {tableName: $scope.tablename} }).success(function(data){ $scope.columns = data; //request works but columns doesnt get updated in view console.log($scope.columns); //server data is showed in console }); } }); }); Finally this is the partial that should render and iterate over the $scope.columns variable: {{column}} Any suggestions or ideas?
tagged with: ajax
has comment: http://stackoverflow.com/comment/40959648

http://stackoverflow.com/a/26138941
score: 2
downvote count: 0
type: Answer
has body: Use .hasClass() as shown: var isHome = $('body').hasClass('home'); If body has a class home then $('body').hasClass('home'); statement will return true otherwise false. Or directly use if($('body').hasClass("home"))
answers question: http://stackoverflow.com/q/26138910
upvote count: 2

http://stackoverflow.com/q/26077052
has body: i am working on simple node js module ... a module that, when i give an ID and a request rate, returns a readable stream which emits location data for the corresponding satellite... i am trying to implement by using sub classing ReadableStream http://nodejs.org/api/stream.html#stream_class_stream_readable i am using this api https://api.wheretheiss.at/v1/satellites/25544 providing my code below.. http://jsfiddle.net/omb3rwqn/1/ var request = require('request'); var url = 'https://api.wheretheiss.at/v1/satellites/25544' var reader = request(url); readable.on('readable', function() { console.log('got %d characters of string data'); })
has comment: http://stackoverflow.com/comment/40859802
favorite count: 0
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/40859650
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40859197
has comment: http://stackoverflow.com/comment/40858641
tagged with: node.js
has answer: http://stackoverflow.com/a/40478840
score: 4
has comment: http://stackoverflow.com/comment/40858740
type: Question
upvote count: 4
has title: Uncaught ReferenceError: request is not defined
has comment: http://stackoverflow.com/comment/40858973
tagged with: javascript
tagged with: jquery
downvote count: 0
answer count: 1

http://stackoverflow.com/a/26108049
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 6
score: 6
accepted answer of: http://stackoverflow.com/q/26107839
answers question: http://stackoverflow.com/q/26107839
has body: The HTML markup attribute &lt;input checked="" is not actually designed to show the state of the element at runtime moment, but to define the default state of it when the page renders for the first time. MDN &lt; input > docs states: checked: When the value of the type attribute is radio or checkbox, the presence of this Boolean attribute indicates that the control is selected by default; otherwise it is ignored. The only varying of checked state you can target is the Js DOM property checked: document.getElementById('myInput').checked; //(true / false) or the Css pseudo :checked: #myInput:checked { }

http://stackoverflow.com/comment/40905095
type: AnswerComment
has text: @user1147537 the force layout re-computes the node positions 60 times per second, and then your code moves them into those positions 60 times per second. Since all the nodes are fixed, there's no need for this layout and for the frequent redraws. In fact, you don't need ANY layout here. You can just remove any mention of 'force' from the code. But you'll have to call the tick() function yourself whenever a node/link is added. Also, force.drag would need to be replaced with a d3.behavior.drag().
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26091784

http://stackoverflow.com/q/26040715
tagged with: elliptic-curve
tagged with: cryptography
score: 2
upvote count: 2
type: Question
has title: ECDH Key-Exchange with public keys of different lengths?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26045239
has body: I'm working on a ECDH key-exchange implementation at the moment. I am using the P-384 curve for that. Other curves would be possible too, but I think the implementations should be quite similar. Client (Javascript) and Server(Java) want to find a shared secret and therefore 1) The server creates a public and a private key. 2) The server sends the the public key to the client. Note: The public key is 120 bytes long. 3) The client creates private and public key. Note: public key is 97 bytes long and the private key has 48 bytes. 4) The client tries to calculate the shared secret. However,I get a "Bad argument" error. On the client-side i use Google-Closure-Library with the e2e package. ( https://code.google.com/p/end-to-end/source/browse/javascript/crypto/e2e#e2e%2Fecc ) For implementation i had a look in the ecdh.js and the ecdh_test.html files. My implementation on client side looks like that: var serverPublicKeyStringAsHex = "3076301006072a8648ce3d020106052b8104....." //* var serverPublicKey = goog.crypt.hexToByteArray(serverPublicKeyStringAsHex) var bobKeyPair = e2e.ecc.Protocol.generateKeyPair("P_384"); var bobECDH = new e2e.ecc.Ecdh("P_384"); var bobMessage = bobECDH.bob(serverPublicKey, bobKeyPair['privKey']); As mentioned, I get a "bad argument" error in the console. More detailed: I wanted to know if this error might appear because the length of the servers public key is wrong? If that's the reason, what might be the problem in my implementation? I am using the same EC on server-side. With this "public-key-length" question I found out, that there are uncompressed and compressed representations of keys. However, I don't think that that might be my problem, as the key lenghts (server public key: 120 bytes, client public key: 97 bytes) don't match the described patterns ( field size + 1 versus 2* field size + 1) Thanks for any kind of help, as I have spent so many hours on that problem and don't know what I could try next.. *If it is important to know, that's th…
accepted answer: http://stackoverflow.com/a/26045239
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: diffie-hellman
linked to: http://stackoverflow.com/q/6665353

http://stackoverflow.com/comment/40802374
has text: Yeah, whatever functions you're using need to be exported into the global scope from that script.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26046120
score: 0

http://stackoverflow.com/comment/41041412
comment on: http://stackoverflow.com/q/26176572
has text: for reference, see [MDN](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers.setTimeout).
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/40854805
type: Comment
has text: Also, note that while fresh cookies would require a request even if the HTML is cached, that happens because I use Twitter OAuth and the cookies can be set in the redirects.
comment on: http://stackoverflow.com/a/26065899
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40817004
type: AnswerComment
comment on: http://stackoverflow.com/a/26054211
score: 0
type: Comment
has text: Thank you, I will study about object literal. However, about your last note, Google js style guide recommeds to name constants LIKE_THIS. [link](https://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml?showone=Naming#Naming)

http://stackoverflow.com/q/26116989
answer count: 1
has title: retrieve database from maxmind javascript
has body: I am trying to retrieve country code via maxmind javascript but return null why ? ** want to get timezone by country code.** Once i got country code i want to implament it. i got timezone deta here. but javascript return null https://github.com/maxromanovsky/php-maxmind-geoip/blob/master/timezone/timezone.php
type: UnansweredQuestion
tagged with: maxmind
has answer: http://stackoverflow.com/a/26118580
tagged with: php
type: Question
tagged with: javascript
score: 0

caroufredsel
tags question: http://stackoverflow.com/q/26112689
type: Tag
tag name: caroufredsel

http://stackoverflow.com/q/26171141
has comment: http://stackoverflow.com/comment/41031589
tagged with: extract
type: UnansweredQuestion
tagged with: hyperlink
tagged with: loops
type: Question
has title: Getting list of anchor href attributes and text values in specific element
has body: &lt;li class="bottom"&gt; &lt;a role="menuitem" aria-haspopups="true" href="/myshop.php"&gt;Your Shops&lt;/a&gt; &amp;raquo; &lt;ul role="menu" class="menu-dropdown" id="menu-sub-shops"&gt; &lt;li&gt;&lt;a href="/myshop.php?shopid=300101"&gt;A&lt;/a&gt; (&lt;a href="/myshop.php?shopid=300101&amp;act=quickstock"&gt;qs&lt;/a&gt;)&lt;/li&gt; &lt;li&gt;&lt;a href="/myshop.php?shopid=300739"&gt;B&lt;/a&gt; (&lt;a href="/myshop.php?shopid=300739&amp;act=quickstock"&gt;qs&lt;/a&gt;)&lt;/li&gt; &lt;li&gt;&lt;a href="/myshop.php?shopid=300078"&gt;C&lt;/a&gt; (&lt;a href="/myshop.php?shopid=300078&amp;act=quickstock"&gt;qs&lt;/a&gt;)&lt;/li&gt; &lt;li&gt;&lt;a href="/myshop.php?shopid=300591"&gt;D&lt;/a&gt; (&lt;a href="/myshop.php?shopid=300591&amp;act=quickstock"&gt;qs&lt;/a&gt;)&lt;/li&gt; &lt;li&gt;&lt;a href="/myshop.php?shopid=306981"&gt;E&lt;/a&gt; (&lt;a href="/myshop.php?shopid=306981&amp;act=quickstock"&gt;qs&lt;/a&gt;)&lt;/li&gt; &lt;li class="bottom"&gt;&lt;a href="/myshop.php?shopid=300232"&gt;F&lt;/a&gt; (&lt;a href="/myshop.php?shopid=300232&amp;act=quickstock"&gt;qs&lt;/a&gt;)&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; var t1 = document.getElementById("menu-sub-shops"); for (var i = 0; i &lt; t1.length; i++) { var t2 = t1[i].getElementsByTagName('li'); for (var j = 0; j &lt; t2.length; j++) { var t3 = t2[j].getElementsByTagName('a'); for (var k = 0; k &lt; t3.length; k++) { eval("var shopid" + k + " = " + t3[k].attributes['href'].value); console.log(t3[k].attributes['href'].value); } } } I’m trying to get the links with the associated names to no avail. Output I’m trying to get: A - /myshop.php?shopid=300101 B - /myshop.php?shopid=300739 C - /myshop.php?shopid=300078 D - /myshop.php?shopid=300591 E - /myshop.php?shopid=306981 My JSFiddle.
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26171375
answer count: 1

http://stackoverflow.com/comment/40962113
type: AnswerComment
has text: @BrandonPoe Thanks, I kept trying last-child and last-of-type but it wasn't working, I'll switch it to "textarea:last" now that I know it works with that one.
type: Comment
comment on: http://stackoverflow.com/a/26129034
score: 1

http://stackoverflow.com/a/26074422
has body: closest looks for the match in the parent elements , you should use siblings instead ... UPDATE one of these should work based on the code u provided, if they don't you need to provide the generated html or at least the complete code you using ... $(this).closest('td').siblings('.title').text(); $(this).closest('tr').find('.title').text(); $(this).parent().prev().text(); ... and some other methods the reason why $(this).siblings('.title').text() doesn't work is because this is &lt;a&gt; not &lt;td&gt; witch doesn't have a sibling
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40854310
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40854093
answers question: http://stackoverflow.com/q/26074389
has comment: http://stackoverflow.com/comment/40853911

http://stackoverflow.com/comment/40940408
type: AnswerComment
has text: just use closest("div").css("text-decoration", "underline");
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26121327

http://stackoverflow.com/q/26193755
type: UnansweredQuestion
score: 2
downvote count: 0
has title: input scrollLeft never changes in IE11
type: Question
tagged with: internet-explorer-11
has answer: http://stackoverflow.com/a/27326096
tagged with: javascript
has answer: http://stackoverflow.com/a/35692857
upvote count: 2
has body: I'm not sure if I'm going crazy or if this is a bug in IE11. Open this demo in IE11: http://jsfiddle.net/zdfubscf/1/ var $span = $('span'); $('input').on('keyup', function () { $span.html( this.scrollLeft + ', ' + this.scrollWidth + ', ' + this.selectionEnd ); }); Start typing in the input. When the text overflows, you'll notice that the scrollLeft and scrollWidth values never change. The &lt;!DOCTYPE html&gt; is set properly. Is there something I'm missing to get the proper scroll values?
answer count: 2
favorite count: 0

http://stackoverflow.com/comment/40952532
type: Comment
has text: @BartFokker Ah, my bad - missed the indexes =P. Updated to include the `i` and `j` offsets. Let me know if that works better now?
comment on: http://stackoverflow.com/a/26128423
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41055887
comment on: http://stackoverflow.com/a/26182735
score: 0
type: AnswerComment
type: Comment
has text: I gave the API another look and found some more useful methods. Thanks Blue!

http://stackoverflow.com/q/26097637
has title: How to use Jadeify with Gulp
tagged with: node.js
score: 2
type: AnsweredQuestion
upvote count: 2
has body: First off, my ultimate goal is to be able to use jade templates with backbone But this is the best solution I could come up with. browserify.gulp //appoligies for including it all. gulp.task('browserify', function () { var bundler = browserify({ // Required watchify args cache: {}, packageCache: {}, fullPaths: true, // Specify the entry point of your app entries: ['./src/site/js/app.js'], // Add file extentions to make optional in your requires extensions: ['.js'], // Enable source maps! debug: true }); var bundle = function () { // Log when bundling starts bundleLogger.start(); return bundler .transform(require('jadeify')) .bundle() // Report compile errors .on('error', handleErrors) // Use vinyl-source-stream to make the // stream gulp compatible. Specifiy the // desired output filename here. .pipe(source('main.js')) // Specify the output destination .pipe(gulp.dest('./public/js')) // Log when bundling completes! .on('end', bundleLogger.end); }; if (global.isWatching) { bundler = watchify(bundler); // Rebundle with watchify on changes. bundler.on('update', bundle); } return bundle(); }); Jade.gulp gulp.task('jade', function () { return gulp.src('./src/site/views/*.jade') .on('error', handleErrors) .pipe(jade()) .pipe(gulp.dest('public/views/templates')); }); app.js //the main angular file var jamie = require("../views/resultsMini.jade"); console.info(jamie); //outputs: function template(locals) { var buf = []; var jade_mixins = {}; var jade_interp; buf.push(" Results List ");;return buf.join(""); } So the real quesiton is, why does jamie not return me the html? I assume I've just done it completely wrong :( Is there some usage I am missing here? From the docs: https://github.com/domenic/jadeify var template = require("./template.jade"); document.getElementById("my-thing").innerHTML = template({ localVar: "value", anotherOne: "another value" });
type: Question
possible better answer: http://stackoverflow.com/a/27482550
accepted answer: http://stackoverflow.com/a/27974995
has answer: http://stackoverflow.com/a/27482550
tagged with: javascript
answer count: 2
tagged with: pug
downvote count: 0
tagged with: gulp
favorite count: 0
tagged with: browserify
has answer: http://stackoverflow.com/a/27974995

http://stackoverflow.com/comment/40857847
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26076582
type: Comment
has text: Same effect with setInterval

http://stackoverflow.com/q/26101129
type: Question
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40902755
has answer: http://stackoverflow.com/a/26101292
score: 0
possible better answer: http://stackoverflow.com/a/26101165
has body: My JSON.parse is successful when it is called first. But from 2nd call, unexpected token error occurs. I found from the search in stackoverflow some explanation for other's question below.. "If you parse it again it will perform a toString-cast first so you're parsing something like "[object Object"] which explains the unexpected token o " How can i make the fresh parse. my code is like below. var musicEntry=""; function parsing(){ ... for(var i=0;i&lt;musicList.length;i++){ musicEntry=musicEntry+ '{"fileName":"'+musicList[i].title+'"},'; } ..... var musicJsonObjString='{"music":['+ musicEntry +']}'; musicJsonObj=JSON.parse(musicJsonObjString); }
answer count: 2
upvote count: 1
has title: JSON.parse error....unexpected token{ from 2nd
downvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40903344
favorite count: 0
has comment: http://stackoverflow.com/comment/40902686
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26101165
accepted answer: http://stackoverflow.com/a/26101292
has comment: http://stackoverflow.com/comment/40902646

http://stackoverflow.com/comment/40826091
has text: I think what you are looking for is a plugin like pretty photo or lightbox, is that so ? so I can send you a link
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26059124

http://stackoverflow.com/a/26143934
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26143881
upvote count: 5
type: Answer
accepted answer of: http://stackoverflow.com/q/26143881
has body: If you are doing your if clause with one equals sign, Javascript will check if your element is set to the new value successfully. Instead, when you do a comparison, use double equal signs (in your case) if (document.getElementById("pcount").value == 1){
has comment: http://stackoverflow.com/comment/40980811
downvote count: 0
score: 5
has comment: http://stackoverflow.com/comment/40980630

jqbootstrapvalidation
type: Tag
tag name: jqbootstrapvalidation
tags question: http://stackoverflow.com/q/26099178
tags question: http://stackoverflow.com/q/26190706
tags question: http://stackoverflow.com/q/26049299

http://stackoverflow.com/q/26128142
has body: Thanks for looking into my question. I have two parse classes Game and CricketScore. Game has "first_inning_score" and "second_inning_score" pointers to CricketScore class. I am only getting pointers to CricketScore as shown below. How can I get actual data from CricketScore?(RESOLVED). Now question is how to show data in handlebar?? I am getting this JSON Object from parse(updated) { "results": [ { "first_inning_score": { "overs": "0", "parent": { "__type": "Pointer", "className": "Game", "objectId": "Yibf5wHLIM" }, "team_name": "Fr11", "wickets": "0", "innings": "1", "runs": "0", "createdAt": "2014-09-30T18:27:36.640Z", "updatedAt": "2014-09-30T18:27:36.640Z", "objectId": "0NhGUYySg5", "__type": "Object", "className": "CricketScore" }, "second_inning_score": { "wickets": "0", "innings": "2", "runs": "0", "team_name": "Rb11", "overs": "0", "parent": { "__type": "Pointer", "className": "Game", "objectId": "Yibf5wHLIM" }, "createdAt": "2014-09-30T18:27:36.760Z", "updatedAt": "2014-09-30T18:27:36.760Z", "objectId": "4gHyHO84Ep", "__type": "Object", "className": "CricketScore" }, "city": "Poway", "elected": "bowl", "groundname": "4s RANCH", "hometeam": "Rb11", "maxovers": "20", "score_moderator": [ { "__type": "Pointer", "className": "_User", "objectId": "00hBJbvgmu" } ], "sport": "Cricket", "status": "inning1", "team1": "Fr11", "team2": "Rb11", "toss": "Rb11", "createdAt": "2014-09-30T18:27:36.504Z", "updatedAt": "2014-09-30T18:27:36.898Z", "objectId": "Yibf5wHLIM" } ] } Handlebar code Javascript code. I dont know how to get cricketscores yet. I am unable to follow Dehli's answer below. query.find({ success: function(results) { // The query was successful, and has passed // back an array of PFObjects for you to use // Since we're appending, clear the list out // every time we're about to add results $("#quoteList").html(""); // Compile the Handlebars template we're going // to stick the results into. Pass Handlebars the // ID of the script tags in index.html that cont…
tagged with: serialization
tagged with: parse-platform
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40951982
accepted answer: http://stackoverflow.com/a/26128679
has comment: http://stackoverflow.com/comment/40952358
tagged with: http://stackoverflow.com/tag/json
has title: Parse object with nested object parsing- Javascript
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26128679
answer count: 1

http://stackoverflow.com/q/26078795
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40865023
score: 0
has body: According to the documentation Custom Attribute Methods can be defined on the model, and then later used on objects returned from Queries made through Waterline, Sails JS's ORM. This is not working for me. I am getting the correct data back from the query but none of functions that I declare on the model work. Trying to call them results in a TypeError: Object [object Object] has no method 'methodName' (Update with a clearer example) Here is my Model with the custom Attribute method module.exports = { attributes: { firstName : { type: 'string' }, lastName : { type: 'string' } }, // Custom Attribute Method fullName : function(){ return this.firstName + " " + this.lastName } }; Here is where I am using it in the controller module.exports = { findMe: function(req, res){ User.findOne({firstName:'Todd'}).exec(function(err, user){ console.log(user.fullName()); //&lt;--TypeError: Object [object Object] has no method 'fullName' res.send(user); }) } }; What am I missing?
has answer: http://stackoverflow.com/a/26089839
tagged with: node.js
has title: How do Custom Attribute Methods work in Sails js
type: AnsweredQuestion
tagged with: waterline
has comment: http://stackoverflow.com/comment/40881117
type: Question
tagged with: sails.js
accepted answer: http://stackoverflow.com/a/26089839

http://stackoverflow.com/comment/40814793
type: Comment
comment on: http://stackoverflow.com/q/26053110
type: QuestionComment
score: 0
has text: To change the input characters to different language

http://stackoverflow.com/q/26070939
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27683462
has body: There is an web-application, that needs to be tested. This application uses AJAX and jQuery. Tests have to be written for all possible interactions with the browser and client-side. There are some tools for this, for example, Selenium IDE, but I wonder if it is possible to use any headless browser. So, requirements for the testing system are: Query pages from the remote server, simulate browser behavior (basically we give the headless browser the URL, browser fetches the page and launches tests on it); Inject tested JavaScript or test JavaScript already loaded on the remote page; Use any of testing frameworks than can be integrated with any of CI software (Jasmine, Mocha etc.). It is possible to use mocking techniques when dealing with AJAX requests, for example, but I'm trying to test real-life application. Hope that this question will be useful for anybody.
has title: Headless testing of remote JavaScript web-applications
tagged with: continuous-integration
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/27683462
favorite count: 0
tagged with: headless-browser
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/40847995
score: 1
tagged with: unit-testing
type: Question

http://stackoverflow.com/a/26178495
has comment: http://stackoverflow.com/comment/41045878
has comment: http://stackoverflow.com/comment/41045120
has comment: http://stackoverflow.com/comment/41107117
accepted answer of: http://stackoverflow.com/q/26177058
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41045913
has body: Its window.location.href = '' // or window.location.replace("")
answers question: http://stackoverflow.com/q/26177058
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/comment/40891715
score: 0
type: AnswerComment
has text: e.preventDefault() instead of return false; unless you want to stop the event bubble (propagation) as well.
type: Comment
comment on: http://stackoverflow.com/a/26094847

http://stackoverflow.com/comment/40792641
comment on: http://stackoverflow.com/a/26040878
score: 0
has text: Worked great in jsbin. I'm using chrome. I updated my original question with more context in case I'm doing something wrong elsewhere.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40887123
comment on: http://stackoverflow.com/q/26091498
score: 0
type: QuestionComment
type: Comment
has text: Please provide a [Minimal, Complete, Tested and Readable example](http://stackoverflow.com/help/mcve)

http://stackoverflow.com/comment/40789994
comment on: http://stackoverflow.com/a/26038966
score: 0
type: AnswerComment
has text: Excuse me :) I did it, and it works. It works perfect! Thanku you :)
type: Comment

http://stackoverflow.com/comment/41010704
type: QuestionComment
comment on: http://stackoverflow.com/q/26152652
type: Comment
score: 0
has text: @Pinal thank you, that is what I'm discovering as the issue. I can't accept a comment as an answer however ;P

http://stackoverflow.com/a/26160037
has comment: http://stackoverflow.com/comment/41530685
score: 4
answers question: http://stackoverflow.com/q/26159665
accepted answer of: http://stackoverflow.com/q/26159665
has body: you can try following code and on Fiddle Vitamin Supplement Therapy Machine VitaminA VitaminB VitaminC VitaminA VitaminB VitaminC VitaminA VitaminB VitaminC JQUERY $(document).ready(function(){ $("#category").on("change",function(){ var selectedVal=$( "#category option:selected" ).val(); $("#subcategory > optgroup").attr("disabled","disabled"); //$("#subcategory > optgroup").hide(); // you can also hide option insted make them just disabled $('#subcategory > optgroup[label="'+selectedVal+'"]').removeAttr("disabled"); // $('#subcategory > optgroup[label="'+selectedVal+'"]').show() }); });
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/41452360
has comment: http://stackoverflow.com/comment/41439289
has comment: http://stackoverflow.com/comment/41441856
has comment: http://stackoverflow.com/comment/41573590
has comment: http://stackoverflow.com/comment/41014340
has comment: http://stackoverflow.com/comment/41528793
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40826638
type: QuestionComment
has text: $(".border").css("fill", "#a077a6") what is fill here?
comment on: http://stackoverflow.com/q/26059271
score: 0
type: Comment

http://stackoverflow.com/q/26063447
has body: Hi I want to do a reverse geocodoing from longitude and lontitude google map api to do that I should add the LonLat to a link to get a JSON structure this the link of JSON file http://maps.googleapis.com/maps/api/geocode/json?latlng=34.0235202,-6.8317697&amp;sensor=true from this link I want to read the attribute formatted_address this how I get the JSON file $.getJSON('http://maps.googleapis.com/maps/api/geocode/json?latlng='+loca.toString()+'&amp;sensor=true', function(data) { alert(data.results.formatted_address[0]); }); } but it shows me this error Uncaught TypeError: Cannot read property '0' of undefined and thank you for helping me
favorite count: 0
accepted answer: http://stackoverflow.com/a/26063602
has comment: http://stackoverflow.com/comment/40833929
type: AnsweredQuestion
has title: Read attributes of json external link with javascript
upvote count: 1
type: Question
score: 1
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/26063683
has answer: http://stackoverflow.com/a/26063683
tagged with: google-maps-api-3
answer count: 2
has answer: http://stackoverflow.com/a/26063602
tagged with: google-geocoder
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40915306
has text: @Claudiu hey there, done. http://jsfiddle.net/Cessum/pmaefrjo/ Maybe this is a better explenation: Click on creaties and see its scrolling down. There you can see its not stopping on the red square. its scrolling little further.
type: QuestionComment
comment on: http://stackoverflow.com/q/26106941
score: 0
type: Comment

http://stackoverflow.com/comment/40897129
score: 0
type: Comment
has text: @frank I agree .. very tough tutorial, but I figured it covers all the parts that I would need later on .. So like you said I think handlebars is the one that is actually doing the removing -or at least replacing views- behind the scenes. Thanks alot
type: AnswerComment
comment on: http://stackoverflow.com/a/26096448

http://stackoverflow.com/a/26114041
score: 2
accepted answer of: http://stackoverflow.com/q/26113629
downvote count: 0
answers question: http://stackoverflow.com/q/26113629
upvote count: 2
type: AcceptedAnswer
has body: i have simply modified your code for this, you just need get the content of each para and pass each para to your writeText function() Just give class="effect" to to be animated Hi, this is Gokul Praveen' PARA 1! Hi, this is James Bond's PARA 2! Execute the code in a browser and check. Don't forget to mark it correct!
type: Answer

http://stackoverflow.com/a/26059064
upvote count: 1
has comment: http://stackoverflow.com/comment/40825781
has comment: http://stackoverflow.com/comment/40826247
has comment: http://stackoverflow.com/comment/40825623
type: AcceptedAnswer
downvote count: 0
has body: I belive that your problem is just a simple bug. When you look at the source code there is following code: contact so data-img-desc="" has to be closed and the right > also... Greetings
type: Answer
accepted answer of: http://stackoverflow.com/q/26058936
answers question: http://stackoverflow.com/q/26058936
score: 1

http://stackoverflow.com/q/26053096
has answer: http://stackoverflow.com/a/26053360
has title: Why don't we exit/die a script after redirect in Javascript?
linked to: http://stackoverflow.com/q/15548697
favorite count: 0
linked to: http://stackoverflow.com/q/9298839
upvote count: 5
tagged with: http-redirect
tagged with: php
has comment: http://stackoverflow.com/comment/40815214
type: AnsweredQuestion
tagged with: exit
downvote count: 0
has body: We need to do exit; after redirect in php because exit; doesn't stop the rest of the code from running. But why we don't do something like that in javascript. I want to do something like if(window.location.replace("http://something.com")){ return; } or window.location.replace("http://something.com"); throw "stop the execution."; Do i need to do that ? If not why?
accepted answer: http://stackoverflow.com/a/26053360
has comment: http://stackoverflow.com/comment/40814714
type: Question
score: 5
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/45173509
type: Comment
has text: @HaiPhan No reason other than that I love parenthesis. Updating.
comment on: http://stackoverflow.com/a/26150073
type: AnswerComment
score: 4

http://stackoverflow.com/comment/40952144
type: QuestionComment
has text: I added an "alert('hello')" to the top of your JS code on codepen, and the alert pops up correctly in latest chrome. http://codepen.io/anon/pen/Kxekc
comment on: http://stackoverflow.com/q/26128272
score: 0
type: Comment

http://stackoverflow.com/q/26152764
tagged with: java
score: 0
tagged with: mongodb
has body: I am trying to compare and contrast MongoDB vs Cassandra. Our project is Java based. Some of the differences i found out are Cassandra is highly available and partition supportive vs MongoDb is consistent and highly available(not so good with partitions). MongoDb is document based.Cassandra gives more flexibility in terms of modelling the data and also storing JSON like structures directly into it. But another difference someone told me is that Cassandra is Java stack based while MongoDB is Javascript based. From a third party users(developers) perspective, how does the stack matter? Considering that i work on a Java project, would a product build on Java stack provide me additional benefits? If so what are those?
answer count: 1
tagged with: javascript
tagged with: cassandra
has comment: http://stackoverflow.com/comment/40997625
has title: Cassandra on Java stack vs Mongo Db on JavaScript stack
has answer: http://stackoverflow.com/a/26153062
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26153062
type: Question
has comment: http://stackoverflow.com/comment/40997329

http://stackoverflow.com/comment/40983762
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26143408
type: Comment
has text: Added, but they are just empty. I use the browsers debugger and can see that the event is never called

http://stackoverflow.com/comment/40988252
type: Comment
has text: the focus is not controllable, but here's a workaround http://jsfiddle.net/Amin52J/4d56n5h4/12/
comment on: http://stackoverflow.com/a/26147337
type: AnswerComment
score: 0

snap.svg
tags question: http://stackoverflow.com/q/26090607
type: Tag
tags question: http://stackoverflow.com/q/26152322
tag name: snap.svg
tags question: http://stackoverflow.com/q/26091081

http://stackoverflow.com/q/26066265
type: Question
tagged with: heroku
has answer: http://stackoverflow.com/a/26066709
tagged with: javascript
score: -1
tagged with: gruntjs
has title: Deploy Yeoman Angular App to Heroku
answer count: 1
downvote count: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: yeoman
has body: I know there are some instructions how to do so (eg like this or this). But i cannot seem to get it running. My server.js looks like this: var app, express, gzippo, morgan; gzippo = require('gzippo'); express = require('express'); morgan = require('morgan'); app = express(); app.use(morgan('dev')); app.use(gzippo.staticGzip("" + __dirname + "/dist")); app.listen(process.env.PORT || 5000); Even if I run my server.js via node locally the rendered webpage just says Cannot GET / so my Heroku Application renders the same message.
upvote count: 0

http://stackoverflow.com/a/26076328
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26076212
type: Answer
has body: background color outputs are rgb() in jQuery as far as I know, so I don't think if there's a convenient way of comparing it! take a look at THIS example, alert($('#color').css('background-color')); if($('#color').css('background-color')=='red'){ alert('first if'); } it will not enter the first if because $('#color').css('background-color') equals rgb(255,0,0) and it doesn't match red so it wont get inside the if condition. what you can do, is to give the desired DOM a class, and check if the element has the class, like this: if($('#color').hasClass('red')){ alert('second if'); } which will fire the alert inside of it.
has comment: http://stackoverflow.com/comment/40857349
has comment: http://stackoverflow.com/comment/40857494
score: 0
answers question: http://stackoverflow.com/q/26076212

gruntjs
tags question: http://stackoverflow.com/q/26034679
tags question: http://stackoverflow.com/q/26042124
tags question: http://stackoverflow.com/q/26128480
tags question: http://stackoverflow.com/q/26154783
tags question: http://stackoverflow.com/q/26153241
tags question: http://stackoverflow.com/q/26066265
tags question: http://stackoverflow.com/q/26144422
tags question: http://stackoverflow.com/q/26180546
tags question: http://stackoverflow.com/q/26180634
tags question: http://stackoverflow.com/q/26091744
tags question: http://stackoverflow.com/q/26106072
tags question: http://stackoverflow.com/q/26146136
tags question: http://stackoverflow.com/q/26102133
tags question: http://stackoverflow.com/q/26047502
tags question: http://stackoverflow.com/q/26081214
type: Tag
tags question: http://stackoverflow.com/q/26142842
tags question: http://stackoverflow.com/q/26068907
tags question: http://stackoverflow.com/q/26034291
tags question: http://stackoverflow.com/q/26144621
tags question: http://stackoverflow.com/q/26105995
tags question: http://stackoverflow.com/q/26080297
tags question: http://stackoverflow.com/q/26190445
tags question: http://stackoverflow.com/q/26064771
tags question: http://stackoverflow.com/q/26146631
tag name: gruntjs
tags question: http://stackoverflow.com/q/26043100

http://stackoverflow.com/comment/40843810
type: Comment
type: QuestionComment
has text: Alright I believe I found part of the issue. At least in Chrome. If I inspect the url of the image http://imgur.com/zKMsEzg
comment on: http://stackoverflow.com/q/26068263
score: 0

http://stackoverflow.com/a/26179675
has comment: http://stackoverflow.com/comment/41047152
has comment: http://stackoverflow.com/comment/41047091
has comment: http://stackoverflow.com/comment/41047009
answers question: http://stackoverflow.com/q/26179382
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41046899
has body: Why don't you send it as an hidden input field? After you post the form, you can do whatever you like with it using php. Something like this: &lt;script type="text/javascript"&gt; $(function(){ $("plugin").change(function(e){ $("input#image").val(e.image); }); }) &lt;/script&gt; &lt;form&gt; &lt;input type="hidden" name="image" id="image" /&gt; &lt;input type="submit" /&gt; &lt;/form&gt; &lt;?php if(getenv("REQUEST_METHOD") === "POST"){ $image = $_POST["image"]; // do what you want } ?&gt; Haven't tested this, but it should be enough to help you get going. If you want to display the image, just do something like this: &lt;img class="thumbnail" src="data:image/gif;base64,R0lGODlh9AEZAdUyAK6VZqBmUNjRrNSon+7"&gt;
has comment: http://stackoverflow.com/comment/41046889
has comment: http://stackoverflow.com/comment/41047335

http://stackoverflow.com/comment/41048867
type: Comment
comment on: http://stackoverflow.com/a/26180307
type: AnswerComment
score: 0
has text: Awesome it worked. Is it bad practice to do it this way?

http://stackoverflow.com/comment/40957503
score: 1
type: Comment
type: QuestionComment
has text: i would use js to add classes/ids to every tab, then you can style away in css without issue. use positional identifiers; digging into content via :contains will be slow and buggy because parents ":contain" the same text...
comment on: http://stackoverflow.com/q/26130955

http://stackoverflow.com/comment/40838152
comment on: http://stackoverflow.com/q/26065587
score: 0
type: Comment
type: QuestionComment
has text: Thank you for the link, I will look into using it. I am currently implementing AJAX based on the tutorial provided here:http://www.w3schools.com/php/php_ajax_database.asp. I prefer using jQuery where I can but am new to AJAX.

http://stackoverflow.com/q/26186117
tagged with: css
answer count: 0
has comment: http://stackoverflow.com/comment/41059571
tagged with: scroll
has comment: http://stackoverflow.com/comment/41060708
type: Question
tagged with: javascript
score: 0
has body: I have a bootstrap list group (with angularjs) of a few hundred items. The list is set to be scrollable (dont want to have a giant page). However if you click or use the scroll wheel, it will move by a fraction of an item. How do you set the scroll rate such that it moves by an item at a time (moves by 40px - the hieght of the item div). I suspect I am using the wrong control for this... css: .list{ max-height: 200px; overflow:scroll; } html: Some tall stuff
has comment: http://stackoverflow.com/comment/41059506
linked to: http://stackoverflow.com/q/25839487
tagged with: angularjs
type: UnansweredQuestion
has title: Setting the scroll rate on a div
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26166387
answers question: http://stackoverflow.com/q/26159691
has body: I like to create a mediator by extending Backbone.Events... var App = {}; App.Events = _.extend({}, Backbone.Events); var MainModel = Backbone.Model.extend({ initialize: function() { App.Events.trigger("my.event"); } }); var ModelA = Backbone.Model.extend({ initialize: function() { App.Events.on("my.event" this.onEvent, this); }, onEvent: function() {} }); var ModelB = Backbone.Model.extend({ initialize: function() { App.Events.on("my.event" this.onEvent, this); }, onEvent: function() {} });
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41115028
has comment: http://stackoverflow.com/comment/41046162
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26159691
has comment: http://stackoverflow.com/comment/41046195
score: 1

http://stackoverflow.com/a/26121685
has body: Maybe going simply by using if (!isNum || inputString === "") { ...
score: 0
answers question: http://stackoverflow.com/q/26121656
type: Answer
has comment: http://stackoverflow.com/comment/40939622

http://stackoverflow.com/q/26105917
tagged with: string
has answer: http://stackoverflow.com/a/26106012
type: UnansweredQuestion
has title: How to get string from text box and display in page in javascript
answer count: 4
has answer: http://stackoverflow.com/a/26105968
has answer: http://stackoverflow.com/a/26106010
type: Question
has body: I'm a newbie to javascript, i have a function which gets a text box value and returns it back, but I am not able to use the return value outside of the function. I want the function to return a string and display it in the webpage. Below is the code. <%@ page import="java.io.*,java.util.*,java.sql.*"%> <%@ page import="javax.servlet.http.*,javax.servlet.*" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%> Inventory test First name: submit p1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26106015

http://stackoverflow.com/q/26072445
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26084071
tagged with: ajax
has comment: http://stackoverflow.com/comment/40852343
has comment: http://stackoverflow.com/comment/40851065
has comment: http://stackoverflow.com/comment/40854482
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/8847829
accepted answer: http://stackoverflow.com/a/26084071
type: Question
has comment: http://stackoverflow.com/comment/40852744
has comment: http://stackoverflow.com/comment/40850782
has comment: http://stackoverflow.com/comment/40852092
tagged with: javascript
has body: I have some legacy code, which aborts ajax requests in a scenario &amp; then after user-response, resends that request. function resendLastAjaxRequest(ajaxRequest, ajaxSettings){ if(ajaxSettings != undefined){ $.ajax(ajaxSettings).done(function ( data ) { ajaxSettings.success(data); }); } Now, the above code fires the success handler for the request twice, but's its been there for more than a year &amp; no one encountered it. Is it because of jquery version updates. We're currently using 2.0.3 I don't know when exactly was jquery updated, but may be in earlier versions done was fired instead of success. Did some digging but couldn't find any reason why it might have worked for so long, please help. Update what is difference between success and .done() method of $.ajax It contains a comment saying ok, it's jQuery 1.8 :) Since $.ajax return a promise from jQuery 1.5 this is a simple substitution for a matter of consistency (using the interface of deferred): done() take place of success(), fail() for error() and always() for complete() that means if done is called, then we have to trigger success explicitly. This might be the reason why it worked for so long. But now, before the done fires the success handler is already called &amp; then the done callback calls the success handler again. Any suggestions on how to change/modify the code such that success is called only once ? EDIT ajaxSettings looks like this : accepts: Object async: true cache: false complete: function (request, status) contentType: "application/x-www-form-urlencoded; charset=UTF-8" contents: Object converters: Object crossDomain: false dataTypes: Array[1] error: function (request, status){flatOptions: Object global: true hasContent: false isLocal: false jsonp: "callback" jsonpCallback: function (){var e=hn.pop()||x.expando+"_"+Yt++;return this[e]=!0,e}loadingdisplay: trueprocessData: true responseFields: Object success: function (htmlData) {type: "GET"
has title: JQuery ajax success fired twice, because of .done callback
score: 0
has comment: http://stackoverflow.com/comment/40850630

http://stackoverflow.com/q/26129023
tagged with: jquery
has title: jQuery last-child selector not "refreshing"
favorite count: 0
has body: On the last textarea box on the page a function is called to insert another textarea box. Making it the new last textarea, however jQuery does not see this textarea being the new last textarea. The function sticks on the last textarea that was inserted via html. function add_new() { $('.edit_main').append(' '); } $(".edit_main li:last-child div.edit_two textarea:last-child").keydown(function(e) { var code = e.keyCode || e.which; if (code == 9) { add_new(); } }); jsfiddle
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26129034
accepted answer: http://stackoverflow.com/a/26129034
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: javascript
upvote count: 1
answer count: 1

http://stackoverflow.com/q/26145272
upvote count: 1
type: Question
tagged with: if-statement
has answer: http://stackoverflow.com/a/26145362
answer count: 3
downvote count: 0
possible better answer: http://stackoverflow.com/a/26145369
tagged with: javascript
score: 1
has answer: http://stackoverflow.com/a/26145369
favorite count: 0
has body: Why does the else in the if statement still occur when an incorrect radio option is selected? The else part should only occur when no radio button is selected. The real outcome is for the next question and possible answers to appear. Heres the jsfiddle. What am I doing wrong? function checkAnswer(){ submit.onclick = function(){ var radios = document.getElementsByName('choices'); var i = 0; var len = radios.length; while(i&lt;len){ if(radios[i].checked){ if(radios[i].id == allQuestions[0].correctAnswer){ userScore++; alert("curent score:" + userScore); break; } }else{ alert("Please selected an option"); break; } i++ } } }
has answer: http://stackoverflow.com/a/26145407
accepted answer: http://stackoverflow.com/a/26145362
type: AnsweredQuestion
has title: Quiz - if statement